@digitalsee-ai/rcs 1.1.9 → 2.0.0-beta3

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 (167) hide show
  1. package/README.md +6 -38
  2. package/README.npm.md +37 -0
  3. package/dist/components/digitalsee/JsonRenderer/index.d.ts +1 -1
  4. package/dist/components/digitalsee/workflow/Canvas/FastOperationButtons.d.ts +5 -2
  5. package/dist/components/digitalsee/workflow/Canvas/FullscreenLoading.d.ts +10 -2
  6. package/dist/components/digitalsee/workflow/Canvas/MiniMap.d.ts +1 -1
  7. package/dist/components/digitalsee/workflow/Canvas/NodePlaceholder.d.ts +12 -0
  8. package/dist/components/digitalsee/workflow/Canvas/WorkflowCanvasHeader.d.ts +4 -8
  9. package/dist/components/digitalsee/workflow/Canvas/actionItemToNodeData.d.ts +1 -6
  10. package/dist/components/digitalsee/workflow/Canvas/constants.d.ts +25 -26
  11. package/dist/components/digitalsee/workflow/Canvas/hooks/{classicNodeAddConnection.d.ts → nodePackageAddConnection.d.ts} +3 -3
  12. package/dist/components/digitalsee/workflow/Canvas/hooks/useCanvasApi.d.ts +4 -2
  13. package/dist/components/digitalsee/workflow/Canvas/hooks/useDataLoading.d.ts +42 -5
  14. package/dist/components/digitalsee/workflow/Canvas/hooks/useNodeAddCallback.d.ts +2 -3
  15. package/dist/components/digitalsee/workflow/Canvas/hooks/useSaveFlowAfterNodeAdd.d.ts +4 -7
  16. package/dist/components/digitalsee/workflow/Canvas/hooks/useWorkflowCanvasState.d.ts +22 -4
  17. package/dist/components/digitalsee/workflow/Canvas/types.d.ts +19 -21
  18. package/dist/components/digitalsee/workflow/Edges/BaseEdge.d.ts +2 -0
  19. package/dist/components/digitalsee/workflow/Edges/EdgeFactory.d.ts +3 -8
  20. package/dist/components/digitalsee/workflow/Edges/edgeLayout.d.ts +73 -0
  21. package/dist/components/digitalsee/workflow/Handles/CustomHandle.d.ts +1 -0
  22. package/dist/components/digitalsee/workflow/Handles/customHandleConnectable.d.ts +19 -0
  23. package/dist/components/digitalsee/workflow/Nodes/DeclaredNode.d.ts +33 -0
  24. package/dist/components/digitalsee/workflow/Nodes/DynamicNode.d.ts +24 -0
  25. package/dist/components/digitalsee/workflow/Nodes/NodeFactory.d.ts +42 -4
  26. package/dist/components/digitalsee/workflow/Nodes/SuperBaseNode.d.ts +2 -1
  27. package/dist/components/digitalsee/workflow/Nodes/classicPortLayout.d.ts +51 -0
  28. package/dist/components/digitalsee/workflow/Nodes/components/NodeStatusBadge.d.ts +11 -0
  29. package/dist/components/digitalsee/workflow/Nodes/{classicNodePackagePortLayout.d.ts → nodePackagePortLayout.d.ts} +4 -4
  30. package/dist/components/digitalsee/workflow/Nodes/nodeTypeRegistry.d.ts +131 -0
  31. package/dist/components/digitalsee/workflow/Nodes/useNodePackagePorts.d.ts +35 -0
  32. package/dist/components/digitalsee/workflow/NodesConfig/NodePackageConfig/fieldSchemaAdapter.d.ts +14 -0
  33. package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/RichTagInput/help.d.ts +5 -1
  34. package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/index.d.ts +1 -0
  35. package/dist/components/digitalsee/workflow/NodesConfig/components/NodeTest.d.ts +2 -0
  36. package/dist/components/digitalsee/workflow/NodesConfig/components/NodeTest.helpers.d.ts +11 -0
  37. package/dist/components/digitalsee/workflow/NodesConfig/components/VariableModal/tree-help.d.ts +5 -12
  38. package/dist/components/digitalsee/workflow/NodesConfig/submitPayload.d.ts +10 -17
  39. package/dist/components/digitalsee/workflow/Panels/CanvasConfigDebugger.d.ts +1 -1
  40. package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/components/CategoryItem.d.ts +1 -1
  41. package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/components/CategoryTabs.d.ts +1 -1
  42. package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/components/NodeCard.d.ts +1 -1
  43. package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/components/NodeItem.d.ts +1 -1
  44. package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/components/PanelHeader.d.ts +1 -1
  45. package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useConnectableNodeSelector.d.ts +2 -5
  46. package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/types.d.ts +10 -4
  47. package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/connectableDataSource.d.ts +6 -10
  48. package/dist/components/digitalsee/workflow/Panels/SimpleNodeSelectorPanel/components/NodeListItem.d.ts +1 -1
  49. package/dist/components/digitalsee/workflow/api/dip.types.d.ts +30 -1
  50. package/dist/components/digitalsee/workflow/api/index.d.ts +3 -22
  51. package/dist/components/digitalsee/workflow/builtin/controls/ConfigSubflow/index.d.ts +2 -2
  52. package/dist/components/digitalsee/workflow/builtin/globalConfig/index.d.ts +5 -1
  53. package/dist/components/digitalsee/workflow/config/globalConfig.d.ts +1 -5
  54. package/dist/components/digitalsee/workflow/config/layerConfig.d.ts +14 -0
  55. package/dist/components/digitalsee/workflow/config/themeConfig.d.ts +19 -23
  56. package/dist/components/digitalsee/workflow/constants/nodePackageHandles.d.ts +10 -0
  57. package/dist/components/digitalsee/workflow/context/workflowTriggerContext.d.ts +22 -0
  58. package/dist/components/digitalsee/workflow/coverage/acceptanceManifest.d.ts +30 -0
  59. package/dist/components/digitalsee/workflow/coverage/runtimeCoverage.d.ts +34 -0
  60. package/dist/components/digitalsee/workflow/design-system/AiFlowNodeTestPanel.d.ts +24 -0
  61. package/dist/components/digitalsee/workflow/design-system/AiFlowVariableTree.d.ts +34 -0
  62. package/dist/components/digitalsee/workflow/design-system/index.d.ts +3 -0
  63. package/dist/components/digitalsee/workflow/design-system/tokens.d.ts +103 -0
  64. package/dist/components/digitalsee/workflow/enums/canvas.d.ts +0 -12
  65. package/dist/components/digitalsee/workflow/enums/edge.d.ts +4 -2
  66. package/dist/components/digitalsee/workflow/enums/node.d.ts +5 -6
  67. package/dist/components/digitalsee/workflow/enums/workflow.d.ts +1 -1
  68. package/dist/components/digitalsee/workflow/examples/global-config-example.d.ts +1 -1
  69. package/dist/components/digitalsee/workflow/hooks/state.hooks.d.ts +1 -7
  70. package/dist/components/digitalsee/workflow/hooks/use-flow-data-operation.d.ts +1 -1
  71. package/dist/components/digitalsee/workflow/hooks/useCanvasLayout.d.ts +1 -1
  72. package/dist/components/digitalsee/workflow/hooks/useCanvasMode.d.ts +8 -0
  73. package/dist/components/digitalsee/workflow/hooks/useHandleConnections.d.ts +9 -1
  74. package/dist/components/digitalsee/workflow/hooks/useVariables.d.ts +1 -0
  75. package/dist/components/digitalsee/workflow/hooks/useWorkflow.d.ts +1 -1
  76. package/dist/components/digitalsee/workflow/index.d.ts +28 -46
  77. package/dist/components/digitalsee/workflow/migration/umi.d.ts +1 -2
  78. package/dist/components/digitalsee/workflow/store/workflowSlice.d.ts +5 -2
  79. package/dist/components/digitalsee/workflow/types/Node.d.ts +2 -0
  80. package/dist/components/digitalsee/workflow/types/Workflow.d.ts +1 -1
  81. package/dist/components/digitalsee/workflow/types/engine.d.ts +21 -12
  82. package/dist/components/digitalsee/workflow/types/flowVersion.d.ts +0 -30
  83. package/dist/components/digitalsee/workflow/utils/connectionCheck.d.ts +30 -0
  84. package/dist/components/digitalsee/workflow/utils/layoutUtils.d.ts +2 -2
  85. package/dist/components/digitalsee/workflow/utils/mcpCanvas.d.ts +0 -40
  86. package/dist/components/digitalsee/workflow/utils/mode.d.ts +18 -0
  87. package/dist/components/digitalsee/workflow/utils/nodeAutoConnect.d.ts +24 -0
  88. package/dist/components/digitalsee/workflow/utils/nodeCommon.d.ts +5 -0
  89. package/dist/components/digitalsee/workflow/utils/nodeHandleLayout.d.ts +83 -0
  90. package/dist/components/digitalsee/workflow/utils/nodePackageConnection.d.ts +28 -0
  91. package/dist/components/digitalsee/workflow/utils/nodePackageGraphValidation.d.ts +29 -0
  92. package/dist/components/digitalsee/workflow/utils/nodePackageSchemaCache.d.ts +15 -0
  93. package/dist/components/digitalsee/workflow/utils/onNodeRemoveHook.d.ts +13 -0
  94. package/dist/components/digitalsee/workflow/utils/triggerNode.d.ts +13 -0
  95. package/dist/components/digitalsee/workflow/utils/workflowConnectionValidator.d.ts +1 -3
  96. package/dist/components/digitalsee/workflow/workflow.story-fixtures.d.ts +50 -0
  97. package/dist/{index-CqZ6Y0AC.mjs → index-Bw7AlWFF.mjs} +23754 -25891
  98. package/dist/index-D6yj1rMq.mjs +285 -0
  99. package/dist/locales/en-US/common.d.ts +29 -52
  100. package/dist/locales/en-US.d.ts +29 -52
  101. package/dist/locales/zh-CN/common.d.ts +29 -52
  102. package/dist/locales/zh-CN.d.ts +29 -52
  103. package/dist/locales/zh-TW/common.d.ts +29 -52
  104. package/dist/locales/zh-TW.d.ts +29 -52
  105. package/dist/rcs.css +1 -1
  106. package/dist/rcs.es.js +65 -62
  107. package/dist/rcs.umd.js +132 -72
  108. package/package.json +38 -23
  109. package/dist/components/digitalsee/workflow/Canvas/FlowVersionManager.d.ts +0 -17
  110. package/dist/components/digitalsee/workflow/Canvas/NextConfigModalWrapper.d.ts +0 -9
  111. package/dist/components/digitalsee/workflow/Canvas/NextWorkflowCanvas.d.ts +0 -4
  112. package/dist/components/digitalsee/workflow/Canvas/NextWorkflowCanvasHeader.d.ts +0 -17
  113. package/dist/components/digitalsee/workflow/Canvas/hooks/createNodeAddHandlerNext.d.ts +0 -38
  114. package/dist/components/digitalsee/workflow/NextNodesConfigModal/index.d.ts +0 -13
  115. package/dist/components/digitalsee/workflow/Nodes/AISubNode.d.ts +0 -9
  116. package/dist/components/digitalsee/workflow/Nodes/ActionNode.d.ts +0 -13
  117. package/dist/components/digitalsee/workflow/Nodes/AgentNode.d.ts +0 -10
  118. package/dist/components/digitalsee/workflow/Nodes/BrowserNode.d.ts +0 -10
  119. package/dist/components/digitalsee/workflow/Nodes/BuiltinMCPNode.d.ts +0 -9
  120. package/dist/components/digitalsee/workflow/Nodes/ConditionNode.d.ts +0 -13
  121. package/dist/components/digitalsee/workflow/Nodes/CustomNode.d.ts +0 -15
  122. package/dist/components/digitalsee/workflow/Nodes/LoopNode.d.ts +0 -4
  123. package/dist/components/digitalsee/workflow/Nodes/MCPServerNode.d.ts +0 -9
  124. package/dist/components/digitalsee/workflow/Nodes/MCPToolNode.d.ts +0 -9
  125. package/dist/components/digitalsee/workflow/Nodes/NextNodeFactory.d.ts +0 -12
  126. package/dist/components/digitalsee/workflow/Nodes/NextNodes/NextActionNode.d.ts +0 -9
  127. package/dist/components/digitalsee/workflow/Nodes/NextNodes/NextBaseNode.d.ts +0 -16
  128. package/dist/components/digitalsee/workflow/Nodes/NextNodes/NextConditionNode.d.ts +0 -10
  129. package/dist/components/digitalsee/workflow/Nodes/NextNodes/NextLoopNode.d.ts +0 -10
  130. package/dist/components/digitalsee/workflow/Nodes/NextNodes/NextSwitchNode.d.ts +0 -10
  131. package/dist/components/digitalsee/workflow/Nodes/NextNodes/NextTriggerNode.d.ts +0 -9
  132. package/dist/components/digitalsee/workflow/Nodes/SelfLoopNode.d.ts +0 -4
  133. package/dist/components/digitalsee/workflow/Nodes/StartNode.d.ts +0 -1
  134. package/dist/components/digitalsee/workflow/Nodes/SwitchNode.d.ts +0 -13
  135. package/dist/components/digitalsee/workflow/Nodes/TriggerNode.d.ts +0 -10
  136. package/dist/components/digitalsee/workflow/Nodes/components/NextNodeDescription.d.ts +0 -16
  137. package/dist/components/digitalsee/workflow/Nodes/components/NextNodeOperations.d.ts +0 -11
  138. package/dist/components/digitalsee/workflow/Nodes/useClassicNodePackagePorts.d.ts +0 -27
  139. package/dist/components/digitalsee/workflow/NodesConfig/NextNodeConfig/CreateCredentialModal.d.ts +0 -13
  140. package/dist/components/digitalsee/workflow/NodesConfig/NextNodeConfig/CredentialSelect.d.ts +0 -17
  141. package/dist/components/digitalsee/workflow/NodesConfig/NextNodeConfig/ModifyCredentialModal.d.ts +0 -17
  142. package/dist/components/digitalsee/workflow/NodesConfig/NextNodeConfig/fieldSchemaAdapter.d.ts +0 -10
  143. package/dist/components/digitalsee/workflow/NodesConfig/NextNodeConfig/index.d.ts +0 -17
  144. package/dist/components/digitalsee/workflow/NodesConfig/components/NextNodeSettings.d.ts +0 -6
  145. package/dist/components/digitalsee/workflow/NodesConfig/components/NextNodeTest.d.ts +0 -6
  146. package/dist/components/digitalsee/workflow/NodesConfig/components/NextVariableModal/index.d.ts +0 -6
  147. package/dist/components/digitalsee/workflow/NodesConfig/components/NextVariableModal/variable-tree-next.d.ts +0 -49
  148. package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/components/EntryTypeSelector.d.ts +0 -8
  149. package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/components/NodeCardList.d.ts +0 -20
  150. package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useNodeActionState.d.ts +0 -28
  151. package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useNodeSelectorPresentation.d.ts +0 -25
  152. package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/queryParams.d.ts +0 -18
  153. package/dist/components/digitalsee/workflow/constants/nextHandles.d.ts +0 -1
  154. package/dist/components/digitalsee/workflow/utils/classicNodePackageConnection.d.ts +0 -28
  155. package/dist/components/digitalsee/workflow/utils/classicNodePackageGraphValidation.d.ts +0 -29
  156. package/dist/components/digitalsee/workflow/utils/nextNodeSchemaCache.d.ts +0 -14
  157. package/dist/components/digitalsee/workflow/utils/queuedNodeConfigOpen.d.ts +0 -12
  158. package/dist/index-BnE-Ea2s.mjs +0 -312
  159. package/dist/index-BnE-Ea2s.mjs.map +0 -1
  160. package/dist/index-CqZ6Y0AC.mjs.map +0 -1
  161. package/dist/rcs.es.js.map +0 -1
  162. package/dist/rcs.umd.js.map +0 -1
  163. /package/dist/components/digitalsee/workflow/NodesConfig/{NextNodeConfig → NodePackageConfig}/WorkflowNodeSchemaFieldProvider.d.ts +0 -0
  164. /package/dist/components/digitalsee/workflow/NodesConfig/{NextNodeConfig → NodePackageConfig}/fields/WorkflowCodeField.d.ts +0 -0
  165. /package/dist/components/digitalsee/workflow/NodesConfig/{NextNodeConfig → NodePackageConfig}/fields/WorkflowProxyField.d.ts +0 -0
  166. /package/dist/components/digitalsee/workflow/NodesConfig/{NextNodeConfig → NodePackageConfig}/proxyField.d.ts +0 -0
  167. /package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/{next-compatible.d.ts → nodePackage-compatible.d.ts} +0 -0
