diff --git a/.env.example b/.env.example index 4712016..8194786 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,8 @@ _APP_ASSISTANT_OPENAI_API_KEY=YOUR_OPENAI_API_KEY +_APP_ASSISTANT_OPENAI_MODEL=gpt-4o +_APP_ASSISTANT_TEMPERATURE=0.5 +_APP_ASSISTANT_MAX_TOKENS=1000 + _BUILD_GIT_URL=https://github.com/appwrite/website.git _BUILD_GIT_BRANCH=main _BUILD_WEBSITE_URL=https://appwrite.io diff --git a/.gitignore b/.gitignore index 53bf0c1..1fb2d03 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ node_modules .vscode .env venv -sources \ No newline at end of file +index +.DS_Store \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index fc62b0b..dd44aa5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,7 @@ ENV _BUILD_GIT_BRANCH=${_BUILD_GIT_BRANCH} ENV _BUILD_WEBSITE_URL=${_BUILD_WEBSITE_URL} ENV _BUILD_WEBSITE_VERSION=${_BUILD_WEBSITE_VERSION} -RUN pnpm run fetch-sources +RUN pnpm run index ENV _APP_ASSISTANT_OPENAI_API_KEY='' diff --git a/README.md b/README.md index 1fac51f..e70872c 100644 --- a/README.md +++ b/README.md @@ -16,10 +16,10 @@ To install, run the following command. pnpm i ``` -Next, fetch the Appwrite-specific sources used by the assistant. This will download the sources from the Appwrite documentation and store them in the `./sources` directory. +Next, fetch the Appwrite-specific sources used by the assistant. This will download the sources from the Appwrite documentation and store them in the `./index` directory. ```bash -pnpm run fetch-sources +pnpm run index ``` The scripts will pull the latest documentation from the `main` branch of the [website repository](https://github.com/appwrite/website), and the latest API reference from live [Appwrite documentation](https://appwrite.io/docs). diff --git a/package.json b/package.json index 804dfc0..174cccd 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "ai-api", + "name": "appwrite-assistant", "version": "0.1.0", "description": "", "main": "main.js", @@ -7,23 +7,29 @@ "start": "node src/main.js", "test": "node scripts/test-prompts.js", "dev": "nodemon src/main.js", - "fetch-sources": "node scripts/git-sources.js && node scripts/web-sources.js" + "index": "node scripts/git-sources.js && node scripts/web-sources.js && node scripts/vector-store.js" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { - "body-parser": "^1.20.2", + "@langchain/community": "^0.3.17", + "@langchain/core": "^0.3.22", + "@langchain/openai": "^0.3.14", + "body-parser": "^1.20.3", "cors": "^2.8.5", - "dotenv": "^16.3.1", - "execa": "^8.0.1", - "express": "^4.18.2", - "glob": "^10.3.10", - "hnswlib-node": "^1.4.2", - "langchain": "^0.0.199", - "node-html-markdown": "^1.3.0", - "nodemon": "^3.0.1", - "peggy": "^3.0.2" + "dotenv": "^16.4.7", + "execa": "^9.5.2", + "express": "^4.21.2", + "glob": "^11.0.0", + "hnswlib-node": "^3.0.0", + "html-to-text": "^9.0.5", + "langchain": "^0.3.6", + "nodemon": "^3.1.7" + }, + "devDependencies": { + "@types/body-parser": "^1.19.5", + "@types/express": "^5.0.0" }, "type": "module" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 73e0806..f9ea1cd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,68 +8,644 @@ importers: .: dependencies: + '@langchain/community': + specifier: ^0.3.17 + version: 0.3.17(@browserbasehq/sdk@2.0.0)(@browserbasehq/stagehand@1.6.0(@playwright/test@1.49.1)(deepmerge@4.3.1)(dotenv@16.4.7)(openai@4.76.1(zod@3.23.8))(zod@3.23.8))(@ibm-cloud/watsonx-ai@1.3.0)(@langchain/core@0.3.22(openai@4.76.1(zod@3.23.8)))(axios@1.7.4)(hnswlib-node@3.0.0)(html-to-text@9.0.5)(ibm-cloud-sdk-core@5.1.0)(jsonwebtoken@9.0.2)(openai@4.76.1(zod@3.23.8))(peggy@3.0.2)(playwright@1.49.1) + '@langchain/core': + specifier: ^0.3.22 + version: 0.3.22(openai@4.76.1(zod@3.23.8)) + '@langchain/openai': + specifier: ^0.3.14 + version: 0.3.14(@langchain/core@0.3.22(openai@4.76.1(zod@3.23.8))) body-parser: - specifier: ^1.20.2 - version: 1.20.2 + specifier: ^1.20.3 + version: 1.20.3 cors: specifier: ^2.8.5 version: 2.8.5 dotenv: - specifier: ^16.3.1 - version: 16.3.1 + specifier: ^16.4.7 + version: 16.4.7 execa: - specifier: ^8.0.1 - version: 8.0.1 + specifier: ^9.5.2 + version: 9.5.2 express: - specifier: ^4.18.2 - version: 4.18.2 + specifier: ^4.21.2 + version: 4.21.2 glob: - specifier: ^10.3.10 - version: 10.3.10 + specifier: ^11.0.0 + version: 11.0.0 hnswlib-node: - specifier: ^1.4.2 - version: 1.4.2 + specifier: ^3.0.0 + version: 3.0.0 + html-to-text: + specifier: ^9.0.5 + version: 9.0.5 langchain: - specifier: ^0.0.199 - version: 0.0.199(hnswlib-node@1.4.2)(peggy@3.0.2) - node-html-markdown: - specifier: ^1.3.0 - version: 1.3.0 + specifier: ^0.3.6 + version: 0.3.6(@langchain/core@0.3.22(openai@4.76.1(zod@3.23.8)))(axios@1.7.4)(openai@4.76.1(zod@3.23.8))(peggy@3.0.2) nodemon: - specifier: ^3.0.1 - version: 3.0.1 - peggy: - specifier: ^3.0.2 - version: 3.0.2 + specifier: ^3.1.7 + version: 3.1.7 + devDependencies: + '@types/body-parser': + specifier: ^1.19.5 + version: 1.19.5 + '@types/express': + specifier: ^5.0.0 + version: 5.0.0 packages: - '@anthropic-ai/sdk@0.9.1': - resolution: {integrity: sha512-wa1meQ2WSfoY8Uor3EdrJq0jTiZJoKoSii2ZVWRY1oN4Tlr5s59pADg9T79FTbPe1/se5c3pBeZgJL63wmuoBA==} + '@anthropic-ai/sdk@0.27.3': + resolution: {integrity: sha512-IjLt0gd3L4jlOfilxVXTifn42FnVffMgDC04RJK1KDZpmkBWLv0XC92MVVmkxrFZNS/7l3xWgP/I3nqtX1sQHw==} + + '@browserbasehq/sdk@2.0.0': + resolution: {integrity: sha512-BdPlZyn0dpXlL70gNK4acpqWIRB+edo2z0/GalQdWghRq8iQjySd9fVIF3evKH1p2wCYekZJRK6tm29YfXB67g==} + + '@browserbasehq/stagehand@1.6.0': + resolution: {integrity: sha512-seDmCtokkCf+5xaJ2IOjxcNAGm5PrOR8m+hgtDuMxfByE9o1pQdFYtNkjDFfI9oBbIB2EF3RQJTxkQHT9s6QRA==} + peerDependencies: + '@playwright/test': ^1.42.1 + deepmerge: ^4.3.1 + dotenv: ^16.4.5 + openai: ^4.62.1 + zod: ^3.23.8 + + '@emnapi/runtime@1.3.1': + resolution: {integrity: sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==} + + '@ibm-cloud/watsonx-ai@1.3.0': + resolution: {integrity: sha512-V4PorMPhxwYiayWxycryun4Bjxn3PJrQqJGca+maQd61Q7s+/PUJAHWjwzVSVHxiher17zFHf4NwqB8J6bWj4w==} + engines: {node: '>=18.0.0'} + + '@img/sharp-darwin-arm64@0.33.5': + resolution: {integrity: sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [darwin] + + '@img/sharp-darwin-x64@0.33.5': + resolution: {integrity: sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [darwin] + + '@img/sharp-libvips-darwin-arm64@1.0.4': + resolution: {integrity: sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==} + cpu: [arm64] + os: [darwin] + + '@img/sharp-libvips-darwin-x64@1.0.4': + resolution: {integrity: sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==} + cpu: [x64] + os: [darwin] + + '@img/sharp-libvips-linux-arm64@1.0.4': + resolution: {integrity: sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==} + cpu: [arm64] + os: [linux] + + '@img/sharp-libvips-linux-arm@1.0.5': + resolution: {integrity: sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==} + cpu: [arm] + os: [linux] + + '@img/sharp-libvips-linux-s390x@1.0.4': + resolution: {integrity: sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==} + cpu: [s390x] + os: [linux] + + '@img/sharp-libvips-linux-x64@1.0.4': + resolution: {integrity: sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==} + cpu: [x64] + os: [linux] + + '@img/sharp-libvips-linuxmusl-arm64@1.0.4': + resolution: {integrity: sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==} + cpu: [arm64] + os: [linux] + + '@img/sharp-libvips-linuxmusl-x64@1.0.4': + resolution: {integrity: sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==} + cpu: [x64] + os: [linux] + + '@img/sharp-linux-arm64@0.33.5': + resolution: {integrity: sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [linux] + + '@img/sharp-linux-arm@0.33.5': + resolution: {integrity: sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm] + os: [linux] + + '@img/sharp-linux-s390x@0.33.5': + resolution: {integrity: sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [s390x] + os: [linux] + + '@img/sharp-linux-x64@0.33.5': + resolution: {integrity: sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [linux] + + '@img/sharp-linuxmusl-arm64@0.33.5': + resolution: {integrity: sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [linux] + + '@img/sharp-linuxmusl-x64@0.33.5': + resolution: {integrity: sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [linux] + + '@img/sharp-wasm32@0.33.5': + resolution: {integrity: sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [wasm32] + + '@img/sharp-win32-ia32@0.33.5': + resolution: {integrity: sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [ia32] + os: [win32] + + '@img/sharp-win32-x64@0.33.5': + resolution: {integrity: sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [win32] '@isaacs/cliui@8.0.2': resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} engines: {node: '>=12'} - '@langchain/core@0.0.3': - resolution: {integrity: sha512-QSSFGdKWS9GB5LAuGpHaitNqpwTNTYlxw2eRsMVuSNdfLHZhuYa73t/yqDbzPBYpBhhOXSOkmQsk2o8+M4BddA==} + '@langchain/community@0.3.17': + resolution: {integrity: sha512-ZcpSC1ZHfFk7ZJE5Ze9kh2bHOCzY/G03tlCqkwexDVB1C7/Iu9wvLqKtSQVMdYW2MfBJJGfeToDeWJ3FIULHbg==} + engines: {node: '>=18'} + peerDependencies: + '@arcjet/redact': ^v1.0.0-alpha.23 + '@aws-crypto/sha256-js': ^5.0.0 + '@aws-sdk/client-bedrock-agent-runtime': ^3.583.0 + '@aws-sdk/client-bedrock-runtime': ^3.422.0 + '@aws-sdk/client-dynamodb': ^3.310.0 + '@aws-sdk/client-kendra': ^3.352.0 + '@aws-sdk/client-lambda': ^3.310.0 + '@aws-sdk/client-s3': ^3.310.0 + '@aws-sdk/client-sagemaker-runtime': ^3.310.0 + '@aws-sdk/client-sfn': ^3.310.0 + '@aws-sdk/credential-provider-node': ^3.388.0 + '@azure/search-documents': ^12.0.0 + '@azure/storage-blob': ^12.15.0 + '@browserbasehq/sdk': '*' + '@browserbasehq/stagehand': ^1.0.0 + '@clickhouse/client': ^0.2.5 + '@cloudflare/ai': '*' + '@datastax/astra-db-ts': ^1.0.0 + '@elastic/elasticsearch': ^8.4.0 + '@getmetal/metal-sdk': '*' + '@getzep/zep-cloud': ^1.0.6 + '@getzep/zep-js': ^0.9.0 + '@gomomento/sdk': ^1.51.1 + '@gomomento/sdk-core': ^1.51.1 + '@google-ai/generativelanguage': '*' + '@google-cloud/storage': ^6.10.1 || ^7.7.0 + '@gradientai/nodejs-sdk': ^1.2.0 + '@huggingface/inference': ^2.6.4 + '@ibm-cloud/watsonx-ai': '*' + '@lancedb/lancedb': ^0.12.0 + '@langchain/core': '>=0.2.21 <0.4.0' + '@layerup/layerup-security': ^1.5.12 + '@libsql/client': ^0.14.0 + '@mendable/firecrawl-js': ^1.4.3 + '@mlc-ai/web-llm': '*' + '@mozilla/readability': '*' + '@neondatabase/serverless': '*' + '@notionhq/client': ^2.2.10 + '@opensearch-project/opensearch': '*' + '@pinecone-database/pinecone': '*' + '@planetscale/database': ^1.8.0 + '@premai/prem-sdk': ^0.3.25 + '@qdrant/js-client-rest': ^1.8.2 + '@raycast/api': ^1.55.2 + '@rockset/client': ^0.9.1 + '@smithy/eventstream-codec': ^2.0.5 + '@smithy/protocol-http': ^3.0.6 + '@smithy/signature-v4': ^2.0.10 + '@smithy/util-utf8': ^2.0.0 + '@spider-cloud/spider-client': ^0.0.21 + '@supabase/supabase-js': ^2.45.0 + '@tensorflow-models/universal-sentence-encoder': '*' + '@tensorflow/tfjs-converter': '*' + '@tensorflow/tfjs-core': '*' + '@upstash/ratelimit': ^1.1.3 || ^2.0.3 + '@upstash/redis': ^1.20.6 + '@upstash/vector': ^1.1.1 + '@vercel/kv': ^0.2.3 + '@vercel/postgres': ^0.5.0 + '@writerai/writer-sdk': ^0.40.2 + '@xata.io/client': ^0.28.0 + '@xenova/transformers': ^2.17.2 + '@zilliz/milvus2-sdk-node': '>=2.3.5' + apify-client: ^2.7.1 + assemblyai: ^4.6.0 + better-sqlite3: '>=9.4.0 <12.0.0' + cassandra-driver: ^4.7.2 + cborg: ^4.1.1 + cheerio: ^1.0.0-rc.12 + chromadb: '*' + closevector-common: 0.1.3 + closevector-node: 0.1.6 + closevector-web: 0.1.6 + cohere-ai: '*' + convex: ^1.3.1 + crypto-js: ^4.2.0 + d3-dsv: ^2.0.0 + discord.js: ^14.14.1 + dria: ^0.0.3 + duck-duck-scrape: ^2.2.5 + epub2: ^3.0.1 + faiss-node: ^0.5.1 + firebase-admin: ^11.9.0 || ^12.0.0 + google-auth-library: '*' + googleapis: '*' + hnswlib-node: ^3.0.0 + html-to-text: ^9.0.5 + ibm-cloud-sdk-core: '*' + ignore: ^5.2.0 + interface-datastore: ^8.2.11 + ioredis: ^5.3.2 + it-all: ^3.0.4 + jsdom: '*' + jsonwebtoken: ^9.0.2 + llmonitor: ^0.5.9 + lodash: ^4.17.21 + lunary: ^0.7.10 + mammoth: ^1.6.0 + mongodb: '>=5.2.0' + mysql2: ^3.9.8 + neo4j-driver: '*' + notion-to-md: ^3.1.0 + officeparser: ^4.0.4 + openai: '*' + pdf-parse: 1.1.1 + pg: ^8.11.0 + pg-copy-streams: ^6.0.5 + pickleparser: ^0.2.1 + playwright: ^1.32.1 + portkey-ai: ^0.1.11 + puppeteer: '*' + pyodide: '>=0.24.1 <0.27.0' + redis: '*' + replicate: ^0.29.4 + sonix-speech-recognition: ^2.1.1 + srt-parser-2: ^1.2.3 + typeorm: ^0.3.20 + typesense: ^1.5.3 + usearch: ^1.1.1 + voy-search: 0.6.2 + weaviate-ts-client: '*' + web-auth-library: ^1.0.3 + ws: ^8.14.2 + youtube-transcript: ^1.0.6 + youtubei.js: ^9.1.0 + peerDependenciesMeta: + '@arcjet/redact': + optional: true + '@aws-crypto/sha256-js': + optional: true + '@aws-sdk/client-bedrock-agent-runtime': + optional: true + '@aws-sdk/client-bedrock-runtime': + optional: true + '@aws-sdk/client-dynamodb': + optional: true + '@aws-sdk/client-kendra': + optional: true + '@aws-sdk/client-lambda': + optional: true + '@aws-sdk/client-s3': + optional: true + '@aws-sdk/client-sagemaker-runtime': + optional: true + '@aws-sdk/client-sfn': + optional: true + '@aws-sdk/credential-provider-node': + optional: true + '@azure/search-documents': + optional: true + '@azure/storage-blob': + optional: true + '@browserbasehq/sdk': + optional: true + '@clickhouse/client': + optional: true + '@cloudflare/ai': + optional: true + '@datastax/astra-db-ts': + optional: true + '@elastic/elasticsearch': + optional: true + '@getmetal/metal-sdk': + optional: true + '@getzep/zep-cloud': + optional: true + '@getzep/zep-js': + optional: true + '@gomomento/sdk': + optional: true + '@gomomento/sdk-core': + optional: true + '@google-ai/generativelanguage': + optional: true + '@google-cloud/storage': + optional: true + '@gradientai/nodejs-sdk': + optional: true + '@huggingface/inference': + optional: true + '@lancedb/lancedb': + optional: true + '@layerup/layerup-security': + optional: true + '@libsql/client': + optional: true + '@mendable/firecrawl-js': + optional: true + '@mlc-ai/web-llm': + optional: true + '@mozilla/readability': + optional: true + '@neondatabase/serverless': + optional: true + '@notionhq/client': + optional: true + '@opensearch-project/opensearch': + optional: true + '@pinecone-database/pinecone': + optional: true + '@planetscale/database': + optional: true + '@premai/prem-sdk': + optional: true + '@qdrant/js-client-rest': + optional: true + '@raycast/api': + optional: true + '@rockset/client': + optional: true + '@smithy/eventstream-codec': + optional: true + '@smithy/protocol-http': + optional: true + '@smithy/signature-v4': + optional: true + '@smithy/util-utf8': + optional: true + '@spider-cloud/spider-client': + optional: true + '@supabase/supabase-js': + optional: true + '@tensorflow-models/universal-sentence-encoder': + optional: true + '@tensorflow/tfjs-converter': + optional: true + '@tensorflow/tfjs-core': + optional: true + '@upstash/ratelimit': + optional: true + '@upstash/redis': + optional: true + '@upstash/vector': + optional: true + '@vercel/kv': + optional: true + '@vercel/postgres': + optional: true + '@writerai/writer-sdk': + optional: true + '@xata.io/client': + optional: true + '@xenova/transformers': + optional: true + '@zilliz/milvus2-sdk-node': + optional: true + apify-client: + optional: true + assemblyai: + optional: true + better-sqlite3: + optional: true + cassandra-driver: + optional: true + cborg: + optional: true + cheerio: + optional: true + chromadb: + optional: true + closevector-common: + optional: true + closevector-node: + optional: true + closevector-web: + optional: true + cohere-ai: + optional: true + convex: + optional: true + crypto-js: + optional: true + d3-dsv: + optional: true + discord.js: + optional: true + dria: + optional: true + duck-duck-scrape: + optional: true + epub2: + optional: true + faiss-node: + optional: true + firebase-admin: + optional: true + google-auth-library: + optional: true + googleapis: + optional: true + hnswlib-node: + optional: true + html-to-text: + optional: true + ignore: + optional: true + interface-datastore: + optional: true + ioredis: + optional: true + it-all: + optional: true + jsdom: + optional: true + jsonwebtoken: + optional: true + llmonitor: + optional: true + lodash: + optional: true + lunary: + optional: true + mammoth: + optional: true + mongodb: + optional: true + mysql2: + optional: true + neo4j-driver: + optional: true + notion-to-md: + optional: true + officeparser: + optional: true + pdf-parse: + optional: true + pg: + optional: true + pg-copy-streams: + optional: true + pickleparser: + optional: true + playwright: + optional: true + portkey-ai: + optional: true + puppeteer: + optional: true + pyodide: + optional: true + redis: + optional: true + replicate: + optional: true + sonix-speech-recognition: + optional: true + srt-parser-2: + optional: true + typeorm: + optional: true + typesense: + optional: true + usearch: + optional: true + voy-search: + optional: true + weaviate-ts-client: + optional: true + web-auth-library: + optional: true + ws: + optional: true + youtube-transcript: + optional: true + youtubei.js: + optional: true + + '@langchain/core@0.3.22': + resolution: {integrity: sha512-9rwEbxJi3Fgs8XuealNYxB6s0FCOnvXLnpiV5/oKgmEJtCRS91IqgJCWA8d59s4YkaEply/EsZVc2azNPK6Wjw==} engines: {node: '>=18'} - '@pkgjs/parseargs@0.11.0': - resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} - engines: {node: '>=14'} + '@langchain/openai@0.3.14': + resolution: {integrity: sha512-lNWjUo1tbvsss45IF7UQtMu1NJ6oUKvhgPYWXnX9f/d6OmuLu7D99HQ3Y88vLcUo9XjjOy417olYHignMduMjA==} + engines: {node: '>=18'} + peerDependencies: + '@langchain/core': '>=0.2.26 <0.4.0' + + '@langchain/textsplitters@0.1.0': + resolution: {integrity: sha512-djI4uw9rlkAb5iMhtLED+xJebDdAG935AdP4eRTB02R7OB/act55Bj9wsskhZsvuyQRpO4O1wQOp85s6T6GWmw==} + engines: {node: '>=18'} + peerDependencies: + '@langchain/core': '>=0.2.21 <0.4.0' + + '@playwright/test@1.49.1': + resolution: {integrity: sha512-Ky+BVzPz8pL6PQxHqNRW1k3mIyv933LML7HktS8uik0bUXNCdPhoS/kLihiO1tMf/egaJb4IutXd7UywvXEW+g==} + engines: {node: '>=18'} + hasBin: true + + '@sec-ant/readable-stream@0.4.1': + resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==} + + '@selderee/plugin-htmlparser2@0.11.0': + resolution: {integrity: sha512-P33hHGdldxGabLFjPPpaTxVolMrzrcegejx+0GxjrIb9Zv48D8yAIA/QTDR2dFl7Uz7urX8aX6+5bCZslr+gWQ==} + + '@sindresorhus/merge-streams@4.0.0': + resolution: {integrity: sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==} + engines: {node: '>=18'} + + '@tokenizer/token@0.3.0': + resolution: {integrity: sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==} + + '@types/body-parser@1.19.5': + resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==} + + '@types/connect@3.4.38': + resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} + + '@types/debug@4.1.12': + resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} + + '@types/express-serve-static-core@5.0.0': + resolution: {integrity: sha512-AbXMTZGt40T+KON9/Fdxx0B2WK5hsgxcfXJLr5bFpZ7b4JCex2WyQPTEKdXqfHiY5nKKBScZ7yCoO6Pvgxfvnw==} + + '@types/express@5.0.0': + resolution: {integrity: sha512-DvZriSMehGHL1ZNLzi6MidnsDhUZM/x2pRdDIKdwbUNqqwHxMlRdkxtn6/EPKyqKpHqTl/4nRZsRNLpZxZRpPQ==} + + '@types/http-errors@2.0.4': + resolution: {integrity: sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==} + + '@types/mime@1.3.5': + resolution: {integrity: sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==} + + '@types/ms@0.7.34': + resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} '@types/node-fetch@2.6.4': resolution: {integrity: sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg==} + '@types/node@10.14.22': + resolution: {integrity: sha512-9taxKC944BqoTVjE+UT3pQH0nHZlTvITwfsOZqyc+R3sfJuxaTtxWjfn1K2UlxyPcKHf0rnaXcVFrS9F9vf0bw==} + '@types/node@18.17.6': resolution: {integrity: sha512-fGmT/P7z7ecA6bv/ia5DlaWCH4YeZvAQMNpUhrJjtAhOhZfoxS1VLUgU2pdk63efSjQaOJWdXMuAJsws+8I6dg==} + '@types/qs@6.9.16': + resolution: {integrity: sha512-7i+zxXdPD0T4cKDuxCUXJ4wHcsJLwENa6Z3dCu8cfCK743OGy5Nu1RmAGqDPsoTDINVEcdXKRvR/zre+P2Ku1A==} + + '@types/range-parser@1.2.7': + resolution: {integrity: sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==} + '@types/retry@0.12.0': resolution: {integrity: sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==} - '@types/uuid@9.0.2': - resolution: {integrity: sha512-kNnC1GFBLuhImSnV7w4njQkUiJi0ZXUycu1rUaouPqiKlXkh77JKgdRnTAp1x5eBwcIwbtI+3otwzuIDEuDoxQ==} + '@types/send@0.17.4': + resolution: {integrity: sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==} + + '@types/serve-static@1.15.7': + resolution: {integrity: sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==} + + '@types/tough-cookie@4.0.5': + resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==} + + '@types/uuid@10.0.0': + resolution: {integrity: sha512-7gqG38EyHgyP1S+7+xomFtL+ZNHcKv6DwNaCZmJmo1vgMugyF3TCnXVg4t1uk89mLNwnLtnY3TpOpCOyp1/xHQ==} abbrev@1.1.1: resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} @@ -119,12 +695,12 @@ packages: asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} + axios@1.7.4: + resolution: {integrity: sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==} + balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - base-64@0.1.0: - resolution: {integrity: sha512-Y5gU45svrR5tI2Vt/X9GPd3L0HNIKzGu202EjxrXMpuc2V2CiKgemAbUUsqYmZJvPtCXoUKjNZwBJzsNScUbXA==} - base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} @@ -132,23 +708,13 @@ packages: resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} engines: {node: '>=8'} - binary-search@1.3.6: - resolution: {integrity: sha512-nbE1WxOTTrUWIfsfZ4aHGYu5DOuNkbxGokjV6Z2kxfJK3uaAb8zNK1muzOeipoLHZjInT4Br88BHpzevc681xA==} - bindings@1.5.0: resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==} - body-parser@1.20.1: - resolution: {integrity: sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==} + body-parser@1.20.3: + resolution: {integrity: sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} - body-parser@1.20.2: - resolution: {integrity: sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==} - engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} - - boolbase@1.0.0: - resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} - brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} @@ -159,20 +725,21 @@ packages: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} engines: {node: '>=8'} + buffer-equal-constant-time@1.0.1: + resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==} + bytes@3.1.2: resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} engines: {node: '>= 0.8'} - call-bind@1.0.2: - resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} + call-bind@1.0.7: + resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} + engines: {node: '>= 0.4'} camelcase@6.3.0: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - charenc@0.0.2: - resolution: {integrity: sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==} - chokidar@3.5.3: resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} engines: {node: '>= 8.10.0'} @@ -184,6 +751,13 @@ packages: color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + color-string@1.9.1: + resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} + + color@4.2.3: + resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==} + engines: {node: '>=12.5.0'} + combined-stream@1.0.8: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} @@ -206,8 +780,8 @@ packages: cookie-signature@1.0.6: resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} - cookie@0.5.0: - resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} + cookie@0.7.1: + resolution: {integrity: sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==} engines: {node: '>= 0.6'} cors@2.8.5: @@ -218,16 +792,6 @@ packages: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} - crypt@0.0.2: - resolution: {integrity: sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==} - - css-select@5.1.0: - resolution: {integrity: sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==} - - css-what@6.1.0: - resolution: {integrity: sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==} - engines: {node: '>= 6'} - debug@2.6.9: resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} peerDependencies: @@ -236,8 +800,9 @@ packages: supports-color: optional: true - debug@3.2.7: - resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} + debug@4.3.7: + resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} + engines: {node: '>=6.0'} peerDependencies: supports-color: '*' peerDependenciesMeta: @@ -248,6 +813,14 @@ packages: resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} engines: {node: '>=0.10.0'} + deepmerge@4.3.1: + resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} + engines: {node: '>=0.10.0'} + + define-data-property@1.1.4: + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} + engines: {node: '>= 0.4'} + delayed-stream@1.0.0: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} @@ -260,8 +833,9 @@ packages: resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} - digest-fetch@1.3.0: - resolution: {integrity: sha512-CGJuv6iKNM7QyZlM2T3sPAdZWd/p9zQiRNS9G+9COUCwzWFTs0Xp8NF5iePx7wtvhDykReiRRrSeNb4oMmB8lA==} + detect-libc@2.0.3: + resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} + engines: {node: '>=8'} dom-serializer@2.0.0: resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==} @@ -276,13 +850,16 @@ packages: domutils@3.1.0: resolution: {integrity: sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==} - dotenv@16.3.1: - resolution: {integrity: sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==} + dotenv@16.4.7: + resolution: {integrity: sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==} engines: {node: '>=12'} eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + ecdsa-sig-formatter@1.0.11: + resolution: {integrity: sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==} + ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} @@ -296,10 +873,22 @@ packages: resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} engines: {node: '>= 0.8'} + encodeurl@2.0.0: + resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==} + engines: {node: '>= 0.8'} + entities@4.5.0: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} + es-define-property@1.0.0: + resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + escape-html@1.0.3: resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} @@ -314,17 +903,28 @@ packages: eventemitter3@4.0.7: resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} - execa@8.0.1: - resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} - engines: {node: '>=16.17'} + execa@9.5.2: + resolution: {integrity: sha512-EHlpxMCpHWSAh1dgS6bVeoLAXGnJNdR93aabr4QCGbzOM73o5XmRfM/e5FUqsw3aagP8S8XEWUWFAxnRBnAF0Q==} + engines: {node: ^18.19.0 || >=20.5.0} expr-eval@2.0.2: resolution: {integrity: sha512-4EMSHGOPSwAfBiibw3ndnP0AvjDWLsMvGOvWEZ2F96IGk0bIVdjQisOHxReSkE13mHcfbuCiXw+G4y0zv6N8Eg==} - express@4.18.2: - resolution: {integrity: sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==} + express@4.21.2: + resolution: {integrity: sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==} engines: {node: '>= 0.10.0'} + extend@3.0.2: + resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} + + figures@6.1.0: + resolution: {integrity: sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==} + engines: {node: '>=18'} + + file-type@16.5.4: + resolution: {integrity: sha512-/yFHK0aGjFEgDJjEKP0pWCplsPFPhwyfwevf/pVxiN0tmE4L9LmwWxWukdJSHdoCli4VgQLehjJtwQBnqmsKcw==} + engines: {node: '>=10'} + file-uri-to-path@1.0.0: resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==} @@ -332,14 +932,23 @@ packages: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} - finalhandler@1.2.0: - resolution: {integrity: sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==} + finalhandler@1.3.1: + resolution: {integrity: sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==} engines: {node: '>= 0.8'} flat@5.0.2: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} hasBin: true + follow-redirects@1.15.9: + resolution: {integrity: sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==} + engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + foreground-child@3.1.1: resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} engines: {node: '>=14'} @@ -351,6 +960,10 @@ packages: resolution: {integrity: sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==} engines: {node: '>= 6'} + form-data@4.0.0: + resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} + engines: {node: '>= 6'} + formdata-node@4.4.1: resolution: {integrity: sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==} engines: {node: '>= 12.20'} @@ -368,29 +981,36 @@ packages: engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] - function-bind@1.1.1: - resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} - get-intrinsic@1.2.1: - resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} + get-intrinsic@1.2.4: + resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} + engines: {node: '>= 0.4'} - get-stream@8.0.1: - resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} - engines: {node: '>=16'} + get-stream@9.0.1: + resolution: {integrity: sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==} + engines: {node: '>=18'} glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} - glob@10.3.10: - resolution: {integrity: sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==} - engines: {node: '>=16 || 14 >=14.17'} + glob@11.0.0: + resolution: {integrity: sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==} + engines: {node: 20 || >=22} hasBin: true + gopd@1.0.1: + resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + has-flag@3.0.0: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} + has-property-descriptors@1.0.2: + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + has-proto@1.0.1: resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} engines: {node: '>= 0.4'} @@ -399,32 +1019,42 @@ packages: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} - has@1.0.3: - resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} - engines: {node: '>= 0.4.0'} + hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} - he@1.2.0: - resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} - hasBin: true + hnswlib-node@3.0.0: + resolution: {integrity: sha512-fypn21qvVORassppC8/qNfZ5KAOspZpm/IbUkAtlqvbtDNnF5VVk5RWF7O5V6qwr7z+T3s1ePej6wQt5wRQ4Cg==} + + html-to-text@9.0.5: + resolution: {integrity: sha512-qY60FjREgVZL03vJU6IfMV4GDjGBIoOyvuFdpBDIX9yTlDw0TjxVBQp+P8NvpdIXNJvfWBTNul7fsAQJq2FNpg==} + engines: {node: '>=14'} - hnswlib-node@1.4.2: - resolution: {integrity: sha512-76PIzOaNcX8kOpKwlFPl07uelpctqDMzbiC+Qsk2JWNVkzeU/6iXRk4tfE9z3DoK1RCBrOaFXmQ6RFb1BVF9LA==} + htmlparser2@8.0.2: + resolution: {integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==} http-errors@2.0.0: resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} engines: {node: '>= 0.8'} - human-signals@5.0.0: - resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} - engines: {node: '>=16.17.0'} + human-signals@8.0.0: + resolution: {integrity: sha512-/1/GPCpDUCCYwlERiYjxoczfP0zfvZMU/OWgQPMya9AbAE24vseigFdhAMObpc8Q4lc/kjutPfUddDYyAmejnA==} + engines: {node: '>=18.18.0'} humanize-ms@1.2.1: resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==} + ibm-cloud-sdk-core@5.1.0: + resolution: {integrity: sha512-KJCbPz3tiXB1NGAD7cL4JtwpWV8yd/C7jsaHsxvedMo2ZblNG8emMyvSpGhiKAQVZmi3c0ujz6eJdy22NHuUWQ==} + engines: {node: '>=18'} + iconv-lite@0.4.24: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} + ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + ignore-by-default@1.0.1: resolution: {integrity: sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==} @@ -435,394 +1065,160 @@ packages: resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} engines: {node: '>= 0.10'} - is-any-array@2.0.1: - resolution: {integrity: sha512-UtilS7hLRu++wb/WBAw9bNuP1Eg04Ivn1vERJck8zJthEvXCBEBpGR/33u/xLKWEQf95803oalHrVDptcAvFdQ==} - - is-binary-path@2.1.0: - resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} - engines: {node: '>=8'} - - is-buffer@1.1.6: - resolution: {integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==} - - is-extglob@2.1.1: - resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} - engines: {node: '>=0.10.0'} - - is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} - - is-glob@4.0.3: - resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} - engines: {node: '>=0.10.0'} - - is-number@7.0.0: - resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} - engines: {node: '>=0.12.0'} - - is-stream@3.0.0: - resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - - isexe@2.0.0: - resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - - jackspeak@2.3.6: - resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==} - engines: {node: '>=14'} - - js-tiktoken@1.0.7: - resolution: {integrity: sha512-biba8u/clw7iesNEWLOLwrNGoBP2lA+hTaBLs/D45pJdUPFXyxD6nhcDVtADChghv4GgyAiMKYMiRx7x6h7Biw==} - - js-yaml@4.1.0: - resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} - hasBin: true - - jsonpointer@5.0.1: - resolution: {integrity: sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==} - engines: {node: '>=0.10.0'} - - langchain@0.0.199: - resolution: {integrity: sha512-EgNhlFUU0FNRWdydQVJUwaYxbsFBLUcbZXxLu1GjVWmfzMNI+rqHDeE9o5VWEPt99oNshhRzacYO26GieoJj0Q==} - engines: {node: '>=18'} - peerDependencies: - '@aws-crypto/sha256-js': ^5.0.0 - '@aws-sdk/client-bedrock-runtime': ^3.422.0 - '@aws-sdk/client-dynamodb': ^3.310.0 - '@aws-sdk/client-kendra': ^3.352.0 - '@aws-sdk/client-lambda': ^3.310.0 - '@aws-sdk/client-s3': ^3.310.0 - '@aws-sdk/client-sagemaker-runtime': ^3.310.0 - '@aws-sdk/client-sfn': ^3.310.0 - '@aws-sdk/credential-provider-node': ^3.388.0 - '@azure/storage-blob': ^12.15.0 - '@clickhouse/client': ^0.2.5 - '@cloudflare/ai': ^1.0.12 - '@elastic/elasticsearch': ^8.4.0 - '@getmetal/metal-sdk': '*' - '@getzep/zep-js': ^0.9.0 - '@gomomento/sdk': ^1.51.1 - '@gomomento/sdk-core': ^1.51.1 - '@gomomento/sdk-web': ^1.51.1 - '@google-ai/generativelanguage': ^0.2.1 - '@google-cloud/storage': ^6.10.1 - '@gradientai/nodejs-sdk': ^1.2.0 - '@huggingface/inference': ^2.6.4 - '@mozilla/readability': '*' - '@notionhq/client': ^2.2.10 - '@opensearch-project/opensearch': '*' - '@pinecone-database/pinecone': ^1.1.0 - '@planetscale/database': ^1.8.0 - '@qdrant/js-client-rest': ^1.2.0 - '@raycast/api': ^1.55.2 - '@rockset/client': ^0.9.1 - '@smithy/eventstream-codec': ^2.0.5 - '@smithy/protocol-http': ^3.0.6 - '@smithy/signature-v4': ^2.0.10 - '@smithy/util-utf8': ^2.0.0 - '@supabase/postgrest-js': ^1.1.1 - '@supabase/supabase-js': ^2.10.0 - '@tensorflow-models/universal-sentence-encoder': '*' - '@tensorflow/tfjs-converter': '*' - '@tensorflow/tfjs-core': '*' - '@upstash/redis': ^1.20.6 - '@vercel/kv': ^0.2.3 - '@vercel/postgres': ^0.5.0 - '@writerai/writer-sdk': ^0.40.2 - '@xata.io/client': ^0.25.1 - '@xenova/transformers': ^2.5.4 - '@zilliz/milvus2-sdk-node': '>=2.2.7' - apify-client: ^2.7.1 - assemblyai: ^2.0.2 - axios: '*' - cassandra-driver: ^4.7.2 - cheerio: ^1.0.0-rc.12 - chromadb: '*' - closevector-common: 0.1.0-alpha.1 - closevector-node: 0.1.0-alpha.10 - closevector-web: 0.1.0-alpha.16 - cohere-ai: '>=6.0.0' - convex: ^1.3.1 - d3-dsv: ^2.0.0 - epub2: ^3.0.1 - faiss-node: ^0.5.1 - fast-xml-parser: ^4.2.7 - firebase-admin: ^11.9.0 - google-auth-library: ^8.9.0 - googleapis: ^126.0.1 - hnswlib-node: ^1.4.2 - html-to-text: ^9.0.5 - ignore: ^5.2.0 - ioredis: ^5.3.2 - jsdom: '*' - llmonitor: ^0.5.9 - lodash: ^4.17.21 - mammoth: '*' - mongodb: ^5.2.0 - mysql2: ^3.3.3 - neo4j-driver: '*' - node-llama-cpp: '*' - notion-to-md: ^3.1.0 - officeparser: ^4.0.4 - pdf-parse: 1.1.1 - peggy: ^3.0.2 - pg: ^8.11.0 - pg-copy-streams: ^6.0.5 - pickleparser: ^0.2.1 - playwright: ^1.32.1 - portkey-ai: ^0.1.11 - puppeteer: ^19.7.2 - pyodide: ^0.24.1 - redis: ^4.6.4 - replicate: ^0.18.0 - sonix-speech-recognition: ^2.1.1 - srt-parser-2: ^1.2.2 - typeorm: ^0.3.12 - typesense: ^1.5.3 - usearch: ^1.1.1 - vectordb: ^0.1.4 - voy-search: 0.6.2 - weaviate-ts-client: ^1.4.0 - web-auth-library: ^1.0.3 - ws: ^8.14.2 - youtube-transcript: ^1.0.6 - youtubei.js: ^5.8.0 - peerDependenciesMeta: - '@aws-crypto/sha256-js': - optional: true - '@aws-sdk/client-bedrock-runtime': - optional: true - '@aws-sdk/client-dynamodb': - optional: true - '@aws-sdk/client-kendra': - optional: true - '@aws-sdk/client-lambda': - optional: true - '@aws-sdk/client-s3': - optional: true - '@aws-sdk/client-sagemaker-runtime': - optional: true - '@aws-sdk/client-sfn': - optional: true - '@aws-sdk/credential-provider-node': - optional: true - '@azure/storage-blob': - optional: true - '@clickhouse/client': - optional: true - '@cloudflare/ai': - optional: true - '@elastic/elasticsearch': - optional: true - '@getmetal/metal-sdk': - optional: true - '@getzep/zep-js': - optional: true - '@gomomento/sdk': - optional: true - '@gomomento/sdk-core': - optional: true - '@gomomento/sdk-web': - optional: true - '@google-ai/generativelanguage': - optional: true - '@google-cloud/storage': - optional: true - '@gradientai/nodejs-sdk': - optional: true - '@huggingface/inference': - optional: true - '@mozilla/readability': - optional: true - '@notionhq/client': - optional: true - '@opensearch-project/opensearch': - optional: true - '@pinecone-database/pinecone': - optional: true - '@planetscale/database': - optional: true - '@qdrant/js-client-rest': - optional: true - '@raycast/api': - optional: true - '@rockset/client': - optional: true - '@smithy/eventstream-codec': - optional: true - '@smithy/protocol-http': - optional: true - '@smithy/signature-v4': - optional: true - '@smithy/util-utf8': - optional: true - '@supabase/postgrest-js': - optional: true - '@supabase/supabase-js': - optional: true - '@tensorflow-models/universal-sentence-encoder': - optional: true - '@tensorflow/tfjs-converter': - optional: true - '@tensorflow/tfjs-core': - optional: true - '@upstash/redis': - optional: true - '@vercel/kv': - optional: true - '@vercel/postgres': - optional: true - '@writerai/writer-sdk': - optional: true - '@xata.io/client': - optional: true - '@xenova/transformers': - optional: true - '@zilliz/milvus2-sdk-node': - optional: true - apify-client: - optional: true - assemblyai: - optional: true - axios: - optional: true - cassandra-driver: - optional: true - cheerio: - optional: true - chromadb: - optional: true - closevector-common: - optional: true - closevector-node: - optional: true - closevector-web: - optional: true - cohere-ai: - optional: true - convex: - optional: true - d3-dsv: - optional: true - epub2: - optional: true - faiss-node: - optional: true - fast-xml-parser: - optional: true - firebase-admin: - optional: true - google-auth-library: - optional: true - googleapis: - optional: true - hnswlib-node: - optional: true - html-to-text: - optional: true - ignore: - optional: true - ioredis: - optional: true - jsdom: + is-arrayish@0.3.2: + resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} + + is-binary-path@2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + + is-plain-obj@4.1.0: + resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} + engines: {node: '>=12'} + + is-stream@4.0.1: + resolution: {integrity: sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==} + engines: {node: '>=18'} + + is-unicode-supported@2.1.0: + resolution: {integrity: sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==} + engines: {node: '>=18'} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + isstream@0.1.2: + resolution: {integrity: sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==} + + jackspeak@4.0.2: + resolution: {integrity: sha512-bZsjR/iRjl1Nk1UkjGpAzLNfQtzuijhn2g+pbZb98HQ1Gk8vM9hfbxeMBP+M2/UUdwj0RqGG3mlvk2MsAqwvEw==} + engines: {node: 20 || >=22} + + js-tiktoken@1.0.15: + resolution: {integrity: sha512-65ruOWWXDEZHHbAo7EjOcNxOGasQKbL4Fq3jEr2xsCqSsoOo6VVSqzWQb6PRIqypFSDcma4jO90YP0w5X8qVXQ==} + + js-yaml@4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + hasBin: true + + jsonpointer@5.0.1: + resolution: {integrity: sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==} + engines: {node: '>=0.10.0'} + + jsonwebtoken@9.0.2: + resolution: {integrity: sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==} + engines: {node: '>=12', npm: '>=6'} + + jwa@1.4.1: + resolution: {integrity: sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==} + + jws@3.2.2: + resolution: {integrity: sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==} + + langchain@0.3.6: + resolution: {integrity: sha512-erZOIKXzwCOrQHqY9AyjkQmaX62zUap1Sigw1KrwMUOnVoLKkVNRmAyxFlNZDZ9jLs/58MaQcaT9ReJtbj3x6w==} + engines: {node: '>=18'} + peerDependencies: + '@langchain/anthropic': '*' + '@langchain/aws': '*' + '@langchain/cohere': '*' + '@langchain/core': '>=0.2.21 <0.4.0' + '@langchain/google-genai': '*' + '@langchain/google-vertexai': '*' + '@langchain/groq': '*' + '@langchain/mistralai': '*' + '@langchain/ollama': '*' + axios: '*' + cheerio: '*' + handlebars: ^4.7.8 + peggy: ^3.0.2 + typeorm: '*' + peerDependenciesMeta: + '@langchain/anthropic': optional: true - llmonitor: + '@langchain/aws': optional: true - lodash: + '@langchain/cohere': optional: true - mammoth: + '@langchain/google-genai': optional: true - mongodb: + '@langchain/google-vertexai': optional: true - mysql2: + '@langchain/groq': optional: true - neo4j-driver: + '@langchain/mistralai': optional: true - node-llama-cpp: + '@langchain/ollama': optional: true - notion-to-md: + axios: optional: true - officeparser: + cheerio: optional: true - pdf-parse: + handlebars: optional: true peggy: optional: true - pg: - optional: true - pg-copy-streams: - optional: true - pickleparser: - optional: true - playwright: - optional: true - portkey-ai: - optional: true - puppeteer: - optional: true - pyodide: - optional: true - redis: - optional: true - replicate: - optional: true - sonix-speech-recognition: - optional: true - srt-parser-2: - optional: true typeorm: optional: true - typesense: - optional: true - usearch: - optional: true - vectordb: - optional: true - voy-search: - optional: true - weaviate-ts-client: - optional: true - web-auth-library: - optional: true - ws: - optional: true - youtube-transcript: - optional: true - youtubei.js: + + langsmith@0.2.11: + resolution: {integrity: sha512-rVPUN/jQEHjTuYaoVKGjfb3NsYNLGTQT9LXcgJvka5M0EDcXciC598A+DsAQrl6McdfSJCFJDelgRPqVoF2xNA==} + peerDependencies: + openai: '*' + peerDependenciesMeta: + openai: optional: true - langchainhub@0.0.6: - resolution: {integrity: sha512-SW6105T+YP1cTe0yMf//7kyshCgvCTyFBMTgH2H3s9rTAR4e+78DA/BBrUL/Mt4Q5eMWui7iGuAYb3pgGsdQ9w==} + leac@0.6.0: + resolution: {integrity: sha512-y+SqErxb8h7nE/fiEX07jsbuhrpO9lL8eca7/Y1nuWV2moNlXhyd59iDGcRf6moVyDMbmTNzL40SUyrFU/yDpg==} - langsmith@0.0.48: - resolution: {integrity: sha512-s0hW8iZ90Q9XLTnDK0Pgee245URV3b1cXQjPDj5OKm1+KN7iSK1pKx+4CO7RcFLz58Ixe7Mt+mVcomYqUuryxQ==} - hasBin: true + lodash.includes@4.3.0: + resolution: {integrity: sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==} - langsmith@0.0.49: - resolution: {integrity: sha512-TC2RkjDizxtubClLNjLkB0m53NHtom9LHIhbdRYJ5O6gqUpcXkN/pefb8w734lBp9VYfnYBk/JJ8AiCq+ooeDQ==} - hasBin: true + lodash.isboolean@3.0.3: + resolution: {integrity: sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==} - lru-cache@10.0.0: - resolution: {integrity: sha512-svTf/fzsKHffP42sujkO/Rjs37BCIsQVRCeNYIm9WN8rgT7ffoUnRtZCqU+6BqcSBdv8gwJeTz8knJpgACeQMw==} - engines: {node: 14 || >=16.14} + lodash.isinteger@4.0.4: + resolution: {integrity: sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==} - lru-cache@6.0.0: - resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} - engines: {node: '>=10'} + lodash.isnumber@3.0.3: + resolution: {integrity: sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==} - md5@2.3.0: - resolution: {integrity: sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==} + lodash.isplainobject@4.0.6: + resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==} + + lodash.isstring@4.0.1: + resolution: {integrity: sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==} + + lodash.once@4.1.1: + resolution: {integrity: sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==} + + lru-cache@11.0.1: + resolution: {integrity: sha512-CgeuL5uom6j/ZVrg7G/+1IXqRY8JXX4Hghfy5YE0EhoYQWvndP1kufu58cmZLNIDKnRhZrXfdS9urVWx98AipQ==} + engines: {node: 20 || >=22} media-typer@0.3.0: resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} - merge-descriptors@1.0.1: - resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==} - - merge-stream@2.0.0: - resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + merge-descriptors@1.0.3: + resolution: {integrity: sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==} methods@1.1.2: resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==} @@ -841,48 +1237,34 @@ packages: engines: {node: '>=4'} hasBin: true - mimic-fn@4.0.0: - resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} - engines: {node: '>=12'} + minimatch@10.0.1: + resolution: {integrity: sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==} + engines: {node: 20 || >=22} minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} - minimatch@9.0.3: - resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} - engines: {node: '>=16 || 14 >=14.17'} - - minipass@6.0.2: - resolution: {integrity: sha512-MzWSV5nYVT7mVyWCwn2o7JH13w2TBRmmSqSRCKzTw+lmft9X4z+3wjvs06Tzijo5z4W/kahUCDpRXTF+ZrmF/w==} + minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} - ml-array-mean@1.1.6: - resolution: {integrity: sha512-MIdf7Zc8HznwIisyiJGRH9tRigg3Yf4FldW8DxKxpCCv/g5CafTw0RRu51nojVEOXuCQC7DRVVu5c7XXO/5joQ==} - - ml-array-sum@1.1.6: - resolution: {integrity: sha512-29mAh2GwH7ZmiRnup4UyibQZB9+ZLyMShvt4cH4eTK+cL2oEMIZFnSyB3SS8MlsTh6q/w/yh48KmqLxmovN4Dw==} - - ml-distance-euclidean@2.0.0: - resolution: {integrity: sha512-yC9/2o8QF0A3m/0IXqCTXCzz2pNEzvmcE/9HFKOZGnTjatvBbsn4lWYJkxENkA4Ug2fnYl7PXQxnPi21sgMy/Q==} - - ml-distance@4.0.1: - resolution: {integrity: sha512-feZ5ziXs01zhyFUUUeZV5hwc0f5JW0Sh0ckU1koZe/wdVkJdGxcP06KNQuF0WBTj8FttQUzcvQcpcrOp/XrlEw==} - - ml-tree-similarity@1.0.0: - resolution: {integrity: sha512-XJUyYqjSuUQkNQHMscr6tcjldsOoAekxADTplt40QKfwW6nd++1wHWV9AArl0Zvw/TIHgNaZZNvr8QGvE8wLRg==} - ms@2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + mustache@4.2.0: + resolution: {integrity: sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==} + hasBin: true + negotiator@0.6.3: resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} engines: {node: '>= 0.6'} - node-addon-api@6.1.0: - resolution: {integrity: sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==} + node-addon-api@8.2.1: + resolution: {integrity: sha512-vmEOvxwiH8tlOcv4SyE8RH34rI5/nWVaigUeAUPawC6f0+HoDthwI0vkMu4tbtsZrXq6QXFfrkhjofzKEs5tpA==} + engines: {node: ^18 || ^20 || >= 21} node-domexception@1.0.0: resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} @@ -897,15 +1279,8 @@ packages: encoding: optional: true - node-html-markdown@1.3.0: - resolution: {integrity: sha512-OeFi3QwC/cPjvVKZ114tzzu+YoR+v9UXW5RwSXGUqGb0qCl0DvP406tzdL7SFn8pZrMyzXoisfG2zcuF9+zw4g==} - engines: {node: '>=10.0.0'} - - node-html-parser@6.1.11: - resolution: {integrity: sha512-FAgwwZ6h0DSDWxfD0Iq1tsDcBCxdJB1nXpLPPxX8YyVWzbfCjKWEzaynF4gZZ/8hziUmp7ZSaKylcn0iKhufUQ==} - - nodemon@3.0.1: - resolution: {integrity: sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw==} + nodemon@3.1.7: + resolution: {integrity: sha512-hLj7fuMow6f0lbB0cD14Lz2xNjwsyruH251Pk4t/yIitCFJbmY1myuLlHm/q06aST4jg6EgAh74PIBBrRqpVAQ==} engines: {node: '>=10'} hasBin: true @@ -917,35 +1292,30 @@ packages: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} - npm-run-path@5.1.0: - resolution: {integrity: sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - - nth-check@2.1.1: - resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} - - num-sort@2.1.0: - resolution: {integrity: sha512-1MQz1Ed8z2yckoBeSfkQHHO9K1yDRxxtotKSJ9yvcTUUxSvfvzEq5GwBrjjHEpMlq/k5gvXdmJ1SbYxWtpNoVg==} - engines: {node: '>=8'} + npm-run-path@6.0.0: + resolution: {integrity: sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA==} + engines: {node: '>=18'} object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} - object-inspect@1.12.3: - resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} + object-inspect@1.13.2: + resolution: {integrity: sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==} + engines: {node: '>= 0.4'} on-finished@2.4.1: resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} engines: {node: '>= 0.8'} - onetime@6.0.0: - resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} - engines: {node: '>=12'} - - openai@4.20.1: - resolution: {integrity: sha512-Dd3q8EvINfganZFtg6V36HjrMaihqRgIcKiHua4Nq9aw/PxOP48dhbsk8x5klrxajt5Lpnc1KTOG5i1S6BKAJA==} + openai@4.76.1: + resolution: {integrity: sha512-ci63/WFEMd6QjjEVeH0pV7hnFS6CCqhgJydSti4Aak/8uo2SpgzKjteUDaY+OkwziVj11mi6j+0mRUIiGKUzWw==} hasBin: true + peerDependencies: + zod: ^3.23.8 + peerDependenciesMeta: + zod: + optional: true openapi-types@12.1.3: resolution: {integrity: sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==} @@ -966,6 +1336,16 @@ packages: resolution: {integrity: sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==} engines: {node: '>=8'} + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + + parse-ms@4.0.0: + resolution: {integrity: sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==} + engines: {node: '>=18'} + + parseley@0.12.1: + resolution: {integrity: sha512-e6qHKe3a9HWr0oMRVDTRhKce+bRO8VGQR3NyVwcjwrbhMmFCX9KszEV35+rn4AdilFAq9VPxP/Fe1wC9Qjd2lw==} + parseurl@1.3.3: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} engines: {node: '>= 0.8'} @@ -978,12 +1358,19 @@ packages: resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} engines: {node: '>=12'} - path-scurry@1.10.1: - resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} - engines: {node: '>=16 || 14 >=14.17'} + path-scurry@2.0.0: + resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==} + engines: {node: 20 || >=22} + + path-to-regexp@0.1.12: + resolution: {integrity: sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==} - path-to-regexp@0.1.7: - resolution: {integrity: sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==} + peberminta@0.9.0: + resolution: {integrity: sha512-XIxfHpEuSJbITd1H3EeQwpcZbTLHc+VVr8ANI9t5sit565tsI4/xK3KWTUFE2e6QiangUkh3B0jihzmGnNrRsQ==} + + peek-readable@4.1.0: + resolution: {integrity: sha512-ZI3LnwUv5nOGbQzD9c2iDG6toheuXSZP5esSHBjopsXH4dg19soufvpUGA3uohi5anFtGb2lhAVdHzH6R/Evvg==} + engines: {node: '>=8'} peggy@3.0.2: resolution: {integrity: sha512-n7chtCbEoGYRwZZ0i/O3t1cPr6o+d9Xx4Zwy2LYfzv0vjchMBU0tO+qYYyvZloBPcgRgzYvALzGWHe609JjEpg==} @@ -994,33 +1381,73 @@ packages: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} + playwright-core@1.49.1: + resolution: {integrity: sha512-BzmpVcs4kE2CH15rWfzpjzVGhWERJfmnXmniSyKeRZUs9Ws65m+RGIi7mjJK/euCegfn3i7jvqWeWyHe9y3Vgg==} + engines: {node: '>=18'} + hasBin: true + + playwright@1.49.1: + resolution: {integrity: sha512-VYL8zLoNTBxVOrJBbDuRgDWa3i+mfQgDTrL8Ah9QXZ7ax4Dsj0MSq5bYgytRnDVVe+njoKnfsYkH3HzqVj5UZA==} + engines: {node: '>=18'} + hasBin: true + + pretty-ms@9.1.0: + resolution: {integrity: sha512-o1piW0n3tgKIKCwk2vpM/vOV13zjJzvP37Ioze54YlTHE06m4tjEbzg9WsKkvTuyYln2DHjo5pY4qrZGI0otpw==} + engines: {node: '>=18'} + proxy-addr@2.0.7: resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} engines: {node: '>= 0.10'} + proxy-from-env@1.1.0: + resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + + psl@1.15.0: + resolution: {integrity: sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==} + pstree.remy@1.1.8: resolution: {integrity: sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==} - qs@6.11.0: - resolution: {integrity: sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==} + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + + qs@6.13.0: + resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==} engines: {node: '>=0.6'} + querystringify@2.2.0: + resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} + range-parser@1.2.1: resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} engines: {node: '>= 0.6'} - raw-body@2.5.1: - resolution: {integrity: sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==} - engines: {node: '>= 0.8'} - raw-body@2.5.2: resolution: {integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==} engines: {node: '>= 0.8'} + readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + + readable-web-to-node-stream@3.0.2: + resolution: {integrity: sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==} + engines: {node: '>=8'} + readdirp@3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} + requires-port@1.0.0: + resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} + + retry-axios@2.6.0: + resolution: {integrity: sha512-pOLi+Gdll3JekwuFjXO3fTq+L9lzMQGcSq7M5gIjExcl3Gu1hd4XXuf5o3+LuSBsaULQH7DiNbsqPd1chVpQGQ==} + engines: {node: '>=10.7.0'} + peerDependencies: + axios: '*' + retry@0.13.1: resolution: {integrity: sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==} engines: {node: '>= 4'} @@ -1031,22 +1458,33 @@ packages: safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - semver@7.5.4: - resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} + selderee@0.11.0: + resolution: {integrity: sha512-5TF+l7p4+OsnP8BCCvSyZiSPc4x4//p5uPwK8TCnVPJYRmU2aYKMpOXvw8zM5a5JvuuCGN1jmsMwuU2W02ukfA==} + + semver@7.6.3: + resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} engines: {node: '>=10'} hasBin: true - send@0.18.0: - resolution: {integrity: sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==} + send@0.19.0: + resolution: {integrity: sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==} engines: {node: '>= 0.8.0'} - serve-static@1.15.0: - resolution: {integrity: sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==} + serve-static@1.16.2: + resolution: {integrity: sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==} engines: {node: '>= 0.8.0'} + set-function-length@1.2.2: + resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} + engines: {node: '>= 0.4'} + setprototypeof@1.2.0: resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} + sharp@0.33.5: + resolution: {integrity: sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -1055,13 +1493,17 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} - side-channel@1.0.4: - resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} + side-channel@1.0.6: + resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} + engines: {node: '>= 0.4'} signal-exit@4.1.0: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} + simple-swizzle@0.2.2: + resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} + simple-update-notifier@2.0.0: resolution: {integrity: sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==} engines: {node: '>=10'} @@ -1082,6 +1524,9 @@ packages: resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} engines: {node: '>=12'} + string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} @@ -1090,9 +1535,13 @@ packages: resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} engines: {node: '>=12'} - strip-final-newline@3.0.0: - resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} - engines: {node: '>=12'} + strip-final-newline@4.0.0: + resolution: {integrity: sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw==} + engines: {node: '>=18'} + + strtok3@6.3.0: + resolution: {integrity: sha512-fZtbhtvI9I48xDSywd/somNqgUHl2L2cstmXCCif0itOf96jeW18MBSyrLuNicYQVkvpOxkZtkzujiTJ9LW5Jw==} + engines: {node: '>=10'} supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} @@ -1106,13 +1555,24 @@ packages: resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} engines: {node: '>=0.6'} + token-types@4.2.1: + resolution: {integrity: sha512-6udB24Q737UD/SDsKAHI9FCRP7Bqc9D/MQUV02ORQg5iskjtLJlZJNdN4kKtcdtwCeWIwIHDGaUsTsCCAa8sFQ==} + engines: {node: '>=10'} + touch@3.1.0: resolution: {integrity: sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==} hasBin: true + tough-cookie@4.1.4: + resolution: {integrity: sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==} + engines: {node: '>=6'} + tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + type-is@1.6.18: resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} engines: {node: '>= 0.6'} @@ -1120,26 +1580,36 @@ packages: undefsafe@2.0.5: resolution: {integrity: sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==} + unicorn-magic@0.3.0: + resolution: {integrity: sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==} + engines: {node: '>=18'} + + universalify@0.2.0: + resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} + engines: {node: '>= 4.0.0'} + unpipe@1.0.0: resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} engines: {node: '>= 0.8'} + url-parse@1.5.10: + resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} + + util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + utils-merge@1.0.1: resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} engines: {node: '>= 0.4.0'} - uuid@9.0.0: - resolution: {integrity: sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==} + uuid@10.0.0: + resolution: {integrity: sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==} hasBin: true vary@1.1.2: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} - web-streams-polyfill@3.2.1: - resolution: {integrity: sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==} - engines: {node: '>= 8'} - web-streams-polyfill@4.0.0-beta.3: resolution: {integrity: sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==} engines: {node: '>= 14'} @@ -1163,37 +1633,155 @@ packages: resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} engines: {node: '>=12'} - yallist@4.0.0: - resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - yaml@2.3.1: resolution: {integrity: sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==} engines: {node: '>= 14'} - zod-to-json-schema@3.20.3: - resolution: {integrity: sha512-/Q3wnyxAfCt94ZcrGiXXoiAfRqasxl9CX64LZ9fj+4dKH68zulUtU0uk1WMxQPfAxQ0ZI70dKzcoW7hHj+DwSQ==} + yoctocolors@2.1.1: + resolution: {integrity: sha512-GQHQqAopRhwU8Kt1DDM8NjibDXHC8eoh1erhGAJPEyveY9qqVeXvVikNKrDz69sHowPMorbPUrH/mx8c50eiBQ==} + engines: {node: '>=18'} + + zod-to-json-schema@3.23.3: + resolution: {integrity: sha512-TYWChTxKQbRJp5ST22o/Irt9KC5nj7CdBKYB/AosCRdj/wxEMvv4NNaj9XVUHDOIp53ZxArGhnw5HMZziPFjog==} + peerDependencies: + zod: ^3.23.3 + + zod-to-json-schema@3.23.5: + resolution: {integrity: sha512-5wlSS0bXfF/BrL4jPAbz9da5hDlDptdEppYfe+x4eIJ7jioqKG9uUxOwPzqof09u/XeVdrgFu29lZi+8XNDJtA==} peerDependencies: - zod: ^3.20.0 + zod: ^3.23.3 - zod@3.22.4: - resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} + zod@3.23.8: + resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==} snapshots: - '@anthropic-ai/sdk@0.9.1': + '@anthropic-ai/sdk@0.27.3': + dependencies: + '@types/node': 18.17.6 + '@types/node-fetch': 2.6.4 + abort-controller: 3.0.0 + agentkeepalive: 4.5.0 + form-data-encoder: 1.7.2 + formdata-node: 4.4.1 + node-fetch: 2.6.12 + transitivePeerDependencies: + - encoding + + '@browserbasehq/sdk@2.0.0': dependencies: '@types/node': 18.17.6 '@types/node-fetch': 2.6.4 abort-controller: 3.0.0 agentkeepalive: 4.5.0 - digest-fetch: 1.3.0 form-data-encoder: 1.7.2 formdata-node: 4.4.1 node-fetch: 2.6.12 - web-streams-polyfill: 3.2.1 transitivePeerDependencies: - encoding + '@browserbasehq/stagehand@1.6.0(@playwright/test@1.49.1)(deepmerge@4.3.1)(dotenv@16.4.7)(openai@4.76.1(zod@3.23.8))(zod@3.23.8)': + dependencies: + '@anthropic-ai/sdk': 0.27.3 + '@browserbasehq/sdk': 2.0.0 + '@playwright/test': 1.49.1 + deepmerge: 4.3.1 + dotenv: 16.4.7 + openai: 4.76.1(zod@3.23.8) + sharp: 0.33.5 + zod: 3.23.8 + zod-to-json-schema: 3.23.5(zod@3.23.8) + transitivePeerDependencies: + - encoding + + '@emnapi/runtime@1.3.1': + dependencies: + tslib: 2.8.1 + optional: true + + '@ibm-cloud/watsonx-ai@1.3.0': + dependencies: + '@types/node': 18.17.6 + extend: 3.0.2 + ibm-cloud-sdk-core: 5.1.0 + transitivePeerDependencies: + - supports-color + + '@img/sharp-darwin-arm64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-darwin-arm64': 1.0.4 + optional: true + + '@img/sharp-darwin-x64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-darwin-x64': 1.0.4 + optional: true + + '@img/sharp-libvips-darwin-arm64@1.0.4': + optional: true + + '@img/sharp-libvips-darwin-x64@1.0.4': + optional: true + + '@img/sharp-libvips-linux-arm64@1.0.4': + optional: true + + '@img/sharp-libvips-linux-arm@1.0.5': + optional: true + + '@img/sharp-libvips-linux-s390x@1.0.4': + optional: true + + '@img/sharp-libvips-linux-x64@1.0.4': + optional: true + + '@img/sharp-libvips-linuxmusl-arm64@1.0.4': + optional: true + + '@img/sharp-libvips-linuxmusl-x64@1.0.4': + optional: true + + '@img/sharp-linux-arm64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linux-arm64': 1.0.4 + optional: true + + '@img/sharp-linux-arm@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linux-arm': 1.0.5 + optional: true + + '@img/sharp-linux-s390x@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linux-s390x': 1.0.4 + optional: true + + '@img/sharp-linux-x64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linux-x64': 1.0.4 + optional: true + + '@img/sharp-linuxmusl-arm64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linuxmusl-arm64': 1.0.4 + optional: true + + '@img/sharp-linuxmusl-x64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linuxmusl-x64': 1.0.4 + optional: true + + '@img/sharp-wasm32@0.33.5': + dependencies: + '@emnapi/runtime': 1.3.1 + optional: true + + '@img/sharp-win32-ia32@0.33.5': + optional: true + + '@img/sharp-win32-x64@0.33.5': + optional: true + '@isaacs/cliui@8.0.2': dependencies: string-width: 5.1.2 @@ -1203,31 +1791,151 @@ snapshots: wrap-ansi: 8.1.0 wrap-ansi-cjs: wrap-ansi@7.0.0 - '@langchain/core@0.0.3': + '@langchain/community@0.3.17(@browserbasehq/sdk@2.0.0)(@browserbasehq/stagehand@1.6.0(@playwright/test@1.49.1)(deepmerge@4.3.1)(dotenv@16.4.7)(openai@4.76.1(zod@3.23.8))(zod@3.23.8))(@ibm-cloud/watsonx-ai@1.3.0)(@langchain/core@0.3.22(openai@4.76.1(zod@3.23.8)))(axios@1.7.4)(hnswlib-node@3.0.0)(html-to-text@9.0.5)(ibm-cloud-sdk-core@5.1.0)(jsonwebtoken@9.0.2)(openai@4.76.1(zod@3.23.8))(peggy@3.0.2)(playwright@1.49.1)': + dependencies: + '@browserbasehq/stagehand': 1.6.0(@playwright/test@1.49.1)(deepmerge@4.3.1)(dotenv@16.4.7)(openai@4.76.1(zod@3.23.8))(zod@3.23.8) + '@ibm-cloud/watsonx-ai': 1.3.0 + '@langchain/core': 0.3.22(openai@4.76.1(zod@3.23.8)) + '@langchain/openai': 0.3.14(@langchain/core@0.3.22(openai@4.76.1(zod@3.23.8))) + binary-extensions: 2.2.0 + expr-eval: 2.0.2 + flat: 5.0.2 + ibm-cloud-sdk-core: 5.1.0 + js-yaml: 4.1.0 + langchain: 0.3.6(@langchain/core@0.3.22(openai@4.76.1(zod@3.23.8)))(axios@1.7.4)(openai@4.76.1(zod@3.23.8))(peggy@3.0.2) + langsmith: 0.2.11(openai@4.76.1(zod@3.23.8)) + openai: 4.76.1(zod@3.23.8) + uuid: 10.0.0 + zod: 3.23.8 + zod-to-json-schema: 3.23.3(zod@3.23.8) + optionalDependencies: + '@browserbasehq/sdk': 2.0.0 + hnswlib-node: 3.0.0 + html-to-text: 9.0.5 + jsonwebtoken: 9.0.2 + playwright: 1.49.1 + transitivePeerDependencies: + - '@langchain/anthropic' + - '@langchain/aws' + - '@langchain/cohere' + - '@langchain/google-genai' + - '@langchain/google-vertexai' + - '@langchain/groq' + - '@langchain/mistralai' + - '@langchain/ollama' + - axios + - encoding + - handlebars + - peggy + + '@langchain/core@0.3.22(openai@4.76.1(zod@3.23.8))': dependencies: ansi-styles: 5.2.0 camelcase: 6.3.0 decamelize: 1.2.0 - js-tiktoken: 1.0.7 - langsmith: 0.0.48 + js-tiktoken: 1.0.15 + langsmith: 0.2.11(openai@4.76.1(zod@3.23.8)) + mustache: 4.2.0 p-queue: 6.6.2 p-retry: 4.6.2 - uuid: 9.0.0 - zod: 3.22.4 + uuid: 10.0.0 + zod: 3.23.8 + zod-to-json-schema: 3.23.3(zod@3.23.8) + transitivePeerDependencies: + - openai - '@pkgjs/parseargs@0.11.0': - optional: true + '@langchain/openai@0.3.14(@langchain/core@0.3.22(openai@4.76.1(zod@3.23.8)))': + dependencies: + '@langchain/core': 0.3.22(openai@4.76.1(zod@3.23.8)) + js-tiktoken: 1.0.15 + openai: 4.76.1(zod@3.23.8) + zod: 3.23.8 + zod-to-json-schema: 3.23.3(zod@3.23.8) + transitivePeerDependencies: + - encoding + + '@langchain/textsplitters@0.1.0(@langchain/core@0.3.22(openai@4.76.1(zod@3.23.8)))': + dependencies: + '@langchain/core': 0.3.22(openai@4.76.1(zod@3.23.8)) + js-tiktoken: 1.0.15 + + '@playwright/test@1.49.1': + dependencies: + playwright: 1.49.1 + + '@sec-ant/readable-stream@0.4.1': {} + + '@selderee/plugin-htmlparser2@0.11.0': + dependencies: + domhandler: 5.0.3 + selderee: 0.11.0 + + '@sindresorhus/merge-streams@4.0.0': {} + + '@tokenizer/token@0.3.0': {} + + '@types/body-parser@1.19.5': + dependencies: + '@types/connect': 3.4.38 + '@types/node': 18.17.6 + + '@types/connect@3.4.38': + dependencies: + '@types/node': 18.17.6 + + '@types/debug@4.1.12': + dependencies: + '@types/ms': 0.7.34 + + '@types/express-serve-static-core@5.0.0': + dependencies: + '@types/node': 18.17.6 + '@types/qs': 6.9.16 + '@types/range-parser': 1.2.7 + '@types/send': 0.17.4 + + '@types/express@5.0.0': + dependencies: + '@types/body-parser': 1.19.5 + '@types/express-serve-static-core': 5.0.0 + '@types/qs': 6.9.16 + '@types/serve-static': 1.15.7 + + '@types/http-errors@2.0.4': {} + + '@types/mime@1.3.5': {} + + '@types/ms@0.7.34': {} '@types/node-fetch@2.6.4': dependencies: '@types/node': 18.17.6 form-data: 3.0.1 + '@types/node@10.14.22': {} + '@types/node@18.17.6': {} + '@types/qs@6.9.16': {} + + '@types/range-parser@1.2.7': {} + '@types/retry@0.12.0': {} - '@types/uuid@9.0.2': {} + '@types/send@0.17.4': + dependencies: + '@types/mime': 1.3.5 + '@types/node': 18.17.6 + + '@types/serve-static@1.15.7': + dependencies: + '@types/http-errors': 2.0.4 + '@types/node': 18.17.6 + '@types/send': 0.17.4 + + '@types/tough-cookie@4.0.5': {} + + '@types/uuid@10.0.0': {} abbrev@1.1.1: {} @@ -1267,38 +1975,25 @@ snapshots: asynckit@0.4.0: {} - balanced-match@1.0.2: {} + axios@1.7.4(debug@4.3.7): + dependencies: + follow-redirects: 1.15.9(debug@4.3.7) + form-data: 4.0.0 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug - base-64@0.1.0: {} + balanced-match@1.0.2: {} base64-js@1.5.1: {} binary-extensions@2.2.0: {} - binary-search@1.3.6: {} - bindings@1.5.0: dependencies: file-uri-to-path: 1.0.0 - body-parser@1.20.1: - dependencies: - bytes: 3.1.2 - content-type: 1.0.5 - debug: 2.6.9 - depd: 2.0.0 - destroy: 1.2.0 - http-errors: 2.0.0 - iconv-lite: 0.4.24 - on-finished: 2.4.1 - qs: 6.11.0 - raw-body: 2.5.1 - type-is: 1.6.18 - unpipe: 1.0.0 - transitivePeerDependencies: - - supports-color - - body-parser@1.20.2: + body-parser@1.20.3: dependencies: bytes: 3.1.2 content-type: 1.0.5 @@ -1308,15 +2003,13 @@ snapshots: http-errors: 2.0.0 iconv-lite: 0.4.24 on-finished: 2.4.1 - qs: 6.11.0 + qs: 6.13.0 raw-body: 2.5.2 type-is: 1.6.18 unpipe: 1.0.0 transitivePeerDependencies: - supports-color - boolbase@1.0.0: {} - brace-expansion@1.1.11: dependencies: balanced-match: 1.0.2 @@ -1330,17 +2023,20 @@ snapshots: dependencies: fill-range: 7.0.1 + buffer-equal-constant-time@1.0.1: {} + bytes@3.1.2: {} - call-bind@1.0.2: + call-bind@1.0.7: dependencies: - function-bind: 1.1.1 - get-intrinsic: 1.2.1 + es-define-property: 1.0.0 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + set-function-length: 1.2.2 camelcase@6.3.0: {} - charenc@0.0.2: {} - chokidar@3.5.3: dependencies: anymatch: 3.1.3 @@ -1359,6 +2055,16 @@ snapshots: color-name@1.1.4: {} + color-string@1.9.1: + dependencies: + color-name: 1.1.4 + simple-swizzle: 0.2.2 + + color@4.2.3: + dependencies: + color-convert: 2.0.1 + color-string: 1.9.1 + combined-stream@1.0.8: dependencies: delayed-stream: 1.0.0 @@ -1375,7 +2081,7 @@ snapshots: cookie-signature@1.0.6: {} - cookie@0.5.0: {} + cookie@0.7.1: {} cors@2.8.5: dependencies: @@ -1388,39 +2094,33 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 - crypt@0.0.2: {} - - css-select@5.1.0: - dependencies: - boolbase: 1.0.0 - css-what: 6.1.0 - domhandler: 5.0.3 - domutils: 3.1.0 - nth-check: 2.1.1 - - css-what@6.1.0: {} - debug@2.6.9: dependencies: ms: 2.0.0 - debug@3.2.7(supports-color@5.5.0): + debug@4.3.7(supports-color@5.5.0): dependencies: ms: 2.1.3 + optionalDependencies: supports-color: 5.5.0 decamelize@1.2.0: {} + deepmerge@4.3.1: {} + + define-data-property@1.1.4: + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + gopd: 1.0.1 + delayed-stream@1.0.0: {} depd@2.0.0: {} destroy@1.2.0: {} - digest-fetch@1.3.0: - dependencies: - base-64: 0.1.0 - md5: 2.3.0 + detect-libc@2.0.3: {} dom-serializer@2.0.0: dependencies: @@ -1440,10 +2140,14 @@ snapshots: domelementtype: 2.3.0 domhandler: 5.0.3 - dotenv@16.3.1: {} + dotenv@16.4.7: {} eastasianwidth@0.2.0: {} + ecdsa-sig-formatter@1.0.11: + dependencies: + safe-buffer: 5.2.1 + ee-first@1.1.1: {} emoji-regex@8.0.0: {} @@ -1452,8 +2156,16 @@ snapshots: encodeurl@1.0.2: {} + encodeurl@2.0.0: {} + entities@4.5.0: {} + es-define-property@1.0.0: + dependencies: + get-intrinsic: 1.2.4 + + es-errors@1.3.0: {} + escape-html@1.0.3: {} etag@1.8.1: {} @@ -1462,48 +2174,51 @@ snapshots: eventemitter3@4.0.7: {} - execa@8.0.1: + execa@9.5.2: dependencies: + '@sindresorhus/merge-streams': 4.0.0 cross-spawn: 7.0.3 - get-stream: 8.0.1 - human-signals: 5.0.0 - is-stream: 3.0.0 - merge-stream: 2.0.0 - npm-run-path: 5.1.0 - onetime: 6.0.0 + figures: 6.1.0 + get-stream: 9.0.1 + human-signals: 8.0.0 + is-plain-obj: 4.1.0 + is-stream: 4.0.1 + npm-run-path: 6.0.0 + pretty-ms: 9.1.0 signal-exit: 4.1.0 - strip-final-newline: 3.0.0 + strip-final-newline: 4.0.0 + yoctocolors: 2.1.1 expr-eval@2.0.2: {} - express@4.18.2: + express@4.21.2: dependencies: accepts: 1.3.8 array-flatten: 1.1.1 - body-parser: 1.20.1 + body-parser: 1.20.3 content-disposition: 0.5.4 content-type: 1.0.5 - cookie: 0.5.0 + cookie: 0.7.1 cookie-signature: 1.0.6 debug: 2.6.9 depd: 2.0.0 - encodeurl: 1.0.2 + encodeurl: 2.0.0 escape-html: 1.0.3 etag: 1.8.1 - finalhandler: 1.2.0 + finalhandler: 1.3.1 fresh: 0.5.2 http-errors: 2.0.0 - merge-descriptors: 1.0.1 + merge-descriptors: 1.0.3 methods: 1.1.2 on-finished: 2.4.1 parseurl: 1.3.3 - path-to-regexp: 0.1.7 + path-to-regexp: 0.1.12 proxy-addr: 2.0.7 - qs: 6.11.0 + qs: 6.13.0 range-parser: 1.2.1 safe-buffer: 5.2.1 - send: 0.18.0 - serve-static: 1.15.0 + send: 0.19.0 + serve-static: 1.16.2 setprototypeof: 1.2.0 statuses: 2.0.1 type-is: 1.6.18 @@ -1512,16 +2227,28 @@ snapshots: transitivePeerDependencies: - supports-color + extend@3.0.2: {} + + figures@6.1.0: + dependencies: + is-unicode-supported: 2.1.0 + + file-type@16.5.4: + dependencies: + readable-web-to-node-stream: 3.0.2 + strtok3: 6.3.0 + token-types: 4.2.1 + file-uri-to-path@1.0.0: {} fill-range@7.0.1: dependencies: to-regex-range: 5.0.1 - finalhandler@1.2.0: + finalhandler@1.3.1: dependencies: debug: 2.6.9 - encodeurl: 1.0.2 + encodeurl: 2.0.0 escape-html: 1.0.3 on-finished: 2.4.1 parseurl: 1.3.3 @@ -1532,6 +2259,10 @@ snapshots: flat@5.0.2: {} + follow-redirects@1.15.9(debug@4.3.7): + optionalDependencies: + debug: 4.3.7(supports-color@5.5.0) + foreground-child@3.1.1: dependencies: cross-spawn: 7.0.3 @@ -1545,6 +2276,12 @@ snapshots: combined-stream: 1.0.8 mime-types: 2.1.35 + form-data@4.0.0: + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + mime-types: 2.1.35 + formdata-node@4.4.1: dependencies: node-domexception: 1.0.0 @@ -1557,45 +2294,71 @@ snapshots: fsevents@2.3.2: optional: true - function-bind@1.1.1: {} + function-bind@1.1.2: {} - get-intrinsic@1.2.1: + get-intrinsic@1.2.4: dependencies: - function-bind: 1.1.1 - has: 1.0.3 + es-errors: 1.3.0 + function-bind: 1.1.2 has-proto: 1.0.1 has-symbols: 1.0.3 + hasown: 2.0.2 - get-stream@8.0.1: {} + get-stream@9.0.1: + dependencies: + '@sec-ant/readable-stream': 0.4.1 + is-stream: 4.0.1 glob-parent@5.1.2: dependencies: is-glob: 4.0.3 - glob@10.3.10: + glob@11.0.0: dependencies: foreground-child: 3.1.1 - jackspeak: 2.3.6 - minimatch: 9.0.3 - minipass: 6.0.2 - path-scurry: 1.10.1 + jackspeak: 4.0.2 + minimatch: 10.0.1 + minipass: 7.1.2 + package-json-from-dist: 1.0.1 + path-scurry: 2.0.0 + + gopd@1.0.1: + dependencies: + get-intrinsic: 1.2.4 has-flag@3.0.0: {} + has-property-descriptors@1.0.2: + dependencies: + es-define-property: 1.0.0 + has-proto@1.0.1: {} has-symbols@1.0.3: {} - has@1.0.3: + hasown@2.0.2: dependencies: - function-bind: 1.1.1 - - he@1.2.0: {} + function-bind: 1.1.2 - hnswlib-node@1.4.2: + hnswlib-node@3.0.0: dependencies: bindings: 1.5.0 - node-addon-api: 6.1.0 + node-addon-api: 8.2.1 + + html-to-text@9.0.5: + dependencies: + '@selderee/plugin-htmlparser2': 0.11.0 + deepmerge: 4.3.1 + dom-serializer: 2.0.0 + htmlparser2: 8.0.2 + selderee: 0.11.0 + + htmlparser2@8.0.2: + dependencies: + domelementtype: 2.3.0 + domhandler: 5.0.3 + domutils: 3.1.0 + entities: 4.5.0 http-errors@2.0.0: dependencies: @@ -1605,30 +2368,50 @@ snapshots: statuses: 2.0.1 toidentifier: 1.0.1 - human-signals@5.0.0: {} + human-signals@8.0.0: {} humanize-ms@1.2.1: dependencies: ms: 2.1.3 + ibm-cloud-sdk-core@5.1.0: + dependencies: + '@types/debug': 4.1.12 + '@types/node': 10.14.22 + '@types/tough-cookie': 4.0.5 + axios: 1.7.4(debug@4.3.7) + camelcase: 6.3.0 + debug: 4.3.7(supports-color@5.5.0) + dotenv: 16.4.7 + extend: 3.0.2 + file-type: 16.5.4 + form-data: 4.0.0 + isstream: 0.1.2 + jsonwebtoken: 9.0.2 + mime-types: 2.1.35 + retry-axios: 2.6.0(axios@1.7.4) + tough-cookie: 4.1.4 + transitivePeerDependencies: + - supports-color + iconv-lite@0.4.24: dependencies: safer-buffer: 2.1.2 + ieee754@1.2.1: {} + ignore-by-default@1.0.1: {} inherits@2.0.4: {} ipaddr.js@1.9.1: {} - is-any-array@2.0.1: {} + is-arrayish@0.3.2: {} is-binary-path@2.1.0: dependencies: binary-extensions: 2.2.0 - is-buffer@1.1.6: {} - is-extglob@2.1.1: {} is-fullwidth-code-point@3.0.0: {} @@ -1639,17 +2422,21 @@ snapshots: is-number@7.0.0: {} - is-stream@3.0.0: {} + is-plain-obj@4.1.0: {} + + is-stream@4.0.1: {} + + is-unicode-supported@2.1.0: {} isexe@2.0.0: {} - jackspeak@2.3.6: + isstream@0.1.2: {} + + jackspeak@4.0.2: dependencies: '@isaacs/cliui': 8.0.2 - optionalDependencies: - '@pkgjs/parseargs': 0.11.0 - js-tiktoken@1.0.7: + js-tiktoken@1.0.15: dependencies: base64-js: 1.5.1 @@ -1659,66 +2446,84 @@ snapshots: jsonpointer@5.0.1: {} - langchain@0.0.199(hnswlib-node@1.4.2)(peggy@3.0.2): + jsonwebtoken@9.0.2: dependencies: - '@anthropic-ai/sdk': 0.9.1 - '@langchain/core': 0.0.3 - binary-extensions: 2.2.0 - expr-eval: 2.0.2 - flat: 5.0.2 - hnswlib-node: 1.4.2 - js-tiktoken: 1.0.7 + jws: 3.2.2 + lodash.includes: 4.3.0 + lodash.isboolean: 3.0.3 + lodash.isinteger: 4.0.4 + lodash.isnumber: 3.0.3 + lodash.isplainobject: 4.0.6 + lodash.isstring: 4.0.1 + lodash.once: 4.1.1 + ms: 2.1.3 + semver: 7.6.3 + + jwa@1.4.1: + dependencies: + buffer-equal-constant-time: 1.0.1 + ecdsa-sig-formatter: 1.0.11 + safe-buffer: 5.2.1 + + jws@3.2.2: + dependencies: + jwa: 1.4.1 + safe-buffer: 5.2.1 + + langchain@0.3.6(@langchain/core@0.3.22(openai@4.76.1(zod@3.23.8)))(axios@1.7.4)(openai@4.76.1(zod@3.23.8))(peggy@3.0.2): + dependencies: + '@langchain/core': 0.3.22(openai@4.76.1(zod@3.23.8)) + '@langchain/openai': 0.3.14(@langchain/core@0.3.22(openai@4.76.1(zod@3.23.8))) + '@langchain/textsplitters': 0.1.0(@langchain/core@0.3.22(openai@4.76.1(zod@3.23.8))) + js-tiktoken: 1.0.15 js-yaml: 4.1.0 jsonpointer: 5.0.1 - langchainhub: 0.0.6 - langsmith: 0.0.49 - ml-distance: 4.0.1 - openai: 4.20.1 + langsmith: 0.2.11(openai@4.76.1(zod@3.23.8)) openapi-types: 12.1.3 p-retry: 4.6.2 - peggy: 3.0.2 - uuid: 9.0.0 + uuid: 10.0.0 yaml: 2.3.1 - zod: 3.22.4 - zod-to-json-schema: 3.20.3(zod@3.22.4) + zod: 3.23.8 + zod-to-json-schema: 3.23.3(zod@3.23.8) + optionalDependencies: + axios: 1.7.4(debug@4.3.7) + peggy: 3.0.2 transitivePeerDependencies: - encoding + - openai - langchainhub@0.0.6: {} - - langsmith@0.0.48: + langsmith@0.2.11(openai@4.76.1(zod@3.23.8)): dependencies: - '@types/uuid': 9.0.2 + '@types/uuid': 10.0.0 commander: 10.0.1 p-queue: 6.6.2 p-retry: 4.6.2 - uuid: 9.0.0 + semver: 7.6.3 + uuid: 10.0.0 + optionalDependencies: + openai: 4.76.1(zod@3.23.8) - langsmith@0.0.49: - dependencies: - '@types/uuid': 9.0.2 - commander: 10.0.1 - p-queue: 6.6.2 - p-retry: 4.6.2 - uuid: 9.0.0 + leac@0.6.0: {} - lru-cache@10.0.0: {} + lodash.includes@4.3.0: {} - lru-cache@6.0.0: - dependencies: - yallist: 4.0.0 + lodash.isboolean@3.0.3: {} - md5@2.3.0: - dependencies: - charenc: 0.0.2 - crypt: 0.0.2 - is-buffer: 1.1.6 + lodash.isinteger@4.0.4: {} - media-typer@0.3.0: {} + lodash.isnumber@3.0.3: {} + + lodash.isplainobject@4.0.6: {} - merge-descriptors@1.0.1: {} + lodash.isstring@4.0.1: {} + + lodash.once@4.1.1: {} + + lru-cache@11.0.1: {} + + media-typer@0.3.0: {} - merge-stream@2.0.0: {} + merge-descriptors@1.0.3: {} methods@1.1.2: {} @@ -1730,46 +2535,25 @@ snapshots: mime@1.6.0: {} - mimic-fn@4.0.0: {} - - minimatch@3.1.2: - dependencies: - brace-expansion: 1.1.11 - - minimatch@9.0.3: + minimatch@10.0.1: dependencies: brace-expansion: 2.0.1 - minipass@6.0.2: {} - - ml-array-mean@1.1.6: - dependencies: - ml-array-sum: 1.1.6 - - ml-array-sum@1.1.6: - dependencies: - is-any-array: 2.0.1 - - ml-distance-euclidean@2.0.0: {} - - ml-distance@4.0.1: + minimatch@3.1.2: dependencies: - ml-array-mean: 1.1.6 - ml-distance-euclidean: 2.0.0 - ml-tree-similarity: 1.0.0 + brace-expansion: 1.1.11 - ml-tree-similarity@1.0.0: - dependencies: - binary-search: 1.3.6 - num-sort: 2.1.0 + minipass@7.1.2: {} ms@2.0.0: {} ms@2.1.3: {} + mustache@4.2.0: {} + negotiator@0.6.3: {} - node-addon-api@6.1.0: {} + node-addon-api@8.2.1: {} node-domexception@1.0.0: {} @@ -1777,23 +2561,14 @@ snapshots: dependencies: whatwg-url: 5.0.0 - node-html-markdown@1.3.0: - dependencies: - node-html-parser: 6.1.11 - - node-html-parser@6.1.11: - dependencies: - css-select: 5.1.0 - he: 1.2.0 - - nodemon@3.0.1: + nodemon@3.1.7: dependencies: chokidar: 3.5.3 - debug: 3.2.7(supports-color@5.5.0) + debug: 4.3.7(supports-color@5.5.0) ignore-by-default: 1.0.1 minimatch: 3.1.2 pstree.remy: 1.1.8 - semver: 7.5.4 + semver: 7.6.3 simple-update-notifier: 2.0.0 supports-color: 5.5.0 touch: 3.1.0 @@ -1805,39 +2580,30 @@ snapshots: normalize-path@3.0.0: {} - npm-run-path@5.1.0: + npm-run-path@6.0.0: dependencies: path-key: 4.0.0 - - nth-check@2.1.1: - dependencies: - boolbase: 1.0.0 - - num-sort@2.1.0: {} + unicorn-magic: 0.3.0 object-assign@4.1.1: {} - object-inspect@1.12.3: {} + object-inspect@1.13.2: {} on-finished@2.4.1: dependencies: ee-first: 1.1.1 - onetime@6.0.0: - dependencies: - mimic-fn: 4.0.0 - - openai@4.20.1: + openai@4.76.1(zod@3.23.8): dependencies: '@types/node': 18.17.6 '@types/node-fetch': 2.6.4 abort-controller: 3.0.0 agentkeepalive: 4.5.0 - digest-fetch: 1.3.0 form-data-encoder: 1.7.2 formdata-node: 4.4.1 node-fetch: 2.6.12 - web-streams-polyfill: 3.2.1 + optionalDependencies: + zod: 3.23.8 transitivePeerDependencies: - encoding @@ -1859,68 +2625,115 @@ snapshots: dependencies: p-finally: 1.0.0 + package-json-from-dist@1.0.1: {} + + parse-ms@4.0.0: {} + + parseley@0.12.1: + dependencies: + leac: 0.6.0 + peberminta: 0.9.0 + parseurl@1.3.3: {} path-key@3.1.1: {} path-key@4.0.0: {} - path-scurry@1.10.1: + path-scurry@2.0.0: dependencies: - lru-cache: 10.0.0 - minipass: 6.0.2 + lru-cache: 11.0.1 + minipass: 7.1.2 + + path-to-regexp@0.1.12: {} - path-to-regexp@0.1.7: {} + peberminta@0.9.0: {} + + peek-readable@4.1.0: {} peggy@3.0.2: dependencies: commander: 10.0.1 source-map-generator: 0.8.0 + optional: true picomatch@2.3.1: {} + playwright-core@1.49.1: {} + + playwright@1.49.1: + dependencies: + playwright-core: 1.49.1 + optionalDependencies: + fsevents: 2.3.2 + + pretty-ms@9.1.0: + dependencies: + parse-ms: 4.0.0 + proxy-addr@2.0.7: dependencies: forwarded: 0.2.0 ipaddr.js: 1.9.1 + proxy-from-env@1.1.0: {} + + psl@1.15.0: + dependencies: + punycode: 2.3.1 + pstree.remy@1.1.8: {} - qs@6.11.0: + punycode@2.3.1: {} + + qs@6.13.0: dependencies: - side-channel: 1.0.4 + side-channel: 1.0.6 + + querystringify@2.2.0: {} range-parser@1.2.1: {} - raw-body@2.5.1: + raw-body@2.5.2: dependencies: bytes: 3.1.2 http-errors: 2.0.0 iconv-lite: 0.4.24 unpipe: 1.0.0 - raw-body@2.5.2: + readable-stream@3.6.2: dependencies: - bytes: 3.1.2 - http-errors: 2.0.0 - iconv-lite: 0.4.24 - unpipe: 1.0.0 + inherits: 2.0.4 + string_decoder: 1.3.0 + util-deprecate: 1.0.2 + + readable-web-to-node-stream@3.0.2: + dependencies: + readable-stream: 3.6.2 readdirp@3.6.0: dependencies: picomatch: 2.3.1 + requires-port@1.0.0: {} + + retry-axios@2.6.0(axios@1.7.4): + dependencies: + axios: 1.7.4(debug@4.3.7) + retry@0.13.1: {} safe-buffer@5.2.1: {} safer-buffer@2.1.2: {} - semver@7.5.4: + selderee@0.11.0: dependencies: - lru-cache: 6.0.0 + parseley: 0.12.1 - send@0.18.0: + semver@7.6.3: {} + + send@0.19.0: dependencies: debug: 2.6.9 depd: 2.0.0 @@ -1938,36 +2751,77 @@ snapshots: transitivePeerDependencies: - supports-color - serve-static@1.15.0: + serve-static@1.16.2: dependencies: - encodeurl: 1.0.2 + encodeurl: 2.0.0 escape-html: 1.0.3 parseurl: 1.3.3 - send: 0.18.0 + send: 0.19.0 transitivePeerDependencies: - supports-color + set-function-length@1.2.2: + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + gopd: 1.0.1 + has-property-descriptors: 1.0.2 + setprototypeof@1.2.0: {} + sharp@0.33.5: + dependencies: + color: 4.2.3 + detect-libc: 2.0.3 + semver: 7.6.3 + optionalDependencies: + '@img/sharp-darwin-arm64': 0.33.5 + '@img/sharp-darwin-x64': 0.33.5 + '@img/sharp-libvips-darwin-arm64': 1.0.4 + '@img/sharp-libvips-darwin-x64': 1.0.4 + '@img/sharp-libvips-linux-arm': 1.0.5 + '@img/sharp-libvips-linux-arm64': 1.0.4 + '@img/sharp-libvips-linux-s390x': 1.0.4 + '@img/sharp-libvips-linux-x64': 1.0.4 + '@img/sharp-libvips-linuxmusl-arm64': 1.0.4 + '@img/sharp-libvips-linuxmusl-x64': 1.0.4 + '@img/sharp-linux-arm': 0.33.5 + '@img/sharp-linux-arm64': 0.33.5 + '@img/sharp-linux-s390x': 0.33.5 + '@img/sharp-linux-x64': 0.33.5 + '@img/sharp-linuxmusl-arm64': 0.33.5 + '@img/sharp-linuxmusl-x64': 0.33.5 + '@img/sharp-wasm32': 0.33.5 + '@img/sharp-win32-ia32': 0.33.5 + '@img/sharp-win32-x64': 0.33.5 + shebang-command@2.0.0: dependencies: shebang-regex: 3.0.0 shebang-regex@3.0.0: {} - side-channel@1.0.4: + side-channel@1.0.6: dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.1 - object-inspect: 1.12.3 + call-bind: 1.0.7 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 + object-inspect: 1.13.2 signal-exit@4.1.0: {} + simple-swizzle@0.2.2: + dependencies: + is-arrayish: 0.3.2 + simple-update-notifier@2.0.0: dependencies: - semver: 7.5.4 + semver: 7.6.3 - source-map-generator@0.8.0: {} + source-map-generator@0.8.0: + optional: true statuses@2.0.1: {} @@ -1983,6 +2837,10 @@ snapshots: emoji-regex: 9.2.2 strip-ansi: 7.1.0 + string_decoder@1.3.0: + dependencies: + safe-buffer: 5.2.1 + strip-ansi@6.0.1: dependencies: ansi-regex: 5.0.1 @@ -1991,7 +2849,12 @@ snapshots: dependencies: ansi-regex: 6.0.1 - strip-final-newline@3.0.0: {} + strip-final-newline@4.0.0: {} + + strtok3@6.3.0: + dependencies: + '@tokenizer/token': 0.3.0 + peek-readable: 4.1.0 supports-color@5.5.0: dependencies: @@ -2003,12 +2866,27 @@ snapshots: toidentifier@1.0.1: {} + token-types@4.2.1: + dependencies: + '@tokenizer/token': 0.3.0 + ieee754: 1.2.1 + touch@3.1.0: dependencies: nopt: 1.0.10 + tough-cookie@4.1.4: + dependencies: + psl: 1.15.0 + punycode: 2.3.1 + universalify: 0.2.0 + url-parse: 1.5.10 + tr46@0.0.3: {} + tslib@2.8.1: + optional: true + type-is@1.6.18: dependencies: media-typer: 0.3.0 @@ -2016,16 +2894,25 @@ snapshots: undefsafe@2.0.5: {} + unicorn-magic@0.3.0: {} + + universalify@0.2.0: {} + unpipe@1.0.0: {} + url-parse@1.5.10: + dependencies: + querystringify: 2.2.0 + requires-port: 1.0.0 + + util-deprecate@1.0.2: {} + utils-merge@1.0.1: {} - uuid@9.0.0: {} + uuid@10.0.0: {} vary@1.1.2: {} - web-streams-polyfill@3.2.1: {} - web-streams-polyfill@4.0.0-beta.3: {} webidl-conversions@3.0.1: {} @@ -2051,12 +2938,16 @@ snapshots: string-width: 5.1.2 strip-ansi: 7.1.0 - yallist@4.0.0: {} - yaml@2.3.1: {} - zod-to-json-schema@3.20.3(zod@3.22.4): + yoctocolors@2.1.1: {} + + zod-to-json-schema@3.23.3(zod@3.23.8): + dependencies: + zod: 3.23.8 + + zod-to-json-schema@3.23.5(zod@3.23.8): dependencies: - zod: 3.22.4 + zod: 3.23.8 - zod@3.22.4: {} + zod@3.23.8: {} diff --git a/scripts/git-sources.js b/scripts/git-sources.js index de75692..41a862b 100644 --- a/scripts/git-sources.js +++ b/scripts/git-sources.js @@ -1,4 +1,5 @@ import "dotenv/config"; + import { mkdir, writeFile } from "fs/promises"; import { execa } from "execa"; @@ -15,7 +16,7 @@ if (!GIT_BRANCH) { ); } -const LOCAL_PATH = "./sources/website"; +const LOCAL_PATH = "./index/website"; const FILES = [ "src/routes/docs/**/*.markdoc", "src/routes/docs/**/*.md", diff --git a/scripts/vector-store.js b/scripts/vector-store.js new file mode 100644 index 0000000..eb40b52 --- /dev/null +++ b/scripts/vector-store.js @@ -0,0 +1,4 @@ +import "dotenv/config"; +import { getRetriever } from "../src/retriever.js"; + +await getRetriever(); \ No newline at end of file diff --git a/scripts/web-sources.js b/scripts/web-sources.js index a437a89..9d09ba1 100644 --- a/scripts/web-sources.js +++ b/scripts/web-sources.js @@ -1,7 +1,8 @@ import "dotenv/config"; + import { mkdir, writeFile } from "fs/promises"; import { execa } from "execa"; -import { NodeHtmlMarkdown } from "node-html-markdown"; +import { convert } from "html-to-text"; const WEBSITE_URL = process.env._BUILD_WEBSITE_URL ?? "https://appwrite.io"; if (!WEBSITE_URL) { @@ -17,7 +18,7 @@ if (!WEBSITE_VERSION) { ); } -const LOCAL_PATH = "./sources/references"; +const LOCAL_PATH = "./index/references"; const SDKS = [ "client-web", "client-flutter", @@ -58,7 +59,7 @@ await mkdir(LOCAL_PATH, { recursive: true }); console.log("Downloading reference pages..."); for (const sdk of SDKS) { - await mkdir(`./sources/references/${sdk}/`, { recursive: true }); + await mkdir(`./index/references/${sdk}/`, { recursive: true }); for (const service of SERVICES) { const url = new URL( @@ -83,9 +84,11 @@ for (const sdk of SDKS) { continue; } - const markdown = NodeHtmlMarkdown.translate(matches[0]); + const text = convert(matches[0], { + wordwrap: false, + }); - await writeFile(`./sources/references/${sdk}/${service}.md`, markdown); - console.log(`Created ./sources/references/${sdk}/${service}.md`); + await writeFile(`./index/references/${sdk}/${service}.md`, text); + console.log(`Created ./index/references/${sdk}/${service}.md`); } } diff --git a/src/chain.js b/src/chain.js new file mode 100644 index 0000000..9c3b12d --- /dev/null +++ b/src/chain.js @@ -0,0 +1,34 @@ +import { RunnableSequence } from "@langchain/core/runnables"; +import { ChatPromptTemplate, MessagesPlaceholder } from "@langchain/core/prompts"; +import { ChatOpenAI } from "@langchain/openai"; +import { getRetriever } from "./retriever.js"; +import { formatDocumentsAsString } from "langchain/util/document"; + + +export const getChain = async () => { + const retriever = await getRetriever(); + + return RunnableSequence.from([ + async ({ messages, systemPrompt }) => { + const question = messages.reverse().find(m => m.role === 'user'); + if (!question) throw new Error("No user message found in messages array."); + + const docs = await retriever.invoke(question.content); + const context = await formatDocumentsAsString(docs); + + return { messages, systemPrompt, context }; + }, + ChatPromptTemplate.fromMessages([ + { role: 'system', content: '{systemPrompt}' }, + new MessagesPlaceholder('messages'), + { role: 'assistant', content: 'Context: {context}' }, + ]), + new ChatOpenAI({ + model: process.env._APP_ASSISTANT_OPENAI_MODEL || 'gpt-4', + openAIApiKey: process.env._APP_ASSISTANT_OPENAI_API_KEY, + temperature: Number(process.env._APP_ASSISTANT_TEMPERATURE || '0.1'), + maxTokens: Number(process.env._APP_ASSISTANT_MAX_TOKENS || '1000'), + streaming: true + }), + ]); +}; \ No newline at end of file diff --git a/src/documents.js b/src/documents.js index 3a6c284..ecdeaba 100644 --- a/src/documents.js +++ b/src/documents.js @@ -5,9 +5,9 @@ import { MarkdownTextSplitter } from "langchain/text_splitter"; const getDocumentation = async () => { const filenames = await glob([ - "./sources/website/src/routes/docs/**/*.markdoc", - "./sources/website/src/routes/docs/**/*.md", - "./sources/website/src/partials/**/*.md", + "./index/website/src/routes/docs/**/*.markdoc", + "./index/website/src/routes/docs/**/*.md", + "./index/website/src/partials/**/*.md", ]); return Promise.all( @@ -15,12 +15,12 @@ const getDocumentation = async () => { const contents = await readFile(filename, { encoding: "utf8" }); const url = - filename.startsWith("sources/website/src/routes/") && - filename.endsWith("+page.markdoc") + filename.startsWith("index/website/src/routes/") && + filename.endsWith("+page.markdoc") ? `https://appwrite.io/${filename - .replace("sources/website/src/routes/", "") - .replace("+page.markdoc", "")}` - : null; + .replace("index/website/src/routes/", "") + .replace("+page.markdoc", "")}` + : undefined; const metadata = { filename, @@ -37,7 +37,7 @@ const getDocumentation = async () => { }; const getReferences = async () => { - const filenames = await glob(["./sources/references/**/*.md"]); + const filenames = await glob(["./index/references/**/*.md"]); return Promise.all( filenames.map(async (filename) => { @@ -57,21 +57,14 @@ const getReferences = async () => { ); }; -export const getDocuments = async () => { - const documentation = await getDocumentation(); - const references = await getReferences(); - - return await splitDocuments([...documentation, ...references]); -}; - -/**x +/** * @param {Document[]} documents * @returns {Promise>[]>} */ async function splitDocuments(documents) { const splitter = new MarkdownTextSplitter({ - chunkSize: 1024, - chunkOverlap: 64, + chunkSize: 512, + chunkOverlap: 256, }); const texts = documents.map((document) => document.pageContent); @@ -96,7 +89,7 @@ function parseMarkdownFrontmatter(contents) { function parseReferenceData(filename) { const [sdk, service] = filename - .replace("sources/references/", "") + .replace("index/references/", "") .replace(".md", "") .split("/"); return { sdk, service }; @@ -106,9 +99,9 @@ function parseReferenceData(filename) { * Clean up markdoc contents to make them more suitable for search. * * @param {string} contents - * @param {string|null} currentUrl + * @param {string | undefined} currentUrl */ -function cleanMarkdoc(contents, currentUrl = null) { +function cleanMarkdoc(contents, currentUrl) { return ( contents // Remove the frontmatter @@ -137,3 +130,10 @@ function cleanMarkdoc(contents, currentUrl = null) { }) ); } + +export const getDocuments = async () => { + const documentation = await getDocumentation(); + const references = await getReferences(); + + return await splitDocuments([...documentation, ...references]); +}; \ No newline at end of file diff --git a/src/embeddings.js b/src/embeddings.js deleted file mode 100644 index 3446ab4..0000000 --- a/src/embeddings.js +++ /dev/null @@ -1,33 +0,0 @@ -import { HNSWLib } from "langchain/vectorstores/hnswlib"; -import { OpenAIEmbeddings } from "langchain/embeddings/openai"; -import { OpenAIChat } from "langchain/llms/openai"; -import { loadQAStuffChain } from "langchain/chains"; -import { getDocuments } from "./documents.js"; - -export const intializeDocumentRetriever = async () => { - const embeddings = new OpenAIEmbeddings({ - openAIApiKey: process.env._APP_ASSISTANT_OPENAI_API_KEY, - }); - - const documents = await getDocuments(); - const vectorStore = await HNSWLib.fromDocuments(documents, embeddings); - - return vectorStore.asRetriever(5); -}; - -export const getChain = async (onToken) => { - return loadQAStuffChain( - new OpenAIChat({ - modelName: "gpt-4o", - openAIApiKey: process.env._APP_ASSISTANT_OPENAI_API_KEY, - temperature: 0.3, - maxTokens: 1000, - streaming: true, - callbacks: [ - { - handleLLMNewToken: onToken, - }, - ], - }) - ); -}; diff --git a/src/main.js b/src/main.js index 86ad260..7021486 100644 --- a/src/main.js +++ b/src/main.js @@ -1,11 +1,16 @@ import "dotenv/config"; + import bodyParser from "body-parser"; import cors from "cors"; import express from "express"; -import { - getChain, - intializeDocumentRetriever as initializeRetriever, -} from "./embeddings.js"; +import { getChain } from "./chain.js"; + +const DEFAULT_SYSTEM_PROMPT = ` +- You are an AI chatbot called Appwrite Assistant, with information from Appwrite documentation and references. +- Help developers answer Appwrite-related questions only. +- Use the context to formulate your answers, only refer to SDK methods and API endpoints directly from the context, do not guess. +- By default, orovide code examples in Node and Web Appwrite SDKs. +`; const app = express(); app.use( @@ -15,48 +20,68 @@ app.use( ); app.use(bodyParser.raw({ inflate: true, type: "*/*" })); -/** @type {import("langchain/schema/retriever").BaseRetriever?} */ -let retriever = null; +const chain = await getChain(); -const port = 3003; +app.post("/v1/models/assistant/prompt", async (req, res) => { + const decoder = new TextDecoder(); + const text = decoder.decode(req.body); -const DEFAULT_SYSTEM_PROMPT = "You are an AI chat bot with information about Appwrite documentation. You need to help developers answer Appwrite related questions only. You will be given an input and you need to respond with the appropriate answer, using information confirmed with Appwrite documentation and reference pages. If applicable, show code examples. Code examples should use the Node and Web Appwrite SDKs unless otherwise specified."; + const { prompt: userPrompt, systemPrompt } = JSON.parse(text); + if (!userPrompt || typeof userPrompt !== "string") { + res.status(400).send("Missing 'prompt' in request body."); + return; + } -app.post("/", async (req, res) => { - if (!retriever) { - res.status(500).send("Search index not initialized"); + if (!!systemPrompt && typeof systemPrompt !== "string") { + res.status(400).send("Invalid 'systemPrompt' in request body."); return; } - // raw to text + const stream = await chain.stream({ + messages: [{ role: "user", content: userPrompt }], + systemPrompt: systemPrompt ?? DEFAULT_SYSTEM_PROMPT, + }); + + res.setHeader("Content-Type", "text/event-stream"); + + for await (const chunk of stream) { + res.write(chunk.content) + } + + res.end(); +}); + +app.post("/v1/models/assistant/chat", async (req, res) => { const decoder = new TextDecoder(); const text = decoder.decode(req.body); - let { prompt, systemPrompt } = JSON.parse(text); - const templated = `${systemPrompt ?? DEFAULT_SYSTEM_PROMPT}\n\n${prompt}` + const { messages, systemPrompt } = JSON.parse(text); + if (!messages || !Array.isArray(messages) || messages.length === 0) { + res.status(400).send("Missing or invalid 'messages' in request body."); + return; + } - const relevantDocuments = await retriever.getRelevantDocuments(prompt); + if (!!systemPrompt && typeof systemPrompt !== "string") { + res.status(400).send("Invalid 'systemPrompt' in request body."); + return; + } - const chain = await getChain((token) => { - res.write(token); - }); + // Filter out any user-provided system messages + // Only allow 'user' and 'assistant' roles from the user’s request. + // The server injects its own system prompt in the chain + const filteredMessage = messages.filter( + (m) => m.role === "user" || m.role === "assistant" + ); - await chain.call({ - input_documents: relevantDocuments, - question: templated, + const stream = await chain.stream({ + messages: filteredMessage, + systemPrompt: systemPrompt ?? DEFAULT_SYSTEM_PROMPT, }); - const sources = new Set( - relevantDocuments.map((d) => d.metadata.url).filter((url) => !!url) - ); + res.setHeader("Content-Type", "text/event-stream"); - if (sources.size > 0) { - res.write("\n\nSources:\n"); - for (const sourceUrl of new Set( - relevantDocuments.map((d) => d.metadata.url).filter((url) => !!url) - )) { - res.write("- " + sourceUrl + "\n"); - } + for await (const chunk of stream) { + res.write(chunk.content); } res.end(); @@ -66,13 +91,8 @@ app.get("/v1/health", (_, res) => { res.send("OK"); }); +const port = 3003; + app.listen(port, async () => { console.log(`Started server on port: ${port}`); - console.log("Initializing search index..."); - try { - retriever = await initializeRetriever(); - console.log("Search index initialized"); - } catch (e) { - console.error(e); - } }); diff --git a/src/retriever.js b/src/retriever.js new file mode 100644 index 0000000..0bc4f14 --- /dev/null +++ b/src/retriever.js @@ -0,0 +1,47 @@ +import fs from "fs"; +import path from "path"; +import { getDocuments } from "./documents.js"; +import { OpenAIEmbeddings } from "@langchain/openai"; +import { HNSWLib } from "@langchain/community/vectorstores/hnswlib"; + +/** @type {import("@langchain/core/retrievers").BaseRetriever?}*/ +let retriever = null; + +export const getRetriever = async () => { + if (retriever) { + return retriever; + } + + const embeddings = new OpenAIEmbeddings({ + openAIApiKey: process.env._APP_ASSISTANT_OPENAI_API_KEY, + batchSize: 2048, + }); + + const storeDir = "index/vector"; + const indexFilePath = path.join(storeDir, "hnswlib.index"); + + let vectorStore; + + if (fs.existsSync(indexFilePath)) { + console.log("Found existing vector store. Loading from disk..."); + vectorStore = await HNSWLib.load(storeDir, embeddings); + } else { + console.log("No existing vector store found. Building new vector store..."); + + const documents = await getDocuments(); + + console.log(`Building vector store from ${documents.length} documents...`); + vectorStore = await HNSWLib.fromDocuments(documents, embeddings); + + if (!fs.existsSync(storeDir)) { + fs.mkdirSync(storeDir); + } + + console.log("Saving the new vector store to disk..."); + await vectorStore.save(storeDir); + } + + retriever = vectorStore.asRetriever(8); + + return retriever; +}; diff --git a/tests/how-do-i-use-the-users-api-to-create-a-new-user-with-dart.md b/tests/how-do-i-use-the-users-api-to-create-a-new-user-with-dart.md index 0ecc7de..0559f5c 100644 --- a/tests/how-do-i-use-the-users-api-to-create-a-new-user-with-dart.md +++ b/tests/how-do-i-use-the-users-api-to-create-a-new-user-with-dart.md @@ -1,109 +1,29 @@ -To create a new user with Dart using the Appwrite Users API, you can use one of the provided methods depending on the hashing algorithm you want to use for the password. Below are examples for creating a user with different hashing algorithms: +To create a new user using the Appwrite Users API with Dart, you can use the `Users` class from the Dart Appwrite SDK. Below is an example of how to achieve this: -### Using PHPass ```dart import 'package:dart_appwrite/dart_appwrite.dart'; -Client client = Client() - .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('') // Your project ID - .setKey(''); // Your secret API key - -Users users = Users(client); - -User result = await users.createPHPassUser( - userId: '', - email: 'email@example.com', - password: 'password', - name: '', // (optional) -); -``` - -### Using Scrypt -```dart -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('') // Your project ID - .setKey(''); // Your secret API key - -Users users = Users(client); - -User result = await users.createScryptUser( - userId: '', - email: 'email@example.com', - password: 'password', - passwordSalt: '', - passwordCpu: 0, - passwordMemory: 0, - passwordParallel: 0, - passwordLength: 0, - name: '', // (optional) -); -``` - -### Using Bcrypt -```dart -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('') // Your project ID - .setKey(''); // Your secret API key - -Users users = Users(client); - -User result = await users.createBcryptUser( - userId: '', - email: 'email@example.com', - password: 'password', - name: '', // (optional) -); +void main() async { + Client client = Client() + .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + + Users users = Users(client); + + try { + final user = await users.create( + userId: 'unique()', // Use 'unique()' to generate a unique ID + email: 'user@example.com', + password: 'password', + name: 'John Doe', + ); + + print(user); + } catch (e) { + print(e); + } +} ``` -### Using Scrypt Modified -```dart -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('') // Your project ID - .setKey(''); // Your secret API key - -Users users = Users(client); - -User result = await users.createScryptModifiedUser( - userId: '', - email: 'email@example.com', - password: 'password', - passwordSalt: '', - passwordSaltSeparator: '', - passwordSignerKey: '', - name: '', // (optional) -); -``` - -### Using Argon2 -```dart -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint - .setProject('') // Your project ID - .setKey(''); // Your secret API key - -Users users = Users(client); - -User result = await users.createArgon2User( - userId: '', - email: 'email@example.com', - password: 'password', - name: '', // (optional) -); -``` - -Replace ``, ``, ``, ``, ``, and `` with your actual Appwrite project details and user-specific information. - -Sources: -- https://appwrite.io/docs/references/cloud/server-dart/users +In this example, replace `` and `` with your actual Appwrite project ID and API key. The `create` method requires a `userId`, `email`, and `password` as mandatory parameters. You can also optionally provide a `name` for the user. The `userId` can be set to `'unique()'` to automatically generate a unique identifier for the user. \ No newline at end of file diff --git a/tests/how-do-you-add-a-custom-domain-in-the-console.md b/tests/how-do-you-add-a-custom-domain-in-the-console.md index f51414b..24f2f4f 100644 --- a/tests/how-do-you-add-a-custom-domain-in-the-console.md +++ b/tests/how-do-you-add-a-custom-domain-in-the-console.md @@ -1,19 +1,12 @@ To add a custom domain in the Appwrite Console, follow these steps: -1. **Navigate to the Appwrite Console and go to your project.** -2. **Click on the Settings tab in the left sidebar.** -3. **Select the Custom domains section and click Create domain.** -4. **Add your domain, and copy the associated CNAME record to your DNS provider.** You can refer to the [Add a CNAME record](https://appwrite.io/docs/advanced/platform/custom-domains/##cname-record) section for more details. -5. **Verify your domain.** Note that DNS changes might take up to 48 hours to propagate worldwide, so you may not be able to complete this step on the same day. -6. **Once you verify your domain, you can generate an SSL certificate.** +1. **Navigate to the Project**: Go to the Appwrite Console and navigate to your project. +2. **Access Settings**: Click on the **Settings** tab in the left sidebar. +3. **Custom Domains Section**: Select the **Custom domains** section and click **Create domain**. +4. **Enter Domain**: Add your custom domain. +5. **Add CNAME Record**: Copy the provided CNAME record and add it to your DNS provider. Refer to the [Add a CNAME record](https://appwrite.io/docs/advanced/platform/custom-domains/##cname-record) section for detailed instructions. +6. **Verify Domain**: Wait for DNS changes to propagate, which can take up to 48 hours. Once propagated, verify your domain. -When both **VERIFICATION STATUS** and **CERTIFICATE STATUS** are green, the new domain is ready to use. +After setting up the DNS, ensure that your custom domain is added to the "Allowed Domains" list in your Appwrite project settings to accept API requests from it. -If you encounter any issues during the setup process or have questions, don't hesitate to [contact Appwrite support](https://appwrite.io/docs/advanced/platform/custom-domains/#/contact-us), and they will be happy to assist you. - -Sources: -- https://appwrite.io/docs/products/functions/domains/ -- https://appwrite.io/docs/advanced/platform/custom-domains/ -- https://appwrite.io/docs/products/messaging/mailgun/ -- https://appwrite.io/docs/tutorials/subscriptions-with-stripe/step-3/ -- https://appwrite.io/docs/tutorials/subscriptions-with-stripe/step-4/ +For any issues or assistance, you can contact Appwrite support. \ No newline at end of file diff --git a/tests/how-to-use-appwrite-with-react.md b/tests/how-to-use-appwrite-with-react.md index c0c2686..2c9228b 100644 --- a/tests/how-to-use-appwrite-with-react.md +++ b/tests/how-to-use-appwrite-with-react.md @@ -1,101 +1,105 @@ -To use Appwrite with React, follow these steps: +To use Appwrite with a React application, you will need to set up the Appwrite SDK in your project. Here's a step-by-step guide to help you get started: -### Prerequisites: -1. Ensure you have a recent version of [Node.js](https://nodejs.org/en/download/) installed on your system. -2. Have a basic knowledge of Next.js and React. -3. Follow the [Start with React](https://appwrite.io/docs/quick-starts/react) guide. +### 1. Install the Appwrite Web SDK -### Step-by-Step Guide: +First, you need to install the Appwrite Web SDK in your React project. You can do this by running the following command: -#### 1. Create a Vite Project: -First, create a new Vite project with a React template: -```sh -npm create vite@latest my-app -- --template react && cd my-app +```bash +npm install appwrite ``` -#### 2. Install the Appwrite SDK: -Install the JavaScript Appwrite SDK: -```sh -npm install appwrite@14.0.1 -``` - -#### 3. Setup Appwrite Project: -1. Head to the [Appwrite Console](https://cloud.appwrite.io/console). -2. If this is your first time using Appwrite, create an account and create your first project. -3. Under **Add a platform**, add a **Web app**. The **Hostname** should be `localhost`. +### 2. Initialize the Appwrite Client -#### 4. Initialize Appwrite SDK: -Create a new file `src/lib/appwrite.js` to hold your Appwrite-related code. Only one instance of the `Client()` class should be created per app. Add the following code to it, replacing `` with your project ID: +Create a new file, for example, `src/lib/appwrite.js`, to set up the Appwrite client. Replace `` and `` with your Appwrite project ID and endpoint URL, respectively. ```javascript +// src/lib/appwrite.js import { Client, Databases, Account } from "appwrite"; const client = new Client(); + client - .setEndpoint("https://cloud.appwrite.io/v1") - .setProject(""); // Replace with your project ID + .setEndpoint('') // Your Appwrite Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); +const databases = new Databases(client); -export const account = new Account(client); -export const databases = new Databases(client); +export { client, account, databases }; ``` -#### 5. Create a Simple Login Form: -Add the following components to your `App.js` file to create a simple login form: +### 3. Use Appwrite in Your React Components + +You can now use the Appwrite client in your React components. Below is an example of how to create a simple login form using the `Account` service from Appwrite. ```javascript +// src/components/Login.js import React, { useState } from 'react'; -import { account } from './lib/appwrite'; +import { account } from '../lib/appwrite'; -function App() { +function Login() { const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); - const [name, setName] = useState(''); - const [loggedInUser, setLoggedInUser] = useState(null); - const login = async (email, password) => { + const handleLogin = async (e) => { + e.preventDefault(); + try { - const response = await account.createSession(email, password); - setLoggedInUser(response); + await account.createEmailSession(email, password); + alert('Login successful!'); } catch (error) { - console.error(error); + alert('Login failed: ' + error.message); } }; return ( -
-

