@nocobase/plugin-ai 2.2.0-alpha.3 → 2.2.0-alpha.5
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/dist/ai/docs/nocobase/api/app/env.md +28 -1
- package/dist/ai/docs/nocobase/api/cli/config/delete.md +8 -6
- package/dist/ai/docs/nocobase/api/cli/config/get.md +8 -6
- package/dist/ai/docs/nocobase/api/cli/config/index.md +37 -26
- package/dist/ai/docs/nocobase/api/cli/config/set.md +14 -8
- package/dist/ai/docs/nocobase/file-manager/field-attachment.md +6 -0
- package/dist/ai/docs/nocobase/file-manager/file-preview/index.md +3 -12
- package/dist/ai/docs/nocobase/file-manager/storage/aliyun-oss.md +9 -0
- package/dist/ai/docs/nocobase/file-manager/storage/amazon-s3.md +9 -0
- package/dist/ai/docs/nocobase/file-manager/storage/index.md +23 -0
- package/dist/ai/docs/nocobase/file-manager/storage/local.md +9 -0
- package/dist/ai/docs/nocobase/file-manager/storage/migrate-to-s3-pro.md +269 -0
- package/dist/ai/docs/nocobase/file-manager/storage/tencent-cos.md +9 -0
- package/dist/ai/docs/nocobase/get-started/installation/docker-caddy.mdx +170 -0
- package/dist/ai/docs/nocobase/get-started/installation/docker-nginx.mdx +172 -0
- package/dist/ai/docs/nocobase/get-started/installation/env.md +14 -4
- package/dist/ai/docs/nocobase/interface-builder/blocks/data-blocks/comment.md +107 -0
- package/dist/ai/docs/nocobase/ops-management/version-control/index.md +1 -0
- package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-block-comment/index.md +14 -0
- package/dist/ai/docs/nocobase/workflow/development/api.md +259 -77
- package/dist/ai/docs/nocobase/workflow/development/index.md +2 -1
- package/dist/ai/docs/nocobase/workflow/development/migration.md +319 -0
- package/dist/ai/docs/nocobase/workflow/development/node.md +84 -51
- package/dist/ai/docs/nocobase/workflow/development/trigger.md +122 -20
- package/dist/client/23.65ea8c37cd4b884b.js +10 -0
- package/dist/client/264.cc98933ef65608b6.js +10 -0
- package/dist/client/336.7a8a8853196ad779.js +11 -0
- package/dist/client/372.da38fe350bf841f4.js +10 -0
- package/dist/client/416.92b74ca47e4099c4.js +10 -0
- package/dist/client/446.d63c38d0309fe250.js +10 -0
- package/dist/client/525.203778500aca5d05.js +10 -0
- package/dist/client/663.680bcf6272a8504d.js +10 -0
- package/dist/client/681.399948c18d753667.js +10 -0
- package/dist/client/705.380279da896021fb.js +10 -0
- package/dist/client/ai-employees/1.x/selector/AIContextCollector.d.ts +1 -4
- package/dist/client/ai-employees/permissions/PermissionsTab.d.ts +21 -5
- package/dist/client/index.d.ts +15 -20
- package/dist/client/index.js +8 -8
- package/dist/client/workflow/nodes/employee/index.d.ts +2 -23
- package/dist/client/workflow/nodes/llm/index.d.ts +2 -52
- package/dist/client/workflow/triggers/ai-employee/index.d.ts +2 -83
- package/dist/client-v2/23.1bcb6986b40723d8.js +10 -0
- package/dist/client-v2/264.be92ff6a4d2612f1.js +10 -0
- package/dist/client-v2/336.e406470429e0670e.js +11 -0
- package/dist/client-v2/372.d76ea1ceed2be2a4.js +10 -0
- package/dist/client-v2/406.341be51205c674e0.js +10 -0
- package/dist/client-v2/416.0e1c2d9cde43b83d.js +10 -0
- package/dist/client-v2/446.073d450882db29fd.js +10 -0
- package/dist/client-v2/457.d72febb89e88fc00.js +10 -0
- package/dist/client-v2/663.342341f0b2b412d8.js +10 -0
- package/dist/client-v2/681.082f4f1c7b841983.js +10 -0
- package/dist/client-v2/705.1d10027ff8cfdf79.js +10 -0
- package/dist/{client/ai-employees/admin/AvatarSelect.d.ts → client-v2/ai-employees/AIEmployeeDropdown.d.ts} +8 -9
- package/dist/client-v2/ai-employees/AIEmployeeShortcut.d.ts +9 -2
- package/dist/{client → client-v2}/ai-employees/AddContextButton.d.ts +1 -1
- package/dist/{client → client-v2}/ai-employees/ai-coding/AICodingButton.d.ts +2 -1
- package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/Actions.d.ts +2 -4
- package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/AddLLMModal.d.ts +2 -4
- package/dist/client-v2/ai-employees/chatbox/components/Attachments.d.ts +27 -0
- package/dist/{client/ai-employees/permissions/Permissions.d.ts → client-v2/ai-employees/chatbox/components/ChatBox.d.ts} +2 -2
- package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/ChatBoxLayout.d.ts +1 -1
- package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/ContextItem.d.ts +1 -1
- package/dist/{client/ai-employees/admin/Employees.d.ts → client-v2/ai-employees/chatbox/components/DebugPanel.d.ts} +1 -1
- package/dist/{client/ai-employees/chatbox/markdown/Code.d.ts → client-v2/ai-employees/chatbox/components/Markdown.d.ts} +12 -5
- package/dist/{client/ai-employees/admin/ProfileSettings.d.ts → client-v2/ai-employees/chatbox/components/MessageContent.d.ts} +3 -2
- package/dist/client-v2/ai-employees/chatbox/components/MessageRenderers.d.ts +39 -0
- package/dist/{client/ai-employees/chatbox/generative-ui → client-v2/ai-employees/chatbox/components}/ToolCard.d.ts +7 -5
- package/dist/{client/ai-employees/admin/datasource/components/basic → client-v2/ai-employees/chatbox/components}/index.d.ts +5 -2
- package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useChat.d.ts +21 -22
- package/dist/client-v2/ai-employees/chatbox/hooks/useChatBoxActions.d.ts +3 -2
- package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useChatConversationActions.d.ts +2 -2
- package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useChatMessageActions.d.ts +8 -4
- package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useToolCallActions.d.ts +1 -1
- package/dist/client-v2/ai-employees/chatbox/hooks/useUploadFiles.d.ts +46 -0
- package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useWorkflowTasks.d.ts +1 -1
- package/dist/{client → client-v2}/ai-employees/chatbox/model.d.ts +9 -2
- package/dist/client-v2/ai-employees/chatbox/roles.d.ts +162 -0
- package/dist/client-v2/ai-employees/chatbox/stores/chat-box.d.ts +1 -49
- package/dist/client-v2/ai-employees/chatbox/stores/chat-conversations.d.ts +2 -19
- package/dist/client-v2/ai-employees/chatbox/stores/chat-messages.d.ts +1 -46
- package/dist/{client → client-v2}/ai-employees/chatbox/stores/chat-tool-call.d.ts +1 -15
- package/dist/client-v2/ai-employees/chatbox/stores/chat-tools.d.ts +30 -0
- package/dist/client-v2/ai-employees/chatbox/stores/create-selectors.d.ts +31 -3
- package/dist/{client/ai-employees/chatbox/conversations/common.d.ts → client-v2/ai-employees/chatbox/stores/workflow-tasks.d.ts} +21 -4
- package/dist/{client → client-v2}/ai-employees/chatbox/utils.d.ts +21 -6
- package/dist/{client/ai-employees/data-visualization/context.d.ts → client-v2/ai-employees/context/chart-config.d.ts} +1 -1
- package/dist/{client → client-v2}/ai-employees/context/code-editor.d.ts +1 -1
- package/dist/{client → client-v2}/ai-employees/context/datasource.d.ts +1 -1
- package/dist/{client → client-v2}/ai-employees/context/flow-models.d.ts +1 -1
- package/dist/{client/ai-employees/admin/datasource/components/DatasourceSettingDetail.d.ts → client-v2/ai-employees/data-modeling/setup.d.ts} +6 -5
- package/dist/{client → client-v2}/ai-employees/datasource/DatasourceSelector.d.ts +6 -2
- package/dist/{client/ai-employees/admin/datasource/flow-models/DatasourceSettingModel.d.ts → client-v2/ai-employees/flow/index.d.ts} +4 -6
- package/dist/{client → client-v2}/ai-employees/form-filler/tools/index.d.ts +1 -1
- package/dist/{client → client-v2}/ai-employees/stores/ai-selection.d.ts +4 -4
- package/dist/{client → client-v2}/ai-employees/stores/dialog-controller.d.ts +4 -4
- package/dist/{client/ai-employees/business-report/ui → client-v2/ai-employees/tools}/BusinessReportCard.d.ts +2 -2
- package/dist/{client/ai-employees/business-report/ui → client-v2/ai-employees/tools}/BusinessReportModal.d.ts +2 -2
- package/dist/{client/ai-employees/1.x/selector/withAISelectable.d.ts → client-v2/ai-employees/tools/ChartGeneratorCard.d.ts} +5 -4
- package/dist/{client/ai-employees/ai-coding/ui → client-v2/ai-employees/tools}/CodeToolCard.d.ts +1 -1
- package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools}/DataModelingCard.d.ts +3 -5
- package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools}/DataModelingModal.d.ts +4 -6
- package/dist/{client/ai-employees/sub-agents/ui → client-v2/ai-employees/tools}/SubAgentDispatchCard.d.ts +4 -9
- package/dist/{client/ai-employees/AISettingsProvider.d.ts → client-v2/ai-employees/tools/SuggestionsOptionsCard.d.ts} +6 -8
- package/dist/{client/ai-employees/workflow-tasks/ui → client-v2/ai-employees/tools}/WorkflowTaskOutputCard.d.ts +7 -2
- package/dist/{client/ai-employees/ai-coding/tools/context-tools.d.ts → client-v2/ai-employees/tools/ai-coding.d.ts} +3 -1
- package/dist/client-v2/ai-employees/tools/business-report-utils.d.ts +45 -0
- package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools/data-modeling}/CollectionNode.d.ts +2 -3
- package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools/data-modeling}/Diagram.d.ts +1 -1
- package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools/data-modeling}/Table.d.ts +2 -2
- package/dist/client-v2/ai-employees/tools/data-modeling/legacy-template.d.ts +13 -0
- package/dist/client-v2/ai-employees/tools/data-modeling/runtime.d.ts +15 -0
- package/dist/{client/ai-employees → client-v2/ai-employees/tools}/data-modeling/types.d.ts +27 -4
- package/dist/client-v2/ai-employees/tools/data-modeling/useFieldInterfaceOptions.d.ts +150 -0
- package/dist/{client/ai-employees/data-visualization/tools/index.d.ts → client-v2/ai-employees/tools/data-visualization.d.ts} +1 -1
- package/dist/client-v2/ai-employees/tools/index.d.ts +32 -0
- package/dist/client-v2/ai-employees/types.d.ts +101 -7
- package/dist/client-v2/components/RemoteSelect.d.ts +43 -0
- package/dist/{client → client-v2}/debug-logger.d.ts +2 -2
- package/dist/client-v2/f0053e745af0ad03.svg +50 -0
- package/dist/client-v2/index.d.ts +9 -8
- package/dist/client-v2/index.js +37 -1
- package/dist/client-v2/llm-providers/forms.d.ts +42 -0
- package/dist/client-v2/llm-providers/index.d.ts +23 -0
- package/dist/{client/ai-employees/ai-coding/tools/index.d.ts → client-v2/llm-services/utils.d.ts} +5 -3
- package/dist/client-v2/locale.d.ts +14 -0
- package/dist/{client → client-v2}/manager/ai-manager.d.ts +4 -5
- package/dist/client-v2/models/ai-employees/AIEmployeeActionModel.d.ts +33 -0
- package/dist/client-v2/models/ai-employees/AIEmployeeShortcutModel.d.ts +44 -0
- package/dist/client-v2/pages/AdminSettingsPage.d.ts +24 -0
- package/dist/client-v2/pages/DatasourceSettingsPage.d.ts +62 -0
- package/dist/client-v2/pages/EmployeesPage.d.ts +53 -0
- package/dist/client-v2/pages/LLMServicesPage.d.ts +75 -0
- package/dist/client-v2/pages/MCPSettingsPage.d.ts +73 -0
- package/dist/client-v2/pages/drawerWidth.d.ts +10 -0
- package/dist/client-v2/pages/permissions/Permissions.d.ts +67 -0
- package/dist/client-v2/pages/permissions/PermissionsTab.d.ts +12 -0
- package/dist/client-v2/pages/useUnsavedChangesBeforeClose.d.ts +29 -0
- package/dist/client-v2/plugin.d.ts +32 -0
- package/dist/client-v2/repositories/AIConfigRepository.d.ts +3 -23
- package/dist/client-v2/workflow/components/FormValueRegistry.d.ts +12 -0
- package/dist/{client/components/ListCollapse.d.ts → client-v2/workflow/components/WorkflowListCollapse.d.ts} +4 -4
- package/dist/client-v2/workflow/constants.d.ts +26 -0
- package/dist/client-v2/workflow/nodes/employee/components/AIEmployeeFieldset.d.ts +11 -0
- package/dist/{client/ai-employees/common/CodeHighlight.d.ts → client-v2/workflow/nodes/employee/components/AIEmployeeSelect.d.ts} +5 -6
- package/dist/{client/ai-employees/ContextAwareTooltip.d.ts → client-v2/workflow/nodes/employee/components/Assignees.d.ts} +2 -1
- package/dist/client-v2/workflow/nodes/employee/components/FeedbackSettings.d.ts +17 -0
- package/dist/client-v2/workflow/nodes/employee/components/FileInputs.d.ts +11 -0
- package/dist/{client/ai-employees/AIEmployeesProvider.d.ts → client-v2/workflow/nodes/employee/components/MessageInputs.d.ts} +2 -3
- package/dist/client-v2/workflow/nodes/employee/components/ModelOptions.d.ts +17 -0
- package/dist/{client/ai-employees/admin/datasource/components/basic/CollectionCascader.d.ts → client-v2/workflow/nodes/employee/components/SkillSettings.d.ts} +6 -3
- package/dist/client-v2/workflow/nodes/employee/components/StructuredOutput.d.ts +11 -0
- package/dist/client-v2/workflow/nodes/employee/components/UserInput.d.ts +18 -0
- package/dist/client-v2/workflow/nodes/employee/components/WebSearchOptions.d.ts +16 -0
- package/dist/client-v2/workflow/nodes/employee/index.d.ts +23 -0
- package/dist/{client/ai-employees/AIEmployeeListItem.d.ts → client-v2/workflow/nodes/llm/components/LLMFieldset.d.ts} +3 -5
- package/dist/{client/admin-settings/AdminSettings.d.ts → client-v2/workflow/nodes/llm/components/Messages.d.ts} +2 -1
- package/dist/client-v2/workflow/nodes/llm/components/StructuredOutput.d.ts +11 -0
- package/dist/client-v2/workflow/nodes/llm/index.d.ts +30 -0
- package/dist/{client/ai-employees/1.x/selector/BlockSelector.d.ts → client-v2/workflow/register.d.ts} +2 -6
- package/dist/client-v2/workflow/triggers/ai-employee/AIEmployeeTriggerConfig.d.ts +11 -0
- package/dist/client-v2/workflow/triggers/ai-employee/Parameters.d.ts +11 -0
- package/dist/client-v2/workflow/triggers/ai-employee/index.d.ts +25 -0
- package/dist/client-v2/workflow/types.d.ts +128 -0
- package/dist/externalVersion.js +20 -25
- package/dist/locale/en-US.json +42 -1
- package/dist/locale/zh-CN.json +42 -1
- package/dist/node_modules/@langchain/mistralai/LICENSE +21 -0
- package/dist/node_modules/@langchain/mistralai/dist/_virtual/rolldown_runtime.cjs +25 -0
- package/dist/node_modules/@langchain/mistralai/dist/chat_models.cjs +859 -0
- package/dist/node_modules/@langchain/mistralai/dist/chat_models.d.cts +541 -0
- package/dist/node_modules/@langchain/mistralai/dist/chat_models.d.ts +541 -0
- package/dist/node_modules/@langchain/mistralai/dist/chat_models.js +857 -0
- package/dist/node_modules/@langchain/mistralai/dist/embeddings.cjs +140 -0
- package/dist/node_modules/@langchain/mistralai/dist/embeddings.d.cts +116 -0
- package/dist/node_modules/@langchain/mistralai/dist/embeddings.d.ts +116 -0
- package/dist/node_modules/@langchain/mistralai/dist/embeddings.js +139 -0
- package/dist/node_modules/@langchain/mistralai/dist/index.cjs +21 -0
- package/dist/node_modules/@langchain/mistralai/dist/index.d.cts +4 -0
- package/dist/node_modules/@langchain/mistralai/dist/index.d.ts +4 -0
- package/dist/node_modules/@langchain/mistralai/dist/index.js +5 -0
- package/dist/node_modules/@langchain/mistralai/dist/llms.cjs +275 -0
- package/dist/node_modules/@langchain/mistralai/dist/llms.d.cts +147 -0
- package/dist/node_modules/@langchain/mistralai/dist/llms.d.ts +147 -0
- package/dist/node_modules/@langchain/mistralai/dist/llms.js +274 -0
- package/dist/node_modules/@langchain/mistralai/dist/utils.cjs +61 -0
- package/dist/node_modules/@langchain/mistralai/dist/utils.js +59 -0
- package/dist/node_modules/@langchain/mistralai/package.json +1 -0
- package/dist/node_modules/@langchain/xai/dist/index.cjs +2 -2
- package/dist/node_modules/@langchain/xai/package.json +1 -1
- package/dist/node_modules/fs-extra/package.json +1 -1
- package/dist/node_modules/jsonrepair/package.json +1 -1
- package/dist/node_modules/just-bash/package.json +1 -1
- package/dist/node_modules/nodejs-snowflake/package.json +1 -1
- package/dist/node_modules/openai/package.json +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/ai-employees/ai-employee.js +12 -5
- package/dist/server/ai-employees/checkpoints/cleaner.d.ts +2 -0
- package/dist/server/ai-employees/checkpoints/cleaner.js +11 -1
- package/dist/server/ai-employees/middleware/conversation.d.ts +2 -0
- package/dist/server/ai-employees/middleware/conversation.js +2 -1
- package/dist/server/ai-employees/utils.d.ts +3 -1
- package/dist/server/ai-employees/utils.js +2 -0
- package/dist/server/llm-providers/mistral.d.ts +62 -0
- package/dist/server/llm-providers/mistral.js +265 -0
- package/dist/server/llm-providers/provider.d.ts +6 -2
- package/dist/server/llm-providers/provider.js +27 -14
- package/dist/server/plugin.js +2 -0
- package/dist/server/workflow/nodes/employee/index.js +92 -46
- package/dist/server/workflow/nodes/employee/tools.js +8 -1
- package/package.json +6 -5
- package/dist/client/119.c6bf8c6433167d81.js +0 -10
- package/dist/client/170.d98eacdc00d9d527.js +0 -10
- package/dist/client/228.b4b709f93b86b6b9.js +0 -10
- package/dist/client/280.003b9e9788599244.js +0 -10
- package/dist/client/290.0f7f441d8a94f03c.js +0 -10
- package/dist/client/331.d547c95410476a69.js +0 -10
- package/dist/client/406.15c09d98faa2ccf1.js +0 -10
- package/dist/client/428.5eb4f53ddbb6a3b8.js +0 -10
- package/dist/client/462.d172d0fe91519e35.js +0 -10
- package/dist/client/486.dcac8f3fcec19c33.js +0 -10
- package/dist/client/502.2b4a51e0a8122e52.js +0 -10
- package/dist/client/525.33a9c8ec28be4ec4.js +0 -10
- package/dist/client/559.a0f2f1cc2be3c039.js +0 -10
- package/dist/client/561.7ec804ef39ec7dcd.js +0 -10
- package/dist/client/580.35ba54ff91b7fe6d.js +0 -10
- package/dist/client/597.b0d64948d74cf6cb.js +0 -10
- package/dist/client/604.89c674f35b52b4ef.js +0 -10
- package/dist/client/614.aa766080f6b99aab.js +0 -10
- package/dist/client/646.d4483b4ff23da0a0.js +0 -10
- package/dist/client/687.224e569a99cae4bb.js +0 -10
- package/dist/client/699.57c0a1acb723202a.js +0 -10
- package/dist/client/711.92cd94681fde7e05.js +0 -10
- package/dist/client/758.a9741e81911e53c3.js +0 -10
- package/dist/client/768.5177bff46ae71a5b.js +0 -10
- package/dist/client/792.abb57765453bcbcc.js +0 -10
- package/dist/client/820.f72ef2462b61d812.js +0 -10
- package/dist/client/832.0cf69e3f43c320b2.js +0 -10
- package/dist/client/927.d95c74ebb8fd51c9.js +0 -10
- package/dist/client/ai-employees/1.x/selector/AISelectorProvider.d.ts +0 -33
- package/dist/client/ai-employees/ProfileCard.d.ts +0 -15
- package/dist/client/ai-employees/admin/ChatSettings.d.ts +0 -10
- package/dist/client/ai-employees/admin/DataSourceSettings.d.ts +0 -10
- package/dist/client/ai-employees/admin/EnableSwitch.d.ts +0 -10
- package/dist/client/ai-employees/admin/InputsFormSettings.d.ts +0 -10
- package/dist/client/ai-employees/admin/KnowledgeBaseSettings.d.ts +0 -10
- package/dist/client/ai-employees/admin/ModelSettings.d.ts +0 -10
- package/dist/client/ai-employees/admin/SkillSettings.d.ts +0 -19
- package/dist/client/ai-employees/admin/SystemPrompt.d.ts +0 -10
- package/dist/client/ai-employees/admin/Templates.d.ts +0 -10
- package/dist/client/ai-employees/admin/ToolsSettings.d.ts +0 -17
- package/dist/client/ai-employees/admin/datasource/components/DatasourceSettingForm.d.ts +0 -10
- package/dist/client/ai-employees/admin/datasource/components/DatasourceSettingGrid.d.ts +0 -10
- package/dist/client/ai-employees/admin/datasource/components/basic/FieldsTransfer.d.ts +0 -17
- package/dist/client/ai-employees/admin/datasource/components/form-steps/CollectionSetting.d.ts +0 -17
- package/dist/client/ai-employees/admin/datasource/components/form-steps/FieldsSetting.d.ts +0 -15
- package/dist/client/ai-employees/admin/datasource/components/form-steps/FilterSetting.d.ts +0 -17
- package/dist/client/ai-employees/admin/datasource/components/form-steps/Preview.d.ts +0 -13
- package/dist/client/ai-employees/admin/datasource/components/form-steps/SortSetting.d.ts +0 -15
- package/dist/client/ai-employees/admin/datasource/components/form-steps/index.d.ts +0 -13
- package/dist/client/ai-employees/admin/datasource/components/index.d.ts +0 -9
- package/dist/client/ai-employees/admin/datasource/context.d.ts +0 -17
- package/dist/client/ai-employees/admin/datasource/flow-models/index.d.ts +0 -9
- package/dist/client/ai-employees/admin/datasource/index.d.ts +0 -10
- package/dist/client/ai-employees/admin/hooks.d.ts +0 -39
- package/dist/client/ai-employees/admin/mcp/MCPSettings.d.ts +0 -10
- package/dist/client/ai-employees/admin/mcp/MCPToolsList.d.ts +0 -19
- package/dist/client/ai-employees/admin/mcp/context.d.ts +0 -15
- package/dist/client/ai-employees/admin/mcp/schemas.d.ts +0 -1314
- package/dist/client/ai-employees/ai-coding/CodeHistory.d.ts +0 -10
- package/dist/client/ai-employees/ai-coding/markdown/Code.d.ts +0 -16
- package/dist/client/ai-employees/avatars.d.ts +0 -9
- package/dist/client/ai-employees/built-in/utils.d.ts +0 -15
- package/dist/client/ai-employees/business-report/tools/index.d.ts +0 -10
- package/dist/client/ai-employees/business-report/ui/report-utils.d.ts +0 -38
- package/dist/client/ai-employees/chart-generator/tools/index.d.ts +0 -10
- package/dist/client/ai-employees/chart-generator/ui/ECharts.d.ts +0 -13
- package/dist/client/ai-employees/chatbox/AIThinking.d.ts +0 -12
- package/dist/client/ai-employees/chatbox/Attachment.d.ts +0 -14
- package/dist/client/ai-employees/chatbox/AttachmentsHeader.d.ts +0 -10
- package/dist/client/ai-employees/chatbox/ChatBox.d.ts +0 -12
- package/dist/client/ai-employees/chatbox/ContextItemsHeader.d.ts +0 -10
- package/dist/client/ai-employees/chatbox/DebugPanel.d.ts +0 -16
- package/dist/client/ai-employees/chatbox/EditMessageHeader.d.ts +0 -10
- package/dist/client/ai-employees/chatbox/HintMessageHeader.d.ts +0 -10
- package/dist/client/ai-employees/chatbox/MessageRenderer.d.ts +0 -33
- package/dist/client/ai-employees/chatbox/SenderFooter.d.ts +0 -13
- package/dist/client/ai-employees/chatbox/SenderHeader.d.ts +0 -10
- package/dist/client/ai-employees/chatbox/SenderPrefix.d.ts +0 -10
- package/dist/client/ai-employees/chatbox/Upload.d.ts +0 -12
- package/dist/client/ai-employees/chatbox/VirtualList.d.ts +0 -28
- package/dist/client/ai-employees/chatbox/conversations/ConversationsList.d.ts +0 -13
- package/dist/client/ai-employees/chatbox/conversations/WorkflowTasksList.d.ts +0 -13
- package/dist/client/ai-employees/chatbox/conversations/index.d.ts +0 -9
- package/dist/client/ai-employees/chatbox/generative-ui/DefaultToolCard.d.ts +0 -16
- package/dist/client/ai-employees/chatbox/hooks/useChatBoxActions.d.ts +0 -18
- package/dist/client/ai-employees/chatbox/hooks/useUploadFiles.d.ts +0 -12
- package/dist/client/ai-employees/chatbox/markdown/ECharts.d.ts +0 -10
- package/dist/client/ai-employees/chatbox/markdown/Form.d.ts +0 -10
- package/dist/client/ai-employees/chatbox/markdown/Generating.d.ts +0 -10
- package/dist/client/ai-employees/chatbox/markdown/Markdown.d.ts +0 -13
- package/dist/client/ai-employees/chatbox/roles.d.ts +0 -32
- package/dist/client/ai-employees/chatbox/stores/chat-box.d.ts +0 -9
- package/dist/client/ai-employees/chatbox/stores/chat-conversations.d.ts +0 -9
- package/dist/client/ai-employees/chatbox/stores/chat-messages.d.ts +0 -9
- package/dist/client/ai-employees/chatbox/stores/chat-tools.d.ts +0 -51
- package/dist/client/ai-employees/chatbox/stores/create-selectors.d.ts +0 -18
- package/dist/client/ai-employees/chatbox/stores/workflow-tasks.d.ts +0 -45
- package/dist/client/ai-employees/context/classic-pages.d.ts +0 -10
- package/dist/client/ai-employees/data-modeling/Table.d.ts +0 -12
- package/dist/client/ai-employees/data-modeling/setup.d.ts +0 -10
- package/dist/client/ai-employees/data-modeling/tools/index.d.ts +0 -10
- package/dist/client/ai-employees/data-modeling/ui/useFieldInterfaceOptions.d.ts +0 -14
- package/dist/client/ai-employees/datasource/DatasourceList.d.ts +0 -17
- package/dist/client/ai-employees/datasource/index.d.ts +0 -9
- package/dist/client/ai-employees/flow/events/index.d.ts +0 -9
- package/dist/client/ai-employees/flow/index.d.ts +0 -36
- package/dist/client/ai-employees/flow/models/AIEmployeeActionModel.d.ts +0 -18
- package/dist/client/ai-employees/flow/models/AIEmployeeShortcutModel.d.ts +0 -30
- package/dist/client/ai-employees/shortcuts/ShortcutList.d.ts +0 -10
- package/dist/client/ai-employees/shortcuts/useShortcuts.d.ts +0 -13
- package/dist/client/ai-employees/stores/context-aware.d.ts +0 -19
- package/dist/client/ai-employees/sub-agents/tools/index.d.ts +0 -10
- package/dist/client/ai-employees/suggestions/tools/index.d.ts +0 -10
- package/dist/client/ai-employees/suggestions/ui/SuggestionsOptions.d.ts +0 -13
- package/dist/client/ai-employees/types.d.ts +0 -259
- package/dist/client/ai-employees/workflow-tasks/tools/index.d.ts +0 -10
- package/dist/client/chat-settings/Messages.d.ts +0 -11
- package/dist/client/chat-settings/StructuredOutput.d.ts +0 -11
- package/dist/client/components/skill-settings.d.ts +0 -22
- package/dist/client/features/components.d.ts +0 -9
- package/dist/client/features/feature-manager.d.ts +0 -9
- package/dist/client/features/index.d.ts +0 -9
- package/dist/client/features/vector-database-provider.d.ts +0 -9
- package/dist/client/features/vector-store-provider.d.ts +0 -9
- package/dist/client/llm-providers/anthropic/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/anthropic/ProviderSettings.d.ts +0 -10
- package/dist/client/llm-providers/anthropic/index.d.ts +0 -10
- package/dist/client/llm-providers/components/Chat.d.ts +0 -10
- package/dist/client/llm-providers/components/ModelSelect.d.ts +0 -10
- package/dist/client/llm-providers/dashscope/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/dashscope/ProviderSettings.d.ts +0 -10
- package/dist/client/llm-providers/dashscope/index.d.ts +0 -10
- package/dist/client/llm-providers/deepseek/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/deepseek/index.d.ts +0 -10
- package/dist/client/llm-providers/google-genai/MessageRenderer.d.ts +0 -13
- package/dist/client/llm-providers/google-genai/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/google-genai/ProviderSettings.d.ts +0 -10
- package/dist/client/llm-providers/google-genai/index.d.ts +0 -10
- package/dist/client/llm-providers/kimi/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/kimi/index.d.ts +0 -10
- package/dist/client/llm-providers/mimo/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/mimo/index.d.ts +0 -10
- package/dist/client/llm-providers/ollama/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/ollama/ProviderSettings.d.ts +0 -10
- package/dist/client/llm-providers/ollama/index.d.ts +0 -10
- package/dist/client/llm-providers/openai/completions/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/openai/completions/index.d.ts +0 -10
- package/dist/client/llm-providers/openai/components/ProviderSettings.d.ts +0 -10
- package/dist/client/llm-providers/openai/responses/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/openai/responses/index.d.ts +0 -10
- package/dist/client/llm-providers/tongyi/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/tongyi/ProviderSettings.d.ts +0 -10
- package/dist/client/llm-providers/tongyi/index.d.ts +0 -10
- package/dist/client/llm-providers/xai/ModelSettings.d.ts +0 -10
- package/dist/client/llm-providers/xai/index.d.ts +0 -10
- package/dist/client/llm-services/LLMServices.d.ts +0 -13
- package/dist/client/llm-services/component/DefaultModelSelect.d.ts +0 -10
- package/dist/client/llm-services/component/EnabledModelsSelect.d.ts +0 -23
- package/dist/client/llm-services/component/LLMTestFlight.d.ts +0 -10
- package/dist/client/llm-services/component/ModelOptionsSettings.d.ts +0 -10
- package/dist/client/llm-services/component/UnifiedModelSettings.d.ts +0 -10
- package/dist/client/llm-services/hooks/useLLMServiceCatalog.d.ts +0 -18
- package/dist/client/llm-services/llm-providers.d.ts +0 -27
- package/dist/client/llm-services/utils.d.ts +0 -30
- package/dist/client/manager/ai-feature-manager.d.ts +0 -9
- package/dist/client/repositories/AIConfigRepository.d.ts +0 -60
- package/dist/client/repositories/hooks/useAIConfigRepository.d.ts +0 -10
- package/dist/client/schemas/llms.d.ts +0 -347
- package/dist/client/workflow/nodes/employee/components/AIEmployeeSelect.d.ts +0 -10
- package/dist/client/workflow/nodes/employee/components/assigness.d.ts +0 -11
- package/dist/client/workflow/nodes/employee/components/file-inputs.d.ts +0 -10
- package/dist/client/workflow/nodes/employee/components/message-inputs.d.ts +0 -12
- package/dist/client/workflow/nodes/employee/components/model-options.d.ts +0 -10
- package/dist/client/workflow/nodes/employee/components/structured-output.d.ts +0 -10
- package/dist/client/workflow/nodes/employee/components/users-select.d.ts +0 -15
- package/dist/client/workflow/nodes/employee/components/web-search-options.d.ts +0 -10
- package/dist/client/workflow/nodes/employee/configuration.d.ts +0 -12
- package/dist/client/workflow/nodes/employee/flow-models/feedback.d.ts +0 -14
- package/dist/client/workflow/nodes/employee/flow-models/task.d.ts +0 -13
- package/dist/client/workflow/nodes/llm/ModelSettings.d.ts +0 -11
- package/dist/client/workflow/triggers/ai-employee/Parameters.d.ts +0 -13
- /package/dist/{client → client-v2}/ai-employees/AISelection.d.ts +0 -0
- /package/dist/{client → client-v2}/ai-employees/AISelectionControl.d.ts +0 -0
- /package/dist/{client → client-v2}/ai-employees/ai-coding/prompts.d.ts +0 -0
- /package/dist/{client → client-v2}/ai-employees/ai-coding/setup.d.ts +0 -0
- /package/dist/{client/ai-employees/chatbox/AIEmployeeSwitch.d.ts → client-v2/ai-employees/chatbox/components/AIEmployeeSwitcher.d.ts} +0 -0
- /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/ChatButton.d.ts +0 -0
- /package/dist/{client/ai-employees/chatbox/conversations → client-v2/ai-employees/chatbox/components}/Conversations.d.ts +0 -0
- /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/Messages.d.ts +0 -0
- /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/ModelSwitcher.d.ts +0 -0
- /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/SearchSwitch.d.ts +0 -0
- /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/Sender.d.ts +0 -0
- /package/dist/{client/ai-employees/chatbox/generative-ui → client-v2/ai-employees/chatbox/components}/ToolModal.d.ts +0 -0
- /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/UserPrompt.d.ts +0 -0
- /package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useChatBoxEffect.d.ts +0 -0
- /package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useLoadMoreObserver.d.ts +0 -0
- /package/dist/client-v2/ai-employees/{chatbox/stores → stores}/global-store.d.ts +0 -0
- /package/dist/{client/ai-employees/flow/models → client-v2/models/ai-employees}/AIEmployeeShortcutListModel.d.ts +0 -0
- /package/dist/{client/ai-employees/flow/models → client-v2/models/ai-employees}/index.d.ts +0 -0
- /package/dist/{client/ai-employees/flow/events/ai-context-selection.d.ts → client-v2/workflow/components/index.d.ts} +0 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
pkg: "@nocobase/plugin-block-comment"
|
|
3
|
+
title: "Comment Block"
|
|
4
|
+
description: "Comment block: view and create comments in record details, pop-ups, and similar scenarios, with field mapping, pagination, data scope, default sorting, and auto jump to last page."
|
|
5
|
+
keywords: "Comment Block,CommentBlock,comment collection,field mapping,data scope,default sorting,interface builder,NocoBase"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Comment Block
|
|
9
|
+
|
|
10
|
+
## Introduction
|
|
11
|
+
|
|
12
|
+
The Comment block adds commenting capabilities to business records. You can add it to detail pages or pop-ups for tasks, articles, tickets, customers, and other records, so users can view, reply to, and create comments around the current record.
|
|
13
|
+
|
|
14
|
+