@@ -0,0 +1,103 @@
1
+ export declare const AI_FLOW_DESIGN_SYSTEM_VERSION = "1.0.0";
2
+ /**
3
+ * AI FLOW 语义 Token(权威源)。
4
+ *
5
+ * 组件实现、Storybook 和宿主应用都应使用这里的语义值,不要在业务页面重新定义颜色、
6
+ * 圆角和阴影。CSS 中可使用同名的 `--ai-flow-*` 自定义属性。
7
+ *
8
+ * ⚠️ 此文件是颜色、圆角、阴影、间距等视觉属性的唯一权威来源。
9
+ * 以下两个文件由此派生,三者必须保持同步:
10
+ * - config/themeConfig.ts — Ant Design ThemeConfig
11
+ * - styles/design-system.less — CSS 自定义属性 & Less 变量
12
+ */
13
+ export declare const aiFlowTokens: {
14
+ readonly color: {
15
+ readonly brand: "#2d5bff";
16
+ readonly brandHover: "#1e45e6";
17
+ readonly text: "#0f172a";
18
+ readonly textSecondary: "#334155";
19
+ readonly textMuted: "#64748b";
20
+ readonly textSubtle: "#94a3b8";
21
+ readonly surface: "#ffffff";
22
+ readonly surfaceMuted: "#f8fafc";
23
+ readonly surfaceSunken: "#f1f5f9";
24
+ readonly canvas: "#eef0f4";
25
+ readonly border: "#e2e8f0";
26
+ readonly borderStrong: "#cbd5e1";
27
+ readonly borderSoft: "#eef1f5";
28
+ readonly success: "#16a34a";
29
+ readonly warning: "#d97706";
30
+ readonly danger: "#dc2626";
31
+ readonly runtime: "#0891b2";
32
+ readonly agent: "#6d28d9";
33
+ readonly trigger: "#0f9d6e";
34
+ readonly return: "#7c3aed";
35
+ };
36
+ readonly typography: {
37
+ readonly fontFamily: "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif";
38
+ readonly monoFamily: "'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace";
39
+ readonly titleSize: 14;
40
+ readonly bodySize: 13;
41
+ readonly captionSize: 11;
42
+ readonly titleWeight: 650;
43
+ readonly bodyWeight: 400;
44
+ };
45
+ readonly radius: {
46
+ readonly tag: 6;
47
+ readonly control: 8;
48
+ readonly popover: 10;
49
+ readonly card: 12;
50
+ readonly node: 13;
51
+ readonly canvas: 14;
52
+ };
53
+ readonly size: {
54
+ readonly controlHeight: 34;
55
+ readonly nodeIcon: 36;
56
+ readonly canvasHeader: 58;
57
+ readonly port: 10;
58
+ };
59
+ readonly spacing: {
60
+ readonly 1: 4;
61
+ readonly 2: 8;
62
+ readonly 3: 12;
63
+ readonly 4: 16;
64
+ readonly 5: 20;
65
+ readonly 6: 24;
66
+ };
67
+ readonly shadow: {
68
+ readonly xs: "0 1px 2px rgba(15, 23, 42, 0.04)";
69
+ readonly sm: "0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04)";
70
+ readonly md: "0 8px 24px -8px rgba(15, 23, 42, 0.18)";
71
+ readonly popover: "0 18px 48px -16px rgba(15, 23, 42, 0.3)";
72
+ };
73
+ readonly motion: {
74
+ readonly fast: "120ms";
75
+ readonly normal: "200ms";
76
+ readonly easing: "cubic-bezier(0.16, 1, 0.3, 1)";
77
+ };
78
+ readonly layer: {
79
+ readonly nestedModal: 1200;
80
+ readonly nestedPopover: 1250;
81
+ readonly fullscreenWorkspace: 1400;
82
+ };
83
+ };
84
+ export declare const aiFlowCssVariables: {
85
+ readonly brand: "--ai-flow-color-brand";
86
+ readonly brandHover: "--ai-flow-color-brand-hover";
87
+ readonly text: "--ai-flow-color-text";
88
+ readonly textSecondary: "--ai-flow-color-text-secondary";
89
+ readonly textMuted: "--ai-flow-color-text-muted";
90
+ readonly surface: "--ai-flow-color-surface";
91
+ readonly surfaceMuted: "--ai-flow-color-surface-muted";
92
+ readonly canvas: "--ai-flow-color-canvas";
93
+ readonly border: "--ai-flow-color-border";
94
+ readonly success: "--ai-flow-color-success";
95
+ readonly warning: "--ai-flow-color-warning";
96
+ readonly danger: "--ai-flow-color-danger";
97
+ readonly radiusControl: "--ai-flow-radius-control";
98
+ readonly radiusNode: "--ai-flow-radius-node";
99
+ readonly shadowSm: "--ai-flow-shadow-sm";
100
+ readonly fontFamily: "--ai-flow-font-family";
101
+ readonly monoFamily: "--ai-flow-font-mono";
102
+ };
103
+ export type AiFlowTokens = typeof aiFlowTokens;
@@ -1,18 +1,6 @@
1
1
  /**
2
2
  * 画布(Canvas)相关枚举
3
3
  */
