@nocobase/plugin-ai 2.2.0-alpha.4 → 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.
Files changed (382) hide show
  1. package/client-v2.d.ts +1 -0
  2. package/dist/ai/docs/nocobase/api/app/env.md +28 -1
  3. package/dist/ai/docs/nocobase/api/cli/config/delete.md +8 -6
  4. package/dist/ai/docs/nocobase/api/cli/config/get.md +8 -6
  5. package/dist/ai/docs/nocobase/api/cli/config/index.md +37 -26
  6. package/dist/ai/docs/nocobase/api/cli/config/set.md +14 -8
  7. package/dist/ai/docs/nocobase/file-manager/field-attachment.md +6 -0
  8. package/dist/ai/docs/nocobase/file-manager/file-preview/index.md +3 -12
  9. package/dist/ai/docs/nocobase/file-manager/storage/aliyun-oss.md +9 -0
  10. package/dist/ai/docs/nocobase/file-manager/storage/amazon-s3.md +9 -0
  11. package/dist/ai/docs/nocobase/file-manager/storage/index.md +23 -0
  12. package/dist/ai/docs/nocobase/file-manager/storage/local.md +9 -0
  13. package/dist/ai/docs/nocobase/file-manager/storage/migrate-to-s3-pro.md +269 -0
  14. package/dist/ai/docs/nocobase/file-manager/storage/tencent-cos.md +9 -0
  15. package/dist/ai/docs/nocobase/get-started/installation/docker-caddy.mdx +170 -0
  16. package/dist/ai/docs/nocobase/get-started/installation/docker-nginx.mdx +172 -0
  17. package/dist/ai/docs/nocobase/get-started/installation/env.md +14 -4
  18. package/dist/ai/docs/nocobase/interface-builder/blocks/data-blocks/comment.md +107 -0
  19. package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-block-comment/index.md +14 -0
  20. package/dist/ai/docs/nocobase/workflow/development/api.md +259 -77
  21. package/dist/ai/docs/nocobase/workflow/development/index.md +2 -1
  22. package/dist/ai/docs/nocobase/workflow/development/migration.md +319 -0
  23. package/dist/ai/docs/nocobase/workflow/development/node.md +84 -51
  24. package/dist/ai/docs/nocobase/workflow/development/trigger.md +122 -20
  25. package/dist/client/23.65ea8c37cd4b884b.js +10 -0
  26. package/dist/client/264.cc98933ef65608b6.js +10 -0
  27. package/dist/client/336.7a8a8853196ad779.js +11 -0
  28. package/dist/client/372.da38fe350bf841f4.js +10 -0
  29. package/dist/client/416.92b74ca47e4099c4.js +10 -0
  30. package/dist/client/446.d63c38d0309fe250.js +10 -0
  31. package/dist/client/525.203778500aca5d05.js +10 -0
  32. package/dist/client/663.680bcf6272a8504d.js +10 -0
  33. package/dist/client/681.399948c18d753667.js +10 -0
  34. package/dist/client/705.380279da896021fb.js +10 -0
  35. package/dist/client/ai-employees/1.x/selector/AIContextCollector.d.ts +1 -4
  36. package/dist/client/ai-employees/permissions/PermissionsTab.d.ts +21 -5
  37. package/dist/client/index.d.ts +15 -20
  38. package/dist/client/index.js +8 -8
  39. package/dist/client/workflow/nodes/employee/index.d.ts +2 -23
  40. package/dist/client/workflow/nodes/llm/index.d.ts +2 -52
  41. package/dist/client/workflow/triggers/ai-employee/index.d.ts +2 -83
  42. package/dist/client-v2/23.1bcb6986b40723d8.js +10 -0
  43. package/dist/client-v2/264.be92ff6a4d2612f1.js +10 -0
  44. package/dist/client-v2/336.e406470429e0670e.js +11 -0
  45. package/dist/client-v2/372.d76ea1ceed2be2a4.js +10 -0
  46. package/dist/client-v2/406.341be51205c674e0.js +10 -0
  47. package/dist/client-v2/416.0e1c2d9cde43b83d.js +10 -0
  48. package/dist/client-v2/446.073d450882db29fd.js +10 -0
  49. package/dist/client-v2/457.d72febb89e88fc00.js +10 -0
  50. package/dist/client-v2/663.342341f0b2b412d8.js +10 -0
  51. package/dist/client-v2/681.082f4f1c7b841983.js +10 -0
  52. package/dist/client-v2/705.1d10027ff8cfdf79.js +10 -0
  53. package/dist/{client/ai-employees/admin/AvatarSelect.d.ts → client-v2/ai-employees/AIEmployeeDropdown.d.ts} +8 -9
  54. package/dist/client-v2/ai-employees/AIEmployeeShortcut.d.ts +9 -2
  55. package/dist/{client → client-v2}/ai-employees/AddContextButton.d.ts +1 -1
  56. package/dist/{client → client-v2}/ai-employees/ai-coding/AICodingButton.d.ts +2 -1
  57. package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/Actions.d.ts +2 -4
  58. package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/AddLLMModal.d.ts +2 -4
  59. package/dist/client-v2/ai-employees/chatbox/components/Attachments.d.ts +27 -0
  60. package/dist/{client/ai-employees/permissions/Permissions.d.ts → client-v2/ai-employees/chatbox/components/ChatBox.d.ts} +2 -2
  61. package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/ChatBoxLayout.d.ts +1 -1
  62. package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/ContextItem.d.ts +1 -1
  63. package/dist/{client/ai-employees/admin/Employees.d.ts → client-v2/ai-employees/chatbox/components/DebugPanel.d.ts} +1 -1
  64. package/dist/{client/ai-employees/chatbox/markdown/Code.d.ts → client-v2/ai-employees/chatbox/components/Markdown.d.ts} +12 -5
  65. package/dist/{client/ai-employees/admin/ProfileSettings.d.ts → client-v2/ai-employees/chatbox/components/MessageContent.d.ts} +3 -2
  66. package/dist/client-v2/ai-employees/chatbox/components/MessageRenderers.d.ts +39 -0
  67. package/dist/{client/ai-employees/chatbox/generative-ui → client-v2/ai-employees/chatbox/components}/ToolCard.d.ts +7 -5
  68. package/dist/{client/ai-employees/admin/datasource/components/basic → client-v2/ai-employees/chatbox/components}/index.d.ts +5 -2
  69. package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useChat.d.ts +21 -22
  70. package/dist/client-v2/ai-employees/chatbox/hooks/useChatBoxActions.d.ts +3 -2
  71. package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useChatConversationActions.d.ts +2 -2
  72. package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useChatMessageActions.d.ts +8 -4
  73. package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useToolCallActions.d.ts +1 -1
  74. package/dist/client-v2/ai-employees/chatbox/hooks/useUploadFiles.d.ts +46 -0
  75. package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useWorkflowTasks.d.ts +1 -1
  76. package/dist/{client → client-v2}/ai-employees/chatbox/model.d.ts +9 -2
  77. package/dist/client-v2/ai-employees/chatbox/roles.d.ts +162 -0
  78. package/dist/client-v2/ai-employees/chatbox/stores/chat-box.d.ts +1 -49
  79. package/dist/client-v2/ai-employees/chatbox/stores/chat-conversations.d.ts +2 -19
  80. package/dist/client-v2/ai-employees/chatbox/stores/chat-messages.d.ts +1 -46
  81. package/dist/{client → client-v2}/ai-employees/chatbox/stores/chat-tool-call.d.ts +1 -15
  82. package/dist/client-v2/ai-employees/chatbox/stores/chat-tools.d.ts +30 -0
  83. package/dist/client-v2/ai-employees/chatbox/stores/create-selectors.d.ts +31 -3
  84. package/dist/{client/ai-employees/chatbox/conversations/common.d.ts → client-v2/ai-employees/chatbox/stores/workflow-tasks.d.ts} +21 -4
  85. package/dist/{client → client-v2}/ai-employees/chatbox/utils.d.ts +21 -6
  86. package/dist/{client/ai-employees/data-visualization/context.d.ts → client-v2/ai-employees/context/chart-config.d.ts} +1 -1
  87. package/dist/{client → client-v2}/ai-employees/context/code-editor.d.ts +1 -1
  88. package/dist/{client → client-v2}/ai-employees/context/datasource.d.ts +1 -1
  89. package/dist/{client → client-v2}/ai-employees/context/flow-models.d.ts +1 -1
  90. package/dist/{client/ai-employees/admin/datasource/components/DatasourceSettingDetail.d.ts → client-v2/ai-employees/data-modeling/setup.d.ts} +6 -5
  91. package/dist/{client → client-v2}/ai-employees/datasource/DatasourceSelector.d.ts +6 -2
  92. package/dist/{client/ai-employees/admin/datasource/flow-models/DatasourceSettingModel.d.ts → client-v2/ai-employees/flow/index.d.ts} +4 -6
  93. package/dist/{client → client-v2}/ai-employees/form-filler/tools/index.d.ts +1 -1
  94. package/dist/{client → client-v2}/ai-employees/stores/ai-selection.d.ts +4 -4
  95. package/dist/{client → client-v2}/ai-employees/stores/dialog-controller.d.ts +4 -4
  96. package/dist/{client/ai-employees/business-report/ui → client-v2/ai-employees/tools}/BusinessReportCard.d.ts +2 -2
  97. package/dist/{client/ai-employees/business-report/ui → client-v2/ai-employees/tools}/BusinessReportModal.d.ts +2 -2
  98. package/dist/{client/ai-employees/1.x/selector/withAISelectable.d.ts → client-v2/ai-employees/tools/ChartGeneratorCard.d.ts} +5 -4
  99. package/dist/{client/ai-employees/ai-coding/ui → client-v2/ai-employees/tools}/CodeToolCard.d.ts +1 -1
  100. package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools}/DataModelingCard.d.ts +3 -5
  101. package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools}/DataModelingModal.d.ts +4 -6
  102. package/dist/{client/ai-employees/sub-agents/ui → client-v2/ai-employees/tools}/SubAgentDispatchCard.d.ts +4 -9
  103. package/dist/{client/ai-employees/AISettingsProvider.d.ts → client-v2/ai-employees/tools/SuggestionsOptionsCard.d.ts} +6 -8
  104. package/dist/{client/ai-employees/workflow-tasks/ui → client-v2/ai-employees/tools}/WorkflowTaskOutputCard.d.ts +7 -2
  105. package/dist/{client/ai-employees/ai-coding/tools/context-tools.d.ts → client-v2/ai-employees/tools/ai-coding.d.ts} +3 -1
  106. package/dist/client-v2/ai-employees/tools/business-report-utils.d.ts +45 -0
  107. package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools/data-modeling}/CollectionNode.d.ts +2 -3
  108. package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools/data-modeling}/Diagram.d.ts +1 -1
  109. package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools/data-modeling}/Table.d.ts +2 -2
  110. package/dist/client-v2/ai-employees/tools/data-modeling/legacy-template.d.ts +13 -0
  111. package/dist/client-v2/ai-employees/tools/data-modeling/runtime.d.ts +15 -0
  112. package/dist/{client/ai-employees → client-v2/ai-employees/tools}/data-modeling/types.d.ts +27 -4
  113. package/dist/client-v2/ai-employees/tools/data-modeling/useFieldInterfaceOptions.d.ts +150 -0
  114. package/dist/{client/ai-employees/data-visualization/tools/index.d.ts → client-v2/ai-employees/tools/data-visualization.d.ts} +1 -1
  115. package/dist/client-v2/ai-employees/tools/index.d.ts +32 -0
  116. package/dist/client-v2/ai-employees/types.d.ts +101 -7
  117. package/dist/client-v2/components/RemoteSelect.d.ts +43 -0
  118. package/dist/{client → client-v2}/debug-logger.d.ts +2 -2
  119. package/dist/client-v2/f0053e745af0ad03.svg +50 -0
  120. package/dist/client-v2/index.d.ts +9 -8
  121. package/dist/client-v2/index.js +37 -1
  122. package/dist/client-v2/llm-providers/forms.d.ts +42 -0
  123. package/dist/client-v2/llm-providers/index.d.ts +23 -0
  124. package/dist/{client/ai-employees/ai-coding/tools/index.d.ts → client-v2/llm-services/utils.d.ts} +5 -3
  125. package/dist/client-v2/locale.d.ts +14 -0
  126. package/dist/{client → client-v2}/manager/ai-manager.d.ts +4 -5
  127. package/dist/client-v2/models/ai-employees/AIEmployeeActionModel.d.ts +33 -0
  128. package/dist/client-v2/models/ai-employees/AIEmployeeShortcutModel.d.ts +44 -0
  129. package/dist/client-v2/pages/AdminSettingsPage.d.ts +24 -0
  130. package/dist/client-v2/pages/DatasourceSettingsPage.d.ts +62 -0
  131. package/dist/client-v2/pages/EmployeesPage.d.ts +53 -0
  132. package/dist/client-v2/pages/LLMServicesPage.d.ts +75 -0
  133. package/dist/client-v2/pages/MCPSettingsPage.d.ts +73 -0
  134. package/dist/client-v2/pages/drawerWidth.d.ts +10 -0
  135. package/dist/client-v2/pages/permissions/Permissions.d.ts +67 -0
  136. package/dist/client-v2/pages/permissions/PermissionsTab.d.ts +12 -0
  137. package/dist/client-v2/pages/useUnsavedChangesBeforeClose.d.ts +29 -0
  138. package/dist/client-v2/plugin.d.ts +32 -0
  139. package/dist/client-v2/repositories/AIConfigRepository.d.ts +3 -23
  140. package/dist/client-v2/workflow/components/FormValueRegistry.d.ts +12 -0
  141. package/dist/{client/components/ListCollapse.d.ts → client-v2/workflow/components/WorkflowListCollapse.d.ts} +4 -4
  142. package/dist/client-v2/workflow/constants.d.ts +26 -0
  143. package/dist/client-v2/workflow/nodes/employee/components/AIEmployeeFieldset.d.ts +11 -0
  144. package/dist/{client/ai-employees/common/CodeHighlight.d.ts → client-v2/workflow/nodes/employee/components/AIEmployeeSelect.d.ts} +5 -6
  145. package/dist/{client/ai-employees/ContextAwareTooltip.d.ts → client-v2/workflow/nodes/employee/components/Assignees.d.ts} +2 -1
  146. package/dist/client-v2/workflow/nodes/employee/components/FeedbackSettings.d.ts +17 -0
  147. package/dist/client-v2/workflow/nodes/employee/components/FileInputs.d.ts +11 -0
  148. package/dist/{client/ai-employees/AIEmployeesProvider.d.ts → client-v2/workflow/nodes/employee/components/MessageInputs.d.ts} +2 -3
  149. package/dist/client-v2/workflow/nodes/employee/components/ModelOptions.d.ts +17 -0
  150. package/dist/{client/ai-employees/admin/datasource/components/basic/CollectionCascader.d.ts → client-v2/workflow/nodes/employee/components/SkillSettings.d.ts} +6 -3
  151. package/dist/client-v2/workflow/nodes/employee/components/StructuredOutput.d.ts +11 -0
  152. package/dist/client-v2/workflow/nodes/employee/components/UserInput.d.ts +18 -0
  153. package/dist/client-v2/workflow/nodes/employee/components/WebSearchOptions.d.ts +16 -0
  154. package/dist/client-v2/workflow/nodes/employee/index.d.ts +23 -0
  155. package/dist/{client/ai-employees/AIEmployeeListItem.d.ts → client-v2/workflow/nodes/llm/components/LLMFieldset.d.ts} +3 -5
  156. package/dist/{client/admin-settings/AdminSettings.d.ts → client-v2/workflow/nodes/llm/components/Messages.d.ts} +2 -1
  157. package/dist/client-v2/workflow/nodes/llm/components/StructuredOutput.d.ts +11 -0
  158. package/dist/client-v2/workflow/nodes/llm/index.d.ts +30 -0
  159. package/dist/{client/ai-employees/1.x/selector/BlockSelector.d.ts → client-v2/workflow/register.d.ts} +2 -6
  160. package/dist/client-v2/workflow/triggers/ai-employee/AIEmployeeTriggerConfig.d.ts +11 -0
  161. package/dist/client-v2/workflow/triggers/ai-employee/Parameters.d.ts +11 -0
  162. package/dist/client-v2/workflow/triggers/ai-employee/index.d.ts +25 -0
  163. package/dist/client-v2/workflow/types.d.ts +128 -0
  164. package/dist/externalVersion.js +20 -25
  165. package/dist/locale/en-US.json +41 -1
  166. package/dist/locale/zh-CN.json +41 -1
  167. package/dist/node_modules/@langchain/mistralai/package.json +1 -1
  168. package/dist/node_modules/@langchain/xai/package.json +1 -1
  169. package/dist/node_modules/fs-extra/package.json +1 -1
  170. package/dist/node_modules/jsonrepair/package.json +1 -1
  171. package/dist/node_modules/just-bash/package.json +1 -1
  172. package/dist/node_modules/nodejs-snowflake/package.json +1 -1
  173. package/dist/node_modules/openai/package.json +1 -1
  174. package/dist/node_modules/zod/package.json +1 -1
  175. package/dist/server/ai-employees/ai-employee.js +5 -0
  176. package/dist/server/ai-employees/checkpoints/cleaner.d.ts +2 -0
  177. package/dist/server/ai-employees/checkpoints/cleaner.js +11 -1
  178. package/dist/server/workflow/nodes/employee/index.js +1 -1
  179. package/dist/server/workflow/nodes/employee/tools.js +8 -1
  180. package/package.json +5 -5
  181. package/dist/client/119.c6bf8c6433167d81.js +0 -10
  182. package/dist/client/170.d98eacdc00d9d527.js +0 -10
  183. package/dist/client/228.b4b709f93b86b6b9.js +0 -10
  184. package/dist/client/280.003b9e9788599244.js +0 -10
  185. package/dist/client/290.0f7f441d8a94f03c.js +0 -10
  186. package/dist/client/331.d547c95410476a69.js +0 -10
  187. package/dist/client/406.15c09d98faa2ccf1.js +0 -10
  188. package/dist/client/428.5eb4f53ddbb6a3b8.js +0 -10
  189. package/dist/client/462.d172d0fe91519e35.js +0 -10
  190. package/dist/client/486.dcac8f3fcec19c33.js +0 -10
  191. package/dist/client/502.2b4a51e0a8122e52.js +0 -10
  192. package/dist/client/525.33a9c8ec28be4ec4.js +0 -10
  193. package/dist/client/559.9f97ebcdb0bd6231.js +0 -10
  194. package/dist/client/561.7ec804ef39ec7dcd.js +0 -10
  195. package/dist/client/580.35ba54ff91b7fe6d.js +0 -10
  196. package/dist/client/597.b0d64948d74cf6cb.js +0 -10
  197. package/dist/client/604.89c674f35b52b4ef.js +0 -10
  198. package/dist/client/614.aa766080f6b99aab.js +0 -10
  199. package/dist/client/646.d4483b4ff23da0a0.js +0 -10
  200. package/dist/client/687.224e569a99cae4bb.js +0 -10
  201. package/dist/client/699.57c0a1acb723202a.js +0 -10
  202. package/dist/client/711.92cd94681fde7e05.js +0 -10
  203. package/dist/client/758.a9741e81911e53c3.js +0 -10
  204. package/dist/client/768.5177bff46ae71a5b.js +0 -10
  205. package/dist/client/792.abb57765453bcbcc.js +0 -10
  206. package/dist/client/820.f72ef2462b61d812.js +0 -10
  207. package/dist/client/832.0cf69e3f43c320b2.js +0 -10
  208. package/dist/client/927.d95c74ebb8fd51c9.js +0 -10
  209. package/dist/client/ai-employees/1.x/selector/AISelectorProvider.d.ts +0 -33
  210. package/dist/client/ai-employees/ProfileCard.d.ts +0 -15
  211. package/dist/client/ai-employees/admin/ChatSettings.d.ts +0 -10
  212. package/dist/client/ai-employees/admin/DataSourceSettings.d.ts +0 -10
  213. package/dist/client/ai-employees/admin/EnableSwitch.d.ts +0 -10
  214. package/dist/client/ai-employees/admin/InputsFormSettings.d.ts +0 -10
  215. package/dist/client/ai-employees/admin/KnowledgeBaseSettings.d.ts +0 -10
  216. package/dist/client/ai-employees/admin/ModelSettings.d.ts +0 -10
  217. package/dist/client/ai-employees/admin/SkillSettings.d.ts +0 -19
  218. package/dist/client/ai-employees/admin/SystemPrompt.d.ts +0 -10
  219. package/dist/client/ai-employees/admin/Templates.d.ts +0 -10
  220. package/dist/client/ai-employees/admin/ToolsSettings.d.ts +0 -17
  221. package/dist/client/ai-employees/admin/datasource/components/DatasourceSettingForm.d.ts +0 -10
  222. package/dist/client/ai-employees/admin/datasource/components/DatasourceSettingGrid.d.ts +0 -10
  223. package/dist/client/ai-employees/admin/datasource/components/basic/FieldsTransfer.d.ts +0 -17
  224. package/dist/client/ai-employees/admin/datasource/components/form-steps/CollectionSetting.d.ts +0 -17
  225. package/dist/client/ai-employees/admin/datasource/components/form-steps/FieldsSetting.d.ts +0 -15
  226. package/dist/client/ai-employees/admin/datasource/components/form-steps/FilterSetting.d.ts +0 -17
  227. package/dist/client/ai-employees/admin/datasource/components/form-steps/Preview.d.ts +0 -13
  228. package/dist/client/ai-employees/admin/datasource/components/form-steps/SortSetting.d.ts +0 -15
  229. package/dist/client/ai-employees/admin/datasource/components/form-steps/index.d.ts +0 -13
  230. package/dist/client/ai-employees/admin/datasource/components/index.d.ts +0 -9
  231. package/dist/client/ai-employees/admin/datasource/context.d.ts +0 -17
  232. package/dist/client/ai-employees/admin/datasource/flow-models/index.d.ts +0 -9
  233. package/dist/client/ai-employees/admin/datasource/index.d.ts +0 -10
  234. package/dist/client/ai-employees/admin/hooks.d.ts +0 -39
  235. package/dist/client/ai-employees/admin/mcp/MCPSettings.d.ts +0 -10
  236. package/dist/client/ai-employees/admin/mcp/MCPToolsList.d.ts +0 -19
  237. package/dist/client/ai-employees/admin/mcp/context.d.ts +0 -15
  238. package/dist/client/ai-employees/admin/mcp/schemas.d.ts +0 -1314
  239. package/dist/client/ai-employees/ai-coding/CodeHistory.d.ts +0 -10
  240. package/dist/client/ai-employees/ai-coding/markdown/Code.d.ts +0 -16
  241. package/dist/client/ai-employees/avatars.d.ts +0 -9
  242. package/dist/client/ai-employees/built-in/utils.d.ts +0 -15
  243. package/dist/client/ai-employees/business-report/tools/index.d.ts +0 -10
  244. package/dist/client/ai-employees/business-report/ui/report-utils.d.ts +0 -38
  245. package/dist/client/ai-employees/chart-generator/tools/index.d.ts +0 -10
  246. package/dist/client/ai-employees/chart-generator/ui/ECharts.d.ts +0 -13
  247. package/dist/client/ai-employees/chatbox/AIThinking.d.ts +0 -12
  248. package/dist/client/ai-employees/chatbox/Attachment.d.ts +0 -14
  249. package/dist/client/ai-employees/chatbox/AttachmentsHeader.d.ts +0 -10
  250. package/dist/client/ai-employees/chatbox/ChatBox.d.ts +0 -12
  251. package/dist/client/ai-employees/chatbox/ContextItemsHeader.d.ts +0 -10
  252. package/dist/client/ai-employees/chatbox/DebugPanel.d.ts +0 -16
  253. package/dist/client/ai-employees/chatbox/EditMessageHeader.d.ts +0 -10
  254. package/dist/client/ai-employees/chatbox/HintMessageHeader.d.ts +0 -10
  255. package/dist/client/ai-employees/chatbox/MessageRenderer.d.ts +0 -33
  256. package/dist/client/ai-employees/chatbox/SenderFooter.d.ts +0 -13
  257. package/dist/client/ai-employees/chatbox/SenderHeader.d.ts +0 -10
  258. package/dist/client/ai-employees/chatbox/SenderPrefix.d.ts +0 -10
  259. package/dist/client/ai-employees/chatbox/Upload.d.ts +0 -12
  260. package/dist/client/ai-employees/chatbox/VirtualList.d.ts +0 -28
  261. package/dist/client/ai-employees/chatbox/conversations/ConversationsList.d.ts +0 -13
  262. package/dist/client/ai-employees/chatbox/conversations/WorkflowTasksList.d.ts +0 -13
  263. package/dist/client/ai-employees/chatbox/conversations/index.d.ts +0 -9
  264. package/dist/client/ai-employees/chatbox/generative-ui/DefaultToolCard.d.ts +0 -16
  265. package/dist/client/ai-employees/chatbox/hooks/useChatBoxActions.d.ts +0 -18
  266. package/dist/client/ai-employees/chatbox/hooks/useUploadFiles.d.ts +0 -12
  267. package/dist/client/ai-employees/chatbox/markdown/ECharts.d.ts +0 -10
  268. package/dist/client/ai-employees/chatbox/markdown/Form.d.ts +0 -10
  269. package/dist/client/ai-employees/chatbox/markdown/Generating.d.ts +0 -10
  270. package/dist/client/ai-employees/chatbox/markdown/Markdown.d.ts +0 -13
  271. package/dist/client/ai-employees/chatbox/roles.d.ts +0 -32
  272. package/dist/client/ai-employees/chatbox/stores/chat-box.d.ts +0 -9
  273. package/dist/client/ai-employees/chatbox/stores/chat-conversations.d.ts +0 -9
  274. package/dist/client/ai-employees/chatbox/stores/chat-messages.d.ts +0 -9
  275. package/dist/client/ai-employees/chatbox/stores/chat-tools.d.ts +0 -51
  276. package/dist/client/ai-employees/chatbox/stores/create-selectors.d.ts +0 -18
  277. package/dist/client/ai-employees/chatbox/stores/workflow-tasks.d.ts +0 -45
  278. package/dist/client/ai-employees/context/classic-pages.d.ts +0 -10
  279. package/dist/client/ai-employees/data-modeling/Table.d.ts +0 -12
  280. package/dist/client/ai-employees/data-modeling/setup.d.ts +0 -10
  281. package/dist/client/ai-employees/data-modeling/tools/index.d.ts +0 -10
  282. package/dist/client/ai-employees/data-modeling/ui/useFieldInterfaceOptions.d.ts +0 -14
  283. package/dist/client/ai-employees/datasource/DatasourceList.d.ts +0 -17
  284. package/dist/client/ai-employees/datasource/index.d.ts +0 -9
  285. package/dist/client/ai-employees/flow/events/index.d.ts +0 -9
  286. package/dist/client/ai-employees/flow/index.d.ts +0 -36
  287. package/dist/client/ai-employees/flow/models/AIEmployeeActionModel.d.ts +0 -18
  288. package/dist/client/ai-employees/flow/models/AIEmployeeShortcutModel.d.ts +0 -30
  289. package/dist/client/ai-employees/shortcuts/ShortcutList.d.ts +0 -10
  290. package/dist/client/ai-employees/shortcuts/useShortcuts.d.ts +0 -13
  291. package/dist/client/ai-employees/stores/context-aware.d.ts +0 -19
  292. package/dist/client/ai-employees/sub-agents/tools/index.d.ts +0 -10
  293. package/dist/client/ai-employees/suggestions/tools/index.d.ts +0 -10
  294. package/dist/client/ai-employees/suggestions/ui/SuggestionsOptions.d.ts +0 -13
  295. package/dist/client/ai-employees/types.d.ts +0 -259
  296. package/dist/client/ai-employees/workflow-tasks/tools/index.d.ts +0 -10
  297. package/dist/client/chat-settings/Messages.d.ts +0 -11
  298. package/dist/client/chat-settings/StructuredOutput.d.ts +0 -11
  299. package/dist/client/components/skill-settings.d.ts +0 -22
  300. package/dist/client/features/components.d.ts +0 -9
  301. package/dist/client/features/feature-manager.d.ts +0 -9
  302. package/dist/client/features/index.d.ts +0 -9
  303. package/dist/client/features/vector-database-provider.d.ts +0 -9
  304. package/dist/client/features/vector-store-provider.d.ts +0 -9
  305. package/dist/client/llm-providers/anthropic/ModelSettings.d.ts +0 -10
  306. package/dist/client/llm-providers/anthropic/ProviderSettings.d.ts +0 -10
  307. package/dist/client/llm-providers/anthropic/index.d.ts +0 -10
  308. package/dist/client/llm-providers/components/Chat.d.ts +0 -10
  309. package/dist/client/llm-providers/components/ModelSelect.d.ts +0 -10
  310. package/dist/client/llm-providers/dashscope/ModelSettings.d.ts +0 -10
  311. package/dist/client/llm-providers/dashscope/ProviderSettings.d.ts +0 -10
  312. package/dist/client/llm-providers/dashscope/index.d.ts +0 -10
  313. package/dist/client/llm-providers/deepseek/ModelSettings.d.ts +0 -10
  314. package/dist/client/llm-providers/deepseek/index.d.ts +0 -10
  315. package/dist/client/llm-providers/google-genai/MessageRenderer.d.ts +0 -13
  316. package/dist/client/llm-providers/google-genai/ModelSettings.d.ts +0 -10
  317. package/dist/client/llm-providers/google-genai/ProviderSettings.d.ts +0 -10
  318. package/dist/client/llm-providers/google-genai/index.d.ts +0 -10
  319. package/dist/client/llm-providers/kimi/ModelSettings.d.ts +0 -10
  320. package/dist/client/llm-providers/kimi/index.d.ts +0 -10
  321. package/dist/client/llm-providers/mimo/ModelSettings.d.ts +0 -10
  322. package/dist/client/llm-providers/mimo/index.d.ts +0 -10
  323. package/dist/client/llm-providers/mistral/ModelSettings.d.ts +0 -10
  324. package/dist/client/llm-providers/mistral/index.d.ts +0 -10
  325. package/dist/client/llm-providers/ollama/ModelSettings.d.ts +0 -10
  326. package/dist/client/llm-providers/ollama/ProviderSettings.d.ts +0 -10
  327. package/dist/client/llm-providers/ollama/index.d.ts +0 -10
  328. package/dist/client/llm-providers/openai/completions/ModelSettings.d.ts +0 -10
  329. package/dist/client/llm-providers/openai/completions/index.d.ts +0 -10
  330. package/dist/client/llm-providers/openai/components/ProviderSettings.d.ts +0 -10
  331. package/dist/client/llm-providers/openai/responses/ModelSettings.d.ts +0 -10
  332. package/dist/client/llm-providers/openai/responses/index.d.ts +0 -10
  333. package/dist/client/llm-providers/tongyi/ModelSettings.d.ts +0 -10
  334. package/dist/client/llm-providers/tongyi/ProviderSettings.d.ts +0 -10
  335. package/dist/client/llm-providers/tongyi/index.d.ts +0 -10
  336. package/dist/client/llm-providers/xai/ModelSettings.d.ts +0 -10
  337. package/dist/client/llm-providers/xai/index.d.ts +0 -10
  338. package/dist/client/llm-services/LLMServices.d.ts +0 -13
  339. package/dist/client/llm-services/component/DefaultModelSelect.d.ts +0 -10
  340. package/dist/client/llm-services/component/EnabledModelsSelect.d.ts +0 -23
  341. package/dist/client/llm-services/component/LLMTestFlight.d.ts +0 -10
  342. package/dist/client/llm-services/component/ModelOptionsSettings.d.ts +0 -10
  343. package/dist/client/llm-services/component/UnifiedModelSettings.d.ts +0 -10
  344. package/dist/client/llm-services/hooks/useLLMServiceCatalog.d.ts +0 -18
  345. package/dist/client/llm-services/llm-providers.d.ts +0 -27
  346. package/dist/client/llm-services/utils.d.ts +0 -35
  347. package/dist/client/manager/ai-feature-manager.d.ts +0 -9
  348. package/dist/client/repositories/AIConfigRepository.d.ts +0 -60
  349. package/dist/client/repositories/hooks/useAIConfigRepository.d.ts +0 -10
  350. package/dist/client/schemas/llms.d.ts +0 -347
  351. package/dist/client/workflow/nodes/employee/components/AIEmployeeSelect.d.ts +0 -10
  352. package/dist/client/workflow/nodes/employee/components/assigness.d.ts +0 -11
  353. package/dist/client/workflow/nodes/employee/components/file-inputs.d.ts +0 -10
  354. package/dist/client/workflow/nodes/employee/components/message-inputs.d.ts +0 -12
  355. package/dist/client/workflow/nodes/employee/components/model-options.d.ts +0 -10
  356. package/dist/client/workflow/nodes/employee/components/structured-output.d.ts +0 -10
  357. package/dist/client/workflow/nodes/employee/components/users-select.d.ts +0 -15
  358. package/dist/client/workflow/nodes/employee/components/web-search-options.d.ts +0 -10
  359. package/dist/client/workflow/nodes/employee/configuration.d.ts +0 -12
  360. package/dist/client/workflow/nodes/employee/flow-models/feedback.d.ts +0 -14
  361. package/dist/client/workflow/nodes/employee/flow-models/task.d.ts +0 -13
  362. package/dist/client/workflow/nodes/llm/ModelSettings.d.ts +0 -11
  363. package/dist/client/workflow/triggers/ai-employee/Parameters.d.ts +0 -13
  364. /package/dist/{client → client-v2}/ai-employees/AISelection.d.ts +0 -0
  365. /package/dist/{client → client-v2}/ai-employees/AISelectionControl.d.ts +0 -0
  366. /package/dist/{client → client-v2}/ai-employees/ai-coding/prompts.d.ts +0 -0
  367. /package/dist/{client → client-v2}/ai-employees/ai-coding/setup.d.ts +0 -0
  368. /package/dist/{client/ai-employees/chatbox/AIEmployeeSwitch.d.ts → client-v2/ai-employees/chatbox/components/AIEmployeeSwitcher.d.ts} +0 -0
  369. /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/ChatButton.d.ts +0 -0
  370. /package/dist/{client/ai-employees/chatbox/conversations → client-v2/ai-employees/chatbox/components}/Conversations.d.ts +0 -0
  371. /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/Messages.d.ts +0 -0
  372. /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/ModelSwitcher.d.ts +0 -0
  373. /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/SearchSwitch.d.ts +0 -0
  374. /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/Sender.d.ts +0 -0
  375. /package/dist/{client/ai-employees/chatbox/generative-ui → client-v2/ai-employees/chatbox/components}/ToolModal.d.ts +0 -0
  376. /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/UserPrompt.d.ts +0 -0
  377. /package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useChatBoxEffect.d.ts +0 -0
  378. /package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useLoadMoreObserver.d.ts +0 -0
  379. /package/dist/client-v2/ai-employees/{chatbox/stores → stores}/global-store.d.ts +0 -0
  380. /package/dist/{client/ai-employees/flow/models → client-v2/models/ai-employees}/AIEmployeeShortcutListModel.d.ts +0 -0
  381. /package/dist/{client/ai-employees/flow/models → client-v2/models/ai-employees}/index.d.ts +0 -0
  382. /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
