@nocobase/plugin-ai 2.2.0-alpha.3 → 2.2.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (411) 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/ops-management/version-control/index.md +1 -0
  20. package/dist/ai/docs/nocobase/plugins/@nocobase/plugin-block-comment/index.md +14 -0
  21. package/dist/ai/docs/nocobase/workflow/development/api.md +259 -77
  22. package/dist/ai/docs/nocobase/workflow/development/index.md +2 -1
  23. package/dist/ai/docs/nocobase/workflow/development/migration.md +319 -0
  24. package/dist/ai/docs/nocobase/workflow/development/node.md +84 -51
  25. package/dist/ai/docs/nocobase/workflow/development/trigger.md +122 -20
  26. package/dist/client/23.65ea8c37cd4b884b.js +10 -0
  27. package/dist/client/264.cc98933ef65608b6.js +10 -0
  28. package/dist/client/336.7a8a8853196ad779.js +11 -0
  29. package/dist/client/372.da38fe350bf841f4.js +10 -0
  30. package/dist/client/416.92b74ca47e4099c4.js +10 -0
  31. package/dist/client/446.d63c38d0309fe250.js +10 -0
  32. package/dist/client/525.203778500aca5d05.js +10 -0
  33. package/dist/client/663.680bcf6272a8504d.js +10 -0
  34. package/dist/client/681.399948c18d753667.js +10 -0
  35. package/dist/client/705.380279da896021fb.js +10 -0
  36. package/dist/client/ai-employees/1.x/selector/AIContextCollector.d.ts +1 -4
  37. package/dist/client/ai-employees/permissions/PermissionsTab.d.ts +21 -5
  38. package/dist/client/index.d.ts +15 -20
  39. package/dist/client/index.js +8 -8
  40. package/dist/client/workflow/nodes/employee/index.d.ts +2 -23
  41. package/dist/client/workflow/nodes/llm/index.d.ts +2 -52
  42. package/dist/client/workflow/triggers/ai-employee/index.d.ts +2 -83
  43. package/dist/client-v2/23.1bcb6986b40723d8.js +10 -0
  44. package/dist/client-v2/264.be92ff6a4d2612f1.js +10 -0
  45. package/dist/client-v2/336.e406470429e0670e.js +11 -0
  46. package/dist/client-v2/372.d76ea1ceed2be2a4.js +10 -0
  47. package/dist/client-v2/406.341be51205c674e0.js +10 -0
  48. package/dist/client-v2/416.0e1c2d9cde43b83d.js +10 -0
  49. package/dist/client-v2/446.073d450882db29fd.js +10 -0
  50. package/dist/client-v2/457.d72febb89e88fc00.js +10 -0
  51. package/dist/client-v2/663.342341f0b2b412d8.js +10 -0
  52. package/dist/client-v2/681.082f4f1c7b841983.js +10 -0
  53. package/dist/client-v2/705.1d10027ff8cfdf79.js +10 -0
  54. package/dist/{client/ai-employees/admin/AvatarSelect.d.ts → client-v2/ai-employees/AIEmployeeDropdown.d.ts} +8 -9
  55. package/dist/client-v2/ai-employees/AIEmployeeShortcut.d.ts +9 -2
  56. package/dist/{client → client-v2}/ai-employees/AddContextButton.d.ts +1 -1
  57. package/dist/{client → client-v2}/ai-employees/ai-coding/AICodingButton.d.ts +2 -1
  58. package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/Actions.d.ts +2 -4
  59. package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/AddLLMModal.d.ts +2 -4
  60. package/dist/client-v2/ai-employees/chatbox/components/Attachments.d.ts +27 -0
  61. package/dist/{client/ai-employees/permissions/Permissions.d.ts → client-v2/ai-employees/chatbox/components/ChatBox.d.ts} +2 -2
  62. package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/ChatBoxLayout.d.ts +1 -1
  63. package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/ContextItem.d.ts +1 -1
  64. package/dist/{client/ai-employees/admin/Employees.d.ts → client-v2/ai-employees/chatbox/components/DebugPanel.d.ts} +1 -1
  65. package/dist/{client/ai-employees/chatbox/markdown/Code.d.ts → client-v2/ai-employees/chatbox/components/Markdown.d.ts} +12 -5
  66. package/dist/{client/ai-employees/admin/ProfileSettings.d.ts → client-v2/ai-employees/chatbox/components/MessageContent.d.ts} +3 -2
  67. package/dist/client-v2/ai-employees/chatbox/components/MessageRenderers.d.ts +39 -0
  68. package/dist/{client/ai-employees/chatbox/generative-ui → client-v2/ai-employees/chatbox/components}/ToolCard.d.ts +7 -5
  69. package/dist/{client/ai-employees/admin/datasource/components/basic → client-v2/ai-employees/chatbox/components}/index.d.ts +5 -2
  70. package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useChat.d.ts +21 -22
  71. package/dist/client-v2/ai-employees/chatbox/hooks/useChatBoxActions.d.ts +3 -2
  72. package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useChatConversationActions.d.ts +2 -2
  73. package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useChatMessageActions.d.ts +8 -4
  74. package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useToolCallActions.d.ts +1 -1
  75. package/dist/client-v2/ai-employees/chatbox/hooks/useUploadFiles.d.ts +46 -0
  76. package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useWorkflowTasks.d.ts +1 -1
  77. package/dist/{client → client-v2}/ai-employees/chatbox/model.d.ts +9 -2
  78. package/dist/client-v2/ai-employees/chatbox/roles.d.ts +162 -0
  79. package/dist/client-v2/ai-employees/chatbox/stores/chat-box.d.ts +1 -49
  80. package/dist/client-v2/ai-employees/chatbox/stores/chat-conversations.d.ts +2 -19
  81. package/dist/client-v2/ai-employees/chatbox/stores/chat-messages.d.ts +1 -46
  82. package/dist/{client → client-v2}/ai-employees/chatbox/stores/chat-tool-call.d.ts +1 -15
  83. package/dist/client-v2/ai-employees/chatbox/stores/chat-tools.d.ts +30 -0
  84. package/dist/client-v2/ai-employees/chatbox/stores/create-selectors.d.ts +31 -3
  85. package/dist/{client/ai-employees/chatbox/conversations/common.d.ts → client-v2/ai-employees/chatbox/stores/workflow-tasks.d.ts} +21 -4
  86. package/dist/{client → client-v2}/ai-employees/chatbox/utils.d.ts +21 -6
  87. package/dist/{client/ai-employees/data-visualization/context.d.ts → client-v2/ai-employees/context/chart-config.d.ts} +1 -1
  88. package/dist/{client → client-v2}/ai-employees/context/code-editor.d.ts +1 -1
  89. package/dist/{client → client-v2}/ai-employees/context/datasource.d.ts +1 -1
  90. package/dist/{client → client-v2}/ai-employees/context/flow-models.d.ts +1 -1
  91. package/dist/{client/ai-employees/admin/datasource/components/DatasourceSettingDetail.d.ts → client-v2/ai-employees/data-modeling/setup.d.ts} +6 -5
  92. package/dist/{client → client-v2}/ai-employees/datasource/DatasourceSelector.d.ts +6 -2
  93. package/dist/{client/ai-employees/admin/datasource/flow-models/DatasourceSettingModel.d.ts → client-v2/ai-employees/flow/index.d.ts} +4 -6
  94. package/dist/{client → client-v2}/ai-employees/form-filler/tools/index.d.ts +1 -1
  95. package/dist/{client → client-v2}/ai-employees/stores/ai-selection.d.ts +4 -4
  96. package/dist/{client → client-v2}/ai-employees/stores/dialog-controller.d.ts +4 -4
  97. package/dist/{client/ai-employees/business-report/ui → client-v2/ai-employees/tools}/BusinessReportCard.d.ts +2 -2
  98. package/dist/{client/ai-employees/business-report/ui → client-v2/ai-employees/tools}/BusinessReportModal.d.ts +2 -2
  99. package/dist/{client/ai-employees/1.x/selector/withAISelectable.d.ts → client-v2/ai-employees/tools/ChartGeneratorCard.d.ts} +5 -4
  100. package/dist/{client/ai-employees/ai-coding/ui → client-v2/ai-employees/tools}/CodeToolCard.d.ts +1 -1
  101. package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools}/DataModelingCard.d.ts +3 -5
  102. package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools}/DataModelingModal.d.ts +4 -6
  103. package/dist/{client/ai-employees/sub-agents/ui → client-v2/ai-employees/tools}/SubAgentDispatchCard.d.ts +4 -9
  104. package/dist/{client/ai-employees/AISettingsProvider.d.ts → client-v2/ai-employees/tools/SuggestionsOptionsCard.d.ts} +6 -8
  105. package/dist/{client/ai-employees/workflow-tasks/ui → client-v2/ai-employees/tools}/WorkflowTaskOutputCard.d.ts +7 -2
  106. package/dist/{client/ai-employees/ai-coding/tools/context-tools.d.ts → client-v2/ai-employees/tools/ai-coding.d.ts} +3 -1
  107. package/dist/client-v2/ai-employees/tools/business-report-utils.d.ts +45 -0
  108. package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools/data-modeling}/CollectionNode.d.ts +2 -3
  109. package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools/data-modeling}/Diagram.d.ts +1 -1
  110. package/dist/{client/ai-employees/data-modeling/ui → client-v2/ai-employees/tools/data-modeling}/Table.d.ts +2 -2
  111. package/dist/client-v2/ai-employees/tools/data-modeling/legacy-template.d.ts +13 -0
  112. package/dist/client-v2/ai-employees/tools/data-modeling/runtime.d.ts +15 -0
  113. package/dist/{client/ai-employees → client-v2/ai-employees/tools}/data-modeling/types.d.ts +27 -4
  114. package/dist/client-v2/ai-employees/tools/data-modeling/useFieldInterfaceOptions.d.ts +150 -0
  115. package/dist/{client/ai-employees/data-visualization/tools/index.d.ts → client-v2/ai-employees/tools/data-visualization.d.ts} +1 -1
  116. package/dist/client-v2/ai-employees/tools/index.d.ts +32 -0
  117. package/dist/client-v2/ai-employees/types.d.ts +101 -7
  118. package/dist/client-v2/components/RemoteSelect.d.ts +43 -0
  119. package/dist/{client → client-v2}/debug-logger.d.ts +2 -2
  120. package/dist/client-v2/f0053e745af0ad03.svg +50 -0
  121. package/dist/client-v2/index.d.ts +9 -8
  122. package/dist/client-v2/index.js +37 -1
  123. package/dist/client-v2/llm-providers/forms.d.ts +42 -0
  124. package/dist/client-v2/llm-providers/index.d.ts +23 -0
  125. package/dist/{client/ai-employees/ai-coding/tools/index.d.ts → client-v2/llm-services/utils.d.ts} +5 -3
  126. package/dist/client-v2/locale.d.ts +14 -0
  127. package/dist/{client → client-v2}/manager/ai-manager.d.ts +4 -5
  128. package/dist/client-v2/models/ai-employees/AIEmployeeActionModel.d.ts +33 -0
  129. package/dist/client-v2/models/ai-employees/AIEmployeeShortcutModel.d.ts +44 -0
  130. package/dist/client-v2/pages/AdminSettingsPage.d.ts +24 -0
  131. package/dist/client-v2/pages/DatasourceSettingsPage.d.ts +62 -0
  132. package/dist/client-v2/pages/EmployeesPage.d.ts +53 -0
  133. package/dist/client-v2/pages/LLMServicesPage.d.ts +75 -0
  134. package/dist/client-v2/pages/MCPSettingsPage.d.ts +73 -0
  135. package/dist/client-v2/pages/drawerWidth.d.ts +10 -0
  136. package/dist/client-v2/pages/permissions/Permissions.d.ts +67 -0
  137. package/dist/client-v2/pages/permissions/PermissionsTab.d.ts +12 -0
  138. package/dist/client-v2/pages/useUnsavedChangesBeforeClose.d.ts +29 -0
  139. package/dist/client-v2/plugin.d.ts +32 -0
  140. package/dist/client-v2/repositories/AIConfigRepository.d.ts +3 -23
  141. package/dist/client-v2/workflow/components/FormValueRegistry.d.ts +12 -0
  142. package/dist/{client/components/ListCollapse.d.ts → client-v2/workflow/components/WorkflowListCollapse.d.ts} +4 -4
  143. package/dist/client-v2/workflow/constants.d.ts +26 -0
  144. package/dist/client-v2/workflow/nodes/employee/components/AIEmployeeFieldset.d.ts +11 -0
  145. package/dist/{client/ai-employees/common/CodeHighlight.d.ts → client-v2/workflow/nodes/employee/components/AIEmployeeSelect.d.ts} +5 -6
  146. package/dist/{client/ai-employees/ContextAwareTooltip.d.ts → client-v2/workflow/nodes/employee/components/Assignees.d.ts} +2 -1
  147. package/dist/client-v2/workflow/nodes/employee/components/FeedbackSettings.d.ts +17 -0
  148. package/dist/client-v2/workflow/nodes/employee/components/FileInputs.d.ts +11 -0
  149. package/dist/{client/ai-employees/AIEmployeesProvider.d.ts → client-v2/workflow/nodes/employee/components/MessageInputs.d.ts} +2 -3
  150. package/dist/client-v2/workflow/nodes/employee/components/ModelOptions.d.ts +17 -0
  151. package/dist/{client/ai-employees/admin/datasource/components/basic/CollectionCascader.d.ts → client-v2/workflow/nodes/employee/components/SkillSettings.d.ts} +6 -3
  152. package/dist/client-v2/workflow/nodes/employee/components/StructuredOutput.d.ts +11 -0
  153. package/dist/client-v2/workflow/nodes/employee/components/UserInput.d.ts +18 -0
  154. package/dist/client-v2/workflow/nodes/employee/components/WebSearchOptions.d.ts +16 -0
  155. package/dist/client-v2/workflow/nodes/employee/index.d.ts +23 -0
  156. package/dist/{client/ai-employees/AIEmployeeListItem.d.ts → client-v2/workflow/nodes/llm/components/LLMFieldset.d.ts} +3 -5
  157. package/dist/{client/admin-settings/AdminSettings.d.ts → client-v2/workflow/nodes/llm/components/Messages.d.ts} +2 -1
  158. package/dist/client-v2/workflow/nodes/llm/components/StructuredOutput.d.ts +11 -0
  159. package/dist/client-v2/workflow/nodes/llm/index.d.ts +30 -0
  160. package/dist/{client/ai-employees/1.x/selector/BlockSelector.d.ts → client-v2/workflow/register.d.ts} +2 -6
  161. package/dist/client-v2/workflow/triggers/ai-employee/AIEmployeeTriggerConfig.d.ts +11 -0
  162. package/dist/client-v2/workflow/triggers/ai-employee/Parameters.d.ts +11 -0
  163. package/dist/client-v2/workflow/triggers/ai-employee/index.d.ts +25 -0
  164. package/dist/client-v2/workflow/types.d.ts +128 -0
  165. package/dist/externalVersion.js +20 -25
  166. package/dist/locale/en-US.json +42 -1
  167. package/dist/locale/zh-CN.json +42 -1
  168. package/dist/node_modules/@langchain/mistralai/LICENSE +21 -0
  169. package/dist/node_modules/@langchain/mistralai/dist/_virtual/rolldown_runtime.cjs +25 -0
  170. package/dist/node_modules/@langchain/mistralai/dist/chat_models.cjs +859 -0
  171. package/dist/node_modules/@langchain/mistralai/dist/chat_models.d.cts +541 -0
  172. package/dist/node_modules/@langchain/mistralai/dist/chat_models.d.ts +541 -0
  173. package/dist/node_modules/@langchain/mistralai/dist/chat_models.js +857 -0
  174. package/dist/node_modules/@langchain/mistralai/dist/embeddings.cjs +140 -0
  175. package/dist/node_modules/@langchain/mistralai/dist/embeddings.d.cts +116 -0
  176. package/dist/node_modules/@langchain/mistralai/dist/embeddings.d.ts +116 -0
  177. package/dist/node_modules/@langchain/mistralai/dist/embeddings.js +139 -0
  178. package/dist/node_modules/@langchain/mistralai/dist/index.cjs +21 -0
  179. package/dist/node_modules/@langchain/mistralai/dist/index.d.cts +4 -0
  180. package/dist/node_modules/@langchain/mistralai/dist/index.d.ts +4 -0
  181. package/dist/node_modules/@langchain/mistralai/dist/index.js +5 -0
  182. package/dist/node_modules/@langchain/mistralai/dist/llms.cjs +275 -0
  183. package/dist/node_modules/@langchain/mistralai/dist/llms.d.cts +147 -0
  184. package/dist/node_modules/@langchain/mistralai/dist/llms.d.ts +147 -0
  185. package/dist/node_modules/@langchain/mistralai/dist/llms.js +274 -0
  186. package/dist/node_modules/@langchain/mistralai/dist/utils.cjs +61 -0
  187. package/dist/node_modules/@langchain/mistralai/dist/utils.js +59 -0
  188. package/dist/node_modules/@langchain/mistralai/package.json +1 -0
  189. package/dist/node_modules/@langchain/xai/dist/index.cjs +2 -2
  190. package/dist/node_modules/@langchain/xai/package.json +1 -1
  191. package/dist/node_modules/fs-extra/package.json +1 -1
  192. package/dist/node_modules/jsonrepair/package.json +1 -1
  193. package/dist/node_modules/just-bash/package.json +1 -1
  194. package/dist/node_modules/nodejs-snowflake/package.json +1 -1
  195. package/dist/node_modules/openai/package.json +1 -1
  196. package/dist/node_modules/zod/package.json +1 -1
  197. package/dist/server/ai-employees/ai-employee.js +12 -5
  198. package/dist/server/ai-employees/checkpoints/cleaner.d.ts +2 -0
  199. package/dist/server/ai-employees/checkpoints/cleaner.js +11 -1
  200. package/dist/server/ai-employees/middleware/conversation.d.ts +2 -0
  201. package/dist/server/ai-employees/middleware/conversation.js +2 -1
  202. package/dist/server/ai-employees/utils.d.ts +3 -1
  203. package/dist/server/ai-employees/utils.js +2 -0
  204. package/dist/server/llm-providers/mistral.d.ts +62 -0
  205. package/dist/server/llm-providers/mistral.js +265 -0
  206. package/dist/server/llm-providers/provider.d.ts +6 -2
  207. package/dist/server/llm-providers/provider.js +27 -14
  208. package/dist/server/plugin.js +2 -0
  209. package/dist/server/workflow/nodes/employee/index.js +92 -46
  210. package/dist/server/workflow/nodes/employee/tools.js +8 -1
  211. package/package.json +6 -5
  212. package/dist/client/119.c6bf8c6433167d81.js +0 -10
  213. package/dist/client/170.d98eacdc00d9d527.js +0 -10
  214. package/dist/client/228.b4b709f93b86b6b9.js +0 -10
  215. package/dist/client/280.003b9e9788599244.js +0 -10
  216. package/dist/client/290.0f7f441d8a94f03c.js +0 -10
  217. package/dist/client/331.d547c95410476a69.js +0 -10
  218. package/dist/client/406.15c09d98faa2ccf1.js +0 -10
  219. package/dist/client/428.5eb4f53ddbb6a3b8.js +0 -10
  220. package/dist/client/462.d172d0fe91519e35.js +0 -10
  221. package/dist/client/486.dcac8f3fcec19c33.js +0 -10
  222. package/dist/client/502.2b4a51e0a8122e52.js +0 -10
  223. package/dist/client/525.33a9c8ec28be4ec4.js +0 -10
  224. package/dist/client/559.a0f2f1cc2be3c039.js +0 -10
  225. package/dist/client/561.7ec804ef39ec7dcd.js +0 -10
  226. package/dist/client/580.35ba54ff91b7fe6d.js +0 -10
  227. package/dist/client/597.b0d64948d74cf6cb.js +0 -10
  228. package/dist/client/604.89c674f35b52b4ef.js +0 -10
  229. package/dist/client/614.aa766080f6b99aab.js +0 -10
  230. package/dist/client/646.d4483b4ff23da0a0.js +0 -10
  231. package/dist/client/687.224e569a99cae4bb.js +0 -10
  232. package/dist/client/699.57c0a1acb723202a.js +0 -10
  233. package/dist/client/711.92cd94681fde7e05.js +0 -10
  234. package/dist/client/758.a9741e81911e53c3.js +0 -10
  235. package/dist/client/768.5177bff46ae71a5b.js +0 -10
  236. package/dist/client/792.abb57765453bcbcc.js +0 -10
  237. package/dist/client/820.f72ef2462b61d812.js +0 -10
  238. package/dist/client/832.0cf69e3f43c320b2.js +0 -10
  239. package/dist/client/927.d95c74ebb8fd51c9.js +0 -10
  240. package/dist/client/ai-employees/1.x/selector/AISelectorProvider.d.ts +0 -33
  241. package/dist/client/ai-employees/ProfileCard.d.ts +0 -15
  242. package/dist/client/ai-employees/admin/ChatSettings.d.ts +0 -10
  243. package/dist/client/ai-employees/admin/DataSourceSettings.d.ts +0 -10
  244. package/dist/client/ai-employees/admin/EnableSwitch.d.ts +0 -10
  245. package/dist/client/ai-employees/admin/InputsFormSettings.d.ts +0 -10
  246. package/dist/client/ai-employees/admin/KnowledgeBaseSettings.d.ts +0 -10
  247. package/dist/client/ai-employees/admin/ModelSettings.d.ts +0 -10
  248. package/dist/client/ai-employees/admin/SkillSettings.d.ts +0 -19
  249. package/dist/client/ai-employees/admin/SystemPrompt.d.ts +0 -10
  250. package/dist/client/ai-employees/admin/Templates.d.ts +0 -10
  251. package/dist/client/ai-employees/admin/ToolsSettings.d.ts +0 -17
  252. package/dist/client/ai-employees/admin/datasource/components/DatasourceSettingForm.d.ts +0 -10
  253. package/dist/client/ai-employees/admin/datasource/components/DatasourceSettingGrid.d.ts +0 -10
  254. package/dist/client/ai-employees/admin/datasource/components/basic/FieldsTransfer.d.ts +0 -17
  255. package/dist/client/ai-employees/admin/datasource/components/form-steps/CollectionSetting.d.ts +0 -17
  256. package/dist/client/ai-employees/admin/datasource/components/form-steps/FieldsSetting.d.ts +0 -15
  257. package/dist/client/ai-employees/admin/datasource/components/form-steps/FilterSetting.d.ts +0 -17
  258. package/dist/client/ai-employees/admin/datasource/components/form-steps/Preview.d.ts +0 -13
  259. package/dist/client/ai-employees/admin/datasource/components/form-steps/SortSetting.d.ts +0 -15
  260. package/dist/client/ai-employees/admin/datasource/components/form-steps/index.d.ts +0 -13
  261. package/dist/client/ai-employees/admin/datasource/components/index.d.ts +0 -9
  262. package/dist/client/ai-employees/admin/datasource/context.d.ts +0 -17
  263. package/dist/client/ai-employees/admin/datasource/flow-models/index.d.ts +0 -9
  264. package/dist/client/ai-employees/admin/datasource/index.d.ts +0 -10
  265. package/dist/client/ai-employees/admin/hooks.d.ts +0 -39
  266. package/dist/client/ai-employees/admin/mcp/MCPSettings.d.ts +0 -10
  267. package/dist/client/ai-employees/admin/mcp/MCPToolsList.d.ts +0 -19
  268. package/dist/client/ai-employees/admin/mcp/context.d.ts +0 -15
  269. package/dist/client/ai-employees/admin/mcp/schemas.d.ts +0 -1314
  270. package/dist/client/ai-employees/ai-coding/CodeHistory.d.ts +0 -10
  271. package/dist/client/ai-employees/ai-coding/markdown/Code.d.ts +0 -16
  272. package/dist/client/ai-employees/avatars.d.ts +0 -9
  273. package/dist/client/ai-employees/built-in/utils.d.ts +0 -15
  274. package/dist/client/ai-employees/business-report/tools/index.d.ts +0 -10
  275. package/dist/client/ai-employees/business-report/ui/report-utils.d.ts +0 -38
  276. package/dist/client/ai-employees/chart-generator/tools/index.d.ts +0 -10
  277. package/dist/client/ai-employees/chart-generator/ui/ECharts.d.ts +0 -13
  278. package/dist/client/ai-employees/chatbox/AIThinking.d.ts +0 -12
  279. package/dist/client/ai-employees/chatbox/Attachment.d.ts +0 -14
  280. package/dist/client/ai-employees/chatbox/AttachmentsHeader.d.ts +0 -10
  281. package/dist/client/ai-employees/chatbox/ChatBox.d.ts +0 -12
  282. package/dist/client/ai-employees/chatbox/ContextItemsHeader.d.ts +0 -10
  283. package/dist/client/ai-employees/chatbox/DebugPanel.d.ts +0 -16
  284. package/dist/client/ai-employees/chatbox/EditMessageHeader.d.ts +0 -10
  285. package/dist/client/ai-employees/chatbox/HintMessageHeader.d.ts +0 -10
  286. package/dist/client/ai-employees/chatbox/MessageRenderer.d.ts +0 -33
  287. package/dist/client/ai-employees/chatbox/SenderFooter.d.ts +0 -13
  288. package/dist/client/ai-employees/chatbox/SenderHeader.d.ts +0 -10
  289. package/dist/client/ai-employees/chatbox/SenderPrefix.d.ts +0 -10
  290. package/dist/client/ai-employees/chatbox/Upload.d.ts +0 -12
  291. package/dist/client/ai-employees/chatbox/VirtualList.d.ts +0 -28
  292. package/dist/client/ai-employees/chatbox/conversations/ConversationsList.d.ts +0 -13
  293. package/dist/client/ai-employees/chatbox/conversations/WorkflowTasksList.d.ts +0 -13
  294. package/dist/client/ai-employees/chatbox/conversations/index.d.ts +0 -9
  295. package/dist/client/ai-employees/chatbox/generative-ui/DefaultToolCard.d.ts +0 -16
  296. package/dist/client/ai-employees/chatbox/hooks/useChatBoxActions.d.ts +0 -18
  297. package/dist/client/ai-employees/chatbox/hooks/useUploadFiles.d.ts +0 -12
  298. package/dist/client/ai-employees/chatbox/markdown/ECharts.d.ts +0 -10
  299. package/dist/client/ai-employees/chatbox/markdown/Form.d.ts +0 -10
  300. package/dist/client/ai-employees/chatbox/markdown/Generating.d.ts +0 -10
  301. package/dist/client/ai-employees/chatbox/markdown/Markdown.d.ts +0 -13
  302. package/dist/client/ai-employees/chatbox/roles.d.ts +0 -32
  303. package/dist/client/ai-employees/chatbox/stores/chat-box.d.ts +0 -9
  304. package/dist/client/ai-employees/chatbox/stores/chat-conversations.d.ts +0 -9
  305. package/dist/client/ai-employees/chatbox/stores/chat-messages.d.ts +0 -9
  306. package/dist/client/ai-employees/chatbox/stores/chat-tools.d.ts +0 -51
  307. package/dist/client/ai-employees/chatbox/stores/create-selectors.d.ts +0 -18
  308. package/dist/client/ai-employees/chatbox/stores/workflow-tasks.d.ts +0 -45
  309. package/dist/client/ai-employees/context/classic-pages.d.ts +0 -10
  310. package/dist/client/ai-employees/data-modeling/Table.d.ts +0 -12
  311. package/dist/client/ai-employees/data-modeling/setup.d.ts +0 -10
  312. package/dist/client/ai-employees/data-modeling/tools/index.d.ts +0 -10
  313. package/dist/client/ai-employees/data-modeling/ui/useFieldInterfaceOptions.d.ts +0 -14
  314. package/dist/client/ai-employees/datasource/DatasourceList.d.ts +0 -17
  315. package/dist/client/ai-employees/datasource/index.d.ts +0 -9
  316. package/dist/client/ai-employees/flow/events/index.d.ts +0 -9
  317. package/dist/client/ai-employees/flow/index.d.ts +0 -36
  318. package/dist/client/ai-employees/flow/models/AIEmployeeActionModel.d.ts +0 -18
  319. package/dist/client/ai-employees/flow/models/AIEmployeeShortcutModel.d.ts +0 -30
  320. package/dist/client/ai-employees/shortcuts/ShortcutList.d.ts +0 -10
  321. package/dist/client/ai-employees/shortcuts/useShortcuts.d.ts +0 -13
  322. package/dist/client/ai-employees/stores/context-aware.d.ts +0 -19
  323. package/dist/client/ai-employees/sub-agents/tools/index.d.ts +0 -10
  324. package/dist/client/ai-employees/suggestions/tools/index.d.ts +0 -10
  325. package/dist/client/ai-employees/suggestions/ui/SuggestionsOptions.d.ts +0 -13
  326. package/dist/client/ai-employees/types.d.ts +0 -259
  327. package/dist/client/ai-employees/workflow-tasks/tools/index.d.ts +0 -10
  328. package/dist/client/chat-settings/Messages.d.ts +0 -11
  329. package/dist/client/chat-settings/StructuredOutput.d.ts +0 -11
  330. package/dist/client/components/skill-settings.d.ts +0 -22
  331. package/dist/client/features/components.d.ts +0 -9
  332. package/dist/client/features/feature-manager.d.ts +0 -9
  333. package/dist/client/features/index.d.ts +0 -9
  334. package/dist/client/features/vector-database-provider.d.ts +0 -9
  335. package/dist/client/features/vector-store-provider.d.ts +0 -9
  336. package/dist/client/llm-providers/anthropic/ModelSettings.d.ts +0 -10
  337. package/dist/client/llm-providers/anthropic/ProviderSettings.d.ts +0 -10
  338. package/dist/client/llm-providers/anthropic/index.d.ts +0 -10
  339. package/dist/client/llm-providers/components/Chat.d.ts +0 -10
  340. package/dist/client/llm-providers/components/ModelSelect.d.ts +0 -10
  341. package/dist/client/llm-providers/dashscope/ModelSettings.d.ts +0 -10
  342. package/dist/client/llm-providers/dashscope/ProviderSettings.d.ts +0 -10
  343. package/dist/client/llm-providers/dashscope/index.d.ts +0 -10
  344. package/dist/client/llm-providers/deepseek/ModelSettings.d.ts +0 -10
  345. package/dist/client/llm-providers/deepseek/index.d.ts +0 -10
  346. package/dist/client/llm-providers/google-genai/MessageRenderer.d.ts +0 -13
  347. package/dist/client/llm-providers/google-genai/ModelSettings.d.ts +0 -10
  348. package/dist/client/llm-providers/google-genai/ProviderSettings.d.ts +0 -10
  349. package/dist/client/llm-providers/google-genai/index.d.ts +0 -10
  350. package/dist/client/llm-providers/kimi/ModelSettings.d.ts +0 -10
  351. package/dist/client/llm-providers/kimi/index.d.ts +0 -10
  352. package/dist/client/llm-providers/mimo/ModelSettings.d.ts +0 -10
  353. package/dist/client/llm-providers/mimo/index.d.ts +0 -10
  354. package/dist/client/llm-providers/ollama/ModelSettings.d.ts +0 -10
  355. package/dist/client/llm-providers/ollama/ProviderSettings.d.ts +0 -10
  356. package/dist/client/llm-providers/ollama/index.d.ts +0 -10
  357. package/dist/client/llm-providers/openai/completions/ModelSettings.d.ts +0 -10
  358. package/dist/client/llm-providers/openai/completions/index.d.ts +0 -10
  359. package/dist/client/llm-providers/openai/components/ProviderSettings.d.ts +0 -10
  360. package/dist/client/llm-providers/openai/responses/ModelSettings.d.ts +0 -10
  361. package/dist/client/llm-providers/openai/responses/index.d.ts +0 -10
  362. package/dist/client/llm-providers/tongyi/ModelSettings.d.ts +0 -10
  363. package/dist/client/llm-providers/tongyi/ProviderSettings.d.ts +0 -10
  364. package/dist/client/llm-providers/tongyi/index.d.ts +0 -10
  365. package/dist/client/llm-providers/xai/ModelSettings.d.ts +0 -10
  366. package/dist/client/llm-providers/xai/index.d.ts +0 -10
  367. package/dist/client/llm-services/LLMServices.d.ts +0 -13
  368. package/dist/client/llm-services/component/DefaultModelSelect.d.ts +0 -10
  369. package/dist/client/llm-services/component/EnabledModelsSelect.d.ts +0 -23
  370. package/dist/client/llm-services/component/LLMTestFlight.d.ts +0 -10
  371. package/dist/client/llm-services/component/ModelOptionsSettings.d.ts +0 -10
  372. package/dist/client/llm-services/component/UnifiedModelSettings.d.ts +0 -10
  373. package/dist/client/llm-services/hooks/useLLMServiceCatalog.d.ts +0 -18
  374. package/dist/client/llm-services/llm-providers.d.ts +0 -27
  375. package/dist/client/llm-services/utils.d.ts +0 -30
  376. package/dist/client/manager/ai-feature-manager.d.ts +0 -9
  377. package/dist/client/repositories/AIConfigRepository.d.ts +0 -60
  378. package/dist/client/repositories/hooks/useAIConfigRepository.d.ts +0 -10
  379. package/dist/client/schemas/llms.d.ts +0 -347
  380. package/dist/client/workflow/nodes/employee/components/AIEmployeeSelect.d.ts +0 -10
  381. package/dist/client/workflow/nodes/employee/components/assigness.d.ts +0 -11
  382. package/dist/client/workflow/nodes/employee/components/file-inputs.d.ts +0 -10
  383. package/dist/client/workflow/nodes/employee/components/message-inputs.d.ts +0 -12
  384. package/dist/client/workflow/nodes/employee/components/model-options.d.ts +0 -10
  385. package/dist/client/workflow/nodes/employee/components/structured-output.d.ts +0 -10
  386. package/dist/client/workflow/nodes/employee/components/users-select.d.ts +0 -15
  387. package/dist/client/workflow/nodes/employee/components/web-search-options.d.ts +0 -10
  388. package/dist/client/workflow/nodes/employee/configuration.d.ts +0 -12
  389. package/dist/client/workflow/nodes/employee/flow-models/feedback.d.ts +0 -14
  390. package/dist/client/workflow/nodes/employee/flow-models/task.d.ts +0 -13
  391. package/dist/client/workflow/nodes/llm/ModelSettings.d.ts +0 -11
  392. package/dist/client/workflow/triggers/ai-employee/Parameters.d.ts +0 -13
  393. /package/dist/{client → client-v2}/ai-employees/AISelection.d.ts +0 -0
  394. /package/dist/{client → client-v2}/ai-employees/AISelectionControl.d.ts +0 -0
  395. /package/dist/{client → client-v2}/ai-employees/ai-coding/prompts.d.ts +0 -0
  396. /package/dist/{client → client-v2}/ai-employees/ai-coding/setup.d.ts +0 -0
  397. /package/dist/{client/ai-employees/chatbox/AIEmployeeSwitch.d.ts → client-v2/ai-employees/chatbox/components/AIEmployeeSwitcher.d.ts} +0 -0
  398. /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/ChatButton.d.ts +0 -0
  399. /package/dist/{client/ai-employees/chatbox/conversations → client-v2/ai-employees/chatbox/components}/Conversations.d.ts +0 -0
  400. /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/Messages.d.ts +0 -0
  401. /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/ModelSwitcher.d.ts +0 -0
  402. /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/SearchSwitch.d.ts +0 -0
  403. /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/Sender.d.ts +0 -0
  404. /package/dist/{client/ai-employees/chatbox/generative-ui → client-v2/ai-employees/chatbox/components}/ToolModal.d.ts +0 -0
  405. /package/dist/{client/ai-employees/chatbox → client-v2/ai-employees/chatbox/components}/UserPrompt.d.ts +0 -0
  406. /package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useChatBoxEffect.d.ts +0 -0
  407. /package/dist/{client → client-v2}/ai-employees/chatbox/hooks/useLoadMoreObserver.d.ts +0 -0
  408. /package/dist/client-v2/ai-employees/{chatbox/stores → stores}/global-store.d.ts +0 -0
  409. /package/dist/{client/ai-employees/flow/models → client-v2/models/ai-employees}/AIEmployeeShortcutListModel.d.ts +0 -0
  410. /package/dist/{client/ai-employees/flow/models → client-v2/models/ai-employees}/index.d.ts +0 -0
  411. /package/dist/{client/ai-employees/flow/events/ai-context-selection.d.ts → client-v2/workflow/components/index.d.ts} +0 -0
