@digitalsee-ai/rcs 0.0.15 → 1.0.0

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 (191) hide show
  1. package/README.md +237 -237
  2. package/dist/components/digitalsee/workflow/Canvas/NextConfigModalWrapper.d.ts +9 -0
  3. package/dist/components/digitalsee/workflow/Canvas/NextWorkflowCanvas.d.ts +4 -0
  4. package/dist/components/digitalsee/workflow/Canvas/NextWorkflowCanvasHeader.d.ts +15 -0
  5. package/dist/components/digitalsee/workflow/Canvas/WorkflowCanvas.d.ts +1 -12
  6. package/dist/components/digitalsee/workflow/Canvas/WorkflowCanvasBase.d.ts +4 -0
  7. package/dist/components/digitalsee/workflow/Canvas/WorkflowCanvasHeader.d.ts +2 -1
  8. package/dist/components/digitalsee/workflow/Canvas/color.d.ts +1 -1
  9. package/dist/components/digitalsee/workflow/Canvas/constants.d.ts +75 -0
  10. package/dist/components/digitalsee/workflow/Canvas/hooks/createNodeAddHandlerNext.d.ts +49 -0
  11. package/dist/components/digitalsee/workflow/Canvas/hooks/useCanvasApi.d.ts +22 -0
  12. package/dist/components/digitalsee/workflow/Canvas/hooks/useDataLoading.d.ts +21 -0
  13. package/dist/components/digitalsee/workflow/Canvas/hooks/useNodeAddCallback.d.ts +44 -0
  14. package/dist/components/digitalsee/workflow/Canvas/hooks/useNodeFormDraftCache.d.ts +14 -0
  15. package/dist/components/digitalsee/workflow/Canvas/hooks/useWorkflowCanvasState.d.ts +78 -0
  16. package/dist/components/digitalsee/workflow/Canvas/types.d.ts +91 -0
  17. package/dist/components/digitalsee/workflow/Edges/BaseEdge.d.ts +3 -2
  18. package/dist/components/digitalsee/workflow/Edges/EdgeFactory.d.ts +43 -0
  19. package/dist/components/digitalsee/workflow/NextNodesConfigModal/index.d.ts +13 -0
  20. package/dist/components/digitalsee/workflow/Nodes/ActionNode.d.ts +3 -3
  21. package/dist/components/digitalsee/workflow/Nodes/AgentNode.d.ts +2 -2
  22. package/dist/components/digitalsee/workflow/Nodes/BrowserNode.d.ts +2 -2
  23. package/dist/components/digitalsee/workflow/Nodes/CustomNode.d.ts +2 -2
  24. package/dist/components/digitalsee/workflow/Nodes/NextNodeFactory.d.ts +11 -0
  25. package/dist/components/digitalsee/workflow/Nodes/NextNodes/NextActionNode.d.ts +9 -0
  26. package/dist/components/digitalsee/workflow/Nodes/NextNodes/NextBaseNode.d.ts +15 -0
  27. package/dist/components/digitalsee/workflow/Nodes/NextNodes/NextConditionNode.d.ts +10 -0
  28. package/dist/components/digitalsee/workflow/Nodes/NextNodes/NextLoopNode.d.ts +10 -0
  29. package/dist/components/digitalsee/workflow/Nodes/NextNodes/NextSwitchNode.d.ts +10 -0
  30. package/dist/components/digitalsee/workflow/Nodes/NextNodes/NextTriggerNode.d.ts +9 -0
  31. package/dist/components/digitalsee/workflow/Nodes/NodeFactory.d.ts +3 -12
  32. package/dist/components/digitalsee/workflow/Nodes/StickyNoteNode.d.ts +2 -2
  33. package/dist/components/digitalsee/workflow/Nodes/SuperBaseNode.d.ts +1 -1
  34. package/dist/components/digitalsee/workflow/Nodes/components/NextNodeDescription.d.ts +16 -0
  35. package/dist/components/digitalsee/workflow/Nodes/components/NextNodeOperations.d.ts +11 -0
  36. package/dist/components/digitalsee/workflow/Nodes/components/NodeOperations.d.ts +1 -1
  37. package/dist/components/digitalsee/workflow/NodesConfig/ActionNodeConfig/index.d.ts +7 -1
  38. package/dist/components/digitalsee/workflow/NodesConfig/ConditionNodeConfig/index.d.ts +5 -4
  39. package/dist/components/digitalsee/workflow/NodesConfig/ErrorHandler.d.ts +17 -2
  40. package/dist/components/digitalsee/workflow/NodesConfig/LoopNodeConfig/index.d.ts +2 -3
  41. package/dist/components/digitalsee/workflow/NodesConfig/NextNodeConfig/CreateCredentialModal.d.ts +13 -0
  42. package/dist/components/digitalsee/workflow/NodesConfig/NextNodeConfig/CredentialSelect.d.ts +17 -0
  43. package/dist/components/digitalsee/workflow/NodesConfig/NextNodeConfig/ModifyCredentialModal.d.ts +17 -0
  44. package/dist/components/digitalsee/workflow/NodesConfig/NextNodeConfig/fieldSchemaAdapter.d.ts +10 -0
  45. package/dist/components/digitalsee/workflow/NodesConfig/NextNodeConfig/fieldSchemaAdapter.test.d.ts +1 -0
  46. package/dist/components/digitalsee/workflow/NodesConfig/NextNodeConfig/index.d.ts +15 -0
  47. package/dist/components/digitalsee/workflow/NodesConfig/SwitchNodeConfig/index.d.ts +6 -5
  48. package/dist/components/digitalsee/workflow/NodesConfig/components/AccountSelect/components/CreateAccountModal/index.d.ts +2 -0
  49. package/dist/components/digitalsee/workflow/NodesConfig/components/AccountSelect/components/CredentialAccountForm.d.ts +10 -0
  50. package/dist/components/digitalsee/workflow/NodesConfig/components/AccountSelect/components/DynamicAccountForm/fields/DateField/index.d.ts +1 -1
  51. package/dist/components/digitalsee/workflow/NodesConfig/components/AccountSelect/components/DynamicAccountForm/fields/DateTimeField/index.d.ts +1 -1
  52. package/dist/components/digitalsee/workflow/NodesConfig/components/AccountSelect/components/DynamicAccountForm/fields/ExtendObjectField/index.d.ts +1 -1
  53. package/dist/components/digitalsee/workflow/NodesConfig/components/AccountSelect/components/DynamicAccountForm/fields/FixedObjectField/index.d.ts +1 -1
  54. package/dist/components/digitalsee/workflow/NodesConfig/components/AccountSelect/components/DynamicAccountForm/fields/PasswordField/index.d.ts +2 -1
  55. package/dist/components/digitalsee/workflow/NodesConfig/components/AccountSelect/components/DynamicAccountForm/fields/TextAreaField/index.d.ts +1 -1
  56. package/dist/components/digitalsee/workflow/NodesConfig/components/AccountSelect/components/DynamicAccountForm/fields/TextField/index.d.ts +1 -1
  57. package/dist/components/digitalsee/workflow/NodesConfig/components/AccountSelect/components/DynamicAccountForm/fields/TimeField/index.d.ts +1 -1
  58. package/dist/components/digitalsee/workflow/NodesConfig/components/AccountSelect/components/DynamicAccountForm/index.d.ts +1 -1
  59. package/dist/components/digitalsee/workflow/NodesConfig/components/AccountSelect/components/ModifyAccountModal/index.d.ts +3 -0
  60. package/dist/components/digitalsee/workflow/NodesConfig/components/AccountSelect/index.d.ts +5 -3
  61. package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/components/AIFormField.d.ts +1 -1
  62. package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/DateField/index.d.ts +1 -1
  63. package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/DateTimeField/index.d.ts +1 -1
  64. package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/FixedObjectField/index.d.ts +1 -1
  65. package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/HourMinuteField/index.d.ts +5 -0
  66. package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/{JavscriptTagEditorField → JavascriptTagEditorField}/common-placeholder-theme.d.ts +11 -11
  67. package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/JavascriptTagEditorField/editor.d.ts +1 -0
  68. package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/{JavscriptTagEditorField → JavascriptTagEditorField}/interface.d.ts +1 -1
  69. package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/{JavscriptTagEditorField → JavascriptTagEditorField}/plugin/keywords.d.ts +2 -0
  70. package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/JsonTagField/common-placeholder-theme.d.ts +11 -11
  71. package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/JsonTagField/interface.d.ts +1 -1
  72. package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/JsonTagField/plugin/keywords.d.ts +2 -0
  73. package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/JsonTagField/plugin/keywords.test.d.ts +1 -0
  74. package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/{MutilRowAIExtractConfigField → MultiRowAIExtractConfigField}/index.d.ts +2 -2
  75. package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/RichTagInput/index.d.ts +1 -1
  76. package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/RichTagInput/useVariableInfo.d.ts +13 -0
  77. package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/TextField/index.d.ts +2 -2
  78. package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/TimeField/index.d.ts +1 -1
  79. package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/index.d.ts +3 -3
  80. package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/next-compatible.d.ts +2 -0
  81. package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/next-compatible.test.d.ts +1 -0
  82. package/dist/components/digitalsee/workflow/NodesConfig/components/NextNodeSettings.d.ts +6 -0
  83. package/dist/components/digitalsee/workflow/NodesConfig/components/NextNodeTest.d.ts +6 -0
  84. package/dist/components/digitalsee/workflow/NodesConfig/components/NextVariableModal/index.d.ts +6 -0
  85. package/dist/components/digitalsee/workflow/NodesConfig/components/NextVariableModal/variable-tree-next.d.ts +49 -0
  86. package/dist/components/digitalsee/workflow/NodesConfig/components/NextVariableModal/variable-tree-next.test.d.ts +1 -0
  87. package/dist/components/digitalsee/workflow/NodesConfig/components/VariableModal/index.d.ts +2 -1
  88. package/dist/components/digitalsee/workflow/NodesConfig/context.d.ts +4 -0
  89. package/dist/components/digitalsee/workflow/NodesConfig/define/actions.d.ts +3 -3
  90. package/dist/components/digitalsee/workflow/NodesConfig/define/condition.d.ts +5 -58
  91. package/dist/components/digitalsee/workflow/NodesConfig/define/condition.test.d.ts +1 -0
  92. package/dist/components/digitalsee/workflow/NodesConfig/define/flow.d.ts +1 -26
  93. package/dist/components/digitalsee/workflow/NodesConfig/index.d.ts +3 -6
  94. package/dist/components/digitalsee/workflow/NodesConfig/utils/credentialRequirement.d.ts +17 -0
  95. package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/components/CategoryTabs.d.ts +1 -1
  96. package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/types.d.ts +17 -1
  97. package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/dataTransformers.d.ts +2 -1
  98. package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/dataTransformers.test.d.ts +1 -0
  99. package/dist/components/digitalsee/workflow/Panels/SimpleNodeSelectorPanel/components/NodeListItem.d.ts +8 -0
  100. package/dist/components/digitalsee/workflow/Panels/SimpleNodeSelectorPanel/hooks/useNodeList.d.ts +14 -0
  101. package/dist/components/digitalsee/workflow/Panels/SimpleNodeSelectorPanel/index.d.ts +9 -0
  102. package/dist/components/digitalsee/workflow/api/dip.d.ts +311 -0
  103. package/dist/components/digitalsee/workflow/api/dip.types.d.ts +996 -0
  104. package/dist/components/digitalsee/workflow/api/index.d.ts +38 -13
  105. package/dist/components/digitalsee/workflow/api/index.test.d.ts +1 -0
  106. package/dist/components/digitalsee/workflow/builtin/controls/MultiRowGuard/index.d.ts +13 -0
  107. package/dist/components/digitalsee/workflow/builtin/controls/{MutilRowGuard → MultiRowGuard}/types.d.ts +15 -23
  108. package/dist/components/digitalsee/workflow/builtin/controls/MutilRowGuard/index.d.ts +9 -9
  109. package/dist/components/digitalsee/workflow/builtin/globalConfig/index.d.ts +1 -0
  110. package/dist/components/digitalsee/workflow/builtin/globalConfig/service.d.ts +8 -0
  111. package/dist/components/digitalsee/workflow/builtin/globalConfig/service.test.d.ts +1 -0
  112. package/dist/components/digitalsee/workflow/builtin/globalConfig/types.d.ts +17 -0
  113. package/dist/components/digitalsee/workflow/constants/nextHandles.d.ts +1 -0
  114. package/dist/components/digitalsee/workflow/enums/canvas.d.ts +63 -0
  115. package/dist/components/digitalsee/workflow/enums/edge.d.ts +10 -0
  116. package/dist/components/digitalsee/workflow/enums/handle.d.ts +42 -0
  117. package/dist/components/digitalsee/workflow/enums/index.d.ts +5 -0
  118. package/dist/components/digitalsee/workflow/enums/node.d.ts +199 -0
  119. package/dist/components/digitalsee/workflow/enums/workflow.d.ts +90 -0
  120. package/dist/components/digitalsee/workflow/events/eventBus.d.ts +8 -2
  121. package/dist/components/digitalsee/workflow/hooks/use-before-unload.d.ts +1 -1
  122. package/dist/components/digitalsee/workflow/hooks/useCanvasLayout.d.ts +2 -1
  123. package/dist/components/digitalsee/workflow/hooks/useHandleConnections.d.ts +1 -1
  124. package/dist/components/digitalsee/workflow/hooks/usePanel.d.ts +26 -0
  125. package/dist/components/digitalsee/workflow/hooks/useVariables.d.ts +52 -0
  126. package/dist/components/digitalsee/workflow/hooks/useWorkflow.d.ts +3 -3
  127. package/dist/components/digitalsee/workflow/index.d.ts +11 -2
  128. package/dist/components/digitalsee/workflow/store/index.d.ts +17 -0
  129. package/dist/components/digitalsee/workflow/store/panelSlice.d.ts +5 -5
  130. package/dist/components/digitalsee/workflow/store/workflowSlice.d.ts +44 -0
  131. package/dist/components/digitalsee/workflow/store/workflowSlice.test.d.ts +1 -0
  132. package/dist/components/digitalsee/workflow/types/Edge.d.ts +1 -3
  133. package/dist/components/digitalsee/workflow/types/Handle.d.ts +3 -29
  134. package/dist/components/digitalsee/workflow/types/Node.d.ts +25 -63
  135. package/dist/components/digitalsee/workflow/types/NodeProtocol.d.ts +1 -12
  136. package/dist/components/digitalsee/workflow/types/Workflow.d.ts +4 -26
  137. package/dist/components/digitalsee/workflow/types/engine.d.ts +2 -0
  138. package/dist/components/digitalsee/workflow/utils/common.d.ts +1 -0
  139. package/dist/components/digitalsee/workflow/utils/flowDataAdapterNext.d.ts +13 -0
  140. package/dist/components/digitalsee/workflow/utils/glob.d.ts +1 -1
  141. package/dist/components/digitalsee/workflow/utils/layoutUtils.d.ts +2 -3
  142. package/dist/components/digitalsee/workflow/utils/nextNodeSchemaCache.d.ts +6 -0
  143. package/dist/components/digitalsee/workflow/utils/nextNodeSchemaCache.test.d.ts +1 -0
  144. package/dist/components/digitalsee/workflow/utils/nodeDataFormatter.d.ts +1 -1
  145. package/dist/components/digitalsee/workflow/utils/nodeDataFormatterNext.d.ts +11 -0
  146. package/dist/components/digitalsee/workflow/utils/nodeSummaryAdapter.d.ts +15 -0
  147. package/dist/components/dynamic-form/DynamicForm.d.ts +8 -3
  148. package/dist/components/dynamic-form/DynamicForm.test.d.ts +1 -0
  149. package/dist/components/dynamic-form/DynamicFormContext.d.ts +4 -0
  150. package/dist/components/dynamic-form/FieldRenderer.d.ts +6 -2
  151. package/dist/components/dynamic-form/components/ValueModeWrapper/index.d.ts +7 -1
  152. package/dist/components/dynamic-form/components/VariableInput/index.d.ts +1 -0
  153. package/dist/components/dynamic-form/fields/complex/KeyValueField.test.d.ts +1 -0
  154. package/dist/components/dynamic-form/fields/index.d.ts +12 -0
  155. package/dist/components/dynamic-form/index.d.ts +6 -6
  156. package/dist/components/dynamic-form/registry/createFieldComponent.test.d.ts +1 -0
  157. package/dist/components/dynamic-form/registry/index.d.ts +2 -2
  158. package/dist/components/dynamic-form/types/field-component.d.ts +12 -3
  159. package/dist/locales/en-US/common.d.ts +8 -17
  160. package/dist/locales/en-US/components.d.ts +28 -0
  161. package/dist/locales/en-US/link/flow.d.ts +9 -5
  162. package/dist/locales/en-US.d.ts +42 -22
  163. package/dist/locales/index.d.ts +2 -714
  164. package/dist/locales/zh-CN/common.d.ts +8 -17
  165. package/dist/locales/zh-CN/components.d.ts +28 -0
  166. package/dist/locales/zh-CN/link/flow.d.ts +9 -5
  167. package/dist/locales/zh-CN.d.ts +42 -22
  168. package/dist/locales/zh-TW/common.d.ts +8 -17
  169. package/dist/locales/zh-TW/components.d.ts +28 -0
  170. package/dist/locales/zh-TW/link/flow.d.ts +9 -5
  171. package/dist/locales/zh-TW.d.ts +42 -22
  172. package/dist/postcss.config.js +1 -0
  173. package/dist/rcs.css +1 -1
  174. package/dist/rcs.es.js +55706 -50696
  175. package/dist/rcs.es.js.map +1 -0
  176. package/dist/rcs.umd.js +68 -67
  177. package/dist/rcs.umd.js.map +1 -0
  178. package/package.json +145 -150
  179. package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/HourMiniuteField/index.d.ts +0 -5
  180. package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/JavscriptTagEditorField/editor.d.ts +0 -1
  181. package/dist/components/digitalsee/workflow/NodesConfig/define/config-form-item.d.ts +0 -40
  182. package/dist/components/digitalsee/workflow/de.d.ts +0 -1
  183. package/dist/components/digitalsee/workflow/types/SaveStatus.d.ts +0 -1
  184. /package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/{JavscriptTagEditorField → JavascriptTagEditorField}/extensions.d.ts +0 -0
  185. /package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/{JavscriptTagEditorField → JavascriptTagEditorField}/index.d.ts +0 -0
  186. /package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/{JavscriptTagEditorField → JavascriptTagEditorField}/plugin/base-theme.d.ts +0 -0
  187. /package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/{JavscriptTagEditorField → JavascriptTagEditorField}/plugin/custom-completions.d.ts +0 -0
  188. /package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/{JavscriptTagEditorField → JavascriptTagEditorField}/plugin/functions.d.ts +0 -0
  189. /package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/{JavscriptTagEditorField → JavascriptTagEditorField}/plugin/hint.d.ts +0 -0
  190. /package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/{JavscriptTagEditorField → JavascriptTagEditorField}/plugin/placeholders.d.ts +0 -0
  191. /package/dist/components/digitalsee/workflow/hooks/{use-wokflow-id.d.ts → use-workflow-id.d.ts} +0 -0
