@nocobase/plugin-ai 2.2.0-beta.9 → 3.0.0-alpha.1

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 (615) hide show
  1. package/client-v2.d.ts +1 -0
  2. package/dist/ai/docs/nocobase/ai-employees/block/ai-chat-box.md +133 -0
  3. package/dist/ai/docs/nocobase/ai-employees/knowledge-base/knowledge-base/documents.md +1 -1
  4. package/dist/ai/docs/nocobase/ai-employees/knowledge-base/knowledge-base/index.md +11 -7
  5. package/dist/ai/docs/nocobase/ai-employees/knowledge-base/knowledge-base/settings.md +12 -8
  6. package/dist/ai/docs/nocobase/ai-employees/knowledge-base/vector-database.md +3 -3
  7. package/dist/ai/docs/nocobase/ai-employees/scenarios/company-background-research.md +125 -0
  8. package/dist/ai/docs/nocobase/ai-employees/workflow/nodes/knowledge/create-document.md +1 -1
  9. package/dist/ai/docs/nocobase/api/app/env.md +3 -1
  10. package/dist/ai/docs/nocobase/api/cli/index.md +14 -2
  11. package/dist/ai/docs/nocobase/api/cli/portal/config.md +44 -0
  12. package/dist/ai/docs/nocobase/api/cli/portal/create.md +48 -0
  13. package/dist/ai/docs/nocobase/api/cli/portal/deploy.md +39 -0
  14. package/dist/ai/docs/nocobase/api/cli/portal/destroy.md +41 -0
  15. package/dist/ai/docs/nocobase/api/cli/portal/dev.md +39 -0
  16. package/dist/ai/docs/nocobase/api/cli/portal/index.md +136 -0
  17. package/dist/ai/docs/nocobase/api/cli/portal/info.md +41 -0
  18. package/dist/ai/docs/nocobase/api/cli/portal/list.md +40 -0
  19. package/dist/ai/docs/nocobase/api/cli/portal/pull.md +43 -0
  20. package/dist/ai/docs/nocobase/api/cli/portal/push.md +41 -0
  21. package/dist/ai/docs/nocobase/building-tips/ai-fill-js-block-form.md +1092 -0
  22. package/dist/ai/docs/nocobase/building-tips/operations-dashboard.md +513 -0
  23. package/dist/ai/docs/nocobase/data-sources/calendar/calendar-collection.md +100 -3
  24. package/dist/ai/docs/nocobase/data-sources/collection-comment/index.md +92 -39
  25. package/dist/ai/docs/nocobase/data-sources/collection-sql/index.md +150 -29
  26. package/dist/ai/docs/nocobase/data-sources/collection-tree/index.md +93 -5
  27. package/dist/ai/docs/nocobase/data-sources/collection-view/index.md +226 -4
  28. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/advanced/china-region.md +122 -5
  29. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/advanced/collection-select.md +105 -4
  30. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/advanced/json.md +102 -4
  31. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/advanced/nano-id.md +104 -4
  32. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/advanced/snowflake-id.md +108 -4
  33. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/advanced/sort.md +3 -19
  34. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/advanced/uuid.md +104 -4
  35. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/associations/index.md +44 -8
  36. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/color.md +102 -4
  37. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/email.md +104 -4
  38. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/icon.md +102 -4
  39. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/input.md +112 -8
  40. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/integer.md +103 -4
  41. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/number.md +103 -4
  42. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/password.md +102 -4
  43. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/percent.md +104 -5
  44. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/phone.md +104 -4
  45. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/textarea.md +99 -8
  46. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/basic/url.md +103 -4
  47. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/choices/checkbox-group.md +105 -3
  48. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/choices/checkbox.md +102 -4
  49. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/choices/china-region.md +108 -5
  50. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/choices/multiple-select.md +103 -5
  51. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/choices/radio-group.md +106 -4
  52. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/choices/select.md +103 -5
  53. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/datetime/date.md +102 -4
  54. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/datetime/datetime-without-tz.md +103 -5
  55. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/datetime/datetime.md +103 -5
  56. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/datetime/index.md +53 -47
  57. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/datetime/time.md +102 -4
  58. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/datetime/unix-timestamp.md +103 -5
  59. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/geometric/circle.md +102 -4
  60. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/geometric/line.md +103 -5
  61. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/geometric/point.md +102 -4
  62. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/geometric/polygon.md +102 -4
  63. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/index.md +62 -16
  64. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/media/markdown.md +104 -4
  65. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/media/rich-text.md +105 -5
  66. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/system-info/created-at.md +105 -5
  67. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/system-info/created-by.md +103 -5
  68. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/system-info/space.md +100 -6
  69. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/system-info/table-oid.md +102 -4
  70. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/system-info/updated-at.md +104 -5
  71. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/system-info/updated-by.md +104 -6
  72. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection-fields/validation.md +68 -58
  73. package/dist/ai/docs/nocobase/data-sources/data-modeling/collection.md +32 -13
  74. package/dist/ai/docs/nocobase/data-sources/data-modeling/index.md +41 -33
  75. package/dist/ai/docs/nocobase/data-sources/data-source-external-mariadb/index.md +114 -6
  76. package/dist/ai/docs/nocobase/data-sources/data-source-external-mssql/index.md +117 -6
  77. package/dist/ai/docs/nocobase/data-sources/data-source-external-mysql/index.md +103 -6
  78. package/dist/ai/docs/nocobase/data-sources/data-source-external-nocobase/index.md +75 -73
  79. package/dist/ai/docs/nocobase/data-sources/data-source-external-oracle/index.md +129 -11
  80. package/dist/ai/docs/nocobase/data-sources/data-source-external-postgres/index.md +110 -6
  81. package/dist/ai/docs/nocobase/data-sources/data-source-kingbase/index.md +75 -49
  82. package/dist/ai/docs/nocobase/data-sources/data-source-main/general-collection.md +116 -15
  83. package/dist/ai/docs/nocobase/data-sources/data-source-main/index.md +92 -62
  84. package/dist/ai/docs/nocobase/data-sources/data-source-main/inheritance-collection.md +97 -10
  85. package/dist/ai/docs/nocobase/data-sources/data-source-manager/external-database.md +97 -58
  86. package/dist/ai/docs/nocobase/data-sources/data-source-manager/index.md +32 -24
  87. package/dist/ai/docs/nocobase/data-sources/data-source-rest-api/index.md +115 -153
  88. package/dist/ai/docs/nocobase/data-sources/external/clickhouse.md +124 -0
  89. package/dist/ai/docs/nocobase/data-sources/external/doris.md +130 -0
  90. package/dist/ai/docs/nocobase/data-sources/external/index.md +140 -0
  91. package/dist/ai/docs/nocobase/data-sources/external/kingbase.md +129 -0
  92. package/dist/ai/docs/nocobase/data-sources/external/mariadb.md +126 -0
  93. package/dist/ai/docs/nocobase/data-sources/external/mssql.md +129 -0
  94. package/dist/ai/docs/nocobase/data-sources/external/mysql.md +115 -0
  95. package/dist/ai/docs/nocobase/data-sources/external/nocobase.md +159 -0
  96. package/dist/ai/docs/nocobase/data-sources/external/oceanbase.md +126 -0
  97. package/dist/ai/docs/nocobase/data-sources/external/oracle.md +158 -0
  98. package/dist/ai/docs/nocobase/data-sources/external/postgresql.md +122 -0
  99. package/dist/ai/docs/nocobase/data-sources/external/rest-api.md +245 -0
  100. package/dist/ai/docs/nocobase/data-sources/field-attachment-url/index.md +100 -12
  101. package/dist/ai/docs/nocobase/data-sources/field-encryption/index.md +48 -47
  102. package/dist/ai/docs/nocobase/data-sources/field-formula/index.md +99 -5
  103. package/dist/ai/docs/nocobase/data-sources/field-markdown-vditor/index.md +105 -5
  104. package/dist/ai/docs/nocobase/data-sources/field-sequence/index.md +102 -5
  105. package/dist/ai/docs/nocobase/data-sources/field-signature/index.md +18 -16
  106. package/dist/ai/docs/nocobase/data-sources/field-sort/index.md +76 -73
  107. package/dist/ai/docs/nocobase/data-sources/file-manager/field-attachment.md +101 -7
  108. package/dist/ai/docs/nocobase/data-sources/file-manager/file-collection.md +101 -14
  109. package/dist/ai/docs/nocobase/data-sources/index.md +49 -33
  110. package/dist/ai/docs/nocobase/data-sources/main/index.md +130 -0
  111. package/dist/ai/docs/nocobase/data-sources/main/kingbase.md +147 -0
  112. package/dist/ai/docs/nocobase/data-sources/main/mariadb.md +59 -0
  113. package/dist/ai/docs/nocobase/data-sources/main/mysql.md +59 -0
  114. package/dist/ai/docs/nocobase/data-sources/main/oceanbase.md +62 -0
  115. package/dist/ai/docs/nocobase/data-sources/main/postgresql.md +61 -0
  116. package/dist/ai/docs/nocobase/file-manager/stable-url.md +87 -0
  117. package/dist/ai/docs/nocobase/file-manager/storage/index.md +66 -26
  118. package/dist/ai/docs/nocobase/file-manager/storage/local.md +3 -1
  119. package/dist/ai/docs/nocobase/file-manager/storage/s3-pro.md +58 -7
  120. package/dist/ai/docs/nocobase/get-started/deployment/production.md +24 -2
  121. package/dist/ai/docs/nocobase/get-started/installation/docker-caddy.mdx +3 -0
  122. package/dist/ai/docs/nocobase/get-started/installation/docker-nginx.mdx +3 -0
  123. package/dist/ai/docs/nocobase/get-started/installation/docker.mdx +27 -3
  124. package/dist/ai/docs/nocobase/get-started/installation/env.md +35 -2
  125. package/dist/ai/docs/nocobase/index.md +1 -1
  126. package/dist/ai/docs/nocobase/interface-builder/blocks/data-blocks/comment.md +107 -0
  127. package/dist/ai/docs/nocobase/interface-builder/index.md +7 -6
  128. package/dist/ai/docs/nocobase/interface-builder/ui-layout/desktop.md +97 -0
  129. package/dist/ai/docs/nocobase/interface-builder/ui-layout/index.md +50 -0
  130. package/dist/ai/docs/nocobase/interface-builder/ui-layout/mobile.md +133 -0
  131. package/dist/ai/docs/nocobase/multi-app/multi-app-vs-multi-portal-vs-multi-space.md +159 -0
  132. package/dist/ai/docs/nocobase/multi-app/multi-portal/index.md +195 -0
  133. package/dist/ai/docs/nocobase/nocobase-cli/production/index.md +10 -0
  134. package/dist/ai/docs/nocobase/nocobase-cli/production/reverse-proxy/caddy.md +15 -2
  135. package/dist/ai/docs/nocobase/nocobase-cli/production/reverse-proxy/index.md +1 -1
  136. package/dist/ai/docs/nocobase/nocobase-cli/production/reverse-proxy/nginx.md +16 -2
  137. package/dist/ai/docs/nocobase/ops-management/migration-manager/built-in-tables.md +1 -2
  138. package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-block-comment/index.md +14 -0
  139. package/dist/ai/docs/nocobase/runjs/context/ai.md +396 -0
  140. package/dist/ai/docs/nocobase/security/guide.md +23 -0
  141. package/dist/ai/docs/nocobase/tutorials/index.md +20 -1
  142. package/dist/ai/docs/nocobase/workflow/development/api.md +259 -77
  143. package/dist/ai/docs/nocobase/workflow/development/index.md +2 -1
  144. package/dist/ai/docs/nocobase/workflow/development/migration.md +319 -0
  145. package/dist/ai/docs/nocobase/workflow/development/node.md +84 -51
  146. package/dist/ai/docs/nocobase/workflow/development/trigger.md +122 -20
  147. package/dist/ai/tools/executeFrontendTool.d.ts +10 -0
  148. package/dist/ai/tools/executeFrontendTool.js +86 -0
  149. package/dist/ai/tools/formFiller.js +4 -3
  150. package/dist/ai/tools/getSkill.js +1 -1
  151. package/dist/ai/tools/loadFrontendTool.d.ts +10 -0
  152. package/dist/ai/tools/loadFrontendTool.js +99 -0
  153. package/dist/ai/tools/subAgentWebSearch.js +20 -15
  154. package/dist/client/23.65ea8c37cd4b884b.js +10 -0
  155. package/dist/client/244.8631eb5cf3f05e21.js +10 -0
  156. package/dist/client/264.cc98933ef65608b6.js +10 -0
  157. package/dist/client/336.7a8a8853196ad779.js +11 -0
  158. package/dist/client/416.92b74ca47e4099c4.js +10 -0
  159. package/dist/client/446.d63c38d0309fe250.js +10 -0
  160. package/dist/client/525.94dd4136c1361477.js +10 -0
  161. package/dist/client/663.680bcf6272a8504d.js +10 -0
  162. package/dist/client/681.6ffbc9329b9ac242.js +10 -0
  163. package/dist/client/705.19b642db34de438a.js +10 -0
  164. package/dist/client/ai-employees/1.x/selector/AIContextCollector.d.ts +1 -4
  165. package/dist/client/ai-employees/permissions/PermissionsTab.d.ts +21 -5
  166. package/dist/client/index.d.ts +13 -20
  167. package/dist/client/index.js +8 -8
  168. package/dist/client/workflow/nodes/employee/index.d.ts +2 -23
  169. package/dist/client/workflow/nodes/llm/index.d.ts +2 -52
  170. package/dist/client/workflow/triggers/ai-employee/index.d.ts +2 -83
  171. package/dist/client-v2/23.1bcb6986b40723d8.js +10 -0
  172. package/dist/client-v2/244.c428e645ecb94414.js +10 -0
  173. package/dist/client-v2/264.be92ff6a4d2612f1.js +10 -0
  174. package/dist/client-v2/336.e406470429e0670e.js +11 -0
  175. package/dist/client-v2/416.0e1c2d9cde43b83d.js +10 -0
  176. package/dist/client-v2/420.b2aedb1ff71fca0e.js +10 -0
  177. package/dist/client-v2/446.073d450882db29fd.js +10 -0
  178. package/dist/client-v2/457.d72febb89e88fc00.js +10 -0
  179. package/dist/client-v2/663.342341f0b2b412d8.js +10 -0
  180. package/dist/client-v2/681.6890caa389564ff7.js +10 -0
  181. package/dist/client-v2/705.8dc34d43f02f322c.js +10 -0
  182. package/dist/{client/ai-employees/admin/AvatarSelect.d.ts → client-v2/ai-employees/AIEmployeeDropdown.d.ts} +8 -9
  183. package/dist/client-v2/ai-employees/AIEmployeeShortcut.d.ts +11 -2
  184. package/dist/{client → client-v2}/ai-employees/AddContextButton.d.ts +3 -1
  185. package/dist/{client → client-v2}/ai-employees/ai-coding/AICodingButton.d.ts +2 -1
  186. package/dist/{client/ai-employees/chatbox/AIEmployeeSwitch.d.ts → client-v2/ai-employees/chatbox/components/AIEmployeeSwitcher.d.ts} +1 -0
  187. package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/Actions.d.ts +2 -4
  188. package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/AddLLMModal.d.ts +2 -4
  189. package/dist/client-v2/ai-employees/chatbox/components/Attachments.d.ts +27 -0
  190. package/dist/{client/ai-employees/permissions/Permissions.d.ts → client-v2/ai-employees/chatbox/components/ChatBox.d.ts} +2 -2
  191. package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/ChatBoxLayout.d.ts +1 -1
  192. package/dist/{client/ai-employees/chatbox/markdown/Code.d.ts → client-v2/ai-employees/chatbox/components/ChatBoxUnreadBadge.d.ts} +6 -7
  193. package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/ContextItem.d.ts +1 -1
  194. package/dist/client-v2/ai-employees/chatbox/components/Conversations.d.ts +18 -0
  195. package/dist/{client/ai-employees/admin/Templates.d.ts → client-v2/ai-employees/chatbox/components/DebugPanel.d.ts} +1 -1
  196. package/dist/{client/ai-employees/ai-coding/markdown/Code.d.ts → client-v2/ai-employees/chatbox/components/Markdown.d.ts} +12 -3
  197. package/dist/{client/ai-employees/1.x/selector/BlockSelector.d.ts → client-v2/ai-employees/chatbox/components/MessageContent.d.ts} +3 -4
  198. package/dist/client-v2/ai-employees/chatbox/components/MessageRenderers.d.ts +39 -0
  199. package/dist/{client/ai-employees/admin/datasource/components/DatasourceSettingDetail.d.ts → client-v2/ai-employees/chatbox/components/Messages.d.ts} +4 -4
  200. package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/ModelSwitcher.d.ts +4 -0
  201. package/dist/client-v2/ai-employees/chatbox/components/Sender.d.ts +42 -0
  202. package/dist/{client/ai-employees/chatbox/generative-ui → client-v2/ai-employees/chatbox/components}/ToolCard.d.ts +7 -5
  203. package/dist/client-v2/ai-employees/chatbox/components/index.d.ts +14 -0
  204. package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useChat.d.ts +29 -27
  205. package/dist/client-v2/ai-employees/chatbox/hooks/useChatBoxActions.d.ts +5 -3
  206. package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useChatBoxEffect.d.ts +2 -1
  207. package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useChatConversationActions.d.ts +5 -4
  208. package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useChatMessageActions.d.ts +12 -6
  209. package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useToolCallActions.d.ts +4 -2
  210. package/dist/client-v2/ai-employees/chatbox/hooks/useUploadFiles.d.ts +56 -0
  211. package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useWorkflowTasks.d.ts +4 -3
  212. package/dist/client-v2/ai-employees/chatbox/index.d.ts +17 -0
  213. package/dist/{client → client-v2}/ai-employees/chatbox/model.d.ts +9 -2
  214. package/dist/client-v2/ai-employees/chatbox/roles.d.ts +11 -0
  215. package/dist/client-v2/ai-employees/chatbox/stores/chat-box.d.ts +46 -79
  216. package/dist/client-v2/ai-employees/chatbox/stores/chat-conversations.d.ts +8 -25
  217. package/dist/client-v2/ai-employees/chatbox/stores/chat-messages.d.ts +23 -63
  218. package/dist/client-v2/ai-employees/chatbox/stores/chat-sender.d.ts +43 -0
  219. package/dist/{client → client-v2}/ai-employees/chatbox/stores/chat-tool-call.d.ts +6 -19
  220. package/dist/client-v2/ai-employees/chatbox/stores/chat-tools.d.ts +36 -0
  221. package/dist/client-v2/ai-employees/chatbox/stores/mounted-chat-boxes.d.ts +20 -0
  222. package/dist/client-v2/ai-employees/chatbox/stores/runtime.d.ts +43 -0
  223. package/dist/client-v2/ai-employees/chatbox/stores/workflow-tasks.d.ts +72 -0
  224. package/dist/client-v2/ai-employees/chatbox/upload.d.ts +19 -0
  225. package/dist/client-v2/ai-employees/chatbox/utils.d.ts +85 -0
  226. package/dist/{client/ai-employees/data-visualization/context.d.ts → client-v2/ai-employees/context/chart-config.d.ts} +1 -1
  227. package/dist/{client → client-v2}/ai-employees/context/code-editor.d.ts +1 -1
  228. package/dist/{client → client-v2}/ai-employees/context/datasource.d.ts +1 -1
  229. package/dist/{client → client-v2}/ai-employees/context/flow-models.d.ts +1 -1
  230. package/dist/client-v2/ai-employees/data-modeling/setup.d.ts +15 -0
  231. package/dist/{client → client-v2}/ai-employees/datasource/DatasourceSelector.d.ts +6 -2
  232. package/dist/{client/ai-employees/admin/datasource/flow-models/DatasourceSettingModel.d.ts → client-v2/ai-employees/flow/index.d.ts} +4 -6
  233. package/dist/{client → client-v2}/ai-employees/form-filler/tools/index.d.ts +1 -1
  234. package/dist/{client/ai-employees/ai-coding/tools/index.d.ts → client-v2/ai-employees/frontend-tools.d.ts} +3 -3
  235. package/dist/{client → client-v2}/ai-employees/stores/ai-selection.d.ts +4 -4
  236. package/dist/{client → client-v2}/ai-employees/stores/dialog-controller.d.ts +4 -4
  237. package/dist/{client/ai-employees/business-report/ui → client-v2/ai-employees/tools}/BusinessReportCard.d.ts +2 -2
  238. package/dist/{client/ai-employees/business-report/ui → client-v2/ai-employees/tools}/BusinessReportModal.d.ts +2 -2
  239. package/dist/{client/ai-employees/1.x/selector/withAISelectable.d.ts → client-v2/ai-employees/tools/ChartGeneratorCard.d.ts} +5 -4
  240. package/dist/{client/ai-employees/ai-coding/ui → client-v2/ai-employees/tools}/CodeToolCard.d.ts +1 -1
  241. package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools}/DataModelingCard.d.ts +3 -5
  242. package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools}/DataModelingModal.d.ts +4 -6
  243. package/dist/{client/ai-employees/sub-agents/ui → client-v2/ai-employees/tools}/SubAgentDispatchCard.d.ts +4 -9
  244. package/dist/client-v2/ai-employees/tools/SuggestionsOptionsCard.d.ts +16 -0
  245. package/dist/client-v2/ai-employees/tools/WorkflowTaskOutputCard.d.ts +16 -0
  246. package/dist/{client/ai-employees/ai-coding/tools/context-tools.d.ts → client-v2/ai-employees/tools/ai-coding.d.ts} +3 -1
  247. package/dist/client-v2/ai-employees/tools/business-report-utils.d.ts +45 -0
  248. package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools/data-modeling}/CollectionNode.d.ts +2 -3
  249. package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools/data-modeling}/Diagram.d.ts +1 -1
  250. package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools/data-modeling}/Table.d.ts +2 -2
  251. package/dist/client-v2/ai-employees/tools/data-modeling/legacy-template.d.ts +13 -0
  252. package/dist/client-v2/ai-employees/tools/data-modeling/runtime.d.ts +15 -0
  253. package/dist/{client/ai-employees → client-v2/ai-employees/tools}/data-modeling/types.d.ts +27 -4
  254. package/dist/client-v2/ai-employees/tools/data-modeling/useFieldInterfaceOptions.d.ts +151 -0
  255. package/dist/{client/ai-employees/data-visualization/tools/index.d.ts → client-v2/ai-employees/tools/data-visualization.d.ts} +1 -1
  256. package/dist/client-v2/ai-employees/tools/index.d.ts +32 -0
  257. package/dist/client-v2/ai-employees/types.d.ts +131 -7
  258. package/dist/client-v2/block/ai-chat-box/AIChatBoxBlockModel.d.ts +21 -0
  259. package/dist/{client/workflow/nodes/employee/flow-models/task.d.ts → client-v2/block/ai-chat-box/AIChatBoxCoreModel.d.ts} +1 -1
  260. package/dist/{client/admin-settings/AdminSettings.d.ts → client-v2/block/ai-chat-box/components/AIChatBoxCoreView.d.ts} +1 -1
  261. package/dist/{client/ai-employees/AIEmployeeListItem.d.ts → client-v2/block/ai-chat-box/components/AIChatBoxView.d.ts} +3 -5
  262. package/dist/client-v2/block/ai-chat-box/index.d.ts +14 -0
  263. package/dist/client-v2/block/ai-chat-box/settings.d.ts +12 -0
  264. package/dist/client-v2/block/ai-chat-box/sub-models.d.ts +26 -0
  265. package/dist/client-v2/block/ai-chat-box/types.d.ts +38 -0
  266. package/dist/client-v2/block/ai-chat-box/utils.d.ts +26 -0
  267. package/dist/client-v2/components/RemoteSelect.d.ts +43 -0
  268. package/dist/{client → client-v2}/debug-logger.d.ts +2 -2
  269. package/dist/client-v2/f0053e745af0ad03.svg +50 -0
  270. package/dist/client-v2/index.d.ts +11 -12
  271. package/dist/client-v2/index.js +37 -1
  272. package/dist/client-v2/llm-providers/forms.d.ts +44 -0
  273. package/dist/client-v2/llm-providers/index.d.ts +24 -0
  274. package/dist/client-v2/llm-services/model-select.d.ts +33 -0
  275. package/dist/client-v2/llm-services/utils.d.ts +14 -0
  276. package/dist/client-v2/locale.d.ts +14 -0
  277. package/dist/client-v2/manager/ai-manager.d.ts +62 -0
  278. package/dist/client-v2/manager/frontend-tool-registry.d.ts +30 -0
  279. package/dist/client-v2/models/ai-employees/AIEmployeeActionModel.d.ts +36 -0
  280. package/dist/client-v2/models/ai-employees/AIEmployeeShortcutModel.d.ts +49 -0
  281. package/dist/client-v2/pages/AdminSettingsPage.d.ts +24 -0
  282. package/dist/client-v2/pages/DatasourceSettingsPage.d.ts +62 -0
  283. package/dist/client-v2/pages/EmployeesPage.d.ts +64 -0
  284. package/dist/client-v2/pages/LLMServicesPage.d.ts +75 -0
  285. package/dist/client-v2/pages/MCPSettingsPage.d.ts +73 -0
  286. package/dist/client-v2/pages/drawerWidth.d.ts +10 -0
  287. package/dist/client-v2/pages/permissions/Permissions.d.ts +67 -0
  288. package/dist/client-v2/pages/permissions/PermissionsTab.d.ts +12 -0
  289. package/dist/client-v2/pages/useUnsavedChangesBeforeClose.d.ts +29 -0
  290. package/dist/client-v2/plugin.d.ts +33 -0
  291. package/dist/client-v2/repositories/AIConfigRepository.d.ts +3 -23
  292. package/dist/client-v2/runjs/registerAIEmployeeRunJSFacade.d.ts +21 -0
  293. package/dist/client-v2/workflow/components/FormValueRegistry.d.ts +12 -0
  294. package/dist/{client/components/ListCollapse.d.ts → client-v2/workflow/components/WorkflowListCollapse.d.ts} +4 -4
  295. package/dist/client-v2/workflow/constants.d.ts +26 -0
  296. package/dist/client-v2/workflow/nodes/employee/components/AIEmployeeFieldset.d.ts +11 -0
  297. package/dist/{client/ai-employees/common/CodeHighlight.d.ts → client-v2/workflow/nodes/employee/components/AIEmployeeSelect.d.ts} +5 -6
  298. package/dist/{client/ai-employees/ContextAwareTooltip.d.ts → client-v2/workflow/nodes/employee/components/Assignees.d.ts} +2 -1
  299. package/dist/client-v2/workflow/nodes/employee/components/FeedbackSettings.d.ts +17 -0
  300. package/dist/client-v2/workflow/nodes/employee/components/FileInputs.d.ts +11 -0
  301. package/dist/{client/ai-employees/AIEmployeesProvider.d.ts → client-v2/workflow/nodes/employee/components/MessageInputs.d.ts} +2 -3
  302. package/dist/client-v2/workflow/nodes/employee/components/ModelOptions.d.ts +17 -0
  303. package/dist/{client/ai-employees/admin/datasource/components/basic/CollectionCascader.d.ts → client-v2/workflow/nodes/employee/components/SkillSettings.d.ts} +6 -3
  304. package/dist/client-v2/workflow/nodes/employee/components/StructuredOutput.d.ts +11 -0
  305. package/dist/client-v2/workflow/nodes/employee/components/UserInput.d.ts +18 -0
  306. package/dist/{client/ai-employees/AISettingsProvider.d.ts → client-v2/workflow/nodes/employee/components/WebSearchOptions.d.ts} +6 -8
  307. package/dist/client-v2/workflow/nodes/employee/index.d.ts +23 -0
  308. package/dist/client-v2/workflow/nodes/llm/components/LLMFieldset.d.ts +12 -0
  309. package/dist/{client/ai-employees/chatbox → client-v2/workflow/nodes/llm/components}/Messages.d.ts +2 -1
  310. package/dist/client-v2/workflow/nodes/llm/components/StructuredOutput.d.ts +11 -0
  311. package/dist/client-v2/workflow/nodes/llm/index.d.ts +30 -0
  312. package/dist/client-v2/workflow/register.d.ts +10 -0
  313. package/dist/client-v2/workflow/triggers/ai-employee/AIEmployeeTriggerConfig.d.ts +11 -0
  314. package/dist/client-v2/workflow/triggers/ai-employee/Parameters.d.ts +11 -0
  315. package/dist/client-v2/workflow/triggers/ai-employee/index.d.ts +25 -0
  316. package/dist/client-v2/workflow/types.d.ts +128 -0
  317. package/dist/common/ai-employee-validation.d.ts +15 -0
  318. package/dist/common/ai-employee-validation.js +61 -0
  319. package/dist/common/error-codes.d.ts +13 -0
  320. package/dist/common/error-codes.js +48 -0
  321. package/dist/common/frontend-tools.d.ts +26 -0
  322. package/dist/common/frontend-tools.js +57 -0
  323. package/dist/common/llm-service-models.d.ts +16 -0
  324. package/dist/common/llm-service-models.js +84 -0
  325. package/dist/externalVersion.js +20 -25
  326. package/dist/locale/en-US.json +116 -1
  327. package/dist/locale/zh-CN.json +116 -1
  328. package/dist/node_modules/@langchain/mistralai/package.json +1 -1
  329. package/dist/node_modules/@langchain/xai/package.json +1 -1
  330. package/dist/node_modules/fs-extra/package.json +1 -1
  331. package/dist/node_modules/jsonrepair/package.json +1 -1
  332. package/dist/node_modules/just-bash/package.json +1 -1
  333. package/dist/node_modules/nodejs-snowflake/package.json +1 -1
  334. package/dist/node_modules/openai/package.json +1 -1
  335. package/dist/node_modules/zod/package.json +1 -1
  336. package/dist/server/ai-employees/ai-conversations.d.ts +4 -1
  337. package/dist/server/ai-employees/ai-conversations.js +2 -0
  338. package/dist/server/ai-employees/ai-employee.d.ts +3 -1
  339. package/dist/server/ai-employees/ai-employee.js +63 -9
  340. package/dist/server/ai-employees/middleware/conversation.js +9 -2
  341. package/dist/server/ai-employees/prompts.d.ts +2 -1
  342. package/dist/server/ai-employees/prompts.js +8 -2
  343. package/dist/server/ai-employees/tool-call-sanitizer.d.ts +1 -0
  344. package/dist/server/ai-employees/tool-call-sanitizer.js +2 -1
  345. package/dist/server/ai-employees/utils.js +11 -5
  346. package/dist/server/attachments.d.ts +24 -0
  347. package/dist/server/attachments.js +204 -0
  348. package/dist/server/collections/ai-conversations.js +5 -0
  349. package/dist/server/collections/ai-usage-events.d.ts +10 -0
  350. package/dist/server/collections/ai-usage-events.js +183 -0
  351. package/dist/server/document-loader/cached.d.ts +1 -0
  352. package/dist/server/document-loader/cached.js +18 -9
  353. package/dist/server/document-loader/constants.js +1 -1
  354. package/dist/server/document-loader/loader.d.ts +0 -1
  355. package/dist/server/document-loader/loader.js +25 -8
  356. package/dist/server/document-loader/types.d.ts +7 -0
  357. package/dist/server/frontend-tools.d.ts +25 -0
  358. package/dist/server/frontend-tools.js +171 -0
  359. package/dist/server/llm-providers/anthropic.d.ts +2 -1
  360. package/dist/server/llm-providers/anthropic.js +1 -3
  361. package/dist/server/llm-providers/dashscope.d.ts +2 -1
  362. package/dist/server/llm-providers/dashscope.js +16 -1
  363. package/dist/server/llm-providers/deepseek.d.ts +2 -1
  364. package/dist/server/llm-providers/deepseek.js +33 -2
  365. package/dist/server/llm-providers/google-genai.d.ts +1 -1
  366. package/dist/server/llm-providers/google-genai.js +1 -5
  367. package/dist/server/llm-providers/kimi/provider.d.ts +2 -1
  368. package/dist/server/llm-providers/kimi/provider.js +22 -2
  369. package/dist/server/llm-providers/mistral.d.ts +36 -2
  370. package/dist/server/llm-providers/mistral.js +62 -2
  371. package/dist/server/llm-providers/openai/completions.d.ts +2 -1
  372. package/dist/server/llm-providers/openai/completions.js +17 -1
  373. package/dist/server/llm-providers/openai/responses.d.ts +2 -1
  374. package/dist/server/llm-providers/openai/responses.js +17 -1
  375. package/dist/server/llm-providers/orcarouter.d.ts +35 -0
  376. package/dist/server/llm-providers/orcarouter.js +155 -0
  377. package/dist/server/llm-providers/provider.d.ts +10 -2
  378. package/dist/server/llm-providers/provider.js +33 -4
  379. package/dist/server/manager/ai-chat-conversation.js +2 -0
  380. package/dist/server/manager/ai-context-datasource-manager.js +34 -7
  381. package/dist/server/manager/ai-manager.d.ts +2 -1
  382. package/dist/server/manager/ai-manager.js +4 -1
  383. package/dist/server/manager/ai-usage-events.d.ts +49 -0
  384. package/dist/server/manager/ai-usage-events.js +195 -0
  385. package/dist/server/manager/work-context-handler.js +10 -3
  386. package/dist/server/plugin.d.ts +1 -0
  387. package/dist/server/plugin.js +41 -0
  388. package/dist/server/resource/aiConversations.d.ts +2 -0
  389. package/dist/server/resource/aiConversations.js +77 -4
  390. package/dist/server/resource/aiEmployees.d.ts +2 -0
  391. package/dist/server/resource/aiEmployees.js +62 -0
  392. package/dist/server/resource/aiWorkflowTasks.js +9 -1
  393. package/dist/server/resource/llmServices.d.ts +11 -0
  394. package/dist/server/resource/llmServices.js +85 -0
  395. package/dist/server/types/knowledge-base.type.d.ts +6 -2
  396. package/dist/server/utils.d.ts +5 -2
  397. package/dist/server/utils.js +11 -19
  398. package/dist/server/workflow/nodes/employee/files.d.ts +3 -1
  399. package/dist/server/workflow/nodes/employee/files.js +31 -5
  400. package/dist/swagger/common.d.ts +143 -0
  401. package/dist/swagger/common.js +144 -0
  402. package/dist/swagger/employees.d.ts +301 -0
  403. package/dist/swagger/employees.js +131 -0
  404. package/dist/swagger/index.d.ts +1588 -0
  405. package/dist/swagger/index.js +62 -0
  406. package/dist/swagger/llm.d.ts +555 -0
  407. package/dist/swagger/llm.js +247 -0
  408. package/dist/swagger/schemas.d.ts +736 -0
  409. package/dist/swagger/schemas.js +381 -0
  410. package/package.json +5 -5
  411. package/dist/ai/docs/nocobase/ai-employees/knowledge-base/vector-store.md +0 -24
  412. package/dist/ai/docs/nocobase/data-sources/development/index.md +0 -6
  413. package/dist/client/119.c6bf8c6433167d81.js +0 -10
  414. package/dist/client/170.d98eacdc00d9d527.js +0 -10
  415. package/dist/client/228.b4b709f93b86b6b9.js +0 -10
  416. package/dist/client/280.003b9e9788599244.js +0 -10
  417. package/dist/client/290.0f7f441d8a94f03c.js +0 -10
  418. package/dist/client/331.d547c95410476a69.js +0 -10
  419. package/dist/client/406.15c09d98faa2ccf1.js +0 -10
  420. package/dist/client/428.5eb4f53ddbb6a3b8.js +0 -10
  421. package/dist/client/462.d172d0fe91519e35.js +0 -10
  422. package/dist/client/486.dcac8f3fcec19c33.js +0 -10
  423. package/dist/client/502.2b4a51e0a8122e52.js +0 -10
  424. package/dist/client/525.33a9c8ec28be4ec4.js +0 -10
  425. package/dist/client/559.9f97ebcdb0bd6231.js +0 -10
  426. package/dist/client/561.7ec804ef39ec7dcd.js +0 -10
  427. package/dist/client/580.35ba54ff91b7fe6d.js +0 -10
  428. package/dist/client/597.b0d64948d74cf6cb.js +0 -10
  429. package/dist/client/604.89c674f35b52b4ef.js +0 -10
  430. package/dist/client/614.aa766080f6b99aab.js +0 -10
  431. package/dist/client/646.d4483b4ff23da0a0.js +0 -10
  432. package/dist/client/687.224e569a99cae4bb.js +0 -10
  433. package/dist/client/699.57c0a1acb723202a.js +0 -10
  434. package/dist/client/711.92cd94681fde7e05.js +0 -10
  435. package/dist/client/758.a9741e81911e53c3.js +0 -10
  436. package/dist/client/768.5177bff46ae71a5b.js +0 -10
  437. package/dist/client/792.abb57765453bcbcc.js +0 -10
  438. package/dist/client/820.f72ef2462b61d812.js +0 -10
  439. package/dist/client/832.0cf69e3f43c320b2.js +0 -10
  440. package/dist/client/927.d95c74ebb8fd51c9.js +0 -10
  441. package/dist/client/ai-employees/1.x/selector/AISelectorProvider.d.ts +0 -33
  442. package/dist/client/ai-employees/ProfileCard.d.ts +0 -15
  443. package/dist/client/ai-employees/admin/ChatSettings.d.ts +0 -10
  444. package/dist/client/ai-employees/admin/DataSourceSettings.d.ts +0 -10
  445. package/dist/client/ai-employees/admin/Employees.d.ts +0 -10
  446. package/dist/client/ai-employees/admin/EnableSwitch.d.ts +0 -10
  447. package/dist/client/ai-employees/admin/InputsFormSettings.d.ts +0 -10
  448. package/dist/client/ai-employees/admin/KnowledgeBaseSettings.d.ts +0 -10
  449. package/dist/client/ai-employees/admin/ModelSettings.d.ts +0 -10
  450. package/dist/client/ai-employees/admin/ProfileSettings.d.ts +0 -12
  451. package/dist/client/ai-employees/admin/SkillSettings.d.ts +0 -19
  452. package/dist/client/ai-employees/admin/SystemPrompt.d.ts +0 -10
  453. package/dist/client/ai-employees/admin/ToolsSettings.d.ts +0 -17
  454. package/dist/client/ai-employees/admin/datasource/components/DatasourceSettingForm.d.ts +0 -10
  455. package/dist/client/ai-employees/admin/datasource/components/DatasourceSettingGrid.d.ts +0 -10
  456. package/dist/client/ai-employees/admin/datasource/components/basic/FieldsTransfer.d.ts +0 -17
  457. package/dist/client/ai-employees/admin/datasource/components/basic/index.d.ts +0 -10
  458. package/dist/client/ai-employees/admin/datasource/components/form-steps/CollectionSetting.d.ts +0 -17
  459. package/dist/client/ai-employees/admin/datasource/components/form-steps/FieldsSetting.d.ts +0 -15
  460. package/dist/client/ai-employees/admin/datasource/components/form-steps/FilterSetting.d.ts +0 -17
  461. package/dist/client/ai-employees/admin/datasource/components/form-steps/Preview.d.ts +0 -13
  462. package/dist/client/ai-employees/admin/datasource/components/form-steps/SortSetting.d.ts +0 -15
  463. package/dist/client/ai-employees/admin/datasource/components/form-steps/index.d.ts +0 -13
  464. package/dist/client/ai-employees/admin/datasource/components/index.d.ts +0 -9
  465. package/dist/client/ai-employees/admin/datasource/context.d.ts +0 -17
  466. package/dist/client/ai-employees/admin/datasource/flow-models/index.d.ts +0 -9
  467. package/dist/client/ai-employees/admin/datasource/index.d.ts +0 -10
  468. package/dist/client/ai-employees/admin/hooks.d.ts +0 -39
  469. package/dist/client/ai-employees/admin/mcp/MCPSettings.d.ts +0 -10
  470. package/dist/client/ai-employees/admin/mcp/MCPToolsList.d.ts +0 -19
  471. package/dist/client/ai-employees/admin/mcp/context.d.ts +0 -15
  472. package/dist/client/ai-employees/admin/mcp/schemas.d.ts +0 -1314
  473. package/dist/client/ai-employees/ai-coding/CodeHistory.d.ts +0 -10
  474. package/dist/client/ai-employees/avatars.d.ts +0 -9
  475. package/dist/client/ai-employees/built-in/utils.d.ts +0 -15
  476. package/dist/client/ai-employees/business-report/tools/index.d.ts +0 -10
  477. package/dist/client/ai-employees/business-report/ui/report-utils.d.ts +0 -38
  478. package/dist/client/ai-employees/chart-generator/tools/index.d.ts +0 -10
  479. package/dist/client/ai-employees/chart-generator/ui/ECharts.d.ts +0 -13
  480. package/dist/client/ai-employees/chatbox/AIThinking.d.ts +0 -12
  481. package/dist/client/ai-employees/chatbox/Attachment.d.ts +0 -14
  482. package/dist/client/ai-employees/chatbox/AttachmentsHeader.d.ts +0 -10
  483. package/dist/client/ai-employees/chatbox/ChatBox.d.ts +0 -12
  484. package/dist/client/ai-employees/chatbox/ContextItemsHeader.d.ts +0 -10
  485. package/dist/client/ai-employees/chatbox/DebugPanel.d.ts +0 -16
  486. package/dist/client/ai-employees/chatbox/EditMessageHeader.d.ts +0 -10
  487. package/dist/client/ai-employees/chatbox/HintMessageHeader.d.ts +0 -10
  488. package/dist/client/ai-employees/chatbox/MessageRenderer.d.ts +0 -33
  489. package/dist/client/ai-employees/chatbox/Sender.d.ts +0 -10
  490. package/dist/client/ai-employees/chatbox/SenderFooter.d.ts +0 -13
  491. package/dist/client/ai-employees/chatbox/SenderHeader.d.ts +0 -10
  492. package/dist/client/ai-employees/chatbox/SenderPrefix.d.ts +0 -10
  493. package/dist/client/ai-employees/chatbox/Upload.d.ts +0 -12
  494. package/dist/client/ai-employees/chatbox/VirtualList.d.ts +0 -28
  495. package/dist/client/ai-employees/chatbox/conversations/Conversations.d.ts +0 -10
  496. package/dist/client/ai-employees/chatbox/conversations/ConversationsList.d.ts +0 -13
  497. package/dist/client/ai-employees/chatbox/conversations/WorkflowTasksList.d.ts +0 -13
  498. package/dist/client/ai-employees/chatbox/conversations/common.d.ts +0 -43
  499. package/dist/client/ai-employees/chatbox/conversations/index.d.ts +0 -9
  500. package/dist/client/ai-employees/chatbox/generative-ui/DefaultToolCard.d.ts +0 -16
  501. package/dist/client/ai-employees/chatbox/hooks/useChatBoxActions.d.ts +0 -18
  502. package/dist/client/ai-employees/chatbox/hooks/useUploadFiles.d.ts +0 -12
  503. package/dist/client/ai-employees/chatbox/markdown/ECharts.d.ts +0 -10
  504. package/dist/client/ai-employees/chatbox/markdown/Form.d.ts +0 -10
  505. package/dist/client/ai-employees/chatbox/markdown/Generating.d.ts +0 -10
  506. package/dist/client/ai-employees/chatbox/markdown/Markdown.d.ts +0 -13
  507. package/dist/client/ai-employees/chatbox/roles.d.ts +0 -32
  508. package/dist/client/ai-employees/chatbox/stores/chat-box.d.ts +0 -9
  509. package/dist/client/ai-employees/chatbox/stores/chat-conversations.d.ts +0 -9
  510. package/dist/client/ai-employees/chatbox/stores/chat-messages.d.ts +0 -9
  511. package/dist/client/ai-employees/chatbox/stores/chat-tools.d.ts +0 -51
  512. package/dist/client/ai-employees/chatbox/stores/create-selectors.d.ts +0 -18
  513. package/dist/client/ai-employees/chatbox/stores/workflow-tasks.d.ts +0 -45
  514. package/dist/client/ai-employees/chatbox/utils.d.ts +0 -41
  515. package/dist/client/ai-employees/context/classic-pages.d.ts +0 -10
  516. package/dist/client/ai-employees/data-modeling/Table.d.ts +0 -12
  517. package/dist/client/ai-employees/data-modeling/setup.d.ts +0 -10
  518. package/dist/client/ai-employees/data-modeling/tools/index.d.ts +0 -10
  519. package/dist/client/ai-employees/data-modeling/ui/useFieldInterfaceOptions.d.ts +0 -14
  520. package/dist/client/ai-employees/datasource/DatasourceList.d.ts +0 -17
  521. package/dist/client/ai-employees/datasource/index.d.ts +0 -9
  522. package/dist/client/ai-employees/flow/events/index.d.ts +0 -9
  523. package/dist/client/ai-employees/flow/index.d.ts +0 -36
  524. package/dist/client/ai-employees/flow/models/AIEmployeeActionModel.d.ts +0 -18
  525. package/dist/client/ai-employees/flow/models/AIEmployeeShortcutModel.d.ts +0 -30
  526. package/dist/client/ai-employees/shortcuts/ShortcutList.d.ts +0 -10
  527. package/dist/client/ai-employees/shortcuts/useShortcuts.d.ts +0 -13
  528. package/dist/client/ai-employees/stores/context-aware.d.ts +0 -19
  529. package/dist/client/ai-employees/sub-agents/tools/index.d.ts +0 -10
  530. package/dist/client/ai-employees/suggestions/tools/index.d.ts +0 -10
  531. package/dist/client/ai-employees/suggestions/ui/SuggestionsOptions.d.ts +0 -13
  532. package/dist/client/ai-employees/types.d.ts +0 -259
  533. package/dist/client/ai-employees/workflow-tasks/tools/index.d.ts +0 -10
  534. package/dist/client/ai-employees/workflow-tasks/ui/WorkflowTaskOutputCard.d.ts +0 -11
  535. package/dist/client/chat-settings/Messages.d.ts +0 -11
  536. package/dist/client/chat-settings/StructuredOutput.d.ts +0 -11
  537. package/dist/client/components/skill-settings.d.ts +0 -22
  538. package/dist/client/features/components.d.ts +0 -9
  539. package/dist/client/features/feature-manager.d.ts +0 -9
  540. package/dist/client/features/index.d.ts +0 -9
  541. package/dist/client/features/vector-database-provider.d.ts +0 -9
  542. package/dist/client/features/vector-store-provider.d.ts +0 -9
  543. package/dist/client/llm-providers/anthropic/ModelSettings.d.ts +0 -10
  544. package/dist/client/llm-providers/anthropic/ProviderSettings.d.ts +0 -10
  545. package/dist/client/llm-providers/anthropic/index.d.ts +0 -10
  546. package/dist/client/llm-providers/components/Chat.d.ts +0 -10
  547. package/dist/client/llm-providers/components/ModelSelect.d.ts +0 -10
  548. package/dist/client/llm-providers/dashscope/ModelSettings.d.ts +0 -10
  549. package/dist/client/llm-providers/dashscope/ProviderSettings.d.ts +0 -10
  550. package/dist/client/llm-providers/dashscope/index.d.ts +0 -10
  551. package/dist/client/llm-providers/deepseek/ModelSettings.d.ts +0 -10
  552. package/dist/client/llm-providers/deepseek/index.d.ts +0 -10
  553. package/dist/client/llm-providers/google-genai/MessageRenderer.d.ts +0 -13
  554. package/dist/client/llm-providers/google-genai/ModelSettings.d.ts +0 -10
  555. package/dist/client/llm-providers/google-genai/ProviderSettings.d.ts +0 -10
  556. package/dist/client/llm-providers/google-genai/index.d.ts +0 -10
  557. package/dist/client/llm-providers/kimi/ModelSettings.d.ts +0 -10
  558. package/dist/client/llm-providers/kimi/index.d.ts +0 -10
  559. package/dist/client/llm-providers/mimo/ModelSettings.d.ts +0 -10
  560. package/dist/client/llm-providers/mimo/index.d.ts +0 -10
  561. package/dist/client/llm-providers/mistral/ModelSettings.d.ts +0 -10
  562. package/dist/client/llm-providers/mistral/index.d.ts +0 -10
  563. package/dist/client/llm-providers/ollama/ModelSettings.d.ts +0 -10
  564. package/dist/client/llm-providers/ollama/ProviderSettings.d.ts +0 -10
  565. package/dist/client/llm-providers/ollama/index.d.ts +0 -10
  566. package/dist/client/llm-providers/openai/completions/ModelSettings.d.ts +0 -10
  567. package/dist/client/llm-providers/openai/completions/index.d.ts +0 -10
  568. package/dist/client/llm-providers/openai/components/ProviderSettings.d.ts +0 -10
  569. package/dist/client/llm-providers/openai/responses/ModelSettings.d.ts +0 -10
  570. package/dist/client/llm-providers/openai/responses/index.d.ts +0 -10
  571. package/dist/client/llm-providers/tongyi/ModelSettings.d.ts +0 -10
  572. package/dist/client/llm-providers/tongyi/ProviderSettings.d.ts +0 -10
  573. package/dist/client/llm-providers/tongyi/index.d.ts +0 -10
  574. package/dist/client/llm-providers/xai/ModelSettings.d.ts +0 -10
  575. package/dist/client/llm-providers/xai/index.d.ts +0 -10
  576. package/dist/client/llm-services/LLMServices.d.ts +0 -13
  577. package/dist/client/llm-services/component/DefaultModelSelect.d.ts +0 -10
  578. package/dist/client/llm-services/component/EnabledModelsSelect.d.ts +0 -23
  579. package/dist/client/llm-services/component/LLMTestFlight.d.ts +0 -10
  580. package/dist/client/llm-services/component/ModelOptionsSettings.d.ts +0 -10
  581. package/dist/client/llm-services/component/UnifiedModelSettings.d.ts +0 -10
  582. package/dist/client/llm-services/hooks/useLLMServiceCatalog.d.ts +0 -18
  583. package/dist/client/llm-services/llm-providers.d.ts +0 -27
  584. package/dist/client/llm-services/utils.d.ts +0 -35
  585. package/dist/client/manager/ai-feature-manager.d.ts +0 -9
  586. package/dist/client/manager/ai-manager.d.ts +0 -35
  587. package/dist/client/repositories/AIConfigRepository.d.ts +0 -60
  588. package/dist/client/repositories/hooks/useAIConfigRepository.d.ts +0 -10
  589. package/dist/client/schemas/llms.d.ts +0 -347
  590. package/dist/client/workflow/nodes/employee/components/AIEmployeeSelect.d.ts +0 -10
  591. package/dist/client/workflow/nodes/employee/components/assigness.d.ts +0 -11
  592. package/dist/client/workflow/nodes/employee/components/file-inputs.d.ts +0 -10
  593. package/dist/client/workflow/nodes/employee/components/message-inputs.d.ts +0 -12
  594. package/dist/client/workflow/nodes/employee/components/model-options.d.ts +0 -10
  595. package/dist/client/workflow/nodes/employee/components/structured-output.d.ts +0 -10
  596. package/dist/client/workflow/nodes/employee/components/users-select.d.ts +0 -15
  597. package/dist/client/workflow/nodes/employee/components/web-search-options.d.ts +0 -10
  598. package/dist/client/workflow/nodes/employee/configuration.d.ts +0 -12
  599. package/dist/client/workflow/nodes/employee/flow-models/feedback.d.ts +0 -14
  600. package/dist/client/workflow/nodes/llm/ModelSettings.d.ts +0 -11
  601. package/dist/client/workflow/triggers/ai-employee/Parameters.d.ts +0 -13
  602. package/dist/client-v2/ai-employees/chatbox/stores/create-selectors.d.ts +0 -18
  603. /package/dist/{client → client-v2}/ai-employees/AISelection.d.ts +0 -0
  604. /package/dist/{client → client-v2}/ai-employees/AISelectionControl.d.ts +0 -0
  605. /package/dist/{client → client-v2}/ai-employees/ai-coding/prompts.d.ts +0 -0
  606. /package/dist/{client → client-v2}/ai-employees/ai-coding/setup.d.ts +0 -0
  607. /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/ChatButton.d.ts +0 -0
  608. /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/SearchSwitch.d.ts +0 -0
  609. /package/dist/{client/ai-employees/chatbox/generative-ui → client-v2/ai-employees/chatbox/components}/ToolModal.d.ts +0 -0
  610. /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/UserPrompt.d.ts +0 -0
  611. /package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useLoadMoreObserver.d.ts +0 -0
  612. /package/dist/client-v2/ai-employees/{chatbox/stores → stores}/global-store.d.ts +0 -0
  613. /package/dist/{client/ai-employees/flow/models → client-v2/models/ai-employees}/AIEmployeeShortcutListModel.d.ts +0 -0
  614. /package/dist/{client/ai-employees/flow/models → client-v2/models/ai-employees}/index.d.ts +0 -0
  615. /package/dist/{client/ai-employees/flow/events/ai-context-selection.d.ts → client-v2/workflow/components/index.d.ts} +0 -0
