@nocobase/plugin-ai 2.2.0-beta.6 → 2.2.0-beta.8

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.
Files changed (66) hide show
  1. package/dist/ai/docs/nocobase/ai-employees/workflow/nodes/knowledge/index.md +8 -0
  2. package/dist/ai/docs/nocobase/api/cli/config/delete.md +1 -0
  3. package/dist/ai/docs/nocobase/api/cli/config/index.md +4 -1
  4. package/dist/ai/docs/nocobase/api/cli/config/set.md +1 -0
  5. package/dist/ai/docs/nocobase/api/cli/env/auth.md +53 -5
  6. package/dist/ai/docs/nocobase/api/cli/self/check.md +19 -2
  7. package/dist/ai/docs/nocobase/api/cli/self/index.md +1 -1
  8. package/dist/ai/docs/nocobase/api/cli/self/update.md +17 -3
  9. package/dist/ai/docs/nocobase/development/index.md +6 -2
  10. package/dist/ai/docs/nocobase/nocobase-cli/installation/cli.md +2 -0
  11. package/dist/ai/docs/nocobase/plugin-development/client/index.md +1 -0
  12. package/dist/ai/docs/nocobase/shared-components/create-form-registry.md +38 -0
  13. package/dist/ai/docs/nocobase/shared-components/filter/collection-filter-panel.md +44 -0
  14. package/dist/ai/docs/nocobase/shared-components/filter/index.md +44 -0
  15. package/dist/ai/docs/nocobase/shared-components/form/code-scanner.md +34 -0
  16. package/dist/ai/docs/nocobase/shared-components/form/dialog-form-layout.md +45 -0
  17. package/dist/ai/docs/nocobase/shared-components/form/drawer-form-layout.md +45 -0
  18. package/dist/ai/docs/nocobase/shared-components/form/env-variable-input.md +30 -0
  19. package/dist/ai/docs/nocobase/shared-components/form/file-size-input.md +24 -0
  20. package/dist/ai/docs/nocobase/shared-components/form/json-text-area.md +28 -0
  21. package/dist/ai/docs/nocobase/shared-components/form/password-input.md +23 -0
  22. package/dist/ai/docs/nocobase/shared-components/form/remote-select.md +34 -0
  23. package/dist/ai/docs/nocobase/shared-components/form/scan-input.md +27 -0
  24. package/dist/ai/docs/nocobase/shared-components/form/typed-variable-input.md +30 -0
  25. package/dist/ai/docs/nocobase/shared-components/form/variable-input.md +35 -0
  26. package/dist/ai/docs/nocobase/shared-components/form/variable-json-text-area.md +33 -0
  27. package/dist/ai/docs/nocobase/shared-components/form/variable-text-area.md +33 -0
  28. package/dist/ai/docs/nocobase/shared-components/icon.md +21 -0
  29. package/dist/ai/docs/nocobase/shared-components/index.md +70 -0
  30. package/dist/ai/docs/nocobase/shared-components/table/index.md +39 -0
  31. package/dist/ai/docs/nocobase/shared-components/table/sort-handle.md +37 -0
  32. package/dist/ai/docs/nocobase/shared-components/table/sortable-row.md +36 -0
  33. package/dist/client/{428.5eb4f53ddbb6a3b8.js → 428.e9f38da3b0d8b498.js} +1 -1
  34. package/dist/client/580.35ba54ff91b7fe6d.js +10 -0
  35. package/dist/client/{604.de96f3ec4d471afd.js → 604.89c674f35b52b4ef.js} +1 -1
  36. package/dist/client/ai-employees/admin/mcp/schemas.d.ts +46 -18
  37. package/dist/client/index.js +3 -3
  38. package/dist/client-v2/ai-employees/flow/models/AIEmployeeButtonModel.d.ts +32 -0
  39. package/dist/client-v2/index.d.ts +1 -0
  40. package/dist/client-v2/index.js +1 -1
  41. package/dist/collections/ai-mcp-clients.js +5 -0
  42. package/dist/externalVersion.js +16 -16
  43. package/dist/locale/en-US.json +8 -3
  44. package/dist/locale/zh-CN.json +8 -3
  45. package/dist/node_modules/@langchain/xai/package.json +1 -1
  46. package/dist/node_modules/fs-extra/package.json +1 -1
  47. package/dist/node_modules/jsonrepair/package.json +1 -1
  48. package/dist/node_modules/just-bash/package.json +1 -1
  49. package/dist/node_modules/nodejs-snowflake/package.json +1 -1
  50. package/dist/node_modules/openai/package.json +1 -1
  51. package/dist/node_modules/zod/package.json +1 -1
  52. package/dist/server/ai-employees/ai-employee.js +21 -5
  53. package/dist/server/ai-employees/middleware/index.d.ts +1 -0
  54. package/dist/server/ai-employees/middleware/index.js +2 -0
  55. package/dist/server/ai-employees/middleware/tool-call-sanitizer.d.ts +16 -0
  56. package/dist/server/ai-employees/middleware/tool-call-sanitizer.js +90 -0
  57. package/dist/server/ai-employees/tool-call-sanitizer.d.ts +26 -0
  58. package/dist/server/ai-employees/tool-call-sanitizer.js +84 -0
  59. package/dist/server/ai-employees/utils.js +14 -2
  60. package/dist/server/plugin.d.ts +2 -0
  61. package/dist/server/plugin.js +30 -0
  62. package/dist/server/resource/aiConversations.js +1 -1
  63. package/dist/server/resource/aiMcpClients.js +2 -2
  64. package/dist/server/resource/aiTools.js +14 -9
  65. package/package.json +2 -2
  66. package/dist/client/580.e75f97fb883ad042.js +0 -10