@@ -15,8 +15,14 @@ export type NodeAddEvent = {
15
15
  info: NodeAddInfo;
16
16
  nodeType: NodeTypeItem;
17
17
  };
18
- export declare const nodeAddEventBus: any;
18
+ /** 简易事件发射器 */
19
+ interface SimpleEventEmitter<T> {
20
+ emit: (val: T) => void;
21
+ useSubscription: (callback: (val: T) => void) => void;
22
+ listeners: Set<(val: T) => void>;
23
+ }
24
+ export declare const nodeAddEventBus: SimpleEventEmitter<NodeAddEvent>;
19
25
  export declare const canvasEventBus: {
20
- nodeAdd: any;
26
+ nodeAdd: SimpleEventEmitter<NodeAddEvent>;
21
27
  };
22
28
  export default canvasEventBus;
@@ -1,4 +1,4 @@
1
- export declare const useNavigationInterceptor: ({ enabled, message }: {
1
+ export declare const useNavigationInterceptor: ({ enabled, message, }: {
2
2
  enabled?: boolean;
3
3
  message?: string;
4
4
  }) => void;
@@ -1,4 +1,5 @@
1
- import { CanvasLayoutResult, CanvasLayoutTarget } from '../utils/layoutUtils';
1
+ import { CanvasLayoutResult } from '../utils/layoutUtils';
2
+ import { CanvasLayoutTarget } from '../enums/workflow';
2
3
  export declare const useCanvasLayout: (id?: string) => {
3
4
  layout: (target?: CanvasLayoutTarget, shouldFitView?: boolean) => CanvasLayoutResult;
4
5
  autoLayout: (shouldFitView?: boolean) => CanvasLayoutResult;
@@ -1,4 +1,4 @@
1
- import { HandleDirection } from '../types/Handle';
1
+ import { HandleDirection } from '../enums/handle';
2
2
  export declare function useHandleConnections(): {
3
3
  getHandleConnections: (nodeId: string, handleId: string, handleType: HandleDirection) => import('@xyflow/react').Edge[];
4
4
  handleStatus: (nodeId: string, handleId: string) => "default" | "connected";
@@ -0,0 +1,26 @@
1
+ import { ActionItem } from '../Panels/ModernNodeSelectorPanel/types';
2
+ export interface NodeAddInfo {
3
+ sourceNodeId?: string;
4
+ sourceHandle?: string;
5
+ targetNodeId?: string;
6
+ targetHandle?: string;
7
+ position?: {
8
+ x: number;
9
+ y: number;
10
+ };
11
+ edge?: any;
12
+ sourceNode?: any;
13
+ targetNode?: any;
14
+ trigger?: boolean;
15
+ protocol?: string;
16
+ refresh?: boolean;
17
+ }
18
+ export declare function usePanel(): {
19
+ nodeSelectorVisible: boolean;
20
+ nodeAddInfo: import('../store/panelSlice').NodeAddInfo;
21
+ openNodeSelector: (info: NodeAddInfo) => void;
22
+ closeNodeSelector: () => void;
23
+ handleNodeSelect: (nodeType: ActionItem) => void;
24
+ handleManualAdd: (info: any, nodeType: ActionItem) => void;
25
+ setNodeAddCallback: (callback: (info: NodeAddInfo, nodeType: ActionItem) => void) => void;
26
+ };
@@ -0,0 +1,52 @@
1
+ import { VarDatum } from '../NodesConfig/components/VariableModal/tree-help';
2
+ export declare enum GlobalVariableType {
3
+ TEXT = "TEXT",
4
+ NUMBER = "NUMBER",
5
+ JSON = "JSON"
6
+ }
7
+ export interface GlobalVariableDto {
8
+ id: number | string;
9
+ name: string;
10
+ display_name?: string;
11
+ var_type: GlobalVariableType;
12
+ var_value: unknown;
13
+ description?: string;
14
+ allow_flow_update?: 0 | 1;
15
+ create_time?: string;
16
+ update_time?: string;
17
+ }
18
+ export interface EnhancedGlobalVariable extends GlobalVariableDto {
19
+ mappedType: 'STRING' | 'NUMBER' | 'OBJECT';
20
+ }
21
+ export interface EnhancedVarDatum extends VarDatum {
22
+ nodeIcon?: string;
23
+ isValid: boolean;
24
+ }
25
+ interface UseVariablesOptions {
26
+ nodeId: string;
27
+ flowId: string;
28
+ enabled?: boolean;
29
+ includeGlobalVariables?: boolean;
30
+ }
31
+ interface UseVariablesReturn {
32
+ globalVariables: EnhancedGlobalVariable[];
33
+ nodeVariables: EnhancedVarDatum[];
34
+ isLoading: boolean;
35
+ refresh: () => void;
36
+ }
37
+ /**
38
+ * 加载 classic 变量面板需要展示的全局变量和节点变量。
39
+ *
40
+ * 处理逻辑:
41
+ * - `enabled` 为 false 或 `flowId` 为空:不请求后端,保持当前状态。
42
+ * - 开启全局变量:同时请求全局变量接口;关闭时使用空列表兜底。
43
+ * - 节点变量:后端变量树里的 `node_id` 使用旧版变量 token 语义,节点引用固定
44
+ * 带 `N` 前缀;匹配 React Flow 节点时需要先去掉这个前缀。
45
+ * - 匹配到节点:补充节点图标,并标记变量有效。
46
+ * - 未匹配到节点:保留变量数据但标记无效,避免错误绑定到其他节点。
47
+ *
48
+ * @param options 变量加载参数,包含当前节点 ID、流程 ID 和开关项。
49
+ * @returns 变量列表、加载状态和手动刷新函数。
50
+ */
51
+ export declare const useVariables: (options: UseVariablesOptions) => UseVariablesReturn;
52
+ export {};
@@ -1,7 +1,7 @@
1
1
  import { Connection, Edge, Node, OnConnect, OnEdgesChange, OnNodesChange } from '@xyflow/react';
2
2
  import { EdgeData } from '../types/Edge';
3
3
  import { NodeData } from '../types/Node';
4
- import { WorkflowOpStatus } from '../types/Workflow';
4
+ import { FlowStatus } from '../NodesConfig/define/flow';
5
5
  export interface UseWorkflowOptions {
6
6
  initialNodes?: Node<NodeData>[];
7
7
  initialEdges?: Edge<EdgeData>[];
@@ -9,7 +9,7 @@ export interface UseWorkflowOptions {
9
9
  export declare function useWorkflow(id?: string): {
10
10
  nodes: Node<NodeData>[];
11
11
  edges: Edge<EdgeData>[];
12
- op_status: import('../NodesConfig/define/flow').FlowStatus;
12
+ op_status: FlowStatus;
13
13
  selectedNodes: Node<NodeData>[];
14
14
  selectedEdges: Edge<EdgeData>[];
15
15
  currentNodeConfigVisibleId: string;
@@ -25,7 +25,7 @@ export declare function useWorkflow(id?: string): {
25
25
  setEdges: (newEdges: Edge[]) => void;
26
26
  updateNode: (nodeId: string, nodeData: Partial<NodeData>) => void;
27
27
  refreshFlow: () => void;
28
- setFlowOpStatusAction: (opStatus: WorkflowOpStatus) => void;
28
+ setFlowOpStatusAction: (opStatus: FlowStatus) => void;
29
29
  workflowId: string;
30
30
  setNodeConfigVisible: (nodeId: string | null) => void;
31
31
  isLocked: boolean;
@@ -3,6 +3,7 @@ import { default as defaultCanvasEngineConfig } from './config/defaultCanvasEngi
3
3
  import { CanvasEngineConfig, HistoryNavigator, HttpClient } from './types/engine';
4
4
  import { mergeConfig } from './utils/mergeConfig';
5
5
  import { LocaleType } from '../../../locales';
6
+ import { EngineMode } from './enums/workflow';
6
7
  /**
7
8
  * DigitalseeWorkFlow 组件对外暴露的属性定义
8
9
  *
@@ -81,6 +82,13 @@ export interface DigitalseeWorkFlowProps {
81
82
  * @description 用于处理页面导航,可传入 React Router 的 history 对象
82
83
  */
83
84
  history?: HistoryNavigator;
85
+ /**
86
+ * 引擎模式
87
+ *
88
+ * @description 'classic' 使用 ACM 后端,'next' 使用 DIP 后端 + DynamicForm
89
+ * @default 'classic'
90
+ */
91
+ engineMode?: EngineMode;
84
92
  }
85
93
  /**
86
94
  * DigitalseeWorkFlow 工作流画布组件
@@ -90,9 +98,10 @@ export interface DigitalseeWorkFlowProps {
90
98
  declare const DigitalseeWorkFlow: React.FC<DigitalseeWorkFlowProps>;
91
99
  export { DigitalseeWorkFlow };
92
100
  export type { WorkflowHttpClient } from './api';
93
- export type { CanvasEngineConfig, HistoryNavigator, HttpClient } from './types/engine';
101
+ export type { CanvasEngineConfig, HistoryNavigator, HttpClient, } from './types/engine';
102
+ export { EngineMode } from './enums/workflow';
94
103
  export { defaultCanvasEngineConfig, mergeConfig };
95
- export type { LocaleType as WorkflowLocale, TranslateFn as WorkflowTranslateFn } from '../../../locales';
104
+ export type { LocaleType as WorkflowLocale, TranslateFn as WorkflowTranslateFn, } from '../../../locales';
96
105
  export { createTranslator } from '../../../locales';
97
106
  export { configureWorkflow, getGlobalWorkflowConfig, resetGlobalWorkflowConfig, } from './config/globalConfig';
98
107
  export * from './config/themeConfig';
@@ -0,0 +1,17 @@
1
+ import { TypedUseSelectorHook } from 'react-redux';
2
+ export declare const store: import('@reduxjs/toolkit').EnhancedStore<{
3
+ workflow: import('./workflowSlice').WorkflowState;
4
+ panel: import('./panelSlice').PanelState;
5
+ }, import('@reduxjs/toolkit').UnknownAction, import('@reduxjs/toolkit').Tuple<[import('@reduxjs/toolkit').StoreEnhancer<{
6
+ dispatch: import('@reduxjs/toolkit').ThunkDispatch<{
7
+ workflow: import('./workflowSlice').WorkflowState;
8
+ panel: import('./panelSlice').PanelState;
9
+ }, undefined, import('@reduxjs/toolkit').UnknownAction>;
10
+ }>, import('@reduxjs/toolkit').StoreEnhancer]>>;
11
+ export type RootState = ReturnType<typeof store.getState>;
12
+ export type AppDispatch = typeof store.dispatch;
13
+ export declare const useAppDispatch: () => import('@reduxjs/toolkit').ThunkDispatch<{
14
+ workflow: import('./workflowSlice').WorkflowState;
15
+ panel: import('./panelSlice').PanelState;
16
+ }, undefined, import('@reduxjs/toolkit').UnknownAction> & import('@reduxjs/toolkit').Dispatch<import('@reduxjs/toolkit').UnknownAction>;
17
+ export declare const useAppSelector: TypedUseSelectorHook<RootState>;
@@ -1,6 +1,6 @@
1
1
  import { PayloadAction } from '@reduxjs/toolkit';
2
- import { NodeTypeItem } from '../Panels/ModernNodeSelectorPanel/types';
3
- interface NodeAddInfo {
2
+ import { ActionItem, NodeTypeItem } from '../Panels/ModernNodeSelectorPanel/types';
3
+ export interface NodeAddInfo {
4
4
  sourceNodeId: string;
5
5
  sourceHandle: string;
6
6
  targetNodeId?: string;
@@ -12,8 +12,8 @@ interface NodeAddInfo {
12
12
  trigger?: boolean;
13
13
  protocol?: string;
14
14
  }
15
- type NodeAddCallback = ((info: NodeAddInfo, nodeType: NodeTypeItem) => void) | null;
16
- interface PanelState {
15
+ type NodeAddCallback = ((info: NodeAddInfo, nodeType: ActionItem) => void) | null;
16
+ export interface PanelState {
17
17
  nodeSelectorVisible: boolean;
18
18
  nodeAddInfo: NodeAddInfo | null;
19
19
  nodeAddCallback: NodeAddCallback;
@@ -84,6 +84,6 @@ export declare const panelSlice: import('@reduxjs/toolkit').Slice<PanelState, {
84
84
  nodeAddCallback: NodeAddCallback;
85
85
  }, action: PayloadAction<NodeTypeItem>) => void;
86
86
  }, "panel", "panel", import('@reduxjs/toolkit').SliceSelectors<PanelState>>;
87
- export declare const openNodeSelector: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<NodeAddInfo, "panel/openNodeSelector">, closeNodeSelector: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"panel/closeNodeSelector">, setNodeAddCallback: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<(info: NodeAddInfo, nodeType: NodeTypeItem) => void, "panel/setNodeAddCallback">, executeNodeAddCallback: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<NodeTypeItem, "panel/executeNodeAddCallback">;
87
+ export declare const openNodeSelector: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<NodeAddInfo, "panel/openNodeSelector">, closeNodeSelector: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"panel/closeNodeSelector">, setNodeAddCallback: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<(info: NodeAddInfo, nodeType: ActionItem) => void, "panel/setNodeAddCallback">, executeNodeAddCallback: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<NodeTypeItem, "panel/executeNodeAddCallback">;
88
88
  declare const _default: import('@reduxjs/toolkit').Reducer<PanelState>;
89
89
  export default _default;
@@ -0,0 +1,44 @@
1
+ import { FlowStatus } from '../NodesConfig/define/flow';
2
+ import { EdgeData } from '../types/Edge';
3
+ import { NodeData, NodeType } from '../types/Node';
4
+ import { Connection, Edge, EdgeChange, Node, NodeChange } from '@xyflow/react';
5
+ export interface ExecutionControlState {
6
+ enabled: boolean;
7
+ timeout_value: number;
8
+ timeout_unit: 'SECONDS' | 'MINUTES' | 'HOURS';
9
+ max_node_executions: number;
10
+ webhook_url?: string;
11
+ }
12
+ export interface WorkflowState {
13
+ nodes: Node<NodeData>[];
14
+ edges: Edge<EdgeData>[];
15
+ selectedNodes: Node<NodeData>[];
16
+ selectedEdges: Edge<EdgeData>[];
17
+ workflowId?: string;
18
+ workflowName: string;
19
+ op_status?: FlowStatus;
20
+ refreshWorkFlowNum: number;
21
+ autoSaveWatchNum: number;
22
+ currentNodeConfigVisibleId: string | null;
23
+ isLocked: boolean;
24
+ executionControl: ExecutionControlState | null;
25
+ }
26
+ export declare const setWorkflowId: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<string, "workflow/setWorkflowId">, setWorkflowName: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<string, "workflow/setWorkflowName">, applyNodesChanges: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<NodeChange[], "workflow/applyNodesChanges">, applyEdgesChanges: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<EdgeChange[], "workflow/applyEdgesChanges">, addConnection: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<Connection, "workflow/addConnection">, addNode: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
27
+ type: NodeType;
28
+ position: {
29
+ x: number;
30
+ y: number;
31
+ };
32
+ data: NodeData;
33
+ }, "workflow/addNode">, addNodes: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<Node<NodeData>[], "workflow/addNodes">, addEdges: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<Edge<EdgeData>[], "workflow/addEdges">, removeNodes: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<string[], "workflow/removeNodes">, removeEdges: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<string[], "workflow/removeEdges">, setSelection: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
34
+ nodes: Node<NodeData>[];
35
+ edges: Edge<EdgeData>[];
36
+ }, "workflow/setSelection">, updateEdge: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
37
+ oldEdge: Edge<EdgeData>;
38
+ newConnection: Connection;
39
+ }, "workflow/updateEdge">, setNodes: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<Node<NodeData>[], "workflow/setNodes">, setEdges: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<Edge<EdgeData>[], "workflow/setEdges">, updateNode: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
40
+ id: string;
41
+ data: Partial<NodeData>;
42
+ }, "workflow/updateNode">, setFlowOpStatus: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<FlowStatus, "workflow/setFlowOpStatus">, refreshFlow: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"workflow/refreshFlow">, setCurrentNodeConfigVisibleId: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<string, "workflow/setCurrentNodeConfigVisibleId">, setLocked: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<boolean, "workflow/setLocked">, setExecutionControl: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<ExecutionControlState, "workflow/setExecutionControl">, resetFlow: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"workflow/resetFlow">, executeAutoSave: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"workflow/executeAutoSave">;
43
+ declare const _default: import('@reduxjs/toolkit').Reducer<WorkflowState>;
44
+ export default _default;
@@ -1,7 +1,5 @@
1
1
  import { Edge as ReactFlowEdge } from '@xyflow/react';
2
- export declare enum EdgeType {
3
- MAIN = "main"
4
- }
2
+ import { EdgeType } from '../enums/edge';
5
3
  export interface EdgeData extends Record<string, unknown> {
6
4
  label?: string;
7
5
  type?: EdgeType;
@@ -1,36 +1,10 @@
1
1
  import { Position } from '@xyflow/react';
2
- export declare enum HandleTypeEnum {
3
- SOURCE = "source",
4
- TARGET = "target"
5
- }
6
- export declare enum HandleType {
7
- SOURCE = "source",
8
- TARGET = "target"
9
- }
10
- export declare enum HandleConnectionType {
11
- INPUT = "input",
12
- OUTPUT = "output",
13
- CHAT_MODEL = "chat_model",
14
- DONE = "done",
15
- LOOP = "loop",
16
- FALSE = "false",
17
- TRUE = "true",
18
- MEMORY = "memory",
19
- TOOLS = "tools",
20
- BUILTIN_MCP = "builtin_mcp"
21
- }
22
- export type HandleDirection = 'input' | 'output';
23
- export declare enum HandleStatus {
24
- DEFAULT = "default",
25
- VALID = "valid",
26
- INVALID = "invalid",
27
- CONNECTING = "connecting",
28
- FULL = "full"
29
- }
2
+ import { HandleType, HandleStatus } from '../enums/handle';
3
+ export { HandleType, HandleConnectionType, HandleDirection, HandleStatus, } from '../enums/handle';
30
4
  export interface HandleData {
31
5
  id: string;
32
6
  label?: string;
33
- type: HandleTypeEnum;
7
+ type: HandleType;
34
8
  position: Position;
35
9
  isMain?: boolean;
36
10
  maxConnections?: number;
@@ -1,23 +1,7 @@
1
1
  import { Node as ReactFlowNode } from '@xyflow/react';
2
2
  import { ActionItem } from '../Panels/ModernNodeSelectorPanel/types';
3
- export declare enum NodeType {
4
- START = "START",
5
- TRIGGER = "StartEventNode",
6
- ACTION = "ActionNode",
7
- CONDITION = "ConditionNode",
8
- LOOP = "LoopNode",
9
- SELFLOOP = "SelfLoopNode",
10
- MCPServer = "MCPServerNode",
11
- BuiltinMCP = "BuiltinMCPNode",
12
- VECTORSTORE = "VectorStoreNode",
13
- AGENT = "AgentNode",
14
- BROWSER = "BrowserNode",
15
- AISUBNODE = "AISubNode",
16
- MCPTOOL = "MCPToolNode",
17
- ENDNODE = "EndNode",
18
- SWITCH = "SwitchNode",
19
- STICKY = "StickyNoteNode"
20
- }
3
+ import { NodeStatus } from '../enums/node';
4
+ export { NodeType, NodeStatus } from '../enums/node';
21
5
  export type NodeData = ActionItem & {
22
6
  connector_name: string;
23
7
  description: string;
@@ -25,6 +9,28 @@ export type NodeData = ActionItem & {
25
9
  closed: '0' | '1';
26
10
  note: string | null;
27
11
  status: NodeStatus;
12
+ /** 节点显示标签 */
13
+ label?: string;
14
+ /** 是否悬停 */
15
+ isHovered?: boolean;
16
+ /** 后端返回的原始数据 */
17
+ backendData?: Record<string, any>;
18
+ /** 节点配置 schema */
19
+ config_schema?: any;
20
+ /** 后端节点类型标识 */
21
+ node_type?: string;
22
+ /** 动作 ID */
23
+ action_id?: string;
24
+ /** 连接器 ID */
25
+ connector_id?: string;
26
+ /** 后端节点 ID */
27
+ n_id?: string;
28
+ /** 账号 ID */
29
+ account_id?: string | null;
30
+ /** 节点协议类型(AI_LANGUAGE_MODEL / MCP 等) */
31
+ protocol?: string;
32
+ /** index signature — 满足 ReactFlow v12 的 Record<string, unknown> 约束 */
33
+ [key: string]: unknown;
28
34
  };
29
35
  export interface WorkflowNode extends ReactFlowNode<NodeData> {
30
36
  type: string;
@@ -47,7 +53,7 @@ export interface NodeParameter {
47
53
  }>;
48
54
  }
49
55
  export interface NodeDefinition {
50
- type: NodeType | string;
56
+ type: string;
51
57
  name: string;
52
58
  description: string;
53
59
  icon: string;
@@ -56,47 +62,3 @@ export interface NodeDefinition {
56
62
  outputs: number;
57
63
  parameters: NodeParameter[];
58
64
  }
59
- export declare enum NodeStatus {
60
- /**
61
- * 未发布 该节点配置不完整
62
- *
63
- * @type {string}
64
- * @memberof NodeStatus
65
- */
66
- INVALID = "INVALID",
67
- /**
68
- * 空闲状态
69
- *
70
- * @type {string}
71
- * @memberof NodeStatus
72
- */
73
- IDLE = "IDLE",
74
- /**
75
- * 运行中
76
- *
77
- * @type {string}
78
- * @memberof NodeStatus
79
- */
80
- RUNNING = "RUNNING",
81
- /**
82
- * 最近一次执行失败
83
- *
84
- * @type {string}
85
- * @memberof NodeStatus
86
- */
87
- FAILED = "FAILED",
88
- /**
89
- * 最近一次执行成功
90
- *
91
- * @type {string}
92
- * @memberof NodeStatus
93
- */
94
- SUCCESS = "SUCCESS",
95
- /**
96
- * 线上运行
97
- *
98
- * @type {string}
99
- * @memberof NodeStatus
100
- */
101
- RUNNABLE = "RUNNABLE"
102
- }
@@ -1,12 +1 @@
1
- export declare enum NodeProtocol {
2
- AI_LANGUAGE_MODEL = "AI_LANGUAGE_MODEL",
3
- AI_VECTOR_STORE = "AI_VECTORSTORE",
4
- AI_MEMORY = "AI_MEMORY",
5
- AI_DOCUMENT = "AI_DOCUMENT",
6
- AI_TEXT_SPLITTER = "AI_TEXTSPLITTER",
7
- AI_EMBEDDING = "AI_EMBEDDING",
8
- AI_TOOL = "AI_TOOL",
9
- MCP = "MCP",
10
- BUILTIN_MCP = "BUILTIN_MCP",
11
- MCP_SERVER = "MCP_SERVER"
12
- }
1
+ export { NodeProtocol } from '../enums/node';
@@ -1,31 +1,9 @@
1
1
  import { WorkflowEdge } from './Edge';
2
2
  import { WorkflowNode } from './Node';
3
- export declare enum WorkflowOpStatus {
4
- /**
5
- * 未发布
6
- */
7
- UNPUBLISHED = "UNPUBLISHED",
8
- /**
9
- * 已上线
10
- */
11
- ONLINE = "ONLINE",
12
- /**
13
- * 已下线
14
- */
15
- OFFLINE = "OFFLINE",
16
- /**
17
- * 未发布
18
- */
19
- ON_WARN = "ON_WARN",
20
- /**
21
- * 未发布
22
- */
23
- OFF_WARN = "OFF_WARN",
24
- /**
25
- * 上线中
26
- */
27
- ONLINE_ING = "ONLINE_ING"
28
- }
3
+ import { WorkflowOpStatus } from '../enums/workflow';
4
+ /**
5
+ * 工作流定义
6
+ */
29
7
  export interface Workflow {
30
8
  id: string;
31
9
  name: string;
@@ -1,6 +1,7 @@
1
1
  import { ReactFlow } from '@xyflow/react';
2
2
  import { ComponentProps, ReactNode } from 'react';
3
3
  import { Rule } from 'antd/es/form';
4
+ import { EngineMode } from '../enums/workflow';
4
5
  export type HttpClient = <T = any>(url: string, config: any) => Promise<T>;
5
6
  export interface HistoryNavigator {
6
7
  push(path: string, state?: any): void;
@@ -12,6 +13,7 @@ export interface HistoryNavigator {
12
13
  }
13
14
  export interface CanvasEngineConfig {
14
15
  flowId: string;
16
+ engineMode?: EngineMode;
15
17
  canvas: CanvasCoreConfig;
16
18
  nodeTypes: NodeTypesRegistryConfig;
17
19
  edgeRules: EdgeRulesConfig;
@@ -42,6 +42,7 @@ export declare function objectToBase64(obj: any): string;
42
42
  * @example
43
43
  * ```typescript
44
44
  * const requestConfig = objectToBase64RequestBody({ name: '张三', age: 25 });
45
+ * cspell: disable-next-line
45
46
  * // 返回: { data: "eyJuYW1lIjoi5byg5LiJIiwiYWdlIjoyNX0=", headers: { 'Content-Type': 'text/plain' } }
46
47
  *
47
48
  * // 使用方式:
@@ -0,0 +1,13 @@
1
+ import { DipWorkflowDefinitionEntity } from '../api/dip';
2
+ import { Edge, Node } from '@xyflow/react';
3
+ /**
4
+ * 将 DIP WorkflowDefinitionEntity 转换为 ReactFlow 画布数据
5
+ * 直接使用 DIP 端口名,无需适配层
6
+ */
7
+ export declare function adaptDipFlowData(data: DipWorkflowDefinitionEntity): {
8
+ workflowId: string;
9
+ workflowName: string;
10
+ nodes: Node[];
11
+ edges: Edge[];
12
+ active: boolean;
13
+ };
@@ -7,7 +7,7 @@ export declare class FlowDesignerDAO {
7
7
  getNodeIcon(node_id: string): any;
8
8
  addNodeTips(seriesNo: number, tips: string): void;
9
9
  getNodeTips(seriesNo: number): any;
10
- getBuiltnVaribleTips(varible: string): any;
10
+ getBuiltinVariableTips(variable: string): any;
11
11
  getToolTipColor(seriesNo: number): "red" | "#2db7f5";
12
12
  getConnectorIcon(connector_id?: string): string | null;
13
13
  }
@@ -1,6 +1,7 @@
1
- import { Edge, Node } from '@xyflow/react';
2
1
  import { EdgeData } from '../types/Edge';
3
2
  import { NodeData } from '../types/Node';
3
+ import { Edge, Node } from '@xyflow/react';
4
+ import { CanvasLayoutSource, CanvasLayoutTarget } from '../enums/workflow';
4
5
  export declare const GRID_SIZE = 20;
5
6
  export declare const NODE_SIZE = 300;
6
7
  export declare const NODE_X_SPACING: number;
@@ -27,8 +28,6 @@ export type CanvasLayoutResult = {
27
28
  boundingBox: BoundingBox;
28
29
  nodes: NodeLayoutResult[];
29
30
  };
30
- export type CanvasLayoutTarget = 'selection' | 'all';
31
- export type CanvasLayoutSource = 'keyboard-shortcut' | 'canvas-button' | 'context-menu';
32
31
  export type CanvasLayoutEvent = {
33
32
  result: CanvasLayoutResult;
34
33
  source: CanvasLayoutSource;
@@ -0,0 +1,6 @@
1
+ import { DipNodeSchema } from '../api/dip';
2
+ export declare function clearNextNodeSchemaCache(): void;
3
+ export declare function setCachedNextNodeSchema(nodeKey: string, nodeVersion: number | undefined, schema: DipNodeSchema): void;
4
+ export declare function setCachedClassicNextNodeSchema(nodeKey: string, nodeVersion: number | undefined, schema: DipNodeSchema): void;
5
+ export declare function getCachedClassicNextNodeSchema(nodeKey: string, nodeVersion?: number): Promise<DipNodeSchema | null>;
6
+ export declare function getCachedNextNodeSchema(nodeKey: string, nodeVersion?: number): Promise<DipNodeSchema | null>;
@@ -1,5 +1,5 @@
1
- import { Node } from '@xyflow/react';
2
1
  import { NodeData } from '../Nodes/NodeFactory';
2
+ import { Node } from '@xyflow/react';
3
3
  /**
4
4
  * 创建一个变量对象属性结构
5
5
  * @param name 变量名称
@@ -0,0 +1,11 @@
1
+ import { DipWorkflowDefinition } from '../api/dip';
2
+ import { Edge, Node } from '@xyflow/react';
3
+ /**
4
+ * 生成前端节点 ID(UUID v4 简化版)
5
+ */
6
+ export declare function generateNodeId(): string;
7
+ /**
8
+ * 将 ReactFlow 画布数据转换为 DIP WorkflowDefinition
9
+ * 直接使用 DIP 端口名,无需适配层
10
+ */
11
+ export declare function formatWorkflowForDip(nodes: Node[], edges: Edge[], name?: string): DipWorkflowDefinition;
@@ -0,0 +1,15 @@
1
+ import { DipNodeSummary } from '../api/dip';
2
+ import { ActionItem, CategoryItem, NodeTypeItem } from '../Panels/ModernNodeSelectorPanel/types';
3
+ /**
4
+ * 将 DIP NodeSummary 转换为 ActionItem(用于节点选择器面板)
5
+ */
6
+ export declare function convertNodeSummaryToActionItem(summary: DipNodeSummary): ActionItem;
7
+ /**
8
+ * 将 DIP NodeSummary 数组转换为 NodeTypeItem 数组
9
+ */
10
+ export declare function convertNodeSummariesToNodeTypeItems(summaries: DipNodeSummary[]): NodeTypeItem[];
11
+ /**
12
+ * 将 DIP NodeSummary 数组按前缀分组为 CategoryItem 列表
13
+ * 约定 nodeKey 格式为 "pluginId.actionName"
14
+ */
15
+ export declare function groupNodeSummariesByPlugin(summaries: DipNodeSummary[]): CategoryItem[];
@@ -1,8 +1,9 @@
1
- import { FormInstance, ThemeConfig } from 'antd';
2
- import { Locale } from 'antd/lib/locale';
3
1
  import { OptionsLoader } from './FieldRenderer';
4
2
  import { ActionContext, EventConfig } from './types/events';
5
3
  import { FormSchema } from './types/form-schema';
4
+ import { FormInstance, ThemeConfig } from 'antd';
5
+ import { Locale } from 'antd/lib/locale';
6
+ import * as React from 'react';
6
7
  /** 预设主题类型 */
7
8
  export type PresetTheme = 'default' | 'apple' | 'google' | 'preline';
8
9
  export type DynamicFormProps<T = Record<string, unknown>> = {
@@ -26,6 +27,10 @@ export type DynamicFormProps<T = Record<string, unknown>> = {
26
27
  mcpMode?: boolean;
27
28
  /** 变量验证函数 */
28
29
  validateVariable?: (variable: string) => boolean | Promise<boolean>;
30
+ /** 自定义变量标签渲染 */
31
+ renderVariableTag?: (variable: string, isValid: boolean) => React.ReactNode;
32
+ /** 自定义变量标签 tooltip */
33
+ renderVariableTooltip?: (variable: string) => React.ReactNode;
29
34
  /** 可用变量列表 */
30
35
  availableVariables?: Array<{
31
36
  path: string;
@@ -49,4 +54,4 @@ export type DynamicFormProps<T = Record<string, unknown>> = {
49
54
  /** 是否启用事件系统调试日志(默认 false) */
50
55
  debugEvents?: boolean;
51
56
  };
52
- export declare function DynamicForm<T extends Record<string, unknown>>({ schema, initialValues, onSubmit, onChange, submitLabel, showReset, resetLabel, onReset, form: externalForm, showSubmit, optionsLoader, nodeId, mcpMode, validateVariable, availableVariables, theme, customTheme, locale, prefixCls, events, customHandlers, maxExecutionDepth, debugEvents, }: DynamicFormProps<T>): import("react/jsx-runtime").JSX.Element;
57
+ export declare function DynamicForm<T extends Record<string, unknown>>({ schema, initialValues, onSubmit, onChange, submitLabel, showReset, resetLabel, onReset, form: externalForm, showSubmit, optionsLoader, nodeId, mcpMode, validateVariable, renderVariableTag, renderVariableTooltip, availableVariables, theme, customTheme, locale, prefixCls, events, customHandlers, maxExecutionDepth, debugEvents, }: DynamicFormProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export {};