@@ -0,0 +1,245 @@
1
+ ---
2
+ title: "REST API data source"
3
+ description: "Connect REST API data and map RESTful resources to collections. Configure List, Get, Create, Update, and Destroy API mappings to support CRUD operations."
4
+ keywords: "REST API data source,external API,API mapping,collection mapping,NocoBase"
5
+ ---
6
+
7
+ # REST API data source
8
+
9
+ <PluginInfo commercial="true" name="data-source-rest-api"></PluginInfo>
10
+
11
+ ## Introduction
12
+
13
+ Use this data source to connect data provided by REST APIs.
14
+
15
+ ## Installation
16
+
17
+ This is a commercial plugin. For activation instructions, see the [Commercial plugin activation guide](https://www.nocobase.com/en/blog/nocobase-commercial-license-activation-guide).
18
+
19
+ ## Add a REST API source
20
+
21
+ After activating the plugin, choose **REST API** from the **Add new** menu in Data source management.
22
+
23
+ ![Choose the REST API data source](https://static-docs.nocobase.com/20240721171420.png)
24
+
25
+ Configure the REST API source.
26
+
27
+ ![Configure the REST API source](https://static-docs.nocobase.com/20240721171507.png)
28
+
29
+ ## Add a collection
30
+
31
+ A RESTful resource maps to a NocoBase collection. For example, consider a Users resource:
32
+
33
+ ```bash
34
+ GET /users
35
+ POST /users
36
+ GET /users/1
37
+ PUT /users/1
38
+ DELETE /users/1
39
+ ```
40
+
41
+ It maps to the following NocoBase API configuration:
42
+
43
+ ```bash
44
+ GET /users:list
45
+ POST /users:create
46
+ POST /users:get?filterByTk=1
47
+ POST /users:update?filterByTk=1
48
+ POST /users:destroy?filterByTk=1
49
+ ```
50
+
51
+ For the complete NocoBase API design specification, see the API documentation.
52
+
53
+ ![API documentation entry](https://static-docs.nocobase.com/20240716213344.png)
54
+
55
+ See the **NocoBase API - Core** section.
56
+
57
+ ![NocoBase API - Core](https://static-docs.nocobase.com/20240716213258.png)
58
+
59
+ The REST API data-source collection is configured as follows.
60
+
61
+ ### List
62
+
63
+ Configure the API mapping for retrieving a resource list.
64
+
65
+ ![Configure the List API](https://static-docs.nocobase.com/20251201162457.png)
66
+
67
+ ### Get
68
+
69
+ Configure the API mapping for retrieving resource details.
70
+
71
+ ![Configure the Get API](https://static-docs.nocobase.com/20251201162744.png)
72
+
73
+ ### Create
74
+
75
+ Configure the API mapping for creating a resource.
76
+
77
+ ![Configure the Create API](https://static-docs.nocobase.com/20251201163000.png)
78
+
79
+ ### Update
80
+
81
+ Configure the API mapping for updating a resource.
82
+
83
+ ![Configure the Update API](https://static-docs.nocobase.com/20251201163058.png)
84
+
85
+ ### Destroy
86
+
87
+ Configure the API mapping for deleting a resource.
88
+
89
+ ![Configure the Destroy API](https://static-docs.nocobase.com/20251201163204.png)
90
+
91
+ List and Get are required API mappings.
92
+
93
+ ## Debug APIs
94
+
95
+ ### Request parameter integration
96
+
97
+ For example, configure pagination parameters for the List API. If the third-party API itself does not support pagination, NocoBase paginates the returned list data.
98
+
99
+ ![Configure List pagination parameters](https://static-docs.nocobase.com/20251201163500.png)
100
+
101
+ Only variables added to the API take effect.
102
+
103
+ | Third-party API parameter | NocoBase parameter |
104
+ | --- | --- |
105
+ | page | {{request.params.page}} |
106
+ | limit | {{request.params.pageSize}} |
107
+
108
+ Click **Try it out** to debug the API and inspect the response.
109
+
110
+ ![Debug an API request](https://static-docs.nocobase.com/20251201163635.png)
111
+
112
+ <video width="100%" height="440" controls>
113
+ <source src="https://static-docs.nocobase.com/20241121211034.mp4" type="video/mp4">
114
+ </video>
115
+
116
+ ### Response format conversion
117
+
118
+ The response format of a third-party API might not match the NocoBase standard. Convert it before it can be displayed correctly in the client.
119
+
120
+ ![Configure response conversion](https://static-docs.nocobase.com/20251201164529.png)
121
+
122
+ Adjust the conversion rules according to the third-party API response so that it matches the NocoBase output standard.
123
+
124
+ ![Response conversion rules](https://static-docs.nocobase.com/20251201164629.png)
125
+
126
+ Debugging flow.
127
+
128
+ ![Response conversion debugging flow](https://static-docs.nocobase.com/20240717110051.png)
129
+
130
+ ### Error information conversion
131
+
132
+ When a third-party API returns an error, its error response might not match the NocoBase standard. Convert it before the client can display it correctly.
133
+
134
+ ![Configure error conversion](https://static-docs.nocobase.com/20251201170545.png)
135
+
136
+ When error conversion is not configured, the error is converted by default to an error message that includes the HTTP status code.
137
+
138
+ ![Default error conversion](https://static-docs.nocobase.com/20251201170732.png)
139
+
140
+ After configuring error conversion to match the NocoBase output standard, the client can display third-party API error information correctly.
141
+
142
+ ![Error conversion rules](https://static-docs.nocobase.com/20251201170946.png)
143
+ ![Converted third-party API error](https://static-docs.nocobase.com/20251201171113.png)
144
+
145
+ ## Variables
146
+
147
+ The REST API data source provides three variable categories for API integration:
148
+
149
+ - Data-source custom variables
150
+ - NocoBase requests
151
+ - Third-party responses
152
+
153
+ ### Data-source custom variables
154
+
155
+ ![Data-source custom variables](https://static-docs.nocobase.com/20240716221937.png)
156
+
157
+ ![Configure a data-source custom variable](https://static-docs.nocobase.com/20240716221858.png)
158
+
159
+ ### NocoBase requests
160
+
161
+ - Params: URL query parameters (Search Params). The available Params differ between APIs
162
+ - Headers: request headers, primarily providing NocoBase custom `X-` information
163
+ - Body: the request body
164
+ - Token: the API token of the current NocoBase request
165
+
166
+ ![NocoBase request variables](https://static-docs.nocobase.com/20251201164833.png)
167
+
168
+ ### Third-party responses
169
+
170
+ Currently, only the response Body is available.
171
+
172
+ ![Third-party response variables](https://static-docs.nocobase.com/20251201164915.png)
173
+
174
+ The available variables for each API integration are as follows.
175
+
176
+ ### List
177
+
178
+ | Parameter | Description |
179
+ | --- | --- |
180
+ | request.params.page | Current page number |
181
+ | request.params.pageSize | Number of records per page |
182
+ | request.params.filter | Filter conditions. They must use the NocoBase Filter format. |
183
+ | request.params.sort | Sorting rules. They must use the NocoBase Sort format. |
184
+ | request.params.appends | Fields loaded on demand, typically for loading relationship fields on demand |
185
+ | request.params.fields | Fields that the API returns, as an allowlist |
186
+ | request.params.except | Fields to exclude, as a denylist |
187
+
188
+ ### Get
189
+
190
+ | Parameter | Description |
191
+ | --- | --- |
192
+ | request.params.filterByTk | Required. Usually the ID of the current record |
193
+ | request.params.filter | Filter conditions. They must use the NocoBase Filter format. |
194
+ | request.params.appends | Fields loaded on demand, typically for loading relationship fields on demand |
195
+ | request.params.fields | Fields that the API returns, as an allowlist |
196
+ | request.params.except | Fields to exclude, as a denylist |
197
+
198
+ ### Create
199
+
200
+ | Parameter | Description |
201
+ | --- | --- |
202
+ | request.params.whiteList | Allowlist |
203
+ | request.params.blacklist | Denylist |
204
+ | request.body | Initial data for creating the record |
205
+
206
+ ### Update
207
+
208
+ | Parameter | Description |
209
+ | --- | --- |
210
+ | request.params.filterByTk | Required. Usually the ID of the current record |
211
+ | request.params.filter | Filter conditions. They must use the NocoBase Filter format. |
212
+ | request.params.whiteList | Allowlist |
213
+ | request.params.blacklist | Denylist |
214
+ | request.body | Data to update |
215
+
216
+ ### Destroy
217
+
218
+ | Parameter | Description |
219
+ | --- | --- |
220
+ | request.params.filterByTk | Required. Usually the ID of the current record |
221
+ | request.params.filter | Filter conditions. They must use the NocoBase Filter format. |
222
+
223
+ ## Configure fields
224
+
225
+ Extract field metadata (Fields) from data returned by the adapted resource CRUD APIs and use it as the fields of the collection.
226
+
227
+ ![Extract collection fields](https://static-docs.nocobase.com/20240716223636.png)
228
+
229
+ Extract field metadata.
230
+
231
+ ![Extract field metadata](https://static-docs.nocobase.com/20251201165133.png)
232
+
233
+ Fields and preview.
234
+
235
+ ![Fields and preview](https://static-docs.nocobase.com/20240716224403.png)
236
+
237
+ Edit fields in the same way as for other data sources.
238
+
239
+ ![Edit REST API fields](https://static-docs.nocobase.com/20240716224704.png)
240
+
241
+ ## Add REST API data-source blocks
242
+
243
+ After configuring the collection, you can add blocks to pages.
244
+
245
+ ![Add a REST API data-source block](https://static-docs.nocobase.com/20240716225120.png)
@@ -1,27 +1,115 @@
1
1
  ---
2
- pkg: "@nocobase/plugin-field-attachment-url"
2
+ title: "Attachment URL"
3
+ description: "The Attachment URL field stores external file addresses for files hosted outside NocoBase."
4
+ keywords: "Attachment URL,attachmentUrl,field,Field interface,NocoBase"
3
5
  ---
4
6
 
5
- # Data Field: Attachment (URL)
7
+ # Attachment URL
6
8
 
7
9
  ## Introduction
8
10
 
9
- Supports attachments in URL format.
11
+ In NocoBase, **Attachment URL** stores an external file access address.
10
12
 
11
- ## Installation
13
+ It is suitable when files are already stored in an external system, object storage, or CDN and NocoBase only needs the access address. Use Attachment when NocoBase needs to upload and manage files, or URL for an ordinary web address.
12
14
 
13
- This plugin is a commercial plugin.
15
+ ## Use cases
14
16
 
15
- ## User Manual
17
+ Attachment URL fields are suitable for these business scenarios:
16
18
 
17
- ### Field Configuration
19
+ - Files hosted in external systems
20
+ - Object-storage file addresses
21
+ - CDN image and document addresses
22
+ - External attachments referenced by business records
18
23
 
19
- ![20241017092323](https://static-docs.nocobase.com/20241017092323.png)
24
+ ## Create and configure
20
25
 
21
- ### External Data Source
26
+ On the collection's **Configure fields** page, click **Add field** and select **Attachment URL** to create this field.
22
27
 
23
- ![20241017092456](https://static-docs.nocobase.com/20241017092456.png)
28
+ ![Configure a Attachment URL field](https://static-docs.nocobase.com/20241017092323.png)
24
29
 
25
- ### Interface
30
+ | Setting | Description |
31
+ | --- | --- |
32
+ | Field interface | The field interface. Attachment URL uses `attachmentUrl`, which determines how the field is entered and displayed in pages. |
33
+ | Field display name | The name displayed for the field, such as `File address`, `Image URL`, or `External attachment`. Use a name that business users can recognize. |
34
+ | Field name | The field identifier used internally by APIs, relation fields, permissions, and workflows. It usually cannot be changed after creation. It supports only letters, numbers, and underscores, and must begin with a letter. |
35
+ | Field type | The data-layer type. Attachment URL uses `string` by default. |
36
+ | Default value | The default value. When a new record has no value, NocoBase can fill this value automatically. |
37
+ | Validation rules | Validation rules. Supports URL-format, length, and required validation. |
38
+ | Description | A field description. Record the field meaning, entry requirements, data source, or maintainer. |
26
39
 
27
- ![20241017092759](https://static-docs.nocobase.com/20241017092759.png)
40
+ :::warning Note
41
+
42
+ Field names are referenced by page blocks, permissions, workflows, and APIs after creation. Confirm the name before creating the field to avoid later configuration changes.
43
+
44
+ :::
45
+
46
+ ## Field behavior
47
+
48
+ The default behavior of a Attachment URL field is as follows:
49
+
50
+ | Behavior | Description |
51
+ | --- | --- |
52
+ | Default Field interface | `attachmentUrl`. |
53
+ | Default Field type | `string`. |
54
+ | Available Field types | `string`, `text`. |
55
+ | Page component | Uses an attachment-URL component for entry and display. |
56
+ | Filtering | Supports URL and text filters where supported by the data source. |
57
+ | Sorting | Supports sorting in Table blocks where supported by the data source. |
58
+ | Validation | Supports URL-format, length, and required validation. |
59
+
60
+ ## Edit configuration
61
+
62
+ After creation, click **Edit** beside the field to edit its configuration. Edit fields to adjust how they are displayed and used in NocoBase, such as the display name, description, default value, validation rules, or field-specific settings.
63
+
64
+ When a field comes from a synchronized main-database table, editing usually maps the database field to a NocoBase Field type and Field interface.
65
+
66
+ | Setting | Can be edited | Description |
67
+ | --- | --- | --- |
68
+ | Field display name | Yes | Changes the name displayed in the interface without changing the field identifier. |
69
+ | Field name | No | The field identifier normally cannot be changed in the edit form after creation. |
70
+ | Field interface | Conditional | Main-database fields and synchronized fields can be adjusted during field mapping. Changes affect page input, display, and validation. |
71
+ | Field type | Conditional | Main-database fields and synchronized fields can be adjusted during field mapping. Confirm that existing values can be used by the new type first. |
72
+ | Default value | Yes | Adjusts the default value for new records. |
73
+ | Validation rules | Yes | Adjusts field validation rules. |
74
+ | Description | Yes | Adds the field meaning, entry requirements, data source, or maintainer. |
75
+
76
+ :::warning Note
77
+
78
+ Changing a Field type or Field interface is more than changing a display name. It affects field storage, input components, validation rules, filters, and workflow-variable usage. When the field contains substantial existing data, confirm that its data format is compatible first.
79
+
80
+ :::
81
+
82
+ ## Delete field
83
+
84
+ Click **Delete** beside a Attachment URL field to delete it. You can also select multiple fields and delete them in the main data source.
85
+
86
+ Deleting a Attachment URL field created in the main database usually also deletes the actual database column and its values. For a synchronized or external-data-source field, the impact depends on the corresponding data source and field origin.
87
+
88
+ :::danger Warning
89
+
90
+ Deleting a field can affect page blocks, forms, filters, permissions, workflows, APIs, imports and exports, and existing data. Confirm that the field is no longer referenced by business configuration before deleting it.
91
+
92
+ :::
93
+
94
+ ## Use in pages
95
+
96
+ Attachment URL fields are suitable for external-file display, preview, and download.
97
+
98
+ ![Use a Attachment URL field in a page](https://static-docs.nocobase.com/20260709231803.png)
99
+
100
+ ![Attachment URL configuration](https://static-docs.nocobase.com/20241017092456.png)
101
+ ![Attachment URL configuration](https://static-docs.nocobase.com/20241017092759.png)
102
+
103
+ | Scenario | Use |
104
+ | --- | --- |
105
+ | Form block | Enter an external file address. |
106
+ | Details block | Display, preview, or download an external file. |
107
+ | Table block | Display external attachment values. |
108
+ | Workflows and APIs | Pass external file addresses to business logic. |
109
+
110
+ ## Related links
111
+
112
+ - [Fields](../data-modeling/collection-fields/index.md) - Learn about field categories and mapping.
113
+ - [General collection](../data-source-main/general-collection.md) - Create and manage fields in a collection.
114
+ - [Attachment](../file-manager/field-attachment.md) - Upload and manage files in NocoBase.
115
+ - [URL](../data-modeling/collection-fields/basic/url.md) - Store ordinary web addresses.
@@ -1,99 +1,100 @@
1
1
  ---
2
2
  pkg: "@nocobase/plugin-field-encryption"
3
+ title: "Field encryption"
4
+ description: "Encrypt sensitive business data such as phone numbers, email addresses, and card numbers before storing it as ciphertext in the database."
5
+ keywords: "field encryption,Encryption,sensitive data,ciphertext storage,NocoBase"
3
6
  ---
4
7
 
5
8
  # Encryption
6
9
 
7
10
  ## Introduction
8
11
 
9
- You can encrypt sensitive business datasuch as customer phone numbers, email addresses, or card numbers—so that it is stored in the database as ciphertext.
12
+ Sensitive business data, such as customer phone numbers, email addresses, and card numbers, can be encrypted and stored in the database as ciphertext.
10
13
 
11
- ![20251104192513](https://static-docs.nocobase.com/20251104192513.png)
14
+ ![Encrypted field](https://static-docs.nocobase.com/20251104192513.png)
12
15
 
13
- ## Encryption Method
16
+ ## Encryption method
14
17
 
15
- :::warning
16
- The plugin automatically generates an `application key`, which is stored under the directory `/storage/apps/main/encryption-field-keys`.
18
+ :::warning Note
17
19
 
18
- Each `application key` is saved as a file whose name is the key ID, with the `.key` extension. Do not rename these files.
20
+ The plugin generates an **application key** automatically. The key is stored in `/storage/apps/main/encryption-field-keys`.
19
21
 
20
- Keep your `application key` files safe. If an `application key` file is lost, encrypted data cannot be decrypted.
22
+ An application-key file uses the key ID as its file name and has the `.key` extension. Do not change the file name.
23
+
24
+ Keep application-key files safe. If an application-key file is lost, encrypted data cannot be decrypted.
25
+
26
+ When the plugin is enabled for a sub-application, the default key directory is `/storage/apps/${sub-application-name}/encryption-field-keys`.
21
27
 
22
- If the plugin is enabled in a sub-application, the key is stored under:
23
- `/storage/apps/${sub-app-name}/encryption-field-keys`
24
28
  :::
25
29
 
26
- ### How It Works
30
+ ### How it works
27
31
 
28
- This plugin uses an **envelope encryption** scheme.
32
+ The plugin uses envelope encryption.
29
33
 
30
- ![20251118151143](https://static-docs.nocobase.com/20251118151143.png)
34
+ ![Envelope encryption](https://static-docs.nocobase.com/20251118151339.png)
31
35
 
32
- ### Application and Field Key Creation
36
+ ### Key creation flow
33
37
 
34
- 1. When you create your first encrypted field, NocoBase automatically generates a 32-byte `application key`, stores it in the default directory, and encodes it in base64.
35
- 1. Each time you create a new encrypted field, the system generates a random 32-byte `field key`, encrypts it using the `application key` and a randomly generated 16-byte `field IV` (AES), and stores the encrypted result in the `options` column of the `fields` table.
38
+ 1. When you create an encrypted field for the first time, the system generates a 32-byte **application key** and saves it, Base64 encoded, in the default storage directory.
39
+ 2. When you create an encrypted field, the system generates a random 32-byte **field key**. It encrypts this key with the application key and a randomly generated 16-byte **field initialization vector** using AES, then saves it in the `options` field of the `fields` table.
36
40
 
37
- ### Field Encryption Process
41
+ ### Field encryption flow
38
42
 
39
- 1. When writing data to an encrypted field, NocoBase retrieves the encrypted `field key` and `field IV` from the `options` column of the `fields` table.
40
- 2. The system decrypts the `field key` using the `application key` and `field IV`. It then encrypts the actual data using the `field key` and a randomly generated 16-byte `data IV` (AES).
41
- 3. The decrypted `field key` is also used to sign the plaintext using `HMAC-SHA256`, producing a base64-encoded `data signature` (used later for querying).
42
- 4. The 16-byte `data IV` and `ciphertext` are concatenated and encoded in base64.
43
- 5. The base64 `data signature` and base64 `ciphertext` are joined with a `.` separator.
44
- 6. The final string is stored in the database.
43
+ 1. When data is written to an encrypted field, the system reads the encrypted field key and field initialization vector from the `options` field of the `fields` table.
44
+ 2. It decrypts the encrypted field key with the application key and field initialization vector, then encrypts the data with the field key and a randomly generated 16-byte **data initialization vector** using AES.
45
+ 3. It signs the data with the decrypted field key using HMAC-SHA256, then Base64 encodes the result. This **data signature** is used for data lookup.
46
+ 4. It concatenates the 16-byte data initialization vector and encrypted data ciphertext as binary data, then Base64 encodes the result.
47
+ 5. It joins the Base64 data signature and Base64 data ciphertext with `.`.
48
+ 6. It saves the final concatenated string in the database.
45
49
 
46
- ## Environment Variables
50
+ ## Environment variable
47
51
 
48
- If you want to specify your own `application key`, you can set the environment variable `ENCRYPTION_FIELD_KEY_PATH`. The plugin will load all `.key` files in this directory as application keys.
52
+ To specify an application key, use the `ENCRYPTION_FIELD_KEY_PATH` environment variable. The plugin loads the file at this path as the application key.
49
53
 
50
- **Application key file requirements:**
54
+ Application-key file requirements:
51
55
 
52
56
  1. The file extension must be `.key`.
53
- 2. The filename is treated as the key ID; using a UUID is recommended.
54
- 3. The file content must be base64-encoded 32-byte binary data.
57
+ 2. The file name is used as the key ID. Use a UUID to keep it unique.
58
+ 3. The file content must be Base64-encoded 32-byte binary data.
55
59
 
56
60
  ```bash
57
61
  ENCRYPTION_FIELD_KEY_PATH=/path/to/my/app-keys/270263524860909922913.key
58
62
  ```
59
63
 
60
- ## Field Configuration
64
+ ## Field configuration
65
+
66
+ ![Configure an encrypted field](https://static-docs.nocobase.com/20240802173721.png)
61
67
 
62
- ![20240802173721](https://static-docs.nocobase.com/20240802173721.png)
68
+ ## Effect on filtering
63
69
 
64
- ## How Encryption Affects Filtering
70
+ Encrypted fields support only equals, does not equal, exists, and does not exist filters.
65
71
 
66
- Encrypted fields only support the following filter operators:
72
+ ![Encrypted field filtering](https://static-docs.nocobase.com/20240802174042.png)
67
73
 
68
- * Equal to
69
- * Not equal to
70
- * Exists
71
- * Does not exist
74
+ Data is filtered as follows:
72
75
 
73
- ![20240802174042](https://static-docs.nocobase.com/20240802174042.png)
76
+ 1. Read the field key for the encrypted field and decrypt it with the application key.
77
+ 2. Sign the user-entered lookup text with the field key using HMAC-SHA256.
78
+ 3. Append `.` to the signed lookup text and perform a prefix-match lookup against the encrypted database value.
74
79
 
75
- ### How Filtering Works Internally
80
+ ## Key rotation
76
81
 
77
- 1. Retrieve the encrypted `field key` and decrypt it using the `application key`.
78
- 2. Use the `field key` to generate an `HMAC-SHA256 signature` for the user’s input.
79
- 3. Concatenate the signature with `.` and perform a **prefix search** on the encrypted field value in the database.
82
+ :::warning Note
80
83
 
81
- ## Key Rotation
84
+ Before using `nocobase key-rotation`, confirm that the application has loaded this plugin.
82
85
 
83
- :::warning
84
- Before running the key rotation command `nocobase key-rotation`, ensure that this plugin is already enabled in the application.
85
86
  :::
86
87
 
87
- When migrating an application to a new environment, you may want to replace the old application key. You can use the `nocobase key-rotation` command to generate a new application key.
88
+ After an application is migrated to a new environment, use `nocobase key-rotation` when you do not want to continue using the old environment's application key.
88
89
 
89
- The command requires the application key from the old environment. After running it, NocoBase generates a new application key and replaces the old one. The new key is stored in the default directory and base64-encoded.
90
+ Key rotation requires the old application's application key. The command generates a new application key, replaces the old key, and saves the new key Base64 encoded in the default storage directory.
90
91
 
91
92
  ```bash
92
- # --key-path points to the old application key file corresponding to the encrypted data in the database
93
+ # --key-path specifies the old application-key file corresponding to encrypted database data
93
94
  yarn nocobase key-rotation --key-path /path/to/old-app-keys/270263524860909922913.key
94
95
  ```
95
96
 
96
- For rotating a sub-application’s key, add the `--app-name` parameter:
97
+ To replace a sub-application application key, add `--app-name` and specify the sub-application `name`.
97
98
 
98
99
  ```bash
99
100
  yarn nocobase key-rotation --app-name a_w0r211vv0az --key-path /path/to/old-app-keys/270263524860909922913.key
@@ -1,17 +1,111 @@
1
1
  ---
2
- pkg: "@nocobase/plugin-field-formula"
2
+ title: "Formula"
3
+ description: "The Formula field calculates a field value from an expression."
4
+ keywords: "Formula,formula,field,Field interface,NocoBase"
3
5
  ---
4
6
 
5
7
  # Formula
6
8
 
7
9
  ## Introduction
8
10
 
9
- ## Field Configuration
11
+ In NocoBase, **Formula** calculates a field value from an expression.
10
12
 
13
+ It is suitable for amount calculations, score calculations, text concatenation, and conditional calculations. Its value is normally generated by an expression and is not suitable for manual entry. For complex calculations, use a workflow or database view.
11
14
 
12
- ![20240512173541](https://static-docs.nocobase.com/20240512173541.png)
15
+ ## Use cases
13
16
 
17
+ Formula fields are suitable for these business scenarios:
14
18
 
15
- ## Example
19
+ - Amount calculations
20
+ - Score calculations
21
+ - Text concatenation
22
+ - Conditional calculations
16
23
 
17
- To be added.
24
+ ## Create and configure
25
+
26
+ On the collection's **Configure fields** page, click **Add field** and select **Formula** to create this field.
27
+
28
+ ![Configure a Formula field](https://static-docs.nocobase.com/20240512173541.png)
29
+
30
+ | Setting | Description |
31
+ | --- | --- |
32
+ | Field interface | The field interface. Formula uses `formula`, which determines how the field is entered and displayed in pages. |
33
+ | Field display name | The name displayed for the field, such as `Order subtotal`, `Overall score`, or `Display name`. Use a name that business users can recognize. |
34
+ | Field name | The field identifier used internally by APIs, relation fields, permissions, and workflows. It usually cannot be changed after creation. It supports only letters, numbers, and underscores, and must begin with a letter. |
35
+ | Field type | The data-layer type. Formula uses `formula` by default. |
36
+ | Default value | The default value. When a new record has no value, NocoBase can fill this value automatically. |
37
+ | Validation rules | Validation rules. Confirm that the formula expression is complete and referenced fields exist. |
38
+ | Description | A field description. Record the field meaning, entry requirements, data source, or maintainer. |
39
+
40
+ :::warning Note
41
+
42
+ Field names are referenced by page blocks, permissions, workflows, and APIs after creation. Confirm the name before creating the field to avoid later configuration changes.
43
+
44
+ :::
45
+
46
+ ## Field behavior
47
+
48
+ The default behavior of a Formula field is as follows:
49
+
50
+ | Behavior | Description |
51
+ | --- | --- |
52
+ | Default Field interface | `formula`. |
53
+ | Default Field type | `formula`. |
54
+ | Available Field types | `formula`. |
55
+ | Page component | Displays the result calculated from a formula expression. |
56
+ | Filtering | Filtering depends on the formula result and data-source capabilities. |
57
+ | Sorting | Supports sorting where the formula result type permits. |
58
+ | Validation | Confirm that the formula expression is complete and referenced fields exist. |
59
+
60
+ ## Edit configuration
61
+
62
+ After creation, click **Edit** beside the field to edit its configuration. Edit fields to adjust how they are displayed and used in NocoBase, such as the display name, description, default value, validation rules, or field-specific settings.
63
+
64
+ When a field comes from a synchronized main-database table, editing usually maps the database field to a NocoBase Field type and Field interface.
65
+
66
+ | Setting | Can be edited | Description |
67
+ | --- | --- | --- |
68
+ | Field display name | Yes | Changes the name displayed in the interface without changing the field identifier. |
69
+ | Field name | No | The field identifier normally cannot be changed in the edit form after creation. |
70
+ | Field interface | Conditional | Main-database fields and synchronized fields can be adjusted during field mapping. Changes affect page input, display, and validation. |
71
+ | Field type | Conditional | Main-database fields and synchronized fields can be adjusted during field mapping. Confirm that existing values can be used by the new type first. |
72
+ | Default value | Yes | Adjusts the default value for new records. |
73
+ | Validation rules | Yes | Adjusts field validation rules. |
74
+ | Description | Yes | Adds the field meaning, entry requirements, data source, or maintainer. |
75
+
76
+ :::warning Note
77
+
78
+ Changing a Field type or Field interface is more than changing a display name. It affects field storage, input components, validation rules, filters, and workflow-variable usage. When the field contains substantial existing data, confirm that its data format is compatible first.
79
+
80
+ :::
81
+
82
+ ## Delete field
83
+
84
+ Click **Delete** beside a Formula field to delete it. You can also select multiple fields and delete them in the main data source.
85
+
86
+ Deleting a Formula field created in the main database usually also deletes the actual database column and its values. For a synchronized or external-data-source field, the impact depends on the corresponding data source and field origin.
87
+
88
+ :::danger Warning
89
+
90
+ Deleting a field can affect page blocks, forms, filters, permissions, workflows, APIs, imports and exports, and existing data. Confirm that the field is no longer referenced by business configuration before deleting it.
91
+
92
+ :::
93
+
94
+ ## Use in pages
95
+
96
+ Formula fields are suitable for calculated values in pages, reports, and business logic.
97
+
98
+ ![Use a Formula field in a page](https://static-docs.nocobase.com/20260710151619.png)
99
+
100
+
101
+ | Scenario | Use |
102
+ | --- | --- |
103
+ | Details block | Display a calculated value. |
104
+ | Table block | Display and sort a formula result where supported. |
105
+ | Charts | Use a formula result for presentation. |
106
+ | Workflows and APIs | Read calculated values in business logic. |
107
+
108
+ ## Related links
109
+
110
+ - [Fields](../data-modeling/collection-fields/index.md) - Learn about field categories and mapping.
111
+ - [General collection](../data-source-main/general-collection.md) - Create and manage fields in a collection.