@@ -69,6 +69,11 @@ var ai_mcp_clients_default = {
69
69
  "x-component": "Select"
70
70
  }
71
71
  },
72
+ {
73
+ name: "useUserContext",
74
+ type: "boolean",
75
+ defaultValue: false
76
+ },
72
77
  {
73
78
  name: "command",
74
79
  type: "string",
@@ -8,22 +8,22 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/plugin-acl": "2.2.0-beta.6",
12
- "@nocobase/plugin-workflow": "2.2.0-beta.6",
13
- "@nocobase/client": "2.2.0-beta.6",
14
- "@nocobase/utils": "2.2.0-beta.6",
15
- "@nocobase/client-v2": "2.2.0-beta.6",
16
- "@nocobase/database": "2.2.0-beta.6",
17
- "@nocobase/server": "2.2.0-beta.6",
18
- "@nocobase/plugin-file-manager": "2.2.0-beta.6",
19
- "@nocobase/actions": "2.2.0-beta.6",
20
- "@nocobase/ai": "2.2.0-beta.6",
11
+ "@nocobase/plugin-acl": "2.2.0-beta.8",
12
+ "@nocobase/plugin-workflow": "2.2.0-beta.8",
13
+ "@nocobase/client": "2.2.0-beta.8",
14
+ "@nocobase/utils": "2.2.0-beta.8",
15
+ "@nocobase/client-v2": "2.2.0-beta.8",
16
+ "@nocobase/database": "2.2.0-beta.8",
17
+ "@nocobase/server": "2.2.0-beta.8",
18
+ "@nocobase/plugin-file-manager": "2.2.0-beta.8",
19
+ "@nocobase/actions": "2.2.0-beta.8",
20
+ "@nocobase/ai": "2.2.0-beta.8",
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.2.0-beta.6",
26
+ "@nocobase/flow-engine": "2.2.0-beta.8",
27
27
  "@ant-design/icons": "5.6.1",
28
28
  "@formily/antd-v5": "1.2.3",
29
29
  "@formily/shared": "2.3.7",
@@ -33,20 +33,20 @@ module.exports = {
33
33
  "lodash": "4.18.1",
34
34
  "@langchain/core": "1.1.49",
35
35
  "@langchain/langgraph": "1.4.4",
36
- "@nocobase/cache": "2.2.0-beta.6",
36
+ "@nocobase/cache": "2.2.0-beta.8",
37
37
  "@langchain/anthropic": "1.3.17",
38
38
  "@langchain/openai": "1.4.7",
39
39
  "@langchain/deepseek": "1.0.27",
40
40
  "@langchain/google-genai": "2.1.18",
41
41
  "@langchain/ollama": "1.2.7",
42
- "@nocobase/acl": "2.2.0-beta.6",
43
- "@nocobase/resourcer": "2.2.0-beta.6",
42
+ "@nocobase/acl": "2.2.0-beta.8",
43
+ "@nocobase/resourcer": "2.2.0-beta.8",
44
44
  "@emotion/css": "11.13.0",
45
45
  "dayjs": "1.11.13",
46
46
  "react-i18next": "11.18.6",
47
- "@nocobase/plugin-data-source-manager": "2.2.0-beta.6",
47
+ "@nocobase/plugin-data-source-manager": "2.2.0-beta.8",
48
48
  "@langchain/langgraph-checkpoint": "1.1.2",
49
- "@nocobase/data-source-manager": "2.2.0-beta.6",
49
+ "@nocobase/data-source-manager": "2.2.0-beta.8",
50
50
  "react-dom": "18.2.0",
51
51
  "axios": "1.7.7"
52
52
  };
@@ -449,7 +449,12 @@
449
449
  "When enabled, this AI employee will always use the selected model and users cannot switch to other models in chat.": "When enabled, this AI employee will always use the selected model and users cannot switch to other models in chat.",
450
450
  "When enabled, this AI employee can only use the selected models, and users can only switch between these models in chat.": "When enabled, this AI employee can only use the selected models, and users can only switch between these models in chat.",
451
451
  "Restrict this AI employee to the selected models.": "Restrict this AI employee to the selected models.",
452
- "Select model": "Select model",
453
- "Select models": "Select models",
454
- "Models": "Models"
452
+ "Models": "Models",
453
+ "Depends on current user": "Depends on current user",
454
+ "NocoBase request": "NocoBase request",
455
+ "When enabled, URL and headers can use current user variables. Stdio transport is not supported.": "When enabled, URL and headers can use current user variables. Stdio transport is not supported.",
456
+ "When enabled, URL and headers can use current user variables and NocoBase request variables. Stdio transport is not supported.": "When enabled, URL and headers can use current user variables and NocoBase request variables. Stdio transport is not supported.",
457
+ "Connection test failed": "Connection test failed",
458
+ "The MCP server uses current user variables and the connection test failed. Do you want to save it anyway?": "The MCP server uses current user variables and the connection test failed. Do you want to save it anyway?",
459
+ "Save anyway": "Save anyway"
455
460
  }