4
- /**
5
- * 引擎模式
6
- *
7
- * 当前 AI 连接流主路径是 CLASSIC。日常描述里的“新版节点”通常指
8
- * CLASSIC 模式兼容渲染新版 NodeSchema 的 nodepackage 节点,不是 NEXT 模式。
9
- */
10
- export declare enum EngineMode {
11
- /** 经典模式,使用 ACM 后端;同时承载 nodepackage 节点的新版 schema 兼容渲染 */
12
- CLASSIC = "classic",
13
- /** Next 模式,使用 DIP 后端 + DynamicForm;当前为暂废保留分支 */
14
- NEXT = "next"
15
- }
16
4
  /**
17
5
  * 画布保存状态
18
6
  */
@@ -3,8 +3,10 @@
3
3
  */
4
4
  /**
5
5
  * 边类型
6
+ *
7
+ * 历史上还存在 `EdgeType.AI`,但 AI 协议相关样式由 source handle position 决定
8
+ * (见 `Edges/BaseEdge.tsx` 的 `isVerticalEdge`),不再需要专用 EdgeType。
6
9
  */
7
10
  export declare enum EdgeType {
8
- MAIN = "main",
9
- AI = "ai"
11
+ MAIN = "main"
10
12
  }
@@ -5,8 +5,6 @@
5
5
  * 节点渲染类型(ReactFlow 层概念)
