@nocobase/plugin-ai 2.1.0-beta.36 → 2.1.0-beta.37

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.
@@ -12,6 +12,7 @@ export declare class AIEmployeeInstruction extends Instruction {
12
12
  title: string;
13
13
  type: string;
14
14
  group: string;
15
+ async: boolean;
15
16
  icon: React.JSX.Element;
16
17
  fieldset: {
17
18
  configuration: {
@@ -23,10 +24,6 @@ export declare class AIEmployeeInstruction extends Instruction {
23
24
  Configuration: React.FC<{}>;
24
25
  WorkflowVariableRawTextArea: typeof WorkflowVariableRawTextArea;
25
26
  };
26
- isAvailable({ engine, workflow }: {
27
- engine: any;
28
- workflow: any;
29
- }): boolean;
30
27
  useVariables(node: any): {
31
28
  label: any;
32
29
  value: any;
@@ -12,6 +12,7 @@ export declare class LLMInstruction extends Instruction {
12
12
  title: string;
13
13
  type: string;
14
14
  group: string;
15
+ async: boolean;
15
16
  icon: React.JSX.Element;
16
17
  fieldset: {
17
18
  llmService: {
@@ -49,10 +50,6 @@ export declare class LLMInstruction extends Instruction {
49
50
  Settings: React.MemoExoticComponent<import("@formily/reactive-react").ReactFC<unknown>>;
50
51
  Chat: React.FC<{}>;
51
52
  };
52
- isAvailable({ engine, workflow }: {
53
- engine: any;
54
- workflow: any;
55
- }): boolean;
56
53
  useVariables(node: any, options: any): {
57
54
  label: any;
58
55
  value: any;
@@ -13,22 +13,29 @@ declare const _default: {
13
13
  type: string;
14
14
  primaryKey: boolean;
15
15
  interface?: undefined;
16
+ defaultValue?: undefined;
16
17
  allowNull?: undefined;
18
+ } | {
19
+ name: string;
20
+ type: string;
21
+ interface: string;
22
+ primaryKey?: undefined;
17
23
  defaultValue?: undefined;
24
+ allowNull?: undefined;
18
25
  } | {
19
26
  name: string;
20
27
  type: string;
21
28
  interface: string;
29
+ defaultValue: string;
22
30
  primaryKey?: undefined;
23
31
  allowNull?: undefined;
24
- defaultValue?: undefined;
25
32
  } | {
26
33
  name: string;
27
34
  type: string;
28
35
  primaryKey?: undefined;
29
36
  interface?: undefined;
30
- allowNull?: undefined;
31
37
  defaultValue?: undefined;
38
+ allowNull?: undefined;
32
39
  } | {
33
40
  name: string;
34
41
  type: string;
@@ -50,7 +50,8 @@ var ai_employees_default = {
50
50
  {
51
51
  name: "avatar",
52
52
  type: "string",
53
- interface: "image"
53
+ interface: "image",
54
+ defaultValue: "nocobase-015-male"
54
55
  },
55
56
  {
56
57
  name: "bio",
@@ -8,22 +8,22 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/plugin-acl": "2.1.0-beta.36",
12
- "@nocobase/plugin-workflow": "2.1.0-beta.36",
13
- "@nocobase/client": "2.1.0-beta.36",
14
- "@nocobase/utils": "2.1.0-beta.36",
15
- "@nocobase/client-v2": "2.1.0-beta.36",
16
- "@nocobase/database": "2.1.0-beta.36",
17
- "@nocobase/server": "2.1.0-beta.36",
18
- "@nocobase/plugin-file-manager": "2.1.0-beta.36",
19
- "@nocobase/actions": "2.1.0-beta.36",
20
- "@nocobase/ai": "2.1.0-beta.36",
11
+ "@nocobase/plugin-acl": "2.1.0-beta.37",
12
+ "@nocobase/plugin-workflow": "2.1.0-beta.37",
13
+ "@nocobase/client": "2.1.0-beta.37",
14
+ "@nocobase/utils": "2.1.0-beta.37",
15
+ "@nocobase/client-v2": "2.1.0-beta.37",
16
+ "@nocobase/database": "2.1.0-beta.37",
17
+ "@nocobase/server": "2.1.0-beta.37",
18
+ "@nocobase/plugin-file-manager": "2.1.0-beta.37",
19
+ "@nocobase/actions": "2.1.0-beta.37",
20
+ "@nocobase/ai": "2.1.0-beta.37",
21
21
  "langchain": "1.2.24",
22
22
  "react": "18.2.0",
23
23
  "antd": "5.24.2",
24
24
  "@formily/core": "2.3.7",
25
25
  "@formily/react": "2.3.7",
26
- "@nocobase/flow-engine": "2.1.0-beta.36",
26
+ "@nocobase/flow-engine": "2.1.0-beta.37",
27
27
  "@ant-design/icons": "5.6.1",
28
28
  "@formily/antd-v5": "1.2.3",
29
29
  "react-router-dom": "6.30.1",
@@ -33,20 +33,20 @@ module.exports = {
33
33
  "lodash": "4.18.1",
34
34
  "@langchain/core": "1.1.24",
35
35
  "@langchain/langgraph": "1.1.4",
36
- "@nocobase/cache": "2.1.0-beta.36",
36
+ "@nocobase/cache": "2.1.0-beta.37",
37
37
  "@langchain/anthropic": "1.3.17",
38
38
  "axios": "1.7.7",
39
39
  "@langchain/openai": "1.2.7",
40
40
  "@langchain/deepseek": "1.0.11",
41
41
  "@langchain/google-genai": "2.1.18",
42
42
  "@langchain/ollama": "1.2.2",
43
- "@nocobase/acl": "2.1.0-beta.36",
44
- "@nocobase/resourcer": "2.1.0-beta.36",
43
+ "@nocobase/acl": "2.1.0-beta.37",
44
+ "@nocobase/resourcer": "2.1.0-beta.37",
45
45
  "@emotion/css": "11.13.0",
46
46
  "dayjs": "1.11.13",
47
47
  "react-i18next": "11.18.6",
48
- "@nocobase/plugin-data-source-manager": "2.1.0-beta.36",
48
+ "@nocobase/plugin-data-source-manager": "2.1.0-beta.37",
49
49
  "@langchain/langgraph-checkpoint": "1.0.0",
50
- "@nocobase/data-source-manager": "2.1.0-beta.36",
50
+ "@nocobase/data-source-manager": "2.1.0-beta.37",
51
51
  "react-dom": "18.2.0"
52
52
  };
@@ -1 +1 @@
1
- {"name":"@langchain/xai","version":"1.3.3","description":"xAI integration for LangChain.js","author":"LangChain","license":"MIT","type":"module","engines":{"node":">=20"},"repository":{"type":"git","url":"git@github.com:langchain-ai/langchainjs.git"},"homepage":"https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-xai/","dependencies":{"@langchain/openai":"1.2.7"},"peerDependencies":{"@langchain/core":"^1.0.0"},"devDependencies":{"@tsconfig/recommended":"^1.0.3","@types/uuid":"^9","@vitest/coverage-v8":"^3.2.4","dotenv":"^16.3.1","dpdm":"^3.14.0","eslint":"^9.34.0","prettier":"^3.5.0","typescript":"~5.8.3","vitest":"^3.2.4","zod":"^3.25.76","@langchain/core":"^1.1.21","@langchain/eslint":"0.1.1","@langchain/openai":"^1.2.7","@langchain/tsconfig":"0.0.1","@langchain/standard-tests":"0.0.23"},"publishConfig":{"access":"public"},"main":"./dist/index.cjs","types":"./dist/index.d.cts","exports":{".":{"input":"./src/index.ts","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"},"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"./package.json":"./package.json"},"files":["dist/","CHANGELOG.md","README.md","LICENSE"],"module":"./dist/index.js","scripts":{"build":"turbo build:compile --filter @langchain/xai --output-logs new-only","build:compile":"tsdown","lint:eslint":"eslint --cache src/","lint:dpdm":"dpdm --skip-dynamic-imports circular --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts","lint":"pnpm lint:eslint && pnpm lint:dpdm","lint:fix":"pnpm lint:eslint --fix && pnpm lint:dpdm","clean":"rm -rf .turbo dist/","test":"vitest run","test:watch":"vitest --watch","test:int":"vitest --mode int","test:standard:unit":"vitest --mode standard-unit","test:standard:int":"vitest --mode standard-int","test:standard":"pnpm test:standard:unit && pnpm test:standard:int","format":"prettier --write \"src\"","format:check":"prettier --check \"src\"","typegen":"pnpm run typegen:profiles","typegen:profiles":"pnpm --filter @langchain/model-profiles make --config profiles.toml"},"_lastModified":"2026-05-21T16:55:59.887Z"}
1
+ {"name":"@langchain/xai","version":"1.3.3","description":"xAI integration for LangChain.js","author":"LangChain","license":"MIT","type":"module","engines":{"node":">=20"},"repository":{"type":"git","url":"git@github.com:langchain-ai/langchainjs.git"},"homepage":"https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-xai/","dependencies":{"@langchain/openai":"1.2.7"},"peerDependencies":{"@langchain/core":"^1.0.0"},"devDependencies":{"@tsconfig/recommended":"^1.0.3","@types/uuid":"^9","@vitest/coverage-v8":"^3.2.4","dotenv":"^16.3.1","dpdm":"^3.14.0","eslint":"^9.34.0","prettier":"^3.5.0","typescript":"~5.8.3","vitest":"^3.2.4","zod":"^3.25.76","@langchain/core":"^1.1.21","@langchain/eslint":"0.1.1","@langchain/openai":"^1.2.7","@langchain/tsconfig":"0.0.1","@langchain/standard-tests":"0.0.23"},"publishConfig":{"access":"public"},"main":"./dist/index.cjs","types":"./dist/index.d.cts","exports":{".":{"input":"./src/index.ts","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"},"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"./package.json":"./package.json"},"files":["dist/","CHANGELOG.md","README.md","LICENSE"],"module":"./dist/index.js","scripts":{"build":"turbo build:compile --filter @langchain/xai --output-logs new-only","build:compile":"tsdown","lint:eslint":"eslint --cache src/","lint:dpdm":"dpdm --skip-dynamic-imports circular --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts","lint":"pnpm lint:eslint && pnpm lint:dpdm","lint:fix":"pnpm lint:eslint --fix && pnpm lint:dpdm","clean":"rm -rf .turbo dist/","test":"vitest run","test:watch":"vitest --watch","test:int":"vitest --mode int","test:standard:unit":"vitest --mode standard-unit","test:standard:int":"vitest --mode standard-int","test:standard":"pnpm test:standard:unit && pnpm test:standard:int","format":"prettier --write \"src\"","format:check":"prettier --check \"src\"","typegen":"pnpm run typegen:profiles","typegen:profiles":"pnpm --filter @langchain/model-profiles make --config profiles.toml"},"_lastModified":"2026-05-26T00:46:06.530Z"}
@@ -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-05-21T16:56:00.040Z"}
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-05-26T00:46:06.687Z"}
@@ -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-05-21T16:56:06.162Z"}
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-05-26T00:46:12.918Z"}
@@ -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-05-21T16:56:05.947Z"}
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-05-26T00:46:12.474Z"}
@@ -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-05-21T16:55:55.279Z"}
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-05-26T00:46:01.470Z"}
@@ -1 +1 @@
1
- {"name":"openai","version":"6.22.0","description":"The official TypeScript library for the OpenAI API","author":"OpenAI <support@openai.com>","types":"./index.d.ts","main":"./index.js","type":"commonjs","repository":"github:openai/openai-node","license":"Apache-2.0","packageManager":"yarn@1.22.22","files":["**/*"],"private":false,"publishConfig":{"access":"public"},"scripts":{"test":"./scripts/test","build":"./scripts/build","format":"./scripts/format","tsn":"ts-node -r tsconfig-paths/register","lint":"./scripts/lint","fix":"./scripts/format"},"dependencies":{},"bin":{"openai":"bin/cli"},"exports":{".":{"require":{"types":"./index.d.ts","default":"./index.js"},"types":"./index.d.mts","default":"./index.mjs"},"./_vendor/*.mjs":{"default":"./_vendor/*.mjs"},"./_vendor/*.js":{"default":"./_vendor/*.js"},"./_vendor/*":{"import":"./_vendor/*.mjs","require":"./_vendor/*.js"},"./api-promise":{"import":"./api-promise.mjs","require":"./api-promise.js"},"./api-promise.js":{"default":"./api-promise.js"},"./api-promise.mjs":{"default":"./api-promise.mjs"},"./azure":{"import":"./azure.mjs","require":"./azure.js"},"./azure.js":{"default":"./azure.js"},"./azure.mjs":{"default":"./azure.mjs"},"./beta/*.mjs":{"default":"./beta/*.mjs"},"./beta/*.js":{"default":"./beta/*.js"},"./beta/*":{"import":"./beta/*.mjs","require":"./beta/*.js"},"./client":{"import":"./client.mjs","require":"./client.js"},"./client.js":{"default":"./client.js"},"./client.mjs":{"default":"./client.mjs"},"./core/*.mjs":{"default":"./core/*.mjs"},"./core/*.js":{"default":"./core/*.js"},"./core/*":{"import":"./core/*.mjs","require":"./core/*.js"},"./error":{"import":"./error.mjs","require":"./error.js"},"./error.js":{"default":"./error.js"},"./error.mjs":{"default":"./error.mjs"},"./helpers/*.mjs":{"default":"./helpers/*.mjs"},"./helpers/*.js":{"default":"./helpers/*.js"},"./helpers/*":{"import":"./helpers/*.mjs","require":"./helpers/*.js"},"./index":{"import":"./index.mjs","require":"./index.js"},"./index.js":{"default":"./index.js"},"./index.mjs":{"default":"./index.mjs"},"./lib/*.mjs":{"default":"./lib/*.mjs"},"./lib/*.js":{"default":"./lib/*.js"},"./lib/*":{"import":"./lib/*.mjs","require":"./lib/*.js"},"./pagination":{"import":"./pagination.mjs","require":"./pagination.js"},"./pagination.js":{"default":"./pagination.js"},"./pagination.mjs":{"default":"./pagination.mjs"},"./realtime/*.mjs":{"default":"./realtime/*.mjs"},"./realtime/*.js":{"default":"./realtime/*.js"},"./realtime/*":{"import":"./realtime/*.mjs","require":"./realtime/*.js"},"./resource":{"import":"./resource.mjs","require":"./resource.js"},"./resource.js":{"default":"./resource.js"},"./resource.mjs":{"default":"./resource.mjs"},"./resources/*.mjs":{"default":"./resources/*.mjs"},"./resources/*.js":{"default":"./resources/*.js"},"./resources/*":{"import":"./resources/*.mjs","require":"./resources/*.js"},"./resources":{"import":"./resources.mjs","require":"./resources.js"},"./resources.js":{"default":"./resources.js"},"./resources.mjs":{"default":"./resources.mjs"},"./streaming":{"import":"./streaming.mjs","require":"./streaming.js"},"./streaming.js":{"default":"./streaming.js"},"./streaming.mjs":{"default":"./streaming.mjs"},"./uploads":{"import":"./uploads.mjs","require":"./uploads.js"},"./uploads.js":{"default":"./uploads.js"},"./uploads.mjs":{"default":"./uploads.mjs"},"./version":{"import":"./version.mjs","require":"./version.js"},"./version.js":{"default":"./version.js"},"./version.mjs":{"default":"./version.mjs"}},"peerDependencies":{"ws":"^8.18.0","zod":"^3.25 || ^4.0"},"peerDependenciesMeta":{"ws":{"optional":true},"zod":{"optional":true}},"_lastModified":"2026-05-21T16:55:57.632Z"}
1
+ {"name":"openai","version":"6.22.0","description":"The official TypeScript library for the OpenAI API","author":"OpenAI <support@openai.com>","types":"./index.d.ts","main":"./index.js","type":"commonjs","repository":"github:openai/openai-node","license":"Apache-2.0","packageManager":"yarn@1.22.22","files":["**/*"],"private":false,"publishConfig":{"access":"public"},"scripts":{"test":"./scripts/test","build":"./scripts/build","format":"./scripts/format","tsn":"ts-node -r tsconfig-paths/register","lint":"./scripts/lint","fix":"./scripts/format"},"dependencies":{},"bin":{"openai":"bin/cli"},"exports":{".":{"require":{"types":"./index.d.ts","default":"./index.js"},"types":"./index.d.mts","default":"./index.mjs"},"./_vendor/*.mjs":{"default":"./_vendor/*.mjs"},"./_vendor/*.js":{"default":"./_vendor/*.js"},"./_vendor/*":{"import":"./_vendor/*.mjs","require":"./_vendor/*.js"},"./api-promise":{"import":"./api-promise.mjs","require":"./api-promise.js"},"./api-promise.js":{"default":"./api-promise.js"},"./api-promise.mjs":{"default":"./api-promise.mjs"},"./azure":{"import":"./azure.mjs","require":"./azure.js"},"./azure.js":{"default":"./azure.js"},"./azure.mjs":{"default":"./azure.mjs"},"./beta/*.mjs":{"default":"./beta/*.mjs"},"./beta/*.js":{"default":"./beta/*.js"},"./beta/*":{"import":"./beta/*.mjs","require":"./beta/*.js"},"./client":{"import":"./client.mjs","require":"./client.js"},"./client.js":{"default":"./client.js"},"./client.mjs":{"default":"./client.mjs"},"./core/*.mjs":{"default":"./core/*.mjs"},"./core/*.js":{"default":"./core/*.js"},"./core/*":{"import":"./core/*.mjs","require":"./core/*.js"},"./error":{"import":"./error.mjs","require":"./error.js"},"./error.js":{"default":"./error.js"},"./error.mjs":{"default":"./error.mjs"},"./helpers/*.mjs":{"default":"./helpers/*.mjs"},"./helpers/*.js":{"default":"./helpers/*.js"},"./helpers/*":{"import":"./helpers/*.mjs","require":"./helpers/*.js"},"./index":{"import":"./index.mjs","require":"./index.js"},"./index.js":{"default":"./index.js"},"./index.mjs":{"default":"./index.mjs"},"./lib/*.mjs":{"default":"./lib/*.mjs"},"./lib/*.js":{"default":"./lib/*.js"},"./lib/*":{"import":"./lib/*.mjs","require":"./lib/*.js"},"./pagination":{"import":"./pagination.mjs","require":"./pagination.js"},"./pagination.js":{"default":"./pagination.js"},"./pagination.mjs":{"default":"./pagination.mjs"},"./realtime/*.mjs":{"default":"./realtime/*.mjs"},"./realtime/*.js":{"default":"./realtime/*.js"},"./realtime/*":{"import":"./realtime/*.mjs","require":"./realtime/*.js"},"./resource":{"import":"./resource.mjs","require":"./resource.js"},"./resource.js":{"default":"./resource.js"},"./resource.mjs":{"default":"./resource.mjs"},"./resources/*.mjs":{"default":"./resources/*.mjs"},"./resources/*.js":{"default":"./resources/*.js"},"./resources/*":{"import":"./resources/*.mjs","require":"./resources/*.js"},"./resources":{"import":"./resources.mjs","require":"./resources.js"},"./resources.js":{"default":"./resources.js"},"./resources.mjs":{"default":"./resources.mjs"},"./streaming":{"import":"./streaming.mjs","require":"./streaming.js"},"./streaming.js":{"default":"./streaming.js"},"./streaming.mjs":{"default":"./streaming.mjs"},"./uploads":{"import":"./uploads.mjs","require":"./uploads.js"},"./uploads.js":{"default":"./uploads.js"},"./uploads.mjs":{"default":"./uploads.mjs"},"./version":{"import":"./version.mjs","require":"./version.js"},"./version.js":{"default":"./version.js"},"./version.mjs":{"default":"./version.mjs"}},"peerDependencies":{"ws":"^8.18.0","zod":"^3.25 || ^4.0"},"peerDependenciesMeta":{"ws":{"optional":true},"zod":{"optional":true}},"_lastModified":"2026-05-26T00:46:04.146Z"}
@@ -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-05-21T16:55:56.186Z"}
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-05-26T00:46:02.498Z"}
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "description": "Create AI employees with diverse skills to collaborate with humans, build systems, and handle business operations.",
7
7
  "description.ru-RU": "Поддержка интеграции с AI-сервисами: предоставляются AI-узлы для рабочих процессов, расширяя возможности бизнес-обработки.",
8
8
  "description.zh-CN": "创建各种技能的 AI 员工,与人类协同,搭建系统,处理业务。",
9
- "version": "2.1.0-beta.36",
9
+ "version": "2.1.0-beta.37",
10
10
  "main": "dist/server/index.js",
11
11
  "homepage": "https://docs.nocobase.com/handbook/action-ai",
12
12
  "homepage.ru-RU": "https://docs-ru.nocobase.com/handbook/action-ai",
@@ -64,5 +64,5 @@
64
64
  "keywords": [
65
65
  "AI"
66
66
  ],
67
- "gitHead": "397d45c744f6eb48b3a0cd785c87cbf1257c3513"
67
+ "gitHead": "7132e5b83ecc0e42b54715eaf1429c72bcef34ae"
68
68
  }
@@ -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([["462"],{8349:function(e,t,n){n.r(t),n.d(t,{Employees:function(){return eB}});var r=n(9155),o=n.n(r),l=n(2059),a=n(3342),i=n(3079),c=n(5230),u=n(4450),s=n(3059),m=n.n(s),p=n(5477);function f(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 d(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 l=[],a=!0,i=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(l.push(n.value),!t||l.length!==t);a=!0);}catch(e){i=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(i)throw r}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return f(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 f(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 y(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function v(){var e=y(["\n border-color: "," !important;\n "]);return v=function(){return e},e}function b(){var e=y(["\n cursor: pointer;\n &:hover {\n border-color: "," !important;\n }\n "]);return b=function(){return e},e}function g(){var e=y(["\n border: 2px solid "," !important;\n "]);return g=function(){return e},e}function h(){var e=y(["\n cursor: pointer;\n &:hover {\n border: 2px solid "," !important;\n }\n "]);return h=function(){return e},e}var S=function(e){var t=e.srcs,n=e.size,r=void 0===n?"large":n,i=e.selectable,c=e.highlightItem,u=e.onClick,s=(0,a.useToken)().token,f=(0,a.useUploadStyles)(),y=(f.wrapSSR,f.hashId,f.componentCls);return null==t||t.map(function(e,t){var n=d(e,2),r=n[0],l=n[1];return o().createElement("div",{key:t,className:"".concat(y,"-list-picture-card-container ").concat(y,"-list-item-container")},o().createElement("div",{onClick:function(){return u&&u(l)},className:m()("".concat(y,"-list-item"),"".concat(y,"-list-item-done"),"".concat(y,"-list-item-list-type-picture-card"),c===l?(0,p.css)(v(),s.colorPrimary):"",i?(0,p.css)(b(),s.colorPrimary):"")},o().createElement("div",{className:"".concat(y,"-list-item-info")},o().createElement("span",{key:"thumbnail",className:"".concat(y,"-list-item-thumbnail")},o().createElement("img",{src:r,className:"".concat(y,"-list-item-image")})))))}),o().createElement(l.List,{grid:{gutter:16,column:10},itemLayout:"horizontal",dataSource:t,renderItem:function(e){var t=d(e,2),n=t[0],a=t[1];return o().createElement(l.List.Item,null,o().createElement(l.Avatar,{size:"small"===r?45:80,className:m()(c===a?(0,p.css)(g(),s.colorPrimary):"",i?(0,p.css)(h(),s.colorPrimary):""),src:n,onClick:function(){return u&&u(a)}}))}})},E=function(e){var t=e.disabled,n=(0,c.useField)(),l=Object.keys(u.B)[0],a=d(o().useState(l),2),i=a[0],s=a[1];(0,r.useEffect)(function(){n.value||n.setInitialValue(l)},[n]),(0,r.useEffect)(function(){n.value&&s(n.value)},[n.value]);var m=(0,r.useMemo)(function(){return Object.keys(u.B).map(function(e){return{seed:e,uri:(0,u.H)(e)}})},[]);return o().createElement(o().Fragment,null,o().createElement("div",{style:{marginBottom:"16px"}},o().createElement(S,{srcs:i?[[(0,u.H)(i),i]]:[]})),!0!==t?o().createElement(S,{srcs:m.map(function(e){return[e.uri,e.seed]}),size:"small",selectable:!0,highlightItem:i,onClick:function(e){return n.value=e}}):o().createElement(o().Fragment,null))},x=function(e){var t=e.edit,n=(0,i.kj)(),r=(0,a.useCollectionRecordData)(),l=null==r?void 0:r.builtIn;return o().createElement(a.SchemaComponent,{scope:{t:n},components:{AvatarSelect:E},schema:{type:"void",properties:{username:{type:"string",title:'{{t("Username")}}',"x-decorator":"FormItem","x-component":"Input",required:!0,"x-disabled":t},nickname:{type:"string",title:'{{t("Nickname")}}',"x-disabled":l,"x-decorator":"FormItem","x-component":"Input",required:!0},position:{type:"string",title:'{{t("Position")}}',"x-disabled":l,"x-decorator":"FormItem","x-component":"Input",description:n("Position description"),"x-component-props":{placeholder:n("Position placeholder")}},avatar:{type:"string",title:'{{t("Avatar")}}',"x-decorator":"FormItem","x-component":"AvatarSelect","x-component-props":{disabled:l}},bio:{type:"string",title:'{{t("Bio")}}',"x-disabled":l,"x-decorator":"FormItem","x-component":"Input.TextArea","x-component-props":{placeholder:n("Bio placeholder")}},greeting:{type:"string",title:'{{t("Greeting message")}}',"x-disabled":l,"x-decorator":"FormItem","x-component":"Input.TextArea","x-component-props":{placeholder:n("Greeting message placeholder")}}}}})};function A(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 k(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function w(){var e=k(["\n background-color: #fafafa;\n border: 1px solid #d9d9d9;\n border-radius: 6px;\n padding: 8px 12px;\n min-height: 330px;\n max-height: 500px;\n overflow-y: auto;\n "]);return w=function(){return e},e}function C(){var e=k(["\n margin: 0 !important;\n white-space: pre-wrap;\n word-break: break-word;\n "]);return C=function(){return e},e}function I(){var e=k(["\n width: 100%;\n "]);return I=function(){return e},e}function j(){var e=k(["\n width: 100%;\n "]);return j=function(){return e},e}var O=l.Typography.Paragraph,P=function(){var e=(0,i.kj)(),t=(0,a.useCurrentUserVariable)({maxDepth:3,noDisabled:!0}).currentUserSettings,n=(0,a.useCurrentRoleVariable)({noDisabled:!0}).currentRoleSettings,r=(0,a.useDatetimeVariable)({noDisabled:!0}).datetimeSettings;return[t,n,{key:"$nLang",value:"$nLang",label:e("Current language")},r]},T=function(){var e=(0,i.kj)();return o().createElement(l.Alert,{style:{marginBottom:16},message:e("Role setting description"),type:"info"})},z=function(){var e,t,n=(0,i.kj)(),u=(0,a.useCollectionRecordData)(),s=(0,c.useForm)(),m=P(),f=(null==u?void 0:u.about)?"custom":"system",d=function(e){if(Array.isArray(e))return e}(e=(0,r.useState)(f))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],l=!0,a=!1;try{for(r=r.call(e);!(l=(t=r.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,n=e}finally{try{l||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return A(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return A(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),y=d[0],v=d[1];(0,r.useEffect)(function(){s.setValuesIn("_aboutMode",y)},[s,y]);var b=(null==u?void 0:u.defaultPrompt)||"",g=function(e){v(e)};return o().createElement(l.Space,{direction:"vertical",style:{width:"100%"}},o().createElement(l.Radio.Group,{value:y,onChange:function(e){return g(e.target.value)}},o().createElement(l.Radio,{value:"system"},n("System default")),o().createElement(l.Radio,{value:"custom"},n("Custom"))),"system"===y?o().createElement("div",{className:(0,p.css)(w())},o().createElement(O,{copyable:!0,className:(0,p.css)(C())},b)):o().createElement(a.Variable.RawTextArea,{value:null!=(t=s.values.about)?t:"",onChange:function(e){s.setValuesIn("about",e.target.value)},scope:m,placeholder:n("Role setting placeholder"),autoSize:{minRows:15},className:(0,p.css)(I())}))},F=function(){var e,t=(0,i.kj)(),n=(0,c.useForm)(),r=P();return o().createElement(a.Variable.RawTextArea,{value:null!=(e=n.values.about)?e:"",onChange:function(e){n.setValuesIn("about",e.target.value)},scope:r,placeholder:t("Role setting placeholder"),autoSize:{minRows:15},className:(0,p.css)(j())})},M=function(){var e=(0,a.useCollectionRecordData)();return(null==e?void 0:e.builtIn)?o().createElement(z,null):o().createElement(F,null)},B=function(){var e=(0,i.kj)();return o().createElement(a.SchemaComponent,{scope:{t:e},components:{Description:T,AboutField:M},schema:{type:"void",properties:{desc:{type:"void","x-component":"Description"},aboutWrap:{type:"void","x-component":"div",properties:{about:{type:"string",title:'{{t("Role setting")}}',"x-decorator":"FormItem","x-component":"AboutField"}}}}}})},R=n(7694),D=n(475);function L(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}var K=function(e){return e.llmService&&e.model?"".concat(e.llmService,":").concat(e.model):void 0},V=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=e.split(":"))||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e){if(e){if("string"==typeof e)return L(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return L(e,void 0)}}(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.")}();return{llmService:n[0],model:n.slice(1).join(":")}},N=function(e){var t=e.serviceTitle,n=e.modelLabel;return"".concat(t," / ").concat(n)},U=(0,R.observer)(function(){var e=(0,i.kj)(),t=(0,c.useForm)(),n=(0,D.l)(),a=n.services,u=n.loading,s=(0,r.useMemo)(function(){return t.values.modelSettings||{}},[t.values.modelSettings]),m=!!s.enabled,p=(0,r.useMemo)(function(){var e=Array.isArray(s.models)?s.models:[];if(e.length)return e.map(K).filter(Boolean);var t=K(s);return t?[t]:[]},[s]),f=(0,r.useMemo)(function(){return a.map(function(e){return{label:e.llmServiceTitle,options:e.enabledModels.map(function(t){return{label:N({serviceTitle:e.llmServiceTitle,modelLabel:t.label}),value:"".concat(e.llmService,":").concat(t.value)}})}})},[a]),d=(0,r.useMemo)(function(){var e=new Map;return f.forEach(function(t){t.options.forEach(function(t){e.set(t.value,t.label)})}),e},[f]),y=(0,r.useCallback)(function(e){t.setValuesIn("modelSettings",function(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}({},s,e))},[t,s]);return(0,r.useEffect)(function(){if(m&&!p.length&&f.length){var e,t,n,r=null==(n=f[0])||null==(t=n.options)||null==(e=t[0])?void 0:e.value;r&&y({models:[V(r)]})}},[m,f,p.length,y]),o().createElement("div",null,o().createElement(l.Alert,{type:"info",showIcon:!0,message:e("Restrict this AI employee to the selected models."),style:{marginBottom:16}}),o().createElement(l.Form,{layout:"vertical"},o().createElement(l.Form.Item,{label:o().createElement(l.Typography.Text,{strong:!0},e("Enable dedicated model configuration"))},o().createElement(l.Switch,{checked:m,onChange:function(e){return y({enabled:e})}})),o().createElement(l.Form.Item,{label:o().createElement(l.Typography.Text,{strong:!0},e("Models"))},o().createElement(l.Select,{allowClear:!0,disabled:!m,mode:"multiple",showSearch:!0,value:p,placeholder:e("Select models"),options:f,onChange:function(e){(null==e?void 0:e.length)?y({llmService:void 0,model:void 0,models:e.map(V)}):y({llmService:void 0,model:void 0,models:[]})},tagRender:function(e){var t=e.closable,n=e.onClose,r=e.value;return o().createElement(l.Tag,{closable:t,onClose:n,style:{marginInlineEnd:4}},d.get(String(r))||e.label)},loading:u,notFoundContent:u?o().createElement(l.Spin,{size:"small"}):null,optionFilterProp:"label"}))))}),W={name:"aiEmployees",fields:[{name:"username",type:"string",primaryKey:!0},{name:"nickname",type:"string",interface:"input"},{name:"position",type:"string",interface:"input"},{name:"avatar",type:"string",interface:"image"},{name:"bio",type:"text",interface:"textarea"},{name:"about",type:"text",interface:"textarea"},{name:"defaultPrompt",type:"text",interface:"textarea"},{name:"greeting",type:"text",interface:"textarea"},{name:"chatSettings",type:"jsonb"},{name:"skillSettings",type:"jsonb"},{name:"modelSettings",type:"jsonb"},{name:"dataSourceSettings",type:"jsonb"},{name:"enableKnowledgeBase",type:"boolean",allowNull:!1,defaultValue:!1},{name:"knowledgeBasePrompt",type:"text"},{name:"knowledgeBase",type:"jsonb"},{name:"enabled",type:"boolean",interface:"switch",allowNull:!1,defaultValue:!0},{name:"builtIn",type:"boolean",allowNull:!1,defaultValue:!1},{name:"category",type:"string",allowNull:!1,defaultValue:"business"},{name:"deprecated",type:"boolean",allowNull:!1,defaultValue:!1}]},$=n(7330);function G(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}var q=function(e){var t=e.skills,n=(0,i.kj)(),r=(0,a.useToken)().token,u=t.filter(function(e){return"GENERAL"===e.scope});return o().createElement(l.Collapse,{ghost:!0,size:"small",defaultActiveKey:[],items:[{key:"general-skills",label:o().createElement("div",null,o().createElement("div",{style:{fontWeight:r.fontWeightStrong,fontSize:r.fontSizeSM}},n("General skills")),o().createElement("div",{style:{color:r.colorTextSecondary,fontSize:r.fontSizeSM}},n("Shared by all AI employees."))),children:o().createElement(l.List,{itemLayout:"vertical",size:"small",dataSource:u,renderItem:function(e){var t,a,i;return o().createElement(l.List.Item,{key:e.name},o().createElement("div",{style:{fontSize:r.fontSizeSM}},c.Schema.compile(null!=(t=null==e?void 0:e.title)?t:e.name,{t:n})),o().createElement("div",{style:{color:r.colorTextSecondary,fontSize:r.fontSizeSM}},c.Schema.compile(null!=(a=null!=(i=null==e?void 0:e.about)?i:e.description)?a:"",{t:n})))}})}]})},_=function(e){var t=e.selectedSkills,n=e.skills,r=(0,i.kj)(),u=(0,a.useToken)().token,s=new Map(n.map(function(e){return[e.name,e]})),m=t.map(function(e){return s.get(e)});return o().createElement(l.Collapse,{ghost:!0,size:"small",items:[{key:"specific-skills",label:o().createElement("div",null,o().createElement("div",{style:{fontWeight:u.fontWeightStrong,fontSize:u.fontSizeSM}},r("Employee-specific skills")),o().createElement("div",{style:{color:u.colorTextSecondary,fontSize:u.fontSizeSM}},r("Only available to this AI employee."))),children:o().createElement(l.List,{itemLayout:"vertical",size:"small",dataSource:m,renderItem:function(e){var t,n,a;return o().createElement(l.List.Item,{key:e.name},o().createElement("div",{style:{fontSize:u.fontSizeSM}},c.Schema.compile(null!=(t=null==e?void 0:e.title)?t:e.name,{t:r})),o().createElement("div",{style:{color:u.colorTextSecondary,fontSize:u.fontSizeSM}},c.Schema.compile(null!=(n=null!=(a=null==e?void 0:e.about)?a:e.description)?n:"",{t:r})))}})}],defaultActiveKey:["specific-skills"]})},H=(0,R.observer)(function(){var e,t=(0,c.useField)(),n=(0,$.M)(),i=n.aiSkillsLoading,u=n.aiSkills,s=(0,a.useCollectionRecordData)(),m=null==s?void 0:s.builtIn,p=null!=(e=t.value)?e:[];(0,r.useEffect)(function(){n.getAISkills()},[n]);var f=function(e){if(Array.isArray(e))return G(e)}(p)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(p)||function(e){if(e){if("string"==typeof e)return G(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return G(e,void 0)}}(p)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),d=new Map(u.map(function(e){return[e.name,e]})),y=f.filter(function(e){var t=d.get(e);return t&&"SPECIFIED"===t.scope});return o().createElement(o().Fragment,null,!i&&o().createElement(l.Space,{direction:"vertical",size:"large",style:{width:"100%"}},o().createElement(q,{skills:u}),m&&y.length>0&&o().createElement(_,{selectedSkills:y,skills:u})))}),X=function(){return o().createElement(a.SchemaComponent,{components:{Skills:H},schema:{type:"void",properties:{skillSettings:{type:"object",properties:{skills:{type:"array","x-component":"Skills","x-decorator":"FormItem"}}}}}})},Y=n(166),J=n(9452);function Q(e,t,n,r,o,l,a){try{var i=e[l](a),c=i.value}catch(e){n(e);return}i.done?t(c):Promise.resolve(c).then(r,o)}function Z(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var l=e.apply(t,n);function a(e){Q(l,r,o,a,i,"next",e)}function i(e){Q(l,r,o,a,i,"throw",e)}a(void 0)})}}function ee(e,t){var n,r,o,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),i=Object.defineProperty;return i(a,"next",{value:c(0)}),i(a,"throw",{value:c(1)}),i(a,"return",{value:c(2)}),"function"==typeof Symbol&&i(a,Symbol.iterator,{value:function(){return this}}),a;function c(i){return function(c){var u=[i,c];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(l=0)),l;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return l.label++,{value:u[1],done:!1};case 5:l.label++,r=u[1],u=[0];continue;case 7:u=l.ops.pop(),l.trys.pop();continue;default:if(!(o=(o=l.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){l=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){l.label=u[1];break}if(6===u[0]&&l.label<o[1]){l.label=o[1],o=u;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(u);break}o[2]&&l.ops.pop(),l.trys.pop();continue}u=t.call(e,l)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}var et=function(){var e=(0,i.kj)();return{form:(0,r.useMemo)(function(){return(0,J.createForm)({initialValues:{username:"".concat((0,Y.uid)()),enabled:!0,enableKnowledgeBase:!1,knowledgeBase:{knowledgeBaseKeys:[],topK:3,score:"0.6"},knowledgeBasePrompt:e("knowledge Base Prompt default")}})},[e])}},en=function(){var e=(0,a.useCollectionRecordData)();return{form:(0,r.useMemo)(function(){return(0,J.createForm)({initialValues:e})},[e])}},er=function(){var e=(0,a.useActionContext)().setVisible,t=(0,c.useForm)();return{type:"default",onClick:function(){e(!1),t.reset()}}},eo=function(){var e=(0,a.useActionContext)().setVisible,t=l.App.useApp().message,n=(0,c.useForm)(),r=(0,a.useAPIClient)(),o=(0,a.useDataBlockRequest)().refresh,u=(0,$.M)(),s=(0,i.kj)();return{type:"primary",onClick:function(){return Z(function(){var l;return ee(this,function(a){switch(a.label){case 0:return l=n.values,[4,n.submit()];case 1:return a.sent(),[4,r.resource("aiEmployees").create({values:l})];case 2:return a.sent(),o(),t.success(s("Saved successfully")),e(!1),n.reset(),[4,u.refreshAIEmployees()];case 3:return a.sent(),[2]}})})()}}},el=function(){var e=(0,a.useActionContext)().setVisible,t=l.App.useApp().message,n=(0,c.useForm)(),r=(0,a.useDataBlockResource)(),o=(0,a.useDataBlockRequest)().refresh,u=(0,$.M)(),s=(0,a.useCollection)().getFilterTargetKey(),m=(0,i.kj)();return{type:"primary",onClick:function(){return Z(function(){var l;return ee(this,function(a){switch(a.label){case 0:return"system"===(l=function(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}({},n.values))._aboutMode&&(l.about=null),delete l._aboutMode,delete l.enabled,[4,n.submit()];case 1:return a.sent(),[4,r.update({values:l,filterByTk:l[s]})];case 2:return a.sent(),o(),t.success(m("Saved successfully")),e(!1),n.reset(),[4,u.refreshAIEmployees()];case 3:return a.sent(),[2]}})})()}}},ea=function(){var e=(0,i.kj)(),t=(0,a.useCollectionRecordData)(),n=(0,a.useDestroyActionProps)().onClick,r=null==t?void 0:t.builtIn,o=l.App.useApp().message,c="root"===(0,a.useAPIClient)().auth.role;return{onClick:function(t,l){return Z(function(){return ee(this,function(a){switch(a.label){case 0:if(r&&!c)return o.warning(e("Cannot delete built-in ai employees")),[2];return[4,n(t,l)];case 1:return a.sent(),[2]}})})()}}};function ei(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}var ec=l.Card.Meta,eu=(0,r.createContext)(null),es=function(){var e=(0,r.useContext)(eu).aiEmployee;return{form:(0,r.useMemo)(function(){return(0,J.createForm)({initialValues:e})},[e])}},em=function(e){var t=e.aiEmployee,n=(0,a.useToken)().token,r=(0,a.useActionContext)().setVisible;return o().createElement(l.Card,{variant:"borderless",hoverable:!0,onClick:function(){return r(!0)}},o().createElement(ec,{avatar:t.avatar?o().createElement(l.Avatar,{size:40,src:(0,u.H)(t.avatar)}):null,title:t.nickname,description:o().createElement(o().Fragment,null,t.position&&o().createElement(l.Tag,{style:{marginBottom:n.marginXS}},t.position),o().createElement(l.Typography.Paragraph,{style:{height:n.fontSize*n.lineHeight*3},ellipsis:{rows:3},type:"secondary"},t.bio))}))},ep=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=o().useState(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],l=!0,a=!1;try{for(r=r.call(e);!(l=(t=r.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,n=e}finally{try{l||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return ei(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ei(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],r=t[1],i=(0,a.useAPIClient)(),c=(0,a.useRequest)(function(){return i.resource("aiEmployees").getTemplates().then(function(e){var t;return null==e||null==(t=e.data)?void 0:t.data})}),u=c.data;return c.loading?o().createElement(l.Spin,null):u&&u.length?o().createElement(l.Row,{gutter:[16,16]},u.map(function(e){return o().createElement(a.ActionContextProvider,{key:e.username,value:{visible:n,setVisible:r}},o().createElement(l.Col,{span:12},o().createElement(em,{aiEmployee:e})),o().createElement(eu.Provider,{value:{aiEmployee:e}},o().createElement(a.SchemaComponent,{scope:{useCancelActionProps:er,useCreateActionProps:eo,useTemplateFormProps:es},schema:{type:"void",name:(0,Y.uid)(),"x-component":"Action.Drawer",title:'{{t("New AI employee")}}',"x-decorator":"FormV2","x-use-decorator-props":"useTemplateFormProps",properties:{form:{type:"void","x-component":"AIEmployeeForm"},footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{close:{title:"Cancel","x-component":"Action","x-component-props":{type:"default"},"x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary"},"x-use-component-props":"useCreateActionProps"}}}}}})))})):o().createElement(l.Empty,{image:l.Empty.PRESENTED_IMAGE_SIMPLE})},ef=n(418),ed=function(){return(0,i.kj)(),o().createElement(a.SchemaComponent,{components:{Switch:ef.Switch},schema:{type:"void",properties:{enableKnowledgeBase:{type:"boolean",title:'{{t("Enable Knowledge Base")}}',"x-decorator":"FormItem","x-component":"Switch"},knowledgeBasePrompt:{type:"string",title:'{{t("Knowledge Base Prompt")}}',required:!0,"x-decorator":"FormItem","x-component":"Input.TextArea","x-component-props":{autoSize:{minRows:5}},"x-reactions":[{dependencies:["enableKnowledgeBase"],fulfill:{state:{disabled:"{{$deps[0] === false}}"}}}]},knowledgeBase:{type:"object",properties:{knowledgeBaseKeys:{type:"array",title:'{{t("Knowledge Base")}}',required:!0,"x-decorator":"FormItem","x-component":"RemoteSelect","x-component-props":{mode:"multiple",manual:!1,fieldNames:{label:"name",value:"key"},service:{resource:"aiKnowledgeBase",action:"list",params:{fields:["key","name"],filter:{enabled:!0}}}},"x-reactions":[{dependencies:["enableKnowledgeBase"],fulfill:{state:{disabled:"{{$deps[0] === false}}"}}}]},topK:{type:"number",title:'{{t("Top K")}}',required:!0,"x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{min:1,max:100},"x-reactions":[{dependencies:["enableKnowledgeBase"],fulfill:{state:{disabled:"{{$deps[0] === false}}"}}}]},score:{type:"number",title:'{{t("Score")}}',required:!0,"x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{min:0,max:1,step:.1},"x-reactions":[{dependencies:["enableKnowledgeBase"],fulfill:{state:{disabled:"{{$deps[0] === false}}"}}}]}}}}}})},ey=n(7375);function ev(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 eb(e,t,n,r,o,l,a){try{var i=e[l](a),c=i.value}catch(e){n(e);return}i.done?t(c):Promise.resolve(c).then(r,o)}var eg=function(){var e,t=(0,c.useField)(),n=(0,a.useCollectionRecordData)(),u=(0,a.useDataBlockResource)(),s=(0,a.useDataBlockRequest)().refresh,m=(0,$.M)(),p=l.App.useApp().message,f=(0,i.kj)(),d=function(e){if(Array.isArray(e))return e}(e=(0,r.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],l=!0,a=!1;try{for(r=r.call(e);!(l=(t=r.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,n=e}finally{try{l||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return ev(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ev(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),y=d[0],v=d[1];return o().createElement(l.Switch,{checked:t.value,onChange:function(e){var t;return(t=function(){return function(e,t){var n,r,o,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),i=Object.defineProperty;return i(a,"next",{value:c(0)}),i(a,"throw",{value:c(1)}),i(a,"return",{value:c(2)}),"function"==typeof Symbol&&i(a,Symbol.iterator,{value:function(){return this}}),a;function c(i){return function(c){var u=[i,c];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(l=0)),l;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return l.label++,{value:u[1],done:!1};case 5:l.label++,r=u[1],u=[0];continue;case 7:u=l.ops.pop(),l.trys.pop();continue;default:if(!(o=(o=l.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){l=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){l.label=u[1];break}if(6===u[0]&&l.label<o[1]){l.label=o[1],o=u;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(u);break}o[2]&&l.ops.pop(),l.trys.pop();continue}u=t.call(e,l)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}(this,function(t){switch(t.label){case 0:v(!0),t.label=1;case 1:return t.trys.push([1,4,5,6]),[4,u.update({filterByTk:n.username,values:{enabled:e}})];case 2:return t.sent(),p.success(f("Saved successfully")),s(),[4,m.refreshAIEmployees()];case 3:return t.sent(),[3,6];case 4:return t.sent(),p.error(f("Failed to update")),[3,6];case 5:return v(!1),[7];case 6:return[2]}})},function(){var e=this,n=arguments;return new Promise(function(r,o){var l=t.apply(e,n);function a(e){eb(l,r,o,a,i,"next",e)}function i(e){eb(l,r,o,a,i,"throw",e)}a(void 0)})})()},loading:y,size:"small"})};function eh(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 eS(e){return function(e){if(Array.isArray(e))return eh(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||eE(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eE(e,t){if(e){if("string"==typeof e)return eh(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 eh(e,t)}}var ex=function(e){var t,n=e.name,r=e.title,u=e.description,s=e.isRoot,m=(0,i.kj)(),p=(0,a.useToken)().token,f=null==(t=(0,c.useField)().value)?void 0:t.find(function(e){return e.name===n});return o().createElement("div",{style:{minWidth:"150px",maxWidth:"300px"}},o().createElement("div",{style:{display:"flex",justifyContent:"space-between"}},o().createElement("div",null,c.Schema.compile(r,{t:m})),!s&&o().createElement("div",null,o().createElement(l.Switch,{size:"small",value:f,disabled:f}))),o().createElement("div",{style:{color:p.colorTextSecondary,fontSize:p.fontSizeSM}},c.Schema.compile(u,{t:m})))},eA=(0,R.observer)(function(){var e,t,n=(0,i.kj)(),u=(0,a.useToken)().token,s=(0,c.useField)(),m=(0,$.M)(),p=m.aiToolsLoading,f=m.aiTools,d=(0,a.useCollectionRecordData)(),y=null==d?void 0:d.builtIn;(0,r.useEffect)(function(){m.getAITools()},[m]);var v=function(e){console.log(e);var t=eS(s.value||[]);t.some(function(t){return t.name===e})||t.push({name:e,autoCall:!1}),console.log(s.value),console.log(t),s.value=t,console.log(s.value)},b=eS(null!=(t=s.value)?t:[]),g=new Set(b.map(function(e){return e.name})),h=(null==f?void 0:f.filter(function(e){return"CUSTOM"===e.scope&&!g.has(e.definition.name)}).map(function(e){var t,n,r={key:e.definition.name},l={title:null!=(t=e.introduction.title)?t:"",description:null!=(n=e.introduction.about)?n:"",name:e.definition.name,isRoot:!0};return r.label=o().createElement(ex,l),r.onClick=function(){return v(e.definition.name)},r}))||[],S=new Map(f.map(function(e){return[e.definition.name,e]})),E=f.filter(function(e){return"GENERAL"===e.scope&&"loader"===e.from}),x=b.filter(function(e){var t=S.get(e.name);return t&&"GENERAL"!==t.scope&&"CUSTOM"!==t.scope}),A=b.filter(function(e){var t=S.get(e.name);return t&&"CUSTOM"===t.scope}),k=[{label:n("Ask"),value:"ASK"},{label:n("Allow"),value:"ALLOW"}],w=function(e,t){return"CUSTOM"===e.scope?(null==t?void 0:t.autoCall)?"ALLOW":"ASK":"ALLOW"===e.defaultPermission?"ALLOW":"ASK"},C=function(e){if(Array.isArray(e))return e}(e=(0,r.useState)(y&&0===A.length?[]:["custom-tools"]))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],l=!0,a=!1;try{for(r=r.call(e);!(l=(t=r.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,n=e}finally{try{l||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||eE(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),I=C[0],j=C[1],O=(0,r.useRef)(A.length);return(0,r.useEffect)(function(){var e=0===O.current;y&&0===A.length?j([]):e&&A.length>0&&j(["custom-tools"]),O.current=A.length},[A.length,y]),o().createElement(o().Fragment,null,!p&&o().createElement(l.Space,{direction:"vertical",size:"large",style:{width:"100%"}},o().createElement("div",null,o().createElement(l.Collapse,{ghost:!0,size:"small",defaultActiveKey:[],items:[{key:"general-tools",label:o().createElement("div",null,o().createElement("div",{style:{fontWeight:u.fontWeightStrong,fontSize:u.fontSizeSM}},n("General tools")),o().createElement("div",{style:{color:u.colorTextSecondary,fontSize:u.fontSizeSM}},n("Shared by all AI employees."))),children:o().createElement(l.List,{itemLayout:"vertical",size:"small",dataSource:E,renderItem:function(e){return o().createElement(l.List.Item,{key:e.definition.name,extra:o().createElement(l.Flex,{vertical:!0,justify:"end"},o().createElement("div",{style:{fontSize:u.fontSizeSM,color:u.colorTextSecondary}},n("Permission"),o().createElement(l.Segmented,{style:{marginLeft:"8px"},size:"small",options:k,value:w(e),disabled:!0})))},o().createElement("div",{style:{fontSize:u.fontSizeSM}},c.Schema.compile(e.introduction.title,{t:n})),o().createElement("div",{style:{color:u.colorTextSecondary,fontSize:u.fontSizeSM}},c.Schema.compile(e.introduction.about,{t:n})))}})}]})),y&&x.length>0&&o().createElement("div",null,o().createElement(l.Collapse,{ghost:!0,size:"small",items:[{key:"specific-tools",label:o().createElement("div",null,o().createElement("div",{style:{fontWeight:u.fontWeightStrong,fontSize:u.fontSizeSM}},n("Employee-specific tools")),o().createElement("div",{style:{color:u.colorTextSecondary,fontSize:u.fontSizeSM}},n("Only available to this AI employee."))),children:o().createElement(l.List,{itemLayout:"vertical",size:"small",dataSource:x,renderItem:function(e){var t=S.get(e.name);return t?o().createElement(l.List.Item,{key:t.definition.name,extra:o().createElement(l.Flex,{vertical:!0,justify:"end"},o().createElement("div",{style:{fontSize:u.fontSizeSM,color:u.colorTextSecondary}},n("Permission"),o().createElement(l.Segmented,{style:{marginLeft:"8px"},size:"small",options:k,value:w(t,e),disabled:!0})))},o().createElement("div",{style:{fontSize:u.fontSizeSM}},c.Schema.compile(t.introduction.title,{t:n})),o().createElement("div",{style:{color:u.colorTextSecondary,fontSize:u.fontSizeSM}},c.Schema.compile(t.introduction.about,{t:n}))):null}})}],defaultActiveKey:["specific-tools"]})),o().createElement("div",null,o().createElement(l.Collapse,{ghost:!0,size:"small",activeKey:I,onChange:function(e){j(Array.isArray(e)?e:[e].filter(Boolean))},items:[{key:"custom-tools",label:o().createElement("div",null,o().createElement("div",{style:{fontWeight:u.fontWeightStrong,fontSize:u.fontSizeSM}},n("Custom tools")),o().createElement("div",{style:{color:u.colorTextSecondary,fontSize:u.fontSizeSM}},n("Created by workflow. You can add/remove and set default permissions."))),extra:o().createElement("div",{onClick:function(e){e.stopPropagation()},onKeyDown:function(e){e.stopPropagation()}},o().createElement(l.Dropdown,{menu:{items:h},placement:"bottomRight",disabled:0===h.length},o().createElement(l.Button,{type:"primary",icon:o().createElement(ey.PlusOutlined,null)},n("Add tool")))),children:o().createElement(l.List,{itemLayout:"vertical",bordered:!0,dataSource:A,renderItem:function(e){var t=S.get(e.name);return t?o().createElement(l.List.Item,{key:t.definition.name,extra:o().createElement(l.Flex,{vertical:!0,justify:"end"},o().createElement(l.Space,null,o().createElement("div",{style:{fontSize:u.fontSizeSM}},n("Permission"),o().createElement(l.Segmented,{style:{marginLeft:"8px",marginRight:"8px"},size:"small",options:k,value:w(t,e),onChange:function(t){var n=(s.value||[]).map(function(n){var r,o;return n.name===e.name?(r=function(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}({},n),o=o={autoCall:"ALLOW"===t},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}),r):n});s.value=n}})),o().createElement(l.Button,{icon:o().createElement(ey.DeleteOutlined,null),variant:"link",color:"default",onClick:function(){var e=eS(s.value||[]),n=e.findIndex(function(e){return e.name===t.definition.name});-1!==n&&(e.splice(n,1),s.value=e)}})))},o().createElement("div",null,c.Schema.compile(t.introduction.title,{t:n})),o().createElement("div",{style:{color:u.colorTextSecondary,fontSize:u.fontSizeSM}},c.Schema.compile(t.introduction.about,{t:n}))):null}})}]}))))}),ek=function(){return o().createElement(a.SchemaComponent,{components:{Tools:eA},schema:{type:"void",properties:{skillSettings:{type:"object",properties:{tools:{type:"array","x-component":"Tools","x-decorator":"FormItem"}}}}}})};function ew(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 eC(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 eI(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 ej(e){return function(e){if(Array.isArray(e))return ew(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||eO(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eO(e,t){if(e){if("string"==typeof e)return ew(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 ew(e,t)}}var eP=function(e){var t,n,u,s=e.edit,m=(0,i.kj)(),p=(0,a.useAPIClient)(),f=(0,c.useForm)(),d=function(e){if(Array.isArray(e))return e}(t=(0,r.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],l=!0,a=!1;try{for(r=r.call(e);!(l=(t=r.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,n=e}finally{try{l||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||eO(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),y=d[0],v=d[1],b=null!=(n=null==(u=f.values)?void 0:u.chatSettings)?n:{},g=!1!==b.enableSkills,h=!1!==b.enableTools;return(0,r.useEffect)(function(){p.resource("aiSettings").isKnowledgeBaseEnabled().then(function(e){var t;v(null==e||null==(t=e.data)?void 0:t.data.enabled)}).catch(function(e){return console.error("api fail aiSettings.isKnowledgeBaseEnabled",e)})},[p]),o().createElement(l.Tabs,{items:[{key:"profile",label:m("Profile"),children:o().createElement(x,{edit:s}),forceRender:!0},{key:"roleSetting",label:m("Role setting"),children:o().createElement(B,null),forceRender:!0},{key:"modelSettings",label:m("Model settings"),children:o().createElement(U,null),forceRender:!0}].concat(ej(g?[{key:"skills",label:m("Skills"),children:o().createElement(X,null)}]:[]),ej(h?[{key:"tools",label:m("Tools"),children:o().createElement(ek,null)}]:[]),ej(y?[{key:"knowledgeBase",label:m("KnowledgeBase"),children:o().createElement(ed,null)}]:[]))})},eT=function(e){var t=(0,c.useField)();return t.value?o().createElement(l.Avatar,eI(eC({shape:"square",size:"large"},e),{src:(0,u.H)(t.value)})):null},ez=function(e){var t=(0,c.useField)();return t.value?t.value&&o().createElement(ey.CheckOutlined,{style:{color:"#52c41a"}}):null},eF=function(){var e,t,n,r=(0,i.kj)(),c=(0,a.useTableBlockContext)().service,u=(null==c||null==(n=c.params)||null==(t=n[0])||null==(e=t.filter)?void 0:e.category)||"business",s=[{label:r("Business"),value:"business"},{label:r("Developer"),value:"developer"}];return o().createElement(l.Radio.Group,{value:u,optionType:"button",options:s,onChange:function(e){var t,n,r;e.target.value!==u&&(null==c||c.run(eI(eC({},null==c||null==(t=c.params)?void 0:t[0]),{page:1,filter:eI(eC({},null==c||null==(r=c.params)||null==(n=r[0])?void 0:n.filter),{category:e.target.value})})))}})},eM=function(){var e=(0,i.kj)(),t=(0,c.useField)(),n=(0,a.useRecord)(),r=(null==n?void 0:n.missingKnowledgeBaseKeys)||[];return t.value?r.length?o().createElement(l.Space,{size:4},o().createElement("span",null,t.value),o().createElement(l.Tooltip,{title:e("Missing knowledge base configuration for keys: {{keys}}. Create knowledge bases with the same keys to enable this employee normally.",{keys:r.join(", ")})},o().createElement(ey.ExclamationCircleOutlined,{style:{color:"#faad14",cursor:"help"}}))):o().createElement("span",null,t.value):null},eB=function(){var e=(0,i.kj)();return o().createElement(a.ExtendCollectionsProvider,{collections:[W]},o().createElement(a.SchemaComponent,{components:{AIEmployeeForm:eP,Avatar:eT,Templates:ep,Enabled:ez,EnableSwitch:eg,CategoryFilter:eF,Username:eM},scope:{t:e,useCreateFormProps:et,useEditFormProps:en,useCancelActionProps:er,useCreateActionProps:eo,useEditActionProps:el,useDeleteActionProps:ea},schema:{type:"void",name:"ai-employees",properties:{block:{type:"void","x-component":"CardItem","x-component-props":{heightMode:"fullHeight"},"x-decorator":"TableBlockProvider","x-decorator-props":{collection:"aiEmployees",action:"list",params:{filter:{category:"business"}},rowKey:"username",dragSort:!0,dragSortBy:"sort"},properties:{actions:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:20}},properties:{categoryFilter:{type:"void","x-align":"left","x-component":"CategoryFilter"},refresh:{title:"{{t('Refresh')}}","x-component":"Action","x-use-component-props":"useRefreshActionProps","x-component-props":{icon:"ReloadOutlined"}},add:{type:"void",title:"{{t('New AI employee')}}","x-align":"right","x-component":"Action","x-component-props":{type:"primary",icon:"PlusOutlined"},properties:{drawer:{type:"void","x-component":"Action.Drawer",title:'{{t("New AI employee")}}',"x-decorator":"FormV2","x-use-decorator-props":"useCreateFormProps",properties:{form:{type:"void","x-component":"AIEmployeeForm"},footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{close:{title:"Cancel","x-component":"Action","x-component-props":{type:"default"},"x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary"},"x-use-component-props":"useCreateActionProps"}}}}}}}}},table:{type:"array","x-component":"TableV2","x-use-component-props":"useTableBlockProps","x-component-props":{rowKey:"username",rowSelection:{type:"checkbox"}},properties:{column0:{type:"void",title:e("Avatar"),"x-component":"TableV2.Column",properties:{avatar:{type:"string","x-component":"Avatar","x-component-props":{shape:"circle"}}}},column1:{type:"void",title:e("Username"),"x-component":"TableV2.Column",properties:{username:{type:"string","x-component":"Username","x-pattern":"readPretty"}}},column2:{type:"void",title:e("Nickname"),"x-component":"TableV2.Column",properties:{nickname:{type:"string","x-component":"Input","x-pattern":"readPretty"}}},column3:{type:"void",title:e("Position"),"x-component":"TableV2.Column",properties:{position:{type:"string","x-component":"Input","x-pattern":"readPretty"}}},column4:{type:"void",title:e("Enabled"),"x-component":"TableV2.Column",properties:{enabled:{type:"boolean","x-component":"EnableSwitch"}}},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:{edit:{type:"void",title:'{{t("Edit") }}',"x-action":"update","x-component":"Action.Link","x-component-props":{openMode:"drawer"},properties:{drawer:{type:"void",title:e("Edit AI employee"),"x-component":"Action.Drawer","x-decorator":"FormV2","x-use-decorator-props":"useEditFormProps",properties:{form:{type:"void","x-component":"AIEmployeeForm","x-component-props":{edit:!0}},footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{close:{title:e("Cancel"),"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":"useEditActionProps"}}}}}}},destroy:{type:"void",title:'{{ t("Delete") }}',"x-action":"destroy","x-component":"Action.Link","x-use-component-props":"useDeleteActionProps","x-component-props":{confirm:{title:"{{t('Delete AI employee')}}",content:"{{t('Are you sure you want to delete this AI employee?')}}"}}}}}}}}}}}}}}))}}}]);