@@ -455,7 +455,12 @@
455
455
  "When enabled, this AI employee will always use the selected model and users cannot switch to other models in chat.": "启用后,该 AI 员工将始终使用所选模型,用户在对话中不能切换到其他模型。",
456
456
  "When enabled, this AI employee can only use the selected models, and users can only switch between these models in chat.": "启用后,该 AI 员工只能使用这里选择的模型,用户在对话中也只能在这些模型之间切换。",
457
457
  "Restrict this AI employee to the selected models.": "限制该 AI 员工只能使用所选模型。",
458
- "Select model": "选择模型",
459
- "Select models": "选择模型",
460
- "Models": "模型"
458
+ "Models": "模型",
459
+ "Depends on current user": "依赖当前用户信息",
460
+ "NocoBase request": "NocoBase 请求",
461
+ "When enabled, URL and headers can use current user variables. Stdio transport is not supported.": "启用后,可在 URL 和请求头中使用当前用户变量。Stdio 传输方式不支持。",
462
+ "When enabled, URL and headers can use current user variables and NocoBase request variables. Stdio transport is not supported.": "启用后,可在 URL 和请求头中使用当前用户变量和 NocoBase 请求变量。Stdio 传输方式不支持。",
463
+ "Connection test failed": "连接测试失败",
464
+ "The MCP server uses current user variables and the connection test failed. Do you want to save it anyway?": "该 MCP 服务使用当前用户变量,且连接测试失败。是否仍然保存?",
465
+ "Save anyway": "仍然保存"
461
466
  }