6
6
  */
7
7
  export declare enum NodeType {
8
- /** 开始节点 */
9
- START = "START",
10
8
  /** 触发节点 */
11
9
  TRIGGER = "StartEventNode",
12
10
  /** 动作节点 */
@@ -17,11 +15,8 @@ export declare enum NodeType {
17
15
  LOOP = "LoopNode",
18
16
  /** 自环节点 */
19
17
  SELF_LOOP = "SelfLoopNode",
20
- /** MCP服务节点 */
21
18
  MCPServer = "MCPServerNode",
22
- /** MCP网关触发节点 */
23
19
  MCP_TRIGGER_NODE = "MCP_TRIGGER_NODE",
24
- /** 内置MCP节点 */
25
20
  BuiltinMCP = "BuiltinMCPNode",
26
21
  /** 向量存储节点 */
27
22
  VECTOR_STORE = "VectorStoreNode",
@@ -42,7 +37,11 @@ export declare enum NodeType {
42
37
  /**
43
38
  * 自定义节点类型(内部扩展用)
44
39
  */
45
- CUSTOM = "custom"
40
+ CUSTOM = "custom",
41
+ /**
42
+ * 动态 NodePackage节点
43
+ */
44
+ DYNAMIC = "dynamic"
46
45
  }
47
46
  /**
48
47
  * 节点运行状态
@@ -87,4 +87,4 @@ export declare enum ConditionCompare {
87
87
  */
88
88
  is_not_null = "is_not_null"
89
89
  }
90
- export { CanvasLayoutSource, CanvasLayoutTarget, EngineMode, SaveStatus, } from './canvas';
90
+ export { CanvasLayoutSource, CanvasLayoutTarget, SaveStatus, } from './canvas';
@@ -6,7 +6,7 @@
6
6
  export declare function WorkflowPageExample(): import("react/jsx-runtime").JSX.Element;
7
7
  export declare const setupCustomClient: () => void;
8
8
  export declare function useWorkflowAuth(): {
9
- updateToken: (token: string) => void;
9
+ updateToken: (_token: string) => void;
10
10
  clearToken: () => void;
11
11
  };
12
12
  export declare function LoginExample(): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,3 @@
1
- import { FlowStatus } from '../NodesConfig/define/flow';
2
- /**
3
- * 判断当前流程是否允许编辑。
4
- *
5
- * 已发布及发布中的流程始终只读,不能因启用版本管理而绕过状态限制。
6
- */
7
- export declare const resolveFlowEditable: (isLocked: boolean, opStatus: FlowStatus) => boolean;
8
1
  export declare const useFlowEditable: () => boolean;
9
2
  export declare const useCurrentFlowId: () => string;
3
+ export declare const useCurrentFlowMeta: () => Record<string, unknown>;
@@ -1,6 +1,6 @@
1
1
  export declare const useFlowDataOperation: () => {
2
2
  getNodes: () => import('@xyflow/react').Node[];
3
- removeNodes: (nids: string[]) => void;
3
+ removeNodes: (nodeIds: string[]) => void;
4
4
  removeEdges: (edgeIds: string[]) => void;
5
5
  addEdges: (newEdges: any[]) => void;
6
6
  addNodes: (newNodes: any[]) => void;
@@ -1,5 +1,5 @@
1
- import { CanvasLayoutResult } from '../utils/layoutUtils';
2
1
  import { CanvasLayoutTarget } from '../enums/workflow';
2
+ import { CanvasLayoutResult } from '../utils/layoutUtils';
3
3
  export declare const useCanvasLayout: (id?: string) => {
4
4
  layout: (target?: CanvasLayoutTarget, shouldFitView?: boolean) => CanvasLayoutResult;
5
5
  autoLayout: (shouldFitView?: boolean) => CanvasLayoutResult;
@@ -0,0 +1,8 @@
1
+ import { WorkflowCanvasMode } from '../types/engine';
2
+ /**
3
+ * 画布模式统一读取入口。
4
+ *
5
+ * canvas.mode 已在入口(index.tsx)由 resolveCanvasMode 收敛旧 props 后写入,
6
+ * 下游一律经由此 hook 读取,缺省回退 edit。
7
+ */
8
+ export declare const useCanvasMode: () => WorkflowCanvasMode;
@@ -1,5 +1,13 @@
1
1
  import { HandleDirection } from '../enums/handle';
2
+ import { Edge } from '@xyflow/react';
3
+ /**
4
+ * 过滤指定 Handle 上的边,用于 maxConnections 计数。
5
+ *
6
+ * 自环边(source === target,如 LOOP 的 loop -> input)不占 target 桩的
7
+ * maxConnections 名额;handleStatus 仍将其视为已连接样式。
8
+ */
9
+ export declare const filterHandleConnections: (edges: readonly Edge[], nodeId: string, handleId: string, handleType: HandleDirection) => Edge[];
2
10
  export declare function useHandleConnections(): {
3
- getHandleConnections: (nodeId: string, handleId: string, handleType: HandleDirection) => import('@xyflow/react').Edge[];
11
+ getHandleConnections: (nodeId: string, handleId: string, handleType: HandleDirection) => Edge[];
4
12
  handleStatus: (nodeId: string, handleId: string) => "default" | "connected";
5
13
  };
@@ -32,6 +32,7 @@ interface UseVariablesReturn {
32
32
  globalVariables: EnhancedGlobalVariable[];
33
33
  nodeVariables: EnhancedVarDatum[];
34
34
  isLoading: boolean;
35
+ error: Error | null;
35
36
  refresh: () => void;
36
37
  }
37
38
  /**
@@ -17,7 +17,6 @@ export declare function useWorkflow(id?: string): {
17
17
  onEdgesChange: OnEdgesChange;
18
18
  onConnect: OnConnect;
19
19
  onEdgeUpdate: (oldEdge: Edge<EdgeData>, newConnection: Connection) => void;
20
- addNodes: (newNodes: Node[]) => void;
21
20
  addEdges: (newEdges: Edge[]) => void;
22
21
  removeNodes: (nodeIds: string[]) => void;
23
22
  removeEdges: (edgeIds: string[]) => void;
@@ -31,4 +30,5 @@ export declare function useWorkflow(id?: string): {
31
30
  isLocked: boolean;
32
31
  setLocked: (locked: boolean) => void;
33
32
  autoSaveFlow: () => void;
33
+ flowMetadata: Record<string, unknown>;
34
34
  };
@@ -1,7 +1,7 @@
1
+ import { WorkflowLoadResponse } from './Canvas/constants';
1
2
  import { default as defaultCanvasEngineConfig } from './config/defaultCanvasEngineConfig';
2
- import { CanvasEngineConfig, DeepPartial, CanvasAPI, HistoryNavigator, HttpClient } from './types/engine';
3
+ import { CanvasEngineConfig, DeepPartial, WorkflowCanvasMode, CanvasAPI, HistoryNavigator, HttpClient } from './types/engine';
3
4
  import { mergeConfig } from './utils/mergeConfig';
4
- import { EngineMode } from './enums/workflow';
5
5
  import { FlowDraftPayload } from './types/flowVersion';
6
6
  import { LocaleType } from '../../../locales';
7
7
  /**
@@ -17,35 +17,14 @@ export interface DigitalseeWorkFlowProps {
17
17
  */
18
18
  workflowId?: string;
19
19
  /**
20
- * 是否只读模式
20
+ * 画布模式(默认 'edit')
21
21
  *
22
- * @description 只读模式下禁用所有编辑能力
22
+ * @description edit=可编辑可改名;flow=不能改名字、返回 history.back();preview=只读展示、不渲染 Header
23
23
  */
24
- readOnly?: boolean;
25
- /**
26
- * 是否预览模式
27
- *
28
- * @description 预览模式下仅展示,不允许交互
29
- */
30
- preview?: boolean;
31
- /**
32
- * 预览使用的工作流 ID
33
- */
34
- previewId?: string;
35
- /**
36
- * 是否应用流模式
37
- */
38
- appFlowMode?: boolean;
39
- /**
40
- * 是否链接模式
41
- */
42
- linkMode?: boolean;
24
+ mode?: WorkflowCanvasMode;
43
25
  /**
44
26
  * 保存回调
45
27
  *
46
- * 仅在用户主动保存时触发(工具栏保存、发布前落草稿、canvasApi.saveFlow),
47
- * 节点新增等内部自动保存不会调用,避免宿主 toast 刷屏。
48
- *
49
28
  * @param workflow 当前工作流数据
50
29
  */
51
30
  onSave?: (workflow: FlowDraftPayload) => void | Promise<void>;
@@ -66,23 +45,12 @@ export interface DigitalseeWorkFlowProps {
66
45
  *
67
46
  * @description Defaults to zh-CN when omitted
68
47
  */
69
- locale?: LocaleType;
70
- /**
71
- * Base URL for workflow service APIs
72
- *
73
- * @description When provided, all internal API calls will prepend this URL
74
- */
75
- apiBaseUrl?: string;
76
- /**
77
- * Authorization token for workflow service APIs
78
- *
79
- * @description Injected as the Authorization header for every API call
80
- */
81
- apiToken?: string;
48
+ locale?: LocaleType | string;
82
49
  /**
83
50
  * HTTP 客户端实例
84
51
  *
85
- * @description 用于执行所有 HTTP 请求,可传入自定义的 HTTP 客户端(如 axios 实例)
52
+ * @description 用于执行所有 HTTP 请求,可传入自定义的 HTTP 客户端(如 axios 实例)。
53
+ * 认证(token 等)与地址(baseUrl 等)完全由该客户端负责
86
54
  */
87
55
  httpClient?: HttpClient;
88
56
  /**
@@ -92,13 +60,24 @@ export interface DigitalseeWorkFlowProps {
92
60
  */
93
61
  history?: HistoryNavigator;
94
62
  /**
95
- * 引擎模式
63
+ * 宿主响应连接流下线逻辑
64
+ * @param workflowId
65
+ * @returns 是否成功下线
66
+ */
67
+ onOffline?: (workflowId: string) => Promise<boolean>;
68
+ /**
69
+ * 由宿主提供的工作流数据加载方法
96
70
  *
97
- * @description 'classic' 是当前 AI 连接流主路径,使用 ACM 后端,并兼容渲染
98
- * nodepackage 节点的新版 NodeSchema 配置;'next' 是暂废保留的 DIP 直连分支。
99
- * @default 'classic'
71
+ * @description 提供后,画布加载数据时将调用它替代内部 API(需同时传入 workflowId)。
72
+ * workflowId 参数仅作透传参考,宿主可忽略并自行决定加载内容。
73
+ * 返回数据须符合 ACM 流程格式,见 WorkflowLoadResponse。
74
+ * 加载失败时宿主应 throw / reject,画布会展示失败浮层并支持重试。
75
+ */
76
+ onLoad?: (workflowId?: string) => Promise<WorkflowLoadResponse>;
77
+ /**
78
+ * 场景值
100
79
  */
101
- engineMode?: EngineMode;
80
+ scene?: string;
102
81
  }
103
82
  /**
104
83
  * DigitalseeWorkFlow 工作流画布组件
@@ -107,17 +86,20 @@ export interface DigitalseeWorkFlowProps {
107
86
  */
108
87
  declare const DigitalseeWorkFlow: (props: DigitalseeWorkFlowProps) => any;
109
88
  export type { WorkflowHttpClient } from './api';
89
+ export type { WorkflowLoadResponse } from './Canvas/constants';
110
90
  export { configureWorkflow, getGlobalWorkflowConfig, resetGlobalWorkflowConfig, } from './config/globalConfig';
111
91
  export * from './config/themeConfig';
112
92
  export { useCanvasApi } from './context/canvasApiContext';
113
93
  export { useCanvasConfig } from './context/canvasConfig';
94
+ export * from './design-system';
114
95
  export { default as EdgeFactory } from './Edges/EdgeFactory';
115
96
  export { NodeStatus, NodeType } from './enums/node';
116
- export { EngineMode, WorkflowOpStatus } from './enums/workflow';
97
+ export { WorkflowOpStatus } from './enums/workflow';
117
98
  export { default as HandleFactory } from './Handles/HandleFactory';
118
99
  export { useCanvasLayout } from './hooks/useCanvasLayout';
119
100
  export { useUndo } from './hooks/useUndo';
120
101
  export { useWorkflow } from './hooks/useWorkflow';
102
+ export { default as AiFlowNodeStatusBadge, type NodeStatusBadgeProps as AiFlowNodeStatusBadgeProps, } from './Nodes/components/NodeStatusBadge';
121
103
  export { default as NodeFactory } from './Nodes/NodeFactory';
122
104
  export * from './types/Edge';
123
105
  export type { CanvasAPI, CanvasEngineConfig, DeepPartial, HistoryNavigator, HttpClient, } from './types/engine';
@@ -1,7 +1,6 @@
1
1
  import { FormattedMessage } from 'react-intl';
2
2
  import * as history from 'history';
3
3
  declare const context: history.BrowserHistory;
4
- export { FormattedMessage };
5
- export { context as history };
4
+ export { context as history, FormattedMessage };
6
5
  export declare function Link(props: any): import("react/jsx-runtime").JSX.Element;
7
6
  export declare const useSearchParams: (url?: string) => URLSearchParams[];
@@ -1,5 +1,6 @@
1
1
  import { FlowStatus } from '../NodesConfig/define/flow';
2
2
  import { EdgeData } from '../types/Edge';
3
+ import { FlowVersionStatusVO } from '../types/flowVersion';
3
4
  import { NodeData, NodeType } from '../types/Node';
4
5
  import { Connection, Edge, EdgeChange, Node, NodeChange } from '@xyflow/react';
5
6
  export interface ExecutionControlState {
@@ -23,6 +24,8 @@ export interface WorkflowState {
23
24
  isLocked: boolean;
24
25
  executionControl: ExecutionControlState | null;
25
26
  flowMetadata: Record<string, unknown>;
27
+ /** 用户是否手动删除过 trigger 节点(手动删除后不再展示 NodePlaceholder) */
28
+ triggerDeleted: boolean;
26
29
  }
27
30
  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<{
28
31
  type: NodeType;
@@ -31,7 +34,7 @@ export declare const setWorkflowId: import('@reduxjs/toolkit').ActionCreatorWith
31
34
  y: number;
32
35
  };
33
36
  data: NodeData;
34
- }, "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<{
37
+ }, "workflow/addNode">, 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<{
35
38
  nodes: Node<NodeData>[];
36
39
  edges: Edge<EdgeData>[];
37
40
  }, "workflow/setSelection">, updateEdge: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
@@ -40,6 +43,6 @@ export declare const setWorkflowId: import('@reduxjs/toolkit').ActionCreatorWith
40
43
  }, "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<{
41
44
  id: string;
42
45
  data: Partial<NodeData>;
43
- }, "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">, setFlowMetadata: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<Record<string, unknown>, "workflow/setFlowMetadata">, resetFlow: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"workflow/resetFlow">, executeAutoSave: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"workflow/executeAutoSave">;
46
+ }, "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">, setFlowMetadata: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<Record<string, unknown>, "workflow/setFlowMetadata">, setTriggerDeleted: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<boolean, "workflow/setTriggerDeleted">, resetFlow: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"workflow/resetFlow">, executeAutoSave: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"workflow/executeAutoSave">, setFlowVersionMeta: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<FlowVersionStatusVO, "workflow/setFlowVersionMeta">;
44
47
  declare const _default: import('@reduxjs/toolkit').Reducer<WorkflowState>;