{loggedInUser ? `Logged in as ${loggedInUser.name}` : 'Not logged in'}

+
setEmail(e.target.value)} + required /> setPassword(e.target.value)} + required /> - setName(e.target.value)} - /> - -
+ + ); } -export default App; +export default Login; ``` -### Summary: -By following these steps, you can set up Appwrite with React and create a simple login form. This example demonstrates how to initialize the Appwrite SDK and use it to handle user authentication. For more advanced features, refer to the [Appwrite documentation](https://appwrite.io/docs). +### 4. Set Up a Collection (Optional) + +If you want to manage data using Appwrite's database, you can set up a collection in the Appwrite console. Here's how you can initialize a database and create a collection: + +```javascript +// In your Appwrite setup file +const databases = new Databases(client); + +// Example of creating a collection +async function createCollection() { + try { + const response = await databases.createCollection('databaseId', 'collectionId', 'Collection Name'); + console.log(response); + } catch (error) { + console.error(error); + } +} +``` + +### Summary + +- Install the Appwrite SDK. +- Initialize the Appwrite client with your project details. +- Use the `Account` service for authentication in your React components. +- Optionally, use the `Databases` service to manage your data collections. -Sources: -- https://appwrite.io/docs/tutorials/nextjs-ssr-auth/step-1/ -- https://appwrite.io/docs/tutorials/nextjs-ssr-auth/step-2/ -- https://appwrite.io/docs/quick-starts/react/ -- https://appwrite.io/docs/tutorials/react/step-3/ -- https://appwrite.io/docs/quick-starts/react-native/ +This setup will help you integrate Appwrite services like authentication and database management into your React application. \ No newline at end of file diff --git a/tests/show-me-how-i-can-set-up-database-collections-and-documents.md b/tests/show-me-how-i-can-set-up-database-collections-and-documents.md index 65b5ea2..663f9db 100644 --- a/tests/show-me-how-i-can-set-up-database-collections-and-documents.md +++ b/tests/show-me-how-i-can-set-up-database-collections-and-documents.md @@ -1,71 +1,51 @@ -To set up database collections and documents in Appwrite, you can follow these steps. I'll provide examples using the Node.js and Web Appwrite SDKs. +To set up database collections and documents in Appwrite, you can follow these steps: -### Step-by-Step Guide +### Creating a Collection -1. **Create a Database:** - - Head to your [Appwrite Console](https://cloud.appwrite.io/console/). - - Create a database and name it `Oscar`. Optionally, add a custom database ID. +1. **Navigate to the Appwrite Console**: Go to the [Appwrite Console](https://cloud.appwrite.io/). +2. **Create a Collection**: + - Head to the **Databases** page. + - Select the desired database or create a new one. + - Click on **Create collection** to start setting up a new collection. -2. **Create a Collection:** - - Navigate to the **Databases** page. - - Select the `Oscar` database. - - Click **Create collection** and name it `My books`. Optionally, add a custom collection ID. - -3. **Define Collection Attributes:** - - Navigate to **Attributes**. - - Click **Create attribute** and select **String**. - - Enter **Attribute key** (e.g., `title`) and **Size** (e.g., `100`). - -4. **Set Permissions:** +3. **Configure Permissions**: - Navigate to **Settings** > **Permissions**. - Add a new role **Any**. - - Check the **CREATE** and **READ** permissions, so anyone can create and read documents. - -### Code Examples + - Check the **CREATE** and **READ** permissions to allow anyone to create and read documents. -#### Using Node.js SDK +### Creating a Document -First, install the Appwrite Node.js SDK: - -```bash -npm install node-appwrite -``` +Once you have your collection set up, you can create documents using the SDKs. -Then, use the following code to create a document: +#### Node.js SDK Example ```javascript -const { Client, Databases } = require('node-appwrite'); +const sdk = require('node-appwrite'); // Initialize the client -const client = new Client() - .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint +const client = new sdk.Client(); +client + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('') // Your project ID - .setKey('YOUR_API_KEY'); // Your secret API key + .setKey('your-api-key'); // Your secret API key -// Initialize the Databases service -const databases = new Databases(client); +// Initialize the Database service +const databases = new sdk.Databases(client); // Create a document -const promise = databases.createDocument('', '', 'unique()', { - title: 'My First Book' -}); - -promise.then(response => { - console.log(response); // Success -}, error => { - console.log(error); // Failure +databases.createDocument('', '', '', { + 'field1': 'value1', + 'field2': 'value2' +}) +.then(response => { + console.log(response); +}) +.catch(error => { + console.error(error); }); ``` -#### Using Web SDK - -First, include the Appwrite Web SDK in your project. You can use a CDN or install it via npm: - -```bash -npm install appwrite -``` - -Then, use the following code to create a document: +#### Web SDK Example ```javascript import { Client, Databases } from 'appwrite'; @@ -73,36 +53,28 @@ import { Client, Databases } from 'appwrite'; // Initialize the client const client = new Client(); client - .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject(''); // Your project ID -// Initialize the Databases service +// Initialize the Database service const databases = new Databases(client); // Create a document -databases.createDocument('', '', 'unique()', { - title: 'My First Book' +databases.createDocument('', '', '', { + 'field1': 'value1', + 'field2': 'value2' }) .then(response => { - console.log(response); // Success + console.log(response); }) .catch(error => { - console.log(error); // Failure + console.error(error); }); ``` -### Summary - -1. **Create a database** in the Appwrite Console. -2. **Create a collection** within that database. -3. **Define attributes** for the collection. -4. **Set permissions** for the collection. -5. **Use the SDK** to create documents within the collection. +### Notes -By following these steps and using the provided code examples, you can set up database collections and documents in Appwrite. +- Replace ``, ``, ``, ``, and `your-api-key` with your actual project, database, collection, document IDs, and API key. +- Ensure that the collection attributes are correctly defined to validate and store data according to your collection structure. -Sources: -- https://appwrite.io/docs/tutorials/react/step-6/ -- https://appwrite.io/docs/products/databases/collections/ -- https://appwrite.io/docs/references/cloud/client-android-java/databases -- https://appwrite.io/docs/products/databases/quick-start/ +This setup allows you to manage collections and documents efficiently within your Appwrite project. \ No newline at end of file diff --git a/tests/what-endpoints-are-available-for-the-avatars-api-im-using-the-php-sdk.md b/tests/what-endpoints-are-available-for-the-avatars-api-im-using-the-php-sdk.md index be43fa7..ff10b4c 100644 --- a/tests/what-endpoints-are-available-for-the-avatars-api-im-using-the-php-sdk.md +++ b/tests/what-endpoints-are-available-for-the-avatars-api-im-using-the-php-sdk.md @@ -1,47 +1,60 @@ -Based on the provided context, the only endpoint mentioned for the Avatars API is: - -```text -GET /avatars/image -``` - -However, this context does not provide a comprehensive list of all available endpoints for the Avatars API. For a complete list of endpoints and their functionalities, I recommend referring to the official Appwrite documentation. - -If you need to use the Avatars API with the PHP SDK, here is an example of how you might use the `GET /avatars/image` endpoint: - -### PHP SDK Example - -```php -setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - ->setProject('YOUR_PROJECT_ID') // Your project ID - ->setKey('YOUR_API_KEY'); // Your secret API key - -$avatars = new Avatars($client); - -try { - $response = $avatars->getImage('https://example.com/image.png'); - echo $response; // Handle the response as needed -} catch (Exception $e) { - echo 'Error: ' . $e->getMessage(); -} -``` - -Make sure to replace `'YOUR_PROJECT_ID'`, `'YOUR_API_KEY'`, and the URL in `getImage` with your actual project ID, API key, and image URL respectively. - -For more detailed information and additional endpoints, please refer to the [Appwrite Avatars API documentation](https://appwrite.io/docs/client/avatars). - -Sources: -- https://appwrite.io/docs/references/cloud/server-nodejs/avatars -- https://appwrite.io/docs/references/cloud/client-rest/avatars -- https://appwrite.io/docs/references/cloud/client-graphql/avatars -- https://appwrite.io/docs/references/cloud/server-dart/avatars -- https://appwrite.io/docs/references/cloud/client-apple/avatars +The Avatars API in the Appwrite PHP SDK provides several endpoints to help you manage and generate avatars. Here are the available endpoints: + +1. **GET /avatars/qr**: Generates a QR code image. + - Example in PHP: + ```php + use Appwrite\Client; + use Appwrite\Services\Avatars; + + $client = (new Client()) + ->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + + $avatars = new Avatars($client); + ``` + +2. **GET /avatars/image**: Fetches an image avatar. + - Example in PHP: + ```php + use Appwrite\Client; + use Appwrite\Services\Avatars; + + $client = (new Client()) + ->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + + $avatars = new Avatars($client); + ``` + +3. **GET /avatars/initials**: Generates an avatar with initials. + - Example in PHP: + ```php + use Appwrite\Client; + use Appwrite\Services\Avatars; + + $client = (new Client()) + ->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + + $avatars = new Avatars($client); + ``` + +4. **GET /avatars/browsers/{code}**: Fetches a browser icon by code. + - Example in PHP: + ```php + use Appwrite\Client; + use Appwrite\Services\Avatars; + use Appwrite\Enums\Browser; + + $client = (new Client()) + ->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + + $avatars = new Avatars($client); + ``` + +These endpoints allow you to generate and retrieve different types of avatars using the Appwrite PHP SDK. Make sure to replace placeholders like `` with your actual project details. \ No newline at end of file diff --git a/tests/whats-the-difference-between-server-and-client-sdks.md b/tests/whats-the-difference-between-server-and-client-sdks.md index 7098aa4..578a76f 100644 --- a/tests/whats-the-difference-between-server-and-client-sdks.md +++ b/tests/whats-the-difference-between-server-and-client-sdks.md @@ -1,73 +1,13 @@ -The difference between Server and Client SDKs in Appwrite primarily lies in their intended use cases and the environments in which they operate. +The main difference between Server and Client SDKs in Appwrite lies in their intended use cases and the permissions model they operate under: ### Client SDKs -Client SDKs are designed to be used in client-side applications, such as mobile apps or web applications. These SDKs are intended to run on the end-user's device and are typically used for operations that involve user interaction. They are optimized for security and performance in a client environment. - -**Key Characteristics:** -- **Environment:** Runs on the user's device (e.g., mobile app, web browser). -- **Security:** Includes mechanisms to handle authentication and authorization securely on the client side. -- **Use Cases:** User authentication, querying databases, file uploads, and other operations that require direct user input. +- **Purpose**: Designed for client-based applications such as web, mobile, or native apps that are used directly by end-users. +- **Permissions**: Client SDKs operate under user permissions. This means they can only access resources if the user has been granted the necessary permissions. +- **Use Case**: Ideal for applications where end-users will register, log in, and perform actions that require authentication and authorization. ### Server SDKs -Server SDKs are designed to be used in server-side applications. These SDKs are intended to run on your server and are typically used for backend operations that do not involve direct user interaction. They are optimized for performance and security in a server environment. - -**Key Characteristics:** -- **Environment:** Runs on a server (e.g., Node.js server, backend service). -- **Security:** Allows for more control over security and access permissions, suitable for backend operations. -- **Use Cases:** Managing databases, handling file storage, performing scheduled tasks, and other backend operations. - -### Example Code - -#### Client SDK Example (JavaScript for Web) -```javascript -import { Client, Databases } from 'appwrite'; - -const client = new Client(); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('projectID'); // Your project ID - -const databases = new Databases(client); - -// Example: Fetching a list of documents -databases.listDocuments('collectionID') - .then(response => { - console.log(response); - }) - .catch(error => { - console.error(error); - }); -``` - -#### Server SDK Example (Node.js) -```javascript -const { Client, Databases } = require('appwrite'); - -const client = new Client(); - -client - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('projectID') // Your project ID - .setKey('API_KEY'); // Your secret API key - -const databases = new Databases(client); - -// Example: Fetching a list of documents -databases.listDocuments('collectionID') - .then(response => { - console.log(response); - }) - .catch(error => { - console.error(error); - }); -``` - -In summary, Client SDKs are for client-side applications and are optimized for secure interactions with the end-user, while Server SDKs are for server-side applications and offer more control over backend operations. +- **Purpose**: Intended for backend or server applications like admin apps, CLI tools, or server-side rendered web apps. +- **Permissions**: Server SDKs can bypass user permissions and are constrained by the scope of an API key. This allows server applications to access resources directly, regardless of the permissions set on those resources. +- **Use Case**: Suitable for applications that require more control and flexibility, such as performing administrative tasks or handling sensitive operations that should not be exposed to end-users. -Sources: -- https://appwrite.io/docs/references/cloud/client-android-java/storage -- https://appwrite.io/docs/references/cloud/server-nodejs/storage -- https://appwrite.io/docs/references/cloud/server-swift/storage -- https://appwrite.io/docs/references/cloud/client-android-java/databases -- https://appwrite.io/docs/references/cloud/server-dart/storage +In summary, choose Client SDKs for applications that interact directly with end-users and require user-based permissions. Opt for Server SDKs when building backend services or applications that need broader access to resources without user-specific permissions. \ No newline at end of file