├── nodejs-examples ├── .gitkeep ├── ts-ping-pong │ ├── .env.example │ ├── package.json │ ├── index.ts │ ├── tsconfig.json │ └── package-lock.json ├── ts-typewrite-vs-send │ ├── .env.example │ ├── package.json │ ├── index.ts │ ├── tsconfig.json │ └── package-lock.json ├── ts-multi-agent-basic │ ├── .env.example │ ├── package.json │ ├── index.ts │ ├── tsconfig.json │ └── package-lock.json ├── ts-chatgpt-clone-langchain-no-memory │ ├── .env.example │ ├── package.json │ ├── index.ts │ └── tsconfig.json ├── ts-code-interpretor-e2b │ ├── .env.example │ ├── package.json │ ├── index.ts │ └── tsconfig.json ├── ts-multi-agent-stream-basic │ ├── .env.example │ ├── package.json │ ├── index.ts │ ├── tsconfig.json │ └── package-lock.json ├── ts-midjourney-clone-basic │ ├── .env.example │ ├── package.json │ ├── index.ts │ ├── tsconfig.json │ └── package-lock.json └── README.md ├── .gitignore ├── python-examples ├── ping-pong │ ├── tests │ │ └── __init__.py │ ├── pyproject.toml │ └── src │ │ └── app.py ├── chat-with-rust-book │ ├── tests │ │ └── __init__.py │ ├── .gitignore │ ├── .env.example │ ├── Makefile │ ├── pyproject.toml │ ├── README.md │ └── chat_with_rust_book │ │ ├── book.py │ │ ├── utils.py │ │ └── app.py ├── chat-with-windmill-docs │ ├── tests │ │ └── __init__.py │ ├── .gitignore │ ├── .env.example │ ├── Makefile │ ├── pyproject.toml │ ├── README.md │ └── chat_with_windmill_docs │ │ ├── book.py │ │ ├── utils.py │ │ └── app.py ├── multi-agent-stream-basic │ ├── tests │ │ └── __init__.py │ ├── .env.example │ ├── pyproject.toml │ └── src │ │ └── app.py ├── chatgpt-clone-no-memory-langchain │ ├── README.md │ ├── tests │ │ └── __init__.py │ ├── pyproject.toml │ └── chatgpt-clone-no-memory-langchain │ │ └── app.py ├── chatgpt-clone-simple-memory-langchain │ ├── README.md │ ├── tests │ │ └── __init__.py │ ├── pyproject.toml │ └── chatgpt-clone-simple-memory-langchain │ │ └── app.py └── README.md ├── .env.example └── README.md /nodejs-examples/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | .idea 3 | node_modules -------------------------------------------------------------------------------- /python-examples/ping-pong/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /python-examples/chat-with-rust-book/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /python-examples/chat-with-windmill-docs/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /python-examples/multi-agent-stream-basic/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /python-examples/chatgpt-clone-no-memory-langchain/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /python-examples/chatgpt-clone-simple-memory-langchain/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /python-examples/chatgpt-clone-no-memory-langchain/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /python-examples/chatgpt-clone-simple-memory-langchain/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /python-examples/chat-with-rust-book/.gitignore: -------------------------------------------------------------------------------- 1 | vectordb 2 | rust-book 3 | dist 4 | __pycache__ 5 | -------------------------------------------------------------------------------- /python-examples/chat-with-windmill-docs/.gitignore: -------------------------------------------------------------------------------- 1 | vectordb 2 | windmilldocs 3 | dist 4 | __pycache__ 5 | -------------------------------------------------------------------------------- /python-examples/chat-with-rust-book/.env.example: -------------------------------------------------------------------------------- 1 | AGENTLABS_PROJECT_ID= 2 | AGENTLABS_AGENT_ID= 3 | AGENTLABS_URL= 4 | AGENTLABS_SECRET= 5 | -------------------------------------------------------------------------------- /python-examples/chat-with-windmill-docs/.env.example: -------------------------------------------------------------------------------- 1 | AGENTLABS_PROJECT_ID= 2 | AGENTLABS_AGENT_ID= 3 | AGENTLABS_URL= 4 | AGENTLABS_SECRET= 5 | -------------------------------------------------------------------------------- /nodejs-examples/ts-ping-pong/.env.example: -------------------------------------------------------------------------------- 1 | AGENTLABS_URL=https://app.agentlabs.dev 2 | AGENTLABS_PROJECT_ID= 3 | AGENTLABS_SECRET= 4 | AGENTLABS_AGENT_ID= -------------------------------------------------------------------------------- /nodejs-examples/ts-typewrite-vs-send/.env.example: -------------------------------------------------------------------------------- 1 | AGENTLABS_URL=https://app.agentlabs.dev 2 | AGENTLABS_PROJECT_ID= 3 | AGENTLABS_SECRET= 4 | AGENTLABS_AGENT_ID= -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | AGENTLABS_URL= 2 | AGENTLABS_PROJECT_ID= 3 | AGENTLABS_SECRET= 4 | AGENTLABS_AGENT_ID= 5 | 6 | # Required if the example leverages OpenAI models 7 | OPENAI_API_KEY= 8 | -------------------------------------------------------------------------------- /nodejs-examples/ts-multi-agent-basic/.env.example: -------------------------------------------------------------------------------- 1 | AGENTLABS_URL=https://app.agentlabs.dev 2 | AGENTLABS_PROJECT_ID= 3 | AGENTLABS_SECRET= 4 | AGENTLABS_AGENT_A_ID= 5 | AGENTLABS_AGENT_B_ID= 6 | -------------------------------------------------------------------------------- /nodejs-examples/ts-chatgpt-clone-langchain-no-memory/.env.example: -------------------------------------------------------------------------------- 1 | OPENAI_API_KEY= 2 | 3 | AGENTLABS_URL=https://app.agentlabs.dev 4 | AGENTLABS_PROJECT_ID= 5 | AGENTLABS_SECRET= 6 | AGENTLABS_AGENT_ID= -------------------------------------------------------------------------------- /nodejs-examples/ts-code-interpretor-e2b/.env.example: -------------------------------------------------------------------------------- 1 | OPENAI_API_KEY= 2 | 3 | AGENTLABS_URL=https://app.agentlabs.dev 4 | AGENTLABS_PROJECT_ID= 5 | AGENTLABS_SECRET= 6 | AGENTLABS_AGENT_ID= 7 | 8 | E2B_API_KEY= -------------------------------------------------------------------------------- /python-examples/multi-agent-stream-basic/.env.example: -------------------------------------------------------------------------------- 1 | OPENAI_API_KEY= 2 | 3 | AGENTLABS_URL= 4 | AGENTLABS_PROJECT_ID= 5 | AGENTLABS_SECRET= 6 | MANAGER_AGENT_ID= 7 | PLANNER_AGENT_ID= 8 | COPYWRITER_AGENT_ID= 9 | -------------------------------------------------------------------------------- /nodejs-examples/ts-multi-agent-stream-basic/.env.example: -------------------------------------------------------------------------------- 1 | AGENTLABS_URL=https://app.agentlabs.dev 2 | AGENTLABS_PROJECT_ID= 3 | AGENTLABS_SECRET= 4 | MANAGER_AGENT_ID= 5 | PLANNER_AGENT_ID= 6 | COPYWRITER_AGENT_ID= 7 | 8 | -------------------------------------------------------------------------------- /nodejs-examples/ts-midjourney-clone-basic/.env.example: -------------------------------------------------------------------------------- 1 | AGENTLABS_URL=https://app.agentlabs.dev 2 | AGENTLABS_PROJECT_ID= 3 | AGENTLABS_SECRET= 4 | AGENTLABS_AGENT_ID= 5 | DEZGO_API_KEY=DEZGO-3FDAA36F00C8FD2184F9269C2E3454409B34E2DAA7CF7C31A766DEE28FB3E4E04A219DF3 -------------------------------------------------------------------------------- /python-examples/chat-with-rust-book/Makefile: -------------------------------------------------------------------------------- 1 | run: rust-book 2 | python chat_with_rust_book/app.py 3 | 4 | setup: rust-book 5 | 6 | rust-book: 7 | git clone https://github.com/rust-lang/book.git rust-book 8 | rm -rf ./vectordb 9 | python chat_with_rust_book/book.py 10 | -------------------------------------------------------------------------------- /python-examples/chat-with-windmill-docs/Makefile: -------------------------------------------------------------------------------- 1 | run: windmilldocs 2 | python chat_with_windmill_docs/app.py 3 | 4 | setup: windmilldocs 5 | 6 | windmilldocs: 7 | git clone https://github.com/windmill-labs/windmilldocs windmilldocs 8 | rm -rf ./vectordb 9 | python chat_with_windmill_docs/book.py 10 | -------------------------------------------------------------------------------- /python-examples/ping-pong/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "chatgpt-clone-no-memory-langchain" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Kevin Piacentini "] 6 | readme = "README.md" 7 | 8 | [tool.poetry.dependencies] 9 | python = "^3.11" 10 | python-dotenv = "^1.0.0" 11 | agentlabs-sdk = "^0.0.33" 12 | pydantic = "^2.4.2" 13 | 14 | 15 | [build-system] 16 | requires = ["poetry-core"] 17 | build-backend = "poetry.core.masonry.api" 18 | -------------------------------------------------------------------------------- /python-examples/multi-agent-stream-basic/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "chatgpt-clone-no-memory-langchain" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Kevin Piacentini "] 6 | readme = "README.md" 7 | 8 | [tool.poetry.dependencies] 9 | python = "^3.11" 10 | python-dotenv = "^1.0.0" 11 | pydantic = "^2.4.2" 12 | agentlabs-sdk = "^0.0.51" 13 | 14 | 15 | [build-system] 16 | requires = ["poetry-core"] 17 | build-backend = "poetry.core.masonry.api" 18 | -------------------------------------------------------------------------------- /python-examples/chatgpt-clone-no-memory-langchain/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "chatgpt-clone-no-memory-langchain" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Aurélien Brabant "] 6 | readme = "README.md" 7 | 8 | [tool.poetry.dependencies] 9 | python = "^3.11" 10 | langchain = "^0.0.311" 11 | openai = "^0.28.1" 12 | python-dotenv = "^1.0.0" 13 | agentlabs-sdk = "^0.0.33" 14 | 15 | 16 | [build-system] 17 | requires = ["poetry-core"] 18 | build-backend = "poetry.core.masonry.api" 19 | -------------------------------------------------------------------------------- /nodejs-examples/ts-ping-pong/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ts-ping-pong", 3 | "version": "1.0.0", 4 | "description": "Dead simple example showing how to use AgentLabs SDK in nodejs", 5 | "main": "index.ts", 6 | "author": "Kevin Piacentini ", 7 | "license": "ISC", 8 | "scripts": { 9 | "start": "ts-node index.ts" 10 | }, 11 | "devDependencies": { 12 | "ts-node": "^10.9.1" 13 | }, 14 | "dependencies": { 15 | "@agentlabs/node-sdk": "^0.0.62", 16 | "dotenv": "^16.3.1" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /python-examples/chatgpt-clone-simple-memory-langchain/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "chatgpt-clone-simple-memory-langchain" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Aurélien Brabant "] 6 | readme = "README.md" 7 | 8 | [tool.poetry.dependencies] 9 | python = "^3.11" 10 | langchain = "^0.0.311" 11 | openai = "^0.28.1" 12 | python-dotenv = "^1.0.0" 13 | agentlabs-sdk = "^0.0.33" 14 | 15 | 16 | [build-system] 17 | requires = ["poetry-core"] 18 | build-backend = "poetry.core.masonry.api" 19 | -------------------------------------------------------------------------------- /nodejs-examples/ts-typewrite-vs-send/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ts-ping-pong", 3 | "version": "1.0.0", 4 | "description": "Dead simple example showing how to use AgentLabs SDK in nodejs", 5 | "main": "index.ts", 6 | "author": "Kevin Piacentini ", 7 | "license": "ISC", 8 | "scripts": { 9 | "start": "ts-node index.ts" 10 | }, 11 | "devDependencies": { 12 | "ts-node": "^10.9.1" 13 | }, 14 | "dependencies": { 15 | "@agentlabs/node-sdk": "^0.0.51", 16 | "dotenv": "^16.3.1" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /nodejs-examples/ts-multi-agent-basic/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ts-multi-agent-basic", 3 | "version": "1.0.0", 4 | "description": "Dead simple example showing how to use AgentLabs SDK in nodejs", 5 | "main": "index.ts", 6 | "author": "Kevin Piacentini ", 7 | "license": "ISC", 8 | "scripts": { 9 | "start": "ts-node index.ts" 10 | }, 11 | "devDependencies": { 12 | "ts-node": "^10.9.1" 13 | }, 14 | "dependencies": { 15 | "@agentlabs/node-sdk": "^0.0.35", 16 | "dotenv": "^16.3.1" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /nodejs-examples/ts-multi-agent-stream-basic/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ts-multi-agent-basic", 3 | "version": "1.0.0", 4 | "description": "Dead simple example showing how to use AgentLabs SDK in nodejs", 5 | "main": "index.ts", 6 | "author": "Kevin Piacentini ", 7 | "license": "ISC", 8 | "scripts": { 9 | "start": "ts-node index.ts" 10 | }, 11 | "devDependencies": { 12 | "ts-node": "^10.9.1" 13 | }, 14 | "dependencies": { 15 | "@agentlabs/node-sdk": "^0.0.51", 16 | "dotenv": "^16.3.1" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /nodejs-examples/ts-midjourney-clone-basic/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ts-ping-pong", 3 | "version": "1.0.0", 4 | "description": "Dead simple example showing how to use AgentLabs SDK in nodejs", 5 | "main": "index.ts", 6 | "author": "Kevin Piacentini ", 7 | "license": "ISC", 8 | "scripts": { 9 | "start": "ts-node index.ts" 10 | }, 11 | "devDependencies": { 12 | "ts-node": "^10.9.1" 13 | }, 14 | "dependencies": { 15 | "@agentlabs/node-sdk": "^0.0.62", 16 | "axios": "^1.5.1", 17 | "dotenv": "^16.3.1" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /python-examples/chat-with-windmill-docs/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "chat-with-windmill-docs" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Aurélien Brabant "] 6 | readme = "README.md" 7 | 8 | [tool.poetry.dependencies] 9 | python = "^3.11" 10 | langchain = "^0.0.314" 11 | openai = "^0.28.1" 12 | unstructured = {extras = ["md"], version = "^0.10.22"} 13 | python-dotenv = "^1.0.0" 14 | chromadb = "^0.4.14" 15 | tiktoken = "^0.5.1" 16 | agentlabs-sdk = "^0.0.37" 17 | 18 | 19 | [build-system] 20 | requires = ["poetry-core"] 21 | build-backend = "poetry.core.masonry.api" 22 | -------------------------------------------------------------------------------- /nodejs-examples/ts-code-interpretor-e2b/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ts-code-interpretor-e2b", 3 | "version": "1.0.0", 4 | "description": "Dead simple example showing how to use AgentLabs SDK in nodejs to recode a code interpretor using e2b.dev", 5 | "main": "index.ts", 6 | "author": "Kevin Piacentini ", 7 | "license": "ISC", 8 | "scripts": { 9 | "start": "ts-node index.ts" 10 | }, 11 | "devDependencies": { 12 | "ts-node": "^10.9.1" 13 | }, 14 | "dependencies": { 15 | "@agentlabs/node-sdk": "^0.0.35", 16 | "@e2b/sdk": "^0.6.2", 17 | "dotenv": "^16.3.1", 18 | "openai": "^4.12.1" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /python-examples/chat-with-rust-book/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "chat-with-rust-book" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Aurélien Brabant "] 6 | readme = "README.md" 7 | 8 | [tool.poetry.dependencies] 9 | python = "^3.11" 10 | langchain = "^0.0.314" 11 | openai = "^0.28.1" 12 | unstructured = {extras = ["md"], version = "^0.10.22"} 13 | python-dotenv = "^1.0.0" 14 | chromadb = "^0.4.14" 15 | tiktoken = "^0.5.1" 16 | agentlabs-sdk = {path = "/Users/aurelienbrabant/prog/agentslab-poc/sdks/python-sdk"} 17 | 18 | 19 | [build-system] 20 | requires = ["poetry-core"] 21 | build-backend = "poetry.core.masonry.api" 22 | -------------------------------------------------------------------------------- /nodejs-examples/ts-chatgpt-clone-langchain-no-memory/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ts-code-interpretor-e2b", 3 | "version": "1.0.0", 4 | "description": "Dead simple example showing how to use AgentLabs SDK in nodejs to recode a code interpretor using e2b.dev", 5 | "main": "index.ts", 6 | "author": "Kevin Piacentini ", 7 | "license": "ISC", 8 | "scripts": { 9 | "start": "ts-node index.ts" 10 | }, 11 | "devDependencies": { 12 | "ts-node": "^10.9.1" 13 | }, 14 | "dependencies": { 15 | "@agentlabs/node-sdk": "^0.0.49", 16 | "dotenv": "^16.3.1", 17 | "langchain": "^0.0.167", 18 | "openai": "^4.12.1" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /nodejs-examples/README.md: -------------------------------------------------------------------------------- 1 | # nodejs-examples 2 | 3 | This directory contains examples of AI agents that integrate with AgentLabs thanks to the provided [node SDK](https://www.npmjs.com/package/@agentlabs/node-sdk). 4 | 5 | Some of these examples are making use of the amazing [langchain](https://python.langchain.com) framework, while others are keeping things very bare bones. 6 | 7 | All the node examples use Typescript. 8 | 9 | ## Start an example 10 | 11 | Assuming you configured your environment properly (refer to this repository's top level README for more info on that), starting an example is only 12 | a few steps away: 13 | 14 | ```sh 15 | cd my-example 16 | 17 | npm install 18 | npm run start 19 | ``` 20 | -------------------------------------------------------------------------------- /python-examples/chat-with-rust-book/README.md: -------------------------------------------------------------------------------- 1 | # Chat with rust book 2 | 3 | A langchain powered agent that answers question about the [official rust book](https://doc.rust-lang.org/book/). 4 | 5 | ## Getting started 6 | 7 | First, make sure you copied the environment from .env.example and filled the required values appropriately. 8 | If you don't have created an AgentLabs project yet, you are invited to do son the [cloud edition](https://console.agentlabs.dev). 9 | 10 | ``` 11 | po install 12 | po shell 13 | make 14 | ``` 15 | 16 | The last `make` command will clone the `rust-book` official repository and generate documents and store them in a local vector database for further use. 17 | 18 | It will then initiate a connection to AgentLabs, making the agent actually chattable from its chat UI. 19 | -------------------------------------------------------------------------------- /python-examples/chat-with-windmill-docs/README.md: -------------------------------------------------------------------------------- 1 | # Chat with rust book 2 | 3 | A langchain powered agent that answers question about the [official rust book](https://doc.rust-lang.org/book/). 4 | 5 | ## Getting started 6 | 7 | First, make sure you copied the environment from .env.example and filled the required values appropriately. 8 | If you don't have created an AgentLabs project yet, you are invited to do son the [cloud edition](https://console.agentlabs.dev). 9 | 10 | ``` 11 | po install 12 | po shell 13 | make 14 | ``` 15 | 16 | The last `make` command will clone the `rust-book` official repository and generate documents and store them in a local vector database for further use. 17 | 18 | It will then initiate a connection to AgentLabs, making the agent actually chattable from its chat UI. 19 | -------------------------------------------------------------------------------- /python-examples/README.md: -------------------------------------------------------------------------------- 1 | # python-examples 2 | 3 | This directory contains examples of AI agents that integrate with AgentLabs thanks to the provided [python SDK](https://pypi.org/project/agentlabs-sdk/). 4 | 5 | Some of these examples are making use of the amazing [langchain](https://python.langchain.com) framework, while others are keeping things very bare bones. 6 | 7 | All the python projects used for these examples use [poetry](https://python-poetry.org/) as their package manager. 8 | 9 | ## Start an example 10 | 11 | Assuming you configured your environment properly (refer to this repository's top level README for more info on that), starting an example is only 12 | a few steps away: 13 | 14 | ```sh 15 | cd my-example 16 | 17 | poetry install 18 | poetry shell 19 | 20 | python my-example/app.py 21 | ``` 22 | -------------------------------------------------------------------------------- /python-examples/chat-with-rust-book/chat_with_rust_book/book.py: -------------------------------------------------------------------------------- 1 | from dotenv import load_dotenv 2 | 3 | from langchain.document_loaders import DirectoryLoader 4 | from langchain.text_splitter import CharacterTextSplitter 5 | from langchain.vectorstores import Chroma 6 | from langchain.embeddings import OpenAIEmbeddings 7 | 8 | if __name__ == '__main__': 9 | load_dotenv() 10 | print('cooking book documents...') 11 | loader = DirectoryLoader('./rust-book/src', glob="**/*.md", use_multithreading=True) 12 | docs = loader.load() 13 | 14 | text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=200) 15 | docs = text_splitter.split_documents(docs) 16 | 17 | vectordb = Chroma.from_documents( 18 | docs, 19 | embedding=OpenAIEmbeddings(), 20 | persist_directory='./vectordb' 21 | ) 22 | vectordb.persist() 23 | print('done!') 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # agent examples 2 | 3 | This repository holds example agents that you could build and integrate with AgentLabs. 4 | 5 | As of today we provide both `nodeJS` and `python` examples as these are the two languages supported by AgentLabs. 6 | 7 | ## Configure environment 8 | 9 | If you want to try these examples out for yourself, using either your self hosted Agentlabs instance or the cloud version, 10 | you will have to configure your environment beforehand. 11 | 12 | For this, simply copy the contents of the `.env.example` file inside one named `.env`. 13 | 14 | Fill the values according to your Agentlabs configuration, and you should be good to go. 15 | 16 | The examples will automatically read this env file and use these credentials to connect. 17 | 18 | To learn how to run an example agent, head over to the `python-examples` or `nodejs-examples` directory in which you'll find 19 | more detailed instructions targeting your favorite programming language. 20 | -------------------------------------------------------------------------------- /python-examples/chat-with-windmill-docs/chat_with_windmill_docs/book.py: -------------------------------------------------------------------------------- 1 | from dotenv import load_dotenv 2 | 3 | from langchain.document_loaders import DirectoryLoader 4 | from langchain.text_splitter import CharacterTextSplitter 5 | from langchain.vectorstores import Chroma 6 | from langchain.embeddings import OpenAIEmbeddings 7 | 8 | if __name__ == '__main__': 9 | load_dotenv() 10 | print('cooking book documents...') 11 | mdLoader = DirectoryLoader('./windmilldocs/docs', glob="**/*.md", use_multithreading=True) 12 | mdxLoader = DirectoryLoader('./windmilldocs/docs', glob="**/*.mdx", use_multithreading=True) 13 | docs = [*mdLoader.load(), *mdxLoader.load()] 14 | 15 | text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=200) 16 | docs = text_splitter.split_documents(docs) 17 | 18 | vectordb = Chroma.from_documents( 19 | docs, 20 | embedding=OpenAIEmbeddings(), 21 | persist_directory='./vectordb' 22 | ) 23 | vectordb.persist() 24 | print('done!') 25 | -------------------------------------------------------------------------------- /python-examples/chat-with-rust-book/chat_with_rust_book/utils.py: -------------------------------------------------------------------------------- 1 | from dataclasses import dataclass 2 | from dotenv import load_dotenv 3 | import os 4 | 5 | @dataclass 6 | class ParsedEnv: 7 | project_id: str 8 | agentlabs_url: str 9 | secret: str 10 | agent_id: str 11 | 12 | def parse_env_or_raise(): 13 | load_dotenv() 14 | 15 | project_id = os.environ.get('AGENTLABS_PROJECT_ID') 16 | if not project_id: 17 | raise Exception("AGENTLABS_PROJECT_ID is not set") 18 | 19 | agentlabs_url = os.environ.get('AGENTLABS_URL') 20 | if not agentlabs_url: 21 | raise Exception("AGENTLABS_URL is not set") 22 | 23 | secret = os.environ.get('AGENTLABS_SECRET') 24 | if not secret: 25 | raise Exception("AGENTLABS_SECRET is not set") 26 | 27 | agent_id = os.environ.get('AGENTLABS_AGENT_ID') 28 | if not agent_id: 29 | raise Exception("AGENTLABS_AGENT_ID is not set") 30 | 31 | return ParsedEnv( 32 | project_id=project_id, 33 | agentlabs_url=agentlabs_url, 34 | secret=secret, 35 | agent_id=agent_id, 36 | ) 37 | -------------------------------------------------------------------------------- /python-examples/chat-with-windmill-docs/chat_with_windmill_docs/utils.py: -------------------------------------------------------------------------------- 1 | from dataclasses import dataclass 2 | from dotenv import load_dotenv 3 | import os 4 | 5 | @dataclass 6 | class ParsedEnv: 7 | project_id: str 8 | agentlabs_url: str 9 | secret: str 10 | agent_id: str 11 | 12 | def parse_env_or_raise(): 13 | load_dotenv() 14 | 15 | project_id = os.environ.get('AGENTLABS_PROJECT_ID') 16 | if not project_id: 17 | raise Exception("AGENTLABS_PROJECT_ID is not set") 18 | 19 | agentlabs_url = os.environ.get('AGENTLABS_URL') 20 | if not agentlabs_url: 21 | raise Exception("AGENTLABS_URL is not set") 22 | 23 | secret = os.environ.get('AGENTLABS_SECRET') 24 | if not secret: 25 | raise Exception("AGENTLABS_SECRET is not set") 26 | 27 | agent_id = os.environ.get('AGENTLABS_AGENT_ID') 28 | if not agent_id: 29 | raise Exception("AGENTLABS_AGENT_ID is not set") 30 | 31 | return ParsedEnv( 32 | project_id=project_id, 33 | agentlabs_url=agentlabs_url, 34 | secret=secret, 35 | agent_id=agent_id, 36 | ) 37 | -------------------------------------------------------------------------------- /nodejs-examples/ts-ping-pong/index.ts: -------------------------------------------------------------------------------- 1 | import {Project} from "@agentlabs/node-sdk"; 2 | 3 | const projectId = process.env.AGENTLABS_PROJECT_ID; 4 | const secret = process.env.AGENTLABS_SECRET; 5 | const agentId = process.env.AGENTLABS_AGENT_ID; 6 | const agentlabsUrl = process.env.AGENTLABS_URL; 7 | 8 | if (!projectId) { 9 | throw new Error('Missing AGENTLABS_PROJECT_ID'); 10 | } 11 | if (!secret) { 12 | throw new Error('Missing AGENTLABS_SECRET'); 13 | } 14 | if (!agentId) { 15 | throw new Error('Missing AGENTLABS_AGENT_ID'); 16 | } 17 | if (!agentlabsUrl) { 18 | throw new Error('Missing AGENTLABS_URL'); 19 | } 20 | 21 | const project = new Project({ 22 | projectId, 23 | secret, 24 | url: agentlabsUrl, 25 | }); 26 | 27 | const agent = project.agent(agentId); 28 | 29 | project.onChatMessage(async (message) => { 30 | // We can simulate a delay... 31 | await new Promise(resolve => setTimeout(resolve, 500)); 32 | 33 | if (message.text === 'ping') { 34 | agent.send({ 35 | text: 'pong', 36 | conversationId: message.conversationId, 37 | }); 38 | } else { 39 | agent.send({ 40 | text: 'Sorry I only understand "ping"', 41 | conversationId: message.conversationId, 42 | }); 43 | } 44 | }); 45 | 46 | project.connect(); -------------------------------------------------------------------------------- /nodejs-examples/ts-multi-agent-basic/index.ts: -------------------------------------------------------------------------------- 1 | import 'dotenv/config'; 2 | import { Project } from "@agentlabs/node-sdk"; 3 | 4 | const projectId = process.env.AGENTLABS_PROJECT_ID; 5 | const secret = process.env.AGENTLABS_SECRET; 6 | const agentAId = process.env.AGENTLABS_AGENT_A_ID; 7 | const agentBId = process.env.AGENTLABS_AGENT_B_ID; 8 | const agentlabsUrl = process.env.AGENTLABS_URL; 9 | 10 | if (!projectId) { 11 | throw new Error('Missing AGENTLABS_PROJECT_ID'); 12 | } 13 | if (!secret) { 14 | throw new Error('Missing AGENTLABS_SECRET'); 15 | } 16 | if (!agentAId || !agentBId) { 17 | throw new Error('Missing AGENTLABS_AGENT_A_ID or AGENTLABS_AGENT_B_ID'); 18 | } 19 | if (!agentlabsUrl) { 20 | throw new Error('Missing AGENTLABS_URL'); 21 | } 22 | 23 | const project = new Project({ 24 | projectId, 25 | secret, 26 | url: agentlabsUrl, 27 | }); 28 | 29 | const agentA = project.agent(agentAId); 30 | const agentB = project.agent(agentBId); 31 | 32 | project.onChatMessage(async (message) => { 33 | // We can simulate a delay... 34 | await new Promise(resolve => setTimeout(resolve, 500)); 35 | agentA.send({ 36 | text: 'Hello I am the Agent A', 37 | conversationId: message.conversationId, 38 | }); 39 | agentB.send({ 40 | text: 'Hello I am the Agent B', 41 | conversationId: message.conversationId, 42 | }); 43 | }); 44 | 45 | project.connect(); -------------------------------------------------------------------------------- /nodejs-examples/ts-chatgpt-clone-langchain-no-memory/index.ts: -------------------------------------------------------------------------------- 1 | import 'dotenv/config'; 2 | import { Project } from "@agentlabs/node-sdk"; 3 | import { ChatOpenAI } from "langchain/chat_models/openai"; 4 | import {HumanMessage} from "langchain/schema"; 5 | 6 | const projectId = process.env.AGENTLABS_PROJECT_ID; 7 | const secret = process.env.AGENTLABS_SECRET; 8 | const agentId = process.env.AGENTLABS_AGENT_ID; 9 | const agentlabsUrl = process.env.AGENTLABS_URL; 10 | const openaiApiKey = process.env.OPENAI_API_KEY; 11 | 12 | if (!projectId) { 13 | throw new Error('Missing AGENTLABS_PROJECT_ID'); 14 | } 15 | if (!secret) { 16 | throw new Error('Missing AGENTLABS_SECRET'); 17 | } 18 | if (!agentId) { 19 | throw new Error('Missing AGENTLABS_AGENT_ID'); 20 | } 21 | if (!agentlabsUrl) { 22 | throw new Error('Missing AGENTLABS_URL'); 23 | } 24 | if (!openaiApiKey) { 25 | throw new Error('Missing OPENAI_API_KEY'); 26 | } 27 | 28 | const project = new Project({ 29 | projectId, 30 | secret, 31 | url: agentlabsUrl, 32 | }); 33 | 34 | const agent = project.agent(agentId); 35 | project.onChatMessage(async (userMessage) => { 36 | const conversationId = userMessage.conversationId; 37 | 38 | const chat = new ChatOpenAI({ 39 | streaming: true, 40 | }); 41 | 42 | const stream = agent.createStream({ conversationId }, { 43 | format: 'Markdown', 44 | }); 45 | 46 | await chat.call([new HumanMessage(userMessage.text)], { 47 | callbacks: [ 48 | { 49 | handleLLMNewToken(token: string) { 50 | stream.write(token); 51 | }, 52 | }, 53 | ], 54 | }); 55 | stream.end(); 56 | }); 57 | 58 | project.connect(); 59 | -------------------------------------------------------------------------------- /python-examples/ping-pong/src/app.py: -------------------------------------------------------------------------------- 1 | from typing import Any, Dict, List 2 | from dotenv import load_dotenv 3 | import os 4 | from agentlabs.project import Project, IncomingChatMessage 5 | from pydantic.v1.dataclasses import dataclass 6 | 7 | 8 | 9 | @dataclass() 10 | class ParsedEnv: 11 | project_id: str 12 | agentlabs_url: str 13 | secret: str 14 | agent_id: str 15 | 16 | def parse_env_or_raise(): 17 | load_dotenv() 18 | 19 | project_id = os.environ.get('AGENTLABS_PROJECT_ID') 20 | if not project_id: 21 | raise Exception("AGENTLABS_PROJECT_ID is not set") 22 | 23 | agentlabs_url = os.environ.get('AGENTLABS_URL') 24 | if not agentlabs_url: 25 | raise Exception("AGENTLABS_URL is not set") 26 | 27 | secret = os.environ.get('AGENTLABS_SECRET') 28 | if not secret: 29 | raise Exception("AGENTLABS_SECRET is not set") 30 | 31 | agent_id = os.environ.get('AGENTLABS_AGENT_ID') 32 | if not agent_id: 33 | raise Exception("AGENTLABS_AGENT_ID is not set") 34 | 35 | return ParsedEnv( 36 | project_id=project_id, 37 | agentlabs_url=agentlabs_url, 38 | secret=secret, 39 | agent_id=agent_id, 40 | ) 41 | 42 | def handle_task(message: IncomingChatMessage): 43 | if message.text == "ping": 44 | agent.send( 45 | conversation_id=message.conversation_id, 46 | text="pong", 47 | ) 48 | else: 49 | agent.send( 50 | conversation_id=message.conversation_id, 51 | text="I don't understand.", 52 | ) 53 | 54 | if __name__ == "__main__": 55 | env = parse_env_or_raise() 56 | project = Project( 57 | project_id=env.project_id, 58 | agentlabs_url=env.agentlabs_url, 59 | secret=env.secret, 60 | ) 61 | 62 | agent = project.agent(id=env.agent_id) 63 | project.on_chat_message(handle_task) 64 | 65 | project.connect() 66 | project.wait() 67 | -------------------------------------------------------------------------------- /nodejs-examples/ts-midjourney-clone-basic/index.ts: -------------------------------------------------------------------------------- 1 | import 'dotenv/config'; 2 | import {Attachment, Project} from "@agentlabs/node-sdk"; 3 | import axios, {Axios} from "axios"; 4 | import * as fs from "fs"; 5 | 6 | const projectId = process.env.AGENTLABS_PROJECT_ID; 7 | const secret = process.env.AGENTLABS_SECRET; 8 | const agentId = process.env.AGENTLABS_AGENT_ID; 9 | const agentlabsUrl = process.env.AGENTLABS_URL; 10 | const dezgoApiKey = process.env.DEZGO_API_KEY; 11 | 12 | if (!projectId || !secret || !agentId || !agentlabsUrl || !dezgoApiKey) { 13 | throw new Error('Missing environment variables'); 14 | } 15 | 16 | const agentlabs = new Project({ 17 | projectId, 18 | secret, 19 | url: agentlabsUrl, 20 | }); 21 | 22 | const agent = agentlabs.agent(agentId); 23 | 24 | const generateImage = async (prompt: string): Promise<{ path: string }> => { 25 | const response = await axios.post('https://api.dezgo.com/text2image', { 26 | prompt, 27 | width: 320, 28 | height: 320, 29 | model: 'dreamshaper_8', 30 | }, { 31 | responseType: 'arraybuffer', 32 | headers: { 33 | 'x-dezgo-key': dezgoApiKey, 34 | }, 35 | }); 36 | // We store our image locally 37 | const filePath = `/tmp/my-image-${Date.now()}.png`; 38 | fs.writeFileSync(filePath, response.data); 39 | return { 40 | path: filePath, 41 | } 42 | } 43 | 44 | agentlabs.onChatMessage(async (message) => { 45 | // Here we leverage the Dezgo API to generate 3 images from the user's text prompt 46 | const [ 47 | image1, 48 | image2, 49 | image3, 50 | ] = await Promise.all([ 51 | generateImage(message.text), 52 | generateImage(message.text), 53 | generateImage(message.text), 54 | ]); 55 | 56 | // We create our Agent Labs Attachments from our local files 57 | const attachments = [ 58 | Attachment.fromLocalFile(image1.path), 59 | Attachment.fromLocalFile(image2.path), 60 | Attachment.fromLocalFile(image3.path), 61 | ]; 62 | 63 | // We send the attachment to the user 64 | await agent.send({ 65 | conversationId: message.conversationId, 66 | text: 'Here are your images :)', 67 | attachments, 68 | }); 69 | }); 70 | 71 | agentlabs.connect(); -------------------------------------------------------------------------------- /nodejs-examples/ts-multi-agent-stream-basic/index.ts: -------------------------------------------------------------------------------- 1 | import 'dotenv/config'; 2 | import { Project } from "@agentlabs/node-sdk"; 3 | 4 | const projectId = process.env.AGENTLABS_PROJECT_ID; 5 | const secret = process.env.AGENTLABS_SECRET; 6 | const agentlabsUrl = process.env.AGENTLABS_URL; 7 | const managerAgentId = process.env.MANAGER_AGENT_ID; 8 | const plannerAgentId = process.env.PLANNER_AGENT_ID; 9 | const copywriterAgentId = process.env.COPYWRITER_AGENT_ID; 10 | 11 | if (!projectId) { 12 | throw new Error('Missing AGENTLABS_PROJECT_ID'); 13 | } 14 | if (!secret) { 15 | throw new Error('Missing AGENTLABS_SECRET'); 16 | } 17 | if (!managerAgentId || !copywriterAgentId || !plannerAgentId) { 18 | throw new Error('Missing agent ids'); 19 | } 20 | if (!agentlabsUrl) { 21 | throw new Error('Missing AGENTLABS_URL'); 22 | } 23 | 24 | const project = new Project({ 25 | projectId, 26 | secret, 27 | url: agentlabsUrl, 28 | }); 29 | 30 | const manager = project.agent(managerAgentId); 31 | const planner = project.agent(plannerAgentId); 32 | const copywriter = project.agent(copywriterAgentId); 33 | 34 | project.onChatMessage(async (message) => { 35 | await manager.typewrite({ 36 | conversationId: message.conversationId, 37 | text: "Ok, I will assign the task to the planner and copywriter." 38 | }); 39 | 40 | await Promise.all([ 41 | planner.typewrite({ 42 | conversationId: message.conversationId, 43 | text: "Planner there! I'm making the schedule now...", 44 | }), 45 | copywriter.typewrite({ 46 | conversationId: message.conversationId, 47 | text: "Copywriter there! Waiting for the schedule...", 48 | }), 49 | ]); 50 | 51 | await planner.typewrite({ 52 | conversationId: message.conversationId, 53 | text: "Schedule is ready!" 54 | }, { 55 | initialDelayMs: 5000, 56 | }).then(async () => { 57 | await copywriter.typewrite({ 58 | conversationId: message.conversationId, 59 | text: "Ok, I'm writing the posts now.", 60 | }); 61 | 62 | await copywriter.typewrite({ 63 | conversationId: message.conversationId, 64 | text: "I am done with the posts. Manager, please review them.", 65 | }, { 66 | initialDelayMs: 5000, 67 | }) 68 | }); 69 | }); 70 | 71 | project.connect(); -------------------------------------------------------------------------------- /python-examples/multi-agent-stream-basic/src/app.py: -------------------------------------------------------------------------------- 1 | from typing import Any, Dict, List 2 | from dotenv import load_dotenv 3 | import os 4 | from agentlabs.project import Project, IncomingChatMessage 5 | from pydantic.v1.dataclasses import dataclass 6 | 7 | @dataclass() 8 | class ParsedEnv: 9 | project_id: str 10 | agentlabs_url: str 11 | secret: str 12 | manager_agent_id: str 13 | copywriter_agent_id: str 14 | planner_agent_id: str 15 | 16 | def parse_env_or_raise(): 17 | load_dotenv() 18 | 19 | project_id = os.environ.get('AGENTLABS_PROJECT_ID') 20 | if not project_id: 21 | raise Exception("AGENTLABS_PROJECT_ID is not set") 22 | 23 | agentlabs_url = os.environ.get('AGENTLABS_URL') 24 | if not agentlabs_url: 25 | raise Exception("AGENTLABS_URL is not set") 26 | 27 | secret = os.environ.get('AGENTLABS_SECRET') 28 | if not secret: 29 | raise Exception("AGENTLABS_SECRET is not set") 30 | 31 | copywriter_agent_id = os.environ.get('COPYWRITER_AGENT_ID') 32 | if not copywriter_agent_id: 33 | raise Exception("COPYWRITER_AGENT_ID is not set") 34 | 35 | planner_agent_id = os.environ.get('PLANNER_AGENT_ID') 36 | if not planner_agent_id: 37 | raise Exception("PLANNER_AGENT_ID is not set") 38 | 39 | manager_agent_id = os.environ.get('MANAGER_AGENT_ID') 40 | if not manager_agent_id: 41 | raise Exception("MANAGER_AGENT_ID is not set") 42 | 43 | return ParsedEnv( 44 | project_id=project_id, 45 | agentlabs_url=agentlabs_url, 46 | secret=secret, 47 | manager_agent_id=manager_agent_id, 48 | copywriter_agent_id=copywriter_agent_id, 49 | planner_agent_id=planner_agent_id, 50 | ) 51 | 52 | def handle_task(message: IncomingChatMessage): 53 | manager.typewrite( 54 | conversation_id=message.conversation_id, 55 | text="Ok I will ask my agents to handle this.", 56 | ) 57 | 58 | planner.typewrite( 59 | conversation_id=message.conversation_id, 60 | text="I will plan the work for you." 61 | ) 62 | copywriter.typewrite( 63 | conversation_id=message.conversation_id, 64 | text="I will write the copy for you.", 65 | initial_delay_ms=3000 66 | ) 67 | 68 | if __name__ == "__main__": 69 | env = parse_env_or_raise() 70 | project = Project( 71 | project_id=env.project_id, 72 | agentlabs_url=env.agentlabs_url, 73 | secret=env.secret, 74 | ) 75 | 76 | manager = project.agent(id=env.manager_agent_id) 77 | copywriter = project.agent(id=env.copywriter_agent_id) 78 | planner = project.agent(id=env.planner_agent_id) 79 | 80 | project.on_chat_message(handle_task) 81 | 82 | project.connect() 83 | project.wait() 84 | -------------------------------------------------------------------------------- /python-examples/chat-with-rust-book/chat_with_rust_book/app.py: -------------------------------------------------------------------------------- 1 | import os 2 | from time import sleep 3 | 4 | from agentlabs.chat import MessageFormat 5 | from agentlabs.project import Any, IncomingChatMessage, Project 6 | from langchain.chains import ConversationalRetrievalChain 7 | from langchain.chat_models import ChatOpenAI 8 | from langchain.embeddings import OpenAIEmbeddings 9 | from langchain.vectorstores import Chroma 10 | 11 | from utils import parse_env_or_raise 12 | 13 | class ConversationHistoryManager: 14 | """Simple in-memory storage for conversation history. 15 | This is naive, unpersisted and will crash once the context window is full. 16 | """ 17 | 18 | _conversation_id_to_chat_history: dict[str, list[Any]] = {} 19 | 20 | def get_history(self, conversation_id: str) -> list[Any]: 21 | if conversation_id not in self._conversation_id_to_chat_history: 22 | self._conversation_id_to_chat_history[conversation_id] = [] 23 | 24 | return self._conversation_id_to_chat_history[conversation_id] 25 | 26 | conversation_history_manager = ConversationHistoryManager() 27 | 28 | def handle_chat_message(message: IncomingChatMessage): 29 | print(f'INCOMING >> "{message.text}"') 30 | 31 | 32 | history = conversation_history_manager.get_history(message.conversation_id) 33 | 34 | res = qa_chain({ 35 | 'question': message.text, 36 | 'chat_history': history, 37 | }) 38 | 39 | history.append( 40 | (message.text, res['answer']) 41 | ) 42 | 43 | answer = res['answer'] 44 | 45 | # We simulate a streaming effect as streaming the answer only 46 | # with this chain is a bit tricky. 47 | # TODO: improve as this is wasteful. 48 | stream = ferris.create_stream( 49 | conversation_id=message.conversation_id, 50 | format=MessageFormat.MARKDOWN 51 | ) 52 | 53 | parts = [answer[i:i+4] for i in range(0, len(answer), 4)] 54 | 55 | for part in parts: 56 | stream.write(part) 57 | sleep(0.01) 58 | 59 | stream.end() 60 | 61 | if __name__ == '__main__': 62 | env = parse_env_or_raise() 63 | 64 | is_vectordb_generated = os.path.exists('./vectordb') 65 | 66 | if not is_vectordb_generated: 67 | raise Exception('Please run "make setup" before.') 68 | 69 | vectordb = Chroma(persist_directory='./vectordb', embedding_function=OpenAIEmbeddings()) 70 | 71 | chatgpt = ChatOpenAI() 72 | 73 | qa_chain = ConversationalRetrievalChain.from_llm( 74 | llm=chatgpt, 75 | retriever=vectordb.as_retriever(search_kwargs={'k': 6}), 76 | return_source_documents=True, 77 | ) 78 | 79 | agentlabs = Project( 80 | project_id=env.project_id, 81 | agentlabs_url=env.agentlabs_url, 82 | secret=env.secret 83 | ) 84 | 85 | ferris = agentlabs.agent(env.agent_id) 86 | 87 | agentlabs.on_chat_message(handle_chat_message) 88 | agentlabs.connect() 89 | agentlabs.wait() 90 | 91 | -------------------------------------------------------------------------------- /python-examples/chat-with-windmill-docs/chat_with_windmill_docs/app.py: -------------------------------------------------------------------------------- 1 | import os 2 | from time import sleep 3 | 4 | from agentlabs.chat import MessageFormat 5 | from agentlabs.project import Any, IncomingChatMessage, Project 6 | from langchain.chains import ConversationalRetrievalChain 7 | from langchain.chat_models import ChatOpenAI 8 | from langchain.embeddings import OpenAIEmbeddings 9 | from langchain.vectorstores import Chroma 10 | 11 | from utils import parse_env_or_raise 12 | 13 | class ConversationHistoryManager: 14 | """Simple in-memory storage for conversation history. 15 | This is naive, unpersisted and will crash once the context window is full. 16 | """ 17 | 18 | _conversation_id_to_chat_history: dict[str, list[Any]] = {} 19 | 20 | def get_history(self, conversation_id: str) -> list[Any]: 21 | if conversation_id not in self._conversation_id_to_chat_history: 22 | self._conversation_id_to_chat_history[conversation_id] = [] 23 | 24 | return self._conversation_id_to_chat_history[conversation_id] 25 | 26 | conversation_history_manager = ConversationHistoryManager() 27 | 28 | def handle_chat_message(message: IncomingChatMessage): 29 | print(f'INCOMING >> "{message.text}"') 30 | 31 | 32 | history = conversation_history_manager.get_history(message.conversation_id) 33 | 34 | res = qa_chain({ 35 | 'question': message.text, 36 | 'chat_history': history, 37 | }) 38 | 39 | history.append( 40 | (message.text, res['answer']) 41 | ) 42 | 43 | answer = res['answer'] 44 | 45 | # We simulate a streaming effect as streaming the answer only 46 | # with this chain is a bit tricky. 47 | # TODO: improve as this is wasteful. 48 | stream = ferris.create_stream( 49 | conversation_id=message.conversation_id, 50 | format=MessageFormat.MARKDOWN 51 | ) 52 | 53 | parts = [answer[i:i+4] for i in range(0, len(answer), 4)] 54 | 55 | for part in parts: 56 | stream.write(part) 57 | sleep(0.01) 58 | 59 | stream.end() 60 | 61 | if __name__ == '__main__': 62 | env = parse_env_or_raise() 63 | 64 | is_vectordb_generated = os.path.exists('./vectordb') 65 | 66 | if not is_vectordb_generated: 67 | raise Exception('Please run "make setup" before.') 68 | 69 | vectordb = Chroma(persist_directory='./vectordb', embedding_function=OpenAIEmbeddings()) 70 | 71 | chatgpt = ChatOpenAI() 72 | 73 | qa_chain = ConversationalRetrievalChain.from_llm( 74 | llm=chatgpt, 75 | retriever=vectordb.as_retriever(search_kwargs={'k': 6}), 76 | return_source_documents=True, 77 | ) 78 | 79 | agentlabs = Project( 80 | project_id=env.project_id, 81 | agentlabs_url=env.agentlabs_url, 82 | secret=env.secret 83 | ) 84 | 85 | ferris = agentlabs.agent(env.agent_id) 86 | 87 | agentlabs.on_chat_message(handle_chat_message) 88 | agentlabs.connect() 89 | agentlabs.wait() 90 | 91 | -------------------------------------------------------------------------------- /python-examples/chatgpt-clone-no-memory-langchain/chatgpt-clone-no-memory-langchain/app.py: -------------------------------------------------------------------------------- 1 | from typing import Any, Dict, List 2 | from agentlabs.agent import Agent 3 | from dotenv import load_dotenv 4 | import os 5 | from agentlabs.chat import IncomingChatMessage, MessageFormat 6 | from langchain.callbacks.base import BaseCallbackHandler 7 | from langchain.chat_models import ChatOpenAI 8 | from agentlabs.project import Project 9 | from langchain.schema.messages import BaseMessage, HumanMessage, SystemMessage 10 | from langchain.schema.output import LLMResult 11 | from pydantic.v1.dataclasses import dataclass 12 | 13 | @dataclass() 14 | class ParsedEnv: 15 | project_id: str 16 | agentlabs_url: str 17 | secret: str 18 | agent_id: str 19 | 20 | class AgentLabsStreamingCallback(BaseCallbackHandler): 21 | def __init__(self, agent: Agent, conversation_id: str): 22 | super().__init__() 23 | self.agent = agent 24 | self.conversation_id = conversation_id 25 | 26 | def on_llm_start( 27 | self, serialized: Dict[str, Any], prompts: List[str], **kwargs: Any 28 | ) -> Any: 29 | self.stream = self.agent.create_stream(format=MessageFormat.MARKDOWN, conversation_id=self.conversation_id) 30 | 31 | def on_llm_new_token(self, token: str, **kwargs: Any) -> Any: 32 | self.stream.write(token) 33 | 34 | def on_llm_end(self, response: LLMResult, **kwargs: Any) -> Any: 35 | self.stream.end(); 36 | 37 | def parse_env_or_raise(): 38 | load_dotenv() 39 | 40 | project_id = os.environ.get('AGENTLABS_PROJECT_ID') 41 | if not project_id: 42 | raise Exception("AGENTLABS_PROJECT_ID is not set") 43 | 44 | agentlabs_url = os.environ.get('AGENTLABS_URL') 45 | if not agentlabs_url: 46 | raise Exception("AGENTLABS_URL is not set") 47 | 48 | secret = os.environ.get('AGENTLABS_SECRET') 49 | if not secret: 50 | raise Exception("AGENTLABS_SECRET is not set") 51 | 52 | agent_id = os.environ.get('AGENTLABS_AGENT_ID') 53 | if not agent_id: 54 | raise Exception("AGENTLABS_AGENT_ID is not set") 55 | 56 | return ParsedEnv( 57 | project_id=project_id, 58 | agentlabs_url=agentlabs_url, 59 | secret=secret, 60 | agent_id=agent_id, 61 | ) 62 | 63 | def handle_task(message: IncomingChatMessage): 64 | print(f"Handling message: {message.text} sent by {message.member_id}") 65 | messages: List[BaseMessage] = [ 66 | SystemMessage(content="You are a general assistant designed to help people with their daily tasks. You should format your answers in markdown format as you see fit."), 67 | HumanMessage(content=message.text) 68 | ] 69 | callback = AgentLabsStreamingCallback(agent=agent, conversation_id=message.conversation_id) 70 | llm(messages, callbacks=[callback]) 71 | 72 | if __name__ == "__main__": 73 | env = parse_env_or_raise() 74 | 75 | project = Project( 76 | project_id=env.project_id, 77 | agentlabs_url=env.agentlabs_url, 78 | secret=env.secret, 79 | ) 80 | 81 | llm = ChatOpenAI(streaming=True) 82 | 83 | agent = project.agent(id=env.agent_id) 84 | project.on_chat_message(handle_task) 85 | 86 | project.connect() 87 | project.wait() 88 | -------------------------------------------------------------------------------- /python-examples/chatgpt-clone-simple-memory-langchain/chatgpt-clone-simple-memory-langchain/app.py: -------------------------------------------------------------------------------- 1 | from typing import Any, Dict, List 2 | import os 3 | from dotenv import load_dotenv 4 | from agentlabs.chat import IncomingChatMessage, MessageFormat 5 | from langchain.callbacks.base import BaseCallbackHandler 6 | from langchain.memory import ChatMessageHistory 7 | from langchain.chat_models import ChatOpenAI 8 | from agentlabs.project import Agent, Project 9 | from langchain.schema.messages import AIMessage, BaseMessage, HumanMessage, SystemMessage 10 | from langchain.schema.output import LLMResult 11 | from pydantic.v1.dataclasses import dataclass 12 | 13 | @dataclass() 14 | class ParsedEnv: 15 | project_id: str 16 | agentlabs_url: str 17 | secret: str 18 | agent_id: str 19 | 20 | class AgentLabsStreamingCallback(BaseCallbackHandler): 21 | def __init__(self, agent: Agent, conversation_id: str): 22 | super().__init__() 23 | self.agent = agent 24 | self.conversation_id = conversation_id 25 | 26 | def on_llm_start( 27 | self, serialized: Dict[str, Any], prompts: List[str], **kwargs: Any 28 | ) -> Any: 29 | self.stream = self.agent.create_stream( 30 | format=MessageFormat.MARKDOWN, 31 | conversation_id=self.conversation_id, 32 | ) 33 | 34 | def on_llm_new_token(self, token: str, **kwargs: Any) -> Any: 35 | self.stream.write(token) 36 | 37 | def on_llm_end(self, response: LLMResult, **kwargs: Any) -> Any: 38 | self.stream.end(); 39 | 40 | def parse_env_or_raise(): 41 | load_dotenv() 42 | 43 | project_id = os.environ.get('AGENTLABS_PROJECT_ID') 44 | if not project_id: 45 | raise Exception("AGENTLABS_PROJECT_ID is not set") 46 | 47 | agentlabs_url = os.environ.get('AGENTLABS_URL') 48 | if not agentlabs_url: 49 | raise Exception("AGENTLABS_URL is not set") 50 | 51 | secret = os.environ.get('AGENTLABS_SECRET') 52 | if not secret: 53 | raise Exception("AGENTLABS_SECRET is not set") 54 | 55 | agent_id = os.environ.get('AGENTLABS_AGENT_ID') 56 | if not agent_id: 57 | raise Exception("AGENTLABS_AGENT_ID is not set") 58 | 59 | return ParsedEnv( 60 | project_id=project_id, 61 | agentlabs_url=agentlabs_url, 62 | secret=secret, 63 | agent_id=agent_id, 64 | ) 65 | 66 | class ConversationMemoryManager: 67 | _conversation_id_to_memory: Dict[str, ChatMessageHistory] = {} 68 | 69 | def get_memory(self, conversation_id: str) -> ChatMessageHistory: 70 | if conversation_id not in self._conversation_id_to_memory: 71 | self._conversation_id_to_memory[conversation_id] = ChatMessageHistory() 72 | return self._conversation_id_to_memory[conversation_id] 73 | 74 | memory_manager = ConversationMemoryManager() 75 | 76 | def handle_task(message: IncomingChatMessage): 77 | agent = agentlabs.agent(env.agent_id) 78 | 79 | print(f"Handling message: {message.text} sent by {message.member_id}") 80 | 81 | memory = memory_manager.get_memory(message.conversation_id) 82 | 83 | if len(memory.messages) == 0: 84 | memory.add_message(SystemMessage(content="You are a general assistant designed to help people with their daily tasks. You should format your answers in markdown format as you see fit.")) 85 | 86 | memory.add_message(HumanMessage(content=message.text)) 87 | 88 | callback = AgentLabsStreamingCallback(agent, message.conversation_id) 89 | output = llm(memory.messages, callbacks=[callback]) 90 | 91 | memory.add_message(AIMessage(content=output.content)) 92 | 93 | if __name__ == "__main__": 94 | env = parse_env_or_raise() 95 | project = Project( 96 | project_id=env.project_id, 97 | agentlabs_url=env.agentlabs_url 98 | secret=env.secret 99 | ) 100 | 101 | llm = ChatOpenAI(streaming=True) 102 | 103 | agent = agentlabs.agent(env.agent_id) 104 | agentlabs.on_chat_message(handle_task) 105 | 106 | agentlabs.connect() 107 | agentlabs.wait() 108 | -------------------------------------------------------------------------------- /nodejs-examples/ts-typewrite-vs-send/index.ts: -------------------------------------------------------------------------------- 1 | import 'dotenv/config'; 2 | import { Project } from "@agentlabs/node-sdk"; 3 | 4 | const projectId = process.env.AGENTLABS_PROJECT_ID; 5 | const secret = process.env.AGENTLABS_SECRET; 6 | const agentId = process.env.AGENTLABS_AGENT_ID; 7 | const agentlabsUrl = process.env.AGENTLABS_URL; 8 | 9 | if (!projectId) { 10 | throw new Error('Missing AGENTLABS_PROJECT_ID'); 11 | } 12 | if (!secret) { 13 | throw new Error('Missing AGENTLABS_SECRET'); 14 | } 15 | if (!agentId) { 16 | throw new Error('Missing AGENTLABS_AGENT_ID'); 17 | } 18 | if (!agentlabsUrl) { 19 | throw new Error('Missing AGENTLABS_URL'); 20 | } 21 | 22 | const veryLongText = `Ladies and gentlemen, today I want to talk to you about the fascinating concept of speed in communication, and how it can be paradoxically achieved even in the midst of a 1000-character long message. In this age of information overload and rapid digital exchanges, it's crucial to understand that speed doesn't always equate to brevity. So, let's unravel this intriguing phenomenon. 23 | 24 | Firstly, we must acknowledge that the speed of communication is not solely determined by the length of a message. It's about how quickly we can convey a message's essence and significance to the recipient. In this 1000-character message, every word is carefully chosen to maximize its informational content and relevance. Each sentence carries meaning, ensuring that no space is wasted. Thus, despite its length, this message is designed to convey a substantial amount of information swiftly. 25 | 26 | Moreover, speed is also influenced by the efficiency of transmission and reception. In today's interconnected world, our ability to transmit and receive information has never been faster. High-speed internet, advanced data networks, and cutting-edge devices enable us to process and comprehend messages at an unprecedented pace. This means that even a 1000-character message can be consumed and understood in mere seconds, making it deceptively fast. 27 | 28 | Furthermore, the message's organization plays a pivotal role in its perceived speed. By employing concise and coherent paragraphs, headings, and bullet points, the message facilitates rapid comprehension. It guides the reader's eye effortlessly, allowing them to extract key information swiftly without getting lost in a sea of text. 29 | 30 | Additionally, the use of clear language and avoidance of unnecessary jargon or verbosity accelerates the message's speed. Clarity eliminates the need for re-reading or deciphering complex phrases, ensuring that the reader can grasp the content expeditiously. 31 | 32 | In this digital age, speed is not solely a matter of brevity, but a result of careful crafting, efficient transmission, and reader-friendly formatting. Therefore, even a 1000-character message can be remarkably fast in delivering its intended message, especially when every character is dedicated to conveying essential information concisely and effectively. 33 | 34 | In conclusion, we live in an era where the speed of communication has transcended the constraints of length. This 1000-character message, despite its apparent length, exemplifies how a well-structured, informative, and efficiently conveyed message can be incredibly fast in today's fast-paced world. So, remember, it's not always about brevity; it's about clarity, relevance, and effective communication that truly defines speed in our digital age.` 35 | 36 | const project = new Project({ 37 | projectId, 38 | secret, 39 | url: agentlabsUrl, 40 | }); 41 | 42 | const agent = project.agent(agentId); 43 | 44 | project.onChatMessage(async (message) => { 45 | await agent.typewrite({ 46 | conversationId: message.conversationId, 47 | text: "This message has been sent using agent.typewrite() method. It's more fun." 48 | }); 49 | 50 | await agent.typewrite({ 51 | conversationId: message.conversationId, 52 | text: "This message has been sent using agent.typewrite() method with an upfront delay. It's even more fun." 53 | }, { 54 | initialDelayMs: 5000, 55 | }); 56 | 57 | await agent.typewrite({ 58 | conversationId: message.conversationId, 59 | text: veryLongText, 60 | }, { 61 | intervalMs: 10, 62 | initialDelayMs: 10000, 63 | }); 64 | }); 65 | 66 | project.connect(); -------------------------------------------------------------------------------- /nodejs-examples/ts-code-interpretor-e2b/index.ts: -------------------------------------------------------------------------------- 1 | import 'dotenv/config'; 2 | import { Project } from "@agentlabs/node-sdk"; 3 | import { Session } from '@e2b/sdk' 4 | import OpenAI from 'openai' 5 | 6 | const projectId = process.env.AGENTLABS_PROJECT_ID; 7 | const secret = process.env.AGENTLABS_SECRET; 8 | const agentId = process.env.AGENTLABS_AGENT_ID; 9 | const agentlabsUrl = process.env.AGENTLABS_URL; 10 | const openaiApiKey = process.env.OPENAI_API_KEY; 11 | const e2bApiKey = process.env.E2B_API_KEY; 12 | 13 | if (!projectId) { 14 | throw new Error('Missing AGENTLABS_PROJECT_ID'); 15 | } 16 | if (!secret) { 17 | throw new Error('Missing AGENTLABS_SECRET'); 18 | } 19 | if (!agentId) { 20 | throw new Error('Missing AGENTLABS_AGENT_ID'); 21 | } 22 | if (!agentlabsUrl) { 23 | throw new Error('Missing AGENTLABS_URL'); 24 | } 25 | if (!openaiApiKey) { 26 | throw new Error('Missing OPENAI_API_KEY'); 27 | } 28 | if (!e2bApiKey) { 29 | throw new Error('Missing E2B_API_KEY'); 30 | } 31 | 32 | const project = new Project({ 33 | projectId, 34 | secret, 35 | url: agentlabsUrl, 36 | }); 37 | 38 | const agent = project.agent(agentId); 39 | 40 | const openai = new OpenAI() 41 | 42 | const functions = [ 43 | { 44 | name: 'exec_code', 45 | description: 'Executes the passed JavaScript code using Nodejs and returns the stdout and stderr', 46 | parameters: { 47 | type: 'object', 48 | properties: { 49 | code: { 50 | type: 'string', 51 | description: 'The JavaScript code to execute.', 52 | }, 53 | }, 54 | required: ['code'], 55 | }, 56 | }, 57 | ] 58 | 59 | project.onChatMessage(async (userMessage) => { 60 | const conversationId = userMessage.conversationId; 61 | await new Promise(resolve => setTimeout(resolve, 6000)); 62 | agent.send({ 63 | conversationId, 64 | text: 'Okay, let me think about it...', 65 | }); 66 | 67 | const chatCompletion = await openai.chat.completions.create({ 68 | model: 'gpt-4', 69 | messages: [ 70 | { 71 | role: 'system', 72 | content: 'You are a senior developer that can code in JavaScript. Always produce valid JSON.', 73 | }, 74 | { 75 | role: 'user', 76 | content: 'Write hello world', 77 | }, 78 | { 79 | role: 'assistant', 80 | content: '{"code": "print("hello world")"}', 81 | name: 'exec_code', 82 | }, 83 | { 84 | role: 'user', 85 | content: userMessage.text, 86 | } 87 | ], 88 | functions, 89 | }); 90 | 91 | const message = chatCompletion.choices[0].message; 92 | 93 | const func = message["function_call"]; 94 | 95 | if (func) { 96 | const stream = agent.createStream({ 97 | conversationId, 98 | }, { 99 | format: 'Markdown', 100 | }); 101 | 102 | const funcName = func["name"]; 103 | 104 | // Get rid of newlines and leading/trailing spaces in the raw function arguments JSON string. 105 | // This sometimes help to avoid JSON parsing errors. 106 | let args = func["arguments"]; 107 | args = args.trim().replace(/\n|\r/g, ""); 108 | // Parse the cleaned up JSON string. 109 | const funcArgs = JSON.parse(args); 110 | 111 | stream.write(`Here is the code I have to execute:\n`); 112 | stream.write(`\`\`\`js\n${funcArgs["code"]}\n\`\`\`\n\n`); 113 | 114 | // If the model is calling the exec_code function we defined in the `functions` variable, we want to save the `code` argument to a variable. 115 | if (funcName === "exec_code") { 116 | const code = funcArgs["code"]; 117 | const session = await Session.create({ 118 | id: 'Nodejs', 119 | apiKey: e2bApiKey, 120 | }); 121 | 122 | await session.filesystem.write('/index.js', code); 123 | stream.write(`Executing the code...\n\n`); 124 | 125 | stream.write(`\`\`\`\n`); 126 | 127 | const proc = await session.process.start({ 128 | cmd: 'node /index.js', 129 | onStdout: (data) => { 130 | stream.write(data.line + '\n'); 131 | }, 132 | onStderr: (data) => { 133 | stream.write(data.line + '\n'); 134 | } 135 | }); 136 | 137 | await proc.finished; 138 | stream.write(`\n\`\`\`\n`); 139 | stream.write('The code has been executed thanks to e2b.dev\n\n'); 140 | } 141 | stream.end(); 142 | } else { 143 | // The model didn't call a function, so we just print the message. 144 | const content = message["content"]; 145 | agent.send({ 146 | conversationId, 147 | text: content ?? 'It seems the model did not responded. Please try again.' 148 | }); 149 | } 150 | }); 151 | 152 | project.connect(); 153 | -------------------------------------------------------------------------------- /nodejs-examples/ts-ping-pong/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Visit https://aka.ms/tsconfig to read more about this file */ 4 | 5 | /* Projects */ 6 | // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ 7 | // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ 8 | // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ 9 | // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ 10 | // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ 11 | // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ 12 | 13 | /* Language and Environment */ 14 | "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ 15 | // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ 16 | // "jsx": "preserve", /* Specify what JSX code is generated. */ 17 | // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ 18 | // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ 19 | // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ 20 | // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ 21 | // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ 22 | // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ 23 | // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ 24 | // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ 25 | // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ 26 | 27 | /* Modules */ 28 | "module": "commonjs", /* Specify what module code is generated. */ 29 | // "rootDir": "./", /* Specify the root folder within your source files. */ 30 | // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ 31 | // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ 32 | // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ 33 | // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ 34 | // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ 35 | // "types": [], /* Specify type package names to be included without being referenced in a source file. */ 36 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 37 | // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ 38 | // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ 39 | // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ 40 | // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ 41 | // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ 42 | // "resolveJsonModule": true, /* Enable importing .json files. */ 43 | // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ 44 | // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ 45 | 46 | /* JavaScript Support */ 47 | // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ 48 | // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ 49 | // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ 50 | 51 | /* Emit */ 52 | // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ 53 | // "declarationMap": true, /* Create sourcemaps for d.ts files. */ 54 | // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ 55 | // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ 56 | // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ 57 | // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ 58 | // "outDir": "./", /* Specify an output folder for all emitted files. */ 59 | // "removeComments": true, /* Disable emitting comments. */ 60 | // "noEmit": true, /* Disable emitting files from a compilation. */ 61 | // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ 62 | // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ 63 | // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ 64 | // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ 65 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 66 | // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ 67 | // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ 68 | // "newLine": "crlf", /* Set the newline character for emitting files. */ 69 | // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ 70 | // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ 71 | // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ 72 | // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ 73 | // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ 74 | // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ 75 | 76 | /* Interop Constraints */ 77 | // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ 78 | // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ 79 | // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ 80 | "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ 81 | // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ 82 | "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ 83 | 84 | /* Type Checking */ 85 | "strict": true, /* Enable all strict type-checking options. */ 86 | "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ 87 | "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ 88 | // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ 89 | // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ 90 | // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ 91 | // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ 92 | // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ 93 | // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ 94 | // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ 95 | // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ 96 | // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ 97 | // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ 98 | // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ 99 | // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ 100 | // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ 101 | // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ 102 | // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ 103 | // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ 104 | 105 | /* Completeness */ 106 | // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ 107 | "skipLibCheck": true /* Skip type checking all .d.ts files. */ 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /nodejs-examples/ts-multi-agent-basic/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Visit https://aka.ms/tsconfig to read more about this file */ 4 | 5 | /* Projects */ 6 | // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ 7 | // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ 8 | // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ 9 | // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ 10 | // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ 11 | // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ 12 | 13 | /* Language and Environment */ 14 | "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ 15 | // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ 16 | // "jsx": "preserve", /* Specify what JSX code is generated. */ 17 | // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ 18 | // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ 19 | // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ 20 | // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ 21 | // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ 22 | // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ 23 | // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ 24 | // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ 25 | // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ 26 | 27 | /* Modules */ 28 | "module": "commonjs", /* Specify what module code is generated. */ 29 | // "rootDir": "./", /* Specify the root folder within your source files. */ 30 | // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ 31 | // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ 32 | // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ 33 | // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ 34 | // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ 35 | // "types": [], /* Specify type package names to be included without being referenced in a source file. */ 36 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 37 | // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ 38 | // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ 39 | // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ 40 | // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ 41 | // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ 42 | // "resolveJsonModule": true, /* Enable importing .json files. */ 43 | // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ 44 | // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ 45 | 46 | /* JavaScript Support */ 47 | // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ 48 | // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ 49 | // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ 50 | 51 | /* Emit */ 52 | // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ 53 | // "declarationMap": true, /* Create sourcemaps for d.ts files. */ 54 | // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ 55 | // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ 56 | // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ 57 | // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ 58 | // "outDir": "./", /* Specify an output folder for all emitted files. */ 59 | // "removeComments": true, /* Disable emitting comments. */ 60 | // "noEmit": true, /* Disable emitting files from a compilation. */ 61 | // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ 62 | // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ 63 | // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ 64 | // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ 65 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 66 | // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ 67 | // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ 68 | // "newLine": "crlf", /* Set the newline character for emitting files. */ 69 | // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ 70 | // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ 71 | // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ 72 | // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ 73 | // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ 74 | // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ 75 | 76 | /* Interop Constraints */ 77 | // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ 78 | // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ 79 | // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ 80 | "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ 81 | // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ 82 | "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ 83 | 84 | /* Type Checking */ 85 | "strict": true, /* Enable all strict type-checking options. */ 86 | "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ 87 | "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ 88 | // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ 89 | // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ 90 | // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ 91 | // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ 92 | // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ 93 | // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ 94 | // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ 95 | // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ 96 | // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ 97 | // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ 98 | // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ 99 | // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ 100 | // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ 101 | // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ 102 | // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ 103 | // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ 104 | 105 | /* Completeness */ 106 | // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ 107 | "skipLibCheck": true /* Skip type checking all .d.ts files. */ 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /nodejs-examples/ts-typewrite-vs-send/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Visit https://aka.ms/tsconfig to read more about this file */ 4 | 5 | /* Projects */ 6 | // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ 7 | // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ 8 | // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ 9 | // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ 10 | // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ 11 | // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ 12 | 13 | /* Language and Environment */ 14 | "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ 15 | // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ 16 | // "jsx": "preserve", /* Specify what JSX code is generated. */ 17 | // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ 18 | // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ 19 | // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ 20 | // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ 21 | // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ 22 | // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ 23 | // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ 24 | // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ 25 | // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ 26 | 27 | /* Modules */ 28 | "module": "commonjs", /* Specify what module code is generated. */ 29 | // "rootDir": "./", /* Specify the root folder within your source files. */ 30 | // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ 31 | // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ 32 | // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ 33 | // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ 34 | // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ 35 | // "types": [], /* Specify type package names to be included without being referenced in a source file. */ 36 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 37 | // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ 38 | // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ 39 | // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ 40 | // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ 41 | // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ 42 | // "resolveJsonModule": true, /* Enable importing .json files. */ 43 | // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ 44 | // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ 45 | 46 | /* JavaScript Support */ 47 | // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ 48 | // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ 49 | // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ 50 | 51 | /* Emit */ 52 | // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ 53 | // "declarationMap": true, /* Create sourcemaps for d.ts files. */ 54 | // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ 55 | // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ 56 | // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ 57 | // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ 58 | // "outDir": "./", /* Specify an output folder for all emitted files. */ 59 | // "removeComments": true, /* Disable emitting comments. */ 60 | // "noEmit": true, /* Disable emitting files from a compilation. */ 61 | // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ 62 | // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ 63 | // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ 64 | // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ 65 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 66 | // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ 67 | // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ 68 | // "newLine": "crlf", /* Set the newline character for emitting files. */ 69 | // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ 70 | // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ 71 | // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ 72 | // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ 73 | // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ 74 | // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ 75 | 76 | /* Interop Constraints */ 77 | // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ 78 | // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ 79 | // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ 80 | "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ 81 | // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ 82 | "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ 83 | 84 | /* Type Checking */ 85 | "strict": true, /* Enable all strict type-checking options. */ 86 | "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ 87 | "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ 88 | // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ 89 | // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ 90 | // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ 91 | // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ 92 | // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ 93 | // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ 94 | // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ 95 | // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ 96 | // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ 97 | // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ 98 | // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ 99 | // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ 100 | // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ 101 | // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ 102 | // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ 103 | // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ 104 | 105 | /* Completeness */ 106 | // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ 107 | "skipLibCheck": true /* Skip type checking all .d.ts files. */ 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /nodejs-examples/ts-code-interpretor-e2b/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Visit https://aka.ms/tsconfig to read more about this file */ 4 | 5 | /* Projects */ 6 | // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ 7 | // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ 8 | // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ 9 | // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ 10 | // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ 11 | // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ 12 | 13 | /* Language and Environment */ 14 | "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ 15 | // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ 16 | // "jsx": "preserve", /* Specify what JSX code is generated. */ 17 | // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ 18 | // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ 19 | // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ 20 | // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ 21 | // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ 22 | // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ 23 | // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ 24 | // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ 25 | // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ 26 | 27 | /* Modules */ 28 | "module": "commonjs", /* Specify what module code is generated. */ 29 | // "rootDir": "./", /* Specify the root folder within your source files. */ 30 | // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ 31 | // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ 32 | // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ 33 | // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ 34 | // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ 35 | // "types": [], /* Specify type package names to be included without being referenced in a source file. */ 36 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 37 | // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ 38 | // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ 39 | // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ 40 | // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ 41 | // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ 42 | // "resolveJsonModule": true, /* Enable importing .json files. */ 43 | // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ 44 | // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ 45 | 46 | /* JavaScript Support */ 47 | // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ 48 | // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ 49 | // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ 50 | 51 | /* Emit */ 52 | // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ 53 | // "declarationMap": true, /* Create sourcemaps for d.ts files. */ 54 | // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ 55 | // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ 56 | // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ 57 | // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ 58 | // "outDir": "./", /* Specify an output folder for all emitted files. */ 59 | // "removeComments": true, /* Disable emitting comments. */ 60 | // "noEmit": true, /* Disable emitting files from a compilation. */ 61 | // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ 62 | // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ 63 | // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ 64 | // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ 65 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 66 | // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ 67 | // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ 68 | // "newLine": "crlf", /* Set the newline character for emitting files. */ 69 | // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ 70 | // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ 71 | // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ 72 | // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ 73 | // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ 74 | // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ 75 | 76 | /* Interop Constraints */ 77 | // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ 78 | // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ 79 | // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ 80 | "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ 81 | // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ 82 | "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ 83 | 84 | /* Type Checking */ 85 | "strict": true, /* Enable all strict type-checking options. */ 86 | "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ 87 | "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ 88 | // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ 89 | // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ 90 | // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ 91 | // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ 92 | // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ 93 | // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ 94 | // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ 95 | // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ 96 | // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ 97 | // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ 98 | // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ 99 | // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ 100 | // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ 101 | // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ 102 | // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ 103 | // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ 104 | 105 | /* Completeness */ 106 | // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ 107 | "skipLibCheck": true /* Skip type checking all .d.ts files. */ 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /nodejs-examples/ts-midjourney-clone-basic/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Visit https://aka.ms/tsconfig to read more about this file */ 4 | 5 | /* Projects */ 6 | // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ 7 | // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ 8 | // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ 9 | // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ 10 | // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ 11 | // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ 12 | 13 | /* Language and Environment */ 14 | "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ 15 | // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ 16 | // "jsx": "preserve", /* Specify what JSX code is generated. */ 17 | // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ 18 | // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ 19 | // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ 20 | // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ 21 | // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ 22 | // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ 23 | // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ 24 | // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ 25 | // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ 26 | 27 | /* Modules */ 28 | "module": "commonjs", /* Specify what module code is generated. */ 29 | // "rootDir": "./", /* Specify the root folder within your source files. */ 30 | // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ 31 | // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ 32 | // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ 33 | // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ 34 | // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ 35 | // "types": [], /* Specify type package names to be included without being referenced in a source file. */ 36 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 37 | // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ 38 | // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ 39 | // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ 40 | // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ 41 | // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ 42 | // "resolveJsonModule": true, /* Enable importing .json files. */ 43 | // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ 44 | // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ 45 | 46 | /* JavaScript Support */ 47 | // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ 48 | // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ 49 | // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ 50 | 51 | /* Emit */ 52 | // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ 53 | // "declarationMap": true, /* Create sourcemaps for d.ts files. */ 54 | // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ 55 | // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ 56 | // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ 57 | // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ 58 | // "outDir": "./", /* Specify an output folder for all emitted files. */ 59 | // "removeComments": true, /* Disable emitting comments. */ 60 | // "noEmit": true, /* Disable emitting files from a compilation. */ 61 | // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ 62 | // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ 63 | // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ 64 | // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ 65 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 66 | // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ 67 | // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ 68 | // "newLine": "crlf", /* Set the newline character for emitting files. */ 69 | // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ 70 | // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ 71 | // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ 72 | // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ 73 | // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ 74 | // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ 75 | 76 | /* Interop Constraints */ 77 | // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ 78 | // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ 79 | // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ 80 | "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ 81 | // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ 82 | "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ 83 | 84 | /* Type Checking */ 85 | "strict": true, /* Enable all strict type-checking options. */ 86 | "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ 87 | "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ 88 | // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ 89 | // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ 90 | // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ 91 | // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ 92 | // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ 93 | // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ 94 | // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ 95 | // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ 96 | // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ 97 | // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ 98 | // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ 99 | // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ 100 | // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ 101 | // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ 102 | // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ 103 | // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ 104 | 105 | /* Completeness */ 106 | // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ 107 | "skipLibCheck": true /* Skip type checking all .d.ts files. */ 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /nodejs-examples/ts-multi-agent-stream-basic/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Visit https://aka.ms/tsconfig to read more about this file */ 4 | 5 | /* Projects */ 6 | // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ 7 | // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ 8 | // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ 9 | // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ 10 | // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ 11 | // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ 12 | 13 | /* Language and Environment */ 14 | "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ 15 | // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ 16 | // "jsx": "preserve", /* Specify what JSX code is generated. */ 17 | // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ 18 | // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ 19 | // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ 20 | // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ 21 | // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ 22 | // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ 23 | // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ 24 | // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ 25 | // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ 26 | 27 | /* Modules */ 28 | "module": "commonjs", /* Specify what module code is generated. */ 29 | // "rootDir": "./", /* Specify the root folder within your source files. */ 30 | // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ 31 | // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ 32 | // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ 33 | // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ 34 | // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ 35 | // "types": [], /* Specify type package names to be included without being referenced in a source file. */ 36 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 37 | // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ 38 | // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ 39 | // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ 40 | // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ 41 | // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ 42 | // "resolveJsonModule": true, /* Enable importing .json files. */ 43 | // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ 44 | // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ 45 | 46 | /* JavaScript Support */ 47 | // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ 48 | // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ 49 | // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ 50 | 51 | /* Emit */ 52 | // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ 53 | // "declarationMap": true, /* Create sourcemaps for d.ts files. */ 54 | // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ 55 | // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ 56 | // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ 57 | // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ 58 | // "outDir": "./", /* Specify an output folder for all emitted files. */ 59 | // "removeComments": true, /* Disable emitting comments. */ 60 | // "noEmit": true, /* Disable emitting files from a compilation. */ 61 | // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ 62 | // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ 63 | // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ 64 | // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ 65 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 66 | // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ 67 | // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ 68 | // "newLine": "crlf", /* Set the newline character for emitting files. */ 69 | // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ 70 | // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ 71 | // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ 72 | // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ 73 | // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ 74 | // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ 75 | 76 | /* Interop Constraints */ 77 | // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ 78 | // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ 79 | // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ 80 | "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ 81 | // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ 82 | "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ 83 | 84 | /* Type Checking */ 85 | "strict": true, /* Enable all strict type-checking options. */ 86 | "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ 87 | "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ 88 | // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ 89 | // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ 90 | // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ 91 | // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ 92 | // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ 93 | // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ 94 | // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ 95 | // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ 96 | // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ 97 | // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ 98 | // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ 99 | // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ 100 | // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ 101 | // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ 102 | // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ 103 | // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ 104 | 105 | /* Completeness */ 106 | // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ 107 | "skipLibCheck": true /* Skip type checking all .d.ts files. */ 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /nodejs-examples/ts-chatgpt-clone-langchain-no-memory/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Visit https://aka.ms/tsconfig to read more about this file */ 4 | 5 | /* Projects */ 6 | // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ 7 | // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ 8 | // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ 9 | // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ 10 | // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ 11 | // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ 12 | 13 | /* Language and Environment */ 14 | "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ 15 | // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ 16 | // "jsx": "preserve", /* Specify what JSX code is generated. */ 17 | // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ 18 | // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ 19 | // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ 20 | // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ 21 | // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ 22 | // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ 23 | // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ 24 | // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ 25 | // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ 26 | 27 | /* Modules */ 28 | "module": "commonjs", /* Specify what module code is generated. */ 29 | // "rootDir": "./", /* Specify the root folder within your source files. */ 30 | // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ 31 | // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ 32 | // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ 33 | // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ 34 | // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ 35 | // "types": [], /* Specify type package names to be included without being referenced in a source file. */ 36 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 37 | // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ 38 | // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ 39 | // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ 40 | // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ 41 | // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ 42 | // "resolveJsonModule": true, /* Enable importing .json files. */ 43 | // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ 44 | // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ 45 | 46 | /* JavaScript Support */ 47 | // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ 48 | // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ 49 | // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ 50 | 51 | /* Emit */ 52 | // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ 53 | // "declarationMap": true, /* Create sourcemaps for d.ts files. */ 54 | // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ 55 | // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ 56 | // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ 57 | // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ 58 | // "outDir": "./", /* Specify an output folder for all emitted files. */ 59 | // "removeComments": true, /* Disable emitting comments. */ 60 | // "noEmit": true, /* Disable emitting files from a compilation. */ 61 | // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ 62 | // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ 63 | // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ 64 | // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ 65 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 66 | // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ 67 | // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ 68 | // "newLine": "crlf", /* Set the newline character for emitting files. */ 69 | // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ 70 | // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ 71 | // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ 72 | // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ 73 | // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ 74 | // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ 75 | 76 | /* Interop Constraints */ 77 | // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ 78 | // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ 79 | // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ 80 | "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ 81 | // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ 82 | "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ 83 | 84 | /* Type Checking */ 85 | "strict": true, /* Enable all strict type-checking options. */ 86 | "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ 87 | "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ 88 | // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ 89 | // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ 90 | // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ 91 | // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ 92 | // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ 93 | // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ 94 | // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ 95 | // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ 96 | // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ 97 | // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ 98 | // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ 99 | // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ 100 | // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ 101 | // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ 102 | // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ 103 | // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ 104 | 105 | /* Completeness */ 106 | // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ 107 | "skipLibCheck": true /* Skip type checking all .d.ts files. */ 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /nodejs-examples/ts-ping-pong/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ts-ping-pong", 3 | "version": "1.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "ts-ping-pong", 9 | "version": "1.0.0", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@agentlabs/node-sdk": "^0.0.62", 13 | "dotenv": "^16.3.1" 14 | }, 15 | "devDependencies": { 16 | "ts-node": "^10.9.1" 17 | } 18 | }, 19 | "node_modules/@agentlabs/node-sdk": { 20 | "version": "0.0.62", 21 | "resolved": "https://registry.npmjs.org/@agentlabs/node-sdk/-/node-sdk-0.0.62.tgz", 22 | "integrity": "sha512-ryyXolUnZ7Ar3cVK7Yssz4edUEapPu0eKX64sKQmflr92qbMjd+KiBB7I1kqPUcGLB7BauFEsvCIFqeMsTqgvQ==", 23 | "dependencies": { 24 | "socket.io-client": "^4.7.2" 25 | }, 26 | "engines": { 27 | "node": ">= 18.0.0" 28 | } 29 | }, 30 | "node_modules/@cspotcode/source-map-support": { 31 | "version": "0.8.1", 32 | "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", 33 | "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", 34 | "dev": true, 35 | "dependencies": { 36 | "@jridgewell/trace-mapping": "0.3.9" 37 | }, 38 | "engines": { 39 | "node": ">=12" 40 | } 41 | }, 42 | "node_modules/@jridgewell/resolve-uri": { 43 | "version": "3.1.1", 44 | "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", 45 | "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", 46 | "dev": true, 47 | "engines": { 48 | "node": ">=6.0.0" 49 | } 50 | }, 51 | "node_modules/@jridgewell/sourcemap-codec": { 52 | "version": "1.4.15", 53 | "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", 54 | "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", 55 | "dev": true 56 | }, 57 | "node_modules/@jridgewell/trace-mapping": { 58 | "version": "0.3.9", 59 | "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", 60 | "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", 61 | "dev": true, 62 | "dependencies": { 63 | "@jridgewell/resolve-uri": "^3.0.3", 64 | "@jridgewell/sourcemap-codec": "^1.4.10" 65 | } 66 | }, 67 | "node_modules/@socket.io/component-emitter": { 68 | "version": "3.1.0", 69 | "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", 70 | "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==" 71 | }, 72 | "node_modules/@tsconfig/node10": { 73 | "version": "1.0.9", 74 | "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", 75 | "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", 76 | "dev": true 77 | }, 78 | "node_modules/@tsconfig/node12": { 79 | "version": "1.0.11", 80 | "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", 81 | "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", 82 | "dev": true 83 | }, 84 | "node_modules/@tsconfig/node14": { 85 | "version": "1.0.3", 86 | "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", 87 | "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", 88 | "dev": true 89 | }, 90 | "node_modules/@tsconfig/node16": { 91 | "version": "1.0.4", 92 | "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", 93 | "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", 94 | "dev": true 95 | }, 96 | "node_modules/@types/node": { 97 | "version": "20.8.6", 98 | "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.6.tgz", 99 | "integrity": "sha512-eWO4K2Ji70QzKUqRy6oyJWUeB7+g2cRagT3T/nxYibYcT4y2BDL8lqolRXjTHmkZCdJfIPaY73KbJAZmcryxTQ==", 100 | "dev": true, 101 | "peer": true, 102 | "dependencies": { 103 | "undici-types": "~5.25.1" 104 | } 105 | }, 106 | "node_modules/acorn": { 107 | "version": "8.10.0", 108 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", 109 | "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", 110 | "dev": true, 111 | "bin": { 112 | "acorn": "bin/acorn" 113 | }, 114 | "engines": { 115 | "node": ">=0.4.0" 116 | } 117 | }, 118 | "node_modules/acorn-walk": { 119 | "version": "8.2.0", 120 | "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", 121 | "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", 122 | "dev": true, 123 | "engines": { 124 | "node": ">=0.4.0" 125 | } 126 | }, 127 | "node_modules/arg": { 128 | "version": "4.1.3", 129 | "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", 130 | "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", 131 | "dev": true 132 | }, 133 | "node_modules/create-require": { 134 | "version": "1.1.1", 135 | "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", 136 | "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", 137 | "dev": true 138 | }, 139 | "node_modules/debug": { 140 | "version": "4.3.4", 141 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 142 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 143 | "dependencies": { 144 | "ms": "2.1.2" 145 | }, 146 | "engines": { 147 | "node": ">=6.0" 148 | }, 149 | "peerDependenciesMeta": { 150 | "supports-color": { 151 | "optional": true 152 | } 153 | } 154 | }, 155 | "node_modules/diff": { 156 | "version": "4.0.2", 157 | "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", 158 | "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", 159 | "dev": true, 160 | "engines": { 161 | "node": ">=0.3.1" 162 | } 163 | }, 164 | "node_modules/dotenv": { 165 | "version": "16.3.1", 166 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", 167 | "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", 168 | "engines": { 169 | "node": ">=12" 170 | }, 171 | "funding": { 172 | "url": "https://github.com/motdotla/dotenv?sponsor=1" 173 | } 174 | }, 175 | "node_modules/engine.io-client": { 176 | "version": "6.5.2", 177 | "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.5.2.tgz", 178 | "integrity": "sha512-CQZqbrpEYnrpGqC07a9dJDz4gePZUgTPMU3NKJPSeQOyw27Tst4Pl3FemKoFGAlHzgZmKjoRmiJvbWfhCXUlIg==", 179 | "dependencies": { 180 | "@socket.io/component-emitter": "~3.1.0", 181 | "debug": "~4.3.1", 182 | "engine.io-parser": "~5.2.1", 183 | "ws": "~8.11.0", 184 | "xmlhttprequest-ssl": "~2.0.0" 185 | } 186 | }, 187 | "node_modules/engine.io-parser": { 188 | "version": "5.2.1", 189 | "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.1.tgz", 190 | "integrity": "sha512-9JktcM3u18nU9N2Lz3bWeBgxVgOKpw7yhRaoxQA3FUDZzzw+9WlA6p4G4u0RixNkg14fH7EfEc/RhpurtiROTQ==", 191 | "engines": { 192 | "node": ">=10.0.0" 193 | } 194 | }, 195 | "node_modules/make-error": { 196 | "version": "1.3.6", 197 | "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", 198 | "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", 199 | "dev": true 200 | }, 201 | "node_modules/ms": { 202 | "version": "2.1.2", 203 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 204 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 205 | }, 206 | "node_modules/socket.io-client": { 207 | "version": "4.7.2", 208 | "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.7.2.tgz", 209 | "integrity": "sha512-vtA0uD4ibrYD793SOIAwlo8cj6haOeMHrGvwPxJsxH7CeIksqJ+3Zc06RvWTIFgiSqx4A3sOnTXpfAEE2Zyz6w==", 210 | "dependencies": { 211 | "@socket.io/component-emitter": "~3.1.0", 212 | "debug": "~4.3.2", 213 | "engine.io-client": "~6.5.2", 214 | "socket.io-parser": "~4.2.4" 215 | }, 216 | "engines": { 217 | "node": ">=10.0.0" 218 | } 219 | }, 220 | "node_modules/socket.io-parser": { 221 | "version": "4.2.4", 222 | "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz", 223 | "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==", 224 | "dependencies": { 225 | "@socket.io/component-emitter": "~3.1.0", 226 | "debug": "~4.3.1" 227 | }, 228 | "engines": { 229 | "node": ">=10.0.0" 230 | } 231 | }, 232 | "node_modules/ts-node": { 233 | "version": "10.9.1", 234 | "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", 235 | "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", 236 | "dev": true, 237 | "dependencies": { 238 | "@cspotcode/source-map-support": "^0.8.0", 239 | "@tsconfig/node10": "^1.0.7", 240 | "@tsconfig/node12": "^1.0.7", 241 | "@tsconfig/node14": "^1.0.0", 242 | "@tsconfig/node16": "^1.0.2", 243 | "acorn": "^8.4.1", 244 | "acorn-walk": "^8.1.1", 245 | "arg": "^4.1.0", 246 | "create-require": "^1.1.0", 247 | "diff": "^4.0.1", 248 | "make-error": "^1.1.1", 249 | "v8-compile-cache-lib": "^3.0.1", 250 | "yn": "3.1.1" 251 | }, 252 | "bin": { 253 | "ts-node": "dist/bin.js", 254 | "ts-node-cwd": "dist/bin-cwd.js", 255 | "ts-node-esm": "dist/bin-esm.js", 256 | "ts-node-script": "dist/bin-script.js", 257 | "ts-node-transpile-only": "dist/bin-transpile.js", 258 | "ts-script": "dist/bin-script-deprecated.js" 259 | }, 260 | "peerDependencies": { 261 | "@swc/core": ">=1.2.50", 262 | "@swc/wasm": ">=1.2.50", 263 | "@types/node": "*", 264 | "typescript": ">=2.7" 265 | }, 266 | "peerDependenciesMeta": { 267 | "@swc/core": { 268 | "optional": true 269 | }, 270 | "@swc/wasm": { 271 | "optional": true 272 | } 273 | } 274 | }, 275 | "node_modules/typescript": { 276 | "version": "5.2.2", 277 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", 278 | "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", 279 | "dev": true, 280 | "peer": true, 281 | "bin": { 282 | "tsc": "bin/tsc", 283 | "tsserver": "bin/tsserver" 284 | }, 285 | "engines": { 286 | "node": ">=14.17" 287 | } 288 | }, 289 | "node_modules/undici-types": { 290 | "version": "5.25.3", 291 | "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", 292 | "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==", 293 | "dev": true, 294 | "peer": true 295 | }, 296 | "node_modules/v8-compile-cache-lib": { 297 | "version": "3.0.1", 298 | "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", 299 | "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", 300 | "dev": true 301 | }, 302 | "node_modules/ws": { 303 | "version": "8.11.0", 304 | "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", 305 | "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", 306 | "engines": { 307 | "node": ">=10.0.0" 308 | }, 309 | "peerDependencies": { 310 | "bufferutil": "^4.0.1", 311 | "utf-8-validate": "^5.0.2" 312 | }, 313 | "peerDependenciesMeta": { 314 | "bufferutil": { 315 | "optional": true 316 | }, 317 | "utf-8-validate": { 318 | "optional": true 319 | } 320 | } 321 | }, 322 | "node_modules/xmlhttprequest-ssl": { 323 | "version": "2.0.0", 324 | "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz", 325 | "integrity": "sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A==", 326 | "engines": { 327 | "node": ">=0.4.0" 328 | } 329 | }, 330 | "node_modules/yn": { 331 | "version": "3.1.1", 332 | "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", 333 | "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", 334 | "dev": true, 335 | "engines": { 336 | "node": ">=6" 337 | } 338 | } 339 | } 340 | } 341 | -------------------------------------------------------------------------------- /nodejs-examples/ts-typewrite-vs-send/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ts-ping-pong", 3 | "version": "1.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "ts-ping-pong", 9 | "version": "1.0.0", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@agentlabs/node-sdk": "^0.0.51", 13 | "dotenv": "^16.3.1" 14 | }, 15 | "devDependencies": { 16 | "ts-node": "^10.9.1" 17 | } 18 | }, 19 | "node_modules/@agentlabs/node-sdk": { 20 | "version": "0.0.51", 21 | "resolved": "https://registry.npmjs.org/@agentlabs/node-sdk/-/node-sdk-0.0.51.tgz", 22 | "integrity": "sha512-//ODcHVCT7X6uNVYZc0qWYgVpKM0mBsSlUTQDzkbZ5aa4M4nrsE3uhn8nIUepEOR3Kquh5dByC9Q7Q9JUFSHnw==", 23 | "dependencies": { 24 | "socket.io-client": "^4.7.2" 25 | }, 26 | "engines": { 27 | "node": ">= 18.0.0" 28 | } 29 | }, 30 | "node_modules/@cspotcode/source-map-support": { 31 | "version": "0.8.1", 32 | "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", 33 | "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", 34 | "dev": true, 35 | "dependencies": { 36 | "@jridgewell/trace-mapping": "0.3.9" 37 | }, 38 | "engines": { 39 | "node": ">=12" 40 | } 41 | }, 42 | "node_modules/@jridgewell/resolve-uri": { 43 | "version": "3.1.1", 44 | "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", 45 | "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", 46 | "dev": true, 47 | "engines": { 48 | "node": ">=6.0.0" 49 | } 50 | }, 51 | "node_modules/@jridgewell/sourcemap-codec": { 52 | "version": "1.4.15", 53 | "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", 54 | "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", 55 | "dev": true 56 | }, 57 | "node_modules/@jridgewell/trace-mapping": { 58 | "version": "0.3.9", 59 | "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", 60 | "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", 61 | "dev": true, 62 | "dependencies": { 63 | "@jridgewell/resolve-uri": "^3.0.3", 64 | "@jridgewell/sourcemap-codec": "^1.4.10" 65 | } 66 | }, 67 | "node_modules/@socket.io/component-emitter": { 68 | "version": "3.1.0", 69 | "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", 70 | "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==" 71 | }, 72 | "node_modules/@tsconfig/node10": { 73 | "version": "1.0.9", 74 | "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", 75 | "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", 76 | "dev": true 77 | }, 78 | "node_modules/@tsconfig/node12": { 79 | "version": "1.0.11", 80 | "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", 81 | "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", 82 | "dev": true 83 | }, 84 | "node_modules/@tsconfig/node14": { 85 | "version": "1.0.3", 86 | "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", 87 | "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", 88 | "dev": true 89 | }, 90 | "node_modules/@tsconfig/node16": { 91 | "version": "1.0.4", 92 | "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", 93 | "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", 94 | "dev": true 95 | }, 96 | "node_modules/@types/node": { 97 | "version": "20.8.6", 98 | "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.6.tgz", 99 | "integrity": "sha512-eWO4K2Ji70QzKUqRy6oyJWUeB7+g2cRagT3T/nxYibYcT4y2BDL8lqolRXjTHmkZCdJfIPaY73KbJAZmcryxTQ==", 100 | "dev": true, 101 | "peer": true, 102 | "dependencies": { 103 | "undici-types": "~5.25.1" 104 | } 105 | }, 106 | "node_modules/acorn": { 107 | "version": "8.10.0", 108 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", 109 | "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", 110 | "dev": true, 111 | "bin": { 112 | "acorn": "bin/acorn" 113 | }, 114 | "engines": { 115 | "node": ">=0.4.0" 116 | } 117 | }, 118 | "node_modules/acorn-walk": { 119 | "version": "8.2.0", 120 | "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", 121 | "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", 122 | "dev": true, 123 | "engines": { 124 | "node": ">=0.4.0" 125 | } 126 | }, 127 | "node_modules/arg": { 128 | "version": "4.1.3", 129 | "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", 130 | "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", 131 | "dev": true 132 | }, 133 | "node_modules/create-require": { 134 | "version": "1.1.1", 135 | "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", 136 | "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", 137 | "dev": true 138 | }, 139 | "node_modules/debug": { 140 | "version": "4.3.4", 141 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 142 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 143 | "dependencies": { 144 | "ms": "2.1.2" 145 | }, 146 | "engines": { 147 | "node": ">=6.0" 148 | }, 149 | "peerDependenciesMeta": { 150 | "supports-color": { 151 | "optional": true 152 | } 153 | } 154 | }, 155 | "node_modules/diff": { 156 | "version": "4.0.2", 157 | "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", 158 | "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", 159 | "dev": true, 160 | "engines": { 161 | "node": ">=0.3.1" 162 | } 163 | }, 164 | "node_modules/dotenv": { 165 | "version": "16.3.1", 166 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", 167 | "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", 168 | "engines": { 169 | "node": ">=12" 170 | }, 171 | "funding": { 172 | "url": "https://github.com/motdotla/dotenv?sponsor=1" 173 | } 174 | }, 175 | "node_modules/engine.io-client": { 176 | "version": "6.5.2", 177 | "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.5.2.tgz", 178 | "integrity": "sha512-CQZqbrpEYnrpGqC07a9dJDz4gePZUgTPMU3NKJPSeQOyw27Tst4Pl3FemKoFGAlHzgZmKjoRmiJvbWfhCXUlIg==", 179 | "dependencies": { 180 | "@socket.io/component-emitter": "~3.1.0", 181 | "debug": "~4.3.1", 182 | "engine.io-parser": "~5.2.1", 183 | "ws": "~8.11.0", 184 | "xmlhttprequest-ssl": "~2.0.0" 185 | } 186 | }, 187 | "node_modules/engine.io-parser": { 188 | "version": "5.2.1", 189 | "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.1.tgz", 190 | "integrity": "sha512-9JktcM3u18nU9N2Lz3bWeBgxVgOKpw7yhRaoxQA3FUDZzzw+9WlA6p4G4u0RixNkg14fH7EfEc/RhpurtiROTQ==", 191 | "engines": { 192 | "node": ">=10.0.0" 193 | } 194 | }, 195 | "node_modules/make-error": { 196 | "version": "1.3.6", 197 | "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", 198 | "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", 199 | "dev": true 200 | }, 201 | "node_modules/ms": { 202 | "version": "2.1.2", 203 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 204 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 205 | }, 206 | "node_modules/socket.io-client": { 207 | "version": "4.7.2", 208 | "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.7.2.tgz", 209 | "integrity": "sha512-vtA0uD4ibrYD793SOIAwlo8cj6haOeMHrGvwPxJsxH7CeIksqJ+3Zc06RvWTIFgiSqx4A3sOnTXpfAEE2Zyz6w==", 210 | "dependencies": { 211 | "@socket.io/component-emitter": "~3.1.0", 212 | "debug": "~4.3.2", 213 | "engine.io-client": "~6.5.2", 214 | "socket.io-parser": "~4.2.4" 215 | }, 216 | "engines": { 217 | "node": ">=10.0.0" 218 | } 219 | }, 220 | "node_modules/socket.io-parser": { 221 | "version": "4.2.4", 222 | "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz", 223 | "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==", 224 | "dependencies": { 225 | "@socket.io/component-emitter": "~3.1.0", 226 | "debug": "~4.3.1" 227 | }, 228 | "engines": { 229 | "node": ">=10.0.0" 230 | } 231 | }, 232 | "node_modules/ts-node": { 233 | "version": "10.9.1", 234 | "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", 235 | "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", 236 | "dev": true, 237 | "dependencies": { 238 | "@cspotcode/source-map-support": "^0.8.0", 239 | "@tsconfig/node10": "^1.0.7", 240 | "@tsconfig/node12": "^1.0.7", 241 | "@tsconfig/node14": "^1.0.0", 242 | "@tsconfig/node16": "^1.0.2", 243 | "acorn": "^8.4.1", 244 | "acorn-walk": "^8.1.1", 245 | "arg": "^4.1.0", 246 | "create-require": "^1.1.0", 247 | "diff": "^4.0.1", 248 | "make-error": "^1.1.1", 249 | "v8-compile-cache-lib": "^3.0.1", 250 | "yn": "3.1.1" 251 | }, 252 | "bin": { 253 | "ts-node": "dist/bin.js", 254 | "ts-node-cwd": "dist/bin-cwd.js", 255 | "ts-node-esm": "dist/bin-esm.js", 256 | "ts-node-script": "dist/bin-script.js", 257 | "ts-node-transpile-only": "dist/bin-transpile.js", 258 | "ts-script": "dist/bin-script-deprecated.js" 259 | }, 260 | "peerDependencies": { 261 | "@swc/core": ">=1.2.50", 262 | "@swc/wasm": ">=1.2.50", 263 | "@types/node": "*", 264 | "typescript": ">=2.7" 265 | }, 266 | "peerDependenciesMeta": { 267 | "@swc/core": { 268 | "optional": true 269 | }, 270 | "@swc/wasm": { 271 | "optional": true 272 | } 273 | } 274 | }, 275 | "node_modules/typescript": { 276 | "version": "5.2.2", 277 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", 278 | "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", 279 | "dev": true, 280 | "peer": true, 281 | "bin": { 282 | "tsc": "bin/tsc", 283 | "tsserver": "bin/tsserver" 284 | }, 285 | "engines": { 286 | "node": ">=14.17" 287 | } 288 | }, 289 | "node_modules/undici-types": { 290 | "version": "5.25.3", 291 | "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", 292 | "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==", 293 | "dev": true, 294 | "peer": true 295 | }, 296 | "node_modules/v8-compile-cache-lib": { 297 | "version": "3.0.1", 298 | "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", 299 | "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", 300 | "dev": true 301 | }, 302 | "node_modules/ws": { 303 | "version": "8.11.0", 304 | "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", 305 | "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", 306 | "engines": { 307 | "node": ">=10.0.0" 308 | }, 309 | "peerDependencies": { 310 | "bufferutil": "^4.0.1", 311 | "utf-8-validate": "^5.0.2" 312 | }, 313 | "peerDependenciesMeta": { 314 | "bufferutil": { 315 | "optional": true 316 | }, 317 | "utf-8-validate": { 318 | "optional": true 319 | } 320 | } 321 | }, 322 | "node_modules/xmlhttprequest-ssl": { 323 | "version": "2.0.0", 324 | "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz", 325 | "integrity": "sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A==", 326 | "engines": { 327 | "node": ">=0.4.0" 328 | } 329 | }, 330 | "node_modules/yn": { 331 | "version": "3.1.1", 332 | "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", 333 | "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", 334 | "dev": true, 335 | "engines": { 336 | "node": ">=6" 337 | } 338 | } 339 | } 340 | } 341 | -------------------------------------------------------------------------------- /nodejs-examples/ts-multi-agent-basic/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ts-multi-agent-basic", 3 | "version": "1.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "ts-multi-agent-basic", 9 | "version": "1.0.0", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@agentlabs/node-sdk": "^0.0.35", 13 | "dotenv": "^16.3.1" 14 | }, 15 | "devDependencies": { 16 | "ts-node": "^10.9.1" 17 | } 18 | }, 19 | "node_modules/@agentlabs/node-sdk": { 20 | "version": "0.0.35", 21 | "resolved": "https://registry.npmjs.org/@agentlabs/node-sdk/-/node-sdk-0.0.35.tgz", 22 | "integrity": "sha512-Hw5BObVmBChXTKWLrJ0D//01WrDxlHgZtK/58d9lvCM7c1Nf1XU/UpoGjLUehCjMmuVRAbDBPsTrOppluuwB7Q==", 23 | "dependencies": { 24 | "socket.io-client": "^4.7.2" 25 | }, 26 | "engines": { 27 | "node": ">= 18.0.0" 28 | } 29 | }, 30 | "node_modules/@cspotcode/source-map-support": { 31 | "version": "0.8.1", 32 | "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", 33 | "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", 34 | "dev": true, 35 | "dependencies": { 36 | "@jridgewell/trace-mapping": "0.3.9" 37 | }, 38 | "engines": { 39 | "node": ">=12" 40 | } 41 | }, 42 | "node_modules/@jridgewell/resolve-uri": { 43 | "version": "3.1.1", 44 | "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", 45 | "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", 46 | "dev": true, 47 | "engines": { 48 | "node": ">=6.0.0" 49 | } 50 | }, 51 | "node_modules/@jridgewell/sourcemap-codec": { 52 | "version": "1.4.15", 53 | "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", 54 | "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", 55 | "dev": true 56 | }, 57 | "node_modules/@jridgewell/trace-mapping": { 58 | "version": "0.3.9", 59 | "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", 60 | "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", 61 | "dev": true, 62 | "dependencies": { 63 | "@jridgewell/resolve-uri": "^3.0.3", 64 | "@jridgewell/sourcemap-codec": "^1.4.10" 65 | } 66 | }, 67 | "node_modules/@socket.io/component-emitter": { 68 | "version": "3.1.0", 69 | "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", 70 | "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==" 71 | }, 72 | "node_modules/@tsconfig/node10": { 73 | "version": "1.0.9", 74 | "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", 75 | "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", 76 | "dev": true 77 | }, 78 | "node_modules/@tsconfig/node12": { 79 | "version": "1.0.11", 80 | "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", 81 | "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", 82 | "dev": true 83 | }, 84 | "node_modules/@tsconfig/node14": { 85 | "version": "1.0.3", 86 | "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", 87 | "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", 88 | "dev": true 89 | }, 90 | "node_modules/@tsconfig/node16": { 91 | "version": "1.0.4", 92 | "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", 93 | "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", 94 | "dev": true 95 | }, 96 | "node_modules/@types/node": { 97 | "version": "20.8.6", 98 | "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.6.tgz", 99 | "integrity": "sha512-eWO4K2Ji70QzKUqRy6oyJWUeB7+g2cRagT3T/nxYibYcT4y2BDL8lqolRXjTHmkZCdJfIPaY73KbJAZmcryxTQ==", 100 | "dev": true, 101 | "peer": true, 102 | "dependencies": { 103 | "undici-types": "~5.25.1" 104 | } 105 | }, 106 | "node_modules/acorn": { 107 | "version": "8.10.0", 108 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", 109 | "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", 110 | "dev": true, 111 | "bin": { 112 | "acorn": "bin/acorn" 113 | }, 114 | "engines": { 115 | "node": ">=0.4.0" 116 | } 117 | }, 118 | "node_modules/acorn-walk": { 119 | "version": "8.2.0", 120 | "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", 121 | "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", 122 | "dev": true, 123 | "engines": { 124 | "node": ">=0.4.0" 125 | } 126 | }, 127 | "node_modules/arg": { 128 | "version": "4.1.3", 129 | "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", 130 | "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", 131 | "dev": true 132 | }, 133 | "node_modules/create-require": { 134 | "version": "1.1.1", 135 | "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", 136 | "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", 137 | "dev": true 138 | }, 139 | "node_modules/debug": { 140 | "version": "4.3.4", 141 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 142 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 143 | "dependencies": { 144 | "ms": "2.1.2" 145 | }, 146 | "engines": { 147 | "node": ">=6.0" 148 | }, 149 | "peerDependenciesMeta": { 150 | "supports-color": { 151 | "optional": true 152 | } 153 | } 154 | }, 155 | "node_modules/diff": { 156 | "version": "4.0.2", 157 | "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", 158 | "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", 159 | "dev": true, 160 | "engines": { 161 | "node": ">=0.3.1" 162 | } 163 | }, 164 | "node_modules/dotenv": { 165 | "version": "16.3.1", 166 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", 167 | "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", 168 | "engines": { 169 | "node": ">=12" 170 | }, 171 | "funding": { 172 | "url": "https://github.com/motdotla/dotenv?sponsor=1" 173 | } 174 | }, 175 | "node_modules/engine.io-client": { 176 | "version": "6.5.2", 177 | "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.5.2.tgz", 178 | "integrity": "sha512-CQZqbrpEYnrpGqC07a9dJDz4gePZUgTPMU3NKJPSeQOyw27Tst4Pl3FemKoFGAlHzgZmKjoRmiJvbWfhCXUlIg==", 179 | "dependencies": { 180 | "@socket.io/component-emitter": "~3.1.0", 181 | "debug": "~4.3.1", 182 | "engine.io-parser": "~5.2.1", 183 | "ws": "~8.11.0", 184 | "xmlhttprequest-ssl": "~2.0.0" 185 | } 186 | }, 187 | "node_modules/engine.io-parser": { 188 | "version": "5.2.1", 189 | "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.1.tgz", 190 | "integrity": "sha512-9JktcM3u18nU9N2Lz3bWeBgxVgOKpw7yhRaoxQA3FUDZzzw+9WlA6p4G4u0RixNkg14fH7EfEc/RhpurtiROTQ==", 191 | "engines": { 192 | "node": ">=10.0.0" 193 | } 194 | }, 195 | "node_modules/make-error": { 196 | "version": "1.3.6", 197 | "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", 198 | "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", 199 | "dev": true 200 | }, 201 | "node_modules/ms": { 202 | "version": "2.1.2", 203 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 204 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 205 | }, 206 | "node_modules/socket.io-client": { 207 | "version": "4.7.2", 208 | "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.7.2.tgz", 209 | "integrity": "sha512-vtA0uD4ibrYD793SOIAwlo8cj6haOeMHrGvwPxJsxH7CeIksqJ+3Zc06RvWTIFgiSqx4A3sOnTXpfAEE2Zyz6w==", 210 | "dependencies": { 211 | "@socket.io/component-emitter": "~3.1.0", 212 | "debug": "~4.3.2", 213 | "engine.io-client": "~6.5.2", 214 | "socket.io-parser": "~4.2.4" 215 | }, 216 | "engines": { 217 | "node": ">=10.0.0" 218 | } 219 | }, 220 | "node_modules/socket.io-parser": { 221 | "version": "4.2.4", 222 | "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz", 223 | "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==", 224 | "dependencies": { 225 | "@socket.io/component-emitter": "~3.1.0", 226 | "debug": "~4.3.1" 227 | }, 228 | "engines": { 229 | "node": ">=10.0.0" 230 | } 231 | }, 232 | "node_modules/ts-node": { 233 | "version": "10.9.1", 234 | "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", 235 | "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", 236 | "dev": true, 237 | "dependencies": { 238 | "@cspotcode/source-map-support": "^0.8.0", 239 | "@tsconfig/node10": "^1.0.7", 240 | "@tsconfig/node12": "^1.0.7", 241 | "@tsconfig/node14": "^1.0.0", 242 | "@tsconfig/node16": "^1.0.2", 243 | "acorn": "^8.4.1", 244 | "acorn-walk": "^8.1.1", 245 | "arg": "^4.1.0", 246 | "create-require": "^1.1.0", 247 | "diff": "^4.0.1", 248 | "make-error": "^1.1.1", 249 | "v8-compile-cache-lib": "^3.0.1", 250 | "yn": "3.1.1" 251 | }, 252 | "bin": { 253 | "ts-node": "dist/bin.js", 254 | "ts-node-cwd": "dist/bin-cwd.js", 255 | "ts-node-esm": "dist/bin-esm.js", 256 | "ts-node-script": "dist/bin-script.js", 257 | "ts-node-transpile-only": "dist/bin-transpile.js", 258 | "ts-script": "dist/bin-script-deprecated.js" 259 | }, 260 | "peerDependencies": { 261 | "@swc/core": ">=1.2.50", 262 | "@swc/wasm": ">=1.2.50", 263 | "@types/node": "*", 264 | "typescript": ">=2.7" 265 | }, 266 | "peerDependenciesMeta": { 267 | "@swc/core": { 268 | "optional": true 269 | }, 270 | "@swc/wasm": { 271 | "optional": true 272 | } 273 | } 274 | }, 275 | "node_modules/typescript": { 276 | "version": "5.2.2", 277 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", 278 | "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", 279 | "dev": true, 280 | "peer": true, 281 | "bin": { 282 | "tsc": "bin/tsc", 283 | "tsserver": "bin/tsserver" 284 | }, 285 | "engines": { 286 | "node": ">=14.17" 287 | } 288 | }, 289 | "node_modules/undici-types": { 290 | "version": "5.25.3", 291 | "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", 292 | "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==", 293 | "dev": true, 294 | "peer": true 295 | }, 296 | "node_modules/v8-compile-cache-lib": { 297 | "version": "3.0.1", 298 | "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", 299 | "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", 300 | "dev": true 301 | }, 302 | "node_modules/ws": { 303 | "version": "8.11.0", 304 | "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", 305 | "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", 306 | "engines": { 307 | "node": ">=10.0.0" 308 | }, 309 | "peerDependencies": { 310 | "bufferutil": "^4.0.1", 311 | "utf-8-validate": "^5.0.2" 312 | }, 313 | "peerDependenciesMeta": { 314 | "bufferutil": { 315 | "optional": true 316 | }, 317 | "utf-8-validate": { 318 | "optional": true 319 | } 320 | } 321 | }, 322 | "node_modules/xmlhttprequest-ssl": { 323 | "version": "2.0.0", 324 | "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz", 325 | "integrity": "sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A==", 326 | "engines": { 327 | "node": ">=0.4.0" 328 | } 329 | }, 330 | "node_modules/yn": { 331 | "version": "3.1.1", 332 | "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", 333 | "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", 334 | "dev": true, 335 | "engines": { 336 | "node": ">=6" 337 | } 338 | } 339 | } 340 | } 341 | -------------------------------------------------------------------------------- /nodejs-examples/ts-multi-agent-stream-basic/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ts-multi-agent-basic", 3 | "version": "1.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "ts-multi-agent-basic", 9 | "version": "1.0.0", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@agentlabs/node-sdk": "^0.0.51", 13 | "dotenv": "^16.3.1" 14 | }, 15 | "devDependencies": { 16 | "ts-node": "^10.9.1" 17 | } 18 | }, 19 | "node_modules/@agentlabs/node-sdk": { 20 | "version": "0.0.51", 21 | "resolved": "https://registry.npmjs.org/@agentlabs/node-sdk/-/node-sdk-0.0.51.tgz", 22 | "integrity": "sha512-//ODcHVCT7X6uNVYZc0qWYgVpKM0mBsSlUTQDzkbZ5aa4M4nrsE3uhn8nIUepEOR3Kquh5dByC9Q7Q9JUFSHnw==", 23 | "dependencies": { 24 | "socket.io-client": "^4.7.2" 25 | }, 26 | "engines": { 27 | "node": ">= 18.0.0" 28 | } 29 | }, 30 | "node_modules/@cspotcode/source-map-support": { 31 | "version": "0.8.1", 32 | "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", 33 | "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", 34 | "dev": true, 35 | "dependencies": { 36 | "@jridgewell/trace-mapping": "0.3.9" 37 | }, 38 | "engines": { 39 | "node": ">=12" 40 | } 41 | }, 42 | "node_modules/@jridgewell/resolve-uri": { 43 | "version": "3.1.1", 44 | "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", 45 | "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", 46 | "dev": true, 47 | "engines": { 48 | "node": ">=6.0.0" 49 | } 50 | }, 51 | "node_modules/@jridgewell/sourcemap-codec": { 52 | "version": "1.4.15", 53 | "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", 54 | "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", 55 | "dev": true 56 | }, 57 | "node_modules/@jridgewell/trace-mapping": { 58 | "version": "0.3.9", 59 | "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", 60 | "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", 61 | "dev": true, 62 | "dependencies": { 63 | "@jridgewell/resolve-uri": "^3.0.3", 64 | "@jridgewell/sourcemap-codec": "^1.4.10" 65 | } 66 | }, 67 | "node_modules/@socket.io/component-emitter": { 68 | "version": "3.1.0", 69 | "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", 70 | "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==" 71 | }, 72 | "node_modules/@tsconfig/node10": { 73 | "version": "1.0.9", 74 | "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", 75 | "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", 76 | "dev": true 77 | }, 78 | "node_modules/@tsconfig/node12": { 79 | "version": "1.0.11", 80 | "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", 81 | "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", 82 | "dev": true 83 | }, 84 | "node_modules/@tsconfig/node14": { 85 | "version": "1.0.3", 86 | "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", 87 | "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", 88 | "dev": true 89 | }, 90 | "node_modules/@tsconfig/node16": { 91 | "version": "1.0.4", 92 | "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", 93 | "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", 94 | "dev": true 95 | }, 96 | "node_modules/@types/node": { 97 | "version": "20.8.6", 98 | "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.6.tgz", 99 | "integrity": "sha512-eWO4K2Ji70QzKUqRy6oyJWUeB7+g2cRagT3T/nxYibYcT4y2BDL8lqolRXjTHmkZCdJfIPaY73KbJAZmcryxTQ==", 100 | "dev": true, 101 | "peer": true, 102 | "dependencies": { 103 | "undici-types": "~5.25.1" 104 | } 105 | }, 106 | "node_modules/acorn": { 107 | "version": "8.10.0", 108 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", 109 | "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", 110 | "dev": true, 111 | "bin": { 112 | "acorn": "bin/acorn" 113 | }, 114 | "engines": { 115 | "node": ">=0.4.0" 116 | } 117 | }, 118 | "node_modules/acorn-walk": { 119 | "version": "8.2.0", 120 | "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", 121 | "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", 122 | "dev": true, 123 | "engines": { 124 | "node": ">=0.4.0" 125 | } 126 | }, 127 | "node_modules/arg": { 128 | "version": "4.1.3", 129 | "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", 130 | "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", 131 | "dev": true 132 | }, 133 | "node_modules/create-require": { 134 | "version": "1.1.1", 135 | "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", 136 | "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", 137 | "dev": true 138 | }, 139 | "node_modules/debug": { 140 | "version": "4.3.4", 141 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 142 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 143 | "dependencies": { 144 | "ms": "2.1.2" 145 | }, 146 | "engines": { 147 | "node": ">=6.0" 148 | }, 149 | "peerDependenciesMeta": { 150 | "supports-color": { 151 | "optional": true 152 | } 153 | } 154 | }, 155 | "node_modules/diff": { 156 | "version": "4.0.2", 157 | "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", 158 | "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", 159 | "dev": true, 160 | "engines": { 161 | "node": ">=0.3.1" 162 | } 163 | }, 164 | "node_modules/dotenv": { 165 | "version": "16.3.1", 166 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", 167 | "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", 168 | "engines": { 169 | "node": ">=12" 170 | }, 171 | "funding": { 172 | "url": "https://github.com/motdotla/dotenv?sponsor=1" 173 | } 174 | }, 175 | "node_modules/engine.io-client": { 176 | "version": "6.5.2", 177 | "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.5.2.tgz", 178 | "integrity": "sha512-CQZqbrpEYnrpGqC07a9dJDz4gePZUgTPMU3NKJPSeQOyw27Tst4Pl3FemKoFGAlHzgZmKjoRmiJvbWfhCXUlIg==", 179 | "dependencies": { 180 | "@socket.io/component-emitter": "~3.1.0", 181 | "debug": "~4.3.1", 182 | "engine.io-parser": "~5.2.1", 183 | "ws": "~8.11.0", 184 | "xmlhttprequest-ssl": "~2.0.0" 185 | } 186 | }, 187 | "node_modules/engine.io-parser": { 188 | "version": "5.2.1", 189 | "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.1.tgz", 190 | "integrity": "sha512-9JktcM3u18nU9N2Lz3bWeBgxVgOKpw7yhRaoxQA3FUDZzzw+9WlA6p4G4u0RixNkg14fH7EfEc/RhpurtiROTQ==", 191 | "engines": { 192 | "node": ">=10.0.0" 193 | } 194 | }, 195 | "node_modules/make-error": { 196 | "version": "1.3.6", 197 | "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", 198 | "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", 199 | "dev": true 200 | }, 201 | "node_modules/ms": { 202 | "version": "2.1.2", 203 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 204 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 205 | }, 206 | "node_modules/socket.io-client": { 207 | "version": "4.7.2", 208 | "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.7.2.tgz", 209 | "integrity": "sha512-vtA0uD4ibrYD793SOIAwlo8cj6haOeMHrGvwPxJsxH7CeIksqJ+3Zc06RvWTIFgiSqx4A3sOnTXpfAEE2Zyz6w==", 210 | "dependencies": { 211 | "@socket.io/component-emitter": "~3.1.0", 212 | "debug": "~4.3.2", 213 | "engine.io-client": "~6.5.2", 214 | "socket.io-parser": "~4.2.4" 215 | }, 216 | "engines": { 217 | "node": ">=10.0.0" 218 | } 219 | }, 220 | "node_modules/socket.io-parser": { 221 | "version": "4.2.4", 222 | "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz", 223 | "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==", 224 | "dependencies": { 225 | "@socket.io/component-emitter": "~3.1.0", 226 | "debug": "~4.3.1" 227 | }, 228 | "engines": { 229 | "node": ">=10.0.0" 230 | } 231 | }, 232 | "node_modules/ts-node": { 233 | "version": "10.9.1", 234 | "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", 235 | "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", 236 | "dev": true, 237 | "dependencies": { 238 | "@cspotcode/source-map-support": "^0.8.0", 239 | "@tsconfig/node10": "^1.0.7", 240 | "@tsconfig/node12": "^1.0.7", 241 | "@tsconfig/node14": "^1.0.0", 242 | "@tsconfig/node16": "^1.0.2", 243 | "acorn": "^8.4.1", 244 | "acorn-walk": "^8.1.1", 245 | "arg": "^4.1.0", 246 | "create-require": "^1.1.0", 247 | "diff": "^4.0.1", 248 | "make-error": "^1.1.1", 249 | "v8-compile-cache-lib": "^3.0.1", 250 | "yn": "3.1.1" 251 | }, 252 | "bin": { 253 | "ts-node": "dist/bin.js", 254 | "ts-node-cwd": "dist/bin-cwd.js", 255 | "ts-node-esm": "dist/bin-esm.js", 256 | "ts-node-script": "dist/bin-script.js", 257 | "ts-node-transpile-only": "dist/bin-transpile.js", 258 | "ts-script": "dist/bin-script-deprecated.js" 259 | }, 260 | "peerDependencies": { 261 | "@swc/core": ">=1.2.50", 262 | "@swc/wasm": ">=1.2.50", 263 | "@types/node": "*", 264 | "typescript": ">=2.7" 265 | }, 266 | "peerDependenciesMeta": { 267 | "@swc/core": { 268 | "optional": true 269 | }, 270 | "@swc/wasm": { 271 | "optional": true 272 | } 273 | } 274 | }, 275 | "node_modules/typescript": { 276 | "version": "5.2.2", 277 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", 278 | "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", 279 | "dev": true, 280 | "peer": true, 281 | "bin": { 282 | "tsc": "bin/tsc", 283 | "tsserver": "bin/tsserver" 284 | }, 285 | "engines": { 286 | "node": ">=14.17" 287 | } 288 | }, 289 | "node_modules/undici-types": { 290 | "version": "5.25.3", 291 | "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", 292 | "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==", 293 | "dev": true, 294 | "peer": true 295 | }, 296 | "node_modules/v8-compile-cache-lib": { 297 | "version": "3.0.1", 298 | "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", 299 | "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", 300 | "dev": true 301 | }, 302 | "node_modules/ws": { 303 | "version": "8.11.0", 304 | "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", 305 | "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", 306 | "engines": { 307 | "node": ">=10.0.0" 308 | }, 309 | "peerDependencies": { 310 | "bufferutil": "^4.0.1", 311 | "utf-8-validate": "^5.0.2" 312 | }, 313 | "peerDependenciesMeta": { 314 | "bufferutil": { 315 | "optional": true 316 | }, 317 | "utf-8-validate": { 318 | "optional": true 319 | } 320 | } 321 | }, 322 | "node_modules/xmlhttprequest-ssl": { 323 | "version": "2.0.0", 324 | "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz", 325 | "integrity": "sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A==", 326 | "engines": { 327 | "node": ">=0.4.0" 328 | } 329 | }, 330 | "node_modules/yn": { 331 | "version": "3.1.1", 332 | "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", 333 | "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", 334 | "dev": true, 335 | "engines": { 336 | "node": ">=6" 337 | } 338 | } 339 | } 340 | } 341 | -------------------------------------------------------------------------------- /nodejs-examples/ts-midjourney-clone-basic/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ts-ping-pong", 3 | "version": "1.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "ts-ping-pong", 9 | "version": "1.0.0", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@agentlabs/node-sdk": "^0.0.62", 13 | "axios": "^1.5.1", 14 | "dotenv": "^16.3.1" 15 | }, 16 | "devDependencies": { 17 | "ts-node": "^10.9.1" 18 | } 19 | }, 20 | "node_modules/@agentlabs/node-sdk": { 21 | "version": "0.0.62", 22 | "resolved": "https://registry.npmjs.org/@agentlabs/node-sdk/-/node-sdk-0.0.62.tgz", 23 | "integrity": "sha512-ryyXolUnZ7Ar3cVK7Yssz4edUEapPu0eKX64sKQmflr92qbMjd+KiBB7I1kqPUcGLB7BauFEsvCIFqeMsTqgvQ==", 24 | "dependencies": { 25 | "socket.io-client": "^4.7.2" 26 | }, 27 | "engines": { 28 | "node": ">= 18.0.0" 29 | } 30 | }, 31 | "node_modules/@cspotcode/source-map-support": { 32 | "version": "0.8.1", 33 | "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", 34 | "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", 35 | "dev": true, 36 | "dependencies": { 37 | "@jridgewell/trace-mapping": "0.3.9" 38 | }, 39 | "engines": { 40 | "node": ">=12" 41 | } 42 | }, 43 | "node_modules/@jridgewell/resolve-uri": { 44 | "version": "3.1.1", 45 | "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", 46 | "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", 47 | "dev": true, 48 | "engines": { 49 | "node": ">=6.0.0" 50 | } 51 | }, 52 | "node_modules/@jridgewell/sourcemap-codec": { 53 | "version": "1.4.15", 54 | "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", 55 | "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", 56 | "dev": true 57 | }, 58 | "node_modules/@jridgewell/trace-mapping": { 59 | "version": "0.3.9", 60 | "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", 61 | "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", 62 | "dev": true, 63 | "dependencies": { 64 | "@jridgewell/resolve-uri": "^3.0.3", 65 | "@jridgewell/sourcemap-codec": "^1.4.10" 66 | } 67 | }, 68 | "node_modules/@socket.io/component-emitter": { 69 | "version": "3.1.0", 70 | "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", 71 | "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==" 72 | }, 73 | "node_modules/@tsconfig/node10": { 74 | "version": "1.0.9", 75 | "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", 76 | "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", 77 | "dev": true 78 | }, 79 | "node_modules/@tsconfig/node12": { 80 | "version": "1.0.11", 81 | "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", 82 | "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", 83 | "dev": true 84 | }, 85 | "node_modules/@tsconfig/node14": { 86 | "version": "1.0.3", 87 | "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", 88 | "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", 89 | "dev": true 90 | }, 91 | "node_modules/@tsconfig/node16": { 92 | "version": "1.0.4", 93 | "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", 94 | "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", 95 | "dev": true 96 | }, 97 | "node_modules/@types/node": { 98 | "version": "20.8.6", 99 | "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.6.tgz", 100 | "integrity": "sha512-eWO4K2Ji70QzKUqRy6oyJWUeB7+g2cRagT3T/nxYibYcT4y2BDL8lqolRXjTHmkZCdJfIPaY73KbJAZmcryxTQ==", 101 | "dev": true, 102 | "peer": true, 103 | "dependencies": { 104 | "undici-types": "~5.25.1" 105 | } 106 | }, 107 | "node_modules/acorn": { 108 | "version": "8.10.0", 109 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", 110 | "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", 111 | "dev": true, 112 | "bin": { 113 | "acorn": "bin/acorn" 114 | }, 115 | "engines": { 116 | "node": ">=0.4.0" 117 | } 118 | }, 119 | "node_modules/acorn-walk": { 120 | "version": "8.2.0", 121 | "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", 122 | "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", 123 | "dev": true, 124 | "engines": { 125 | "node": ">=0.4.0" 126 | } 127 | }, 128 | "node_modules/arg": { 129 | "version": "4.1.3", 130 | "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", 131 | "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", 132 | "dev": true 133 | }, 134 | "node_modules/asynckit": { 135 | "version": "0.4.0", 136 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 137 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" 138 | }, 139 | "node_modules/axios": { 140 | "version": "1.5.1", 141 | "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.1.tgz", 142 | "integrity": "sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==", 143 | "dependencies": { 144 | "follow-redirects": "^1.15.0", 145 | "form-data": "^4.0.0", 146 | "proxy-from-env": "^1.1.0" 147 | } 148 | }, 149 | "node_modules/combined-stream": { 150 | "version": "1.0.8", 151 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 152 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 153 | "dependencies": { 154 | "delayed-stream": "~1.0.0" 155 | }, 156 | "engines": { 157 | "node": ">= 0.8" 158 | } 159 | }, 160 | "node_modules/create-require": { 161 | "version": "1.1.1", 162 | "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", 163 | "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", 164 | "dev": true 165 | }, 166 | "node_modules/debug": { 167 | "version": "4.3.4", 168 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 169 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 170 | "dependencies": { 171 | "ms": "2.1.2" 172 | }, 173 | "engines": { 174 | "node": ">=6.0" 175 | }, 176 | "peerDependenciesMeta": { 177 | "supports-color": { 178 | "optional": true 179 | } 180 | } 181 | }, 182 | "node_modules/delayed-stream": { 183 | "version": "1.0.0", 184 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 185 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", 186 | "engines": { 187 | "node": ">=0.4.0" 188 | } 189 | }, 190 | "node_modules/diff": { 191 | "version": "4.0.2", 192 | "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", 193 | "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", 194 | "dev": true, 195 | "engines": { 196 | "node": ">=0.3.1" 197 | } 198 | }, 199 | "node_modules/dotenv": { 200 | "version": "16.3.1", 201 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", 202 | "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", 203 | "engines": { 204 | "node": ">=12" 205 | }, 206 | "funding": { 207 | "url": "https://github.com/motdotla/dotenv?sponsor=1" 208 | } 209 | }, 210 | "node_modules/engine.io-client": { 211 | "version": "6.5.2", 212 | "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.5.2.tgz", 213 | "integrity": "sha512-CQZqbrpEYnrpGqC07a9dJDz4gePZUgTPMU3NKJPSeQOyw27Tst4Pl3FemKoFGAlHzgZmKjoRmiJvbWfhCXUlIg==", 214 | "dependencies": { 215 | "@socket.io/component-emitter": "~3.1.0", 216 | "debug": "~4.3.1", 217 | "engine.io-parser": "~5.2.1", 218 | "ws": "~8.11.0", 219 | "xmlhttprequest-ssl": "~2.0.0" 220 | } 221 | }, 222 | "node_modules/engine.io-parser": { 223 | "version": "5.2.1", 224 | "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.1.tgz", 225 | "integrity": "sha512-9JktcM3u18nU9N2Lz3bWeBgxVgOKpw7yhRaoxQA3FUDZzzw+9WlA6p4G4u0RixNkg14fH7EfEc/RhpurtiROTQ==", 226 | "engines": { 227 | "node": ">=10.0.0" 228 | } 229 | }, 230 | "node_modules/follow-redirects": { 231 | "version": "1.15.3", 232 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", 233 | "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", 234 | "funding": [ 235 | { 236 | "type": "individual", 237 | "url": "https://github.com/sponsors/RubenVerborgh" 238 | } 239 | ], 240 | "engines": { 241 | "node": ">=4.0" 242 | }, 243 | "peerDependenciesMeta": { 244 | "debug": { 245 | "optional": true 246 | } 247 | } 248 | }, 249 | "node_modules/form-data": { 250 | "version": "4.0.0", 251 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", 252 | "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", 253 | "dependencies": { 254 | "asynckit": "^0.4.0", 255 | "combined-stream": "^1.0.8", 256 | "mime-types": "^2.1.12" 257 | }, 258 | "engines": { 259 | "node": ">= 6" 260 | } 261 | }, 262 | "node_modules/make-error": { 263 | "version": "1.3.6", 264 | "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", 265 | "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", 266 | "dev": true 267 | }, 268 | "node_modules/mime-db": { 269 | "version": "1.52.0", 270 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 271 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", 272 | "engines": { 273 | "node": ">= 0.6" 274 | } 275 | }, 276 | "node_modules/mime-types": { 277 | "version": "2.1.35", 278 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 279 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 280 | "dependencies": { 281 | "mime-db": "1.52.0" 282 | }, 283 | "engines": { 284 | "node": ">= 0.6" 285 | } 286 | }, 287 | "node_modules/ms": { 288 | "version": "2.1.2", 289 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 290 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 291 | }, 292 | "node_modules/proxy-from-env": { 293 | "version": "1.1.0", 294 | "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", 295 | "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" 296 | }, 297 | "node_modules/socket.io-client": { 298 | "version": "4.7.2", 299 | "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.7.2.tgz", 300 | "integrity": "sha512-vtA0uD4ibrYD793SOIAwlo8cj6haOeMHrGvwPxJsxH7CeIksqJ+3Zc06RvWTIFgiSqx4A3sOnTXpfAEE2Zyz6w==", 301 | "dependencies": { 302 | "@socket.io/component-emitter": "~3.1.0", 303 | "debug": "~4.3.2", 304 | "engine.io-client": "~6.5.2", 305 | "socket.io-parser": "~4.2.4" 306 | }, 307 | "engines": { 308 | "node": ">=10.0.0" 309 | } 310 | }, 311 | "node_modules/socket.io-parser": { 312 | "version": "4.2.4", 313 | "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz", 314 | "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==", 315 | "dependencies": { 316 | "@socket.io/component-emitter": "~3.1.0", 317 | "debug": "~4.3.1" 318 | }, 319 | "engines": { 320 | "node": ">=10.0.0" 321 | } 322 | }, 323 | "node_modules/ts-node": { 324 | "version": "10.9.1", 325 | "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", 326 | "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", 327 | "dev": true, 328 | "dependencies": { 329 | "@cspotcode/source-map-support": "^0.8.0", 330 | "@tsconfig/node10": "^1.0.7", 331 | "@tsconfig/node12": "^1.0.7", 332 | "@tsconfig/node14": "^1.0.0", 333 | "@tsconfig/node16": "^1.0.2", 334 | "acorn": "^8.4.1", 335 | "acorn-walk": "^8.1.1", 336 | "arg": "^4.1.0", 337 | "create-require": "^1.1.0", 338 | "diff": "^4.0.1", 339 | "make-error": "^1.1.1", 340 | "v8-compile-cache-lib": "^3.0.1", 341 | "yn": "3.1.1" 342 | }, 343 | "bin": { 344 | "ts-node": "dist/bin.js", 345 | "ts-node-cwd": "dist/bin-cwd.js", 346 | "ts-node-esm": "dist/bin-esm.js", 347 | "ts-node-script": "dist/bin-script.js", 348 | "ts-node-transpile-only": "dist/bin-transpile.js", 349 | "ts-script": "dist/bin-script-deprecated.js" 350 | }, 351 | "peerDependencies": { 352 | "@swc/core": ">=1.2.50", 353 | "@swc/wasm": ">=1.2.50", 354 | "@types/node": "*", 355 | "typescript": ">=2.7" 356 | }, 357 | "peerDependenciesMeta": { 358 | "@swc/core": { 359 | "optional": true 360 | }, 361 | "@swc/wasm": { 362 | "optional": true 363 | } 364 | } 365 | }, 366 | "node_modules/typescript": { 367 | "version": "5.2.2", 368 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", 369 | "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", 370 | "dev": true, 371 | "peer": true, 372 | "bin": { 373 | "tsc": "bin/tsc", 374 | "tsserver": "bin/tsserver" 375 | }, 376 | "engines": { 377 | "node": ">=14.17" 378 | } 379 | }, 380 | "node_modules/undici-types": { 381 | "version": "5.25.3", 382 | "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", 383 | "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==", 384 | "dev": true, 385 | "peer": true 386 | }, 387 | "node_modules/v8-compile-cache-lib": { 388 | "version": "3.0.1", 389 | "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", 390 | "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", 391 | "dev": true 392 | }, 393 | "node_modules/ws": { 394 | "version": "8.11.0", 395 | "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", 396 | "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", 397 | "engines": { 398 | "node": ">=10.0.0" 399 | }, 400 | "peerDependencies": { 401 | "bufferutil": "^4.0.1", 402 | "utf-8-validate": "^5.0.2" 403 | }, 404 | "peerDependenciesMeta": { 405 | "bufferutil": { 406 | "optional": true 407 | }, 408 | "utf-8-validate": { 409 | "optional": true 410 | } 411 | } 412 | }, 413 | "node_modules/xmlhttprequest-ssl": { 414 | "version": "2.0.0", 415 | "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz", 416 | "integrity": "sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A==", 417 | "engines": { 418 | "node": ">=0.4.0" 419 | } 420 | }, 421 | "node_modules/yn": { 422 | "version": "3.1.1", 423 | "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", 424 | "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", 425 | "dev": true, 426 | "engines": { 427 | "node": ">=6" 428 | } 429 | } 430 | } 431 | } 432 | --------------------------------------------------------------------------------