|
|
15
|
+
|
|
16
|
+
:::tip
|
|
17
|
+
|
|
18
|
+
The Comment block does not create a collection by itself. Before using it, prepare a collection for storing comments and configure fields such as comment content, commenter, comment owner, and comment time.
|
|
19
|
+
|
|
20
|
+
:::
|
|
21
|
+
|
|
22
|
+
## Add a block
|
|
23
|
+
|
|
24
|
+
The Comment block is usually added to the detail page or pop-up of a business record.
|
|
25
|
+
|
|
26
|
+

|
|
27
|
+
|
|
28
|
+
1. Open the target record detail page or pop-up
|
|
29
|
+
2. Click "Add block"
|
|
30
|
+
3. Select "Comment"
|
|
31
|
+
4. Select the collection used to store comments
|
|
32
|
+
5. Complete field mapping as prompted
|
|
33
|
+
|
|
34
|
+
If the Comment block is created from an association, NocoBase will try to automatically identify the comment owner field and the current record value based on the current association. In this case, "Comment owner field" and "Comment owner field value" are filled automatically, and usually do not need manual configuration.
|
|
35
|
+
|
|
36
|
+

|
|
37
|
+
|
|
38
|
+
If the block is created directly from the comment collection, you need to manually configure the comment owner field and value.
|
|
39
|
+
|
|
40
|
+
.png)
|
|
41
|
+
|
|
42
|
+
## Field mapping
|
|
43
|
+
|
|
44
|
+
The Comment block uses "Field mapping" to know how each comment should be displayed and saved.
|
|
45
|
+
|
|
46
|
+
| Configuration | Description |
|
|
47
|
+
| --- | --- |
|
|
48
|
+
| Comment content field | Select the field used to store the comment body. |
|
|
49
|
+
| Commenter field | Select a many-to-one field associated with the users collection. |
|
|
50
|
+
| Comment owner field | Select the field used to store the current business record identifier. |
|
|
51
|
+
| Comment owner field value | Specify the current business record value, such as `{{ ctx.popup.record.id }}`. |
|
|
52
|
+
| Comment date field | Select the comment time field, used for display and default sorting. |
|
|
53
|
+
|
|
54
|
+
### Comment owner field
|
|
55
|
+
|
|
56
|
+
"Comment owner field" is used to filter comments for the current record, and is also written when a new comment is created.
|
|
57
|
+
|
|
58
|
+
When selected manually, the dropdown only shows ordinary scalar fields and does not show association fields. Common configurations are:
|
|
59
|
+
|
|
60
|
+
| Business collection | Owner field in comment collection | Comment owner field value |
|
|
61
|
+
| --- | --- | --- |
|
|
62
|
+
| Tasks | `taskId` | `{{ ctx.popup.record.id }}` |
|
|
63
|
+
| Articles | `postId` | `{{ ctx.popup.record.id }}` |
|
|
64
|
+
| Tickets | `ticketId` | `{{ ctx.popup.record.id }}` |
|
|
65
|
+
|
|
66
|
+
If the current record uses a unique identifier other than `id`, change "Comment owner field value" to the corresponding field, such as `{{ ctx.popup.record.uuid }}`.
|
|
67
|
+
|
|
68
|
+
### Automatic mapping from associations
|
|
69
|
+
|
|
70
|
+
If the block is created from an association of the business record, the Comment block prioritizes the foreign key field of that association as the comment owner field, and uses the current record value as the comment owner field value.
|
|
71
|
+
|
|
72
|
+