45
48
  export default _default;
@@ -29,6 +29,8 @@ export type NodeData = ActionItem & {
29
29
  account_id?: string | null;
30
30
  /** 节点协议类型(AI_LANGUAGE_MODEL / MCP 等) */
31
31
  protocol?: string;
32
+ /** 是否是 Trigger 节点 */
33
+ is_trigger?: boolean;
32
34
  /** index signature — 满足 ReactFlow v12 的 Record<string, unknown> 约束 */
33
35
  [key: string]: unknown;
34
36
  };
@@ -1,6 +1,6 @@
1
+ import { WorkflowOpStatus } from '../enums/workflow';
1
2
  import { WorkflowEdge } from './Edge';
2
3
  import { WorkflowNode } from './Node';
3
- import { WorkflowOpStatus } from '../enums/workflow';
4
4
  /**
5
5
  * 工作流定义
6
6
  */
@@ -1,7 +1,7 @@
1
1
  import { ReactFlow } from '@xyflow/react';
2
2
  import { Rule } from 'antd/es/form';
3
3
  import { ComponentProps, ReactNode } from 'react';
4
- import { EngineMode, WorkflowOpStatus } from '../enums/workflow';
4
+ import { WorkflowOpStatus } from '../enums/workflow';
5
5
  export type HttpClient = <T = any>(url: string, config: any) => Promise<T>;