@@ -1 +1 @@
1
- {"name":"@langchain/xai","version":"1.3.19","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/providers/langchain-xai/","dependencies":{"@langchain/openai":"1.4.7"},"peerDependencies":{"@langchain/core":"^1.0.0"},"devDependencies":{"@tsconfig/recommended":"^1.0.3","@vitest/coverage-v8":"^3.2.4","dotenv":"^17.4.0","dpdm":"^3.14.0","typescript":"~5.8.3","vitest":"^4.1.2","zod":"^3.25.76","@langchain/openai":"^1.4.7","@langchain/core":"^1.1.48","@langchain/standard-tests":"0.0.23","@langchain/tsconfig":"0.0.1"},"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","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","typegen":"pnpm run typegen:profiles","typegen:profiles":"pnpm --filter @langchain/model-profiles make --config profiles.toml"},"_lastModified":"2026-06-22T05:35:43.956Z"}
1
+ {"name":"@langchain/xai","version":"1.3.19","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/providers/langchain-xai/","dependencies":{"@langchain/openai":"1.4.7"},"peerDependencies":{"@langchain/core":"^1.0.0"},"devDependencies":{"@tsconfig/recommended":"^1.0.3","@vitest/coverage-v8":"^3.2.4","dotenv":"^17.4.0","dpdm":"^3.14.0","typescript":"~5.8.3","vitest":"^4.1.2","zod":"^3.25.76","@langchain/openai":"^1.4.7","@langchain/core":"^1.1.48","@langchain/standard-tests":"0.0.23","@langchain/tsconfig":"0.0.1"},"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","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","typegen":"pnpm run typegen:profiles","typegen:profiles":"pnpm --filter @langchain/model-profiles make --config profiles.toml"},"_lastModified":"2026-06-29T01:54:45.637Z"}
@@ -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-22T05:35:44.153Z"}
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-29T01:54:45.799Z"}
@@ -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-22T05:35:50.575Z"}
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-29T01:54:51.672Z"}
@@ -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-22T05:35:50.349Z"}
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-29T01:54:51.151Z"}
@@ -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-22T05:35:38.322Z"}
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-29T01:54:40.468Z"}
@@ -1 +1 @@
1
- {"name":"openai","version":"6.39.1","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"},"overrides":{"minimatch":"^9.0.5"},"pnpm":{"overrides":{"minimatch":"^9.0.5"}},"resolutions":{"minimatch":"^9.0.5"},"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"},"./auth/*.mjs":{"default":"./auth/*.mjs"},"./auth/*.js":{"default":"./auth/*.js"},"./auth/*":{"import":"./auth/*.mjs","require":"./auth/*.js"},"./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-22T05:35:41.198Z"}
1
+ {"name":"openai","version":"6.39.1","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"},"overrides":{"minimatch":"^9.0.5"},"pnpm":{"overrides":{"minimatch":"^9.0.5"}},"resolutions":{"minimatch":"^9.0.5"},"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"},"./auth/*.mjs":{"default":"./auth/*.mjs"},"./auth/*.js":{"default":"./auth/*.js"},"./auth/*":{"import":"./auth/*.mjs","require":"./auth/*.js"},"./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-29T01:54:43.112Z"}
@@ -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-22T05:35:39.331Z"}
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-29T01:54:41.390Z"}
@@ -54,6 +54,7 @@ var import_stream = require("@langchain/core/utils/stream");
54
54
  var import_utils2 = require("./utils");