|
|
73
|
+
|
|
74
|
+
For example, if there is a one-to-many association between the task collection and the task comment collection, and the foreign key field in the task comment collection is `taskId`, then when you add a Comment block from the association in the task detail page, the block automatically uses:
|
|
75
|
+
|
|
76
|
+
- Comment owner field: `taskId`
|
|
77
|
+
- Comment owner field value: the identifier of the current task record
|
|
78
|
+
|
|
79
|
+
This approach is suitable for most scenarios and reduces manual configuration errors.
|
|
80
|
+
|
|
81
|
+
## Block settings
|
|
82
|
+
|
|
83
|
+

|
|
84
|
+
|
|
85
|
+
### Page size
|
|
86
|
+
|
|
87
|
+
Set how many comments are displayed on each page. Available values include `5`, `10`, `20`, `50`, `100`, and `200`.
|
|
88
|
+
|
|
89
|
+
### Data scope
|
|
90
|
+
|
|
91
|
+
Set the data filtering scope for the comment list. You can add more conditions here, such as showing only comments that match certain status or permission conditions.
|
|
92
|
+
|
|
93
|
+
For more details, see [Set data scope](../block-settings/data-scope.md).
|
|
94
|
+
|
|
95
|
+
### Default sorting rule
|
|
96
|
+
|
|
97
|
+
Set the default sorting rule for the comment list. Usually, you can sort by the comment date field in ascending or descending order.
|
|
98
|
+
|
|
99
|
+
If no default sorting rule is configured separately, the Comment block prioritizes the "Comment date field" as the default sorting field.
|
|
100
|
+
|
|
101
|
+
For more details, see [Set sorting rule](../block-settings/sorting-rule.md).
|
|
102
|
+
|
|
103
|
+
### Auto jump to last page
|
|
104
|
+
|
|
105
|
+
Disabled by default. When disabled, the Comment block stays on the first page after opening.
|
|
106
|
+
|
|
107
|
+
When enabled, the Comment block jumps to the last page on first load. This is suitable when you want users to see the latest comments first.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
pkg: '@nocobase/plugin-version-control'
|
|
2
3
|
title: "Version control"
|
|
3
4
|
description: "Version control plugin guide: automatically save versions during AI Builder sessions, create and restore versions manually, configure retention, set shortcuts, and include user collections in saved versions."
|
|
4
5
|
keywords: "Version control,ops management,AI Builder,nocobase-revision,nb revision create,create version,restore version,NocoBase"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Block: Comment"
|
|
3
|
+
keywords: "Block: Comment,comment block,comment collection,plugin,NocoBase"
|
|
4
|
+
displayName: "Block: Comment"
|
|
5
|
+
packageName: '@nocobase/plugin-block-comment'
|
|
6
|
+
description: |
|
|
7
|
+
Provides a Comment block for viewing and creating comments in record details, pop-ups, and similar scenarios.
|
|
8
|
+
isFree: true
|
|
9
|
+
builtIn: true
|
|
10
|
+
defaultEnabled: false
|
|
11
|
+
editionLevel: 0
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Block: Comment
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "API Reference"
|
|
3
|
+
description: "Workflow extension API reference: Workflow Model, node execution context, trigger API, variable passing."
|
|
4
|
+
keywords: "workflow,API reference,Workflow Model,node context,trigger API,NocoBase"
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# API Reference
|
|
2
8
|
|
|
3
9
|
## Server-side
|
|
@@ -29,9 +35,9 @@ Extends and registers a new trigger type.
|
|
|
29
35
|
|
|
30
36
|
**Parameters**
|
|
31
37
|
|
|
32
|
-
| Parameter | Type
|
|
33
|
-
| --------- | --------------------------- |
|
|
34
|
-
| `type`
|
|
38
|
+
| Parameter | Type | Description |
|
|
39
|
+
| --------- | --------------------------- | ------------------------ |
|
|
40
|
+
| `type` | `string` | Trigger type identifier |
|
|
35
41
|
| `trigger` | `typeof Trigger \| Trigger` | Trigger type or instance |
|
|
36
42
|
|
|
37
43
|
**Example**
|
|
@@ -84,9 +90,9 @@ Extends and registers a new node type.
|
|
|
84
90
|
|
|
85
91
|
**Parameters**
|
|
86
92
|
|
|
87
|
-
| Parameter
|
|
88
|
-
| ------------- | ----------------------------------- |
|
|
89
|
-
| `type`
|
|
93
|
+
| Parameter | Type | Description |
|
|
94
|
+
| ------------- | ----------------------------------- | -------------------------- |
|
|
95
|
+
| `type` | `string` | Instruction type identifier |
|
|
90
96
|
| `instruction` | `typeof Instruction \| Instruction` | Instruction type or instance |
|
|
91
97
|
|
|
92
98
|
**Example**
|
|
@@ -128,7 +134,7 @@ Triggers a specific workflow. Mainly used in custom triggers to trigger the corr
|
|
|
128
134
|
| `workflow` | `WorkflowModel` | The workflow object to be triggered |
|
|
129
135
|
| `context` | `object` | Context data provided at trigger time |
|
|
130
136
|
|
|
131
|
-
:::info{title=
|
|
137
|
+
:::info{title=Note}
|
|
132
138
|
`context` is currently a required item. If not provided, the workflow will not be triggered.
|
|
133
139
|
:::
|
|
134
140
|
|
|
@@ -163,11 +169,11 @@ Resumes a waiting workflow with a specific node job.
|
|
|
163
169
|
|
|
164
170
|
**Parameters**
|
|
165
171
|
|
|
166
|
-
| Parameter | Type
|
|
167
|
-
|
|
|
168
|
-
| `job`
|
|
172
|
+
| Parameter | Type | Description |
|
|
173
|
+
| --------- | ---------- | ---------------------- |
|
|
174
|
+
| `job` | `JobModel` | The updated job object |
|
|
169
175
|
|
|
170
|
-
:::info{title=
|
|
176
|
+
:::info{title=Note}
|
|
171
177
|
The passed job object is generally an updated object, and its `status` is usually updated to a value other than `JOB_STATUS.PENDING`, otherwise it will continue to wait.
|
|
172
178
|
:::
|
|
173
179
|
|
|
@@ -179,11 +185,15 @@ See [source code](https://github.com/nocobase/nocobase/blob/main/packages/plugin
|
|
|
179
185
|
|
|
180
186
|
The base class for triggers, used to extend custom trigger types.
|
|
181
187
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
|
188
|
+
```ts
|
|
189
|
+
import { Trigger } from '@nocobase/plugin-workflow';
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
| Parameter | Type | Description |
|
|
193
|
+
| ------------- | ----------------------------------------------------------- | ---------------------------------------- |
|
|
194
|
+
| `constructor` | `(public readonly workflow: PluginWorkflowServer): Trigger` | Constructor |
|
|
195
|
+
| `on?` | `(workflow: WorkflowModel): void` | Event handler after enabling a workflow |
|
|
196
|
+
| `off?` | `(workflow: WorkflowModel): void` | Event handler after disabling a workflow |
|
|
187
197
|
|
|
188
198
|
`on`/`off` are used to register/unregister event listeners when a workflow is enabled/disabled. The passed parameter is the workflow instance corresponding to the trigger, which can be processed according to the configuration. Some trigger types that already have globally listened events may not need to implement these two methods. For example, in a scheduled trigger, you can register a timer in `on` and unregister it in `off`.
|
|
189
199
|
|
|
@@ -191,12 +201,16 @@ The base class for triggers, used to extend custom trigger types.
|
|
|
191
201
|
|
|
192
202
|
The base class for instruction types, used to extend custom instruction types.
|
|
193
203
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
|
199
|
-
|
|
|
204
|
+
```ts
|
|
205
|
+
import { Instruction } from '@nocobase/plugin-workflow';
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
| Parameter | Type | Description |
|
|
209
|
+
| ------------- | --------------------------------------------------------------- | ------------------------------------------------------------------------------ |
|
|
210
|
+
| `constructor` | `(public readonly workflow: PluginWorkflowServer): Instruction` | Constructor |
|
|
211
|
+
| `run` | `Runner` | Execution logic for the first entry into the node |
|
|
212
|
+
| `resume?` | `Runner` | Execution logic for entering the node after resuming from an interruption |
|
|
213
|
+
| `getScope?` | `(node: FlowNodeModel, data: any, processor: Processor): any` | Provides the local variable content for the branch generated by the corresponding node |
|
|
200
214
|
|
|
201
215
|
**Related Types**
|
|
202
216
|
|
|
@@ -230,16 +244,20 @@ For `getScope`, you can refer to the [implementation of the loop node](https://g
|
|
|
230
244
|
|
|
231
245
|
A constant table for workflow execution plan statuses, used to identify the current status of the corresponding execution plan.
|
|
232
246
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
|
238
|
-
|
|
|
239
|
-
| `EXECUTION_STATUS.
|
|
240
|
-
| `EXECUTION_STATUS.
|
|
241
|
-
| `EXECUTION_STATUS.
|
|
242
|
-
| `EXECUTION_STATUS.
|
|
247
|
+
```ts
|
|
248
|
+
import { EXECUTION_STATUS } from '@nocobase/plugin-workflow';
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
| Constant Name | Meaning |
|
|
252
|
+
| ------------------------------- | --------------------------------------- |
|
|
253
|
+
| `EXECUTION_STATUS.QUEUEING` | Queueing |
|
|
254
|
+
| `EXECUTION_STATUS.STARTED` | Started |
|
|
255
|
+
| `EXECUTION_STATUS.RESOLVED` | Resolved |
|
|
256
|
+
| `EXECUTION_STATUS.FAILED` | Failed |
|
|
257
|
+
| `EXECUTION_STATUS.ERROR` | Error |
|
|
258
|
+
| `EXECUTION_STATUS.ABORTED` | Aborted |
|
|
259
|
+
| `EXECUTION_STATUS.CANCELED` | Canceled |
|
|
260
|
+
| `EXECUTION_STATUS.REJECTED` | Rejected |
|
|
243
261
|
| `EXECUTION_STATUS.RETRY_NEEDED` | Not successfully executed, retry needed |
|
|
244
262
|
|
|
245
263
|
Except for the first three, all others represent a failed state, but can be used to describe different reasons for failure.
|
|
@@ -248,33 +266,39 @@ Except for the first three, all others represent a failed state, but can be used
|
|
|
248
266
|
|
|
249
267
|
A constant table for workflow node job statuses, used to identify the current status of the corresponding node job. The status generated by the node also affects the status of the entire execution plan.
|
|
250
268
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
|
256
|
-
|
|
|
257
|
-
| `JOB_STATUS.
|
|
258
|
-
| `JOB_STATUS.
|
|
259
|
-
| `JOB_STATUS.
|
|
260
|
-
| `JOB_STATUS.
|
|
269
|
+
```ts
|
|
270
|
+
import { JOB_STATUS } from '@nocobase/plugin-workflow';
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
| Constant Name | Meaning |
|
|
274
|
+
| -------------------------- | ------------------------------------------------------------------------------------------------ |
|
|
275
|
+
| `JOB_STATUS.PENDING` | Pending: Execution has reached this node, but the instruction requires it to suspend and wait |
|
|
276
|
+
| `JOB_STATUS.RESOLVED` | Resolved |
|
|
277
|
+
| `JOB_STATUS.FAILED` | Failed: The execution of this node failed to meet the configured conditions |
|
|
278
|
+
| `JOB_STATUS.ERROR` | Error: An unhandled error occurred during the execution of this node |
|
|
279
|
+
| `JOB_STATUS.ABORTED` | Aborted: The execution of this node was terminated by other logic after being in a pending state |
|
|
280
|
+
| `JOB_STATUS.CANCELED` | Canceled: The execution of this node was manually canceled after being in a pending state |
|
|
281
|
+
| `JOB_STATUS.REJECTED` | Rejected: The continuation of this node was manually rejected after being in a pending state |
|
|
282
|
+
| `JOB_STATUS.RETRY_NEEDED` | Not successfully executed, retry needed |
|
|
261
283
|
|
|
262
284
|
## Client-side
|
|
263
285
|
|
|
264
286
|
The APIs available in the client-side package structure are shown in the following code:
|
|
265
287
|
|
|
266
288
|
```ts
|
|
267
|
-
import
|
|
289
|
+
import PluginWorkflowClientV2, {
|
|
268
290
|
Trigger,
|
|
269
291
|
Instruction,
|
|
270
|
-
} from '@nocobase/plugin-workflow/client';
|
|
292
|
+
} from '@nocobase/plugin-workflow/client-v2';
|
|
271
293
|
```
|
|
272
294
|
|
|
273
|
-
### `
|
|
295
|
+
### `PluginWorkflowClientV2`
|
|
296
|
+
|
|
297
|
+
Workflow client plugin class. Usually obtained via `this.app.pm.get('workflow')`.
|
|
274
298
|
|
|
275
299
|
#### `registerTrigger()`
|
|
276
300
|
|
|
277
|
-
Registers the configuration panel for
|
|
301
|
+
Registers the configuration panel for a trigger type.
|
|
278
302
|
|
|
279
303
|
**Signature**
|
|
280
304
|
|
|
@@ -283,13 +307,13 @@ Registers the configuration panel for the trigger type.
|
|
|
283
307
|
**Parameters**
|
|
284
308
|
|
|
285
309
|
| Parameter | Type | Description |
|
|
286
|
-
|
|
|
287
|
-
| `type` | `string` | Trigger type identifier, consistent with the
|
|
310
|
+
| --- | --- | --- |
|
|
311
|
+
| `type` | `string` | Trigger type identifier, consistent with the server-side registered identifier |
|
|
288
312
|
| `trigger` | `typeof Trigger \| Trigger` | Trigger type or instance |
|
|
289
313
|
|
|
290
314
|
#### `registerInstruction()`
|
|
291
315
|
|
|
292
|
-
Registers the configuration panel for
|
|
316
|
+
Registers the configuration panel for a node type.
|
|
293
317
|
|
|
294
318
|
**Signature**
|
|
295
319
|
|
|
@@ -298,8 +322,8 @@ Registers the configuration panel for the node type.
|
|
|
298
322
|
**Parameters**
|
|
299
323
|
|
|
300
324
|
| Parameter | Type | Description |
|
|
301
|
-
|
|
|
302
|
-
| `type` | `string` | Node type identifier, consistent with the
|
|
325
|
+
| --- | --- | --- |
|
|
326
|
+
| `type` | `string` | Node type identifier, consistent with the server-side registered identifier |
|
|
303
327
|
| `instruction` | `typeof Instruction \| Instruction` | Node type or instance |
|
|
304
328
|
|
|
305
329
|
#### `registerInstructionGroup()`
|
|
@@ -320,63 +344,221 @@ If you need to extend other groups, you can use this method to register them.
|
|
|
320
344
|
**Parameters**
|
|
321
345
|
|
|
322
346
|
| Parameter | Type | Description |
|
|
323
|
-
|
|
|
324
|
-
| `type` | `string` | Node group identifier
|
|
347
|
+
| --- | --- | --- |
|
|
348
|
+
| `type` | `string` | Node group identifier |
|
|
325
349
|
| `group` | `{ label: string }` | Group information, currently only includes the title |
|
|
326
350
|
|
|
327
351
|
**Example**
|
|
328
352
|
|
|
329
|
-
```
|
|
330
|
-
|
|
331
|
-
load() {
|
|
332
|
-
const pluginWorkflow = this.app.pm.get(PluginWorkflowClient);
|
|
353
|
+
```ts
|
|
354
|
+
import { Plugin } from '@nocobase/client-v2';
|
|
333
355
|
|
|
356
|
+
export default class YourPluginClient extends Plugin {
|
|
357
|
+
async load() {
|
|
358
|
+
const pluginWorkflow = this.app.pm.get('workflow');
|
|
334
359
|
pluginWorkflow.registerInstructionGroup('ai', { label: `{{t("AI", { ns: "${NAMESPACE}" })}}` });
|
|
335
360
|
}
|
|
336
361
|
}
|
|
337
362
|
```
|
|
338
363
|
|
|
364
|
+
#### `isWorkflowSync()`
|
|
365
|
+
|
|
366
|
+
Determines whether a workflow is in synchronous mode.
|
|
367
|
+
|
|
368
|
+
**Signature**
|
|
369
|
+
|
|
370
|
+
`isWorkflowSync(workflow: object): boolean`
|
|
371
|
+
|
|
339
372
|
### `Trigger`
|
|
340
373
|
|
|
341
374
|
The base class for triggers, used to extend custom trigger types.
|
|
342
375
|
|
|
343
376
|
| Parameter | Type | Description |
|
|
344
|
-
|
|
|
377
|
+
| --- | --- | --- |
|
|
345
378
|
| `title` | `string` | Trigger type name |
|
|
346
|
-
| `
|
|
347
|
-
| `
|
|
348
|
-
| `
|
|
349
|
-
| `
|
|
379
|
+
| `description?` | `string` | Trigger type description |
|
|
380
|
+
| `PresetFieldsetLoader?` | `LoaderOf` | Preset configuration form on creation (lazy-loaded) |
|
|
381
|
+
| `FieldsetLoader?` | `LoaderOf` | Full trigger configuration form (lazy-loaded) |
|
|
382
|
+
| `TriggerFieldsetLoader?` | `LoaderOf` | Input form for manual execution (lazy-loaded) |
|
|
383
|
+
| `validate` | `(config: Record<string, unknown>) => boolean` | Configuration validation; returns `true` if the configuration is valid |
|
|
384
|
+
| `createDefaultConfig?` | `() => Record<string, unknown>` | Provides default configuration values |
|
|
385
|
+
| `useVariables?` | `(config, options?: UseVariableOptions) => VariableOption[] \| null` | Variable options for trigger context data |
|
|
386
|
+
| `getCreateModelMenuItem?` | `(args) => SubModelItem \| SubModelItem[] \| null` | Menu items for creating sub-models on the canvas |
|
|
387
|
+
| `useTempAssociationSource?` | `(config, workflow?) => TriggerTempAssociationSource \| null` | Provides a temporary association data source |
|
|
350
388
|
|
|
351
|
-
|
|
389
|
+
**Related Types**
|
|
390
|
+
|
|
391
|
+
```ts
|
|
392
|
+
export type LoaderOf<P = {}> = () => Promise<{ default: ComponentType<P> }>;
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
- If `useVariables` is not set, it means that this trigger type does not provide a value retrieval function, and the trigger's context data cannot be selected in the workflow nodes.
|
|
352
396
|
|
|
353
397
|
### `Instruction`
|
|
354
398
|
|
|
355
399
|
The base class for instructions, used to extend custom node types.
|
|
356
400
|
|
|
357
401
|
| Parameter | Type | Description |
|
|
358
|
-
|
|
|
359
|
-
| `
|
|
360
|
-
| `
|
|
361
|
-
| `
|
|
362
|
-
| `
|
|
363
|
-
| `
|
|
364
|
-
| `
|
|
365
|
-
| `
|
|
366
|
-
| `
|
|
367
|
-
| `
|
|
402
|
+
| --- | --- | --- |
|
|
403
|
+
| `title` | `string` | Node type name |
|
|
404
|
+
| `type` | `string` | Node type identifier |
|
|
405
|
+
| `group` | `string` | Node type group identifier, options: `'control'`/`'collection'`/`'manual'`/`'extended'` |
|
|
406
|
+
| `description?` | `string` | Node type description |
|
|
407
|
+
| `icon?` | `JSX.Element` | Node icon |
|
|
408
|
+
| `FieldsetLoader?` | `LoaderOf` | Node configuration drawer form (lazy-loaded) |
|
|
409
|
+
| `PresetFieldsetLoader?` | `LoaderOf` | Preset configuration form on creation (lazy-loaded) |
|
|
410
|
+
| `ComponentLoader?` | `LoaderOf<{ data: any }>` | Custom node rendering on the canvas (lazy-loaded), used for branch nodes and other cases requiring special rendering |
|
|
411
|
+
| `branching?` | `boolean \| object \| ((config) => boolean \| object)` | Declares whether the node is a branch node |
|
|
412
|
+
| `end?` | `boolean \| ((node) => boolean)` | Declares whether the node is a terminal node |
|
|
413
|
+
| `testable?` | `boolean` | Declares whether the node supports test runs |
|
|
414
|
+
| `createDefaultConfig?` | `() => object` | Provides default configuration values |
|
|
415
|
+
| `useVariables?` | `(node, options?: UseVariableOptions) => VariableOption` | Method for the node to provide variable options |
|
|
416
|
+
| `useScopeVariables?` | `(node, options?) => VariableOption[] \| MetaTreeNode[]` | Method for the node to provide branch-scoped variable options |
|
|
417
|
+
| `isAvailable?` | `(ctx: NodeAvailableContext) => boolean` | Method to determine whether the node is available |
|
|
418
|
+
| `getCreateModelMenuItem?` | `({ node, workflow }) => SubModelItem \| null` | Menu items for creating sub-models on the canvas |
|
|
419
|
+
| `useTempAssociationSource?` | `(node) => TempAssociationSource \| null` | Provides a temporary association data source |
|
|
368
420
|
|
|
369
421
|
**Related Types**
|
|
370
422
|
|
|
371
423
|
```ts
|
|
372
424
|
export type NodeAvailableContext = {
|
|
425
|
+
engine: WorkflowPlugin;
|
|
373
426
|
workflow: object;
|
|
374
427
|
upstream: object;
|
|
375
428
|
branchIndex: number;
|
|
376
429
|
};
|
|
377
430
|
```
|
|
378
431
|
|
|
379
|
-
- If `useVariables` is not set, it means that this node type does not provide a value retrieval function, and the result data of this type of node cannot be selected in the workflow nodes. If the result value is singular (not selectable), you can return static content that expresses the corresponding information (see: [calculation node source code](https://github.com/nocobase/nocobase/blob/
|
|
380
|
-
- `
|
|
381
|
-
- `
|
|
382
|
-
|
|
432
|
+
- If `useVariables` is not set, it means that this node type does not provide a value retrieval function, and the result data of this type of node cannot be selected in the workflow nodes. If the result value is singular (not selectable), you can return static content that expresses the corresponding information (see: [calculation node source code](https://github.com/nocobase/nocobase/blob/develop/packages/plugins/%40nocobase/plugin-workflow/src/client-v2/nodes/calculation.tsx)). If it needs to be selectable (e.g., a property of an Object), you can customize the corresponding selection component output (see: [query data node source code](https://github.com/nocobase/nocobase/blob/develop/packages/plugins/%40nocobase/plugin-workflow/src/client-v2/nodes/query.tsx)).
|
|
433
|
+
- `ComponentLoader` is a custom rendering component for the node. When the default node rendering is not sufficient, it can be completely overridden for custom node view rendering. For example, to provide additional branch rendering for branch-type nodes (see: [condition node source code](https://github.com/nocobase/nocobase/blob/develop/packages/plugins/%40nocobase/plugin-workflow/src/client-v2/nodes/condition.tsx)).
|
|
434
|
+
- `isAvailable` is mainly used to determine whether a node can be used (added) in the current environment. The current environment includes the workflow plugin instance, the current workflow, upstream nodes, and the current branch index.
|
|
435
|
+
|
|
436
|
+
### Variable Input Components
|
|
437
|
+
|
|
438
|
+
The workflow provides a set of variable input components for letting users select workflow variables in node/trigger configuration forms.
|
|
439
|
+
|
|
440
|
+
```ts
|
|
441
|
+
import {
|
|
442
|
+
WorkflowVariableInput,
|
|
443
|
+
WorkflowVariableTextArea,
|
|
444
|
+
WorkflowTypedVariableInput,
|
|
445
|
+
WorkflowVariableWrapper,
|
|
446
|
+
} from '@nocobase/plugin-workflow/client-v2';
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
#### `WorkflowVariableInput`
|
|
450
|
+
|
|
451
|
+
Variable input that supports selecting a variable and continuing to type content. Suitable for single-line input scenarios that require a mix of variable references and free text.
|
|
452
|
+
|
|
453
|
+
```tsx
|
|
454
|
+
import { WorkflowVariableInput } from '@nocobase/plugin-workflow/client-v2';
|
|
455
|
+
|
|
456
|
+
<Form.Item name={['config', 'target']} label="Target">
|
|
457
|
+
<WorkflowVariableInput />
|
|
458
|
+
</Form.Item>
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+

|
|
462
|
+
|
|
463
|
+
**Props**
|
|
464
|
+
|
|
465
|
+
| Parameter | Type | Description |
|
|
466
|
+
| --- | --- | --- |
|
|
467
|
+
| `value?` | `string` | Variable path value, e.g. `{{$jobsMapByNodeKey.xxx.field}}` |
|
|
468
|
+
| `onChange?` | `(value: string) => void` | Value change callback |
|
|
469
|
+
| `variableOptions?` | `UseWorkflowVariableOptions` | Variable filter options (type filtering, depth, etc.) |
|
|
470
|
+
| `disabled?` | `boolean` | Whether disabled |
|
|
471
|
+
| `placeholder?` | `string` | Placeholder text |
|
|
472
|
+
|
|
473
|
+
#### `WorkflowVariableTextArea`
|
|
474
|
+
|
|
475
|
+
Multi-line text area that supports inserting variable references at any cursor position. Suitable for free text scenarios such as HTTP Body, template text, etc.
|
|
476
|
+
|
|
477
|
+
```tsx
|
|
478
|
+
import { WorkflowVariableTextArea } from '@nocobase/plugin-workflow/client-v2';
|
|
479
|
+
|
|
480
|
+
<Form.Item name={['config', 'body']} label="Body">
|
|
481
|
+
<WorkflowVariableTextArea autoSize={{ minRows: 5 }} />
|
|
482
|
+
</Form.Item>
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+

|
|
486
|
+
|
|
487
|
+
**Props**
|
|
488
|
+
|
|
489
|
+
| Parameter | Type | Description |
|
|
490
|
+
| --- | --- | --- |
|
|
491
|
+
| `value?` | `string` | Text value (may contain variable references) |
|
|
492
|
+
| `onChange?` | `(value: string) => void` | Value change callback |
|
|
493
|
+
| `variableOptions?` | `UseWorkflowVariableOptions` | Variable filter options |
|
|
494
|
+
| `delimiters?` | `readonly [string, string]` | Variable delimiters, defaults to `['{{', '}}']` |
|
|
495
|
+
|
|
496
|
+
Inherits other Props from antd `TextArea` (such as `autoSize`, `placeholder`, etc.).
|
|
497
|
+
|
|
498
|
+
#### `WorkflowTypedVariableInput`
|
|
499
|
+
|
|
500
|
+
Typed input that switches between "constant" and "variable reference" modes. In variable mode, you can only select a variable; you cannot continue typing after selection. In constant mode, five types are supported: `string`, `number`, `boolean`, `date`, and `object`.
|
|
501
|
+
|
|
502
|
+
```tsx
|
|
503
|
+
import { WorkflowTypedVariableInput } from '@nocobase/plugin-workflow/client-v2';
|
|
504
|
+
|
|
505
|
+
<Form.Item name={['config', 'value']} label="Value">
|
|
506
|
+
<WorkflowTypedVariableInput />
|
|
507
|
+
</Form.Item>
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+

|
|
511
|
+
|
|
512
|
+
**Props**
|
|
513
|
+
|
|
514
|
+
| Parameter | Type | Description |
|
|
515
|
+
| --- | --- | --- |
|
|
516
|
+
| `variableOptions?` | `UseWorkflowVariableOptions` | Variable filter options |
|
|
517
|
+
|
|
518
|
+
Inherits other Props from `TypedVariableInput` (excluding internally used `extraNodes`, `metaTree`, `namespaces`).
|
|
519
|
+
|
|
520
|
+
#### `WorkflowVariableWrapper`
|
|
521
|
+
|
|
522
|
+
Generic wrapper for substituting different input components in different contexts. For example, when the same field requires different input methods in the trigger node configuration and the node configuration drawer, you can use this component to wrap a native input into a variable-mode-switchable input.
|
|
523
|
+
|
|
524
|
+
```tsx
|
|
525
|
+
import { WorkflowVariableWrapper } from '@nocobase/plugin-workflow/client-v2';
|
|
526
|
+
|
|
527
|
+
<Form.Item name={['config', 'timeout']} label="Timeout">
|
|
528
|
+
<WorkflowVariableWrapper
|
|
529
|
+
render={({ value, onChange }) => (
|
|
530
|
+
<InputNumber value={value} onChange={onChange} min={0} />
|
|
531
|
+
)}
|
|
532
|
+
/>
|
|
533
|
+
</Form.Item>
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
**Props**
|
|
537
|
+
|
|
538
|
+
| Parameter | Type | Description |
|
|
539
|
+
| --- | --- | --- |
|
|
540
|
+
| `value?` | `TValue \| string \| null` | Current value (constant value or variable path string) |
|
|
541
|
+
| `onChange?` | `(value: TValue \| string \| null) => void` | Value change callback |
|
|
542
|
+
| `variableOptions?` | `UseWorkflowVariableOptions` | Variable filter options |
|
|
543
|
+
| `render` | `(props: { value?, onChange? }) => ReactNode` | Renders the native input component |
|
|
544
|
+
| `clearValue?` | `TValue \| null` | Initial value when switching from variable mode back to constant mode, defaults to `null` |
|
|
545
|
+
|
|
546
|
+
### Collection-related Components
|
|
547
|
+
|
|
548
|
+
The workflow also provides a set of collection-related helper components:
|
|
549
|
+
|
|
550
|
+
```ts
|
|
551
|
+
import {
|
|
552
|
+
CollectionCascader,
|
|
553
|
+
AppendsSelect,
|
|
554
|
+
FieldsSelect,
|
|
555
|
+
SortFieldsInput,
|
|
556
|
+
PaginationFields,
|
|
557
|
+
} from '@nocobase/plugin-workflow/client-v2';
|
|
558
|
+
```
|
|
559
|
+
|
|
560
|
+
- `CollectionCascader` — Data-source-aware collection selector (cascader)
|
|
561
|
+
- `AppendsSelect` — Association field preloading selector (tree select)
|
|
562
|
+
- `FieldsSelect` — Collection field multi-selector
|
|
563
|
+
- `SortFieldsInput` — Sort field input
|
|
564
|
+
- `PaginationFields` — Pagination parameter form items
|