6
6
  export interface HistoryNavigator {
7
7
  push(path: string, state?: any): void;
@@ -11,12 +11,19 @@ export interface HistoryNavigator {
11
11
  goForward(): void;
12
12
  listen?(listener: (location: any, action: any) => void): () => void;
13
13
  }
14
+ /**
15
+ * 画布模式(单一事实源):取代散落的 readOnly / preview / previewId / appFlowMode 参数。
16
+ *
17
+ * - edit : 可编辑可改名(默认),独立页导航返回 history.push('/link/ai-flow')
18
+ * - flow : 应用流嵌入页 不可改名字
19
+ * - preview: 只读展示,不渲染 Header,节点不可拖/连/选
20
+ */
21
+ export type WorkflowCanvasMode = 'edit' | 'flow' | 'preview';
14
22
  export type DeepPartial<T> = {
15
23
  [P in keyof T]?: T[P] extends (...args: any[]) => any ? T[P] : T[P] extends Array<infer U> ? Array<DeepPartial<U>> : T[P] extends object ? DeepPartial<T[P]> : T[P];
16
24
  };
17
25
  export interface CanvasEngineConfig {
18
26
  flowId: string;
19
- engineMode?: EngineMode;
20
27
  canvas: CanvasCoreConfig;
21
28
  nodeSelector: NodeSelectorConfig;
22
29
  nodeTypes: NodeTypesRegistryConfig;
@@ -25,6 +32,7 @@ export interface CanvasEngineConfig {
25
32
  nodeConfigPanel: NodeConfigPanelConfig;
26
33
  httpClient?: HttpClient;
27
34
  history?: HistoryNavigator;
35
+ scene?: string;
28
36
  }
29
37
  /**
30
38
  * NodePackage 可连线候选能力配置。
@@ -56,7 +64,7 @@ export interface CanvasCoreConfig {
56
64
  size?: number;
57
65
  };
58
66
  allowRemoveTrigger?: boolean;
59
- mode?: 'edit' | 'preview';
67
+ mode?: WorkflowCanvasMode;
60
68
  miniMap?: boolean;
61
69
  header?: boolean;
62
70
  controls?: boolean;
@@ -158,17 +166,16 @@ export interface ToolbarConfig {
158
166
  enableOnlineConfirmMessage?: string;
159
167
  enableFlowText?: string;
160
168
  /**
161
- * 自定义上线API,用于自定义MFA流程上线
169
+ * 连接流版本管理集成回调,仅 CLASSIC/ACM 画布支持。
170
+ *
171
+ * 注意:「是否启用版本管理」由 `flowMetadata.version_group_id` 自动判定(归属版本组的流程即为版本管理流),
172
+ * 宿主无需配置 `enabled` 开关;提供下方任一回调即在版本管理流中显示对应入口。
162
173
  */
163
- customOnlineApi?: (workflowId: string) => Promise<void>;
164
- /**
165
- * 自定义下线API,用于自定义MFA流程下线
166
- */
167
- customOfflineApi?: (workflowId: string) => Promise<void>;
168
- /** 连接流版本管理,仅 CLASSIC/ACM 画布支持。 */
169
174
  versionManagement?: {
170
- enabled?: boolean;
171
- canManage?: boolean;
175
+ /** 宿主提供时才显示「历史版本」入口;点击时调用,由宿主打开历史 UI。 */
176
+ onShowHistory?: () => void;
177
+ /** 宿主提供时才显示「发布并启用」入口;点击时回调传入当前画布 payload(含 meta data)。 */
178
+ onConfirmPublish?: (payload?: any) => void;
172
179
  };
173
180
  }
174
181
  export interface ToolbarButtonConfig {
@@ -276,5 +283,7 @@ export interface CanvasAPI {
276
283
  */
277
284
  once<T = any>(event: CanvasEventType, handler: CanvasEventHandler<T>): void;
278
285
  saveFlow(): Promise<import('./flowVersion').FlowDraftPayload | undefined>;
286
+ /** 刷新版本状态(版本号、发布状态等),从服务端拉取最新元数据写入 store */
287
+ refreshFlowVersionStatus(): Promise<void>;
279
288
  }
280
289
  export {};
@@ -12,24 +12,6 @@ export interface FlowDraftPayload {
12
12
  execution_control?: unknown;
13
13
  [key: string]: unknown;
14
14
  }
15
- /** 发布版本概要。 */
16
- export interface FlowVersionVO {
17
- id: string;
18
- version_group_id: string;
19
- version_no: number;
20
- version_name?: string;
21
- remark?: string;
22
- effective: boolean;
23
- publish_by?: string;
24
- publish_time?: string;
25
- }
26
- /** 版本历史分页结果。 */
27
- export interface FlowVersionPage {
28
- items: FlowVersionVO[];
29
- total: number;
30
- page: number;
31
- size: number;
32
- }
33
15
  /** 当前草稿与线上版本状态。 */
34
16
  export interface FlowVersionStatusVO {
35
17
  version_group_id: string;
@@ -39,15 +21,3 @@ export interface FlowVersionStatusVO {
39
21
  has_unpublished_changes: boolean;
40
22
  draft_version_no: 0;
41
23
  }
42
- /** 历史版本详情。 */
43
- export interface FlowVersionDetailVO {
44
- version: FlowVersionVO;
45
- flow: FlowDraftPayload;
46
- }
47
- /** 发布请求。 */
48
- export interface FlowVersionPublishRequest {
49
- flow: FlowDraftPayload;
50
- version_name?: string;
51
- remark?: string;
52
- force: boolean;
53
- }
@@ -0,0 +1,30 @@
1
+ import { Node } from '@xyflow/react';
2
+ /**
3
+ * 统一连线检查的结果码,命名对齐 portConnectionValidator 的 code 风格。
4
+ */
5
+ export type ConnectionCheckCode = 'VALID' | 'SOURCE_NODE_NOT_FOUND' | 'TARGET_NODE_NOT_FOUND' | 'SOURCE_PORT_NOT_FOUND' | 'TARGET_PORT_NOT_FOUND' | 'PROTOCOL_MISMATCH' | 'SELF_CONNECTION_NOT_ALLOWED';
6
+ export interface ConnectionCheckResult {
7
+ valid: boolean;
8
+ code: ConnectionCheckCode;
9
+ /** 中文兜底原因,便于 console 调试。 */
10
+ message: string;
11
+ }
12
+ /** 结构兼容 React Flow 的 Connection / Edge(只取定位字段)。 */
13
+ export interface ConnectionCheckConnection {
14
+ source?: string | null;
15
+ target?: string | null;
16
+ sourceHandle?: string | null;
17
+ targetHandle?: string | null;
18
+ }
19
+ /**
20
+ * 统一连线检查:手动拖线与运行时代码建边共用的入口。
21
+ *
22
+ * 范围(与手动拖线今天的实际行为一致,再叠自连规则门):
23
+ * 1. 节点存在性;
24
+ * 2. 协议一致性(大小写不敏感;双侧均无法解析协议时放行,保留旧 `?? ''` 行为);
25
+ * 3. 自连(source === target)必须命中节点声明的 auto_connect 规则。
26
+ *
27
+ * workflowConnectionValidator 的重链(edgeRules / connectable / native 校验)
28
+ * 有意不在本检查内,仍由各自的既有入口负责。
29
+ */
30
+ export declare function checkConnection(nodes: Node[], connection: ConnectionCheckConnection): ConnectionCheckResult;
@@ -3,7 +3,7 @@ import { NodeData } from '../types/Node';
3
3
  import { Edge, Node } from '@xyflow/react';
4
4
  import { CanvasLayoutSource, CanvasLayoutTarget } from '../enums/workflow';
5
5
  export declare const GRID_SIZE = 20;
6
- export declare const NODE_SIZE = 300;
6
+ export declare const NODE_SIZE = 222;
7
7
  export declare const NODE_X_SPACING: number;
8
8
  export declare const NODE_Y_SPACING: number;
9
9
  export declare const VERTICAL_NODE_SPACING: number;
@@ -37,6 +37,6 @@ export interface ExtendedNodeData extends NodeData {
37
37
  [key: string]: unknown;
38
38
  }
39
39
  export type NodeDictionary = Record<string, Node<ExtendedNodeData>>;
40
- export declare function layoutGraph(nodes: Node<any>[], edges: Edge<EdgeData>[], options?: {
40
+ export declare function layoutGraph(nodes: Node[], edges: Edge<EdgeData>[], options?: {
41
41
  includeSticky?: boolean;
42
42
  }): CanvasLayoutResult;