55
55
  var import_base = require("@langchain/core/callbacks/base");
56
56
  var import_shared = require("../../ai/tools/sub-agents/shared");
57
+ var import_tool_call_sanitizer = require("./tool-call-sanitizer");
57
58
  class AIEmployee {
58
59
  sessionId;
59
60
  from = "main-agent";
@@ -1093,7 +1094,16 @@ If information is missing, clearly state it in the summary.</Important>`;
1093
1094
  role: "assistant",
1094
1095
  content,
1095
1096
  tool_calls: msg.toolCalls,
1096
- additional_kwargs: (_b = msg.metadata) == null ? void 0 : _b.additional_kwargs
1097
+ additional_kwargs: (0, import_tool_call_sanitizer.sanitizeAdditionalKwargsForToolCalls)((_b = msg.metadata) == null ? void 0 : _b.additional_kwargs, msg.toolCalls, {
1098
+ onDiscard: (info) => {
1099
+ var _a2;
1100
+ this.logger.warn("Discard malformed raw tool calls from AI message", {
1101
+ phase: "formatMessages",
1102
+ messageId: (_a2 = msg.metadata) == null ? void 0 : _a2.id,
1103
+ ...info
1104
+ });
1105
+ }
1106
+ }).additionalKwargs
1097
1107
  });
1098
1108
  }
1099
1109
  return formattedMessages;
@@ -1145,7 +1155,7 @@ If information is missing, clearly state it in the summary.</Important>`;
1145
1155
  }
1146
1156
  const tools = await this.listTools({ scope: "GENERAL" });
1147
1157
  if (this.webSearch === true) {
1148
- const subAgentWebSearch = await this.toolsManager.getTools(import_ai.SYSTEM_TOOLS.WEB_SEARCH);
1158
+ const subAgentWebSearch = await this.toolsManager.getTools(import_ai.SYSTEM_TOOLS.WEB_SEARCH, { ctx: this.ctx });
1149
1159
  tools.push(subAgentWebSearch);
1150
1160
  }
1151
1161
  const generalToolsNameSet = new Set(tools.map((x) => x.definition.name));
@@ -1153,7 +1163,9 @@ If information is missing, clearly state it in the summary.</Important>`;
1153
1163
  const settingsTools = ((_a = this.employee.skillSettings) == null ? void 0 : _a.tools) ?? [];
1154
1164
  const employeeTools = [...settingsTools, ...this.tools];
1155
1165
  if (await this.plugin.knowledgeBaseManager.isEnabledKnowledgeBase(this.employee.toJSON())) {
1156
- const knowledgeBaseRetrieveTool = await this.toolsManager.getTools(import_ai.SYSTEM_TOOLS.KNOWLEDGE_BASE);
1166
+ const knowledgeBaseRetrieveTool = await this.toolsManager.getTools(import_ai.SYSTEM_TOOLS.KNOWLEDGE_BASE, {
1167
+ ctx: this.ctx
1168
+ });
1157
1169
  if (knowledgeBaseRetrieveTool) {
1158
1170
  employeeTools.push({ name: import_ai.SYSTEM_TOOLS.KNOWLEDGE_BASE });
1159
1171
  }
@@ -1300,7 +1312,8 @@ If information is missing, clearly state it in the summary.</Important>`;
1300
1312
  (0, import_middleware.toolInteractionMiddleware)(this, tools),
1301
1313
  (0, import_middleware.toolCallStatusMiddleware)(this),
1302
1314
  ...inWorkflow ? [(0, import_middleware.workflowHistoryMiddleware)(this, this.db)] : [],
