@nocobase/plugin-ai 2.1.0-beta.43 → 2.1.0-beta.44
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/externalVersion.js +18 -18
- 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/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 +55 -22
- package/dist/server/llm-providers/xai.js +2 -2
- package/package.json +2 -2
package/dist/externalVersion.js
CHANGED
|
@@ -8,22 +8,22 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/plugin-acl": "2.1.0-beta.
|
|
12
|
-
"@nocobase/plugin-workflow": "2.1.0-beta.
|
|
13
|
-
"@nocobase/client": "2.1.0-beta.
|
|
14
|
-
"@nocobase/utils": "2.1.0-beta.
|
|
15
|
-
"@nocobase/client-v2": "2.1.0-beta.
|
|
16
|
-
"@nocobase/database": "2.1.0-beta.
|
|
17
|
-
"@nocobase/server": "2.1.0-beta.
|
|
18
|
-
"@nocobase/plugin-file-manager": "2.1.0-beta.
|
|
19
|
-
"@nocobase/actions": "2.1.0-beta.
|
|
20
|
-
"@nocobase/ai": "2.1.0-beta.
|
|
11
|
+
"@nocobase/plugin-acl": "2.1.0-beta.44",
|
|
12
|
+
"@nocobase/plugin-workflow": "2.1.0-beta.44",
|
|
13
|
+
"@nocobase/client": "2.1.0-beta.44",
|
|
14
|
+
"@nocobase/utils": "2.1.0-beta.44",
|
|
15
|
+
"@nocobase/client-v2": "2.1.0-beta.44",
|
|
16
|
+
"@nocobase/database": "2.1.0-beta.44",
|
|
17
|
+
"@nocobase/server": "2.1.0-beta.44",
|
|
18
|
+
"@nocobase/plugin-file-manager": "2.1.0-beta.44",
|
|
19
|
+
"@nocobase/actions": "2.1.0-beta.44",
|
|
20
|
+
"@nocobase/ai": "2.1.0-beta.44",
|
|
21
21
|
"langchain": "1.2.39",
|
|
22
22
|
"react": "18.2.0",
|
|
23
23
|
"antd": "5.24.2",
|
|
24
24
|
"@formily/core": "2.3.7",
|
|
25
25
|
"@formily/react": "2.3.7",
|
|
26
|
-
"@nocobase/flow-engine": "2.1.0-beta.
|
|
26
|
+
"@nocobase/flow-engine": "2.1.0-beta.44",
|
|
27
27
|
"@ant-design/icons": "5.6.1",
|
|
28
28
|
"@formily/antd-v5": "1.2.3",
|
|
29
29
|
"react-router-dom": "6.30.1",
|
|
@@ -33,20 +33,20 @@ module.exports = {
|
|
|
33
33
|
"lodash": "4.18.1",
|
|
34
34
|
"@langchain/core": "1.1.48",
|
|
35
35
|
"@langchain/langgraph": "1.1.5",
|
|
36
|
-
"@nocobase/cache": "2.1.0-beta.
|
|
36
|
+
"@nocobase/cache": "2.1.0-beta.44",
|
|
37
37
|
"@langchain/anthropic": "1.3.17",
|
|
38
|
-
"axios": "1.7.7",
|
|
39
38
|
"@langchain/openai": "1.2.7",
|
|
40
39
|
"@langchain/deepseek": "1.0.11",
|
|
41
40
|
"@langchain/google-genai": "2.1.18",
|
|
42
41
|
"@langchain/ollama": "1.2.7",
|
|
43
|
-
"@nocobase/acl": "2.1.0-beta.
|
|
44
|
-
"@nocobase/resourcer": "2.1.0-beta.
|
|
42
|
+
"@nocobase/acl": "2.1.0-beta.44",
|
|
43
|
+
"@nocobase/resourcer": "2.1.0-beta.44",
|
|
45
44
|
"@emotion/css": "11.13.0",
|
|
46
45
|
"dayjs": "1.11.13",
|
|
47
46
|
"react-i18next": "11.18.6",
|
|
48
|
-
"@nocobase/plugin-data-source-manager": "2.1.0-beta.
|
|
47
|
+
"@nocobase/plugin-data-source-manager": "2.1.0-beta.44",
|
|
49
48
|
"@langchain/langgraph-checkpoint": "1.0.0",
|
|
50
|
-
"@nocobase/data-source-manager": "2.1.0-beta.
|
|
51
|
-
"react-dom": "18.2.0"
|
|
49
|
+
"@nocobase/data-source-manager": "2.1.0-beta.44",
|
|
50
|
+
"react-dom": "18.2.0",
|
|
51
|
+
"axios": "1.7.7"
|
|
52
52
|
};
|
|
@@ -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-06-
|
|
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-03T13:57:34.351Z"}
|
|
@@ -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-06-
|
|
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-03T13:57:34.510Z"}
|
|
@@ -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-06-
|
|
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-03T13:57:40.595Z"}
|
|
@@ -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-06-
|
|
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-03T13:57:40.064Z"}
|
|
@@ -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-06-
|
|
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-03T13:57:29.054Z"}
|
|
@@ -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-06-
|
|
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-03T13:57:31.650Z"}
|
|
@@ -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-06-
|
|
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-03T13:57:30.067Z"}
|
|
@@ -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
|
|
@@ -37,7 +37,7 @@ class OpenAIResponsesProvider extends import_provider.LLMProvider {
|
|
|
37
37
|
return "https://api.openai.com/v1";
|
|
38
38
|
}
|
|
39
39
|
createModel() {
|
|
40
|
-
const {
|
|
40
|
+
const { apiKey } = this.serviceOptions || {};
|
|
41
41
|
const { responseFormat, structuredOutput } = this.modelOptions || {};
|
|
42
42
|
const { schema } = structuredOutput || {};
|
|
43
43
|
const responseFormatOptions = {
|
|
@@ -56,7 +56,7 @@ class OpenAIResponsesProvider extends import_provider.LLMProvider {
|
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
configuration: {
|
|
59
|
-
baseURL:
|
|
59
|
+
baseURL: this.getResolvedBaseURL()
|
|
60
60
|
},
|
|
61
61
|
verbose: false,
|
|
62
62
|
useResponsesApi: true
|
|
@@ -91,6 +91,8 @@ export declare abstract class LLMProvider {
|
|
|
91
91
|
parseResponseMetadata(output: LLMResult): any;
|
|
92
92
|
parseResponseError(err: any): any;
|
|
93
93
|
protected get documentLoader(): CachedDocumentLoader;
|
|
94
|
+
protected getResolvedBaseURL(): string;
|
|
95
|
+
protected buildRequestURL(pathname: string): string;
|
|
94
96
|
protected get aiPlugin(): PluginAIServer;
|
|
95
97
|
}
|
|
96
98
|
export interface EmbeddingProviderOptions {
|
|
@@ -107,6 +109,6 @@ export declare abstract class EmbeddingProvider {
|
|
|
107
109
|
abstract createEmbedding(): EmbeddingsInterface;
|
|
108
110
|
protected abstract getDefaultUrl(): string;
|
|
109
111
|
protected get apiKey(): any;
|
|
110
|
-
protected get baseURL():
|
|
112
|
+
protected get baseURL(): string;
|
|
111
113
|
protected get model(): any;
|
|
112
114
|
}
|
|
@@ -40,12 +40,26 @@ __export(provider_exports, {
|
|
|
40
40
|
LLMProvider: () => LLMProvider
|
|
41
41
|
});
|
|
42
42
|
module.exports = __toCommonJS(provider_exports);
|
|
43
|
-
var
|
|
44
|
-
var
|
|
43
|
+
var import_utils = require("@nocobase/utils");
|
|
44
|
+
var import_utils2 = require("../utils");
|
|
45
45
|
var import_stream = require("@langchain/core/utils/stream");
|
|
46
46
|
var import_document_loader = require("../document-loader");
|
|
47
47
|
var import_node_path = __toESM(require("node:path"));
|
|
48
48
|
var import_reasoning = require("./common/reasoning");
|
|
49
|
+
function normalizeBaseURL(baseURL) {
|
|
50
|
+
(0, import_utils.checkUrlAgainstWhitelist)(baseURL);
|
|
51
|
+
return new URL(baseURL).toString().replace(/\/$/, "");
|
|
52
|
+
}
|
|
53
|
+
function resolveServiceOptions(serviceOptions, app) {
|
|
54
|
+
const rendered = app.environment.renderJsonTemplate(serviceOptions ?? {});
|
|
55
|
+
if ((rendered == null ? void 0 : rendered.baseURL) != null) {
|
|
56
|
+
if (typeof rendered.baseURL !== "string") {
|
|
57
|
+
throw new Error("baseURL must be a string");
|
|
58
|
+
}
|
|
59
|
+
rendered.baseURL = normalizeBaseURL(rendered.baseURL);
|
|
60
|
+
}
|
|
61
|
+
return rendered;
|
|
62
|
+
}
|
|
49
63
|
class LLMProvider {
|
|
50
64
|
app;
|
|
51
65
|
serviceOptions;
|
|
@@ -57,7 +71,7 @@ class LLMProvider {
|
|
|
57
71
|
constructor(opts) {
|
|
58
72
|
const { app, serviceOptions, modelOptions } = opts;
|
|
59
73
|
this.app = app;
|
|
60
|
-
this.serviceOptions =
|
|
74
|
+
this.serviceOptions = resolveServiceOptions(serviceOptions, app);
|
|
61
75
|
if (modelOptions) {
|
|
62
76
|
this.modelOptions = modelOptions;
|
|
63
77
|
this.chatModel = this.createModel();
|
|
@@ -69,7 +83,7 @@ class LLMProvider {
|
|
|
69
83
|
prepareChain(context) {
|
|
70
84
|
var _a, _b, _c, _d;
|
|
71
85
|
let chain = this.chatModel;
|
|
72
|
-
const toolDefinitions = (_a = context.tools) == null ? void 0 : _a.map(
|
|
86
|
+
const toolDefinitions = (_a = context.tools) == null ? void 0 : _a.map(import_utils2.buildTool);
|
|
73
87
|
if ((_b = this.builtInTools()) == null ? void 0 : _b.length) {
|
|
74
88
|
const tools = [...this.builtInTools()];
|
|
75
89
|
if (!this.isToolConflict() && (toolDefinitions == null ? void 0 : toolDefinitions.length)) {
|
|
@@ -118,18 +132,19 @@ class LLMProvider {
|
|
|
118
132
|
var _a, _b, _c, _d;
|
|
119
133
|
const options = this.serviceOptions || {};
|
|
120
134
|
const apiKey = options.apiKey;
|
|
121
|
-
let
|
|
122
|
-
|
|
123
|
-
|
|
135
|
+
let url;
|
|
136
|
+
try {
|
|
137
|
+
url = this.buildRequestURL("models");
|
|
138
|
+
} catch (e) {
|
|
139
|
+
return { code: 400, errMsg: e instanceof Error ? e.message : String(e) };
|
|
124
140
|
}
|
|
125
141
|
if (!apiKey) {
|
|
126
142
|
return { code: 400, errMsg: "API Key required" };
|
|
127
143
|
}
|
|
128
|
-
if (baseURL && baseURL.endsWith("/")) {
|
|
129
|
-
baseURL = baseURL.slice(0, -1);
|
|
130
|
-
}
|
|
131
144
|
try {
|
|
132
|
-
const res = await
|
|
145
|
+
const res = await (0, import_utils.serverRequest)({
|
|
146
|
+
method: "GET",
|
|
147
|
+
url,
|
|
133
148
|
headers: {
|
|
134
149
|
Authorization: `Bearer ${apiKey}`
|
|
135
150
|
}
|
|
@@ -143,10 +158,10 @@ class LLMProvider {
|
|
|
143
158
|
}
|
|
144
159
|
}
|
|
145
160
|
parseResponseMessage(message) {
|
|
146
|
-
return (0,
|
|
161
|
+
return (0, import_utils2.parseResponseMessage)(message);
|
|
147
162
|
}
|
|
148
163
|
parseResponseChunk(chunk) {
|
|
149
|
-
return (0,
|
|
164
|
+
return (0, import_utils2.stripToolCallTags)(chunk);
|
|
150
165
|
}
|
|
151
166
|
async parseAttachment(ctx, attachment) {
|
|
152
167
|
if (this.isApiSupportedAttachment(attachment)) {
|
|
@@ -181,7 +196,7 @@ class LLMProvider {
|
|
|
181
196
|
async convertToContent(ctx, attachment) {
|
|
182
197
|
const fileManager = this.app.pm.get("file-manager");
|
|
183
198
|
const url = await fileManager.getFileURL(attachment);
|
|
184
|
-
const data = await (0,
|
|
199
|
+
const data = await (0, import_utils2.encodeFile)(ctx, decodeURIComponent(url));
|
|
185
200
|
if (attachment.mimetype.startsWith("image/")) {
|
|
186
201
|
return {
|
|
187
202
|
placement: "contentBlocks",
|
|
@@ -207,17 +222,16 @@ class LLMProvider {
|
|
|
207
222
|
}
|
|
208
223
|
}
|
|
209
224
|
async loadDocument(ctx, attachment) {
|
|
210
|
-
const referer = ctx.get("referer") || "";
|
|
211
|
-
const ua = ctx.get("user-agent") || "";
|
|
212
225
|
const safeFilename = attachment.filename ? import_node_path.default.basename(attachment.filename) : "document";
|
|
213
|
-
const
|
|
226
|
+
const loaderOptions = typeof ctx.get === "function" ? {
|
|
214
227
|
requestOptions: {
|
|
215
228
|
headers: {
|
|
216
|
-
Referer: referer,
|
|
217
|
-
"User-Agent":
|
|
229
|
+
Referer: ctx.get("referer") || "",
|
|
230
|
+
"User-Agent": ctx.get("user-agent") || ""
|
|
218
231
|
}
|
|
219
232
|
}
|
|
220
|
-
}
|
|
233
|
+
} : void 0;
|
|
234
|
+
const parsed = await this.documentLoader.load(attachment, loaderOptions);
|
|
221
235
|
if (!parsed.supported) {
|
|
222
236
|
return {
|
|
223
237
|
placement: "system",
|
|
@@ -307,6 +321,22 @@ ${parsed.text}
|
|
|
307
321
|
get documentLoader() {
|
|
308
322
|
return this.aiPlugin.documentLoaders.cached;
|
|
309
323
|
}
|
|
324
|
+
getResolvedBaseURL() {
|
|
325
|
+
var _a;
|
|
326
|
+
const baseURL = ((_a = this.serviceOptions) == null ? void 0 : _a.baseURL) ?? this.baseURL;
|
|
327
|
+
if (!baseURL) {
|
|
328
|
+
throw new Error("baseURL is required");
|
|
329
|
+
}
|
|
330
|
+
if (typeof baseURL !== "string") {
|
|
331
|
+
throw new Error("baseURL must be a string");
|
|
332
|
+
}
|
|
333
|
+
return normalizeBaseURL(baseURL);
|
|
334
|
+
}
|
|
335
|
+
buildRequestURL(pathname) {
|
|
336
|
+
const url = new URL(pathname.replace(/^\/+/, ""), `${this.getResolvedBaseURL()}/`).toString();
|
|
337
|
+
(0, import_utils.checkUrlAgainstWhitelist)(url);
|
|
338
|
+
return url;
|
|
339
|
+
}
|
|
310
340
|
get aiPlugin() {
|
|
311
341
|
return this.app.pm.get("ai");
|
|
312
342
|
}
|
|
@@ -316,7 +346,7 @@ class EmbeddingProvider {
|
|
|
316
346
|
this.opts = opts;
|
|
317
347
|
const { app, serviceOptions, modelOptions } = this.opts;
|
|
318
348
|
this.app = app;
|
|
319
|
-
this.serviceOptions =
|
|
349
|
+
this.serviceOptions = resolveServiceOptions(serviceOptions, app);
|
|
320
350
|
this.modelOptions = modelOptions;
|
|
321
351
|
}
|
|
322
352
|
app;
|
|
@@ -335,7 +365,10 @@ class EmbeddingProvider {
|
|
|
335
365
|
if (!baseURL) {
|
|
336
366
|
throw new Error("baseURL is required");
|
|
337
367
|
}
|
|
338
|
-
|
|
368
|
+
if (typeof baseURL !== "string") {
|
|
369
|
+
throw new Error("baseURL must be a string");
|
|
370
|
+
}
|
|
371
|
+
return normalizeBaseURL(baseURL);
|
|
339
372
|
}
|
|
340
373
|
get model() {
|
|
341
374
|
const { model } = this.modelOptions ?? {};
|
|
@@ -38,7 +38,7 @@ class XAIProvider extends import_provider.LLMProvider {
|
|
|
38
38
|
return "https://api.x.ai/v1";
|
|
39
39
|
}
|
|
40
40
|
createModel() {
|
|
41
|
-
const {
|
|
41
|
+
const { apiKey } = this.serviceOptions || {};
|
|
42
42
|
const { responseFormat, structuredOutput, ...restModelOptions } = this.modelOptions || {};
|
|
43
43
|
const { schema } = structuredOutput || {};
|
|
44
44
|
const responseFormatOptions = {
|
|
@@ -50,7 +50,7 @@ class XAIProvider extends import_provider.LLMProvider {
|
|
|
50
50
|
return new import_xai.ChatXAI({
|
|
51
51
|
apiKey,
|
|
52
52
|
...restModelOptions,
|
|
53
|
-
baseURL:
|
|
53
|
+
baseURL: this.getResolvedBaseURL(),
|
|
54
54
|
modelKwargs: {
|
|
55
55
|
response_format: responseFormatOptions
|
|
56
56
|
}
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"description": "Create AI employees with diverse skills to collaborate with humans, build systems, and handle business operations.",
|
|
7
7
|
"description.ru-RU": "Поддержка интеграции с AI-сервисами: предоставляются AI-узлы для рабочих процессов, расширяя возможности бизнес-обработки.",
|
|
8
8
|
"description.zh-CN": "创建各种技能的 AI 员工,与人类协同,搭建系统,处理业务。",
|
|
9
|
-
"version": "2.1.0-beta.
|
|
9
|
+
"version": "2.1.0-beta.44",
|
|
10
10
|
"main": "dist/server/index.js",
|
|
11
11
|
"homepage": "https://docs.nocobase.com/handbook/action-ai",
|
|
12
12
|
"homepage.ru-RU": "https://docs-ru.nocobase.com/handbook/action-ai",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"keywords": [
|
|
65
65
|
"AI"
|
|
66
66
|
],
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "540d4897b1696cc24c0754521b0b766978b4933c"
|
|
68
68
|
}
|