@nocobase/plugin-ai 2.1.0-beta.29 → 2.1.0-beta.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client-v2.d.ts +1 -0
- package/client-v2.js +1 -0
- package/dist/ai/docs/nocobase/ai/index.md +1 -1
- package/dist/ai/docs/nocobase/ai-employees/built-in/atlas.md +24 -0
- package/dist/ai/docs/nocobase/ai-employees/built-in/dara.md +22 -0
- package/dist/ai/docs/nocobase/ai-employees/built-in/dex.md +32 -0
- package/dist/ai/docs/nocobase/ai-employees/built-in/ellis.md +22 -0
- package/dist/ai/docs/nocobase/ai-employees/built-in/index.md +25 -0
- package/dist/ai/docs/nocobase/ai-employees/built-in/lexi.md +26 -0
- package/dist/ai/docs/nocobase/ai-employees/built-in/lina.md +142 -0
- package/dist/ai/docs/nocobase/ai-employees/built-in/nathan.md +36 -0
- package/dist/ai/docs/nocobase/ai-employees/built-in/vera.md +22 -0
- package/dist/ai/docs/nocobase/ai-employees/built-in/viz.md +25 -0
- package/dist/ai/docs/nocobase/ai-employees/features/built-in-employee.md +1 -29
- package/dist/ai/docs/nocobase/ai-employees/features/collaborate.md +17 -7
- package/dist/ai/docs/nocobase/ai-employees/features/enable-ai-employee.md +4 -4
- package/dist/ai/docs/nocobase/ai-employees/features/model-settings.md +87 -0
- package/dist/ai/docs/nocobase/ai-employees/index.md +1 -1
- package/dist/ai/docs/nocobase/ai-employees/scenarios/localization-hy-mt.md +241 -0
- package/dist/ai/docs/nocobase/ai-employees/workflow/nodes/employee/configuration.md +1 -1
- package/dist/ai/docs/nocobase/api/cli/api/dynamic.md +7 -0
- package/dist/ai/docs/nocobase/api/cli/api/resource/index.md +3 -0
- package/dist/ai/docs/nocobase/api/cli/app/down.md +7 -3
- package/dist/ai/docs/nocobase/api/cli/app/index.md +1 -1
- package/dist/ai/docs/nocobase/api/cli/app/logs.md +3 -0
- package/dist/ai/docs/nocobase/api/cli/app/restart.md +4 -0
- package/dist/ai/docs/nocobase/api/cli/app/start.md +4 -0
- package/dist/ai/docs/nocobase/api/cli/app/stop.md +3 -0
- package/dist/ai/docs/nocobase/api/cli/app/upgrade.md +5 -0
- package/dist/ai/docs/nocobase/api/cli/env/add.md +11 -3
- package/dist/ai/docs/nocobase/api/cli/env/auth.md +1 -1
- package/dist/ai/docs/nocobase/api/cli/env/current.md +29 -0
- package/dist/ai/docs/nocobase/api/cli/env/index.md +22 -4
- package/dist/ai/docs/nocobase/api/cli/env/info.md +1 -5
- package/dist/ai/docs/nocobase/api/cli/env/list.md +11 -6
- package/dist/ai/docs/nocobase/api/cli/env/remove.md +4 -1
- package/dist/ai/docs/nocobase/api/cli/env/status.md +52 -0
- package/dist/ai/docs/nocobase/api/cli/env/update.md +1 -1
- package/dist/ai/docs/nocobase/api/cli/env/use.md +11 -1
- package/dist/ai/docs/nocobase/api/cli/index.md +13 -1
- package/dist/ai/docs/nocobase/api/cli/license/activate.md +4 -1
- package/dist/ai/docs/nocobase/api/cli/license/id.md +4 -0
- package/dist/ai/docs/nocobase/api/cli/license/plugins/clean.md +5 -1
- package/dist/ai/docs/nocobase/api/cli/license/plugins/list.md +4 -0
- package/dist/ai/docs/nocobase/api/cli/license/plugins/sync.md +5 -1
- package/dist/ai/docs/nocobase/api/cli/license/status.md +4 -0
- package/dist/ai/docs/nocobase/api/cli/plugin/disable.md +4 -0
- package/dist/ai/docs/nocobase/api/cli/plugin/enable.md +4 -0
- package/dist/ai/docs/nocobase/api/cli/plugin/list.md +4 -0
- package/dist/ai/docs/nocobase/api/cli/session/id.md +28 -0
- package/dist/ai/docs/nocobase/api/cli/session/index.md +41 -0
- package/dist/ai/docs/nocobase/api/cli/session/remove.md +35 -0
- package/dist/ai/docs/nocobase/api/cli/session/setup.md +47 -0
- package/dist/ai/docs/nocobase/interface-builder/actions/types/js-action.md +1 -1
- package/dist/ai/docs/nocobase/interface-builder/actions/types/js-item.md +1 -1
- package/dist/ai/docs/nocobase/interface-builder/blocks/other-blocks/js-block.md +1 -1
- package/dist/ai/docs/nocobase/interface-builder/fields/specific/js-column.md +1 -1
- package/dist/ai/docs/nocobase/interface-builder/fields/specific/js-field.md +1 -1
- package/dist/ai/docs/nocobase/interface-builder/fields/specific/js-item.md +1 -1
- package/dist/ai/docs/nocobase/security/guide.md +13 -1
- package/dist/ai/docs/nocobase/system-management/localization/index.md +25 -1
- package/dist/client/119.c6bf8c6433167d81.js +10 -0
- package/dist/client/228.b4b709f93b86b6b9.js +10 -0
- package/dist/client/462.1708385b148779cd.js +10 -0
- package/dist/client/{486.afbed6b132b3c0dd.js → 486.dcac8f3fcec19c33.js} +1 -1
- package/dist/client/{559.39872901b9053629.js → 559.585f80c3bcea0bed.js} +1 -1
- package/dist/client/597.b0d64948d74cf6cb.js +10 -0
- package/dist/client/646.b0ed728921b007d4.js +10 -0
- package/dist/client/711.92cd94681fde7e05.js +10 -0
- package/dist/client/768.5177bff46ae71a5b.js +10 -0
- package/dist/client/792.abb57765453bcbcc.js +10 -0
- package/dist/client/820.f72ef2462b61d812.js +10 -0
- package/dist/client/927.d95c74ebb8fd51c9.js +10 -0
- package/dist/client/ai-employees/admin/ModelSettings.d.ts +10 -0
- package/dist/client/ai-employees/admin/hooks.d.ts +1 -1
- package/dist/client/ai-employees/avatars.d.ts +9 -783
- package/dist/client/ai-employees/chatbox/conversations/ConversationsList.d.ts +1 -15
- package/dist/client/ai-employees/chatbox/conversations/WorkflowTasksList.d.ts +1 -21
- package/dist/client/ai-employees/chatbox/hooks/useChat.d.ts +125 -0
- package/dist/client/ai-employees/chatbox/hooks/useChatBoxActions.d.ts +1 -1
- package/dist/client/ai-employees/chatbox/hooks/useChatConversationActions.d.ts +13 -1
- package/dist/client/ai-employees/chatbox/hooks/useChatMessageActions.d.ts +8 -8
- package/dist/client/ai-employees/chatbox/model.d.ts +6 -3
- package/dist/client/ai-employees/chatbox/stores/chat-conversations.d.ts +4 -0
- package/dist/client/ai-employees/chatbox/stores/chat-messages.d.ts +77 -50
- package/dist/client/ai-employees/chatbox/stores/chat-tool-call.d.ts +24 -16
- package/dist/client/ai-employees/types.d.ts +24 -0
- package/dist/client/features/vector-database-provider.d.ts +1 -1
- package/dist/client/index.d.ts +2 -0
- package/dist/client/index.js +3 -3
- package/dist/client/llm-services/component/EnabledModelsSelect.d.ts +1 -14
- package/dist/client-v2/ai-employees/AIEmployeeShortcut.d.ts +21 -0
- package/dist/client-v2/ai-employees/ProfileCard.d.ts +17 -0
- package/dist/client-v2/ai-employees/avatars.d.ts +783 -0
- package/dist/client-v2/ai-employees/types.d.ts +20 -0
- package/dist/client-v2/index.d.ts +17 -0
- package/dist/client-v2/index.js +10 -0
- package/dist/client-v2/llm-services/model-label.d.ts +22 -0
- package/dist/collections/ai-employees.d.ts +2 -1
- package/dist/collections/ai-employees.js +1 -1
- package/dist/externalVersion.js +17 -16
- package/dist/locale/en-US.json +16 -1
- package/dist/locale/zh-CN.json +16 -1
- package/dist/node_modules/@langchain/xai/package.json +1 -1
- package/dist/node_modules/fs-extra/package.json +1 -1
- package/dist/node_modules/jsonrepair/package.json +1 -1
- package/dist/node_modules/just-bash/package.json +1 -1
- package/dist/node_modules/nodejs-snowflake/package.json +1 -1
- package/dist/node_modules/openai/package.json +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/ai-employees/ai-conversations.d.ts +4 -1
- package/dist/server/ai-employees/ai-conversations.js +44 -4
- package/dist/server/ai-employees/ai-employee.d.ts +31 -15
- package/dist/server/ai-employees/ai-employee.js +205 -52
- package/dist/server/ai-employees/ai-employees-manager.d.ts +4 -0
- package/dist/server/ai-employees/ai-employees-manager.js +41 -0
- package/dist/server/ai-employees/ai-knowledge-base.js +7 -7
- package/dist/server/ai-employees/middleware/conversation.d.ts +1 -0
- package/dist/server/ai-employees/middleware/conversation.js +15 -11
- package/dist/server/ai-employees/sub-agents/dispatcher.js +2 -4
- package/dist/server/ai-employees/utils.d.ts +6 -3
- package/dist/server/ai-employees/utils.js +7 -1
- package/dist/server/collections/ai-conversations.js +6 -0
- package/dist/server/features/knowledge-base.d.ts +3 -2
- package/dist/server/index.d.ts +2 -0
- package/dist/server/index.js +3 -0
- package/dist/server/llm-providers/common/reasoning.d.ts +2 -0
- package/dist/server/llm-providers/common/reasoning.js +15 -2
- package/dist/server/llm-providers/dashscope.d.ts +2 -1
- package/dist/server/llm-providers/dashscope.js +39 -0
- package/dist/server/llm-providers/deepseek.js +2 -0
- package/dist/server/llm-providers/provider.d.ts +15 -1
- package/dist/server/llm-providers/provider.js +21 -2
- package/dist/server/manager/ai-chat-conversation.js +3 -4
- package/dist/server/manager/ai-manager.d.ts +17 -0
- package/dist/server/manager/ai-manager.js +65 -0
- package/dist/server/manager/llm-stream-manager.d.ts +37 -0
- package/dist/server/manager/llm-stream-manager.js +142 -0
- package/dist/server/migrations/20260407170416-ai-employee-knowledge-base-add-key.d.ts +14 -0
- package/dist/server/migrations/20260407170416-ai-employee-knowledge-base-add-key.js +61 -0
- package/dist/server/plugin.d.ts +2 -0
- package/dist/server/plugin.js +3 -0
- package/dist/server/resource/ai.js +1 -41
- package/dist/server/resource/aiConversations.d.ts +8 -0
- package/dist/server/resource/aiConversations.js +141 -10
- package/dist/server/resource/aiEmployees.js +32 -1
- package/dist/server/types/knowledge-base.type.d.ts +3 -2
- package/dist/server/workflow/nodes/employee/index.js +4 -2
- package/package.json +2 -2
- package/dist/client/119.78774f3ad953af49.js +0 -10
- package/dist/client/228.a3df2921c8beb766.js +0 -10
- package/dist/client/343.6f36d97dd122c5b6.js +0 -10
- package/dist/client/597.aa363881a325b5c0.js +0 -10
- package/dist/client/646.217a40387efbd163.js +0 -10
- package/dist/client/711.266b8f1c520d467a.js +0 -10
- package/dist/client/768.973ce32e15099a48.js +0 -10
- package/dist/client/792.2e48eab4767d662a.js +0 -10
- package/dist/client/820.6a26239ea96c075a.js +0 -10
- package/dist/client/927.ff5cd05b14901ae6.js +0 -10
|
@@ -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-
|
|
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-13T05:25:50.094Z"}
|
|
@@ -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-
|
|
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-13T05:25:52.727Z"}
|
|
@@ -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-
|
|
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-13T05:25:51.099Z"}
|
|
@@ -13,6 +13,7 @@ export type AIConversationsOptions = {
|
|
|
13
13
|
systemMessage?: unknown;
|
|
14
14
|
skillSettings?: unknown;
|
|
15
15
|
conversationSettings?: unknown;
|
|
16
|
+
modelSettings?: unknown;
|
|
16
17
|
[key: string]: unknown;
|
|
17
18
|
};
|
|
18
19
|
export type AIConversationFilterParams = {
|
|
@@ -42,6 +43,7 @@ export type GetAIConversationMessagesParams = {
|
|
|
42
43
|
sessionId: string;
|
|
43
44
|
cursor?: string;
|
|
44
45
|
paginate?: boolean;
|
|
46
|
+
updateRead?: boolean;
|
|
45
47
|
};
|
|
46
48
|
export type ParsedMessageRow = AIMessage & Model;
|
|
47
49
|
export type GetAIConversationMessagesResult = {
|
|
@@ -49,6 +51,7 @@ export type GetAIConversationMessagesResult = {
|
|
|
49
51
|
hasMore?: boolean;
|
|
50
52
|
cursor?: string | null;
|
|
51
53
|
};
|
|
54
|
+
export declare const registerAIConversationReadNotification: (plugin: PluginAIServer) => void;
|
|
52
55
|
export declare class AIConversationsManager {
|
|
53
56
|
protected plugin: PluginAIServer;
|
|
54
57
|
constructor(plugin: PluginAIServer);
|
|
@@ -58,7 +61,7 @@ export declare class AIConversationsManager {
|
|
|
58
61
|
sessionId: string;
|
|
59
62
|
userId?: string;
|
|
60
63
|
}): Promise<any>;
|
|
61
|
-
getMessages({ userId, sessionId, cursor, paginate, }: GetAIConversationMessagesParams): Promise<GetAIConversationMessagesResult>;
|
|
64
|
+
getMessages({ userId, sessionId, cursor, paginate, updateRead, }: GetAIConversationMessagesParams): Promise<GetAIConversationMessagesResult>;
|
|
62
65
|
getUserDecisions(messageId: string): Promise<{
|
|
63
66
|
interruptId?: string;
|
|
64
67
|
decisions: UserDecision[];
|
|
@@ -26,11 +26,36 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
26
26
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
27
|
var ai_conversations_exports = {};
|
|
28
28
|
__export(ai_conversations_exports, {
|
|
29
|
-
AIConversationsManager: () => AIConversationsManager
|
|
29
|
+
AIConversationsManager: () => AIConversationsManager,
|
|
30
|
+
registerAIConversationReadNotification: () => registerAIConversationReadNotification
|
|
30
31
|
});
|
|
31
32
|
module.exports = __toCommonJS(ai_conversations_exports);
|
|
32
33
|
var import_database = require("@nocobase/database");
|
|
33
34
|
var import_utils = require("../utils");
|
|
35
|
+
const registerAIConversationReadNotification = (plugin) => {
|
|
36
|
+
plugin.db.on("aiConversations.beforeSave", async (model, options) => {
|
|
37
|
+
var _a;
|
|
38
|
+
if (model.isNewRecord || !model.changed("read")) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const values = model.toJSON();
|
|
42
|
+
if (values.from !== "main-agent" || values.category !== "chat") {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
(_a = options.transaction) == null ? void 0 : _a.afterCommit(async () => {
|
|
46
|
+
plugin.app.emit("ws:sendToUser", {
|
|
47
|
+
userId: values.userId,
|
|
48
|
+
message: {
|
|
49
|
+
type: "ai-conversations:read",
|
|
50
|
+
payload: {
|
|
51
|
+
sessionId: values.sessionId,
|
|
52
|
+
read: values.read
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
};
|
|
34
59
|
class AIConversationsManager {
|
|
35
60
|
constructor(plugin) {
|
|
36
61
|
this.plugin = plugin;
|
|
@@ -65,7 +90,7 @@ class AIConversationsManager {
|
|
|
65
90
|
if (!conversation) {
|
|
66
91
|
throw new Error("invalid sessionId");
|
|
67
92
|
}
|
|
68
|
-
const { systemMessage, skillSettings, conversationSettings } = inputOptions ?? {};
|
|
93
|
+
const { systemMessage, skillSettings, conversationSettings, modelSettings } = inputOptions ?? {};
|
|
69
94
|
const options = conversation.options ?? {};
|
|
70
95
|
if (systemMessage) {
|
|
71
96
|
options["systemMessage"] = systemMessage;
|
|
@@ -76,6 +101,9 @@ class AIConversationsManager {
|
|
|
76
101
|
if (conversationSettings) {
|
|
77
102
|
options["conversationSettings"] = conversationSettings;
|
|
78
103
|
}
|
|
104
|
+
if (modelSettings) {
|
|
105
|
+
options["modelSettings"] = modelSettings;
|
|
106
|
+
}
|
|
79
107
|
const values = { options };
|
|
80
108
|
if (title) {
|
|
81
109
|
values.title = title;
|
|
@@ -124,7 +152,8 @@ class AIConversationsManager {
|
|
|
124
152
|
userId,
|
|
125
153
|
sessionId,
|
|
126
154
|
cursor,
|
|
127
|
-
paginate = true
|
|
155
|
+
paginate = true,
|
|
156
|
+
updateRead = false
|
|
128
157
|
}) {
|
|
129
158
|
const conversation = await this.getConversation({
|
|
130
159
|
sessionId,
|
|
@@ -133,6 +162,16 @@ class AIConversationsManager {
|
|
|
133
162
|
if (!conversation) {
|
|
134
163
|
throw new Error("invalid sessionId");
|
|
135
164
|
}
|
|
165
|
+
if (updateRead) {
|
|
166
|
+
await this.aiConversationsRepo.update({
|
|
167
|
+
values: {
|
|
168
|
+
read: true
|
|
169
|
+
},
|
|
170
|
+
filter: {
|
|
171
|
+
sessionId
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
}
|
|
136
175
|
const pageSize = 10;
|
|
137
176
|
const maxLimit = 200;
|
|
138
177
|
const messageRepository = this.plugin.db.getRepository("aiConversations.messages", sessionId);
|
|
@@ -321,5 +360,6 @@ class AIConversationsManager {
|
|
|
321
360
|
}
|
|
322
361
|
// Annotate the CommonJS export names for ESM import in node:
|
|
323
362
|
0 && (module.exports = {
|
|
324
|
-
AIConversationsManager
|
|
363
|
+
AIConversationsManager,
|
|
364
|
+
registerAIConversationReadNotification
|
|
325
365
|
});
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
import { Model, Transaction } from '@nocobase/database';
|
|
10
10
|
import { LLMProvider } from '../llm-providers/provider';
|
|
11
11
|
import { AIChatContext, AIChatConversation, AIMessageInput, AIToolCall, UserDecision } from '../types';
|
|
12
|
+
import { DocumentSegmentedWithScore } from '../features';
|
|
13
|
+
import { KnowledgeBaseGroup } from '../types';
|
|
12
14
|
import { ToolsEntry } from '@nocobase/ai';
|
|
13
15
|
import { AIToolMessage } from '../types/ai-message.type';
|
|
14
16
|
import { Context } from '@nocobase/actions';
|
|
@@ -39,14 +41,19 @@ export declare class AIEmployee {
|
|
|
39
41
|
private plugin;
|
|
40
42
|
private db;
|
|
41
43
|
private ctx;
|
|
42
|
-
private systemMessage
|
|
44
|
+
private systemMessage?;
|
|
43
45
|
private protocol;
|
|
44
46
|
private webSearch?;
|
|
45
47
|
private model?;
|
|
46
48
|
private legacy?;
|
|
47
49
|
private tools;
|
|
48
50
|
private inWorkflow?;
|
|
51
|
+
private streamCached;
|
|
49
52
|
constructor({ ctx, employee, sessionId, systemMessage, skillSettings, webSearch, model, legacy, from, tools, }: AIEmployeeOptions);
|
|
53
|
+
private get chatSettings();
|
|
54
|
+
private get systemPromptMode();
|
|
55
|
+
private areSkillsEnabled;
|
|
56
|
+
private areToolsEnabled;
|
|
50
57
|
getFormatMessages(userMessages: AIMessageInput[]): Promise<{
|
|
51
58
|
role: "user" | "assistant" | "tool" | "system";
|
|
52
59
|
content: any;
|
|
@@ -99,6 +106,7 @@ export declare class AIEmployee {
|
|
|
99
106
|
processChatStream(stream: any, options: {
|
|
100
107
|
signal: AbortSignal;
|
|
101
108
|
providerName: string;
|
|
109
|
+
llmService?: string;
|
|
102
110
|
model: string;
|
|
103
111
|
provider: LLMProvider;
|
|
104
112
|
allowEmpty?: boolean;
|
|
@@ -106,7 +114,14 @@ export declare class AIEmployee {
|
|
|
106
114
|
}): Promise<void>;
|
|
107
115
|
private handleInterruptedToolCalls;
|
|
108
116
|
getEmployeeDataSourceContext(): string;
|
|
109
|
-
getSystemPrompt(userMessages: AIMessageInput[]): Promise<
|
|
117
|
+
getSystemPrompt(userMessages: AIMessageInput[]): Promise<any>;
|
|
118
|
+
retrieveKnowledgeBase(userMessage: AIMessageInput): Promise<DocumentSegmentedWithScore[]>;
|
|
119
|
+
isEnabledKnowledgeBase(): boolean;
|
|
120
|
+
getAIEmployeeKnowledgeBaseConfig(): {
|
|
121
|
+
topK: number;
|
|
122
|
+
score: string;
|
|
123
|
+
};
|
|
124
|
+
getKnowledgeBaseGroup(): Promise<KnowledgeBaseGroup[]>;
|
|
110
125
|
initToolCall(transaction: Transaction, messageId: string, toolCalls: {
|
|
111
126
|
id: string;
|
|
112
127
|
name: string;
|
|
@@ -162,30 +177,31 @@ export declare class AIEmployee {
|
|
|
162
177
|
}
|
|
163
178
|
export declare class ChatStreamProtocol {
|
|
164
179
|
private readonly streamConsumer;
|
|
180
|
+
private readonly onWrite?;
|
|
165
181
|
private _statistics;
|
|
166
|
-
constructor(streamConsumer: StreamConsumer);
|
|
167
|
-
static fromContext(ctx: Context): ChatStreamProtocol;
|
|
182
|
+
constructor(streamConsumer: StreamConsumer, onWrite?: (chunk: string) => Promise<void>);
|
|
183
|
+
static fromContext(ctx: Context, onWrite?: (chunk: string) => Promise<void>): ChatStreamProtocol;
|
|
168
184
|
with(conversation: {
|
|
169
185
|
sessionId: string;
|
|
170
186
|
from: string;
|
|
171
187
|
username: string;
|
|
172
188
|
}): {
|
|
173
|
-
startStream: () => void
|
|
174
|
-
endStream: () => void
|
|
175
|
-
subAgentCompleted: () => void
|
|
176
|
-
newMessage: (content?: unknown) => void
|
|
177
|
-
content: (content: string) => void
|
|
189
|
+
startStream: () => Promise<void>;
|
|
190
|
+
endStream: () => Promise<void>;
|
|
191
|
+
subAgentCompleted: () => Promise<void>;
|
|
192
|
+
newMessage: (content?: unknown) => Promise<void>;
|
|
193
|
+
content: (content: string) => Promise<void>;
|
|
178
194
|
webSearch: (content: {
|
|
179
195
|
type: string;
|
|
180
196
|
query: string;
|
|
181
|
-
}[]) => void
|
|
197
|
+
}[]) => Promise<void>;
|
|
182
198
|
reasoning: (content: {
|
|
183
199
|
status: string;
|
|
184
200
|
content: string;
|
|
185
|
-
}) => void
|
|
186
|
-
stopReasoning: () => void
|
|
187
|
-
toolCallChunks: (content: unknown) => void
|
|
188
|
-
toolCalls: (content: unknown) => void
|
|
201
|
+
}) => Promise<void>;
|
|
202
|
+
stopReasoning: () => Promise<void>;
|
|
203
|
+
toolCallChunks: (content: unknown) => Promise<void>;
|
|
204
|
+
toolCalls: (content: unknown) => Promise<void>;
|
|
189
205
|
toolCallStatus: ({ toolCall, invokeStatus, status, invokeStartTime, invokeEndTime, content, interruptAction, }: {
|
|
190
206
|
toolCall: {
|
|
191
207
|
messageId: string;
|
|
@@ -203,7 +219,7 @@ export declare class ChatStreamProtocol {
|
|
|
203
219
|
description: string;
|
|
204
220
|
allowedDecisions: string[];
|
|
205
221
|
};
|
|
206
|
-
}) => void
|
|
222
|
+
}) => Promise<void>;
|
|
207
223
|
};
|
|
208
224
|
get statistics(): {
|
|
209
225
|
sent: number;
|