1303
- (0, import_middleware.conversationMiddleware)(this, { providerName, llmService, model, messageId, agentThread })
1315
+ (0, import_middleware.conversationMiddleware)(this, { providerName, llmService, model, messageId, agentThread }),
1316
+ (0, import_middleware.toolCallSanitizerMiddleware)({ logger: this.logger })
1304
1317
  ];
1305
1318
  }
1306
1319
  async getCurrentThread() {
@@ -1331,7 +1344,10 @@ If information is missing, clearly state it in the summary.</Important>`;
1331
1344
  return new Map(tools.map((tool) => [tool.definition.name, tool]));
1332
1345
  }
1333
1346
  listTools(filter) {
1334
- return this.toolsManager.listTools(filter);
1347
+ return this.toolsManager.listTools({
1348
+ ...filter,
1349
+ ctx: this.ctx
1350
+ });
1335
1351
  }
1336
1352
  withRunMetadata(config) {
1337
1353
  return {
@@ -8,5 +8,6 @@
8
8
  */
9
9
  export * from './conversation';
10
10
  export * from './skill-tools';
11
+ export * from './tool-call-sanitizer';
11
12
  export * from './tools';
12
13
  export * from './workflow-history';
@@ -25,12 +25,14 @@ var middleware_exports = {};
25
25
  module.exports = __toCommonJS(middleware_exports);
26
26
  __reExport(middleware_exports, require("./conversation"), module.exports);
27
27
  __reExport(middleware_exports, require("./skill-tools"), module.exports);
28
+ __reExport(middleware_exports, require("./tool-call-sanitizer"), module.exports);
28
29
  __reExport(middleware_exports, require("./tools"), module.exports);
29
30
  __reExport(middleware_exports, require("./workflow-history"), module.exports);
30
31
  // Annotate the CommonJS export names for ESM import in node:
31
32
  0 && (module.exports = {
32
33
  ...require("./conversation"),
33
34
  ...require("./skill-tools"),
35
+ ...require("./tool-call-sanitizer"),
34
36
  ...require("./tools"),
35
37
  ...require("./workflow-history")
36
38
  });
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ type ToolCallSanitizerLogger = {
10
+ warn: (message: string, meta?: Record<string, unknown>) => void;
11
+ };
12
+ type ToolCallSanitizerMiddlewareOptions = {
13
+ logger?: ToolCallSanitizerLogger;
14
+ };
15
+ export declare const toolCallSanitizerMiddleware: (options?: ToolCallSanitizerMiddlewareOptions) => import("langchain/dist/agents/middleware/types.cjs").AgentMiddleware<never, undefined, unknown, readonly (import("@langchain/core/dist/tools").ClientTool | import("@langchain/core/dist/tools").ServerTool)[]>;
16
+ export {};
@@ -0,0 +1,90 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var tool_call_sanitizer_exports = {};
28
+ __export(tool_call_sanitizer_exports, {
29
+ toolCallSanitizerMiddleware: () => toolCallSanitizerMiddleware
30
+ });
31
+ module.exports = __toCommonJS(tool_call_sanitizer_exports);
32
+ var import_messages = require("@langchain/core/messages");
33
+ var import_langchain = require("langchain");
34
+ var import_tool_call_sanitizer = require("../tool-call-sanitizer");
35
+ const buildMessageUpdates = (messages, options, phase) => {
36
+ const updates = [];
37
+ for (const message of messages) {
38
+ if (!import_messages.AIMessage.isInstance(message) || !message.id) {
39
+ continue;
40
+ }
41
+ const sanitizedMessage = (0, import_tool_call_sanitizer.sanitizeLangChainAIMessage)(message, {
42
+ onDiscard: (info) => {
43
+ var _a, _b;
44
+ (_b = options.logger) == null ? void 0 : _b.warn("Discard malformed raw tool calls from AI message", {
45
+ phase,
46
+ messageId: message.id,
47
+ invalidToolCallCount: ((_a = message.invalid_tool_calls) == null ? void 0 : _a.length) ?? 0,
48
+ ...info
49
+ });
50
+ }
51
+ });
52
+ if (!sanitizedMessage) {
53
+ continue;
54
+ }
55
+ updates.push(
56
+ new import_messages.AIMessage({
57
+ id: sanitizedMessage.id,
58
+ content: sanitizedMessage.content,
59
+ name: sanitizedMessage.name,
60
+ additional_kwargs: sanitizedMessage.additional_kwargs,
61
+ response_metadata: sanitizedMessage.response_metadata,
62
+ tool_calls: sanitizedMessage.tool_calls,
63
+ invalid_tool_calls: sanitizedMessage.invalid_tool_calls,
64
+ usage_metadata: sanitizedMessage.usage_metadata
65
+ })
66
+ );
67
+ }
68
+ return updates;
69
+ };
70
+ const toolCallSanitizerMiddleware = (options = {}) => (0, import_langchain.createMiddleware)({
71
+ name: "ToolCallSanitizerMiddleware",
72
+ beforeModel: (state) => {
73
+ const updates = buildMessageUpdates(state.messages ?? [], options, "beforeModel");
74
+ if (!updates.length) {
75
+ return;
76
+ }
77
+ return { messages: updates };
78
+ },
79
+ afterModel: (state) => {
80
+ const updates = buildMessageUpdates(state.messages ?? [], options, "afterModel");
81
+ if (!updates.length) {
82
+ return;
83
+ }
84
+ return { messages: updates };
85
+ }
86
+ });
87
+ // Annotate the CommonJS export names for ESM import in node:
88
+ 0 && (module.exports = {
89
+ toolCallSanitizerMiddleware
90
+ });
@@ -0,0 +1,26 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { AIMessage } from '@langchain/core/messages';
10
+ type AdditionalKwargs = Record<string, unknown>;
11
+ type DiscardedToolCallsInfo = {
12
+ rawToolCallCount: number;
13
+ parsedToolCallCount: number;
14
+ rawToolCallIds: string[];
15
+ rawToolCallNames: string[];
16
+ };
17
+ type SanitizeAdditionalKwargsOptions = {
18
+ onDiscard?: (info: DiscardedToolCallsInfo) => void;
19
+ };
20
+ type SanitizeAdditionalKwargsResult = {
21
+ changed: boolean;
22
+ additionalKwargs?: AdditionalKwargs;
23
+ };
24
+ export declare const sanitizeAdditionalKwargsForToolCalls: (additionalKwargs: AdditionalKwargs | undefined, parsedToolCalls?: unknown[] | null, options?: SanitizeAdditionalKwargsOptions) => SanitizeAdditionalKwargsResult;
25
+ export declare const sanitizeLangChainAIMessage: (message: AIMessage, options?: SanitizeAdditionalKwargsOptions) => AIMessage<import("@langchain/core/dist/messages/message").MessageStructure<import("@langchain/core/dist/messages/message").MessageToolSet>>;
26
+ export {};
@@ -0,0 +1,84 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var tool_call_sanitizer_exports = {};
28
+ __export(tool_call_sanitizer_exports, {
29
+ sanitizeAdditionalKwargsForToolCalls: () => sanitizeAdditionalKwargsForToolCalls,
30
+ sanitizeLangChainAIMessage: () => sanitizeLangChainAIMessage
31
+ });
32
+ module.exports = __toCommonJS(tool_call_sanitizer_exports);
33
+ const hasRawToolCalls = (additionalKwargs) => Array.isArray(additionalKwargs == null ? void 0 : additionalKwargs.tool_calls) && additionalKwargs.tool_calls.length > 0;
34
+ const hasParsedToolCalls = (toolCalls) => Array.isArray(toolCalls) && toolCalls.length > 0;
35
+ const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
36
+ const collectRawToolCallValues = (toolCalls, key) => toolCalls.map((toolCall) => {
37
+ if (!isRecord(toolCall)) {
38
+ return null;
39
+ }
40
+ if (key === "name") {
41
+ const fn = toolCall.function;
42
+ if (isRecord(fn) && typeof fn.name === "string") {
43
+ return fn.name;
44
+ }
45
+ }
46
+ const value = toolCall[key];
47
+ return typeof value === "string" ? value : null;
48
+ }).filter((value) => Boolean(value));
49
+ const sanitizeAdditionalKwargsForToolCalls = (additionalKwargs, parsedToolCalls, options = {}) => {
50
+ var _a;
51
+ if (!hasRawToolCalls(additionalKwargs) || hasParsedToolCalls(parsedToolCalls)) {
52
+ return {
53
+ changed: false,
54
+ additionalKwargs
55
+ };
56
+ }
57
+ const rawToolCalls = additionalKwargs.tool_calls;
58
+ (_a = options.onDiscard) == null ? void 0 : _a.call(options, {
59
+ rawToolCallCount: rawToolCalls.length,
60
+ parsedToolCallCount: (parsedToolCalls == null ? void 0 : parsedToolCalls.length) ?? 0,
61
+ rawToolCallIds: collectRawToolCallValues(rawToolCalls, "id"),
62
+ rawToolCallNames: collectRawToolCallValues(rawToolCalls, "name")
63
+ });
64
+ const sanitized = { ...additionalKwargs };
65
+ delete sanitized.tool_calls;
66
+ return {
67
+ changed: true,
68
+ additionalKwargs: Object.keys(sanitized).length > 0 ? sanitized : void 0
69
+ };
70
+ };
71
+ const sanitizeLangChainAIMessage = (message, options = {}) => {
72
+ const sanitized = sanitizeAdditionalKwargsForToolCalls(message.additional_kwargs, message.tool_calls, options);
73
+ if (!sanitized.changed) {
74
+ return null;
75
+ }
76
+ message.additional_kwargs = sanitized.additionalKwargs ?? {};
77
+ message.lc_kwargs.additional_kwargs = message.additional_kwargs;
78
+ return message;
79
+ };
80
+ // Annotate the CommonJS export names for ESM import in node:
81
+ 0 && (module.exports = {
82
+ sanitizeAdditionalKwargsForToolCalls,
83
+ sanitizeLangChainAIMessage
84
+ });
@@ -31,6 +31,7 @@ __export(utils_exports, {
31
31
  convertToolMessage: () => convertToolMessage
32
32
  });
33
33
  module.exports = __toCommonJS(utils_exports);
34
+ var import_tool_call_sanitizer = require("./tool-call-sanitizer");
34
35
  const convertAIMessage = ({
35
36
  aiEmployee,
36
37
  providerName: provider,
@@ -89,8 +90,19 @@ const convertAIMessage = ({
89
90
  if (aiMessage.response_metadata) {
90
91
  values.metadata.response_metadata = aiMessage.response_metadata;
91
92
  }
92
- if (aiMessage.additional_kwargs) {
93
- values.metadata.additional_kwargs = aiMessage.additional_kwargs;
93
+ const additionalKwargs = (0, import_tool_call_sanitizer.sanitizeAdditionalKwargsForToolCalls)(aiMessage.additional_kwargs, toolCalls, {
94
+ onDiscard: (info) => {
95
+ var _a2, _b;
96
+ (_b = aiEmployee.logger) == null ? void 0 : _b.warn("Discard malformed raw tool calls from AI message", {
97
+ phase: "convertAIMessage",
98
+ messageId: aiMessage.id,
99
+ invalidToolCallCount: ((_a2 = aiMessage.invalid_tool_calls) == null ? void 0 : _a2.length) ?? 0,
100
+ ...info
101
+ });
102
+ }
103
+ }).additionalKwargs;
104
+ if (additionalKwargs) {
105
+ values.metadata.additional_kwargs = additionalKwargs;
94
106
  }
95
107
  return values;
96
108
  };