@nocobase/plugin-ai 2.2.0-beta.6 → 2.2.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai/docs/nocobase/ai-employees/workflow/nodes/knowledge/index.md +8 -0
- package/dist/ai/docs/nocobase/development/index.md +6 -2
- package/dist/ai/docs/nocobase/plugin-development/client/index.md +1 -0
- package/dist/ai/docs/nocobase/shared-components/create-form-registry.md +38 -0
- package/dist/ai/docs/nocobase/shared-components/filter/collection-filter-panel.md +44 -0
- package/dist/ai/docs/nocobase/shared-components/filter/index.md +44 -0
- package/dist/ai/docs/nocobase/shared-components/form/code-scanner.md +34 -0
- package/dist/ai/docs/nocobase/shared-components/form/dialog-form-layout.md +45 -0
- package/dist/ai/docs/nocobase/shared-components/form/drawer-form-layout.md +45 -0
- package/dist/ai/docs/nocobase/shared-components/form/env-variable-input.md +30 -0
- package/dist/ai/docs/nocobase/shared-components/form/file-size-input.md +24 -0
- package/dist/ai/docs/nocobase/shared-components/form/json-text-area.md +28 -0
- package/dist/ai/docs/nocobase/shared-components/form/password-input.md +23 -0
- package/dist/ai/docs/nocobase/shared-components/form/remote-select.md +34 -0
- package/dist/ai/docs/nocobase/shared-components/form/scan-input.md +27 -0
- package/dist/ai/docs/nocobase/shared-components/form/typed-variable-input.md +30 -0
- package/dist/ai/docs/nocobase/shared-components/form/variable-input.md +35 -0
- package/dist/ai/docs/nocobase/shared-components/form/variable-json-text-area.md +33 -0
- package/dist/ai/docs/nocobase/shared-components/form/variable-text-area.md +33 -0
- package/dist/ai/docs/nocobase/shared-components/icon.md +21 -0
- package/dist/ai/docs/nocobase/shared-components/index.md +70 -0
- package/dist/ai/docs/nocobase/shared-components/table/index.md +39 -0
- package/dist/ai/docs/nocobase/shared-components/table/sort-handle.md +37 -0
- package/dist/ai/docs/nocobase/shared-components/table/sortable-row.md +36 -0
- package/dist/client/580.35ba54ff91b7fe6d.js +10 -0
- package/dist/client/ai-employees/admin/mcp/schemas.d.ts +46 -18
- package/dist/client/index.js +1 -1
- package/dist/collections/ai-mcp-clients.js +5 -0
- package/dist/externalVersion.js +16 -16
- package/dist/locale/en-US.json +8 -3
- package/dist/locale/zh-CN.json +8 -3
- package/dist/node_modules/@langchain/xai/package.json +1 -1
- package/dist/node_modules/fs-extra/package.json +1 -1
- package/dist/node_modules/jsonrepair/package.json +1 -1
- package/dist/node_modules/just-bash/package.json +1 -1
- package/dist/node_modules/nodejs-snowflake/package.json +1 -1
- package/dist/node_modules/openai/package.json +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/ai-employees/ai-employee.js +8 -3
- package/dist/server/plugin.d.ts +2 -0
- package/dist/server/plugin.js +30 -0
- package/dist/server/resource/aiConversations.js +1 -1
- package/dist/server/resource/aiMcpClients.js +2 -2
- package/dist/server/resource/aiTools.js +14 -9
- package/package.json +2 -2
- package/dist/client/580.e75f97fb883ad042.js +0 -10
package/dist/externalVersion.js
CHANGED
|
@@ -8,22 +8,22 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/plugin-acl": "2.2.0-beta.
|
|
12
|
-
"@nocobase/plugin-workflow": "2.2.0-beta.
|
|
13
|
-
"@nocobase/client": "2.2.0-beta.
|
|
14
|
-
"@nocobase/utils": "2.2.0-beta.
|
|
15
|
-
"@nocobase/client-v2": "2.2.0-beta.
|
|
16
|
-
"@nocobase/database": "2.2.0-beta.
|
|
17
|
-
"@nocobase/server": "2.2.0-beta.
|
|
18
|
-
"@nocobase/plugin-file-manager": "2.2.0-beta.
|
|
19
|
-
"@nocobase/actions": "2.2.0-beta.
|
|
20
|
-
"@nocobase/ai": "2.2.0-beta.
|
|
11
|
+
"@nocobase/plugin-acl": "2.2.0-beta.7",
|
|
12
|
+
"@nocobase/plugin-workflow": "2.2.0-beta.7",
|
|
13
|
+
"@nocobase/client": "2.2.0-beta.7",
|
|
14
|
+
"@nocobase/utils": "2.2.0-beta.7",
|
|
15
|
+
"@nocobase/client-v2": "2.2.0-beta.7",
|
|
16
|
+
"@nocobase/database": "2.2.0-beta.7",
|
|
17
|
+
"@nocobase/server": "2.2.0-beta.7",
|
|
18
|
+
"@nocobase/plugin-file-manager": "2.2.0-beta.7",
|
|
19
|
+
"@nocobase/actions": "2.2.0-beta.7",
|
|
20
|
+
"@nocobase/ai": "2.2.0-beta.7",
|
|
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.
|
|
26
|
+
"@nocobase/flow-engine": "2.2.0-beta.7",
|
|
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.
|
|
36
|
+
"@nocobase/cache": "2.2.0-beta.7",
|
|
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.
|
|
43
|
-
"@nocobase/resourcer": "2.2.0-beta.
|
|
42
|
+
"@nocobase/acl": "2.2.0-beta.7",
|
|
43
|
+
"@nocobase/resourcer": "2.2.0-beta.7",
|
|
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.
|
|
47
|
+
"@nocobase/plugin-data-source-manager": "2.2.0-beta.7",
|
|
48
48
|
"@langchain/langgraph-checkpoint": "1.1.2",
|
|
49
|
-
"@nocobase/data-source-manager": "2.2.0-beta.
|
|
49
|
+
"@nocobase/data-source-manager": "2.2.0-beta.7",
|
|
50
50
|
"react-dom": "18.2.0",
|
|
51
51
|
"axios": "1.7.7"
|
|
52
52
|
};
|
package/dist/locale/en-US.json
CHANGED
|
@@ -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
|
-
"
|
|
453
|
-
"
|
|
454
|
-
"
|
|
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
|
}
|
package/dist/locale/zh-CN.json
CHANGED
|
@@ -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
|
-
"
|
|
459
|
-
"
|
|
460
|
-
"
|
|
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-
|
|
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-25T01:03:56.995Z"}
|
|
@@ -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-25T01:03:57.151Z"}
|
|
@@ -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-25T01:04:03.240Z"}
|
|
@@ -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-25T01:04:03.031Z"}
|
|
@@ -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-25T01:03:51.739Z"}
|
|
@@ -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-
|
|
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-25T01:03:54.483Z"}
|
|
@@ -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-25T01:03:52.663Z"}
|
|
@@ -1145,7 +1145,7 @@ If information is missing, clearly state it in the summary.</Important>`;
|
|
|
1145
1145
|
}
|
|
1146
1146
|
const tools = await this.listTools({ scope: "GENERAL" });
|
|
1147
1147
|
if (this.webSearch === true) {
|
|
1148
|
-
const subAgentWebSearch = await this.toolsManager.getTools(import_ai.SYSTEM_TOOLS.WEB_SEARCH);
|
|
1148
|
+
const subAgentWebSearch = await this.toolsManager.getTools(import_ai.SYSTEM_TOOLS.WEB_SEARCH, { ctx: this.ctx });
|
|
1149
1149
|
tools.push(subAgentWebSearch);
|
|
1150
1150
|
}
|
|
1151
1151
|
const generalToolsNameSet = new Set(tools.map((x) => x.definition.name));
|
|
@@ -1153,7 +1153,9 @@ If information is missing, clearly state it in the summary.</Important>`;
|
|
|
1153
1153
|
const settingsTools = ((_a = this.employee.skillSettings) == null ? void 0 : _a.tools) ?? [];
|
|
1154
1154
|
const employeeTools = [...settingsTools, ...this.tools];
|
|
1155
1155
|
if (await this.plugin.knowledgeBaseManager.isEnabledKnowledgeBase(this.employee.toJSON())) {
|
|
1156
|
-
const knowledgeBaseRetrieveTool = await this.toolsManager.getTools(import_ai.SYSTEM_TOOLS.KNOWLEDGE_BASE
|
|
1156
|
+
const knowledgeBaseRetrieveTool = await this.toolsManager.getTools(import_ai.SYSTEM_TOOLS.KNOWLEDGE_BASE, {
|
|
1157
|
+
ctx: this.ctx
|
|
1158
|
+
});
|
|
1157
1159
|
if (knowledgeBaseRetrieveTool) {
|
|
1158
1160
|
employeeTools.push({ name: import_ai.SYSTEM_TOOLS.KNOWLEDGE_BASE });
|
|
1159
1161
|
}
|
|
@@ -1331,7 +1333,10 @@ If information is missing, clearly state it in the summary.</Important>`;
|
|
|
1331
1333
|
return new Map(tools.map((tool) => [tool.definition.name, tool]));
|
|
1332
1334
|
}
|
|
1333
1335
|
listTools(filter) {
|
|
1334
|
-
return this.toolsManager.listTools(
|
|
1336
|
+
return this.toolsManager.listTools({
|
|
1337
|
+
...filter,
|
|
1338
|
+
ctx: this.ctx
|
|
1339
|
+
});
|
|
1335
1340
|
}
|
|
1336
1341
|
withRunMetadata(config) {
|
|
1337
1342
|
return {
|
package/dist/server/plugin.d.ts
CHANGED
|
@@ -48,6 +48,8 @@ export declare class PluginAIServer extends Plugin {
|
|
|
48
48
|
registerLLMProviders(): void;
|
|
49
49
|
registerTools(): void;
|
|
50
50
|
defineResources(): void;
|
|
51
|
+
registerMcpClientEvents(): void;
|
|
52
|
+
private clearMcpUserContextCacheAfterCommit;
|
|
51
53
|
setPermissions(): void;
|
|
52
54
|
registerWorkflow(): void;
|
|
53
55
|
registerWorkContextResolveStrategy(): void;
|
package/dist/server/plugin.js
CHANGED
|
@@ -164,6 +164,7 @@ class PluginAIServer extends import_server.Plugin {
|
|
|
164
164
|
this.registerLLMProviders();
|
|
165
165
|
this.registerTools();
|
|
166
166
|
this.defineResources();
|
|
167
|
+
this.registerMcpClientEvents();
|
|
167
168
|
this.setPermissions();
|
|
168
169
|
this.registerWorkflow();
|
|
169
170
|
this.registerWorkContextResolveStrategy();
|
|
@@ -217,6 +218,35 @@ class PluginAIServer extends import_server.Plugin {
|
|
|
217
218
|
this.app.resourceManager.registerActionHandler(`aiEmployees:${name}`, action);
|
|
218
219
|
});
|
|
219
220
|
}
|
|
221
|
+
registerMcpClientEvents() {
|
|
222
|
+
this.db.on("aiMcpClients.afterCreate", (model, { transaction } = {}) => {
|
|
223
|
+
if (model.get("useUserContext") === true) {
|
|
224
|
+
this.clearMcpUserContextCacheAfterCommit(transaction);
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
this.db.on("aiMcpClients.afterUpdate", (model, { transaction } = {}) => {
|
|
228
|
+
if (model.get("useUserContext") === true || model.previous("useUserContext") === true) {
|
|
229
|
+
this.clearMcpUserContextCacheAfterCommit(transaction);
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
this.db.on("aiMcpClients.afterDestroy", (model, { transaction } = {}) => {
|
|
233
|
+
if (model.get("useUserContext") === true) {
|
|
234
|
+
this.clearMcpUserContextCacheAfterCommit(transaction);
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
clearMcpUserContextCacheAfterCommit(transaction) {
|
|
239
|
+
const clearCache = () => {
|
|
240
|
+
this.ai.mcpManager.clearUserContextCache().catch((error) => {
|
|
241
|
+
this.app.log.warn("fail to clear user-bound mcp client cache", error);
|
|
242
|
+
});
|
|
243
|
+
};
|
|
244
|
+
if (transaction) {
|
|
245
|
+
transaction.afterCommit(clearCache);
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
clearCache();
|
|
249
|
+
}
|
|
220
250
|
setPermissions() {
|
|
221
251
|
this.app.acl.registerSnippet({
|
|
222
252
|
name: `pm.${this.name}.llm-services`,
|
|
@@ -671,7 +671,7 @@ var aiConversations_default = {
|
|
|
671
671
|
const toolMessageMap = new Map(
|
|
672
672
|
toolMessages.map((toolMessage) => [toolMessage.toolCallId, toolMessage])
|
|
673
673
|
);
|
|
674
|
-
const toolsList = await plugin.ai.toolsManager.listTools({ sessionId: message.sessionId });
|
|
674
|
+
const toolsList = await plugin.ai.toolsManager.listTools({ sessionId: message.sessionId, ctx });
|
|
675
675
|
const toolsMap = new Map(toolsList.map((t) => [t.definition.name, t]));
|
|
676
676
|
for (const toolCall2 of toolCalls) {
|
|
677
677
|
const tools = toolsMap.get(toolCall2.name);
|
|
@@ -44,7 +44,7 @@ const aiMcpClients = {
|
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
46
|
const plugin = ctx.app.pm.get("ai");
|
|
47
|
-
const result = await plugin.ai.mcpManager.testConnection(values);
|
|
47
|
+
const result = await plugin.ai.mcpManager.testConnection(values, ctx);
|
|
48
48
|
ctx.body = result;
|
|
49
49
|
await next();
|
|
50
50
|
},
|
|
@@ -56,7 +56,7 @@ const aiMcpClients = {
|
|
|
56
56
|
},
|
|
57
57
|
listTools: async (ctx, next) => {
|
|
58
58
|
const plugin = ctx.app.pm.get("ai");
|
|
59
|
-
ctx.body = await plugin.ai.mcpManager.listMCPTools();
|
|
59
|
+
ctx.body = await plugin.ai.mcpManager.listMCPTools(ctx);
|
|
60
60
|
await next();
|
|
61
61
|
},
|
|
62
62
|
updateToolPermission: async (ctx, next) => {
|
|
@@ -34,10 +34,14 @@ const aiTools = {
|
|
|
34
34
|
name: "aiTools",
|
|
35
35
|
actions: {
|
|
36
36
|
list: async (ctx, next) => {
|
|
37
|
-
const
|
|
38
|
-
const {
|
|
39
|
-
const
|
|
40
|
-
|
|
37
|
+
const actionCtx = ctx;
|
|
38
|
+
const { toolsManager } = actionCtx.app.aiManager;
|
|
39
|
+
const { filter } = actionCtx.action.params;
|
|
40
|
+
const tools = await toolsManager.listTools({
|
|
41
|
+
...filter,
|
|
42
|
+
ctx: actionCtx
|
|
43
|
+
});
|
|
44
|
+
actionCtx.body = tools.map((t) => ({
|
|
41
45
|
...t,
|
|
42
46
|
definition: {
|
|
43
47
|
name: t.definition.name,
|
|
@@ -50,8 +54,9 @@ const aiTools = {
|
|
|
50
54
|
},
|
|
51
55
|
listBinding: async (ctx, next) => {
|
|
52
56
|
var _a, _b;
|
|
53
|
-
const
|
|
54
|
-
const
|
|
57
|
+
const actionCtx = ctx;
|
|
58
|
+
const { username } = actionCtx.action.params;
|
|
59
|
+
const aiEmployee = await actionCtx.app.db.getRepository("aiEmployees").findOne({
|
|
55
60
|
filter: {
|
|
56
61
|
username
|
|
57
62
|
}
|
|
@@ -60,12 +65,12 @@ const aiTools = {
|
|
|
60
65
|
return [];
|
|
61
66
|
}
|
|
62
67
|
const bindingToolNames = ((_b = (_a = aiEmployee.skillSettings) == null ? void 0 : _a.tools) == null ? void 0 : _b.map((tool) => tool.name)) ?? [];
|
|
63
|
-
const plugin =
|
|
64
|
-
const tools = await plugin.ai.toolsManager.listTools();
|
|
68
|
+
const plugin = actionCtx.app.pm.get("ai");
|
|
69
|
+
const tools = await plugin.ai.toolsManager.listTools({ ctx: actionCtx });
|
|
65
70
|
const result = tools.filter(
|
|
66
71
|
(tool) => tool.scope === "GENERAL" && tool.from === "loader" || bindingToolNames.includes(tool.definition.name)
|
|
67
72
|
);
|
|
68
|
-
|
|
73
|
+
actionCtx.body = result.map(({ introduction, definition }) => ({
|
|
69
74
|
title: (introduction == null ? void 0 : introduction.title) ?? definition.name,
|
|
70
75
|
name: definition.name,
|
|
71
76
|
description: (introduction == null ? void 0 : introduction.about) ?? definition.description
|
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.2.0-beta.
|
|
9
|
+
"version": "2.2.0-beta.7",
|
|
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",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"keywords": [
|
|
66
66
|
"AI"
|
|
67
67
|
],
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "e6a3fa8963a73cd9ddfc1273d71b0012483e1ad8"
|
|
69
69
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
"use strict";(self.webpackChunk_nocobase_plugin_ai=self.webpackChunk_nocobase_plugin_ai||[]).push([["580"],{7439:function(e,t,n){n.r(t),n.d(t,{MCPSettings:function(){return ep}});var r=n(3342),o=n(5477),a=n(7375),i=n(2059),s=n(9452),l=n(5230),c=n(9155),u=n.n(c),p={name:"aiMcpClients",fields:[{name:"name",type:"uid",primaryKey:!0},{name:"title",type:"string",interface:"input",uiSchema:{title:'{{t("Title")}}',"x-component":"Input"}},{name:"description",type:"string",interface:"input",uiSchema:{title:'{{t("Description")}}',"x-component":"Input.TextArea"}},{name:"enabled",type:"boolean",defaultValue:!0},{name:"transport",type:"string",interface:"select",uiSchema:{title:'{{t("Transport")}}',"x-component":"Select"}},{name:"command",type:"string",interface:"input",uiSchema:{title:'{{t("Command")}}',"x-component":"Input"}},{name:"args",type:"json",defaultValue:[]},{name:"env",type:"json",defaultValue:{}},{name:"url",type:"string",interface:"input",uiSchema:{title:'{{t("URL")}}',"x-component":"Input"}},{name:"headers",type:"json",defaultValue:{}},{name:"restart",type:"json",defaultValue:{}}]},m=n(3079);function d(e,t,n,r,o,a,i){try{var s=e[a](i),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var f=(0,c.createContext)({rebuildClient:function(){var e;return(e=function(){return function(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(i,"next",{value:l(0)}),s(i,"throw",{value:l(1)}),s(i,"return",{value:l(2)}),"function"==typeof Symbol&&s(i,Symbol.iterator,{value:function(){return this}}),i;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){return[2,void 0]})},function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function i(e){d(a,r,o,i,s,"next",e)}function s(e){d(a,r,o,i,s,"throw",e)}i(void 0)})})()},rebuilding:!1}),y=function(e,t){var n,r,o;return null!=(n=null!=(r=null==e||null==(o=e.data)?void 0:o.data)?r:null==e?void 0:e.data)?n:t};function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function b(e,t,n,r,o,a,i){try{var s=e[a](i),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function h(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function i(e){b(a,r,o,i,s,"next",e)}function s(e){b(a,r,o,i,s,"throw",e)}i(void 0)})}}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function g(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],i=!0,s=!1;try{for(o=o.call(e);!(i=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,r=e}finally{try{i||null==o.return||o.return()}finally{if(s)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(i,"next",{value:l(0)}),s(i,"throw",{value:l(1)}),s(i,"return",{value:l(2)}),"function"==typeof Symbol&&s(i,Symbol.iterator,{value:function(){return this}}),i;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var A=[{label:"Ask",value:"ASK"},{label:"Allow",value:"ALLOW"}],P=function(e,t){var n=null==e?void 0:e[t];return Array.isArray(n)?n:[]},S=function(){var e=(0,m.kj)(),t=(0,r.useAPIClient)(),n=i.App.useApp().message,o=(0,r.useActionContext)().visible,a=(0,r.useCollectionRecordData)(),s=(0,c.useContext)(f).rebuilding,l=C((0,c.useState)([]),2),p=l[0],d=l[1],v=C((0,c.useState)(!1),2),b=v[0],S=v[1],O=C((0,c.useState)(null),2),E=O[0],j=O[1],k=C((0,c.useState)(1),2),I=k[0],T=k[1],R=p.length,D=(0,c.useRef)(n),M=(0,c.useRef)(e);return D.current=n,M.current=e,(0,c.useEffect)(function(){if(o){var e=!1;return h(function(){var n,r;return w(this,function(o){switch(o.label){case 0:S(!0),o.label=1;case 1:return o.trys.push([1,3,4,5]),[4,t.resource("aiMcpClients").listTools()];case 2:return n=P(y(o.sent(),null),a.name),e||(T(1),d(n)),[3,5];case 3:return r=o.sent(),e||(D.current.error((null==r?void 0:r.message)||M.current("Failed to load MCP tools")),T(1),d([])),[3,5];case 4:return e||S(!1),[7];case 5:return[2]}})})(),function(){e=!0}}},[t,a.name,o]),u().createElement(i.Space,{direction:"vertical",size:"middle",style:{width:"100%"}},b?u().createElement("div",{style:{padding:"24px 0",textAlign:"center"}},u().createElement(i.Spin,null)):p.length?u().createElement(i.List,{itemLayout:"vertical",dataSource:p,pagination:{current:I,pageSize:10,total:R,onChange:T,hideOnSinglePage:!1,size:"small",showTotal:function(t){return e("Total {{count}} items",{count:t})}},renderItem:function(n){return u().createElement(i.List.Item,{key:n.name,extra:u().createElement("div",{style:{fontSize:12,color:"var(--nb-color-text-secondary)"}},e("Permission"),u().createElement(i.Segmented,{style:{marginLeft:8},size:"small",options:A.map(function(t){return g(x({},t),{label:e(t.label)})}),value:n.permission,disabled:s||E===n.name,onChange:function(e){var r;return r=n.name,h(function(){var n,o;return w(this,function(a){switch(a.label){case 0:n=p,j(r),d(function(t){return t.map(function(t){return t.name===r?g(x({},t),{permission:e}):t})}),a.label=1;case 1:return a.trys.push([1,3,4,5]),[4,t.resource("aiMcpClients").updateToolPermission({values:{toolName:r,permission:e}})];case 2:return a.sent(),[3,5];case 3:return o=a.sent(),d(n),D.current.error((null==o?void 0:o.message)||M.current("Failed to update tool permission")),[3,5];case 4:return j(null),[7];case 5:return[2]}})})()}}))},u().createElement("div",null,n.title),n.description?u().createElement(i.Typography.Paragraph,{style:{color:"var(--nb-color-text-secondary)",fontSize:12,marginBottom:0},ellipsis:{rows:3,expandable:"collapsible"}},n.description):null)}}):u().createElement(i.Empty,{image:i.Empty.PRESENTED_IMAGE_SIMPLE,description:e("No data")}))};function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var E=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n="stdio"===e?'{{$deps[0] === "stdio"}}':'{{["http", "sse"].includes($deps[0])}}';return[{dependencies:["transport"],fulfill:{state:O({visible:n},t?{required:n}:{})}}]},j=function(e){return{name:O({type:"string","x-decorator":"FormItem",title:'{{ t("Name") }}',"x-component":"Input",required:!0},e.disableName?{"x-component-props":{disabled:!0}}:{}),title:{type:"string","x-decorator":"FormItem",title:'{{ t("Title") }}',"x-component":"Input",required:!0},description:{type:"string","x-decorator":"FormItem",title:'{{ t("Description") }}',"x-component":"Input.TextArea","x-component-props":{autoSize:{minRows:2,maxRows:4}}},transport:{type:"string","x-decorator":"FormItem",title:'{{ t("Transport") }}',"x-component":"Select",enum:"{{ transportOptions }}",required:!0},command:{type:"string","x-decorator":"FormItem",title:'{{ t("Command") }}',"x-component":"Input","x-component-props":{placeholder:'{{ t("For example: npx, uvx, node") }}'},"x-reactions":E("stdio",!0)},args:{type:"string","x-decorator":"FormItem",title:'{{ t("Arguments") }}',"x-component":"Input","x-component-props":{placeholder:'{{ t("Space-separated args, e.g.: -u --flag value") }}'},"x-reactions":E("stdio")},env:{type:"array","x-component":"ArrayItems","x-decorator":"FormItem",title:'{{ t("Environment variables") }}',items:{type:"object",properties:{space:{type:"void","x-component":"Space","x-component-props":{style:{flexWrap:"nowrap",maxWidth:"100%",display:"flex"},className:"{{ keyValueRowClassName }}"},properties:{name:{type:"string","x-decorator":"FormItem","x-component":"Input","x-component-props":{placeholder:'{{ t("Name") }}'}},value:{type:"string","x-decorator":"FormItem","x-component":"TextAreaWithGlobalScope","x-component-props":{useTypedConstant:!0}},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}}}},properties:{add:{type:"void",title:'{{ t("Add variable") }}',"x-component":"ArrayItems.Addition"}},"x-reactions":E("stdio")},url:{type:"string","x-decorator":"FormItem",title:'{{ t("URL") }}',"x-component":"Input","x-component-props":{placeholder:'{{ t("For example: https://example.com/mcp") }}'},"x-reactions":E("remote",!0)},headers:{type:"array","x-component":"ArrayItems","x-decorator":"FormItem",title:'{{ t("Headers") }}',items:{type:"object",properties:{space:{type:"void","x-component":"Space","x-component-props":{style:{flexWrap:"nowrap",maxWidth:"100%",display:"flex"},className:"{{ keyValueRowClassName }}"},properties:{name:{type:"string","x-decorator":"FormItem","x-component":"Input","x-component-props":{placeholder:'{{ t("Name") }}'}},value:{type:"string","x-decorator":"FormItem","x-component":"TextAreaWithGlobalScope","x-component-props":{useTypedConstant:!0}},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}}}},properties:{add:{type:"void",title:'{{ t("Add request header") }}',"x-component":"ArrayItems.Addition"}},"x-reactions":E("remote")},restart:{type:"object","x-decorator":"FormItem",title:'{{ t("Restart options") }}',"x-component":"Input.JSON","x-visible":!1,"x-component-props":{autoSize:{minRows:4}}},testResult:{type:"void","x-component":"TestConnectionResult"},footer:{type:"void","x-component":e.footerComponent||"Action.Drawer.Footer",properties:{test:{type:"void","x-component":"TestConnectionButton"},cancel:{title:'{{ t("Cancel") }}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{ t("Submit") }}',"x-component":"Action","x-component-props":{type:"primary"},"x-use-component-props":e.submitPropsHook}}}}},k={type:"void",properties:j({submitPropsHook:"useCreateActionProps"})},I={type:"void",properties:j({disableName:!0,submitPropsHook:"useEditActionProps",footerComponent:"Action.Drawer.FootBar"})},T={type:"void",properties:{tools:{type:"void","x-component":"MCPToolsList"}}},R={type:"void",properties:{createDrawer:{type:"void",title:'{{ t("Add new") }}',"x-component":"Action.Drawer","x-decorator":"FormV2","x-use-decorator-props":"useCreateFormProps",properties:k.properties}}};I.properties,T.properties;var D={type:"void",name:"ai-mcp-clients",properties:{card:{type:"void","x-component":"CardItem","x-component-props":{heightMode:"fullHeight"},"x-decorator":"TableBlockProvider","x-decorator-props":{collection:"aiMcpClients",action:"list",rowKey:"name"},properties:{actions:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:20}},properties:{refresh:{title:"{{t('Refresh')}}","x-component":"Action","x-use-component-props":"useRefreshActionProps","x-component-props":{icon:"ReloadOutlined"}},bulkDelete:{title:"{{t('Delete')}}","x-action":"destroy","x-component":"Action","x-use-component-props":"useMCPBulkDestroyActionProps","x-component-props":{icon:"DeleteOutlined",confirm:{title:"{{t('Delete record')}}",content:"{{t('Are you sure you want to delete it?')}}"}}},add:{type:"void",title:"{{t('Add new')}}","x-align":"right","x-component":"AddNew"}}},table:{type:"array","x-component":"TableV2","x-use-component-props":"useTableBlockProps","x-component-props":{rowKey:"name",rowSelection:{type:"checkbox"}},properties:{column1:{type:"void",title:'{{ t("Name") }}',"x-component":"TableV2.Column",properties:{name:{type:"string","x-component":"Input","x-read-pretty":!0}}},column2:{type:"void",title:'{{ t("Title") }}',"x-component":"TableV2.Column",properties:{title:{type:"string","x-component":"Input","x-read-pretty":!0}}},column4:{type:"void",title:'{{ t("Transport") }}',"x-component":"TableV2.Column",properties:{transport:{type:"string","x-component":"TransportTag"}}},column5:{type:"void",title:'{{ t("Enabled") }}',"x-component":"TableV2.Column",properties:{enabled:{type:"boolean","x-component":"EnabledSwitch"}}},column6:{type:"void",title:'{{ t("Actions") }}',"x-decorator":"TableV2.Column.ActionBar","x-component":"TableV2.Column",properties:{actions:{type:"void","x-component":"Space","x-component-props":{split:"|"},properties:{view:{type:"void",title:'{{ t("View") }}',"x-component":"Action.Link","x-component-props":{openMode:"drawer"},properties:{drawer:{type:"void",title:'{{ t("MCP tools") }}',"x-component":"Action.Drawer","x-component-props":{width:720},properties:{content:{type:"void","x-component":"MCPViewDrawerContent"}}}}},edit:{type:"void",title:'{{ t("Edit") }}',"x-action":"update","x-component":"Action.Link","x-component-props":{openMode:"drawer"},properties:{drawer:{type:"void",title:'{{ t("Edit record") }}',"x-component":"Action.Drawer","x-decorator":"FormV2","x-use-decorator-props":"useEditFormProps",properties:{content:{type:"void","x-component":"MCPEditDrawerContent"}}}}},destroy:{type:"void",title:'{{ t("Delete") }}',"x-action":"destroy","x-component":"Action.Link","x-use-component-props":"useMCPDestroyActionProps","x-component-props":{confirm:{title:"{{t('Delete record')}}",content:"{{t('Are you sure you want to delete it?')}}"}}}}}}}}}}}}};function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function F(e,t,n,r,o,a,i){try{var s=e[a](i),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function V(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function i(e){F(a,r,o,i,s,"next",e)}function s(e){F(a,r,o,i,s,"throw",e)}i(void 0)})}}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function N(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],i=!0,s=!1;try{for(o=o.call(e);!(i=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,r=e}finally{try{i||null==o.return||o.return()}finally{if(s)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return M(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function z(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function q(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(i,"next",{value:l(0)}),s(i,"throw",{value:l(1)}),s(i,"return",{value:l(2)}),"function"==typeof Symbol&&s(i,Symbol.iterator,{value:function(){return this}}),i;function l(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}function H(){var e,t,n=(e=["\n & > .ant-space-item:first-child,\n & > .ant-space-item:last-child {\n flex-shrink: 0;\n }\n\n & > .ant-space-item:first-child,\n & > .ant-space-item:nth-of-type(2) {\n flex: 1;\n }\n"],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return H=function(){return n},n}var W=[{label:"Stdio",value:"stdio"},{label:"HTTP (Streamable)",value:"http"},{label:"HTTP + SSE (Legacy)",value:"sse"}],_={stdio:"blue",http:"green",sse:"gold"},G=(0,o.css)(H()),K=function(e){return Object.entries(e||{}).map(function(e){var t=L(e,2),n=t[0],r=t[1];return{name:n,value:null==r?"":String(r)}})},U=function(e){return(Array.isArray(e)?e:[]).reduce(function(e,t){return(null==t?void 0:t.name)&&(e[t.name]=t.value||""),e},{})},$=function(e){var t=e.transport,n=N(B({},e),{args:"string"==typeof e.args?e.args.split(" ").map(function(e){return e.trim()}).filter(function(e){return e.length>0}):Array.isArray(e.args)?e.args:[],env:U(e.env),headers:U(e.headers),restart:e.restart&&"object"===z(e.restart)&&!Array.isArray(e.restart)?e.restart:{}});return"stdio"===t?N(B({},n),{url:null,headers:{}}):N(B({},n),{command:null,args:[],env:{}})},J=function(){var e=(0,r.useActionContext)().visible,t=(0,c.useMemo)(function(){return{enabled:!0,transport:"stdio",args:"",env:[],headers:[],restart:{}}},[]),n=(0,c.useMemo)(function(){return(0,s.createForm)({initialValues:t})},[t]);return(0,c.useEffect)(function(){e&&(n.setInitialValues(t),n.reset())},[n,t,e]),{form:n}},Q=function(){var e=(0,r.useCollectionRecordData)(),t=(0,r.useActionContext)().visible,n=(0,c.useMemo)(function(){return N(B({},e),{args:Array.isArray(null==e?void 0:e.args)?e.args.join(" "):"",env:K(null==e?void 0:e.env),headers:K(null==e?void 0:e.headers),restart:(null==e?void 0:e.restart)&&"object"===z(e.restart)&&!Array.isArray(e.restart)?e.restart:{}})},[e]),o=(0,c.useMemo)(function(){return(0,s.createForm)({initialValues:n})},[n]);return(0,c.useEffect)(function(){t&&(o.setInitialValues(n),o.reset())},[o,n,t]),{form:o}},X=function(){var e=(0,r.useActionContext)().setVisible;return{type:"default",onClick:function(){e(!1)}}},Y=(0,c.createContext)({result:null,loading:!1,setResult:function(){},setLoading:function(){}}),Z=function(){var e=(0,r.useAPIClient)(),t=(0,m.kj)(),n=(0,c.useContext)(Y),o=n.setResult,a=n.setLoading;return function(n){return V(function(){var r,i,s;return q(this,function(l){switch(l.label){case 0:a(!0),o(null),l.label=1;case 1:return l.trys.push([1,3,4,5]),r=$(n),[4,e.resource("aiMcpClients").testConnection({values:r})];case 2:return o(i=y({data:l.sent().data},null)),[2,!!(null==i?void 0:i.success)];case 3:return o({success:!1,error:(null==(s=l.sent())?void 0:s.message)||t("An error occurred while testing the connection")}),[2,!1];case 4:return a(!1),[7];case 5:return[2]}})})()}},ee=function(){var e=(0,r.useActionContext)().setVisible,t=i.App.useApp().message,n=(0,l.useForm)(),o=(0,r.useAPIClient)(),a=(0,r.useDataBlockRequest)().refresh,s=(0,m.kj)(),u=(0,c.useContext)(Y).loading,p=(0,c.useContext)(f),d=p.rebuildClient,y=p.rebuilding,v=Z();return{type:"primary",loading:y||u,onClick:function(){return V(function(){return q(this,function(r){switch(r.label){case 0:return[4,n.submit()];case 1:return r.sent(),[4,v(n.values)];case 2:if(!r.sent())return[2];return[4,o.resource("aiMcpClients").create({values:$(n.values)})];case 3:return r.sent(),[4,d()];case 4:return r.sent(),[4,a()];case 5:return r.sent(),t.success(s("Saved successfully")),e(!1),n.reset(),[2]}})})()}}},et=function(){var e=(0,r.useActionContext)().setVisible,t=i.App.useApp().message,n=(0,l.useForm)(),o=(0,r.useAPIClient)(),a=(0,r.useDataBlockRequest)().refresh,s=(0,r.useCollectionRecordData)(),u=(0,m.kj)(),p=(0,c.useContext)(Y).loading,d=(0,c.useContext)(f),y=d.rebuildClient,v=d.rebuilding,b=Z();return{type:"primary",loading:v||p,onClick:function(){return V(function(){return q(this,function(r){switch(r.label){case 0:return[4,n.submit()];case 1:return r.sent(),[4,b(n.values)];case 2:if(!r.sent())return[2];return[4,o.resource("aiMcpClients").update({values:$(n.values),filterByTk:s.name})];case 3:return r.sent(),[4,y()];case 4:return r.sent(),[4,a()];case 5:return r.sent(),t.success(u("Saved successfully")),e(!1),n.reset(),[2]}})})()}}},en=(0,l.observer)(function(){var e=(0,l.useForm)(),t=(0,r.useAPIClient)(),n=(0,c.useContext)(Y),o=n.setResult,a=n.loading,s=n.setLoading,p=(0,m.kj)();return u().createElement(i.Button,{type:"default",loading:a,onClick:function(){return V(function(){var n,r;return q(this,function(a){switch(a.label){case 0:s(!0),o(null),a.label=1;case 1:return a.trys.push([1,3,4,5]),n=$(e.values),[4,t.resource("aiMcpClients").testConnection({values:n})];case 2:return o(y({data:a.sent().data},null)),[3,5];case 3:return o({success:!1,error:(null==(r=a.sent())?void 0:r.message)||p("An error occurred while testing the connection")}),[3,5];case 4:return s(!1),[7];case 5:return[2]}})})()}},p("Test flight"))},{displayName:"TestConnectionButton"}),er=(0,l.observer)(function(){var e=(0,c.useContext)(Y),t=e.result,n=e.loading,r=(0,m.kj)();return n?u().createElement("div",{style:{padding:"16px 0",textAlign:"center"}},u().createElement(i.Spin,{tip:r("Testing connection...")})):t?t.success?u().createElement(i.Alert,{type:"success",showIcon:!0,icon:u().createElement(a.CheckCircleOutlined,null),style:{marginTop:16},message:r("Connection Successful"),description:u().createElement("div",null,u().createElement("p",null,r("Successfully connected to MCP server")),u().createElement("p",null,r("Tools found"),": ",t.toolsCount),t.tools&&t.tools.length>0&&u().createElement("div",{style:{marginTop:8}},u().createElement("p",{style:{fontWeight:"bold",marginBottom:4}},r("Tools"),":"),u().createElement("div",{style:{maxHeight:120,overflow:"auto"}},t.tools.map(function(e){return u().createElement(i.Tag,{key:e,style:{margin:"2px"}},e)}),t.toolsTruncated&&u().createElement("span",null,"..."))))}):u().createElement(i.Alert,{type:"error",showIcon:!0,icon:u().createElement(a.CloseCircleOutlined,null),style:{marginTop:16},message:r("Connection Failed"),description:u().createElement("div",null,u().createElement("p",null,t.error||r("Failed to connect to MCP server")),t.details&&u().createElement("pre",{style:{maxHeight:100,overflow:"auto",fontSize:11,margin:0}},t.details))}):null},{displayName:"TestConnectionResult"}),eo=function(){var e=(0,m.kj)(),t=L((0,c.useState)(!1),2),n=t[0],o=t[1],s=L((0,c.useState)(null),2),l=s[0],p=s[1],d=L((0,c.useState)(!1),2),f=d[0],y=d[1],v=(0,c.useMemo)(function(){return{result:l,loading:f,setResult:p,setLoading:y}},[l,f]);return u().createElement(r.ActionContextProvider,{value:{visible:n,setVisible:o}},u().createElement(i.Button,{icon:u().createElement(a.PlusOutlined,null),type:"primary",onClick:function(){p(null),y(!1),o(!0)}},e("Add new")),u().createElement(Y.Provider,{value:v},u().createElement(r.SchemaComponent,{components:{TestConnectionButton:en,TestConnectionResult:er,Space:i.Space},scope:{t:e,transportOptions:W,keyValueRowClassName:G,useCreateFormProps:J,useCancelActionProps:X,useCreateActionProps:ee},schema:R})))},ea=function(){var e=(0,m.kj)(),t=(0,r.useCollectionRecordData)(),n=L((0,c.useState)(null),2),o=n[0],a=n[1],s=L((0,c.useState)(!1),2),l=s[0],p=s[1],d=(0,c.useMemo)(function(){return{result:o,loading:l,setResult:a,setLoading:p}},[o,l]);return u().createElement(r.CollectionRecordProvider,{record:t},u().createElement(Y.Provider,{value:d},u().createElement(r.SchemaComponent,{components:{TestConnectionButton:en,TestConnectionResult:er,Space:i.Space},scope:{t:e,transportOptions:W,keyValueRowClassName:G,useEditFormProps:Q,useCancelActionProps:X,useEditActionProps:et},schema:I})))},ei=function(){var e=(0,m.kj)(),t=(0,r.useCollectionRecordData)();return u().createElement(r.CollectionRecordProvider,{record:t},u().createElement(r.SchemaComponent,{components:{MCPToolsList:S},scope:{t:e},schema:T}))},es=function(){var e,t=(0,r.useCollectionRecordData)().transport,n=(null==(e=W.find(function(e){return e.value===t}))?void 0:e.label)||t;return u().createElement(i.Tag,{color:_[t]},n)},el=(0,l.observer)(function(){var e=(0,r.useAPIClient)(),t=(0,r.useCollectionRecordData)(),n=(0,r.useDataBlockRequest)().refresh,o=(0,c.useContext)(f),a=o.rebuildClient,s=o.rebuilding,l=L((0,c.useState)(!1),2),p=l[0],m=l[1];return u().createElement(i.Switch,{size:"small",checked:!1!==t.enabled,loading:p,disabled:s,onChange:function(r){return V(function(){return q(this,function(o){switch(o.label){case 0:m(!0),o.label=1;case 1:return o.trys.push([1,,5,6]),[4,e.resource("aiMcpClients").update({filterByTk:t.name,values:{enabled:r}})];case 2:return o.sent(),[4,a()];case 3:return o.sent(),[4,n()];case 4:return o.sent(),[3,6];case 5:return m(!1),[7];case 6:return[2]}})})()}})},{displayName:"MCPEnabledSwitch"}),ec=function(){var e=(0,r.useDestroyActionProps)(),t=(0,c.useContext)(f),n=t.rebuildClient,o=t.rebuilding;return N(B({},e),{loading:o,onClick:function(t,r){return V(function(){var o;return q(this,function(a){switch(a.label){case 0:return[4,null==(o=e.onClick)?void 0:o.call(e,t,r)];case 1:return a.sent(),[4,n()];case 2:return a.sent(),[2]}})})()}})},eu=function(){var e=(0,r.useBulkDestroyActionProps)(),t=(0,r.useBlockRequestContext)().field,n=(0,c.useContext)(f),o=n.rebuildClient,a=n.rebuilding;return N(B({},e),{loading:a,onClick:function(n,r){return V(function(){var a,i,s;return q(this,function(l){switch(l.label){case 0:if(!(null==t||null==(i=t.data)||null==(a=i.selectedRowKeys)?void 0:a.length))return[2];return[4,null==(s=e.onClick)?void 0:s.call(e,n,r)];case 1:return l.sent(),[4,o()];case 2:return l.sent(),[2]}})})()}})},ep=function(){var e=(0,m.kj)(),t=(0,r.useAPIClient)(),n=(0,c.useRef)(Promise.resolve()),o=(0,c.useRef)(0),a=L((0,c.useState)(!1),2),i=a[0],s=a[1],l=(0,c.useCallback)(function(){return V(function(){var e;return q(this,function(r){return o.current+=1,s(!0),e=n.current.catch(function(){}).then(function(){return V(function(){return q(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,t.resource("aiMcpClients").rebuildClient()];case 1:case 2:return e.sent(),[3,3];case 3:return[2]}})})()}),n.current=e.finally(function(){o.current-=1,0===o.current&&s(!1)}),[2,e]})})()},[t]),d=(0,c.useMemo)(function(){return{rebuildClient:l,rebuilding:i}},[l,i]);return u().createElement(f.Provider,{value:d},u().createElement(r.ExtendCollectionsProvider,{collections:[p]},u().createElement(r.SchemaComponent,{components:{AddNew:eo,MCPEditDrawerContent:ea,MCPViewDrawerContent:ei,MCPToolsList:S,TestConnectionButton:en,TestConnectionResult:er,TransportTag:es,EnabledSwitch:el},scope:{t:e,transportOptions:W,keyValueRowClassName:G,useCreateFormProps:J,useEditFormProps:Q,useCancelActionProps:X,useCreateActionProps:ee,useEditActionProps:et,useMCPDestroyActionProps:ec,useMCPBulkDestroyActionProps:eu},schema:D})))}}}]);
|