@nocobase/plugin-flow-engine 2.1.9 → 2.1.11

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.
@@ -8,16 +8,16 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "2.1.9",
11
+ "@nocobase/client": "2.1.11",
12
12
  "lodash": "4.18.1",
13
- "@nocobase/database": "2.1.9",
14
- "@nocobase/data-source-manager": "2.1.9",
15
- "@nocobase/resourcer": "2.1.9",
16
- "@nocobase/utils": "2.1.9",
17
- "@nocobase/cache": "2.1.9",
18
- "@nocobase/server": "2.1.9",
19
- "@nocobase/actions": "2.1.9",
13
+ "@nocobase/database": "2.1.11",
14
+ "@nocobase/data-source-manager": "2.1.11",
15
+ "@nocobase/resourcer": "2.1.11",
16
+ "@nocobase/utils": "2.1.11",
17
+ "@nocobase/cache": "2.1.11",
18
+ "@nocobase/server": "2.1.11",
19
+ "@nocobase/actions": "2.1.11",
20
20
  "sequelize": "6.35.2",
21
21
  "@formily/json-schema": "2.3.7",
22
- "@nocobase/ai": "2.1.9"
22
+ "@nocobase/ai": "2.1.11"
23
23
  };
@@ -1 +1 @@
1
- {"name":"@ant-design/icons-svg","version":"4.3.1","sideEffects":false,"description":"Abstract nodes for ant design icons.","contributors":["HeskeyBaozi <hezhiyu233@foxmail.com>"],"homepage":"https://github.com/ant-design/ant-design-icons/","license":"MIT","main":"lib/index.js","module":"es/index.js","files":["lib","es","inline-svg","inline-namespaced-svg"],"repository":{"type":"git","url":"git+https://github.com/ant-design/ant-design-icons.git"},"scripts":{"g":"npm run generate","generate":"cross-env NODE_ENV=production gulp --require ts-node/register/transpile-only","type-check":"tsc --noEmit","build:es":"tsc --project tsconfig.build.json --module esnext --outDir es","build:lib":"tsc --project tsconfig.build.json --module commonjs --outDir lib","build":"cross-env NODE_ENV=production && npm run build:es && npm run build:lib","test":"cross-env NODE_ENV=test && npm run test:unit","test:unit":"jest","prepublishOnly":"npm run test && npm run g && npm run build && npm run type-check && npm run digest","digest":"node scripts/digest.js"},"bugs":{"url":"https://github.com/ant-design/ant-design-icons/issues"},"devDependencies":{"@babel/core":"^7.8.6","@babel/preset-env":"^7.8.6","@babel/preset-typescript":"^7.8.3","@rgrove/parse-xml":"^2.0.2","@types/gulp":"^4.0.6","@types/gulp-concat":"^0.0.32","@types/gulp-rename":"^0.0.33","@types/jest":"^25.1.3","@types/lodash.camelcase":"^4.3.6","@types/lodash.template":"^4.4.6","@types/lodash.upperfirst":"^4.3.6","@types/node":"^13.9.3","@types/ramda":"^0.26.43","@types/rgrove__parse-xml":"^1.1.0","@types/svgo":"^1.3.1","@types/through2":"^2.0.34","@typescript-eslint/eslint-plugin":"^2.21.0","@typescript-eslint/parser":"^2.21.0","babel-jest":"^25.1.0","cross-env":"^7.0.0","del":"^5.1.0","eslint":"^7.16.0","globby":"^11.0.0","gulp":"^4.0.2","gulp-clone":"^2.0.1","gulp-concat":"^2.6.1","gulp-header":"^2.0.9","gulp-rename":"^2.0.0","jest":"^25.1.0","lodash.camelcase":"^4.3.0","lodash.template":"^4.5.0","lodash.upperfirst":"^4.3.1","ramda":"^0.27.0","svgo":"^1.3.2","through2":"^3.0.1","ts-node":"^8.6.2","typescript":"^4.0.0","vinyl":"^2.2.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_lastModified":"2026-06-20T03:22:59.269Z"}
1
+ {"name":"@ant-design/icons-svg","version":"4.3.1","sideEffects":false,"description":"Abstract nodes for ant design icons.","contributors":["HeskeyBaozi <hezhiyu233@foxmail.com>"],"homepage":"https://github.com/ant-design/ant-design-icons/","license":"MIT","main":"lib/index.js","module":"es/index.js","files":["lib","es","inline-svg","inline-namespaced-svg"],"repository":{"type":"git","url":"git+https://github.com/ant-design/ant-design-icons.git"},"scripts":{"g":"npm run generate","generate":"cross-env NODE_ENV=production gulp --require ts-node/register/transpile-only","type-check":"tsc --noEmit","build:es":"tsc --project tsconfig.build.json --module esnext --outDir es","build:lib":"tsc --project tsconfig.build.json --module commonjs --outDir lib","build":"cross-env NODE_ENV=production && npm run build:es && npm run build:lib","test":"cross-env NODE_ENV=test && npm run test:unit","test:unit":"jest","prepublishOnly":"npm run test && npm run g && npm run build && npm run type-check && npm run digest","digest":"node scripts/digest.js"},"bugs":{"url":"https://github.com/ant-design/ant-design-icons/issues"},"devDependencies":{"@babel/core":"^7.8.6","@babel/preset-env":"^7.8.6","@babel/preset-typescript":"^7.8.3","@rgrove/parse-xml":"^2.0.2","@types/gulp":"^4.0.6","@types/gulp-concat":"^0.0.32","@types/gulp-rename":"^0.0.33","@types/jest":"^25.1.3","@types/lodash.camelcase":"^4.3.6","@types/lodash.template":"^4.4.6","@types/lodash.upperfirst":"^4.3.6","@types/node":"^13.9.3","@types/ramda":"^0.26.43","@types/rgrove__parse-xml":"^1.1.0","@types/svgo":"^1.3.1","@types/through2":"^2.0.34","@typescript-eslint/eslint-plugin":"^2.21.0","@typescript-eslint/parser":"^2.21.0","babel-jest":"^25.1.0","cross-env":"^7.0.0","del":"^5.1.0","eslint":"^7.16.0","globby":"^11.0.0","gulp":"^4.0.2","gulp-clone":"^2.0.1","gulp-concat":"^2.6.1","gulp-header":"^2.0.9","gulp-rename":"^2.0.0","jest":"^25.1.0","lodash.camelcase":"^4.3.0","lodash.template":"^4.5.0","lodash.upperfirst":"^4.3.1","ramda":"^0.27.0","svgo":"^1.3.2","through2":"^3.0.1","ts-node":"^8.6.2","typescript":"^4.0.0","vinyl":"^2.2.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_lastModified":"2026-06-24T23:37:46.076Z"}
@@ -1 +1 @@
1
- {"name":"acorn","description":"ECMAScript parser","homepage":"https://github.com/acornjs/acorn","main":"dist/acorn.js","types":"dist/acorn.d.ts","module":"dist/acorn.mjs","exports":{".":[{"import":"./dist/acorn.mjs","require":"./dist/acorn.js","default":"./dist/acorn.js"},"./dist/acorn.js"],"./package.json":"./package.json"},"version":"8.11.2","engines":{"node":">=0.4.0"},"maintainers":[{"name":"Marijn Haverbeke","email":"marijnh@gmail.com","web":"https://marijnhaverbeke.nl"},{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"https://rreverser.com/"},{"name":"Adrian Heine","web":"http://adrianheine.de"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn.git"},"license":"MIT","scripts":{"prepare":"cd ..; npm run build:main"},"bin":{"acorn":"./bin/acorn"},"_lastModified":"2026-06-20T03:23:00.155Z"}
1
+ {"name":"acorn","description":"ECMAScript parser","homepage":"https://github.com/acornjs/acorn","main":"dist/acorn.js","types":"dist/acorn.d.ts","module":"dist/acorn.mjs","exports":{".":[{"import":"./dist/acorn.mjs","require":"./dist/acorn.js","default":"./dist/acorn.js"},"./dist/acorn.js"],"./package.json":"./package.json"},"version":"8.11.2","engines":{"node":">=0.4.0"},"maintainers":[{"name":"Marijn Haverbeke","email":"marijnh@gmail.com","web":"https://marijnhaverbeke.nl"},{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"https://rreverser.com/"},{"name":"Adrian Heine","web":"http://adrianheine.de"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn.git"},"license":"MIT","scripts":{"prepare":"cd ..; npm run build:main"},"bin":{"acorn":"./bin/acorn"},"_lastModified":"2026-06-24T23:37:46.957Z"}
@@ -1 +1 @@
1
- {"name":"acorn-jsx","description":"Modern, fast React.js JSX parser","homepage":"https://github.com/acornjs/acorn-jsx","version":"5.3.2","maintainers":[{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"http://rreverser.com/"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn-jsx"},"license":"MIT","scripts":{"test":"node test/run.js"},"peerDependencies":{"acorn":"^6.0.0 || ^7.0.0 || ^8.0.0"},"devDependencies":{"acorn":"^8.0.1"},"_lastModified":"2026-06-20T03:23:00.577Z"}
1
+ {"name":"acorn-jsx","description":"Modern, fast React.js JSX parser","homepage":"https://github.com/acornjs/acorn-jsx","version":"5.3.2","maintainers":[{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"http://rreverser.com/"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn-jsx"},"license":"MIT","scripts":{"test":"node test/run.js"},"peerDependencies":{"acorn":"^6.0.0 || ^7.0.0 || ^8.0.0"},"devDependencies":{"acorn":"^8.0.1"},"_lastModified":"2026-06-24T23:37:47.378Z"}
@@ -1 +1 @@
1
- {"name":"acorn-walk","description":"ECMAScript (ESTree) AST walker","homepage":"https://github.com/acornjs/acorn","main":"dist/walk.js","types":"dist/walk.d.ts","module":"dist/walk.mjs","exports":{".":[{"import":"./dist/walk.mjs","require":"./dist/walk.js","default":"./dist/walk.js"},"./dist/walk.js"],"./package.json":"./package.json"},"version":"8.3.4","engines":{"node":">=0.4.0"},"dependencies":{"acorn":"^8.11.0"},"maintainers":[{"name":"Marijn Haverbeke","email":"marijnh@gmail.com","web":"https://marijnhaverbeke.nl"},{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"https://rreverser.com/"},{"name":"Adrian Heine","web":"http://adrianheine.de"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn.git"},"scripts":{"prepare":"cd ..; npm run build:walk"},"license":"MIT","_lastModified":"2026-06-20T03:23:00.689Z"}
1
+ {"name":"acorn-walk","description":"ECMAScript (ESTree) AST walker","homepage":"https://github.com/acornjs/acorn","main":"dist/walk.js","types":"dist/walk.d.ts","module":"dist/walk.mjs","exports":{".":[{"import":"./dist/walk.mjs","require":"./dist/walk.js","default":"./dist/walk.js"},"./dist/walk.js"],"./package.json":"./package.json"},"version":"8.3.4","engines":{"node":">=0.4.0"},"dependencies":{"acorn":"^8.11.0"},"maintainers":[{"name":"Marijn Haverbeke","email":"marijnh@gmail.com","web":"https://marijnhaverbeke.nl"},{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"https://rreverser.com/"},{"name":"Adrian Heine","web":"http://adrianheine.de"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn.git"},"scripts":{"prepare":"cd ..; npm run build:walk"},"license":"MIT","_lastModified":"2026-06-24T23:37:47.491Z"}
@@ -1 +1 @@
1
- {"name":"ses","version":"1.14.0","description":"Hardened JavaScript for Fearless Cooperation","keywords":["lockdown","harden","Compartment","assert","security","confinement","isolation","object capabilities","ocaps","secure execution","third-party code","prototype pollution","supply-chain attack","plugin"],"author":"Agoric","license":"Apache-2.0","homepage":"https://github.com/Agoric/SES-shim/tree/master/packages/ses#readme","repository":{"type":"git","url":"git+https://github.com/endojs/endo.git","directory":"packages/ses"},"bugs":{"url":"https://github.com/endojs/endo/issues"},"type":"module","main":"./dist/ses.cjs","module":"./index.js","unpkg":"./dist/ses.umd.js","types":"./types.d.ts","exports":{".":{"import":{"types":"./types.d.ts","xs":"./src-xs/index.js","default":"./index.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/ses.cjs"}},"./lockdown":{"import":{"types":"./types.d.ts","default":"./index.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/ses.cjs"}},"./hermes":{"require":{"types":"./dist/types.d.cts","default":"./dist/ses-hermes.cjs"}},"./tools.js":"./tools.js","./assert-shim.js":"./assert-shim.js","./lockdown-shim.js":{"xs":"./src-xs/lockdown-shim.js","default":"./lockdown-shim.js"},"./compartment-shim.js":{"xs":"./src-xs/compartment-shim.js","default":"./compartment-shim.js"},"./console-shim.js":"./console-shim.js","./package.json":"./package.json"},"scripts":{"build:vanilla":"node scripts/bundle.js","build:hermes":"node scripts/bundle.js hermes","build":"yarn build:vanilla && yarn build:hermes","clean":"rm -rf dist","cover":"c8 ava","demo":"python3 -m http.server","lint":"yarn lint:types && yarn lint:eslint","lint-fix":"eslint --fix .","lint:eslint":"eslint .","lint:types":"tsc","prepare":"npm run clean && npm run build","qt":"ava","test":"tsd && ava","test:hermes":"./scripts/hermes-test.sh","test:xs":"xst dist/ses.umd.js test/_lockdown-safe.js && node scripts/generate-test-xs.js && xst tmp/test-xs.js && rm -rf tmp","postpack":"git clean -fX \"*.d.ts*\" \"*.d.cts*\" \"*.d.mts*\" \"*.tsbuildinfo\""},"dependencies":{"@endo/cache-map":"^1.1.0","@endo/env-options":"^1.1.11","@endo/immutable-arraybuffer":"^1.1.2"},"devDependencies":{"@babel/generator":"^7.26.3","@babel/parser":"~7.26.2","@babel/traverse":"~7.25.9","@babel/types":"~7.26.0","@endo/compartment-mapper":"^1.6.3","@endo/module-source":"^1.3.3","@endo/test262-runner":"^0.1.48","@types/babel__traverse":"^7.20.5","ava":"^6.1.3","babel-eslint":"^10.1.0","c8":"^7.14.0","core-js":"^3.31.0","eslint":"^8.57.1","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^9.1.0","eslint-plugin-eslint-comments":"^3.2.0","eslint-plugin-import":"^2.31.0","hermes-engine-cli":"^0.12.0","prettier":"^3.5.3","terser":"^5.16.6","tsd":"^0.31.2","typescript":"~5.8.3"},"files":["./*.d.ts","./*.js","./*.map","LICENSE*","SECURITY*","dist","lib","src","tools"],"publishConfig":{"access":"public"},"eslintConfig":{"extends":["plugin:@endo/ses"]},"ava":{"files":["test/**/*.test.*"],"timeout":"2m"},"typeCoverage":{"atLeast":81.17},"gitHead":"9815aea9541f241389d2135c6097a7442bdffa17","_lastModified":"2026-06-20T03:22:59.766Z"}
1
+ {"name":"ses","version":"1.14.0","description":"Hardened JavaScript for Fearless Cooperation","keywords":["lockdown","harden","Compartment","assert","security","confinement","isolation","object capabilities","ocaps","secure execution","third-party code","prototype pollution","supply-chain attack","plugin"],"author":"Agoric","license":"Apache-2.0","homepage":"https://github.com/Agoric/SES-shim/tree/master/packages/ses#readme","repository":{"type":"git","url":"git+https://github.com/endojs/endo.git","directory":"packages/ses"},"bugs":{"url":"https://github.com/endojs/endo/issues"},"type":"module","main":"./dist/ses.cjs","module":"./index.js","unpkg":"./dist/ses.umd.js","types":"./types.d.ts","exports":{".":{"import":{"types":"./types.d.ts","xs":"./src-xs/index.js","default":"./index.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/ses.cjs"}},"./lockdown":{"import":{"types":"./types.d.ts","default":"./index.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/ses.cjs"}},"./hermes":{"require":{"types":"./dist/types.d.cts","default":"./dist/ses-hermes.cjs"}},"./tools.js":"./tools.js","./assert-shim.js":"./assert-shim.js","./lockdown-shim.js":{"xs":"./src-xs/lockdown-shim.js","default":"./lockdown-shim.js"},"./compartment-shim.js":{"xs":"./src-xs/compartment-shim.js","default":"./compartment-shim.js"},"./console-shim.js":"./console-shim.js","./package.json":"./package.json"},"scripts":{"build:vanilla":"node scripts/bundle.js","build:hermes":"node scripts/bundle.js hermes","build":"yarn build:vanilla && yarn build:hermes","clean":"rm -rf dist","cover":"c8 ava","demo":"python3 -m http.server","lint":"yarn lint:types && yarn lint:eslint","lint-fix":"eslint --fix .","lint:eslint":"eslint .","lint:types":"tsc","prepare":"npm run clean && npm run build","qt":"ava","test":"tsd && ava","test:hermes":"./scripts/hermes-test.sh","test:xs":"xst dist/ses.umd.js test/_lockdown-safe.js && node scripts/generate-test-xs.js && xst tmp/test-xs.js && rm -rf tmp","postpack":"git clean -fX \"*.d.ts*\" \"*.d.cts*\" \"*.d.mts*\" \"*.tsbuildinfo\""},"dependencies":{"@endo/cache-map":"^1.1.0","@endo/env-options":"^1.1.11","@endo/immutable-arraybuffer":"^1.1.2"},"devDependencies":{"@babel/generator":"^7.26.3","@babel/parser":"~7.26.2","@babel/traverse":"~7.25.9","@babel/types":"~7.26.0","@endo/compartment-mapper":"^1.6.3","@endo/module-source":"^1.3.3","@endo/test262-runner":"^0.1.48","@types/babel__traverse":"^7.20.5","ava":"^6.1.3","babel-eslint":"^10.1.0","c8":"^7.14.0","core-js":"^3.31.0","eslint":"^8.57.1","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^9.1.0","eslint-plugin-eslint-comments":"^3.2.0","eslint-plugin-import":"^2.31.0","hermes-engine-cli":"^0.12.0","prettier":"^3.5.3","terser":"^5.16.6","tsd":"^0.31.2","typescript":"~5.8.3"},"files":["./*.d.ts","./*.js","./*.map","LICENSE*","SECURITY*","dist","lib","src","tools"],"publishConfig":{"access":"public"},"eslintConfig":{"extends":["plugin:@endo/ses"]},"ava":{"files":["test/**/*.test.*"],"timeout":"2m"},"typeCoverage":{"atLeast":81.17},"gitHead":"9815aea9541f241389d2135c6097a7442bdffa17","_lastModified":"2026-06-24T23:37:46.570Z"}
@@ -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-20T03:23:01.786Z"}
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-24T23:37:48.595Z"}
@@ -6240,11 +6240,12 @@ function buildAuthoringAIEmployeeActionIdentity(settings) {
6240
6240
  return stableSerializeAuthoringValue(normalizeAuthoringAIEmployeePublicSettingsForIdentity(settings));
6241
6241
  }
6242
6242
  function normalizeAuthoringAIEmployeePublicSettingsForIdentity(settings) {
6243
+ const workContext = Object.prototype.hasOwnProperty.call(settings, "workContext") ? normalizeAuthoringAIEmployeeWorkContextForIdentity(settings.workContext) : [{ type: "flow-model", target: "self" }];
6243
6244
  return {
6244
6245
  username: String(settings.username || "").trim(),
6245
6246
  auto: typeof settings.auto === "boolean" ? settings.auto : false,
6246
- workContext: Object.prototype.hasOwnProperty.call(settings, "workContext") ? normalizeAuthoringAIEmployeeWorkContextForIdentity(settings.workContext) : [{ type: "flow-model", target: "self" }],
6247
- tasks: normalizeAuthoringAIEmployeeTasksForIdentity(settings.tasks),
6247
+ workContext,
6248
+ tasks: normalizeAuthoringAIEmployeeTasksForIdentity(settings.tasks, workContext),
6248
6249
  style: {
6249
6250
  ...AUTHORING_AI_EMPLOYEE_DEFAULT_STYLE,
6250
6251
  ..._.isPlainObject(settings.style) ? _.pick(settings.style, AUTHORING_AI_EMPLOYEE_STYLE_PUBLIC_KEYS) : {}
@@ -6263,7 +6264,14 @@ function normalizeAuthoringAIEmployeeWorkContextForIdentity(value) {
6263
6264
  return output;
6264
6265
  });
6265
6266
  }
6266
- function normalizeAuthoringAIEmployeeTasksForIdentity(value) {
6267
+ function normalizeAuthoringAIEmployeeTaskWorkContextForIdentity(value, defaultWorkContext) {
6268
+ const normalized = normalizeAuthoringAIEmployeeWorkContextForIdentity(value);
6269
+ if (Array.isArray(defaultWorkContext) && !normalized.length) {
6270
+ return _.cloneDeep(defaultWorkContext);
6271
+ }
6272
+ return normalized;
6273
+ }
6274
+ function normalizeAuthoringAIEmployeeTasksForIdentity(value, defaultWorkContext) {
6267
6275
  return _.castArray(value || []).map((task) => {
6268
6276
  if (!_.isPlainObject(task)) {
6269
6277
  return task;
@@ -6271,10 +6279,11 @@ function normalizeAuthoringAIEmployeeTasksForIdentity(value) {
6271
6279
  const output = _.pick(task, AUTHORING_AI_EMPLOYEE_TASK_PUBLIC_SETTING_KEYS);
6272
6280
  if (_.isPlainObject(output.message)) {
6273
6281
  output.message = _.pick(output.message, AUTHORING_AI_EMPLOYEE_TASK_MESSAGE_PUBLIC_KEYS);
6274
- if (_.isPlainObject(output.message.workContext)) {
6275
- output.message.workContext = normalizeAuthoringAIEmployeeWorkContextForIdentity(output.message.workContext);
6276
- } else if (Array.isArray(output.message.workContext)) {
6277
- output.message.workContext = normalizeAuthoringAIEmployeeWorkContextForIdentity(output.message.workContext);
6282
+ if (Object.prototype.hasOwnProperty.call(output.message, "workContext")) {
6283
+ output.message.workContext = normalizeAuthoringAIEmployeeTaskWorkContextForIdentity(
6284
+ output.message.workContext,
6285
+ defaultWorkContext
6286
+ );
6278
6287
  }
6279
6288
  }
6280
6289
  if (Object.prototype.hasOwnProperty.call(task, "prompt") && !Object.prototype.hasOwnProperty.call(output.message || {}, "user")) {
@@ -6283,6 +6292,13 @@ function normalizeAuthoringAIEmployeeTasksForIdentity(value) {
6283
6292
  user: task.prompt
6284
6293
  };
6285
6294
  }
6295
+ if (!_.isPlainObject(output.message) && Array.isArray(defaultWorkContext)) {
6296
+ output.message = {
6297
+ workContext: _.cloneDeep(defaultWorkContext)
6298
+ };
6299
+ } else if (_.isPlainObject(output.message) && !Object.prototype.hasOwnProperty.call(output.message, "workContext")) {
6300
+ output.message.workContext = _.cloneDeep(defaultWorkContext || []);
6301
+ }
6286
6302
  if (_.isPlainObject(output.model)) {
6287
6303
  output.model = _.pick(output.model, AUTHORING_AI_EMPLOYEE_TASK_MODEL_PUBLIC_KEYS);
6288
6304
  }
@@ -1061,14 +1061,19 @@ export declare class FlowSurfacesService {
1061
1061
  private stableSerializeAIEmployeeValue;
1062
1062
  private buildAIEmployeeActionDedupIdentity;
1063
1063
  private normalizeAIEmployeeWorkContextForDedupIdentity;
1064
+ private normalizeAIEmployeeActionWorkContextForDedupIdentity;
1065
+ private normalizeAIEmployeeDefaultActionWorkContextForSelfUid;
1066
+ private normalizeAIEmployeeTaskWorkContextForDedupIdentity;
1064
1067
  private normalizeAIEmployeeTasksForDedupIdentity;
1065
1068
  private assertNoDuplicateAIEmployeeAction;
1069
+ private assertNoDuplicateAIEmployeeActionForUpdateSettings;
1066
1070
  private hasAIEmployeePublicSettings;
1067
1071
  private assertOnlyAIEmployeePublicSettings;
1068
1072
  private aiEmployeeNestedRepairHint;
1069
1073
  private assertOnlyAIEmployeeNestedPublicSettings;
1070
1074
  private assertNoAIEmployeeInternalPropSettings;
1071
1075
  private readAIEmployeePersistedTasks;
1076
+ private normalizeAIEmployeeLegacyInheritedTaskWorkContext;
1072
1077
  private buildAIEmployeeTaskStepParams;
1073
1078
  private mergeAIEmployeeActionSettingsPayload;
1074
1079
  private syncAIEmployeeTaskStepParamsForUpdateSettings;
@@ -1081,6 +1086,7 @@ export declare class FlowSurfacesService {
1081
1086
  private normalizeAIEmployeeUsername;
1082
1087
  private assertAIEmployeeWorkContextType;
1083
1088
  private normalizeAIEmployeeWorkContext;
1089
+ private normalizeAIEmployeeEffectiveActionWorkContext;
1084
1090
  private normalizeAIEmployeeTaskModel;
1085
1091
  private normalizeAIEmployeeSkillSettings;
1086
1092
  private collectAIEmployeePromptVariables;
@@ -1103,9 +1109,13 @@ export declare class FlowSurfacesService {
1103
1109
  private normalizeAIEmployeeTaskMessage;
1104
1110
  private normalizeAIEmployeeTaskPatch;
1105
1111
  private normalizeAIEmployeeTasks;
1112
+ private withAIEmployeeTaskDefaultWorkContext;
1113
+ private shouldMaterializeAIEmployeeTaskDefaultWorkContext;
1114
+ private rebaseAIEmployeeInheritedTaskWorkContext;
1106
1115
  private normalizeAIEmployeeActionSettingsReferences;
1107
1116
  private normalizeAIEmployeeActionPublicSettings;
1108
1117
  private resolveAIEmployeeActionSelfUid;
1118
+ private resolveAIEmployeeActionSelfUidFromParentNode;
1109
1119
  private configureActionNode;
1110
1120
  private normalizeActionPanelActionChanges;
1111
1121
  private buildFieldCatalog;
@@ -11524,6 +11524,7 @@ class FlowSurfacesService {
11524
11524
  }
11525
11525
  if (this.isAIEmployeeActionUse(current == null ? void 0 : current.use) && this.hasAIEmployeePublicSettings(normalizedValues)) {
11526
11526
  const enabledPackages = await this.resolveEnabledPluginPackages(options);
11527
+ const hasRawAIEmployeeStepTasks = import_lodash.default.has(normalizedValues, ["stepParams", ...AI_EMPLOYEE_TASK_STEP_PARAMS_PATH]);
11527
11528
  const aiEmployeeSettingsPayload = await this.normalizeAIEmployeeActionPublicSettings(
11528
11529
  "updateSettings",
11529
11530
  import_lodash.default.pick(normalizedValues, AI_EMPLOYEE_PUBLIC_SETTING_KEYS),
@@ -11536,7 +11537,8 @@ class FlowSurfacesService {
11536
11537
  promptContext: {
11537
11538
  kind: "target",
11538
11539
  targetUid: (current == null ? void 0 : current.uid) || writeTarget.uid
11539
- }
11540
+ },
11541
+ skipExistingTaskWorkContextRebase: hasRawAIEmployeeStepTasks
11540
11542
  }
11541
11543
  );
11542
11544
  AI_EMPLOYEE_PUBLIC_SETTING_KEYS.forEach((key) => {
@@ -11670,6 +11672,12 @@ class FlowSurfacesService {
11670
11672
  if (Object.keys(nextPayload).length === 1) {
11671
11673
  return { uid: current.uid };
11672
11674
  }
11675
+ await this.assertNoDuplicateAIEmployeeActionForUpdateSettings(
11676
+ options.openViewActionName || "updateSettings",
11677
+ current,
11678
+ effectiveNode,
11679
+ options.transaction
11680
+ );
11673
11681
  if (target.kind === "tab" && target.tabRoute) {
11674
11682
  await this.routeSync.persistTabSettings(target, current, nextPayload, options.transaction);
11675
11683
  return {
@@ -17709,19 +17717,21 @@ class FlowSurfacesService {
17709
17717
  }
17710
17718
  return JSON.stringify(value);
17711
17719
  }
17712
- buildAIEmployeeActionDedupIdentity(values) {
17720
+ buildAIEmployeeActionDedupIdentity(values, defaultActionWorkContext) {
17713
17721
  var _a, _b, _c, _d, _e, _f;
17714
17722
  const username = String(((_b = (_a = values == null ? void 0 : values.props) == null ? void 0 : _a.aiEmployee) == null ? void 0 : _b.username) || "").trim();
17715
17723
  if (!username) {
17716
17724
  return "";
17717
17725
  }
17726
+ const workContext = this.normalizeAIEmployeeActionWorkContextForDedupIdentity(
17727
+ (_d = (_c = values == null ? void 0 : values.props) == null ? void 0 : _c.context) == null ? void 0 : _d.workContext,
17728
+ defaultActionWorkContext
17729
+ );
17718
17730
  return this.stableSerializeAIEmployeeValue({
17719
17731
  username,
17720
- auto: typeof ((_c = values == null ? void 0 : values.props) == null ? void 0 : _c.auto) === "boolean" ? values.props.auto : false,
17721
- workContext: this.normalizeAIEmployeeWorkContextForDedupIdentity((_e = (_d = values == null ? void 0 : values.props) == null ? void 0 : _d.context) == null ? void 0 : _e.workContext),
17722
- tasks: this.normalizeAIEmployeeTasksForDedupIdentity(
17723
- import_lodash.default.get(values, ["stepParams", ...AI_EMPLOYEE_TASK_STEP_PARAMS_PATH])
17724
- ),
17732
+ auto: typeof ((_e = values == null ? void 0 : values.props) == null ? void 0 : _e.auto) === "boolean" ? values.props.auto : false,
17733
+ workContext,
17734
+ tasks: this.normalizeAIEmployeeTasksForDedupIdentity(this.readAIEmployeePersistedTasks(values), workContext),
17725
17735
  style: {
17726
17736
  ...AI_EMPLOYEE_DEFAULT_STYLE,
17727
17737
  ...import_lodash.default.isPlainObject((_f = values == null ? void 0 : values.props) == null ? void 0 : _f.style) ? import_lodash.default.pick(values.props.style, AI_EMPLOYEE_STYLE_PUBLIC_KEYS) : {}
@@ -17729,11 +17739,35 @@ class FlowSurfacesService {
17729
17739
  });
17730
17740
  }
17731
17741
  normalizeAIEmployeeWorkContextForDedupIdentity(value) {
17732
- return import_lodash.default.castArray(value || []).map(
17733
- (item) => import_lodash.default.isPlainObject(item) ? import_lodash.default.pick(item, AI_EMPLOYEE_WORK_CONTEXT_PUBLIC_KEYS) : item
17734
- );
17742
+ return import_lodash.default.castArray(value || []).map((item) => {
17743
+ if (!import_lodash.default.isPlainObject(item)) {
17744
+ return item;
17745
+ }
17746
+ const output = import_lodash.default.pick(item, AI_EMPLOYEE_WORK_CONTEXT_PUBLIC_KEYS);
17747
+ if (!Object.prototype.hasOwnProperty.call(output, "type") || import_lodash.default.isUndefined(output.type) || output.type === null) {
17748
+ output.type = "flow-model";
17749
+ }
17750
+ return output;
17751
+ });
17752
+ }
17753
+ normalizeAIEmployeeActionWorkContextForDedupIdentity(value, defaultWorkContext) {
17754
+ if (!Array.isArray(value)) {
17755
+ return import_lodash.default.cloneDeep(defaultWorkContext || []);
17756
+ }
17757
+ return this.normalizeAIEmployeeWorkContextForDedupIdentity(value);
17758
+ }
17759
+ normalizeAIEmployeeDefaultActionWorkContextForSelfUid(selfUid) {
17760
+ const uid2 = String(selfUid || "").trim();
17761
+ return uid2 ? [{ type: "flow-model", uid: uid2 }] : [];
17735
17762
  }
17736
- normalizeAIEmployeeTasksForDedupIdentity(value) {
17763
+ normalizeAIEmployeeTaskWorkContextForDedupIdentity(value, defaultWorkContext) {
17764
+ const normalized = this.normalizeAIEmployeeWorkContextForDedupIdentity(value);
17765
+ if (Array.isArray(defaultWorkContext) && !normalized.length) {
17766
+ return import_lodash.default.cloneDeep(defaultWorkContext);
17767
+ }
17768
+ return normalized;
17769
+ }
17770
+ normalizeAIEmployeeTasksForDedupIdentity(value, defaultWorkContext) {
17737
17771
  return import_lodash.default.castArray(value || []).map((task) => {
17738
17772
  if (!import_lodash.default.isPlainObject(task)) {
17739
17773
  return task;
@@ -17742,9 +17776,19 @@ class FlowSurfacesService {
17742
17776
  if (import_lodash.default.isPlainObject(output.message)) {
17743
17777
  output.message = import_lodash.default.pick(output.message, AI_EMPLOYEE_TASK_MESSAGE_PUBLIC_KEYS);
17744
17778
  if (Object.prototype.hasOwnProperty.call(output.message, "workContext")) {
17745
- output.message.workContext = this.normalizeAIEmployeeWorkContextForDedupIdentity(output.message.workContext);
17779
+ output.message.workContext = this.normalizeAIEmployeeTaskWorkContextForDedupIdentity(
17780
+ output.message.workContext,
17781
+ defaultWorkContext
17782
+ );
17746
17783
  }
17747
17784
  }
17785
+ if (!import_lodash.default.isPlainObject(output.message) && Array.isArray(defaultWorkContext)) {
17786
+ output.message = {
17787
+ workContext: import_lodash.default.cloneDeep(defaultWorkContext)
17788
+ };
17789
+ } else if (import_lodash.default.isPlainObject(output.message) && !Object.prototype.hasOwnProperty.call(output.message, "workContext")) {
17790
+ output.message.workContext = import_lodash.default.cloneDeep(defaultWorkContext || []);
17791
+ }
17748
17792
  if (import_lodash.default.isPlainObject(output.model)) {
17749
17793
  output.model = import_lodash.default.pick(output.model, AI_EMPLOYEE_TASK_MODEL_PUBLIC_KEYS);
17750
17794
  }
@@ -17754,25 +17798,38 @@ class FlowSurfacesService {
17754
17798
  return output;
17755
17799
  });
17756
17800
  }
17757
- async assertNoDuplicateAIEmployeeAction(actionName, parentUid, values, transaction) {
17801
+ async assertNoDuplicateAIEmployeeAction(actionName, parentUid, values, transaction, excludeUid) {
17758
17802
  var _a;
17759
- const identity = this.buildAIEmployeeActionDedupIdentity(values);
17760
- if (!identity) {
17761
- return;
17762
- }
17763
17803
  const parentNode = await this.repository.findModelById(parentUid, {
17764
17804
  transaction,
17765
17805
  includeAsyncNode: true
17766
17806
  });
17767
- const duplicate = import_lodash.default.castArray(((_a = parentNode == null ? void 0 : parentNode.subModels) == null ? void 0 : _a.actions) || []).find((action) => {
17807
+ const defaultActionWorkContext = this.normalizeAIEmployeeDefaultActionWorkContextForSelfUid(
17808
+ await this.resolveAIEmployeeActionSelfUidFromParentNode(parentNode, transaction)
17809
+ );
17810
+ const identity = this.buildAIEmployeeActionDedupIdentity(values, defaultActionWorkContext);
17811
+ if (!identity) {
17812
+ return;
17813
+ }
17814
+ let duplicate;
17815
+ for (const action of import_lodash.default.castArray(((_a = parentNode == null ? void 0 : parentNode.subModels) == null ? void 0 : _a.actions) || [])) {
17768
17816
  if (!this.isAIEmployeeActionUse(action == null ? void 0 : action.use)) {
17769
- return false;
17817
+ continue;
17770
17818
  }
17771
- return this.buildAIEmployeeActionDedupIdentity({
17772
- props: action.props,
17773
- stepParams: action.stepParams
17774
- }) === identity;
17775
- });
17819
+ if (excludeUid && String((action == null ? void 0 : action.uid) || "") === excludeUid) {
17820
+ continue;
17821
+ }
17822
+ if (this.buildAIEmployeeActionDedupIdentity(
17823
+ {
17824
+ props: action.props,
17825
+ stepParams: action.stepParams
17826
+ },
17827
+ defaultActionWorkContext
17828
+ ) === identity) {
17829
+ duplicate = action;
17830
+ break;
17831
+ }
17832
+ }
17776
17833
  if (!(duplicate == null ? void 0 : duplicate.uid)) {
17777
17834
  return;
17778
17835
  }
@@ -17787,6 +17844,25 @@ class FlowSurfacesService {
17787
17844
  }
17788
17845
  );
17789
17846
  }
17847
+ async assertNoDuplicateAIEmployeeActionForUpdateSettings(actionName, current, effectiveNode, transaction) {
17848
+ if (!this.isAIEmployeeActionUse(current == null ? void 0 : current.use)) {
17849
+ return;
17850
+ }
17851
+ const parentUid = String((current == null ? void 0 : current.parentId) || "").trim() || ((current == null ? void 0 : current.uid) ? await this.locator.findParentUid(current.uid, transaction).catch(() => "") : "");
17852
+ if (!parentUid) {
17853
+ return;
17854
+ }
17855
+ await this.assertNoDuplicateAIEmployeeAction(
17856
+ actionName,
17857
+ parentUid,
17858
+ {
17859
+ props: effectiveNode == null ? void 0 : effectiveNode.props,
17860
+ stepParams: effectiveNode == null ? void 0 : effectiveNode.stepParams
17861
+ },
17862
+ transaction,
17863
+ String((current == null ? void 0 : current.uid) || "")
17864
+ );
17865
+ }
17790
17866
  hasAIEmployeePublicSettings(settings) {
17791
17867
  return import_lodash.default.isPlainObject(settings) && AI_EMPLOYEE_PUBLIC_SETTING_KEYS.some((key) => Object.prototype.hasOwnProperty.call(settings, key));
17792
17868
  }
@@ -17841,11 +17917,24 @@ class FlowSurfacesService {
17841
17917
  var _a;
17842
17918
  const stepTasks = import_lodash.default.get(current, ["stepParams", ...AI_EMPLOYEE_TASK_STEP_PARAMS_PATH]);
17843
17919
  if (Array.isArray(stepTasks)) {
17844
- return stepTasks;
17920
+ return this.normalizeAIEmployeeLegacyInheritedTaskWorkContext(stepTasks);
17845
17921
  }
17846
- const legacyPropsTasks = (_a = current == null ? void 0 : current.props) == null ? void 0 : _a.tasks;
17922
+ const legacyPropsTasks = this.normalizeAIEmployeeLegacyInheritedTaskWorkContext((_a = current == null ? void 0 : current.props) == null ? void 0 : _a.tasks);
17847
17923
  return Array.isArray(legacyPropsTasks) ? legacyPropsTasks : [];
17848
17924
  }
17925
+ normalizeAIEmployeeLegacyInheritedTaskWorkContext(tasks) {
17926
+ if (!Array.isArray(tasks)) {
17927
+ return tasks;
17928
+ }
17929
+ return tasks.map((task) => {
17930
+ if (!import_lodash.default.isPlainObject(task) || !import_lodash.default.isPlainObject(task.message) || task.message.workContext !== null) {
17931
+ return task;
17932
+ }
17933
+ const nextTask = import_lodash.default.cloneDeep(task);
17934
+ delete nextTask.message.workContext;
17935
+ return nextTask;
17936
+ });
17937
+ }
17849
17938
  buildAIEmployeeTaskStepParams(tasks) {
17850
17939
  const stepParams = {};
17851
17940
  import_lodash.default.set(stepParams, AI_EMPLOYEE_TASK_STEP_PARAMS_PATH, import_lodash.default.cloneDeep(tasks));
@@ -17874,7 +17963,7 @@ class FlowSurfacesService {
17874
17963
  if (!this.isAIEmployeeActionUse(current == null ? void 0 : current.use)) {
17875
17964
  return;
17876
17965
  }
17877
- const legacyPropsTasks = (_a = current == null ? void 0 : current.props) == null ? void 0 : _a.tasks;
17966
+ const legacyPropsTasks = this.normalizeAIEmployeeLegacyInheritedTaskWorkContext((_a = current == null ? void 0 : current.props) == null ? void 0 : _a.tasks);
17878
17967
  const hasLegacyPropsTasks = Array.isArray(legacyPropsTasks);
17879
17968
  const hasNextStepTasks = import_lodash.default.has(nextPayload, ["stepParams", ...AI_EMPLOYEE_TASK_STEP_PARAMS_PATH]);
17880
17969
  const currentStepTasks = import_lodash.default.get(current, ["stepParams", ...AI_EMPLOYEE_TASK_STEP_PARAMS_PATH]);
@@ -18046,6 +18135,20 @@ class FlowSurfacesService {
18046
18135
  };
18047
18136
  });
18048
18137
  }
18138
+ normalizeAIEmployeeEffectiveActionWorkContext(actionName, settings, currentProps, options) {
18139
+ var _a;
18140
+ const hasSettingsWorkContext = Object.prototype.hasOwnProperty.call(settings, "workContext");
18141
+ const currentWorkContext = (_a = currentProps == null ? void 0 : currentProps.context) == null ? void 0 : _a.workContext;
18142
+ if (!hasSettingsWorkContext && !Array.isArray(currentWorkContext) && !options.requireUsername && !options.selfUid) {
18143
+ return void 0;
18144
+ }
18145
+ const rawWorkContext = hasSettingsWorkContext ? settings.workContext : Array.isArray(currentWorkContext) ? currentWorkContext : [{ type: "flow-model", target: "self" }];
18146
+ return this.normalizeAIEmployeeWorkContext(actionName, rawWorkContext, {
18147
+ selfUid: options.selfUid,
18148
+ keyMap: options.keyMap,
18149
+ path: "settings.workContext"
18150
+ });
18151
+ }
18049
18152
  normalizeAIEmployeeTaskModel(actionName, path, value) {
18050
18153
  if (import_lodash.default.isUndefined(value) || value === null) {
18051
18154
  return value;
@@ -18361,6 +18464,7 @@ ${AI_EMPLOYEE_CURRENT_RECORD_PROMPT_VARIABLE}` : AI_EMPLOYEE_CURRENT_RECORD_PROM
18361
18464
  );
18362
18465
  }
18363
18466
  async normalizeAIEmployeeStepParamTasksForUpdateSettings(current, nextPayload, writeTarget, options) {
18467
+ var _a, _b, _c, _d;
18364
18468
  if (!this.isAIEmployeeActionUse(current == null ? void 0 : current.use) || !import_lodash.default.has(nextPayload, ["stepParams", ...AI_EMPLOYEE_TASK_STEP_PARAMS_PATH])) {
18365
18469
  return;
18366
18470
  }
@@ -18369,15 +18473,63 @@ ${AI_EMPLOYEE_CURRENT_RECORD_PROMPT_VARIABLE}` : AI_EMPLOYEE_CURRENT_RECORD_PROM
18369
18473
  return;
18370
18474
  }
18371
18475
  const actionName = options.openViewActionName || "updateSettings";
18372
- const normalizedTasks = this.normalizeAIEmployeeTasks(
18476
+ const selfUid = await this.resolveAIEmployeeActionSelfUid(current || { uid: writeTarget.uid }, options.transaction);
18477
+ const currentPropsForDefault = import_lodash.default.mergeWith(
18478
+ {},
18479
+ import_lodash.default.isPlainObject(current == null ? void 0 : current.props) ? current.props : {},
18480
+ import_lodash.default.isPlainObject(nextPayload.props) ? nextPayload.props : {},
18481
+ (_currentValue, nextValue) => {
18482
+ if (Array.isArray(nextValue)) {
18483
+ return import_lodash.default.cloneDeep(nextValue);
18484
+ }
18485
+ return void 0;
18486
+ }
18487
+ );
18488
+ const defaultWorkContext = this.normalizeAIEmployeeEffectiveActionWorkContext(
18373
18489
  actionName,
18374
- tasks,
18375
- this.readAIEmployeePersistedTasks(current),
18490
+ {},
18491
+ currentPropsForDefault,
18376
18492
  {
18377
- selfUid: await this.resolveAIEmployeeActionSelfUid(current || { uid: writeTarget.uid }, options.transaction),
18378
- path: "stepParams.shortcutSettings.editTasks.tasks"
18493
+ selfUid,
18494
+ requireUsername: true
18379
18495
  }
18380
18496
  );
18497
+ const currentTasks = this.readAIEmployeePersistedTasks(current);
18498
+ const previousActionWorkContext = this.normalizeAIEmployeeActionWorkContextForDedupIdentity(
18499
+ (_b = (_a = current == null ? void 0 : current.props) == null ? void 0 : _a.context) == null ? void 0 : _b.workContext,
18500
+ this.normalizeAIEmployeeDefaultActionWorkContextForSelfUid(selfUid)
18501
+ );
18502
+ const nextActionWorkContext = this.normalizeAIEmployeeActionWorkContextForDedupIdentity(
18503
+ (_c = currentPropsForDefault == null ? void 0 : currentPropsForDefault.context) == null ? void 0 : _c.workContext,
18504
+ defaultWorkContext
18505
+ );
18506
+ if (Array.isArray(defaultWorkContext) && !import_lodash.default.isEqual((_d = currentPropsForDefault == null ? void 0 : currentPropsForDefault.context) == null ? void 0 : _d.workContext, defaultWorkContext)) {
18507
+ nextPayload.props = import_lodash.default.mergeWith(
18508
+ {},
18509
+ currentPropsForDefault,
18510
+ {
18511
+ context: {
18512
+ workContext: import_lodash.default.cloneDeep(defaultWorkContext)
18513
+ }
18514
+ },
18515
+ (_currentValue, nextValue) => {
18516
+ if (Array.isArray(nextValue)) {
18517
+ return import_lodash.default.cloneDeep(nextValue);
18518
+ }
18519
+ return void 0;
18520
+ }
18521
+ );
18522
+ }
18523
+ const currentTasksForNormalization = this.rebaseAIEmployeeInheritedTaskWorkContext(
18524
+ currentTasks,
18525
+ previousActionWorkContext,
18526
+ nextActionWorkContext
18527
+ );
18528
+ const normalizedTasks = this.normalizeAIEmployeeTasks(actionName, tasks, currentTasksForNormalization, {
18529
+ selfUid,
18530
+ defaultWorkContext,
18531
+ path: "stepParams.shortcutSettings.editTasks.tasks"
18532
+ });
18381
18533
  import_lodash.default.set(nextPayload, ["stepParams", ...AI_EMPLOYEE_TASK_STEP_PARAMS_PATH], normalizedTasks);
18382
18534
  }
18383
18535
  normalizeAIEmployeeTaskMessage(actionName, path, value, existing, options) {
@@ -18406,13 +18558,18 @@ ${AI_EMPLOYEE_CURRENT_RECORD_PROMPT_VARIABLE}` : AI_EMPLOYEE_CURRENT_RECORD_PROM
18406
18558
  if (Object.prototype.hasOwnProperty.call(nextMessage, "user") && typeof nextMessage.user !== "string") {
18407
18559
  (0, import_errors.throwBadRequest)(`flowSurfaces ${actionName} ${path}.user must be a string`);
18408
18560
  }
18409
- if (Object.prototype.hasOwnProperty.call(value, "workContext")) {
18561
+ if (value.workContext === null) {
18562
+ delete nextMessage.workContext;
18563
+ } else if (Object.prototype.hasOwnProperty.call(value, "workContext")) {
18410
18564
  nextMessage.workContext = this.normalizeAIEmployeeWorkContext(actionName, value.workContext, {
18411
18565
  selfUid: options.selfUid,
18412
18566
  keyMap: options.keyMap,
18413
18567
  path: `${path}.workContext`
18414
18568
  });
18415
18569
  }
18570
+ if (!Object.prototype.hasOwnProperty.call(nextMessage, "workContext") && this.shouldMaterializeAIEmployeeTaskDefaultWorkContext(options.defaultWorkContext)) {
18571
+ nextMessage.workContext = import_lodash.default.cloneDeep(options.defaultWorkContext);
18572
+ }
18416
18573
  return nextMessage;
18417
18574
  }
18418
18575
  normalizeAIEmployeeTaskPatch(actionName, patch, existing, options) {
@@ -18436,7 +18593,8 @@ ${AI_EMPLOYEE_CURRENT_RECORD_PROMPT_VARIABLE}` : AI_EMPLOYEE_CURRENT_RECORD_PROM
18436
18593
  if (key === "message") {
18437
18594
  next.message = this.normalizeAIEmployeeTaskMessage(actionName, `${options.path}.message`, value, next.message, {
18438
18595
  selfUid: options.selfUid,
18439
- keyMap: options.keyMap
18596
+ keyMap: options.keyMap,
18597
+ defaultWorkContext: options.defaultWorkContext
18440
18598
  });
18441
18599
  return;
18442
18600
  }
@@ -18486,6 +18644,9 @@ ${AI_EMPLOYEE_CURRENT_RECORD_PROMPT_VARIABLE}` : AI_EMPLOYEE_CURRENT_RECORD_PROM
18486
18644
  if (!import_lodash.default.isPlainObject(next.message)) {
18487
18645
  next.message = {};
18488
18646
  }
18647
+ if (!Object.prototype.hasOwnProperty.call(next.message, "workContext") && this.shouldMaterializeAIEmployeeTaskDefaultWorkContext(options.defaultWorkContext)) {
18648
+ next.message.workContext = import_lodash.default.cloneDeep(options.defaultWorkContext);
18649
+ }
18489
18650
  if (import_lodash.default.isPlainObject(next.skillSettings)) {
18490
18651
  if (Array.isArray(next.skillSettings.skills) && !Object.prototype.hasOwnProperty.call(next.skillSettings, "skillsVersion")) {
18491
18652
  next.skillSettings.skillsVersion = 2;
@@ -18512,10 +18673,52 @@ ${AI_EMPLOYEE_CURRENT_RECORD_PROMPT_VARIABLE}` : AI_EMPLOYEE_CURRENT_RECORD_PROM
18512
18673
  nextTasks[index] = this.normalizeAIEmployeeTaskPatch(actionName, task, existingTasks[index], {
18513
18674
  selfUid: options.selfUid,
18514
18675
  keyMap: options.keyMap,
18515
- path: `${options.path}[${index}]`
18676
+ path: `${options.path}[${index}]`,
18677
+ defaultWorkContext: options.defaultWorkContext
18516
18678
  });
18517
18679
  });
18518
- return nextTasks;
18680
+ return this.withAIEmployeeTaskDefaultWorkContext(nextTasks, options.defaultWorkContext);
18681
+ }
18682
+ withAIEmployeeTaskDefaultWorkContext(tasks, defaultWorkContext) {
18683
+ const nextTasks = Array.isArray(tasks) ? import_lodash.default.cloneDeep(tasks) : [];
18684
+ if (!this.shouldMaterializeAIEmployeeTaskDefaultWorkContext(defaultWorkContext)) {
18685
+ return nextTasks;
18686
+ }
18687
+ return nextTasks.map((task) => {
18688
+ if (!import_lodash.default.isPlainObject(task)) {
18689
+ return task;
18690
+ }
18691
+ const nextTask = import_lodash.default.cloneDeep(task);
18692
+ if (!import_lodash.default.isPlainObject(nextTask.message)) {
18693
+ nextTask.message = {
18694
+ workContext: import_lodash.default.cloneDeep(defaultWorkContext)
18695
+ };
18696
+ } else if (!Object.prototype.hasOwnProperty.call(nextTask.message, "workContext")) {
18697
+ nextTask.message.workContext = import_lodash.default.cloneDeep(defaultWorkContext);
18698
+ }
18699
+ return nextTask;
18700
+ });
18701
+ }
18702
+ shouldMaterializeAIEmployeeTaskDefaultWorkContext(defaultWorkContext) {
18703
+ return Array.isArray(defaultWorkContext) && defaultWorkContext.length > 0;
18704
+ }
18705
+ rebaseAIEmployeeInheritedTaskWorkContext(currentTasks, previousActionWorkContext, nextActionWorkContext) {
18706
+ const tasks = this.normalizeAIEmployeeLegacyInheritedTaskWorkContext(currentTasks) || [];
18707
+ if (!previousActionWorkContext.length || import_lodash.default.isEqual(previousActionWorkContext, nextActionWorkContext)) {
18708
+ return tasks;
18709
+ }
18710
+ return tasks.map((task) => {
18711
+ const nextTask = import_lodash.default.cloneDeep(task);
18712
+ if (import_lodash.default.isPlainObject(nextTask == null ? void 0 : nextTask.message)) {
18713
+ const currentTaskWorkContext = this.normalizeAIEmployeeWorkContextForDedupIdentity(
18714
+ nextTask.message.workContext
18715
+ );
18716
+ if (import_lodash.default.isEqual(currentTaskWorkContext, previousActionWorkContext)) {
18717
+ delete nextTask.message.workContext;
18718
+ }
18719
+ }
18720
+ return nextTask;
18721
+ });
18519
18722
  }
18520
18723
  normalizeAIEmployeeActionSettingsReferences(actionName, settings, options) {
18521
18724
  if (!this.hasAIEmployeePublicSettings(settings)) {
@@ -18529,15 +18732,22 @@ ${AI_EMPLOYEE_CURRENT_RECORD_PROMPT_VARIABLE}` : AI_EMPLOYEE_CURRENT_RECORD_PROM
18529
18732
  });
18530
18733
  }
18531
18734
  if (Object.prototype.hasOwnProperty.call(nextSettings, "tasks")) {
18735
+ const defaultWorkContext = this.normalizeAIEmployeeEffectiveActionWorkContext(
18736
+ actionName,
18737
+ nextSettings,
18738
+ {},
18739
+ options
18740
+ );
18532
18741
  nextSettings.tasks = this.normalizeAIEmployeeTasks(actionName, nextSettings.tasks, [], {
18533
18742
  ...options,
18534
- path: "settings.tasks"
18743
+ path: "settings.tasks",
18744
+ defaultWorkContext
18535
18745
  });
18536
18746
  }
18537
18747
  return nextSettings;
18538
18748
  }
18539
18749
  async normalizeAIEmployeeActionPublicSettings(actionName, settings, options) {
18540
- var _a, _b;
18750
+ var _a, _b, _c, _d;
18541
18751
  this.assertAIEmployeePluginEnabled(actionName, options.enabledPackages);
18542
18752
  if (!import_lodash.default.isPlainObject(settings)) {
18543
18753
  (0, import_errors.throwBadRequest)(`flowSurfaces ${actionName} AI employee settings must be an object`);
@@ -18557,6 +18767,17 @@ ${AI_EMPLOYEE_CURRENT_RECORD_PROMPT_VARIABLE}` : AI_EMPLOYEE_CURRENT_RECORD_PROM
18557
18767
  }
18558
18768
  const props = {};
18559
18769
  const stepParams = {};
18770
+ const effectiveActionWorkContext = this.normalizeAIEmployeeEffectiveActionWorkContext(
18771
+ actionName,
18772
+ settings,
18773
+ currentProps,
18774
+ options
18775
+ );
18776
+ const previousActionWorkContext = this.normalizeAIEmployeeActionWorkContextForDedupIdentity(
18777
+ (_c = currentProps == null ? void 0 : currentProps.context) == null ? void 0 : _c.workContext,
18778
+ this.normalizeAIEmployeeDefaultActionWorkContextForSelfUid(options.selfUid)
18779
+ );
18780
+ const nextActionWorkContext = this.normalizeAIEmployeeWorkContextForDedupIdentity(effectiveActionWorkContext);
18560
18781
  if (effectiveUsername && (hasUsername || options.requireUsername)) {
18561
18782
  props.aiEmployee = {
18562
18783
  ...import_lodash.default.isPlainObject(currentProps.aiEmployee) ? import_lodash.default.cloneDeep(currentProps.aiEmployee) : {},
@@ -18570,28 +18791,25 @@ ${AI_EMPLOYEE_CURRENT_RECORD_PROMPT_VARIABLE}` : AI_EMPLOYEE_CURRENT_RECORD_PROM
18570
18791
  }
18571
18792
  props.auto = auto;
18572
18793
  }
18573
- if (Object.prototype.hasOwnProperty.call(settings, "workContext") || options.requireUsername) {
18574
- const rawWorkContext = Object.prototype.hasOwnProperty.call(settings, "workContext") ? settings.workContext : [{ type: "flow-model", target: "self" }];
18794
+ if (Array.isArray(effectiveActionWorkContext) && (Object.prototype.hasOwnProperty.call(settings, "workContext") || options.requireUsername || !import_lodash.default.isEqual((_d = currentProps == null ? void 0 : currentProps.context) == null ? void 0 : _d.workContext, effectiveActionWorkContext))) {
18575
18795
  props.context = {
18576
18796
  ...import_lodash.default.isPlainObject(currentProps.context) ? import_lodash.default.cloneDeep(currentProps.context) : {},
18577
- workContext: this.normalizeAIEmployeeWorkContext(actionName, rawWorkContext, {
18578
- selfUid: options.selfUid,
18579
- keyMap: options.keyMap,
18580
- path: "settings.workContext"
18581
- })
18797
+ workContext: import_lodash.default.cloneDeep(effectiveActionWorkContext)
18582
18798
  };
18583
18799
  }
18584
18800
  if (Object.prototype.hasOwnProperty.call(settings, "tasks")) {
18585
- const normalizedTasks = this.normalizeAIEmployeeTasks(
18586
- actionName,
18587
- settings.tasks,
18588
- this.readAIEmployeePersistedTasks(options.current),
18589
- {
18590
- selfUid: options.selfUid,
18591
- keyMap: options.keyMap,
18592
- path: "settings.tasks"
18593
- }
18801
+ const currentTasks = this.readAIEmployeePersistedTasks(options.current);
18802
+ const currentTasksForNormalization = this.rebaseAIEmployeeInheritedTaskWorkContext(
18803
+ currentTasks,
18804
+ previousActionWorkContext,
18805
+ nextActionWorkContext
18594
18806
  );
18807
+ const normalizedTasks = this.normalizeAIEmployeeTasks(actionName, settings.tasks, currentTasksForNormalization, {
18808
+ selfUid: options.selfUid,
18809
+ keyMap: options.keyMap,
18810
+ path: "settings.tasks",
18811
+ defaultWorkContext: effectiveActionWorkContext
18812
+ });
18595
18813
  const validation = options.promptContext && normalizedTasks.length ? await this.buildAIEmployeePromptValidationContext(
18596
18814
  actionName,
18597
18815
  [
@@ -18612,6 +18830,17 @@ ${AI_EMPLOYEE_CURRENT_RECORD_PROMPT_VARIABLE}` : AI_EMPLOYEE_CURRENT_RECORD_PROM
18612
18830
  const tasks = this.appendAIEmployeeCurrentRecordPromptVariableToTasks(normalizedTasks, validation);
18613
18831
  this.assertAIEmployeeTaskPromptVariablesAllowed(actionName, tasks, validation);
18614
18832
  import_lodash.default.merge(stepParams, this.buildAIEmployeeTaskStepParams(tasks));
18833
+ } else if (!options.skipExistingTaskWorkContextRebase && Object.prototype.hasOwnProperty.call(settings, "workContext") && !import_lodash.default.isEqual(previousActionWorkContext, nextActionWorkContext)) {
18834
+ const currentTasks = this.readAIEmployeePersistedTasks(options.current);
18835
+ const rebasedTasks = this.rebaseAIEmployeeInheritedTaskWorkContext(
18836
+ currentTasks,
18837
+ previousActionWorkContext,
18838
+ nextActionWorkContext
18839
+ );
18840
+ const tasks = this.withAIEmployeeTaskDefaultWorkContext(rebasedTasks, effectiveActionWorkContext);
18841
+ if (tasks.length) {
18842
+ import_lodash.default.merge(stepParams, this.buildAIEmployeeTaskStepParams(tasks));
18843
+ }
18615
18844
  }
18616
18845
  if (Object.prototype.hasOwnProperty.call(settings, "style") || options.requireUsername) {
18617
18846
  const style = Object.prototype.hasOwnProperty.call(settings, "style") ? settings.style : {};
@@ -18653,7 +18882,16 @@ ${AI_EMPLOYEE_CURRENT_RECORD_PROMPT_VARIABLE}` : AI_EMPLOYEE_CURRENT_RECORD_PROM
18653
18882
  transaction,
18654
18883
  includeAsyncNode: true
18655
18884
  });
18656
- if (["TableActionsColumnModel", "ListItemModel", "GridCardItemModel"].includes(String((parentNode == null ? void 0 : parentNode.use) || ""))) {
18885
+ return await this.resolveAIEmployeeActionSelfUidFromParentNode(parentNode, transaction) || parentUid;
18886
+ }
18887
+ async resolveAIEmployeeActionSelfUidFromParentNode(parentNode, transaction) {
18888
+ const parentUid = String((parentNode == null ? void 0 : parentNode.uid) || "").trim();
18889
+ if (!parentUid) {
18890
+ return "";
18891
+ }
18892
+ if (["TableActionsColumnModel", "ListItemModel", "GridCardItemModel", "CommentItemModel"].includes(
18893
+ String((parentNode == null ? void 0 : parentNode.use) || "")
18894
+ )) {
18657
18895
  const ownerUid = String((parentNode == null ? void 0 : parentNode.parentId) || "").trim() || ((parentNode == null ? void 0 : parentNode.uid) ? await this.locator.findParentUid(parentNode.uid, transaction).catch(() => "") : "");
18658
18896
  return ownerUid || parentUid;
18659
18897
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName.zh-CN": "前端流引擎",
5
5
  "description": "",
6
6
  "description.zh-CN": "",
7
- "version": "2.1.9",
7
+ "version": "2.1.11",
8
8
  "main": "./dist/server/index.js",
9
9
  "license": "Apache-2.0",
10
10
  "devDependencies": {
@@ -26,5 +26,5 @@
26
26
  "@nocobase/test": "2.x",
27
27
  "@nocobase/utils": "2.x"
28
28
  },
29
- "gitHead": "2b612d81c6f6115af75ea7b279384751af869510"
29
+ "gitHead": "1ccf891d837e21089f65f84b892407b34a0a0cb9"
30
30
  }