@@ -0,0 +1,269 @@
1
+ ---
2
+ title: "Migrate to S3 Pro"
3
+ description: "Migrate files from public-only storage engines to S3 Pro, including maintenance windows, backups, object key mapping, record updates, and risk checks."
4
+ keywords: "S3 Pro,storage migration,private access,file migration,Local Storage,S3,OSS,COS,NocoBase"
5
+ ---
6
+
7
+ # Migrate to S3 Pro
8
+
9
+ If you already use [Local Storage](./local.md), [Amazon S3](./amazon-s3.md), [Aliyun OSS](./aliyun-oss.md), or [Tencent COS](./tencent-cos.md), and later need private file access, you can migrate historical files to [S3 Pro](./s3-pro.md).
10
+
11
+ This is not only a storage configuration change. A migration must handle three things: make the physical files or objects available from the new storage, update file records, and switch future uploads to the new storage.
12
+
13
+ :::warning Note
14
+
15
+ Run the migration once in a test environment first, and prepare restorable database and file backups. If users continue to upload or delete attachments during the migration, records can be missed, overwritten, or become inconsistent.
16
+
17
+ :::
18
+
19
+ ## Scope
20
+
21
+ This guide applies when migrating from these storage engines to S3 Pro:
22
+
23
+ | Source storage engine | Historical file location |
24
+ | --- | --- |
25
+ | Local Storage | `<documentRoot>/<record.path>/<record.filename>` |
26
+ | Amazon S3 | `join(record.path, record.filename)` in the source bucket |
27
+ | Aliyun OSS | `join(record.path, record.filename)` in the source bucket |
28
+ | Tencent COS | `join(record.path, record.filename)` in the source bucket |
29
+
30
+ Here, `record.path` and `record.filename` come from the file record itself, including the built-in `attachments` table and other file collections.
31
+
32
+ :::tip Note
33
+
34
+ For Local Storage, `documentRoot` must come from `options.documentRoot` in the corresponding `storages` record. The default value is `storage/uploads`, but the final absolute path depends on the runtime storage directory of NocoBase.
35
+
36
+ :::
37
+
38
+ ## Operation Steps
39
+
40
+ ### Step 1: Stop writes or enter a maintenance window
41
+
42
+ Pause user uploads, updates, and deletions of attachments during the migration. You can use a maintenance window, temporarily disable entry points, or freeze related business flows.
43
+
44
+ The goal is to keep file records and physical files stable. If users upload or delete files during migration, the migration script may no longer be working against the latest records.
45
+
46
+ ### Step 2: Back up the database and files
47
+
48
+ Prepare at least two backups:
49
+
50
+ 1. Database backup
51
+ 2. File backup or object snapshot from the source storage
52
+
53
+ For Local Storage, back up the directory pointed to by `documentRoot`. Historical files are usually stored at:
54
+
55
+ ```text
56
+ <documentRoot>/<record.path>/<record.filename>
57
+ ```
58
+
59
+ For Amazon S3, Aliyun OSS, and Tencent COS, confirm that objects in the source bucket are still readable, and record the source storage engine's `id`, `name`, `type`, `path`, `baseUrl`, and `options`.
60
+
61
+ It is also recommended to export a migration manifest for rollback and manual review:
62
+
63
+ ```text
64
+ collection
65
+ id
66
+ oldStorageId
67
+ oldPath
68
+ oldFilename
69
+ oldUrl
70
+ newKey
71
+ size
72
+ mimetype
73
+ ```
74
+
75
+ ### Step 3: Create and verify the S3 Pro storage
76
+
77
+ Create a new `s3-compatible` storage according to [S3 Pro](./s3-pro.md). At least verify these settings:
78
+
79
+ - bucket
80
+ - endpoint
81
+ - region
82
+ - accessKey
83
+ - secret
84
+ - public / private
85
+ - access endpoint
86
+ - forcePathStyle
87
+ - file size and MIME type rules
88
+
89
+ Upload a test file with the new storage and confirm upload, preview, download, and deletion all work. If the target is private access, also confirm that the access URL is a temporary signed URL and that its expiration is expected.
90
+
91
+ :::warning Note
92
+
93
+ S3 Pro uses direct client upload. The target bucket must have CORS rules that allow uploads from the NocoBase site, otherwise new uploads will fail.
94
+
95
+ :::
96
+
97
+ ### Step 4: Decide the object key mapping
98
+
99
+ For historical files migrated to S3 Pro, it is recommended to continue using the old relative path as the S3 object key:
100
+
101
+ ```text
102
+ oldKey = join(record.path, record.filename)
103
+ ```
104
+
105
+ For example:
106
+
107
+ ```text
108
+ record.path = "avatars"
109
+ record.filename = "a-123.png"
110
+ oldKey = "avatars/a-123.png"
111
+ ```
112
+
113
+ For persisted file records, S3 Pro uses `file.filename` directly as the full object key when accessing the file. It does not append `file.path`. Therefore, migrated records should be updated to:
114
+
115
+ ```text
116
+ storageId = <s3-pro-storage-id>
117
+ filename = <oldKey>
118
+ path = ""
119
+ url = ""
120
+ ```
121
+
122
+ Do not migrate to this shape:
123
+
124
+ ```text
125
+ filename = "a-123.png"
126
+ path = "avatars"
127
+ ```
128
+
129
+ Otherwise S3 Pro may treat only `a-123.png` as the object key, causing historical files to fail to load.
130
+
131
+ Use `/` as the separator when generating object keys. Do not use operating-system-specific path separators. If an old path starts with `/`, remove the leading slash.
132
+
133
+ ### Step 5: Move physical files or confirm object location
134
+
135
+ Traverse all file records, including the built-in `attachments` table and other file collections. Only process records where `storageId = <old-storage-id>`.
136
+
137
+ If the source is Local Storage, upload the local files to the bucket used by S3 Pro. If the source is already Amazon S3, Aliyun OSS, or Tencent COS, and the new S3 Pro storage points to the same bucket and endpoint, with credentials that can read the same objects, you usually do not need to copy objects. In that case, confirm that the `oldKey` generated in Step 4 is accessible through S3 Pro.
138
+
139
+ | Source storage engine | Whether files need to be copied | Target object key |
140
+ | --- | --- | --- |
141
+ | Local Storage | Must be uploaded to the S3 Pro bucket | `join(record.path, record.filename)` |
142
+ | Amazon S3 | Usually no copy if reusing the same bucket; copy is needed when changing bucket, account, or region | `join(record.path, record.filename)` |
143
+ | Aliyun OSS | Usually no copy if reusing the same bucket; copy is needed when changing bucket, account, or region | `join(record.path, record.filename)` |
144
+ | Tencent COS | Usually no copy if reusing the same bucket; copy is needed when changing bucket, account, or region | `join(record.path, record.filename)` |
145
+
146
+ Files or objects still need to be copied in these cases:
147
+
148
+ - Migrating from Local Storage to S3 Pro
149
+ - Changing bucket, account, region, or cloud provider
150
+ - Moving historical objects from a public bucket to a new private bucket
151
+ - Renaming object keys or reorganizing directories
152
+ - The source bucket policy is not suitable for S3 Pro signed access or direct client upload
153
+ - S3 Pro cannot directly access the source objects with the current endpoint and credentials
154
+
155
+ Before the real migration, run a dry-run. At least output:
156
+
157
+ - Number of records to migrate
158
+ - Total size to migrate
159
+ - Number of missing local files or missing source objects
160
+ - Number of duplicate object keys
161
+ - Number of records with unrecognized `storageId`
162
+ - List requiring manual handling
163
+
164
+ If duplicate object keys appear, do not overwrite directly. Compare file size, ETag, or hash to confirm whether they point to the same file. If they are different files, generate a new key for one record and use that new key when updating the record.
165
+
166
+ ### Step 6: Verify target object accessibility
167
+
168
+ After files are copied, or after confirming that the source cloud bucket can be reused, run S3 HEAD Object or an equivalent check for every migrated record. Confirm that S3 Pro can access the object through the target object key.
169
+
170
+ Recommended output:
171
+
172
+ - Success count
173
+ - Missing source file count
174
+ - Upload or copy failure count
175
+ - Missing target object count
176
+ - Duplicate key count
177
+ - List requiring manual handling
178
+
179
+ Do not rely only on the script exit code. Object storage can have partial failures, successful retries, same-key overwrites, or write-only-but-not-readable permission problems. The migration manifest and HEAD Object checks are more reliable.
180
+
181
+ ### Step 7: Update file records
182
+
183
+ After confirming that all target objects exist, update the file records. Only update records in file collections, keep the original `id`, and do not update many-to-many junction tables generated by attachment fields.
184
+
185
+ Core fields:
186
+
187
+ | Field | Value after migration |
188
+ | --- | --- |
189
+ | `storageId` | New S3 Pro storage ID |
190
+ | `filename` | `join(oldPath, oldFilename)` |
191
+ | `path` | Empty string |
192
+ | `url` | Empty string for private storage; public URL or empty string for public storage |
193
+
194
+ If S3 Pro is private, `url` must be empty. S3 Pro also clears `url` before saving non-public storage records. File access will dynamically generate a temporary signed URL.
195
+
196
+ :::warning Note
197
+
198
+ Batch update records in a transaction if possible, and keep the migration manifest from Step 2 until after the migration is fully verified. Rollback needs that manifest to restore `storageId`, `path`, `filename`, and `url` to their old values.
199
+
200
+ :::
201
+
202
+ ### Step 8: Switch future uploads to the new storage
203
+
204
+ After historical records are updated, switch the target storage for new uploads.
205
+
206
+ Check three types of configuration:
207
+
208
+ 1. Default storage engine: if attachment fields or file collections do not specify storage, uploaded files use the default storage. Set the new S3 Pro storage as the default.
209
+ 2. Attachment fields: if an attachment field is configured with `options.storage = <old-storage-name>`, change it to the new S3 Pro storage `name`.
210
+ 3. File collections: if a file collection is configured with the old storage engine, change it to the new S3 Pro storage `name`.
211
+
212
+ Here, `name` is the storage engine name, not the storage ID. Historical file records use `storageId`.
213
+
214
+ ### Step 9: Restart or refresh storage cache
215
+
216
+ The file manager caches `storages` configuration. If you update storage configuration through the NocoBase UI or resource API, `reloadStorages` is usually triggered. If you update the database directly, restart the application after migration or make sure the storage cache has been refreshed.
217
+
218
+ If you directly changed attachment field metadata or file collection metadata, it is also recommended to restart the application so collection configuration, field configuration, and frontend cache all use the new storage.
219
+
220
+ ### Step 10: Sample-check and keep old files
221
+
222
+ After migration, verify at least these scenarios:
223
+
224
+ - View, preview, and download historical files in attachment fields
225
+ - View, preview, and download historical files in file collections
226
+ - Image thumbnails or preprocessing parameters
227
+ - Office preview and other features that depend on external services reading file URLs
228
+ - Save, preview, download, and delete newly uploaded files
229
+ - Object deletion after deleting file records
230
+
231
+ Do not delete files from the old storage immediately. Keep them until the business side confirms the migration, backup cycles have covered the new state, and access logs show no abnormal behavior.
232
+
233
+ ## Risks
234
+
235
+ ### Data inconsistency during writes
236
+
237
+ If users can still upload or delete files during migration, objects may be copied after records are deleted, records may be updated while objects remain only in the old storage, or new uploads may not be included in the migration manifest. The default approach is to enter a maintenance window.
238
+
239
+ ### Different object key rules in S3 Pro
240
+
241
+ After migration, `filename` should store the full object key and `path` should be empty. This differs from the historical record shape of Local Storage and built-in S3 / OSS / COS, and is the easiest place to make mistakes.
242
+
243
+ ### URL accessibility changes
244
+
245
+ After migrating from public storage to private S3 Pro, historical public URLs may no longer remain valid. NocoBase dynamically generates temporary signed URLs for internal file access, but old URLs already saved in external systems are not automatically rewritten.
246
+
247
+ If third-party systems, email templates, exported files, or rich text content directly stores old URLs, evaluate a separate replacement strategy.
248
+
249
+ :::warning Note
250
+
251
+ If Markdown (Vditor) field content already stores file URLs, handle those contents separately. Private S3 Pro access generates temporary signed URLs that expire, and currently these private links are not supported for long-term storage and use inside Markdown (Vditor) fields.
252
+
253
+ If these fields must continue referencing files, keep publicly accessible file URLs for now.
254
+
255
+ :::
256
+
257
+ ### Preview services and private files
258
+
259
+ Some preview features depend on external services accessing file URLs. Private S3 Pro generates temporary signed URLs, which can usually be accessed, but they are affected by signature expiration, network reachability, bucket permissions, and server-side caching.
260
+
261
+ If files are very sensitive, reassess whether external preview services should be allowed to read them.
262
+
263
+ ### Direct database changes do not trigger all hooks
264
+
265
+ If you update `storages`, collection configuration, field configuration, and file records directly through SQL or a custom script, some NocoBase cache refreshes and save hooks are not triggered automatically. Restart the application after the update and verify storage configuration again.
266
+
267
+ ### Delete behavior points to the new storage
268
+
269
+ After a file record's `storageId` is updated to S3 Pro, deleting that file record later will make NocoBase try to delete the object from the new bucket. Objects in the old storage will not be deleted automatically and need to be cleaned up separately.
@@ -2,6 +2,15 @@
2
2
 