+ ![](https://static-docs.nocobase.com/Comments-07-01-2026_12_02_PM.png)
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
+ ![](https://static-docs.nocobase.com/Comments-07-01-2026_12_03_PM.png)
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
+ ![](https://static-docs.nocobase.com/Comments-07-01-2026_12_04_PM.png)
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
+ ![](https://static-docs.nocobase.com/Comments-07-01-2026_12_03_PM%20(1).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
+ ![](https://static-docs.nocobase.com/Comments-07-01-2026_12_04_PM.png)
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
+ ![](https://static-docs.nocobase.com/Comments-07-01-2026_12_07_PM.png)
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.
@@ -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 | Description |
33
- | --------- | --------------------------- | ---------------- |
34
- | `type` | `string` | Trigger type identifier |
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 | Type | Description |
88
- | ------------- | ----------------------------------- | -------------- |
89
- | `type` | `string` | Instruction type identifier |
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=Tip}
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 | Description |
167
- | ----- | ---------- | ---------------- |
168
- | `job` | `JobModel` | The updated job object |
172
+ | Parameter | Type | Description |
173
+ | --------- | ---------- | ---------------------- |
174
+ | `job` | `JobModel` | The updated job object |
169
175
 
170
- :::info{title=Tip}
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
- | Parameter | Type | Description |
183
- | ------------- | ----------------------------------------------------------- | ---------------------- |
184
- | `constructor` | `(public readonly workflow: PluginWorkflowServer): Trigger` | Constructor |
185
- | `on?` | `(workflow: WorkflowModel): void` | Event handler after enabling a workflow |
186
- | `off?` | `(workflow: WorkflowModel): void` | Event handler after disabling a workflow |
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
- | Parameter | Type | Description |
195
- | ------------- | --------------------------------------------------------------- | ---------------------------------- |
196
- | `constructor` | `(public readonly workflow: PluginWorkflowServer): Instruction` | Constructor |
197
- | `run` | `Runner` | Execution logic for the first entry into the node |
198
- | `resume?` | `Runner` | Execution logic for entering the node after resuming from an interruption |
199
- | `getScope?` | `(node: FlowNodeModel, data: any, processor: Processor): any` | Provides the local variable content for the branch generated by the corresponding node |
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
- | Constant Name | Meaning |
234
- | ------------------------------- | -------------------- |
235
- | `EXECUTION_STATUS.QUEUEING` | Queueing |
236
- | `EXECUTION_STATUS.STARTED` | Started |
237
- | `EXECUTION_STATUS.RESOLVED` | Resolved |
238
- | `EXECUTION_STATUS.FAILED` | Failed |
239
- | `EXECUTION_STATUS.ERROR` | Error |
240
- | `EXECUTION_STATUS.ABORTED` | Aborted |
241
- | `EXECUTION_STATUS.CANCELED` | Canceled |
242
- | `EXECUTION_STATUS.REJECTED` | Rejected |
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
- | Constant Name | Meaning |
252
- | ------------------------- | ---------------------------------------- |
253
- | `JOB_STATUS.PENDING` | Pending: Execution has reached this node, but the instruction requires it to suspend and wait |
254
- | `JOB_STATUS.RESOLVED` | Resolved |
255
- | `JOB_STATUS.FAILED` | Failed: The execution of this node failed to meet the configured conditions |
256
- | `JOB_STATUS.ERROR` | Error: An unhandled error occurred during the execution of this node |
257
- | `JOB_STATUS.ABORTED` | Aborted: The execution of this node was terminated by other logic after being in a pending state |
258
- | `JOB_STATUS.CANCELED` | Canceled: The execution of this node was manually canceled after being in a pending state |
259
- | `JOB_STATUS.REJECTED` | Rejected: The continuation of this node was manually rejected after being in a pending state |
260
- | `JOB_STATUS.RETRY_NEEDED` | Not successfully executed, retry needed |
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 PluginWorkflowClient, {
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
- ### `PluginWorkflowClient`
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 the trigger type.
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 identifier used for registration |
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 the node type.
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 identifier used for registration |
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, consistent with the identifier used for registration |
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
- ```js
330
- export default class YourPluginClient extends Plugin {
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
- | `fieldset` | `{ [key: string]: ISchema }` | Collection of trigger configuration items |
347
- | `scope?` | `{ [key: string]: any }` | Collection of objects that may be used in the configuration item Schema |
348
- | `components?` | `{ [key: string]: React.FC }` | Collection of components that may be used in the configuration item Schema |
349
- | `useVariables?` | `(config: any, options: UseVariableOptions ) => VariableOptions` | Value accessor for trigger context data |
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
- - If `useVariables` is not set, it means that this type of trigger does not provide a value retrieval function, and the trigger's context data cannot be selected in the workflow nodes.
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
- | `group` | `string` | Node type group identifier, currently available options: `'control'`/`'collection'`/`'manual'`/`'extended'` |
360
- | `fieldset` | `Record<string, ISchema>` | Collection of node configuration items |
361
- | `scope?` | `Record<string, Function>` | Collection of objects that may be used in the configuration item Schema |
362
- | `components?` | `Record<string, React.FC>` | Collection of components that may be used in the configuration item Schema |
363
- | `Component?` | `React.FC` | Custom rendering component for the node |
364
- | `useVariables?` | `(node, options: UseVariableOptions) => VariableOption` | Method for the node to provide node variable options |
365
- | `useScopeVariables?` | `(node, options?) => VariableOptions` | Method for the node to provide branch local variable options |
366
- | `useInitializers?` | `(node) => SchemaInitializerItemType` | Method for the node to provide initializer options |
367
- | `isAvailable?` | `(ctx: NodeAvailableContext) => boolean` | Method to determine if the node is available |
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/main/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/calculation.tsx#L68)). If it needs to be selectable (e.g., a property of an Object), you can customize the corresponding selection component output (see: [create data node source code](https://github.com/nocobase/nocobase/blob/main/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/create.tsx#L41)).
380
- - `Component` 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, if you need to provide more action buttons or other interactions for the start node of a branch type, you would use this method (see: [parallel branch source code](https://github.com/nocobase/nocobase/blob/main/packages/plugins/@nocobase/plugin-workflow-parallel/src/client/ParallelInstruction.tsx)).
381
- - `useInitializers` is used to provide a method for initializing blocks. For example, in a manual node, you can initialize related user blocks based on upstream nodes. If this method is provided, it will be available when initializing blocks in the manual node's interface configuration (see: [create data node source code](https://github.com/nocobase/nocobase/blob/main/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/create.tsx#L71)).
382
- - `isAvailable` is mainly used to determine whether a node can be used (added) in the current environment. The current environment includes the current workflow, upstream nodes, and the current branch index.
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
+ ![WorkflowVariableInput](https://static-docs.nocobase.com/20260701160110.png)
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
+ ![WorkflowVariableTextArea](https://static-docs.nocobase.com/20260701160242.png)
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
+ ![WorkflowTypedVariableInput](https://static-docs.nocobase.com/20260701160608.png)
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
@@ -9,4 +9,5 @@ Extensions are mainly divided into two parts:
9
9
 
10
10
  ## Other Content
11
11
 
12
- - [API Reference](./api.md)
12
+ - [API Reference](./api.md)
13
+ - [v1 to v2 Client-side Migration Guide](./migration.md)