@nocobase/plugin-ai 2.1.0-beta.14 → 2.1.0-beta.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai/ai-employees/atlas/index.d.ts +10 -0
- package/dist/{server/ai-employees/built-in/ai-coding/prompt.js → ai/ai-employees/atlas/index.js} +29 -20
- package/dist/ai/ai-employees/atlas/prompt.md +84 -0
- package/dist/ai/ai-employees/dara.d.ts +10 -0
- package/dist/{server/ai-employees/built-in/data-visualization/prompt.js → ai/ai-employees/dara.js} +21 -13
- package/dist/ai/ai-employees/dex.d.ts +10 -0
- package/dist/{server/ai-employees/built-in/data-organizer/prompt.js → ai/ai-employees/dex.js} +15 -7
- package/dist/ai/ai-employees/ellis.d.ts +10 -0
- package/dist/{server/ai-employees/built-in/email-assistant/prompt.js → ai/ai-employees/ellis.js} +19 -11
- package/dist/ai/ai-employees/lexi.d.ts +10 -0
- package/dist/{server/ai-employees/built-in/translator/prompt.js → ai/ai-employees/lexi.js} +15 -7
- package/dist/ai/ai-employees/vera.d.ts +10 -0
- package/dist/{server/ai-employees/built-in/research-analyst/prompt.js → ai/ai-employees/vera.js} +16 -8
- package/dist/ai/ai-employees/viz.d.ts +10 -0
- package/dist/{server/ai-employees/built-in/insights-analyst/prompt.js → ai/ai-employees/viz.js} +15 -7
- package/dist/ai/skills/business-analysis-report/SKILLS.md +88 -0
- package/dist/{server/ai-employees/built-in/ai-coding/prompt.d.ts → ai/skills/business-analysis-report/tools/businessReportGenerator.d.ts} +1 -3
- package/dist/ai/skills/business-analysis-report/tools/businessReportGenerator.js +98 -0
- package/dist/ai/skills/document-search/SKILLS.md +69 -0
- package/dist/ai/tools/chartGenerator.js +15 -3
- package/dist/ai/tools/formFiller.js +13 -2
- package/dist/{server/ai-employees/built-in/data-modeling/prompt.d.ts → ai/tools/getSkill.d.ts} +1 -3
- package/dist/{server/ai-employees/built-in/data-modeling/index.js → ai/tools/getSkill.js} +39 -32
- package/dist/{server/ai-employees/built-in/data-organizer/prompt.d.ts → ai/tools/knowledge-base-retrieve.d.ts} +1 -3
- package/dist/ai/tools/knowledge-base-retrieve.js +94 -0
- package/dist/{server/ai-employees/built-in/data-visualization/prompt.d.ts → ai/tools/sub-agents/dispatch-sub-agent-task.d.ts} +1 -3
- package/dist/ai/tools/sub-agents/dispatch-sub-agent-task.js +108 -0
- package/dist/ai/tools/sub-agents/get-ai-employee.d.ts +10 -0
- package/dist/{server/ai-employees/built-in/translator/profile.js → ai/tools/sub-agents/get-ai-employee.js} +28 -21
- package/dist/ai/tools/sub-agents/list-ai-employees.d.ts +10 -0
- package/dist/{server/ai-employees/built-in/email-assistant/profile.js → ai/tools/sub-agents/list-ai-employees.js} +25 -21
- package/dist/ai/tools/sub-agents/shared.d.ts +33 -0
- package/dist/ai/tools/sub-agents/shared.js +169 -0
- package/dist/ai/tools/suggestions.js +15 -4
- package/dist/client/170.d98eacdc00d9d527.js +10 -0
- package/dist/client/228.b18148eb1009d2fb.js +10 -0
- package/dist/client/280.029428b83d62155f.js +10 -0
- package/dist/client/290.0888139e33c9b7cb.js +10 -0
- package/dist/client/{524.954f96ec4fc2fd7a.js → 331.d547c95410476a69.js} +1 -1
- package/dist/client/343.83f7d96664e4e038.js +10 -0
- package/dist/client/406.15c09d98faa2ccf1.js +10 -0
- package/dist/client/428.e9f38da3b0d8b498.js +10 -0
- package/dist/client/486.77c26e2e7f8daf28.js +10 -0
- package/dist/client/502.2b4a51e0a8122e52.js +10 -0
- package/dist/client/525.33a9c8ec28be4ec4.js +10 -0
- package/dist/client/559.133d286a0a0a1d93.js +10 -0
- package/dist/client/{91.90e7098b7fbd5d00.js → 561.776886c5308e3c26.js} +1 -1
- package/dist/client/580.e75f97fb883ad042.js +10 -0
- package/dist/client/597.aa363881a325b5c0.js +10 -0
- package/dist/client/604.de96f3ec4d471afd.js +10 -0
- package/dist/client/614.aa766080f6b99aab.js +10 -0
- package/dist/client/646.ef9d7c2ea8641044.js +10 -0
- package/dist/client/687.224e569a99cae4bb.js +10 -0
- package/dist/client/699.57c0a1acb723202a.js +10 -0
- package/dist/client/711.266b8f1c520d467a.js +10 -0
- package/dist/client/758.a9741e81911e53c3.js +10 -0
- package/dist/client/768.973ce32e15099a48.js +10 -0
- package/dist/client/792.ae8ad1fcae9fd974.js +10 -0
- package/dist/client/820.6a26239ea96c075a.js +10 -0
- package/dist/client/832.0cf69e3f43c320b2.js +10 -0
- package/dist/client/927.ff5cd05b14901ae6.js +10 -0
- package/dist/client/ai-employees/admin/SkillSettings.d.ts +7 -5
- package/dist/client/ai-employees/admin/ToolsSettings.d.ts +17 -0
- package/dist/client/ai-employees/admin/mcp/MCPSettings.d.ts +10 -0
- package/dist/client/ai-employees/admin/mcp/MCPToolsList.d.ts +19 -0
- package/dist/client/ai-employees/admin/mcp/context.d.ts +15 -0
- package/dist/client/ai-employees/admin/mcp/schemas.d.ts +1286 -0
- package/dist/client/ai-employees/built-in/utils.d.ts +1 -0
- package/dist/client/ai-employees/business-report/tools/index.d.ts +10 -0
- package/dist/client/ai-employees/business-report/ui/BusinessReportCard.d.ts +12 -0
- package/dist/client/ai-employees/business-report/ui/BusinessReportModal.d.ts +17 -0
- package/dist/client/ai-employees/business-report/ui/report-utils.d.ts +38 -0
- package/dist/client/ai-employees/chatbox/AIEmployeeSwitch.d.ts +3 -2
- package/dist/client/ai-employees/chatbox/HintMessageHeader.d.ts +10 -0
- package/dist/client/ai-employees/chatbox/ModelSwitcher.d.ts +3 -1
- package/dist/client/ai-employees/chatbox/SearchSwitch.d.ts +3 -1
- package/dist/client/ai-employees/chatbox/Upload.d.ts +3 -1
- package/dist/client/ai-employees/chatbox/conversations/ConversationsList.d.ts +27 -0
- package/dist/client/ai-employees/chatbox/conversations/WorkflowTasksList.d.ts +31 -0
- package/dist/client/ai-employees/chatbox/conversations/common.d.ts +43 -0
- package/dist/{server/document-loader/loader.worker.d.ts → client/ai-employees/chatbox/conversations/index.d.ts} +1 -1
- package/dist/client/ai-employees/chatbox/hooks/useChatBoxActions.d.ts +5 -3
- package/dist/client/ai-employees/chatbox/hooks/useWorkflowTasks.d.ts +24 -0
- package/dist/client/ai-employees/chatbox/markdown/ECharts.d.ts +1 -2
- package/dist/client/ai-employees/chatbox/markdown/Markdown.d.ts +1 -1
- package/dist/client/ai-employees/chatbox/roles.d.ts +1 -0
- package/dist/client/ai-employees/chatbox/stores/chat-box.d.ts +8 -0
- package/dist/client/ai-employees/chatbox/stores/chat-conversations.d.ts +4 -0
- package/dist/client/ai-employees/chatbox/stores/chat-messages.d.ts +8 -0
- package/dist/client/ai-employees/chatbox/stores/workflow-tasks.d.ts +41 -0
- package/dist/client/ai-employees/chatbox/utils.d.ts +17 -7
- package/dist/client/ai-employees/sub-agents/tools/index.d.ts +10 -0
- package/dist/client/ai-employees/sub-agents/ui/SubAgentDispatchCard.d.ts +21 -0
- package/dist/client/ai-employees/types.d.ts +24 -4
- package/dist/{server/ai-employees/built-in/ai-coding/document/example/js-filter → client/ai-employees/workflow-tasks/tools}/index.d.ts +2 -7
- package/dist/client/ai-employees/workflow-tasks/ui/WorkflowTaskOutputCard.d.ts +11 -0
- package/dist/client/components/ListCollapse.d.ts +28 -0
- package/dist/client/index.js +7 -7
- package/dist/client/manager/ai-manager.d.ts +4 -23
- package/dist/client/repositories/AIConfigRepository.d.ts +11 -3
- package/dist/client/workflow/nodes/employee/components/AIEmployeeSelect.d.ts +10 -0
- package/dist/client/workflow/nodes/employee/components/assigness.d.ts +11 -0
- package/dist/client/workflow/nodes/employee/components/file-inputs.d.ts +10 -0
- package/dist/client/workflow/nodes/employee/components/message-inputs.d.ts +12 -0
- package/dist/client/workflow/nodes/employee/components/model-options.d.ts +10 -0
- package/dist/client/workflow/nodes/employee/components/skill-settings.d.ts +10 -0
- package/dist/client/workflow/nodes/employee/components/structured-output.d.ts +10 -0
- package/dist/client/workflow/nodes/employee/components/users-select.d.ts +15 -0
- package/dist/client/workflow/nodes/employee/components/web-search-options.d.ts +10 -0
- package/dist/client/workflow/nodes/employee/configuration.d.ts +12 -0
- package/dist/client/workflow/nodes/employee/flow-models/feedback.d.ts +13 -0
- package/dist/client/workflow/nodes/employee/flow-models/task.d.ts +13 -0
- package/dist/client/workflow/nodes/employee/index.d.ts +7 -31
- package/dist/collections/ai-employees.js +2 -1
- package/dist/collections/ai-mcp-clients.d.ts +51 -0
- package/dist/collections/ai-mcp-clients.js +111 -0
- package/dist/externalVersion.js +17 -16
- package/dist/locale/en-US.json +136 -8
- package/dist/locale/zh-CN.json +138 -9
- package/dist/node_modules/fast-glob/out/index.js +8 -8
- package/dist/node_modules/fast-glob/package.json +1 -1
- package/dist/node_modules/flexsearch/dist/flexsearch.bundle.min.js +2 -2
- package/dist/node_modules/flexsearch/package.json +1 -1
- package/dist/node_modules/fs-extra/lib/index.js +1 -1
- package/dist/node_modules/fs-extra/package.json +1 -1
- package/dist/node_modules/nodejs-snowflake/nodejs_snowflake.js +1 -1
- package/dist/node_modules/nodejs-snowflake/package.json +1 -1
- package/dist/node_modules/openai/index.js +1 -1
- package/dist/node_modules/openai/package.json +1 -1
- package/dist/node_modules/zod/index.cjs +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/ai-employees/ai-conversations.d.ts +70 -0
- package/dist/server/ai-employees/ai-conversations.js +325 -0
- package/dist/server/ai-employees/ai-employee.d.ts +100 -19
- package/dist/server/ai-employees/ai-employee.js +484 -261
- package/dist/server/ai-employees/ai-knowledge-base.d.ts +28 -0
- package/dist/server/ai-employees/ai-knowledge-base.js +167 -0
- package/dist/server/ai-employees/middleware/conversation.d.ts +2 -0
- package/dist/server/ai-employees/middleware/conversation.js +38 -5
- package/dist/server/ai-employees/middleware/index.d.ts +2 -0
- package/dist/server/ai-employees/middleware/index.js +5 -1
- package/dist/server/ai-employees/middleware/skill-tools.d.ts +12 -0
- package/dist/server/ai-employees/middleware/skill-tools.js +88 -0
- package/dist/server/ai-employees/middleware/tools.js +37 -10
- package/dist/server/ai-employees/middleware/workflow-history.d.ts +22 -0
- package/dist/server/ai-employees/middleware/workflow-history.js +173 -0
- package/dist/server/ai-employees/prompts.d.ts +16 -1
- package/dist/server/ai-employees/prompts.js +37 -1
- package/dist/server/ai-employees/sub-agents/dispatcher.d.ts +36 -0
- package/dist/server/ai-employees/sub-agents/dispatcher.js +225 -0
- package/dist/server/ai-employees/sub-agents/index.d.ts +9 -0
- package/dist/server/{migrations/20250923221107-setup-build-in.js → ai-employees/sub-agents/index.js} +9 -13
- package/dist/server/ai-employees/templates/form-assistant.d.ts +2 -2
- package/dist/server/ai-employees/templates/form-assistant.js +2 -2
- package/dist/server/ai-employees/utils.js +2 -2
- package/dist/server/collections/ai-conversations.js +18 -0
- package/dist/server/{ai-employees/built-in/ai-coding/document/example/js-column/js_columns_for_contacts_en.d.ts → collections/ai-mcp-clients.d.ts} +1 -4
- package/dist/server/{ai-employees/built-in/nocobase-assistant/index.js → collections/ai-mcp-clients.js} +12 -13
- package/dist/server/{ai-employees/built-in/ai-coding/document/basic/flow-resource.d.ts → collections/ai-skills.d.ts} +1 -4
- package/dist/server/collections/ai-skills.js +73 -0
- package/dist/server/{ai-employees/built-in/ai-coding/document/example/js-column/js_columns_for_opportunities_en.d.ts → collections/ai-workflow-tasks.d.ts} +1 -4
- package/dist/server/collections/ai-workflow-tasks.js +112 -0
- package/dist/server/{ai-employees/built-in/ai-coding/document/example/js-column/js_columns_for_accounts_en.d.ts → collections/users-ai-workflow-tasks.d.ts} +1 -4
- package/dist/server/collections/users-ai-workflow-tasks.js +44 -0
- package/dist/server/document-loader/constants.d.ts +1 -2
- package/dist/server/document-loader/constants.js +6 -1
- package/dist/server/document-loader/loader.d.ts +0 -1
- package/dist/server/document-loader/loader.js +2 -55
- package/dist/server/document-loader/types.d.ts +0 -1
- package/dist/server/llm-providers/anthropic.d.ts +1 -0
- package/dist/server/llm-providers/anthropic.js +2 -1
- package/dist/server/llm-providers/dashscope.d.ts +1 -0
- package/dist/server/llm-providers/deepseek.d.ts +1 -0
- package/dist/server/llm-providers/google-genai.d.ts +1 -0
- package/dist/server/llm-providers/google-genai.js +2 -1
- package/dist/server/llm-providers/kimi/provider.d.ts +1 -0
- package/dist/server/llm-providers/openai/responses.d.ts +1 -0
- package/dist/server/llm-providers/openai/responses.js +2 -1
- package/dist/server/llm-providers/provider.d.ts +1 -10
- package/dist/server/llm-providers/provider.js +4 -35
- package/dist/server/manager/ai-coding-manager.d.ts +1 -2
- package/dist/server/manager/ai-coding-manager.js +0 -41
- package/dist/server/manager/ai-context-datasource-manager.js +30 -1
- package/dist/server/manager/built-in-manager.d.ts +2 -4
- package/dist/server/manager/built-in-manager.js +8 -118
- package/dist/server/migrations/20260306000001-migrate-skill-settings-tools.js +68 -0
- package/dist/server/migrations/20260319000000-add-ai-conversations-from.d.ts +14 -0
- package/dist/server/migrations/20260319000000-add-ai-conversations-from.js +63 -0
- package/dist/server/migrations/20260424000000-remove-cole-ai-employee.d.ts +14 -0
- package/dist/server/{ai-employees/built-in/email-assistant/index.js → migrations/20260424000000-remove-cole-ai-employee.js} +20 -22
- package/dist/server/plugin.d.ts +6 -1
- package/dist/server/plugin.js +31 -8
- package/dist/server/resource/aiConversations.js +112 -188
- package/dist/server/resource/aiEmployees.js +5 -7
- package/dist/server/resource/aiMcpClients.d.ts +11 -0
- package/dist/server/resource/aiMcpClients.js +78 -0
- package/dist/server/{ai-employees/built-in/ai-coding/document/example/js-column/index.d.ts → resource/aiSkills.d.ts} +3 -7
- package/dist/server/resource/aiSkills.js +71 -0
- package/dist/server/resource/aiTools.js +4 -6
- package/dist/server/resource/aiWorkflowTasks.d.ts +12 -0
- package/dist/server/resource/aiWorkflowTasks.js +290 -0
- package/dist/server/tools/docs.js +4 -3
- package/dist/server/tools/workflow-caller.js +1 -0
- package/dist/server/types/ai-chat-conversation.type.d.ts +8 -2
- package/dist/server/types/ai-message.type.d.ts +7 -0
- package/dist/server/utils.d.ts +3 -0
- package/dist/server/utils.js +28 -3
- package/dist/server/workflow/nodes/employee/files.d.ts +16 -0
- package/dist/server/workflow/nodes/employee/files.js +125 -0
- package/dist/server/workflow/nodes/employee/handler.d.ts +11 -0
- package/dist/server/workflow/nodes/employee/handler.js +107 -0
- package/dist/server/workflow/nodes/employee/index.d.ts +17 -0
- package/dist/server/workflow/nodes/employee/index.js +391 -0
- package/dist/server/workflow/nodes/employee/tools.d.ts +12 -0
- package/dist/server/workflow/nodes/employee/tools.js +133 -0
- package/dist/server/workflow/nodes/employee/types.d.ts +35 -0
- package/dist/server/workflow/nodes/employee/types.js +24 -0
- package/dist/server/workflow/utils.d.ts +14 -0
- package/dist/server/workflow/utils.js +111 -0
- package/package.json +4 -2
- package/dist/client/107.64d9efa24d6b9143.js +0 -10
- package/dist/client/124.768c8aa5d6e6b461.js +0 -10
- package/dist/client/159.d52107c7a34ce2da.js +0 -10
- package/dist/client/192.0419770b69678994.js +0 -10
- package/dist/client/204.91be8cfc54d91a59.js +0 -10
- package/dist/client/238.9f784a7cdb751999.js +0 -10
- package/dist/client/263.6e1dfb1cbb1964f5.js +0 -10
- package/dist/client/35.5ee7503d9c09daa8.js +0 -10
- package/dist/client/47.6bd245f2140efd24.js +0 -10
- package/dist/client/481.03b3d2306d409933.js +0 -10
- package/dist/client/586.6a1510cabaa84f23.js +0 -10
- package/dist/client/650.8871a07b31c307ea.js +0 -10
- package/dist/client/755.e295bbd2b2a1cc21.js +0 -10
- package/dist/client/772.d51f683c55e18dd4.js +0 -10
- package/dist/client/870.84187dcb8c89b4dc.js +0 -10
- package/dist/client/933.baab3aa75f30e020.js +0 -10
- package/dist/client/987.3aee964e7f406939.js +0 -10
- package/dist/server/ai-employees/built-in/ai-coding/document/basic/flow-resource.js +0 -256
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-column/index.js +0 -48
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-column/js_columns_for_accounts_en.js +0 -452
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-column/js_columns_for_contacts_en.js +0 -363
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-column/js_columns_for_opportunities_en.js +0 -270
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-column/js_columns_for_quotations_en.d.ts +0 -13
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-column/js_columns_for_quotations_en.js +0 -219
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-column/js_columns_for_tickets_en.d.ts +0 -13
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-column/js_columns_for_tickets_en.js +0 -409
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-filter/accounts_filter_ant_style.d.ts +0 -13
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-filter/accounts_filter_ant_style.js +0 -324
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-filter/contacts_filter_ant_style.d.ts +0 -13
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-filter/contacts_filter_ant_style.js +0 -309
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-filter/index.js +0 -50
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-filter/leads_filter_ant_style.d.ts +0 -13
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-filter/leads_filter_ant_style.js +0 -345
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-filter/opportunities_filter_ant_style.d.ts +0 -13
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-filter/opportunities_filter_ant_style.js +0 -381
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-filter/product_categories_ant_style.d.ts +0 -13
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-filter/product_categories_ant_style.js +0 -545
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-filter/tickets_filter_ant_style.d.ts +0 -13
- package/dist/server/ai-employees/built-in/ai-coding/document/example/js-filter/tickets_filter_ant_style.js +0 -346
- package/dist/server/ai-employees/built-in/ai-coding/document/js-action.d.ts +0 -13
- package/dist/server/ai-employees/built-in/ai-coding/document/js-action.js +0 -102
- package/dist/server/ai-employees/built-in/ai-coding/document/js-block.d.ts +0 -13
- package/dist/server/ai-employees/built-in/ai-coding/document/js-block.js +0 -314
- package/dist/server/ai-employees/built-in/ai-coding/document/js-column.d.ts +0 -13
- package/dist/server/ai-employees/built-in/ai-coding/document/js-column.js +0 -113
- package/dist/server/ai-employees/built-in/ai-coding/document/js-field.d.ts +0 -13
- package/dist/server/ai-employees/built-in/ai-coding/document/js-field.js +0 -498
- package/dist/server/ai-employees/built-in/ai-coding/document/js-item.d.ts +0 -13
- package/dist/server/ai-employees/built-in/ai-coding/document/js-item.js +0 -184
- package/dist/server/ai-employees/built-in/ai-coding/index.d.ts +0 -37
- package/dist/server/ai-employees/built-in/ai-coding/index.js +0 -99
- package/dist/server/ai-employees/built-in/ai-coding/profile.d.ts +0 -27
- package/dist/server/ai-employees/built-in/ai-coding/profile.js +0 -60
- package/dist/server/ai-employees/built-in/ai-coding/prompt_en.md +0 -110
- package/dist/server/ai-employees/built-in/data-modeling/index.d.ts +0 -37
- package/dist/server/ai-employees/built-in/data-modeling/profile.d.ts +0 -27
- package/dist/server/ai-employees/built-in/data-modeling/profile.js +0 -60
- package/dist/server/ai-employees/built-in/data-modeling/prompt.js +0 -283
- package/dist/server/ai-employees/built-in/data-organizer/index.d.ts +0 -37
- package/dist/server/ai-employees/built-in/data-organizer/index.js +0 -63
- package/dist/server/ai-employees/built-in/data-organizer/profile.d.ts +0 -27
- package/dist/server/ai-employees/built-in/data-organizer/profile.js +0 -60
- package/dist/server/ai-employees/built-in/data-visualization/index.d.ts +0 -37
- package/dist/server/ai-employees/built-in/data-visualization/index.js +0 -58
- package/dist/server/ai-employees/built-in/data-visualization/profile.d.ts +0 -27
- package/dist/server/ai-employees/built-in/data-visualization/profile.js +0 -60
- package/dist/server/ai-employees/built-in/email-assistant/index.d.ts +0 -34
- package/dist/server/ai-employees/built-in/email-assistant/profile.d.ts +0 -27
- package/dist/server/ai-employees/built-in/email-assistant/prompt.d.ts +0 -12
- package/dist/server/ai-employees/built-in/insights-analyst/index.d.ts +0 -37
- package/dist/server/ai-employees/built-in/insights-analyst/index.js +0 -63
- package/dist/server/ai-employees/built-in/insights-analyst/profile.d.ts +0 -27
- package/dist/server/ai-employees/built-in/insights-analyst/profile.js +0 -60
- package/dist/server/ai-employees/built-in/insights-analyst/prompt.d.ts +0 -12
- package/dist/server/ai-employees/built-in/nocobase-assistant/index.d.ts +0 -34
- package/dist/server/ai-employees/built-in/nocobase-assistant/profile.d.ts +0 -27
- package/dist/server/ai-employees/built-in/nocobase-assistant/profile.js +0 -60
- package/dist/server/ai-employees/built-in/nocobase-assistant/prompt.d.ts +0 -12
- package/dist/server/ai-employees/built-in/nocobase-assistant/prompt.js +0 -52
- package/dist/server/ai-employees/built-in/research-analyst/index.d.ts +0 -37
- package/dist/server/ai-employees/built-in/research-analyst/index.js +0 -63
- package/dist/server/ai-employees/built-in/research-analyst/profile.d.ts +0 -27
- package/dist/server/ai-employees/built-in/research-analyst/profile.js +0 -60
- package/dist/server/ai-employees/built-in/research-analyst/prompt.d.ts +0 -12
- package/dist/server/ai-employees/built-in/translator/index.d.ts +0 -37
- package/dist/server/ai-employees/built-in/translator/index.js +0 -67
- package/dist/server/ai-employees/built-in/translator/profile.d.ts +0 -27
- package/dist/server/ai-employees/built-in/translator/prompt.d.ts +0 -12
- package/dist/server/document-loader/loader.worker.js +0 -68
- package/dist/server/document-loader/vendor/langchain/document_loaders/fs/text.d.ts +0 -20
- package/dist/server/document-loader/vendor/langchain/document_loaders/fs/text.js +0 -96
- /package/dist/client/ai-employees/chatbox/{Conversations.d.ts → conversations/Conversations.d.ts} +0 -0
- /package/dist/server/migrations/{20250923221107-setup-build-in.d.ts → 20260306000001-migrate-skill-settings-tools.d.ts} +0 -0
|
@@ -34,17 +34,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
34
34
|
mod
|
|
35
35
|
));
|
|
36
36
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
-
var
|
|
38
|
-
__export(
|
|
39
|
-
default: () =>
|
|
37
|
+
var ai_mcp_clients_exports = {};
|
|
38
|
+
__export(ai_mcp_clients_exports, {
|
|
39
|
+
default: () => ai_mcp_clients_default
|
|
40
|
+
});
|
|
41
|
+
module.exports = __toCommonJS(ai_mcp_clients_exports);
|
|
42
|
+
var import_database = require("@nocobase/database");
|
|
43
|
+
var import_ai_mcp_clients = __toESM(require("../../collections/ai-mcp-clients"));
|
|
44
|
+
var ai_mcp_clients_default = (0, import_database.defineCollection)({
|
|
45
|
+
migrationRules: ["overwrite", "schema-only"],
|
|
46
|
+
autoGenId: false,
|
|
47
|
+
sortable: true,
|
|
48
|
+
...import_ai_mcp_clients.default
|
|
40
49
|
});
|
|
41
|
-
module.exports = __toCommonJS(nocobase_assistant_exports);
|
|
42
|
-
var import_profile = __toESM(require("./profile"));
|
|
43
|
-
var nocobase_assistant_default = {
|
|
44
|
-
username: "cole",
|
|
45
|
-
description: "NocoBase Assistant",
|
|
46
|
-
profile: import_profile.default,
|
|
47
|
-
skillSettings: {
|
|
48
|
-
skills: []
|
|
49
|
-
}
|
|
50
|
-
};
|
|
@@ -6,8 +6,5 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
declare const _default:
|
|
10
|
-
name: string;
|
|
11
|
-
content: string;
|
|
12
|
-
};
|
|
9
|
+
declare const _default: import("@nocobase/database").CollectionOptions;
|
|
13
10
|
export default _default;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var ai_skills_exports = {};
|
|
28
|
+
__export(ai_skills_exports, {
|
|
29
|
+
default: () => ai_skills_default
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(ai_skills_exports);
|
|
32
|
+
var import_database = require("@nocobase/database");
|
|
33
|
+
var ai_skills_default = (0, import_database.defineCollection)({
|
|
34
|
+
migrationRules: ["overwrite", "schema-only"],
|
|
35
|
+
autoGenId: false,
|
|
36
|
+
sortable: true,
|
|
37
|
+
name: "aiSkills",
|
|
38
|
+
fields: [
|
|
39
|
+
{
|
|
40
|
+
name: "name",
|
|
41
|
+
type: "string",
|
|
42
|
+
primaryKey: true
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "scope",
|
|
46
|
+
type: "string"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: "description",
|
|
50
|
+
type: "text"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "content",
|
|
54
|
+
type: "text"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "tools",
|
|
58
|
+
type: "jsonb"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "title",
|
|
62
|
+
type: "string"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: "about",
|
|
66
|
+
type: "text"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "from",
|
|
70
|
+
type: "string"
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
});
|
|
@@ -6,8 +6,5 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
declare const _default:
|
|
10
|
-
name: string;
|
|
11
|
-
content: string;
|
|
12
|
-
};
|
|
9
|
+
declare const _default: import("@nocobase/database").CollectionOptions;
|
|
13
10
|
export default _default;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var ai_workflow_tasks_exports = {};
|
|
28
|
+
__export(ai_workflow_tasks_exports, {
|
|
29
|
+
default: () => ai_workflow_tasks_default
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(ai_workflow_tasks_exports);
|
|
32
|
+
var import_database = require("@nocobase/database");
|
|
33
|
+
var ai_workflow_tasks_default = (0, import_database.defineCollection)({
|
|
34
|
+
migrationRules: ["schema-only"],
|
|
35
|
+
autoGenId: false,
|
|
36
|
+
name: "aiWorkflowTasks",
|
|
37
|
+
fields: [
|
|
38
|
+
{
|
|
39
|
+
name: "id",
|
|
40
|
+
type: "snowflakeId",
|
|
41
|
+
primaryKey: true,
|
|
42
|
+
allowNull: false
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "workflowTitle",
|
|
46
|
+
type: "string",
|
|
47
|
+
allowNull: false
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: "nodeTitle",
|
|
51
|
+
type: "string",
|
|
52
|
+
allowNull: false
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "requiresApproval",
|
|
56
|
+
// no_required, ai_decision, human_decision
|
|
57
|
+
type: "string",
|
|
58
|
+
allowNull: true
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "status",
|
|
62
|
+
// processing; pending_acceptance; pending_approval; approved;
|
|
63
|
+
type: "string",
|
|
64
|
+
allowNull: false
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: "acceptedUserId",
|
|
68
|
+
type: "bigInt",
|
|
69
|
+
allowNull: true
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "sessionId",
|
|
73
|
+
type: "uuid",
|
|
74
|
+
unique: true,
|
|
75
|
+
allowNull: false
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "messageId",
|
|
79
|
+
type: "uuid",
|
|
80
|
+
allowNull: true
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: "jobId",
|
|
84
|
+
type: "snowflakeId",
|
|
85
|
+
unique: true,
|
|
86
|
+
allowNull: false
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: "executionId",
|
|
90
|
+
type: "snowflakeId",
|
|
91
|
+
allowNull: false
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: "nodeId",
|
|
95
|
+
type: "snowflakeId",
|
|
96
|
+
allowNull: false
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: "workflowId",
|
|
100
|
+
type: "snowflakeId",
|
|
101
|
+
allowNull: false
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
type: "belongsToMany",
|
|
105
|
+
name: "users",
|
|
106
|
+
target: "users",
|
|
107
|
+
foreignKey: "aiWorkflowTaskId",
|
|
108
|
+
otherKey: "userId",
|
|
109
|
+
through: "usersAiWorkflowTasks"
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
});
|
|
@@ -6,8 +6,5 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
declare const _default:
|
|
10
|
-
name: string;
|
|
11
|
-
content: string;
|
|
12
|
-
};
|
|
9
|
+
declare const _default: import("@nocobase/database").CollectionOptions;
|
|
13
10
|
export default _default;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var users_ai_workflow_tasks_exports = {};
|
|
28
|
+
__export(users_ai_workflow_tasks_exports, {
|
|
29
|
+
default: () => users_ai_workflow_tasks_default
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(users_ai_workflow_tasks_exports);
|
|
32
|
+
var import_database = require("@nocobase/database");
|
|
33
|
+
var users_ai_workflow_tasks_default = (0, import_database.defineCollection)({
|
|
34
|
+
name: "usersAiWorkflowTasks",
|
|
35
|
+
migrationRules: ["schema-only"],
|
|
36
|
+
fields: [
|
|
37
|
+
{
|
|
38
|
+
name: "read",
|
|
39
|
+
type: "boolean",
|
|
40
|
+
allowNull: false,
|
|
41
|
+
defaultValue: false
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
});
|
|
@@ -6,6 +6,5 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
import { SupportedDocumentExtname } from './types';
|
|
10
9
|
export declare const DOCUMENT_PARSE_META_KEY = "documentParse";
|
|
11
|
-
export declare const SUPPORTED_DOCUMENT_EXTNAMES:
|
|
10
|
+
export declare const SUPPORTED_DOCUMENT_EXTNAMES: string[];
|
|
@@ -7,11 +7,9 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
var __create = Object.create;
|
|
11
10
|
var __defProp = Object.defineProperty;
|
|
12
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
12
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
15
13
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
14
|
var __export = (target, all) => {
|
|
17
15
|
for (var name in all)
|
|
@@ -25,24 +23,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
25
23
|
}
|
|
26
24
|
return to;
|
|
27
25
|
};
|
|
28
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
-
mod
|
|
35
|
-
));
|
|
36
26
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
27
|
var loader_exports = {};
|
|
38
28
|
__export(loader_exports, {
|
|
39
29
|
DocumentLoader: () => DocumentLoader
|
|
40
30
|
});
|
|
41
31
|
module.exports = __toCommonJS(loader_exports);
|
|
42
|
-
var import_node_worker_threads = require("node:worker_threads");
|
|
43
32
|
var import_constants = require("./constants");
|
|
44
|
-
var import_node_path = __toESM(require("node:path"));
|
|
45
33
|
var import_utils = require("./utils");
|
|
34
|
+
var import_ai = require("@nocobase/ai");
|
|
46
35
|
class DocumentLoader {
|
|
47
36
|
constructor(fileManager) {
|
|
48
37
|
this.fileManager = fileManager;
|
|
@@ -54,7 +43,7 @@ class DocumentLoader {
|
|
|
54
43
|
}
|
|
55
44
|
const { stream, contentType } = await this.fileManager.getFileStream(file);
|
|
56
45
|
const blob = await this.streamToBlob(stream, contentType ?? file.mimetype);
|
|
57
|
-
return await
|
|
46
|
+
return await (0, import_ai.loadByWorker)(extname, blob);
|
|
58
47
|
}
|
|
59
48
|
async streamToBlob(stream, mimeType = "application/octet-stream") {
|
|
60
49
|
const chunks = [];
|
|
@@ -63,48 +52,6 @@ class DocumentLoader {
|
|
|
63
52
|
}
|
|
64
53
|
return new Blob(chunks, { type: mimeType });
|
|
65
54
|
}
|
|
66
|
-
async loadByWorker(extname, blob) {
|
|
67
|
-
const buffer = Buffer.from(await blob.arrayBuffer());
|
|
68
|
-
const isTsRuntime = __filename.endsWith(".ts");
|
|
69
|
-
const workerPath = import_node_path.default.join(__dirname, `loader.worker.${isTsRuntime ? "ts" : "js"}`);
|
|
70
|
-
const worker = new import_node_worker_threads.Worker(workerPath, {
|
|
71
|
-
execArgv: isTsRuntime ? ["--require", "tsx/cjs"] : void 0
|
|
72
|
-
});
|
|
73
|
-
return new Promise((resolve, reject) => {
|
|
74
|
-
let settled = false;
|
|
75
|
-
const close = (error, result) => {
|
|
76
|
-
if (settled) {
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
settled = true;
|
|
80
|
-
if (error) {
|
|
81
|
-
reject(error);
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
resolve(result || []);
|
|
85
|
-
};
|
|
86
|
-
worker.once("message", (payload) => {
|
|
87
|
-
if (payload == null ? void 0 : payload.error) {
|
|
88
|
-
close(new Error(payload.error));
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
close(void 0, (payload == null ? void 0 : payload.documents) || []);
|
|
92
|
-
});
|
|
93
|
-
worker.once("error", (error) => close(error));
|
|
94
|
-
worker.once("exit", (code) => {
|
|
95
|
-
if (!settled && code !== 0) {
|
|
96
|
-
close(new Error(`Document loader worker exited with code ${code}`));
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
worker.postMessage({
|
|
100
|
-
extname,
|
|
101
|
-
mimeType: blob.type,
|
|
102
|
-
buffer: Uint8Array.from(buffer)
|
|
103
|
-
});
|
|
104
|
-
}).finally(() => {
|
|
105
|
-
worker.terminate().catch(() => void 0);
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
55
|
}
|
|
109
56
|
// Annotate the CommonJS export names for ESM import in node:
|
|
110
57
|
0 && (module.exports = {
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
import { Document } from '@langchain/core/documents';
|
|
10
|
-
export type SupportedDocumentExtname = '.pdf' | '.ppt' | '.pptx' | '.doc' | '.docx' | '.txt';
|
|
11
10
|
export type DocumentParseMeta = {
|
|
12
11
|
status: 'ready' | 'failed';
|
|
13
12
|
parserVersion: string;
|
|
@@ -116,7 +116,7 @@ class AnthropicProvider extends import_provider.LLMProvider {
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
parseResponseMessage(message) {
|
|
119
|
-
const { content: rawContent, messageId, metadata, role, toolCalls, attachments, workContext } = message;
|
|
119
|
+
const { content: rawContent, messageId, metadata, role, toolCalls, attachments, workContext, createdAt } = message;
|
|
120
120
|
const content = {
|
|
121
121
|
...rawContent,
|
|
122
122
|
messageId,
|
|
@@ -149,6 +149,7 @@ class AnthropicProvider extends import_provider.LLMProvider {
|
|
|
149
149
|
}
|
|
150
150
|
return {
|
|
151
151
|
key: messageId,
|
|
152
|
+
createdAt,
|
|
152
153
|
content,
|
|
153
154
|
role
|
|
154
155
|
};
|
|
@@ -89,7 +89,7 @@ class GoogleGenAIProvider extends import_provider.LLMProvider {
|
|
|
89
89
|
}
|
|
90
90
|
parseResponseMessage(message) {
|
|
91
91
|
var _a, _b, _c, _d, _e;
|
|
92
|
-
const { content: rawContent, messageId, metadata, role, toolCalls, attachments, workContext } = message;
|
|
92
|
+
const { content: rawContent, messageId, metadata, role, toolCalls, attachments, workContext, createdAt } = message;
|
|
93
93
|
const content = {
|
|
94
94
|
...rawContent,
|
|
95
95
|
messageId,
|
|
@@ -118,6 +118,7 @@ class GoogleGenAIProvider extends import_provider.LLMProvider {
|
|
|
118
118
|
}
|
|
119
119
|
return {
|
|
120
120
|
key: messageId,
|
|
121
|
+
createdAt,
|
|
121
122
|
content,
|
|
122
123
|
role
|
|
123
124
|
};
|
|
@@ -72,7 +72,7 @@ class OpenAIResponsesProvider extends import_provider.LLMProvider {
|
|
|
72
72
|
}
|
|
73
73
|
parseResponseMessage(message) {
|
|
74
74
|
var _a, _b, _c, _d;
|
|
75
|
-
const { content: rawContent, messageId, metadata, role, toolCalls, attachments, workContext } = message;
|
|
75
|
+
const { content: rawContent, messageId, metadata, role, toolCalls, attachments, workContext, createdAt } = message;
|
|
76
76
|
const content = {
|
|
77
77
|
...rawContent,
|
|
78
78
|
messageId,
|
|
@@ -111,6 +111,7 @@ class OpenAIResponsesProvider extends import_provider.LLMProvider {
|
|
|
111
111
|
}
|
|
112
112
|
return {
|
|
113
113
|
key: messageId,
|
|
114
|
+
createdAt,
|
|
114
115
|
content,
|
|
115
116
|
role
|
|
116
117
|
};
|
|
@@ -47,6 +47,7 @@ export declare abstract class LLMProvider {
|
|
|
47
47
|
}>;
|
|
48
48
|
parseResponseMessage(message: Model): {
|
|
49
49
|
key: any;
|
|
50
|
+
createdAt: any;
|
|
50
51
|
content: any;
|
|
51
52
|
role: any;
|
|
52
53
|
};
|
|
@@ -95,13 +96,3 @@ export declare abstract class EmbeddingProvider {
|
|
|
95
96
|
protected get baseURL(): any;
|
|
96
97
|
protected get model(): any;
|
|
97
98
|
}
|
|
98
|
-
type FromType = 'ToolsEntry';
|
|
99
|
-
export declare class ToolDefinition<T> {
|
|
100
|
-
private from;
|
|
101
|
-
private _tool;
|
|
102
|
-
constructor(from: FromType, _tool: T);
|
|
103
|
-
static from(from: FromType): (tool: any) => import("@langchain/core/dist/tools").DynamicTool<any>;
|
|
104
|
-
get tool(): import("@langchain/core/dist/tools").DynamicTool<any>;
|
|
105
|
-
private convertToolOptions;
|
|
106
|
-
}
|
|
107
|
-
export {};
|
|
@@ -37,13 +37,11 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
37
37
|
var provider_exports = {};
|
|
38
38
|
__export(provider_exports, {
|
|
39
39
|
EmbeddingProvider: () => EmbeddingProvider,
|
|
40
|
-
LLMProvider: () => LLMProvider
|
|
41
|
-
ToolDefinition: () => ToolDefinition
|
|
40
|
+
LLMProvider: () => LLMProvider
|
|
42
41
|
});
|
|
43
42
|
module.exports = __toCommonJS(provider_exports);
|
|
44
43
|
var import_axios = __toESM(require("axios"));
|
|
45
44
|
var import_utils = require("../utils");
|
|
46
|
-
var import_langchain = require("langchain");
|
|
47
45
|
var import_stream = require("@langchain/core/utils/stream");
|
|
48
46
|
var import_document_loader = require("../document-loader");
|
|
49
47
|
var import_node_path = __toESM(require("node:path"));
|
|
@@ -67,7 +65,7 @@ class LLMProvider {
|
|
|
67
65
|
prepareChain(context) {
|
|
68
66
|
var _a, _b, _c, _d;
|
|
69
67
|
let chain = this.chatModel;
|
|
70
|
-
const toolDefinitions = (_a = context.tools) == null ? void 0 : _a.map(
|
|
68
|
+
const toolDefinitions = (_a = context.tools) == null ? void 0 : _a.map(import_utils.buildTool);
|
|
71
69
|
if ((_b = this.builtInTools()) == null ? void 0 : _b.length) {
|
|
72
70
|
const tools = [...this.builtInTools()];
|
|
73
71
|
if (!this.isToolConflict() && (toolDefinitions == null ? void 0 : toolDefinitions.length)) {
|
|
@@ -136,7 +134,7 @@ class LLMProvider {
|
|
|
136
134
|
const safeFilename = attachment.filename ? import_node_path.default.basename(attachment.filename) : "document";
|
|
137
135
|
return {
|
|
138
136
|
placement: "system",
|
|
139
|
-
content: `The user has uploaded a ${attachment.mimetype} file (filename: ${safeFilename}). Please inform the user directly that you do not support parsing
|
|
137
|
+
content: `The user has uploaded a ${attachment.mimetype} file (filename: ${safeFilename}). Please inform the user directly that you do not support parsing ${attachment.mimetype} content.`
|
|
140
138
|
};
|
|
141
139
|
}
|
|
142
140
|
}
|
|
@@ -315,37 +313,8 @@ class EmbeddingProvider {
|
|
|
315
313
|
return model;
|
|
316
314
|
}
|
|
317
315
|
}
|
|
318
|
-
class ToolDefinition {
|
|
319
|
-
constructor(from, _tool) {
|
|
320
|
-
this.from = from;
|
|
321
|
-
this._tool = _tool;
|
|
322
|
-
}
|
|
323
|
-
static from(from) {
|
|
324
|
-
return (tool2) => new ToolDefinition(from, tool2).tool;
|
|
325
|
-
}
|
|
326
|
-
get tool() {
|
|
327
|
-
if (this.from === "ToolsEntry") {
|
|
328
|
-
return this.convertToolOptions();
|
|
329
|
-
} else {
|
|
330
|
-
throw new Error("not supported tool definitions");
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
convertToolOptions() {
|
|
334
|
-
const {
|
|
335
|
-
invoke,
|
|
336
|
-
definition: { name, description, schema }
|
|
337
|
-
} = this._tool;
|
|
338
|
-
return (0, import_langchain.tool)((input, { toolCall, context }) => invoke(context.ctx, input, toolCall.id), {
|
|
339
|
-
name,
|
|
340
|
-
description,
|
|
341
|
-
schema,
|
|
342
|
-
returnDirect: false
|
|
343
|
-
});
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
316
|
// Annotate the CommonJS export names for ESM import in node:
|
|
347
317
|
0 && (module.exports = {
|
|
348
318
|
EmbeddingProvider,
|
|
349
|
-
LLMProvider
|
|
350
|
-
ToolDefinition
|
|
319
|
+
LLMProvider
|
|
351
320
|
});
|
|
@@ -7,10 +7,9 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
import PluginAIServer from '../plugin';
|
|
10
|
-
import {
|
|
10
|
+
import { WorkContextResolveStrategy } from '../types';
|
|
11
11
|
export declare class AICodingManager {
|
|
12
12
|
protected plugin: PluginAIServer;
|
|
13
13
|
constructor(plugin: PluginAIServer);
|
|
14
14
|
provideWorkContextResolveStrategy(): WorkContextResolveStrategy;
|
|
15
|
-
provideWorkContextBackgroundStrategy(): WorkContextBackgroundStrategy;
|
|
16
15
|
}
|