3
3
  A storage engine based on Tencent Cloud COS. You need to prepare the relevant account and permissions before use.
4
4
 
5
+
6
+ :::warning Note
7
+
8
+ This engine does not support private access. After a file is uploaded, NocoBase generates a directly accessible URL, and anyone who has that URL can access the file.
9
+
10
+ Even if the COS bucket itself is private, the built-in Tencent COS engine does not generate temporary signed URLs for file access. If you need private access, use [S3 Pro](./s3-pro). If historical files already exist, see [Migrate to S3 Pro](./migrate-to-s3-pro.md).
11
+
12
+ :::
13
+
5
14
  ## Configuration Parameters
6
15
 
7
16
 
@@ -0,0 +1,170 @@
1
+ ---
2
+ title: "Docker Installation (External Caddy)"
3
+ description: "Install NocoBase with Docker and use an external Caddy container as the entry point."
4
+ keywords: "Docker,NocoBase,Caddy,installation,reverse proxy"
5
+ ---
6
+
7
+ # Docker Installation (External Caddy)
8
+
9
+ In this setup, the NocoBase app container and the Caddy container run separately. You can start with [Docker Installation (Built-in Nginx)](./docker.mdx) and then switch the entry service to an external Caddy container.
10
+
11
+ ## When to use this setup
12
+
13
+ - You want to deploy NocoBase and the web server separately
14
+ - You want to simplify reverse proxy and HTTPS configuration with Caddy
15
+ - You want to expose only the proxy container to the public network
16
+
17
+ ## docker-compose.yml example
18
+
19
+ If you need the `full` image, replace `latest-no-nginx` with `latest-full-no-nginx`.
20
+
21
+ ```yml
22
+ networks:
23
+ nocobase:
24
+ driver: bridge
25
+
26
+ services:
27
+ app:
28
+ image: nocobase/nocobase:latest-no-nginx
29
+ restart: always
30
+ depends_on:
31
+ - postgres
32
+ networks:
33
+ - nocobase
34
+ environment:
35
+ - APP_KEY=your-secret-key
36
+ - DB_DIALECT=postgres
37
+ - DB_HOST=postgres
38
+ - DB_PORT=5432
39
+ - DB_DATABASE=nocobase
40
+ - DB_USER=nocobase
41
+ - DB_PASSWORD=nocobase
42
+ - TZ=Etc/UTC
43
+ - NOCOBASE_EXTRACT_CLIENT_ASSETS=true
44
+ - NOCOBASE_PROXY_PROVIDER=caddy
45
+ - NOCOBASE_PROXY_STORAGE_PATH=/app/nocobase/storage
46
+ - NOCOBASE_PROXY_UPSTREAM_HOST=app
47
+ volumes:
48
+ - ./storage:/app/nocobase/storage
49
+
50
+ caddy:
51
+ image: caddy:2
52
+ restart: always
53
+ depends_on:
54
+ - app
55
+ networks:
56
+ - nocobase
57
+ volumes:
58
+ - ./storage:/app/nocobase/storage
59
+ command: >
60
+ /bin/sh -c '
61
+ while [ ! -f /app/nocobase/storage/.nocobase/proxy/caddy/nocobase.caddy ]; do
62
+ echo "waiting for nocobase.caddy..."
63
+ sleep 1
64
+ done
65
+ ln -sf /app/nocobase/storage/.nocobase/proxy/caddy/nocobase.caddy /etc/caddy/Caddyfile
66
+ caddy run --config /etc/caddy/Caddyfile --adapter caddyfile
67
+ '
68
+ ports:
69
+ - "13000:80"
70
+
71
+ postgres:
72
+ image: postgres:16
73
+ restart: always
74
+ command: postgres -c wal_level=logical
75
+ environment:
76
+ POSTGRES_USER: nocobase
77
+ POSTGRES_DB: nocobase
78
+ POSTGRES_PASSWORD: nocobase
79
+ volumes:
80
+ - ./storage/db/postgres:/var/lib/postgresql/data
81
+ networks:
82
+ - nocobase
83
+ ```
84
+
85
+ ## Key points
86
+
87
+ - `NOCOBASE_EXTRACT_CLIENT_ASSETS=true` extracts client assets and generates proxy config
88
+ - `NOCOBASE_PROXY_PROVIDER=caddy` tells the app to generate Caddy config
89
+ - `NOCOBASE_PROXY_UPSTREAM_HOST=app` lets the Caddy container reach the `app` service through the Compose network
90
+ - `./storage` must be mounted into both the `app` and `caddy` containers so they can share proxy config, static assets, and uploaded files
91
+ - The `caddy` container should wait until `nocobase.caddy` is generated, then link it to `/etc/caddy/Caddyfile` with `ln -sf`
92
+ - Expose only the Caddy container port to the host. The `app` service does not need to expose its port to the host
93
+
94
+ ## If you use a local host Caddy
95
+
96
+ If your Caddy is installed directly on the host instead of running in a Docker container, it is better to use a separate `docker-compose.yml`. In this setup, the `app` service must expose a host port directly, and the proxy-related environment variables should use host-side values.
97
+
98
+ You can use a `docker-compose.yml` like this:
99
+
100
+ ```yml
101
+ networks:
102
+ nocobase:
103
+ driver: bridge
104
+
105
+ services:
106
+ app:
107
+ image: nocobase/nocobase:latest-no-nginx
108
+ restart: always
109
+ depends_on:
110
+ - postgres
111
+ networks:
112
+ - nocobase
113
+ environment:
114
+ - APP_KEY=your-secret-key
115
+ - DB_DIALECT=postgres
116
+ - DB_HOST=postgres
117
+ - DB_PORT=5432
118
+ - DB_DATABASE=nocobase
119
+ - DB_USER=nocobase
120
+ - DB_PASSWORD=nocobase
121
+ - TZ=Etc/UTC
122
+ - NOCOBASE_EXTRACT_CLIENT_ASSETS=true
123
+ - NOCOBASE_PROXY_PROVIDER=caddy
124
+ - NOCOBASE_PROXY_STORAGE_PATH=/path/to/your-project/storage
125
+ - NOCOBASE_PROXY_UPSTREAM_HOST=127.0.0.1
126
+ - NOCOBASE_PROXY_UPSTREAM_PORT=13000
127
+ volumes:
128
+ - ./storage:/app/nocobase/storage
129
+ ports:
130
+ - "13000:13000"
131
+
132
+ postgres:
133
+ image: postgres:16
134
+ restart: always
135
+ command: postgres -c wal_level=logical
136
+ environment:
137
+ POSTGRES_USER: nocobase
138
+ POSTGRES_DB: nocobase
139
+ POSTGRES_PASSWORD: nocobase
140
+ volumes:
141
+ - ./storage/db/postgres:/var/lib/postgresql/data
142
+ networks:
143
+ - nocobase
144
+ ```
145
+
146
+ In this variant:
147
+
148
+ - `NOCOBASE_PROXY_STORAGE_PATH` should be the absolute host path of your `storage` directory
149
+ - `NOCOBASE_PROXY_UPSTREAM_HOST` should be `127.0.0.1`
150
+ - The `app` service must keep `ports`, so the local Caddy can reach the app through `127.0.0.1:13000`
151
+
152
+ After the `app` container starts, wait for the config file to be generated, then link it into the local Caddy config path:
153
+
154
+ ```bash
155
+ while [ ! -f ./storage/.nocobase/proxy/caddy/nocobase.caddy ]; do
156
+ echo "waiting for nocobase.caddy..."
157
+ sleep 1
158
+ done
159
+
160
+ sudo ln -sf "$(pwd)/storage/.nocobase/proxy/caddy/nocobase.caddy" /etc/caddy/Caddyfile
161
+ sudo caddy validate --config /etc/caddy/Caddyfile --adapter caddyfile
162
+ sudo systemctl reload caddy
163
+ ```
164
+
165
+ If your host Caddy does not use `/etc/caddy/Caddyfile`, replace the link target with your own config path. Usually it is safer to keep `nocobase.caddy` as the main entry file instead of copying its content manually.
166
+
167
+ ## Related links
168
+
169
+ - [Docker Installation (Built-in Nginx)](./docker.mdx) — Start with the single-container setup
170
+ - [Caddy Static Resource Proxy](../deployment/static-resource-proxy/caddy.md) — Learn more about the generated Caddy config
@@ -0,0 +1,172 @@
1
+ ---
2
+ title: "Docker Installation (External Nginx)"
3
+ description: "Install NocoBase with Docker and use an external Nginx container as the entry point."
4
+ keywords: "Docker,NocoBase,Nginx,installation,reverse proxy"
5
+ ---
6
+
7
+ # Docker Installation (External Nginx)
8
+
9
+ In this setup, the NocoBase app container and the Nginx container run separately. You can start with [Docker Installation (Built-in Nginx)](./docker.mdx) and then switch the entry service to an external Nginx container.
10
+
11
+ ## When to use this setup
12
+
13
+ - You want to deploy NocoBase and the web server separately
14
+ - You want to manage the Nginx config and exposed ports yourself
15
+ - You want to expose only the proxy container to the public network
16
+
17
+ ## docker-compose.yml example
18
+
19
+ If you need the `full` image, replace `latest-no-nginx` with `latest-full-no-nginx`.
20
+
21
+ ```yml
22
+ networks:
23
+ nocobase:
24
+ driver: bridge
25
+
26
+ services:
27
+ app:
28
+ image: nocobase/nocobase:latest-no-nginx
29
+ restart: always
30
+ depends_on:
31
+ - postgres
32
+ networks:
33
+ - nocobase
34
+ environment:
35
+ - APP_KEY=your-secret-key
36
+ - DB_DIALECT=postgres
37
+ - DB_HOST=postgres
38
+ - DB_PORT=5432
39
+ - DB_DATABASE=nocobase
40
+ - DB_USER=nocobase
41
+ - DB_PASSWORD=nocobase
42
+ - TZ=Etc/UTC
43
+ - NOCOBASE_EXTRACT_CLIENT_ASSETS=true
44
+ - NOCOBASE_PROXY_PROVIDER=nginx
45
+ - NOCOBASE_PROXY_STORAGE_PATH=/app/nocobase/storage
46
+ - NOCOBASE_PROXY_UPSTREAM_HOST=app
47
+ volumes:
48
+ - ./storage:/app/nocobase/storage
49
+
50
+ nginx:
51
+ image: nginx:latest
52
+ restart: always
53
+ depends_on:
54
+ - app
55
+ networks:
56
+ - nocobase
57
+ volumes:
58
+ - ./storage:/app/nocobase/storage
59
+ command: >
60
+ /bin/sh -c '
61
+ while [ ! -f /app/nocobase/storage/.nocobase/proxy/nginx/nocobase.conf ]; do
62
+ echo "waiting for nocobase.conf..."
63
+ sleep 1
64
+ done
65
+ rm -f /etc/nginx/conf.d/default.conf
66
+ ln -sf /app/nocobase/storage/.nocobase/proxy/nginx/nocobase.conf /etc/nginx/conf.d/default.conf
67
+ nginx -g "daemon off;"
68
+ '
69
+ ports:
70
+ - "13000:80"
71
+
72
+ postgres:
73
+ image: postgres:16
74
+ restart: always
75
+ command: postgres -c wal_level=logical
76
+ environment:
77
+ POSTGRES_USER: nocobase
78
+ POSTGRES_DB: nocobase
79
+ POSTGRES_PASSWORD: nocobase
80
+ volumes:
81
+ - ./storage/db/postgres:/var/lib/postgresql/data
82
+ networks:
83
+ - nocobase
84
+ ```
85
+
86
+ ## Key points
87
+
88
+ - `NOCOBASE_EXTRACT_CLIENT_ASSETS=true` extracts client assets and generates proxy config
89
+ - `NOCOBASE_PROXY_PROVIDER=nginx` tells the app to generate Nginx config
90
+ - `NOCOBASE_PROXY_UPSTREAM_HOST=app` lets the Nginx container reach the `app` service through the Compose network
91
+ - `./storage` must be mounted into both the `app` and `nginx` containers so they can share proxy config, static assets, and uploaded files
92
+ - The `nginx` container should wait until `nocobase.conf` is generated, then link it to `/etc/nginx/conf.d/default.conf` with `ln -sf`
93
+ - If you use the built-in Nginx image, the `app` container itself exposes the port with `ports: "13000:80"`
94
+ - If you use an external Nginx container, let the `nginx` container handle the host port mapping, and do not expose the `app` service port to the host
95
+
96
+ ## If you use a local host Nginx
97
+
98
+ If your Nginx is installed directly on the host instead of running in a Docker container, it is better to use a separate `docker-compose.yml`. In this setup, the `app` service must expose a host port directly, and the proxy-related environment variables should use host-side values.
99
+
100
+ You can use a `docker-compose.yml` like this:
101
+
102
+ ```yml
103
+ networks:
104
+ nocobase:
105
+ driver: bridge
106
+
107
+ services:
108
+ app:
109
+ image: nocobase/nocobase:latest-no-nginx
110
+ restart: always
111
+ depends_on:
112
+ - postgres
113
+ networks:
114
+ - nocobase
115
+ environment:
116
+ - APP_KEY=your-secret-key
117
+ - DB_DIALECT=postgres
118
+ - DB_HOST=postgres
119
+ - DB_PORT=5432
120
+ - DB_DATABASE=nocobase
121
+ - DB_USER=nocobase
122
+ - DB_PASSWORD=nocobase
123
+ - TZ=Etc/UTC
124
+ - NOCOBASE_EXTRACT_CLIENT_ASSETS=true
125
+ - NOCOBASE_PROXY_PROVIDER=nginx
126
+ - NOCOBASE_PROXY_STORAGE_PATH=/path/to/your-project/storage
127
+ - NOCOBASE_PROXY_UPSTREAM_HOST=127.0.0.1
128
+ - NOCOBASE_PROXY_UPSTREAM_PORT=13000
129
+ volumes:
130
+ - ./storage:/app/nocobase/storage
131
+ ports:
132
+ - "13000:13000"
133
+
134
+ postgres:
135
+ image: postgres:16
136
+ restart: always
137
+ command: postgres -c wal_level=logical
138
+ environment:
139
+ POSTGRES_USER: nocobase
140
+ POSTGRES_DB: nocobase
141
+ POSTGRES_PASSWORD: nocobase
142
+ volumes:
143
+ - ./storage/db/postgres:/var/lib/postgresql/data
144
+ networks:
145
+ - nocobase
146
+ ```
147
+
148
+ In this variant:
149
+
150
+ - `NOCOBASE_PROXY_STORAGE_PATH` should be the absolute host path of your `storage` directory
151
+ - `NOCOBASE_PROXY_UPSTREAM_HOST` should be `127.0.0.1`
152
+ - The `app` service must keep `ports`, so the local Nginx can reach the app through `127.0.0.1:13000`
153
+
154
+ After the `app` container starts, wait for the config file to be generated, then link it into the local Nginx config directory:
155
+
156
+ ```bash
157
+ while [ ! -f ./storage/.nocobase/proxy/nginx/nocobase.conf ]; do
158
+ echo "waiting for nocobase.conf..."
159
+ sleep 1
160
+ done
161
+
162
+ sudo ln -sf "$(pwd)/storage/.nocobase/proxy/nginx/nocobase.conf" /etc/nginx/conf.d/nocobase.conf
163
+ sudo nginx -t
164
+ sudo systemctl reload nginx
165
+ ```
166
+
167
+ If your host Nginx does not use the `conf.d` directory, replace the link target with your own config path. Usually it is safer to keep `nocobase.conf` as a file included from the `http {}` context instead of copying its content manually.
168
+
169
+ ## Related links
170
+
171
+ - [Docker Installation (Built-in Nginx)](./docker.mdx) — Start with the single-container setup
172
+ - [Nginx Static Resource Proxy](../deployment/static-resource-proxy/nginx.md) — Learn more about the generated Nginx config
@@ -349,15 +349,17 @@ TELEMETRY_TRACE_PROCESSOR=console
349
349
 
