@nocobase/plugin-ai 2.1.0-alpha.40 → 2.1.0-alpha.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai/docs/nocobase/ai-dev/capabilities.md +1 -1
- package/dist/ai/docs/nocobase/ai-dev/index.md +1 -1
- package/dist/ai/docs/nocobase/ai-dev/watermark-plugin.md +1 -1
- package/dist/ai/docs/nocobase/api/cli/app/index.md +4 -4
- package/dist/ai/docs/nocobase/api/cli/app/restart.md +4 -2
- package/dist/ai/docs/nocobase/api/cli/app/start.md +6 -2
- package/dist/ai/docs/nocobase/api/cli/app/stop.md +2 -2
- package/dist/ai/docs/nocobase/api/cli/app/upgrade.md +27 -6
- package/dist/ai/docs/nocobase/api/cli/config/delete.md +4 -1
- package/dist/ai/docs/nocobase/api/cli/config/get.md +4 -1
- package/dist/ai/docs/nocobase/api/cli/config/index.md +21 -0
- package/dist/ai/docs/nocobase/api/cli/config/set.md +9 -2
- package/dist/ai/docs/nocobase/api/cli/init.md +1 -1
- package/dist/ai/docs/nocobase/api/cli/license/plugins/sync.md +4 -0
- package/dist/ai/docs/nocobase/api/cli/self/update.md +2 -0
- package/dist/ai/docs/nocobase/auth-verification/api-keys/index.md +1 -1
- package/dist/ai/docs/nocobase/file-manager/file-preview/index.md +17 -0
- package/dist/ai/docs/nocobase/get-started/installation/env.md +6 -2
- package/dist/ai/docs/nocobase/integration/api-keys/index.md +1 -1
- package/dist/ai/docs/nocobase/integration/embed/index.md +3 -3
- package/dist/ai/docs/nocobase/multi-app/multi-app/app-block-and-switcher.md +68 -0
- package/dist/ai/docs/nocobase/multi-app/multi-app/app-sso.md +71 -0
- package/dist/ai/docs/nocobase/multi-app/multi-app/index.md +9 -1
- package/dist/ai/docs/nocobase/multi-app/multi-app/sub-app-api.md +112 -0
- package/dist/ai/docs/nocobase/plugin-development/build.md +5 -0
- package/dist/ai/docs/nocobase/plugin-development/client/appendix/faq.md +3 -3
- package/dist/ai/docs/nocobase/plugin-development/client/component/index.md +1 -1
- package/dist/ai/docs/nocobase/plugin-development/client/ctx/common-capabilities.md +2 -2
- package/dist/ai/docs/nocobase/plugin-development/client/ctx/index.md +1 -1
- package/dist/ai/docs/nocobase/plugin-development/client/router.md +11 -11
- package/dist/ai/docs/nocobase/plugin-development/write-your-first-plugin.md +28 -0
- package/dist/ai/docs/nocobase/solution/all-in-one/installation.md +181 -0
- package/dist/ai/docs/nocobase/solution/crm/changelog.md +0 -3
- package/dist/ai/docs/nocobase/solution/crm/installation.md +6 -76
- package/dist/ai/docs/nocobase/solution/crm/v1.md +6 -35
- package/dist/ai/docs/nocobase/solution/ticket-system/changelog.md +0 -2
- package/dist/ai/docs/nocobase/solution/ticket-system/installation.md +6 -69
- package/dist/ai/docs/nocobase/workflow/nodes/javascript.md +4 -2
- package/dist/client/{406.15c09d98faa2ccf1.js → 406.9a530334eae8cede.js} +1 -1
- package/dist/client/{428.e9f38da3b0d8b498.js → 428.431a00d29107058e.js} +1 -1
- package/dist/client/462.d172d0fe91519e35.js +10 -0
- package/dist/client/559.a0f2f1cc2be3c039.js +10 -0
- package/dist/client/index.js +2 -2
- package/dist/client/workflow/nodes/employee/index.d.ts +1 -4
- package/dist/client/workflow/nodes/llm/index.d.ts +1 -4
- package/dist/client-v2/index.js +1 -1
- package/dist/collections/ai-employees.d.ts +9 -2
- package/dist/collections/ai-employees.js +2 -1
- package/dist/externalVersion.js +22 -22
- package/dist/locale/de-DE.json +1 -0
- package/dist/locale/en-US.json +2 -1
- package/dist/locale/es-ES.json +1 -0
- package/dist/locale/fr-FR.json +1 -0
- package/dist/locale/hu-HU.json +1 -0
- package/dist/locale/id-ID.json +1 -0
- package/dist/locale/it-IT.json +1 -0
- package/dist/locale/ja-JP.json +1 -0
- package/dist/locale/ko-KR.json +1 -0
- package/dist/locale/nl-NL.json +1 -0
- package/dist/locale/pt-BR.json +1 -0
- package/dist/locale/ru-RU.json +1 -0
- package/dist/locale/tr-TR.json +1 -0
- package/dist/locale/uk-UA.json +1 -0
- package/dist/locale/vi-VN.json +1 -0
- package/dist/locale/zh-CN.json +2 -1
- package/dist/locale/zh-TW.json +1 -0
- package/dist/node_modules/@langchain/xai/dist/index.cjs +16 -2
- package/dist/node_modules/@langchain/xai/package.json +1 -1
- package/dist/node_modules/fs-extra/package.json +1 -1
- package/dist/node_modules/jsonrepair/package.json +1 -1
- package/dist/node_modules/just-bash/package.json +1 -1
- package/dist/node_modules/nodejs-snowflake/package.json +1 -1
- package/dist/node_modules/openai/package.json +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/ai-employees/ai-employee.d.ts +2 -1
- package/dist/server/ai-employees/ai-employee.js +3 -1
- package/dist/server/llm-providers/anthropic.js +17 -23
- package/dist/server/llm-providers/dashscope.js +3 -3
- package/dist/server/llm-providers/deepseek.js +2 -2
- package/dist/server/llm-providers/google-genai.js +17 -22
- package/dist/server/llm-providers/kimi/provider.js +4 -4
- package/dist/server/llm-providers/mimo.js +2 -2
- package/dist/server/llm-providers/ollama.js +14 -21
- package/dist/server/llm-providers/openai/completions.js +2 -2
- package/dist/server/llm-providers/openai/embedding.js +1 -1
- package/dist/server/llm-providers/openai/responses.js +2 -2
- package/dist/server/llm-providers/provider.d.ts +3 -1
- package/dist/server/llm-providers/provider.js +61 -24
- package/dist/server/llm-providers/xai.js +2 -2
- package/dist/server/resource/ai.js +11 -9
- package/dist/server/utils.d.ts +1 -1
- package/dist/server/workflow/nodes/employee/constants.d.ts +23 -0
- package/dist/server/workflow/nodes/employee/constants.js +50 -0
- package/dist/server/workflow/nodes/employee/handler.js +23 -2
- package/dist/server/workflow/nodes/employee/index.d.ts +1 -0
- package/dist/server/workflow/nodes/employee/index.js +83 -25
- package/dist/server/workflow/nodes/employee/tools.d.ts +2 -2
- package/dist/server/workflow/nodes/employee/tools.js +26 -5
- package/dist/server/workflow/nodes/employee/types.d.ts +4 -3
- package/dist/server/workflow/nodes/llm/index.js +31 -9
- package/package.json +7 -7
- package/dist/client/462.1708385b148779cd.js +0 -10
- package/dist/client/559.585f80c3bcea0bed.js +0 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@langchain/xai","version":"1.3.3","description":"xAI integration for LangChain.js","author":"LangChain","license":"MIT","type":"module","engines":{"node":">=20"},"repository":{"type":"git","url":"git@github.com:langchain-ai/langchainjs.git"},"homepage":"https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-xai/","dependencies":{"@langchain/openai":"1.2.7"},"peerDependencies":{"@langchain/core":"^1.0.0"},"devDependencies":{"@tsconfig/recommended":"^1.0.3","@types/uuid":"^9","@vitest/coverage-v8":"^3.2.4","dotenv":"^16.3.1","dpdm":"^3.14.0","eslint":"^9.34.0","prettier":"^3.5.0","typescript":"~5.8.3","vitest":"^3.2.4","zod":"^3.25.76","@langchain/core":"^1.1.21","@langchain/eslint":"0.1.1","@langchain/openai":"^1.2.7","@langchain/tsconfig":"0.0.1","@langchain/standard-tests":"0.0.23"},"publishConfig":{"access":"public"},"main":"./dist/index.cjs","types":"./dist/index.d.cts","exports":{".":{"input":"./src/index.ts","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"},"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"./package.json":"./package.json"},"files":["dist/","CHANGELOG.md","README.md","LICENSE"],"module":"./dist/index.js","scripts":{"build":"turbo build:compile --filter @langchain/xai --output-logs new-only","build:compile":"tsdown","lint:eslint":"eslint --cache src/","lint:dpdm":"dpdm --skip-dynamic-imports circular --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts","lint":"pnpm lint:eslint && pnpm lint:dpdm","lint:fix":"pnpm lint:eslint --fix && pnpm lint:dpdm","clean":"rm -rf .turbo dist/","test":"vitest run","test:watch":"vitest --watch","test:int":"vitest --mode int","test:standard:unit":"vitest --mode standard-unit","test:standard:int":"vitest --mode standard-int","test:standard":"pnpm test:standard:unit && pnpm test:standard:int","format":"prettier --write \"src\"","format:check":"prettier --check \"src\"","typegen":"pnpm run typegen:profiles","typegen:profiles":"pnpm --filter @langchain/model-profiles make --config profiles.toml"},"_lastModified":"2026-
|
|
1
|
+
{"name":"@langchain/xai","version":"1.3.3","description":"xAI integration for LangChain.js","author":"LangChain","license":"MIT","type":"module","engines":{"node":">=20"},"repository":{"type":"git","url":"git@github.com:langchain-ai/langchainjs.git"},"homepage":"https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-xai/","dependencies":{"@langchain/openai":"1.2.7"},"peerDependencies":{"@langchain/core":"^1.0.0"},"devDependencies":{"@tsconfig/recommended":"^1.0.3","@types/uuid":"^9","@vitest/coverage-v8":"^3.2.4","dotenv":"^16.3.1","dpdm":"^3.14.0","eslint":"^9.34.0","prettier":"^3.5.0","typescript":"~5.8.3","vitest":"^3.2.4","zod":"^3.25.76","@langchain/core":"^1.1.21","@langchain/eslint":"0.1.1","@langchain/openai":"^1.2.7","@langchain/tsconfig":"0.0.1","@langchain/standard-tests":"0.0.23"},"publishConfig":{"access":"public"},"main":"./dist/index.cjs","types":"./dist/index.d.cts","exports":{".":{"input":"./src/index.ts","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"},"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"./package.json":"./package.json"},"files":["dist/","CHANGELOG.md","README.md","LICENSE"],"module":"./dist/index.js","scripts":{"build":"turbo build:compile --filter @langchain/xai --output-logs new-only","build:compile":"tsdown","lint:eslint":"eslint --cache src/","lint:dpdm":"dpdm --skip-dynamic-imports circular --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts","lint":"pnpm lint:eslint && pnpm lint:dpdm","lint:fix":"pnpm lint:eslint --fix && pnpm lint:dpdm","clean":"rm -rf .turbo dist/","test":"vitest run","test:watch":"vitest --watch","test:int":"vitest --mode int","test:standard:unit":"vitest --mode standard-unit","test:standard:int":"vitest --mode standard-int","test:standard":"pnpm test:standard:unit && pnpm test:standard:int","format":"prettier --write \"src\"","format:check":"prettier --check \"src\"","typegen":"pnpm run typegen:profiles","typegen:profiles":"pnpm --filter @langchain/model-profiles make --config profiles.toml"},"_lastModified":"2026-06-04T11:31:08.326Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"fs-extra","version":"9.1.0","description":"fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as recursive mkdir, copy, and remove.","engines":{"node":">=10"},"homepage":"https://github.com/jprichardson/node-fs-extra","repository":{"type":"git","url":"https://github.com/jprichardson/node-fs-extra"},"keywords":["fs","file","file system","copy","directory","extra","mkdirp","mkdir","mkdirs","recursive","json","read","write","extra","delete","remove","touch","create","text","output","move","promise"],"author":"JP Richardson <jprichardson@gmail.com>","license":"MIT","dependencies":{"at-least-node":"^1.0.0","graceful-fs":"^4.2.0","jsonfile":"^6.0.1","universalify":"^2.0.0"},"devDependencies":{"coveralls":"^3.0.0","klaw":"^2.1.1","klaw-sync":"^3.0.2","minimist":"^1.1.1","mocha":"^5.0.5","nyc":"^15.0.0","proxyquire":"^2.0.1","read-dir-files":"^0.1.1","standard":"^14.1.0"},"main":"./lib/index.js","files":["lib/","!lib/**/__tests__/"],"scripts":{"full-ci":"npm run lint && npm run coverage","coverage":"nyc -r lcovonly npm run unit","coveralls":"coveralls < coverage/lcov.info","lint":"standard","test-find":"find ./lib/**/__tests__ -name *.test.js | xargs mocha","test":"npm run lint && npm run unit","unit":"node test.js"},"_lastModified":"2026-
|
|
1
|
+
{"name":"fs-extra","version":"9.1.0","description":"fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as recursive mkdir, copy, and remove.","engines":{"node":">=10"},"homepage":"https://github.com/jprichardson/node-fs-extra","repository":{"type":"git","url":"https://github.com/jprichardson/node-fs-extra"},"keywords":["fs","file","file system","copy","directory","extra","mkdirp","mkdir","mkdirs","recursive","json","read","write","extra","delete","remove","touch","create","text","output","move","promise"],"author":"JP Richardson <jprichardson@gmail.com>","license":"MIT","dependencies":{"at-least-node":"^1.0.0","graceful-fs":"^4.2.0","jsonfile":"^6.0.1","universalify":"^2.0.0"},"devDependencies":{"coveralls":"^3.0.0","klaw":"^2.1.1","klaw-sync":"^3.0.2","minimist":"^1.1.1","mocha":"^5.0.5","nyc":"^15.0.0","proxyquire":"^2.0.1","read-dir-files":"^0.1.1","standard":"^14.1.0"},"main":"./lib/index.js","files":["lib/","!lib/**/__tests__/"],"scripts":{"full-ci":"npm run lint && npm run coverage","coverage":"nyc -r lcovonly npm run unit","coveralls":"coveralls < coverage/lcov.info","lint":"standard","test-find":"find ./lib/**/__tests__ -name *.test.js | xargs mocha","test":"npm run lint && npm run unit","unit":"node test.js"},"_lastModified":"2026-06-04T11:31:08.493Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"jsonrepair","version":"3.13.1","description":"Repair broken JSON documents","repository":{"type":"git","url":"https://github.com/josdejong/jsonrepair.git"},"type":"module","main":"lib/cjs/index.js","module":"lib/esm/index.js","browser":"lib/umd/jsonrepair.min.js","types":"lib/types/index.d.ts","sideEffects":false,"exports":{".":{"import":"./lib/esm/index.js","require":"./lib/cjs/index.js","types":"./lib/types/index.d.ts"},"./stream":{"import":"./lib/esm/stream.js","require":"./lib/cjs/stream.js","types":"./lib/types/stream.d.ts"}},"keywords":["simple","json","repair","fix","invalid","stream","streaming"],"bin":{"jsonrepair":"./bin/cli.js"},"scripts":{"test":"vitest watch src","test:it":"vitest run src","build":"npm-run-all build:**","build:clean":"del-cli lib","build:esm":"babel src --out-dir lib/esm --extensions \".ts\" --source-maps --config-file ./babel.config.json","build:cjs":"babel src --out-dir lib/cjs --extensions \".ts\" --source-maps --config-file ./babel-cjs.config.json && cpy tools/cjs lib/cjs --flat","build:umd":"rollup lib/esm/index.js --format umd --name JSONRepair --sourcemap --output.file lib/umd/jsonrepair.js && cpy tools/cjs/package.json lib/umd --flat","build:umd:min":"uglifyjs --compress --mangle --source-map --comments --output lib/umd/jsonrepair.min.js -- lib/umd/jsonrepair.js","build:types":"tsc --project tsconfig-types.json","build:validate":"vitest run test-lib","lint":"biome check","format":"biome check --write","benchmark":"npm run build:esm && node tools/benchmark/run.mjs","build-and-test":"npm run lint && npm run test:it && npm run build","release":"npm-run-all release:**","release:build-and-test":"npm run build-and-test","release:version":"standard-version","release:push":"git push && git push --tag","release:publish":"npm publish","release-dry-run":"npm run build-and-test && standard-version --dry-run","prepare":"husky"},"files":["README.md","LICENSE.md","lib"],"author":"Jos de Jong","license":"ISC","devDependencies":{"@babel/cli":"7.28.3","@babel/core":"7.28.4","@babel/plugin-transform-typescript":"7.28.0","@babel/preset-env":"7.28.3","@babel/preset-typescript":"7.27.1","@biomejs/biome":"2.2.4","@commitlint/cli":"19.8.1","@commitlint/config-conventional":"19.8.1","@types/node":"24.5.2","cpy-cli":"6.0.0","del-cli":"7.0.0","husky":"9.1.7","npm-run-all":"4.1.5","rollup":"4.51.0","standard-version":"9.5.0","tinybench":"5.0.1","ts-node":"10.9.2","typescript":"5.9.2","uglify-js":"3.19.3","vitest":"3.2.4"},"_lastModified":"2026-
|
|
1
|
+
{"name":"jsonrepair","version":"3.13.1","description":"Repair broken JSON documents","repository":{"type":"git","url":"https://github.com/josdejong/jsonrepair.git"},"type":"module","main":"lib/cjs/index.js","module":"lib/esm/index.js","browser":"lib/umd/jsonrepair.min.js","types":"lib/types/index.d.ts","sideEffects":false,"exports":{".":{"import":"./lib/esm/index.js","require":"./lib/cjs/index.js","types":"./lib/types/index.d.ts"},"./stream":{"import":"./lib/esm/stream.js","require":"./lib/cjs/stream.js","types":"./lib/types/stream.d.ts"}},"keywords":["simple","json","repair","fix","invalid","stream","streaming"],"bin":{"jsonrepair":"./bin/cli.js"},"scripts":{"test":"vitest watch src","test:it":"vitest run src","build":"npm-run-all build:**","build:clean":"del-cli lib","build:esm":"babel src --out-dir lib/esm --extensions \".ts\" --source-maps --config-file ./babel.config.json","build:cjs":"babel src --out-dir lib/cjs --extensions \".ts\" --source-maps --config-file ./babel-cjs.config.json && cpy tools/cjs lib/cjs --flat","build:umd":"rollup lib/esm/index.js --format umd --name JSONRepair --sourcemap --output.file lib/umd/jsonrepair.js && cpy tools/cjs/package.json lib/umd --flat","build:umd:min":"uglifyjs --compress --mangle --source-map --comments --output lib/umd/jsonrepair.min.js -- lib/umd/jsonrepair.js","build:types":"tsc --project tsconfig-types.json","build:validate":"vitest run test-lib","lint":"biome check","format":"biome check --write","benchmark":"npm run build:esm && node tools/benchmark/run.mjs","build-and-test":"npm run lint && npm run test:it && npm run build","release":"npm-run-all release:**","release:build-and-test":"npm run build-and-test","release:version":"standard-version","release:push":"git push && git push --tag","release:publish":"npm publish","release-dry-run":"npm run build-and-test && standard-version --dry-run","prepare":"husky"},"files":["README.md","LICENSE.md","lib"],"author":"Jos de Jong","license":"ISC","devDependencies":{"@babel/cli":"7.28.3","@babel/core":"7.28.4","@babel/plugin-transform-typescript":"7.28.0","@babel/preset-env":"7.28.3","@babel/preset-typescript":"7.27.1","@biomejs/biome":"2.2.4","@commitlint/cli":"19.8.1","@commitlint/config-conventional":"19.8.1","@types/node":"24.5.2","cpy-cli":"6.0.0","del-cli":"7.0.0","husky":"9.1.7","npm-run-all":"4.1.5","rollup":"4.51.0","standard-version":"9.5.0","tinybench":"5.0.1","ts-node":"10.9.2","typescript":"5.9.2","uglify-js":"3.19.3","vitest":"3.2.4"},"_lastModified":"2026-06-04T11:31:14.979Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"just-bash","version":"2.14.3","description":"A simulated bash environment with virtual filesystem","repository":{"type":"git","url":"git+https://github.com/vercel-labs/just-bash.git"},"homepage":"https://github.com/vercel-labs/just-bash#readme","bugs":{"url":"https://github.com/vercel-labs/just-bash/issues"},"type":"module","main":"dist/bundle/index.js","types":"dist/index.d.ts","exports":{".":{"browser":"./dist/bundle/browser.js","require":{"types":"./dist/index.d.cts","default":"./dist/bundle/index.cjs"},"import":{"types":"./dist/index.d.ts","default":"./dist/bundle/index.js"}},"./browser":{"types":"./dist/browser.d.ts","import":"./dist/bundle/browser.js"}},"files":["dist/bundle/","dist/bin/","dist/*.d.ts","dist/*.d.cts","dist/ast/*.d.ts","dist/commands/**/*.d.ts","dist/fs/**/*.d.ts","dist/interpreter/**/*.d.ts","dist/network/**/*.d.ts","dist/parser/*.d.ts","dist/sandbox/*.d.ts","dist/utils/*.d.ts","vendor/cpython-emscripten/","README.md","CHANGELOG.md","dist/AGENTS.md"],"bin":{"just-bash":"./dist/bin/just-bash.js","just-bash-shell":"./dist/bin/shell/shell.js"},"publishConfig":{"access":"public"},"keywords":[],"author":"Malte and Claude","license":"Apache-2.0","devDependencies":{"@types/ini":"^4.1.1","@types/node":"^25.0.3","@types/papaparse":"^5.5.2","@types/sprintf-js":"^1.1.4","@types/sql.js":"^1.4.9","@types/turndown":"^5.0.6","@vitest/coverage-v8":"^4.0.18","esbuild":"^0.27.2","fast-check":"^3.23.2","knip":"^5.41.1","typescript":"^5.9.3","vitest":"^4.0.16"},"dependencies":{"seek-bzip":"^2.0.0","diff":"^8.0.2","fast-xml-parser":"5.3.3","file-type":"^21.2.0","ini":"^6.0.0","minimatch":"^10.1.1","modern-tar":"^0.7.3","papaparse":"^5.5.3","quickjs-emscripten":"^0.32.0","re2js":"^1.2.1","smol-toml":"^1.6.0","sprintf-js":"^1.1.3","sql.js":"^1.13.0","turndown":"^7.2.2","yaml":"^2.8.2"},"optionalDependencies":{"@mongodb-js/zstd":"^7.0.0","node-liblzma":"^2.0.3"},"scripts":{"build":"rm -rf dist && tsc && pnpm build:lib && pnpm build:lib:cjs && pnpm build:browser && pnpm build:cli && pnpm build:shell && pnpm build:worker && pnpm build:clean && cp dist/index.d.ts dist/index.d.cts && sed '1,/^-->/d' AGENTS.npm.md > dist/AGENTS.md","build:clean":"find dist -name '*.test.js' -delete && find dist -name '*.test.d.ts' -delete","build:worker":"esbuild src/commands/python3/worker.ts --bundle --platform=node --format=esm --outfile=src/commands/python3/worker.js --external:../../../vendor/cpython-emscripten/* && cp src/commands/python3/worker.js dist/commands/python3/worker.js && mkdir -p dist/bin/chunks && cp src/commands/python3/worker.js dist/bin/chunks/worker.js && mkdir -p dist/bundle/chunks && cp src/commands/python3/worker.js dist/bundle/chunks/worker.js && esbuild src/commands/js-exec/js-exec-worker.ts --bundle --platform=node --format=esm --outfile=src/commands/js-exec/js-exec-worker.js --external:quickjs-emscripten && cp src/commands/js-exec/js-exec-worker.js dist/commands/js-exec/js-exec-worker.js && cp src/commands/js-exec/js-exec-worker.js dist/bin/chunks/js-exec-worker.js && cp src/commands/js-exec/js-exec-worker.js dist/bundle/chunks/js-exec-worker.js","build:lib":"esbuild dist/index.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bundle --chunk-names=chunks/[name]-[hash] --external:diff --external:minimatch --external:sprintf-js --external:turndown --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:seek-bzip","build:lib:cjs":"esbuild dist/index.js --bundle --platform=node --format=cjs --minify --outfile=dist/bundle/index.cjs --external:diff --external:minimatch --external:sprintf-js --external:turndown --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:seek-bzip","build:browser":"esbuild dist/browser.js --bundle --platform=browser --format=esm --minify --outfile=dist/bundle/browser.js --external:diff --external:minimatch --external:sprintf-js --external:turndown --external:node:zlib --external:@mongodb-js/zstd --external:node-liblzma --external:seek-bzip --define:__BROWSER__=true --alias:node:dns=./src/shims/browser-unsupported.js","build:cli":"esbuild dist/cli/just-bash.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bin --entry-names=[name] --chunk-names=chunks/[name]-[hash] --banner:js='#!/usr/bin/env node' --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:seek-bzip","build:shell":"esbuild dist/cli/shell.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bin/shell --entry-names=[name] --chunk-names=chunks/[name]-[hash] --banner:js='#!/usr/bin/env node' --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:seek-bzip","validate":"pnpm lint && pnpm knip && pnpm typecheck && pnpm build && pnpm check:worker-sync && pnpm test:run && pnpm test:wasm && pnpm test:dist","typecheck":"tsc --noEmit","lint":"pnpm lint:banned","check:worker-sync":"node scripts/check-worker-sync.js","lint:banned":"node scripts/check-banned-patterns.js","lint:fix":"pnpm --workspace-root lint:fix","knip":"knip","test":"vitest","test:run":"vitest run --exclude src/security/fuzzing/ --exclude src/commands/python3/ --exclude src/commands/sqlite3/ --exclude src/commands/js-exec/ --exclude src/agent-examples/python-scripting.test.ts","test:dist":"vitest run src/cli/just-bash.bundle.test.ts","test:unit":"vitest run --config vitest.unit.config.ts","test:wasm":"vitest run --config vitest.wasm.config.ts","test:comparison":"vitest run --config vitest.comparison.config.ts","test:comparison:record":"RECORD_FIXTURES=1 vitest run --config vitest.comparison.config.ts","test:coverage":"vitest run --coverage","test:coverage:unit":"vitest run --config vitest.unit.config.ts --coverage","test:fuzz":"vitest run src/security/fuzzing/","test:fuzz:long":"FUZZ_RUNS=10000 vitest run src/security/fuzzing/","shell":"npx tsx src/cli/shell.ts","dev:exec":"npx tsx src/cli/exec.ts"},"_lastModified":"2026-
|
|
1
|
+
{"name":"just-bash","version":"2.14.3","description":"A simulated bash environment with virtual filesystem","repository":{"type":"git","url":"git+https://github.com/vercel-labs/just-bash.git"},"homepage":"https://github.com/vercel-labs/just-bash#readme","bugs":{"url":"https://github.com/vercel-labs/just-bash/issues"},"type":"module","main":"dist/bundle/index.js","types":"dist/index.d.ts","exports":{".":{"browser":"./dist/bundle/browser.js","require":{"types":"./dist/index.d.cts","default":"./dist/bundle/index.cjs"},"import":{"types":"./dist/index.d.ts","default":"./dist/bundle/index.js"}},"./browser":{"types":"./dist/browser.d.ts","import":"./dist/bundle/browser.js"}},"files":["dist/bundle/","dist/bin/","dist/*.d.ts","dist/*.d.cts","dist/ast/*.d.ts","dist/commands/**/*.d.ts","dist/fs/**/*.d.ts","dist/interpreter/**/*.d.ts","dist/network/**/*.d.ts","dist/parser/*.d.ts","dist/sandbox/*.d.ts","dist/utils/*.d.ts","vendor/cpython-emscripten/","README.md","CHANGELOG.md","dist/AGENTS.md"],"bin":{"just-bash":"./dist/bin/just-bash.js","just-bash-shell":"./dist/bin/shell/shell.js"},"publishConfig":{"access":"public"},"keywords":[],"author":"Malte and Claude","license":"Apache-2.0","devDependencies":{"@types/ini":"^4.1.1","@types/node":"^25.0.3","@types/papaparse":"^5.5.2","@types/sprintf-js":"^1.1.4","@types/sql.js":"^1.4.9","@types/turndown":"^5.0.6","@vitest/coverage-v8":"^4.0.18","esbuild":"^0.27.2","fast-check":"^3.23.2","knip":"^5.41.1","typescript":"^5.9.3","vitest":"^4.0.16"},"dependencies":{"seek-bzip":"^2.0.0","diff":"^8.0.2","fast-xml-parser":"5.3.3","file-type":"^21.2.0","ini":"^6.0.0","minimatch":"^10.1.1","modern-tar":"^0.7.3","papaparse":"^5.5.3","quickjs-emscripten":"^0.32.0","re2js":"^1.2.1","smol-toml":"^1.6.0","sprintf-js":"^1.1.3","sql.js":"^1.13.0","turndown":"^7.2.2","yaml":"^2.8.2"},"optionalDependencies":{"@mongodb-js/zstd":"^7.0.0","node-liblzma":"^2.0.3"},"scripts":{"build":"rm -rf dist && tsc && pnpm build:lib && pnpm build:lib:cjs && pnpm build:browser && pnpm build:cli && pnpm build:shell && pnpm build:worker && pnpm build:clean && cp dist/index.d.ts dist/index.d.cts && sed '1,/^-->/d' AGENTS.npm.md > dist/AGENTS.md","build:clean":"find dist -name '*.test.js' -delete && find dist -name '*.test.d.ts' -delete","build:worker":"esbuild src/commands/python3/worker.ts --bundle --platform=node --format=esm --outfile=src/commands/python3/worker.js --external:../../../vendor/cpython-emscripten/* && cp src/commands/python3/worker.js dist/commands/python3/worker.js && mkdir -p dist/bin/chunks && cp src/commands/python3/worker.js dist/bin/chunks/worker.js && mkdir -p dist/bundle/chunks && cp src/commands/python3/worker.js dist/bundle/chunks/worker.js && esbuild src/commands/js-exec/js-exec-worker.ts --bundle --platform=node --format=esm --outfile=src/commands/js-exec/js-exec-worker.js --external:quickjs-emscripten && cp src/commands/js-exec/js-exec-worker.js dist/commands/js-exec/js-exec-worker.js && cp src/commands/js-exec/js-exec-worker.js dist/bin/chunks/js-exec-worker.js && cp src/commands/js-exec/js-exec-worker.js dist/bundle/chunks/js-exec-worker.js","build:lib":"esbuild dist/index.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bundle --chunk-names=chunks/[name]-[hash] --external:diff --external:minimatch --external:sprintf-js --external:turndown --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:seek-bzip","build:lib:cjs":"esbuild dist/index.js --bundle --platform=node --format=cjs --minify --outfile=dist/bundle/index.cjs --external:diff --external:minimatch --external:sprintf-js --external:turndown --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:seek-bzip","build:browser":"esbuild dist/browser.js --bundle --platform=browser --format=esm --minify --outfile=dist/bundle/browser.js --external:diff --external:minimatch --external:sprintf-js --external:turndown --external:node:zlib --external:@mongodb-js/zstd --external:node-liblzma --external:seek-bzip --define:__BROWSER__=true --alias:node:dns=./src/shims/browser-unsupported.js","build:cli":"esbuild dist/cli/just-bash.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bin --entry-names=[name] --chunk-names=chunks/[name]-[hash] --banner:js='#!/usr/bin/env node' --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:seek-bzip","build:shell":"esbuild dist/cli/shell.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bin/shell --entry-names=[name] --chunk-names=chunks/[name]-[hash] --banner:js='#!/usr/bin/env node' --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:seek-bzip","validate":"pnpm lint && pnpm knip && pnpm typecheck && pnpm build && pnpm check:worker-sync && pnpm test:run && pnpm test:wasm && pnpm test:dist","typecheck":"tsc --noEmit","lint":"pnpm lint:banned","check:worker-sync":"node scripts/check-worker-sync.js","lint:banned":"node scripts/check-banned-patterns.js","lint:fix":"pnpm --workspace-root lint:fix","knip":"knip","test":"vitest","test:run":"vitest run --exclude src/security/fuzzing/ --exclude src/commands/python3/ --exclude src/commands/sqlite3/ --exclude src/commands/js-exec/ --exclude src/agent-examples/python-scripting.test.ts","test:dist":"vitest run src/cli/just-bash.bundle.test.ts","test:unit":"vitest run --config vitest.unit.config.ts","test:wasm":"vitest run --config vitest.wasm.config.ts","test:comparison":"vitest run --config vitest.comparison.config.ts","test:comparison:record":"RECORD_FIXTURES=1 vitest run --config vitest.comparison.config.ts","test:coverage":"vitest run --coverage","test:coverage:unit":"vitest run --config vitest.unit.config.ts --coverage","test:fuzz":"vitest run src/security/fuzzing/","test:fuzz:long":"FUZZ_RUNS=10000 vitest run src/security/fuzzing/","shell":"npx tsx src/cli/shell.ts","dev:exec":"npx tsx src/cli/exec.ts"},"_lastModified":"2026-06-04T11:31:14.816Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"nodejs-snowflake","collaborators":["Utkarsh Srivastava <utkarsh@sagacious.dev>"],"description":"Generate time sortable 64 bits unique ids for distributed systems (inspired from twitter snowflake)","version":"2.0.1","license":"Apache 2.0","repository":{"type":"git","url":"https://github.com/utkarsh-pro/nodejs-snowflake.git"},"files":["nodejs_snowflake_bg.wasm","nodejs_snowflake.js","nodejs_snowflake.d.ts"],"main":"nodejs_snowflake.js","types":"nodejs_snowflake.d.ts","_lastModified":"2026-
|
|
1
|
+
{"name":"nodejs-snowflake","collaborators":["Utkarsh Srivastava <utkarsh@sagacious.dev>"],"description":"Generate time sortable 64 bits unique ids for distributed systems (inspired from twitter snowflake)","version":"2.0.1","license":"Apache 2.0","repository":{"type":"git","url":"https://github.com/utkarsh-pro/nodejs-snowflake.git"},"files":["nodejs_snowflake_bg.wasm","nodejs_snowflake.js","nodejs_snowflake.d.ts"],"main":"nodejs_snowflake.js","types":"nodejs_snowflake.d.ts","_lastModified":"2026-06-04T11:31:03.243Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"openai","version":"6.22.0","description":"The official TypeScript library for the OpenAI API","author":"OpenAI <support@openai.com>","types":"./index.d.ts","main":"./index.js","type":"commonjs","repository":"github:openai/openai-node","license":"Apache-2.0","packageManager":"yarn@1.22.22","files":["**/*"],"private":false,"publishConfig":{"access":"public"},"scripts":{"test":"./scripts/test","build":"./scripts/build","format":"./scripts/format","tsn":"ts-node -r tsconfig-paths/register","lint":"./scripts/lint","fix":"./scripts/format"},"dependencies":{},"bin":{"openai":"bin/cli"},"exports":{".":{"require":{"types":"./index.d.ts","default":"./index.js"},"types":"./index.d.mts","default":"./index.mjs"},"./_vendor/*.mjs":{"default":"./_vendor/*.mjs"},"./_vendor/*.js":{"default":"./_vendor/*.js"},"./_vendor/*":{"import":"./_vendor/*.mjs","require":"./_vendor/*.js"},"./api-promise":{"import":"./api-promise.mjs","require":"./api-promise.js"},"./api-promise.js":{"default":"./api-promise.js"},"./api-promise.mjs":{"default":"./api-promise.mjs"},"./azure":{"import":"./azure.mjs","require":"./azure.js"},"./azure.js":{"default":"./azure.js"},"./azure.mjs":{"default":"./azure.mjs"},"./beta/*.mjs":{"default":"./beta/*.mjs"},"./beta/*.js":{"default":"./beta/*.js"},"./beta/*":{"import":"./beta/*.mjs","require":"./beta/*.js"},"./client":{"import":"./client.mjs","require":"./client.js"},"./client.js":{"default":"./client.js"},"./client.mjs":{"default":"./client.mjs"},"./core/*.mjs":{"default":"./core/*.mjs"},"./core/*.js":{"default":"./core/*.js"},"./core/*":{"import":"./core/*.mjs","require":"./core/*.js"},"./error":{"import":"./error.mjs","require":"./error.js"},"./error.js":{"default":"./error.js"},"./error.mjs":{"default":"./error.mjs"},"./helpers/*.mjs":{"default":"./helpers/*.mjs"},"./helpers/*.js":{"default":"./helpers/*.js"},"./helpers/*":{"import":"./helpers/*.mjs","require":"./helpers/*.js"},"./index":{"import":"./index.mjs","require":"./index.js"},"./index.js":{"default":"./index.js"},"./index.mjs":{"default":"./index.mjs"},"./lib/*.mjs":{"default":"./lib/*.mjs"},"./lib/*.js":{"default":"./lib/*.js"},"./lib/*":{"import":"./lib/*.mjs","require":"./lib/*.js"},"./pagination":{"import":"./pagination.mjs","require":"./pagination.js"},"./pagination.js":{"default":"./pagination.js"},"./pagination.mjs":{"default":"./pagination.mjs"},"./realtime/*.mjs":{"default":"./realtime/*.mjs"},"./realtime/*.js":{"default":"./realtime/*.js"},"./realtime/*":{"import":"./realtime/*.mjs","require":"./realtime/*.js"},"./resource":{"import":"./resource.mjs","require":"./resource.js"},"./resource.js":{"default":"./resource.js"},"./resource.mjs":{"default":"./resource.mjs"},"./resources/*.mjs":{"default":"./resources/*.mjs"},"./resources/*.js":{"default":"./resources/*.js"},"./resources/*":{"import":"./resources/*.mjs","require":"./resources/*.js"},"./resources":{"import":"./resources.mjs","require":"./resources.js"},"./resources.js":{"default":"./resources.js"},"./resources.mjs":{"default":"./resources.mjs"},"./streaming":{"import":"./streaming.mjs","require":"./streaming.js"},"./streaming.js":{"default":"./streaming.js"},"./streaming.mjs":{"default":"./streaming.mjs"},"./uploads":{"import":"./uploads.mjs","require":"./uploads.js"},"./uploads.js":{"default":"./uploads.js"},"./uploads.mjs":{"default":"./uploads.mjs"},"./version":{"import":"./version.mjs","require":"./version.js"},"./version.js":{"default":"./version.js"},"./version.mjs":{"default":"./version.mjs"}},"peerDependencies":{"ws":"^8.18.0","zod":"^3.25 || ^4.0"},"peerDependenciesMeta":{"ws":{"optional":true},"zod":{"optional":true}},"_lastModified":"2026-
|
|
1
|
+
{"name":"openai","version":"6.22.0","description":"The official TypeScript library for the OpenAI API","author":"OpenAI <support@openai.com>","types":"./index.d.ts","main":"./index.js","type":"commonjs","repository":"github:openai/openai-node","license":"Apache-2.0","packageManager":"yarn@1.22.22","files":["**/*"],"private":false,"publishConfig":{"access":"public"},"scripts":{"test":"./scripts/test","build":"./scripts/build","format":"./scripts/format","tsn":"ts-node -r tsconfig-paths/register","lint":"./scripts/lint","fix":"./scripts/format"},"dependencies":{},"bin":{"openai":"bin/cli"},"exports":{".":{"require":{"types":"./index.d.ts","default":"./index.js"},"types":"./index.d.mts","default":"./index.mjs"},"./_vendor/*.mjs":{"default":"./_vendor/*.mjs"},"./_vendor/*.js":{"default":"./_vendor/*.js"},"./_vendor/*":{"import":"./_vendor/*.mjs","require":"./_vendor/*.js"},"./api-promise":{"import":"./api-promise.mjs","require":"./api-promise.js"},"./api-promise.js":{"default":"./api-promise.js"},"./api-promise.mjs":{"default":"./api-promise.mjs"},"./azure":{"import":"./azure.mjs","require":"./azure.js"},"./azure.js":{"default":"./azure.js"},"./azure.mjs":{"default":"./azure.mjs"},"./beta/*.mjs":{"default":"./beta/*.mjs"},"./beta/*.js":{"default":"./beta/*.js"},"./beta/*":{"import":"./beta/*.mjs","require":"./beta/*.js"},"./client":{"import":"./client.mjs","require":"./client.js"},"./client.js":{"default":"./client.js"},"./client.mjs":{"default":"./client.mjs"},"./core/*.mjs":{"default":"./core/*.mjs"},"./core/*.js":{"default":"./core/*.js"},"./core/*":{"import":"./core/*.mjs","require":"./core/*.js"},"./error":{"import":"./error.mjs","require":"./error.js"},"./error.js":{"default":"./error.js"},"./error.mjs":{"default":"./error.mjs"},"./helpers/*.mjs":{"default":"./helpers/*.mjs"},"./helpers/*.js":{"default":"./helpers/*.js"},"./helpers/*":{"import":"./helpers/*.mjs","require":"./helpers/*.js"},"./index":{"import":"./index.mjs","require":"./index.js"},"./index.js":{"default":"./index.js"},"./index.mjs":{"default":"./index.mjs"},"./lib/*.mjs":{"default":"./lib/*.mjs"},"./lib/*.js":{"default":"./lib/*.js"},"./lib/*":{"import":"./lib/*.mjs","require":"./lib/*.js"},"./pagination":{"import":"./pagination.mjs","require":"./pagination.js"},"./pagination.js":{"default":"./pagination.js"},"./pagination.mjs":{"default":"./pagination.mjs"},"./realtime/*.mjs":{"default":"./realtime/*.mjs"},"./realtime/*.js":{"default":"./realtime/*.js"},"./realtime/*":{"import":"./realtime/*.mjs","require":"./realtime/*.js"},"./resource":{"import":"./resource.mjs","require":"./resource.js"},"./resource.js":{"default":"./resource.js"},"./resource.mjs":{"default":"./resource.mjs"},"./resources/*.mjs":{"default":"./resources/*.mjs"},"./resources/*.js":{"default":"./resources/*.js"},"./resources/*":{"import":"./resources/*.mjs","require":"./resources/*.js"},"./resources":{"import":"./resources.mjs","require":"./resources.js"},"./resources.js":{"default":"./resources.js"},"./resources.mjs":{"default":"./resources.mjs"},"./streaming":{"import":"./streaming.mjs","require":"./streaming.js"},"./streaming.js":{"default":"./streaming.js"},"./streaming.mjs":{"default":"./streaming.mjs"},"./uploads":{"import":"./uploads.mjs","require":"./uploads.js"},"./uploads.js":{"default":"./uploads.js"},"./uploads.mjs":{"default":"./uploads.mjs"},"./version":{"import":"./version.mjs","require":"./version.js"},"./version.js":{"default":"./version.js"},"./version.mjs":{"default":"./version.mjs"}},"peerDependencies":{"ws":"^8.18.0","zod":"^3.25 || ^4.0"},"peerDependenciesMeta":{"ws":{"optional":true},"zod":{"optional":true}},"_lastModified":"2026-06-04T11:31:05.634Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"zod","version":"4.3.5","type":"module","license":"MIT","author":"Colin McDonnell <zod@colinhacks.com>","description":"TypeScript-first schema declaration and validation library with static type inference","homepage":"https://zod.dev","llms":"https://zod.dev/llms.txt","llmsFull":"https://zod.dev/llms-full.txt","mcpServer":"https://mcp.inkeep.com/zod/mcp","funding":"https://github.com/sponsors/colinhacks","sideEffects":false,"files":["src","**/*.js","**/*.mjs","**/*.cjs","**/*.d.ts","**/*.d.mts","**/*.d.cts","**/package.json"],"keywords":["typescript","schema","validation","type","inference"],"main":"./index.cjs","types":"./index.d.cts","module":"./index.js","zshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts","./mini":"./src/mini/index.ts","./locales":"./src/locales/index.ts","./v3":"./src/v3/index.ts","./v4":"./src/v4/index.ts","./v4-mini":"./src/v4-mini/index.ts","./v4/mini":"./src/v4/mini/index.ts","./v4/core":"./src/v4/core/index.ts","./v4/locales":"./src/v4/locales/index.ts","./v4/locales/*":"./src/v4/locales/*"},"conditions":{"@zod/source":"src"}},"exports":{"./package.json":"./package.json",".":{"@zod/source":"./src/index.ts","types":"./index.d.cts","import":"./index.js","require":"./index.cjs"},"./mini":{"@zod/source":"./src/mini/index.ts","types":"./mini/index.d.cts","import":"./mini/index.js","require":"./mini/index.cjs"},"./locales":{"@zod/source":"./src/locales/index.ts","types":"./locales/index.d.cts","import":"./locales/index.js","require":"./locales/index.cjs"},"./v3":{"@zod/source":"./src/v3/index.ts","types":"./v3/index.d.cts","import":"./v3/index.js","require":"./v3/index.cjs"},"./v4":{"@zod/source":"./src/v4/index.ts","types":"./v4/index.d.cts","import":"./v4/index.js","require":"./v4/index.cjs"},"./v4-mini":{"@zod/source":"./src/v4-mini/index.ts","types":"./v4-mini/index.d.cts","import":"./v4-mini/index.js","require":"./v4-mini/index.cjs"},"./v4/mini":{"@zod/source":"./src/v4/mini/index.ts","types":"./v4/mini/index.d.cts","import":"./v4/mini/index.js","require":"./v4/mini/index.cjs"},"./v4/core":{"@zod/source":"./src/v4/core/index.ts","types":"./v4/core/index.d.cts","import":"./v4/core/index.js","require":"./v4/core/index.cjs"},"./v4/locales":{"@zod/source":"./src/v4/locales/index.ts","types":"./v4/locales/index.d.cts","import":"./v4/locales/index.js","require":"./v4/locales/index.cjs"},"./v4/locales/*":{"@zod/source":"./src/v4/locales/*","types":"./v4/locales/*","import":"./v4/locales/*","require":"./v4/locales/*"}},"repository":{"type":"git","url":"git+https://github.com/colinhacks/zod.git"},"bugs":{"url":"https://github.com/colinhacks/zod/issues"},"support":{"backing":{"npm-funding":true}},"scripts":{"clean":"git clean -xdf . -e node_modules","build":"zshy --project tsconfig.build.json","postbuild":"tsx ../../scripts/write-stub-package-jsons.ts && pnpm biome check --write .","test:watch":"pnpm vitest","test":"pnpm vitest run","prepublishOnly":"tsx ../../scripts/check-versions.ts"},"_lastModified":"2026-
|
|
1
|
+
{"name":"zod","version":"4.3.5","type":"module","license":"MIT","author":"Colin McDonnell <zod@colinhacks.com>","description":"TypeScript-first schema declaration and validation library with static type inference","homepage":"https://zod.dev","llms":"https://zod.dev/llms.txt","llmsFull":"https://zod.dev/llms-full.txt","mcpServer":"https://mcp.inkeep.com/zod/mcp","funding":"https://github.com/sponsors/colinhacks","sideEffects":false,"files":["src","**/*.js","**/*.mjs","**/*.cjs","**/*.d.ts","**/*.d.mts","**/*.d.cts","**/package.json"],"keywords":["typescript","schema","validation","type","inference"],"main":"./index.cjs","types":"./index.d.cts","module":"./index.js","zshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts","./mini":"./src/mini/index.ts","./locales":"./src/locales/index.ts","./v3":"./src/v3/index.ts","./v4":"./src/v4/index.ts","./v4-mini":"./src/v4-mini/index.ts","./v4/mini":"./src/v4/mini/index.ts","./v4/core":"./src/v4/core/index.ts","./v4/locales":"./src/v4/locales/index.ts","./v4/locales/*":"./src/v4/locales/*"},"conditions":{"@zod/source":"src"}},"exports":{"./package.json":"./package.json",".":{"@zod/source":"./src/index.ts","types":"./index.d.cts","import":"./index.js","require":"./index.cjs"},"./mini":{"@zod/source":"./src/mini/index.ts","types":"./mini/index.d.cts","import":"./mini/index.js","require":"./mini/index.cjs"},"./locales":{"@zod/source":"./src/locales/index.ts","types":"./locales/index.d.cts","import":"./locales/index.js","require":"./locales/index.cjs"},"./v3":{"@zod/source":"./src/v3/index.ts","types":"./v3/index.d.cts","import":"./v3/index.js","require":"./v3/index.cjs"},"./v4":{"@zod/source":"./src/v4/index.ts","types":"./v4/index.d.cts","import":"./v4/index.js","require":"./v4/index.cjs"},"./v4-mini":{"@zod/source":"./src/v4-mini/index.ts","types":"./v4-mini/index.d.cts","import":"./v4-mini/index.js","require":"./v4-mini/index.cjs"},"./v4/mini":{"@zod/source":"./src/v4/mini/index.ts","types":"./v4/mini/index.d.cts","import":"./v4/mini/index.js","require":"./v4/mini/index.cjs"},"./v4/core":{"@zod/source":"./src/v4/core/index.ts","types":"./v4/core/index.d.cts","import":"./v4/core/index.js","require":"./v4/core/index.cjs"},"./v4/locales":{"@zod/source":"./src/v4/locales/index.ts","types":"./v4/locales/index.d.cts","import":"./v4/locales/index.js","require":"./v4/locales/index.cjs"},"./v4/locales/*":{"@zod/source":"./src/v4/locales/*","types":"./v4/locales/*","import":"./v4/locales/*","require":"./v4/locales/*"}},"repository":{"type":"git","url":"git+https://github.com/colinhacks/zod.git"},"bugs":{"url":"https://github.com/colinhacks/zod/issues"},"support":{"backing":{"npm-funding":true}},"scripts":{"clean":"git clean -xdf . -e node_modules","build":"zshy --project tsconfig.build.json","postbuild":"tsx ../../scripts/write-stub-package-jsons.ts && pnpm biome check --write .","test:watch":"pnpm vitest","test":"pnpm vitest run","prepublishOnly":"tsx ../../scripts/check-versions.ts"},"_lastModified":"2026-06-04T11:31:04.189Z"}
|
|
@@ -72,7 +72,7 @@ export declare class AIEmployee {
|
|
|
72
72
|
decisions: UserDecision[];
|
|
73
73
|
};
|
|
74
74
|
}): Promise<boolean>;
|
|
75
|
-
invoke({ messageId, userMessages, userDecisions, writer, context, }: {
|
|
75
|
+
invoke({ messageId, userMessages, userDecisions, writer, context, signal, }: {
|
|
76
76
|
messageId?: string;
|
|
77
77
|
userMessages?: AIMessageInput[];
|
|
78
78
|
userDecisions?: {
|
|
@@ -81,6 +81,7 @@ export declare class AIEmployee {
|
|
|
81
81
|
};
|
|
82
82
|
writer?: (chunk: any) => void;
|
|
83
83
|
context?: any;
|
|
84
|
+
signal?: AbortSignal;
|
|
84
85
|
}): Promise<any>;
|
|
85
86
|
createAgent({ provider, systemPrompt, tools, middleware, }: {
|
|
86
87
|
provider: LLMProvider;
|
|
@@ -276,7 +276,8 @@ class AIEmployee {
|
|
|
276
276
|
userMessages = [],
|
|
277
277
|
userDecisions,
|
|
278
278
|
writer,
|
|
279
|
-
context
|
|
279
|
+
context,
|
|
280
|
+
signal
|
|
280
281
|
}) {
|
|
281
282
|
var _a;
|
|
282
283
|
await this.aiConversationsRepo.update({
|
|
@@ -297,6 +298,7 @@ class AIEmployee {
|
|
|
297
298
|
recursionLimit: 100,
|
|
298
299
|
configurable: this.from === "main-agent" ? { thread_id: threadId } : void 0,
|
|
299
300
|
writer,
|
|
301
|
+
signal,
|
|
300
302
|
...config
|
|
301
303
|
};
|
|
302
304
|
const invokeResult = await this.agentInvoke(provider, chatContext, invokeConfig, state);
|
|
@@ -7,11 +7,9 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
var __create = Object.create;
|
|
11
10
|
var __defProp = Object.defineProperty;
|
|
12
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
12
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
15
13
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
14
|
var __export = (target, all) => {
|
|
17
15
|
for (var name in all)
|
|
@@ -25,14 +23,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
25
23
|
}
|
|
26
24
|
return to;
|
|
27
25
|
};
|
|
28
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
-
mod
|
|
35
|
-
));
|
|
36
26
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
27
|
var anthropic_exports = {};
|
|
38
28
|
__export(anthropic_exports, {
|
|
@@ -42,8 +32,8 @@ __export(anthropic_exports, {
|
|
|
42
32
|
module.exports = __toCommonJS(anthropic_exports);
|
|
43
33
|
var import_provider = require("./provider");
|
|
44
34
|
var import_anthropic = require("@langchain/anthropic");
|
|
45
|
-
var
|
|
46
|
-
var
|
|
35
|
+
var import_utils = require("@nocobase/utils");
|
|
36
|
+
var import_utils2 = require("../utils");
|
|
47
37
|
var import_ai_manager = require("../manager/ai-manager");
|
|
48
38
|
const MAX_TOKENS_PRESET = {
|
|
49
39
|
"kimi-for-coding": 128 * 1024
|
|
@@ -53,7 +43,7 @@ class AnthropicProvider extends import_provider.LLMProvider {
|
|
|
53
43
|
return "https://api.anthropic.com";
|
|
54
44
|
}
|
|
55
45
|
createModel() {
|
|
56
|
-
const { apiKey
|
|
46
|
+
const { apiKey } = this.serviceOptions || {};
|
|
57
47
|
const sanitizedModelOptions = { ...this.modelOptions || {} };
|
|
58
48
|
const model = sanitizedModelOptions.model;
|
|
59
49
|
const hasTemperature = sanitizedModelOptions.temperature !== void 0 && sanitizedModelOptions.temperature !== null;
|
|
@@ -81,7 +71,7 @@ class AnthropicProvider extends import_provider.LLMProvider {
|
|
|
81
71
|
apiKey,
|
|
82
72
|
...sanitizedModelOptions,
|
|
83
73
|
model,
|
|
84
|
-
anthropicApiUrl:
|
|
74
|
+
anthropicApiUrl: this.getResolvedBaseURL(),
|
|
85
75
|
verbose: false
|
|
86
76
|
});
|
|
87
77
|
}
|
|
@@ -89,18 +79,22 @@ class AnthropicProvider extends import_provider.LLMProvider {
|
|
|
89
79
|
var _a, _b, _c, _d, _e;
|
|
90
80
|
const options = this.serviceOptions || {};
|
|
91
81
|
const apiKey = options.apiKey;
|
|
92
|
-
let
|
|
93
|
-
|
|
82
|
+
let url;
|
|
83
|
+
try {
|
|
84
|
+
url = this.buildRequestURL("v1/models");
|
|
85
|
+
} catch (e) {
|
|
86
|
+
return { code: 400, errMsg: e instanceof Error ? e.message : String(e) };
|
|
87
|
+
}
|
|
88
|
+
if (!url) {
|
|
94
89
|
return { code: 400, errMsg: "baseURL is required" };
|
|
95
90
|
}
|
|
96
91
|
if (!apiKey) {
|
|
97
92
|
return { code: 400, errMsg: "API Key required" };
|
|
98
93
|
}
|
|
99
|
-
if (baseURL && baseURL.endsWith("/")) {
|
|
100
|
-
baseURL = baseURL.slice(0, -1);
|
|
101
|
-
}
|
|
102
94
|
try {
|
|
103
|
-
const res = await
|
|
95
|
+
const res = await (0, import_utils.serverRequest)({
|
|
96
|
+
method: "GET",
|
|
97
|
+
url,
|
|
104
98
|
headers: {
|
|
105
99
|
"x-api-key": apiKey,
|
|
106
100
|
"anthropic-version": "2023-06-01"
|
|
@@ -158,11 +152,11 @@ class AnthropicProvider extends import_provider.LLMProvider {
|
|
|
158
152
|
if (chunk && Array.isArray(chunk)) {
|
|
159
153
|
const textBlock = chunk.find((block) => block.type === "text");
|
|
160
154
|
if (textBlock) {
|
|
161
|
-
return (0,
|
|
155
|
+
return (0, import_utils2.stripToolCallTags)(textBlock.text);
|
|
162
156
|
}
|
|
163
157
|
return null;
|
|
164
158
|
}
|
|
165
|
-
return (0,
|
|
159
|
+
return (0, import_utils2.stripToolCallTags)(chunk);
|
|
166
160
|
}
|
|
167
161
|
builtInTools() {
|
|
168
162
|
var _a, _b;
|
|
@@ -194,7 +188,7 @@ class AnthropicProvider extends import_provider.LLMProvider {
|
|
|
194
188
|
async convertToContent(ctx, attachment) {
|
|
195
189
|
const fileManager = this.app.pm.get("file-manager");
|
|
196
190
|
const url = await fileManager.getFileURL(attachment);
|
|
197
|
-
const data = await (0,
|
|
191
|
+
const data = await (0, import_utils2.encodeFile)(ctx, decodeURIComponent(url));
|
|
198
192
|
if (attachment.mimetype.startsWith("image/")) {
|
|
199
193
|
return {
|
|
200
194
|
placement: "contentBlocks",
|
|
@@ -53,7 +53,7 @@ class DashscopeProvider extends import_provider.LLMProvider {
|
|
|
53
53
|
}
|
|
54
54
|
createModel() {
|
|
55
55
|
var _a, _b;
|
|
56
|
-
const {
|
|
56
|
+
const { apiKey } = this.serviceOptions || {};
|
|
57
57
|
const { responseFormat, structuredOutput } = this.modelOptions || {};
|
|
58
58
|
const { schema } = structuredOutput || {};
|
|
59
59
|
const modelKwargs = {};
|
|
@@ -78,7 +78,7 @@ class DashscopeProvider extends import_provider.LLMProvider {
|
|
|
78
78
|
...this.modelOptions,
|
|
79
79
|
modelKwargs,
|
|
80
80
|
configuration: {
|
|
81
|
-
baseURL:
|
|
81
|
+
baseURL: this.getResolvedBaseURL()
|
|
82
82
|
},
|
|
83
83
|
verbose: false
|
|
84
84
|
});
|
|
@@ -134,7 +134,7 @@ class DashscopeEmbeddingProvider extends import_provider.EmbeddingProvider {
|
|
|
134
134
|
createEmbedding() {
|
|
135
135
|
return new import_openai.OpenAIEmbeddings({
|
|
136
136
|
configuration: {
|
|
137
|
-
baseURL: this.baseURL
|
|
137
|
+
baseURL: this.baseURL,
|
|
138
138
|
apiKey: this.apiKey
|
|
139
139
|
},
|
|
140
140
|
model: this.model
|
|
@@ -78,7 +78,7 @@ class DeepSeekProvider extends import_provider.LLMProvider {
|
|
|
78
78
|
return "https://api.deepseek.com";
|
|
79
79
|
}
|
|
80
80
|
createModel() {
|
|
81
|
-
const {
|
|
81
|
+
const { apiKey } = this.serviceOptions || {};
|
|
82
82
|
const { responseFormat } = this.modelOptions || {};
|
|
83
83
|
const modelKwargs = {};
|
|
84
84
|
if (responseFormat) {
|
|
@@ -91,7 +91,7 @@ class DeepSeekProvider extends import_provider.LLMProvider {
|
|
|
91
91
|
...this.modelOptions,
|
|
92
92
|
modelKwargs,
|
|
93
93
|
configuration: {
|
|
94
|
-
baseURL:
|
|
94
|
+
baseURL: this.getResolvedBaseURL()
|
|
95
95
|
},
|
|
96
96
|
verbose: false
|
|
97
97
|
});
|
|
@@ -7,11 +7,9 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
var __create = Object.create;
|
|
11
10
|
var __defProp = Object.defineProperty;
|
|
12
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
12
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
15
13
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
14
|
var __export = (target, all) => {
|
|
17
15
|
for (var name in all)
|
|
@@ -25,14 +23,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
25
23
|
}
|
|
26
24
|
return to;
|
|
27
25
|
};
|
|
28
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
-
mod
|
|
35
|
-
));
|
|
36
26
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
27
|
var google_genai_exports = {};
|
|
38
28
|
__export(google_genai_exports, {
|
|
@@ -43,8 +33,8 @@ __export(google_genai_exports, {
|
|
|
43
33
|
module.exports = __toCommonJS(google_genai_exports);
|
|
44
34
|
var import_google_genai = require("@langchain/google-genai");
|
|
45
35
|
var import_provider = require("./provider");
|
|
46
|
-
var
|
|
47
|
-
var
|
|
36
|
+
var import_utils = require("@nocobase/utils");
|
|
37
|
+
var import_utils2 = require("../utils");
|
|
48
38
|
var import_ai_manager = require("../manager/ai-manager");
|
|
49
39
|
const GOOGLE_GEN_AI_URL = "https://generativelanguage.googleapis.com";
|
|
50
40
|
class GoogleGenAIProvider extends import_provider.LLMProvider {
|
|
@@ -52,32 +42,37 @@ class GoogleGenAIProvider extends import_provider.LLMProvider {
|
|
|
52
42
|
return GOOGLE_GEN_AI_URL;
|
|
53
43
|
}
|
|
54
44
|
createModel() {
|
|
55
|
-
const { apiKey
|
|
45
|
+
const { apiKey } = this.serviceOptions || {};
|
|
56
46
|
const { model, responseFormat } = this.modelOptions || {};
|
|
57
47
|
return new import_google_genai.ChatGoogleGenerativeAI({
|
|
58
48
|
apiKey,
|
|
59
49
|
...this.modelOptions,
|
|
60
50
|
model,
|
|
61
51
|
json: responseFormat === "json",
|
|
62
|
-
baseUrl:
|
|
52
|
+
baseUrl: this.getResolvedBaseURL()
|
|
63
53
|
});
|
|
64
54
|
}
|
|
65
55
|
async listModels() {
|
|
66
56
|
var _a, _b;
|
|
67
57
|
const options = this.serviceOptions || {};
|
|
68
58
|
const apiKey = options.apiKey;
|
|
69
|
-
let
|
|
70
|
-
|
|
59
|
+
let url;
|
|
60
|
+
try {
|
|
61
|
+
url = this.buildRequestURL(`v1beta/models?key=${encodeURIComponent(apiKey ?? "")}`);
|
|
62
|
+
} catch (e) {
|
|
63
|
+
return { code: 400, errMsg: e instanceof Error ? e.message : String(e) };
|
|
64
|
+
}
|
|
65
|
+
if (!url) {
|
|
71
66
|
return { code: 400, errMsg: "baseURL is required" };
|
|
72
67
|
}
|
|
73
68
|
if (!apiKey) {
|
|
74
69
|
return { code: 400, errMsg: "API Key required" };
|
|
75
70
|
}
|
|
76
|
-
if (baseURL && baseURL.endsWith("/")) {
|
|
77
|
-
baseURL = baseURL.slice(0, -1);
|
|
78
|
-
}
|
|
79
71
|
try {
|
|
80
|
-
const res = await
|
|
72
|
+
const res = await (0, import_utils.serverRequest)({
|
|
73
|
+
method: "GET",
|
|
74
|
+
url
|
|
75
|
+
});
|
|
81
76
|
return {
|
|
82
77
|
models: (_a = res == null ? void 0 : res.data) == null ? void 0 : _a.models.map((model) => ({
|
|
83
78
|
id: model.name
|
|
@@ -128,7 +123,7 @@ class GoogleGenAIProvider extends import_provider.LLMProvider {
|
|
|
128
123
|
const fileManager = this.app.pm.get("file-manager");
|
|
129
124
|
const url = await fileManager.getFileURL(attachment);
|
|
130
125
|
if ((_a = attachment.mimetype) == null ? void 0 : _a.startsWith("image/")) {
|
|
131
|
-
const data = await (0,
|
|
126
|
+
const data = await (0, import_utils2.encodeFile)(ctx, decodeURIComponent(url));
|
|
132
127
|
return {
|
|
133
128
|
placement: "contentBlocks",
|
|
134
129
|
content: {
|
|
@@ -139,7 +134,7 @@ class GoogleGenAIProvider extends import_provider.LLMProvider {
|
|
|
139
134
|
}
|
|
140
135
|
};
|
|
141
136
|
} else {
|
|
142
|
-
const data = await (0,
|
|
137
|
+
const data = await (0, import_utils2.encodeFile)(ctx, decodeURIComponent(url));
|
|
143
138
|
return {
|
|
144
139
|
placement: "contentBlocks",
|
|
145
140
|
content: {
|
|
@@ -52,7 +52,7 @@ class KimiProvider extends import_provider.LLMProvider {
|
|
|
52
52
|
return "https://api.moonshot.cn/v1";
|
|
53
53
|
}
|
|
54
54
|
createModel() {
|
|
55
|
-
const {
|
|
55
|
+
const { apiKey } = this.serviceOptions || {};
|
|
56
56
|
const { responseFormat, structuredOutput } = this.modelOptions || {};
|
|
57
57
|
const { schema } = structuredOutput || {};
|
|
58
58
|
const responseFormatOptions = {
|
|
@@ -68,7 +68,7 @@ class KimiProvider extends import_provider.LLMProvider {
|
|
|
68
68
|
response_format: responseFormatOptions
|
|
69
69
|
},
|
|
70
70
|
configuration: {
|
|
71
|
-
baseURL:
|
|
71
|
+
baseURL: this.getResolvedBaseURL()
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
74
|
}
|
|
@@ -105,11 +105,11 @@ class KimiProvider extends import_provider.LLMProvider {
|
|
|
105
105
|
return ((_a = attachment.mimetype) == null ? void 0 : _a.startsWith("image/")) ?? false;
|
|
106
106
|
}
|
|
107
107
|
get documentLoader() {
|
|
108
|
-
var _a
|
|
108
|
+
var _a;
|
|
109
109
|
if (!this._documentLoader) {
|
|
110
110
|
const loader = new import_document_loader2.KimiDocumentLoader(this.aiPlugin.fileManager, {
|
|
111
111
|
apiKey: (_a = this.serviceOptions) == null ? void 0 : _a.apiKey,
|
|
112
|
-
baseURL:
|
|
112
|
+
baseURL: this.getResolvedBaseURL()
|
|
113
113
|
});
|
|
114
114
|
this._documentLoader = new import_document_loader.CachedDocumentLoader(this.aiPlugin, {
|
|
115
115
|
loader,
|
|
@@ -51,7 +51,7 @@ class MiMoProvider extends import_provider.LLMProvider {
|
|
|
51
51
|
return "https://api.xiaomimimo.com/v1";
|
|
52
52
|
}
|
|
53
53
|
createModel() {
|
|
54
|
-
const {
|
|
54
|
+
const { apiKey } = this.serviceOptions || {};
|
|
55
55
|
const { responseFormat, structuredOutput } = this.modelOptions || {};
|
|
56
56
|
const { schema } = structuredOutput || {};
|
|
57
57
|
const responseFormatOptions = {
|
|
@@ -67,7 +67,7 @@ class MiMoProvider extends import_provider.LLMProvider {
|
|
|
67
67
|
response_format: responseFormatOptions
|
|
68
68
|
},
|
|
69
69
|
configuration: {
|
|
70
|
-
baseURL:
|
|
70
|
+
baseURL: this.getResolvedBaseURL()
|
|
71
71
|
},
|
|
72
72
|
verbose: true
|
|
73
73
|
});
|
|
@@ -7,11 +7,9 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
var __create = Object.create;
|
|
11
10
|
var __defProp = Object.defineProperty;
|
|
12
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
12
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
15
13
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
14
|
var __export = (target, all) => {
|
|
17
15
|
for (var name in all)
|
|
@@ -25,14 +23,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
25
23
|
}
|
|
26
24
|
return to;
|
|
27
25
|
};
|
|
28
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
-
mod
|
|
35
|
-
));
|
|
36
26
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
27
|
var ollama_exports = {};
|
|
38
28
|
__export(ollama_exports, {
|
|
@@ -44,17 +34,16 @@ module.exports = __toCommonJS(ollama_exports);
|
|
|
44
34
|
var import_ollama = require("@langchain/ollama");
|
|
45
35
|
var import_provider = require("./provider");
|
|
46
36
|
var import_ai_manager = require("../manager/ai-manager");
|
|
47
|
-
var
|
|
37
|
+
var import_utils = require("@nocobase/utils");
|
|
48
38
|
const OLLAMA_DEFAULT_URL = "http://localhost:11434";
|
|
49
39
|
class OllamaProvider extends import_provider.LLMProvider {
|
|
50
40
|
get baseURL() {
|
|
51
41
|
return OLLAMA_DEFAULT_URL;
|
|
52
42
|
}
|
|
53
43
|
createModel() {
|
|
54
|
-
const { baseURL } = this.serviceOptions || {};
|
|
55
44
|
const { model, temperature, topP, topK, numPredict, ...rest } = this.modelOptions || {};
|
|
56
45
|
return new import_ollama.ChatOllama({
|
|
57
|
-
baseUrl:
|
|
46
|
+
baseUrl: this.getResolvedBaseURL(),
|
|
58
47
|
model: model || "mistral-nemo:12b",
|
|
59
48
|
temperature,
|
|
60
49
|
topP,
|
|
@@ -68,16 +57,20 @@ class OllamaProvider extends import_provider.LLMProvider {
|
|
|
68
57
|
}
|
|
69
58
|
async listModels() {
|
|
70
59
|
var _a;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
60
|
+
let url;
|
|
61
|
+
try {
|
|
62
|
+
url = this.buildRequestURL("api/tags");
|
|
63
|
+
} catch (e) {
|
|
64
|
+
return { code: 400, errMsg: e instanceof Error ? e.message : String(e) };
|
|
75
65
|
}
|
|
76
|
-
if (
|
|
77
|
-
|
|
66
|
+
if (!url) {
|
|
67
|
+
return { code: 400, errMsg: "baseURL is required" };
|
|
78
68
|
}
|
|
79
69
|
try {
|
|
80
|
-
const res = await
|
|
70
|
+
const res = await (0, import_utils.serverRequest)({
|
|
71
|
+
method: "GET",
|
|
72
|
+
url
|
|
73
|
+
});
|
|
81
74
|
const models = ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.models) || [];
|
|
82
75
|
return {
|
|
83
76
|
models: models.map((model) => ({
|
|
@@ -87,7 +80,7 @@ class OllamaProvider extends import_provider.LLMProvider {
|
|
|
87
80
|
} catch (e) {
|
|
88
81
|
return {
|
|
89
82
|
code: 500,
|
|
90
|
-
errMsg: `Failed to fetch Ollama models: ${e.message}. Make sure Ollama is running at ${
|
|
83
|
+
errMsg: `Failed to fetch Ollama models: ${e.message}. Make sure Ollama is running at ${this.getResolvedBaseURL()}`
|
|
91
84
|
};
|
|
92
85
|
}
|
|
93
86
|
}
|
|
@@ -36,7 +36,7 @@ class OpenAICompletionsProvider extends import_provider.LLMProvider {
|
|
|
36
36
|
return "https://api.openai.com/v1";
|
|
37
37
|
}
|
|
38
38
|
createModel() {
|
|
39
|
-
const {
|
|
39
|
+
const { apiKey } = this.serviceOptions || {};
|
|
40
40
|
const { responseFormat, structuredOutput } = this.modelOptions || {};
|
|
41
41
|
const { schema } = structuredOutput || {};
|
|
42
42
|
const responseFormatOptions = {
|
|
@@ -52,7 +52,7 @@ class OpenAICompletionsProvider extends import_provider.LLMProvider {
|
|
|
52
52
|
response_format: responseFormatOptions
|
|
53
53
|
},
|
|
54
54
|
configuration: {
|
|
55
|
-
baseURL:
|
|
55
|
+
baseURL: this.getResolvedBaseURL()
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
58
|
}
|
|
@@ -38,7 +38,7 @@ class OpenAiEmbeddingProvider extends import_provider.EmbeddingProvider {
|
|
|
38
38
|
createEmbedding() {
|
|
39
39
|
return new import_openai.OpenAIEmbeddings({
|
|
40
40
|
configuration: {
|
|
41
|
-
baseURL: this.baseURL
|
|
41
|
+
baseURL: this.baseURL,
|
|
42
42
|
apiKey: this.apiKey
|
|
43
43
|
},
|
|
44
44
|
model: this.model
|