350
350
  ### SERVER_REQUEST_WHITELIST
351
351
 
352
- Whitelist of allowed targets for server-initiated outbound HTTP requests, used to prevent SSRF (Server-Side Request Forgery) attacks. Accepts a comma-separated list of exact IPs, CIDR ranges, exact hostnames, and single-level wildcard subdomains.
352
+ Whitelist of allowed targets for outbound HTTP requests initiated by the NocoBase server. Accepts a comma-separated list of exact IPs, CIDR ranges, exact hostnames, and single-level wildcard subdomains.
353
353
 
354
354
  ```bash
355
- SERVER_REQUEST_WHITELIST=1.2.3.4,10.0.0.0/8,api.example.com,*.trusted.com
355
+ SERVER_REQUEST_WHITELIST=api.example.com,*.trusted.com,10.0.0.0/8,127.0.0.1
356
356
  ```
357
357
 
358
- **Applies to**: Workflow "HTTP Request" nodes and Custom Request action buttons. Relative-path requests (calls to the NocoBase API itself) are not affected.
358
+ **Applies to**: Workflow "HTTP Request" nodes, Custom Request action buttons, AI services, and other server-side requests. Relative-path requests (calls to the NocoBase API itself) are not affected.
359
359
 
360
- **When not set**: All `http`/`https` outbound requests are allowed (existing behaviour). **When set**: Only requests whose host matches a whitelist entry are permitted; non-matching requests will raise an error.
360
+ **When not set**: All `http` / `https` outbound requests are allowed to keep existing behavior. However, if the target is a loopback, private, link-local, or metadata address, or if a domain resolves to one of these addresses, the server logs a warning.
361
+
362
+ **When set**: Only requests whose host matches a whitelist entry are permitted; non-matching requests will raise an error. Future versions may gradually tighten the default behavior. If your deployment needs to access internal services, configure an explicit whitelist in advance.
361
363
 
362
364
  Supported formats:
363
365
 
@@ -365,9 +367,17 @@ Supported formats:
365
367
  | --- | --- | --- |
366
368
  | Exact IPv4 | `1.2.3.4` | That IP only |
367
369
  | IPv4 CIDR | `10.0.0.0/8` | All IPs in the subnet |
370
+ | Exact IPv6 | `::1` | That IP only |
371
+ | IPv6 CIDR | `fc00::/7` | All IPs in the subnet |
368
372
  | Exact hostname | `api.example.com` | That hostname only |
369
373
  | Wildcard subdomain | `*.example.com` | One subdomain level, e.g. `foo.example.com`; does **not** match `example.com` or `a.b.example.com` |
370
374
 
375
+ :::warning Note
376
+
377
+ If a domain is configured in the whitelist, the whitelist check uses the host in the request URL. In other words, after `internal.example.com` is configured, it is treated as explicitly allowed even if the domain resolves to `127.0.0.1` or a private address.
378
+
379
+ :::
380
+
371
381
  ## Experimental Environment Variables
372
382
 
373
383
  ### APPEND_PRESET_LOCAL_PLUGINS