@digitalsee-ai/rcs 1.1.8 → 2.0.0-beta2
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.
- package/README.md +6 -38
- package/README.npm.md +37 -0
- package/dist/components/digitalsee/JsonRenderer/index.d.ts +1 -1
- package/dist/components/digitalsee/workflow/Canvas/FastOperationButtons.d.ts +5 -2
- package/dist/components/digitalsee/workflow/Canvas/FullscreenLoading.d.ts +10 -2
- package/dist/components/digitalsee/workflow/Canvas/MiniMap.d.ts +1 -1
- package/dist/components/digitalsee/workflow/Canvas/NodePlaceholder.d.ts +12 -0
- package/dist/components/digitalsee/workflow/Canvas/WorkflowCanvasHeader.d.ts +3 -6
- package/dist/components/digitalsee/workflow/Canvas/actionItemToNodeData.d.ts +1 -6
- package/dist/components/digitalsee/workflow/Canvas/constants.d.ts +6 -26
- package/dist/components/digitalsee/workflow/Canvas/hooks/{classicNodeAddConnection.d.ts → nodePackageAddConnection.d.ts} +3 -3
- package/dist/components/digitalsee/workflow/Canvas/hooks/useCanvasApi.d.ts +4 -2
- package/dist/components/digitalsee/workflow/Canvas/hooks/useDataLoading.d.ts +33 -4
- package/dist/components/digitalsee/workflow/Canvas/hooks/useNodeAddCallback.d.ts +2 -3
- package/dist/components/digitalsee/workflow/Canvas/hooks/useWorkflowCanvasState.d.ts +22 -4
- package/dist/components/digitalsee/workflow/Canvas/types.d.ts +18 -6
- package/dist/components/digitalsee/workflow/Edges/BaseEdge.d.ts +2 -0
- package/dist/components/digitalsee/workflow/Edges/EdgeFactory.d.ts +3 -8
- package/dist/components/digitalsee/workflow/Edges/edgeLayout.d.ts +73 -0
- package/dist/components/digitalsee/workflow/Handles/CustomHandle.d.ts +1 -0
- package/dist/components/digitalsee/workflow/Handles/customHandleConnectable.d.ts +19 -0
- package/dist/components/digitalsee/workflow/Nodes/DeclaredNode.d.ts +33 -0
- package/dist/components/digitalsee/workflow/Nodes/DynamicNode.d.ts +24 -0
- package/dist/components/digitalsee/workflow/Nodes/NodeFactory.d.ts +42 -4
- package/dist/components/digitalsee/workflow/Nodes/SuperBaseNode.d.ts +2 -1
- package/dist/components/digitalsee/workflow/Nodes/classicPortLayout.d.ts +51 -0
- package/dist/components/digitalsee/workflow/Nodes/components/NodeStatusBadge.d.ts +11 -0
- package/dist/components/digitalsee/workflow/Nodes/{classicNodePackagePortLayout.d.ts → nodePackagePortLayout.d.ts} +4 -4
- package/dist/components/digitalsee/workflow/Nodes/nodeTypeRegistry.d.ts +131 -0
- package/dist/components/digitalsee/workflow/Nodes/useNodePackagePorts.d.ts +35 -0
- package/dist/components/digitalsee/workflow/NodesConfig/NodePackageConfig/fieldSchemaAdapter.d.ts +14 -0
- package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/RichTagInput/help.d.ts +5 -1
- package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/index.d.ts +1 -0
- package/dist/components/digitalsee/workflow/NodesConfig/components/NodeTest.d.ts +2 -0
- package/dist/components/digitalsee/workflow/NodesConfig/components/NodeTest.helpers.d.ts +11 -0
- package/dist/components/digitalsee/workflow/NodesConfig/components/VariableModal/tree-help.d.ts +5 -12
- package/dist/components/digitalsee/workflow/NodesConfig/submitPayload.d.ts +10 -17
- package/dist/components/digitalsee/workflow/Panels/CanvasConfigDebugger.d.ts +1 -1
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/components/CategoryItem.d.ts +1 -1
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/components/CategoryTabs.d.ts +1 -1
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/components/NodeCard.d.ts +1 -1
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/components/NodeItem.d.ts +1 -1
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/components/PanelHeader.d.ts +1 -1
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useConnectableNodeSelector.d.ts +2 -5
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/types.d.ts +10 -4
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/connectableDataSource.d.ts +6 -10
- package/dist/components/digitalsee/workflow/Panels/SimpleNodeSelectorPanel/components/NodeListItem.d.ts +1 -1
- package/dist/components/digitalsee/workflow/api/dip.types.d.ts +30 -1
- package/dist/components/digitalsee/workflow/api/index.d.ts +3 -22
- package/dist/components/digitalsee/workflow/builtin/controls/ConfigSubflow/index.d.ts +2 -2
- package/dist/components/digitalsee/workflow/builtin/globalConfig/index.d.ts +5 -1
- package/dist/components/digitalsee/workflow/config/globalConfig.d.ts +1 -5
- package/dist/components/digitalsee/workflow/config/layerConfig.d.ts +14 -0
- package/dist/components/digitalsee/workflow/config/themeConfig.d.ts +19 -23
- package/dist/components/digitalsee/workflow/constants/nodePackageHandles.d.ts +10 -0
- package/dist/components/digitalsee/workflow/context/workflowTriggerContext.d.ts +22 -0
- package/dist/components/digitalsee/workflow/coverage/acceptanceManifest.d.ts +30 -0
- package/dist/components/digitalsee/workflow/coverage/runtimeCoverage.d.ts +34 -0
- package/dist/components/digitalsee/workflow/design-system/AiFlowNodeTestPanel.d.ts +24 -0
- package/dist/components/digitalsee/workflow/design-system/AiFlowVariableTree.d.ts +34 -0
- package/dist/components/digitalsee/workflow/design-system/index.d.ts +3 -0
- package/dist/components/digitalsee/workflow/design-system/tokens.d.ts +103 -0
- package/dist/components/digitalsee/workflow/enums/canvas.d.ts +0 -12
- package/dist/components/digitalsee/workflow/enums/edge.d.ts +4 -2
- package/dist/components/digitalsee/workflow/enums/node.d.ts +5 -6
- package/dist/components/digitalsee/workflow/enums/workflow.d.ts +1 -1
- package/dist/components/digitalsee/workflow/examples/global-config-example.d.ts +1 -1
- package/dist/components/digitalsee/workflow/hooks/state.hooks.d.ts +1 -7
- package/dist/components/digitalsee/workflow/hooks/use-flow-data-operation.d.ts +1 -1
- package/dist/components/digitalsee/workflow/hooks/useCanvasLayout.d.ts +1 -1
- package/dist/components/digitalsee/workflow/hooks/useCanvasMode.d.ts +8 -0
- package/dist/components/digitalsee/workflow/hooks/useHandleConnections.d.ts +9 -1
- package/dist/components/digitalsee/workflow/hooks/useVariables.d.ts +1 -0
- package/dist/components/digitalsee/workflow/hooks/useWorkflow.d.ts +1 -1
- package/dist/components/digitalsee/workflow/index.d.ts +18 -44
- package/dist/components/digitalsee/workflow/migration/umi.d.ts +1 -2
- package/dist/components/digitalsee/workflow/store/workflowSlice.d.ts +5 -2
- package/dist/components/digitalsee/workflow/types/Node.d.ts +2 -0
- package/dist/components/digitalsee/workflow/types/Workflow.d.ts +1 -1
- package/dist/components/digitalsee/workflow/types/engine.d.ts +21 -12
- package/dist/components/digitalsee/workflow/types/flowVersion.d.ts +0 -30
- package/dist/components/digitalsee/workflow/utils/connectionCheck.d.ts +30 -0
- package/dist/components/digitalsee/workflow/utils/layoutUtils.d.ts +2 -2
- package/dist/components/digitalsee/workflow/utils/mcpCanvas.d.ts +0 -40
- package/dist/components/digitalsee/workflow/utils/mode.d.ts +18 -0
- package/dist/components/digitalsee/workflow/utils/nodeAutoConnect.d.ts +24 -0
- package/dist/components/digitalsee/workflow/utils/nodeCommon.d.ts +5 -0
- package/dist/components/digitalsee/workflow/utils/nodeHandleLayout.d.ts +83 -0
- package/dist/components/digitalsee/workflow/utils/nodePackageConnection.d.ts +28 -0
- package/dist/components/digitalsee/workflow/utils/nodePackageGraphValidation.d.ts +29 -0
- package/dist/components/digitalsee/workflow/utils/nodePackageSchemaCache.d.ts +15 -0
- package/dist/components/digitalsee/workflow/utils/onNodeRemoveHook.d.ts +13 -0
- package/dist/components/digitalsee/workflow/utils/triggerNode.d.ts +13 -0
- package/dist/components/digitalsee/workflow/utils/workflowConnectionValidator.d.ts +1 -3
- package/dist/components/digitalsee/workflow/workflow.story-fixtures.d.ts +50 -0
- package/dist/components/dynamic-form/context/VariableSelectorContext.d.ts +17 -16
- package/dist/components/dynamic-form/index.d.ts +1 -1
- package/dist/index-CBoDAvhq.mjs +285 -0
- package/dist/{index-CRdKUD0G.mjs → index-zEq02rJh.mjs} +23582 -25697
- package/dist/locales/en-US/common.d.ts +29 -52
- package/dist/locales/en-US.d.ts +29 -52
- package/dist/locales/zh-CN/common.d.ts +29 -52
- package/dist/locales/zh-CN.d.ts +29 -52
- package/dist/locales/zh-TW/common.d.ts +29 -52
- package/dist/locales/zh-TW.d.ts +29 -52
- package/dist/rcs.css +1 -1
- package/dist/rcs.es.js +65 -61
- package/dist/rcs.umd.js +132 -72
- package/package.json +38 -23
- package/dist/components/digitalsee/workflow/Canvas/FlowVersionManager.d.ts +0 -16
- package/dist/components/digitalsee/workflow/Canvas/NextConfigModalWrapper.d.ts +0 -9
- package/dist/components/digitalsee/workflow/Canvas/NextWorkflowCanvas.d.ts +0 -4
- package/dist/components/digitalsee/workflow/Canvas/NextWorkflowCanvasHeader.d.ts +0 -15
- package/dist/components/digitalsee/workflow/Canvas/hooks/createNodeAddHandlerNext.d.ts +0 -38
- package/dist/components/digitalsee/workflow/NextNodesConfigModal/index.d.ts +0 -13
- package/dist/components/digitalsee/workflow/Nodes/AISubNode.d.ts +0 -9
- package/dist/components/digitalsee/workflow/Nodes/ActionNode.d.ts +0 -13
- package/dist/components/digitalsee/workflow/Nodes/AgentNode.d.ts +0 -10
- package/dist/components/digitalsee/workflow/Nodes/BrowserNode.d.ts +0 -10
- package/dist/components/digitalsee/workflow/Nodes/BuiltinMCPNode.d.ts +0 -9
- package/dist/components/digitalsee/workflow/Nodes/ConditionNode.d.ts +0 -13
- package/dist/components/digitalsee/workflow/Nodes/CustomNode.d.ts +0 -15
- package/dist/components/digitalsee/workflow/Nodes/LoopNode.d.ts +0 -4
- package/dist/components/digitalsee/workflow/Nodes/MCPServerNode.d.ts +0 -9
- package/dist/components/digitalsee/workflow/Nodes/MCPToolNode.d.ts +0 -9
- package/dist/components/digitalsee/workflow/Nodes/NextNodeFactory.d.ts +0 -12
- package/dist/components/digitalsee/workflow/Nodes/NextNodes/NextActionNode.d.ts +0 -9
- package/dist/components/digitalsee/workflow/Nodes/NextNodes/NextBaseNode.d.ts +0 -16
- package/dist/components/digitalsee/workflow/Nodes/NextNodes/NextConditionNode.d.ts +0 -10
- package/dist/components/digitalsee/workflow/Nodes/NextNodes/NextLoopNode.d.ts +0 -10
- package/dist/components/digitalsee/workflow/Nodes/NextNodes/NextSwitchNode.d.ts +0 -10
- package/dist/components/digitalsee/workflow/Nodes/NextNodes/NextTriggerNode.d.ts +0 -9
- package/dist/components/digitalsee/workflow/Nodes/SelfLoopNode.d.ts +0 -4
- package/dist/components/digitalsee/workflow/Nodes/StartNode.d.ts +0 -1
- package/dist/components/digitalsee/workflow/Nodes/SwitchNode.d.ts +0 -13
- package/dist/components/digitalsee/workflow/Nodes/TriggerNode.d.ts +0 -10
- package/dist/components/digitalsee/workflow/Nodes/components/NextNodeDescription.d.ts +0 -16
- package/dist/components/digitalsee/workflow/Nodes/components/NextNodeOperations.d.ts +0 -11
- package/dist/components/digitalsee/workflow/Nodes/useClassicNodePackagePorts.d.ts +0 -27
- package/dist/components/digitalsee/workflow/NodesConfig/NextNodeConfig/CreateCredentialModal.d.ts +0 -13
- package/dist/components/digitalsee/workflow/NodesConfig/NextNodeConfig/CredentialSelect.d.ts +0 -17
- package/dist/components/digitalsee/workflow/NodesConfig/NextNodeConfig/ModifyCredentialModal.d.ts +0 -17
- package/dist/components/digitalsee/workflow/NodesConfig/NextNodeConfig/fieldSchemaAdapter.d.ts +0 -10
- package/dist/components/digitalsee/workflow/NodesConfig/NextNodeConfig/index.d.ts +0 -17
- package/dist/components/digitalsee/workflow/NodesConfig/components/NextNodeSettings.d.ts +0 -6
- package/dist/components/digitalsee/workflow/NodesConfig/components/NextNodeTest.d.ts +0 -6
- package/dist/components/digitalsee/workflow/NodesConfig/components/NextVariableModal/index.d.ts +0 -6
- package/dist/components/digitalsee/workflow/NodesConfig/components/NextVariableModal/variable-tree-next.d.ts +0 -49
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/components/EntryTypeSelector.d.ts +0 -8
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/components/NodeCardList.d.ts +0 -20
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useNodeActionState.d.ts +0 -28
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useNodeSelectorPresentation.d.ts +0 -25
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/queryParams.d.ts +0 -18
- package/dist/components/digitalsee/workflow/constants/nextHandles.d.ts +0 -1
- package/dist/components/digitalsee/workflow/utils/classicNodePackageConnection.d.ts +0 -28
- package/dist/components/digitalsee/workflow/utils/classicNodePackageGraphValidation.d.ts +0 -29
- package/dist/components/digitalsee/workflow/utils/nextNodeSchemaCache.d.ts +0 -14
- package/dist/components/digitalsee/workflow/utils/queuedNodeConfigOpen.d.ts +0 -12
- package/dist/index-CRdKUD0G.mjs.map +0 -1
- package/dist/index-rjDBrC08.mjs +0 -312
- package/dist/index-rjDBrC08.mjs.map +0 -1
- package/dist/rcs.es.js.map +0 -1
- package/dist/rcs.umd.js.map +0 -1
- /package/dist/components/digitalsee/workflow/NodesConfig/{NextNodeConfig → NodePackageConfig}/WorkflowNodeSchemaFieldProvider.d.ts +0 -0
- /package/dist/components/digitalsee/workflow/NodesConfig/{NextNodeConfig → NodePackageConfig}/fields/WorkflowCodeField.d.ts +0 -0
- /package/dist/components/digitalsee/workflow/NodesConfig/{NextNodeConfig → NodePackageConfig}/fields/WorkflowProxyField.d.ts +0 -0
- /package/dist/components/digitalsee/workflow/NodesConfig/{NextNodeConfig → NodePackageConfig}/proxyField.d.ts +0 -0
- /package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/{next-compatible.d.ts → nodePackage-compatible.d.ts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DipNodeSchema } from '../../api/dip';
|
|
2
1
|
import { NodeType } from '../../types/Node';
|
|
2
|
+
import { NodeProtocol } from '../../types/NodeProtocol';
|
|
3
3
|
/**
|
|
4
4
|
* 节点类型定义
|
|
5
5
|
*/
|
|
@@ -50,7 +50,7 @@ export interface ActionItem {
|
|
|
50
50
|
/** 后端返回稳定标识时才允许创建节点。 */
|
|
51
51
|
selectable?: boolean;
|
|
52
52
|
identifierSource?: string;
|
|
53
|
-
type: NodeType;
|
|
53
|
+
type: NodeType | string;
|
|
54
54
|
action_type: NodeType;
|
|
55
55
|
action_key?: string;
|
|
56
56
|
action_ver?: number;
|
|
@@ -61,8 +61,13 @@ export interface ActionItem {
|
|
|
61
61
|
nodeIcon?: string;
|
|
62
62
|
action_name: string;
|
|
63
63
|
connector_name: string;
|
|
64
|
+
/** 持久化连接器(FlowNodeDto.connectorId);经典节点渲染配置面板用。 */
|
|
65
|
+
connector_id?: string | number | null;
|
|
66
|
+
/** 节点协议,经典渲染依赖(如 ProxyGroupSelect / WEBHOOK)。 */
|
|
67
|
+
protocol?: string;
|
|
68
|
+
/** 连接器部署类型(如 SaasApp / PrivateApp),经典代理渲染使用。 */
|
|
69
|
+
deployment_type?: string;
|
|
64
70
|
config_schema?: any;
|
|
65
|
-
node_schema?: DipNodeSchema;
|
|
66
71
|
/** nodepackage 节点 key;CLASSIC 模式下由 action_key 映射 */
|
|
67
72
|
nodeKey?: string;
|
|
68
73
|
/** 新版 NodeSchema 版本号;CLASSIC nodepackage 兼容链路也会使用 */
|
|
@@ -71,6 +76,7 @@ export interface ActionItem {
|
|
|
71
76
|
category?: string;
|
|
72
77
|
/** 是否为动作节点 */
|
|
73
78
|
isAction?: boolean;
|
|
79
|
+
saveType?: string;
|
|
74
80
|
}
|
|
75
81
|
/**
|
|
76
82
|
* 连接器信息
|
|
@@ -125,7 +131,6 @@ export interface ApiActionItem {
|
|
|
125
131
|
status: number;
|
|
126
132
|
protocol: string;
|
|
127
133
|
config_schema: any;
|
|
128
|
-
node_schema?: DipNodeSchema;
|
|
129
134
|
sample_output: any;
|
|
130
135
|
node_struct: string;
|
|
131
136
|
action_type: string | null;
|
|
@@ -143,6 +148,7 @@ export interface ModernNodeSelectorProps {
|
|
|
143
148
|
onFetchNodesByCategory?: (params?: LinkSearchParams) => Promise<NodeFetchResult>;
|
|
144
149
|
onFetchSubCategories?: (categoryId: string) => Promise<CategoryItem[]>;
|
|
145
150
|
restrictToCategory?: string;
|
|
151
|
+
mode?: NodeProtocol;
|
|
146
152
|
}
|
|
147
153
|
/**
|
|
148
154
|
* 节点/动作搜索参数
|
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
import { EntryMode } from '../components/EntryTypeSelector';
|
|
2
|
-
import { NodeAddInfo } from '../../../types/NodeAddContext';
|
|
3
1
|
interface ConnectableDataSourceInput {
|
|
4
2
|
enabled: boolean;
|
|
5
3
|
hasContext: boolean;
|
|
6
|
-
entryMode: EntryMode;
|
|
7
4
|
protocol?: string | null;
|
|
8
5
|
}
|
|
9
|
-
/** 将初始化入口选择转换为实际查询上下文;MCP Server 仍属于触发节点。 */
|
|
10
|
-
export declare function resolveNodeSelectorEntryContext(nodeAddInfo: NodeAddInfo | null | undefined, entryMode: EntryMode): NodeAddInfo | null | undefined;
|
|
11
6
|
/**
|
|
12
|
-
* MCP Server
|
|
13
|
-
* 其余带 protocol 的专项入口(如 AI_LANGUAGE_MODEL)仍沿用旧接口。
|
|
7
|
+
* 无 protocol 或携带 BUILTIN_MCP(MCP Server / MCP Tool 画布)入口允许走 connectable 接口;
|
|
8
|
+
* 其余带 protocol 的专项入口(如 AI_LANGUAGE_MODEL、MCP_SERVER)仍沿用旧接口。
|
|
9
|
+
* 与 `Canvas/hooks/nodePackageAddConnection.ts` 的 `canUseConnectablePorts` 语义一致。
|
|
14
10
|
*/
|
|
15
|
-
export declare function shouldUseConnectableDataSource({ enabled, hasContext,
|
|
11
|
+
export declare function shouldUseConnectableDataSource({ enabled, hasContext, protocol, }: ConnectableDataSourceInput): boolean;
|
|
16
12
|
/**
|
|
17
|
-
*
|
|
13
|
+
* BUILTIN_MCP 旧端口与 MCP Server 画布统一走 mcp 场景;其它入口沿用宿主配置的 scene。
|
|
18
14
|
*/
|
|
19
|
-
export declare function resolveConnectableRequestScene(configuredScene: string,
|
|
15
|
+
export declare function resolveConnectableRequestScene(configuredScene: string, protocol?: string | null, isMcpServerCanvas?: boolean): string;
|
|
20
16
|
export {};
|
|
@@ -92,6 +92,8 @@ export interface DipNodeInstance {
|
|
|
92
92
|
nodeKey: string;
|
|
93
93
|
/** 节点 Schema 版本号,用于匹配对应版本的 {@link DipNodeSchema} */
|
|
94
94
|
nodeVersion: number;
|
|
95
|
+
/** 节点的 schema 版本标识(如 `"key@ver"`),NodePackage 节点可选 */
|
|
96
|
+
version?: string;
|
|
95
97
|
/** 节点在画布上的坐标位置 */
|
|
96
98
|
position: DipPosition;
|
|
97
99
|
/**
|
|
@@ -451,7 +453,15 @@ export interface DipFieldSchema {
|
|
|
451
453
|
value_placeholder?: string;
|
|
452
454
|
/** 日期选择器模式(仅 type 为 DATETIME 时使用) */
|
|
453
455
|
picker_mode?: DipPickerMode;
|
|
454
|
-
/**
|
|
456
|
+
/**
|
|
457
|
+
* 条件显示规则(后端 DisplayCondition)
|
|
458
|
+
*
|
|
459
|
+
* 与 {@link visible_when} 语义相同,但结构更简洁:`{ field, operator, value }`。
|
|
460
|
+
* 前端适配器会将其转换为 DynamicForm 的 `visibleWhen`。
|
|
461
|
+
* 若同时存在 `visible_when`,优先使用 `visible_when`。
|
|
462
|
+
*/
|
|
463
|
+
display_condition?: DipDisplayCondition;
|
|
464
|
+
/** 条件显示规则,满足条件时字段才可见(DynamicForm VisibleWhen 格式) */
|
|
455
465
|
visible_when?: VisibleWhen;
|
|
456
466
|
/** 文本/表达式输入策略(后端 snake_case 字段) */
|
|
457
467
|
value_mode_policy?: DipValueModePolicy;
|
|
@@ -505,6 +515,14 @@ export interface DipPortSchema {
|
|
|
505
515
|
deniedTargetNodeKeys?: string[];
|
|
506
516
|
/** ACM SNAKE_CASE 传输字段 */
|
|
507
517
|
denied_target_node_keys?: string[];
|
|
518
|
+
/**
|
|
519
|
+
* 端口在节点边框上的渲染位置,对齐 ReactFlow `Position` 枚举字符串值。
|
|
520
|
+
*
|
|
521
|
+
* 缺省时由前端 `ACTION_KEY_HANDLE_LAYOUT` 兜底,再缺省为 Left/Right。
|
|
522
|
+
* 仅影响视觉布局,不参与连线协议匹配。
|
|
523
|
+
*/
|
|
524
|
+
position?: 'left' | 'top' | 'right' | 'bottom';
|
|
525
|
+
protocol: string;
|
|
508
526
|
}
|
|
509
527
|
/**
|
|
510
528
|
* 节点输出字段 Schema
|
|
@@ -557,6 +575,15 @@ export interface DipNodeSchema {
|
|
|
557
575
|
inputs?: DipPortSchema[];
|
|
558
576
|
/** 输出端口列表,默认为单个 "main" 端口 */
|
|
559
577
|
outputs?: DipPortSchema[];
|
|
578
|
+
/**
|
|
579
|
+
* 节点自身端口间的自动连线声明(添加节点后创建,如循环类节点的自环边)。
|
|
580
|
+
*
|
|
581
|
+
* 前端按 source/target 端口名解析并做协议校验;缺省不自动连线。
|
|
582
|
+
*/
|
|
583
|
+
auto_connections?: Array<{
|
|
584
|
+
source: string;
|
|
585
|
+
target: string;
|
|
586
|
+
}>;
|
|
560
587
|
/** 输入字段 Schema 列表,定义节点的配置表单 */
|
|
561
588
|
input_fields?: DipFieldSchema[];
|
|
562
589
|
/** 输出字段 Schema 列表,描述节点执行后的输出数据结构 */
|
|
@@ -565,6 +592,8 @@ export interface DipNodeSchema {
|
|
|
565
592
|
sample?: Record<string, unknown>;
|
|
566
593
|
/** 节点所需的凭据声明列表 */
|
|
567
594
|
credentials?: DipCredentialRequirement[];
|
|
595
|
+
/** 是不是 Trigger 节点 */
|
|
596
|
+
is_trigger?: boolean | null;
|
|
568
597
|
}
|
|
569
598
|
/**
|
|
570
599
|
* 凭据认证类型
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { QueryConnectableNodePackageDto } from './connectable.types';
|
|
2
2
|
import { DipNodeSchema } from './dip.types';
|
|
3
3
|
import { LinkSearchParams, LinkSearchResponse } from '../Panels/ModernNodeSelectorPanel/types';
|
|
4
|
-
import {
|
|
4
|
+
import { FlowVersionStatusVO } from '../types/flowVersion';
|
|
5
5
|
import { AxiosRequestConfig } from 'axios';
|
|
6
6
|
export type { ConnectableNodePackageQueryBase, ConnectablePersistedNodeId, IndependentConnectableNodePackageQuery, QueryConnectableNodePackageDto, QueryConnectableNodePackageRequestBody, SourceConnectableNodePackageQuery, TargetConnectableNodePackageQuery, } from './connectable.types';
|
|
7
7
|
export interface WorkflowRequestOptions {
|
|
@@ -64,20 +64,14 @@ export interface WorkflowApiEndpoints {
|
|
|
64
64
|
templateTagRelation: string;
|
|
65
65
|
getAppList: string;
|
|
66
66
|
subFlowList: string;
|
|
67
|
-
flowVersionPublish: string;
|
|
68
|
-
flowVersionList: string;
|
|
69
|
-
flowVersionDetail: string;
|
|
70
|
-
flowVersionRollback: string;
|
|
71
|
-
flowVersionLoadDraft: string;
|
|
72
67
|
flowVersionStatus: string;
|
|
73
68
|
}
|
|
74
69
|
export interface WorkflowApiConfig {
|
|
75
70
|
endpoints: WorkflowApiEndpoints;
|
|
71
|
+
/** 请求客户端:认证(token 等)与地址(baseUrl 等)完全由 httpClient 全权负责 */
|
|
76
72
|
httpClient: WorkflowHttpClient;
|
|
77
|
-
baseUrl?: string;
|
|
78
|
-
token?: string;
|
|
79
73
|
}
|
|
80
|
-
export type WorkflowApiConfigUpdate = Partial<Pick<WorkflowApiConfig, 'httpClient'
|
|
74
|
+
export type WorkflowApiConfigUpdate = Partial<Pick<WorkflowApiConfig, 'httpClient'>> & {
|
|
81
75
|
endpoints?: Partial<WorkflowApiEndpoints>;
|
|
82
76
|
};
|
|
83
77
|
export declare const configureWorkflowApi: (config: WorkflowApiConfigUpdate) => void;
|
|
@@ -209,19 +203,6 @@ export declare function apiRemoveEdges(flowId: string, edges: string[]): Promise
|
|
|
209
203
|
export declare function apiGetSelectOptions(type: string): Promise<unknown>;
|
|
210
204
|
export declare function updateFlowOpStatus(paramsId: any, opStatus: any): Promise<unknown>;
|
|
211
205
|
export declare function onlineFlow(id: any): Promise<unknown>;
|
|
212
|
-
/** 发布当前草稿为新的生效版本。 */
|
|
213
|
-
export declare function apiPublishFlowVersion(flowId: string, data: FlowVersionPublishRequest): Promise<FlowVersionVO>;
|
|
214
|
-
/** 查询发布版本历史。 */
|
|
215
|
-
export declare function apiGetFlowVersions(flowId: string, params?: {
|
|
216
|
-
page: number;
|
|
217
|
-
size: number;
|
|
218
|
-
}): Promise<FlowVersionPage>;
|
|
219
|
-
/** 查询历史版本详情。 */
|
|
220
|
-
export declare function apiGetFlowVersionDetail(flowId: string, versionFlowId: string): Promise<FlowVersionDetailVO>;
|
|
221
|
-
/** 将线上生效版本切换到指定历史版本。 */
|
|
222
|
-
export declare function apiRollbackFlowVersion(flowId: string, versionFlowId: string): Promise<FlowVersionVO>;
|
|
223
|
-
/** 使用指定历史版本覆盖唯一草稿。 */
|
|
224
|
-
export declare function apiLoadFlowVersionAsDraft(flowId: string, versionFlowId: string): Promise<FlowDraftPayload>;
|
|
225
206
|
/** 查询草稿与线上生效版本的关系。 */
|
|
226
207
|
export declare function apiGetFlowVersionStatus(flowId: string): Promise<FlowVersionStatusVO>;
|
|
227
208
|
export declare const apiGetAccountInstanceV2: (linkId?: string | null, actionAccountSchemaId?: string | number) => Promise<unknown>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { ConfigSubflowProps, ConfigSubflowRef } from './types';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
3
|
/**
|
|
4
4
|
* ConfigSubflow 子流程配置组件
|
|
5
5
|
* @description 支持选择子流程并配置参数的表单控件
|
|
6
6
|
*/
|
|
7
7
|
declare const ConfigSubflow: React.ForwardRefExoticComponent<ConfigSubflowProps & React.RefAttributes<ConfigSubflowRef>>;
|
|
8
8
|
export default ConfigSubflow;
|
|
9
|
+
export type { ConfigSubflowError, ConfigSubflowProps, ConfigSubflowRef, ConfigSubflowValue, ParamConfigItem, SubFlowInfo, } from './types';
|
|
9
10
|
export { ConfigSubflow };
|
|
10
|
-
export type { ConfigSubflowProps, ConfigSubflowRef, ConfigSubflowValue, ConfigSubflowError, SubFlowInfo, ParamConfigItem, } from './types';
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
export
|
|
1
|
+
export interface GlobalConfigRef {
|
|
2
|
+
open: () => void;
|
|
3
|
+
close: () => void;
|
|
4
|
+
}
|
|
5
|
+
export declare const GlobalConfig: import('react').ForwardRefExoticComponent<Omit<any, "ref"> & import('react').RefAttributes<GlobalConfigRef>>;
|
|
@@ -3,8 +3,6 @@ import { HistoryNavigator, HttpClient } from '../types/engine';
|
|
|
3
3
|
interface GlobalWorkflowConfig {
|
|
4
4
|
httpClient?: HttpClient | WorkflowHttpClient;
|
|
5
5
|
history?: HistoryNavigator;
|
|
6
|
-
baseUrl?: string;
|
|
7
|
-
token?: string;
|
|
8
6
|
}
|
|
9
7
|
/**
|
|
10
8
|
* 配置工作流全局设置
|
|
@@ -15,11 +13,9 @@ interface GlobalWorkflowConfig {
|
|
|
15
13
|
* import axios from 'axios';
|
|
16
14
|
* import { useHistory } from 'react-router-dom';
|
|
17
15
|
*
|
|
18
|
-
* //
|
|
16
|
+
* // 在应用启动时配置一次;认证(token)与地址(baseUrl)由 httpClient 全权负责
|
|
19
17
|
* configureWorkflow({
|
|
20
18
|
* httpClient: axios.create({ baseURL: 'https://api.example.com' }),
|
|
21
|
-
* baseUrl: 'https://api.example.com',
|
|
22
|
-
* token: 'your-token'
|
|
23
19
|
* });
|
|
24
20
|
* ```
|
|
25
21
|
*/
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI FLOW 浮层层级契约。
|
|
3
|
+
*
|
|
4
|
+
* Ant Design 的全局消息层默认高于 2000,因此业务浮层全部控制在 1400 以内:
|
|
5
|
+
* - 普通画布弹层沿用 Ant Design 默认层级;
|
|
6
|
+
* - 节点配置内的二级账号弹窗使用 nestedModal;
|
|
7
|
+
* - 二级弹窗中的 Select/Tooltip 使用 nestedPopover;
|
|
8
|
+
* - 在线 IDE 是画布内最高的全屏工作区,但仍低于全局消息层。
|
|
9
|
+
*/
|
|
10
|
+
export declare const WORKFLOW_LAYERS: {
|
|
11
|
+
readonly nestedModal: 1200;
|
|
12
|
+
readonly nestedPopover: 1250;
|
|
13
|
+
readonly fullscreenWorkspace: 1400;
|
|
14
|
+
};
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import { NodeType } from '../types/Node';
|
|
2
|
-
import {
|
|
2
|
+
import { ThemeConfig } from 'antd';
|
|
3
|
+
/**
|
|
4
|
+
* AI FLOW 组件级 Ant Design 主题。
|
|
5
|
+
*
|
|
6
|
+
* ⚠️ 此文件派生自 design-system/tokens.ts 中的 aiFlowTokens(权威源)。
|
|
7
|
+
* 任何颜色、圆角、阴影的修改必须同步更新以下三个文件:
|
|
8
|
+
* 1. design-system/tokens.ts — 权威 TS 常量
|
|
9
|
+
* 2. config/themeConfig.ts — Ant Design ThemeConfig(本文件)
|
|
10
|
+
* 3. styles/design-system.less — CSS 自定义属性 & Less 变量
|
|
11
|
+
*
|
|
12
|
+
* 画布、配置区、弹层和 DynamicForm 共用同一套语义色、圆角与控件高度,
|
|
13
|
+
* 避免宿主应用主题或 DynamicForm 默认主题造成局部样式漂移。
|
|
14
|
+
*/
|
|
15
|
+
export declare const aiFlowAntdTheme: ThemeConfig;
|
|
3
16
|
export declare const nodeTypeColors: {
|
|
4
17
|
default: string;
|
|
5
18
|
selected: string;
|
|
@@ -13,8 +26,6 @@ export declare const nodeTypeColors: {
|
|
|
13
26
|
RUNNABLE: string;
|
|
14
27
|
aiProtocol: string;
|
|
15
28
|
};
|
|
16
|
-
export declare const aiProtocolTypes: NodeProtocol[];
|
|
17
|
-
export declare const AI_TOOL_NODE_TYPES: NodeType[];
|
|
18
29
|
export declare const edgeStyles: {
|
|
19
30
|
default: {
|
|
20
31
|
stroke: string;
|
|
@@ -29,7 +40,7 @@ export declare const edgeStyles: {
|
|
|
29
40
|
stroke: string;
|
|
30
41
|
fill: string;
|
|
31
42
|
};
|
|
32
|
-
|
|
43
|
+
vertical: {
|
|
33
44
|
stroke: string;
|
|
34
45
|
strokeWidth: number;
|
|
35
46
|
fill: string;
|
|
@@ -42,16 +53,6 @@ export declare const edgeStyles: {
|
|
|
42
53
|
fill: string;
|
|
43
54
|
};
|
|
44
55
|
};
|
|
45
|
-
export declare const arrowStyles: {
|
|
46
|
-
default: {
|
|
47
|
-
color: string;
|
|
48
|
-
size: number;
|
|
49
|
-
};
|
|
50
|
-
aiProtocol: {
|
|
51
|
-
color: string;
|
|
52
|
-
size: number;
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
56
|
export declare const handleStyles: {
|
|
56
57
|
default: {
|
|
57
58
|
color: string;
|
|
@@ -145,26 +146,21 @@ export declare const edgeButtonStyles: {
|
|
|
145
146
|
border: string;
|
|
146
147
|
cursor: string;
|
|
147
148
|
padding: string;
|
|
148
|
-
borderRadius: string;
|
|
149
149
|
display: string;
|
|
150
150
|
alignItems: string;
|
|
151
151
|
justifyContent: string;
|
|
152
152
|
backgroundColor: string;
|
|
153
|
-
boxShadow: string;
|
|
154
|
-
};
|
|
155
|
-
add: {
|
|
156
|
-
color: string;
|
|
157
|
-
fontSize: string;
|
|
158
|
-
};
|
|
159
|
-
delete: {
|
|
160
|
-
color: string;
|
|
161
153
|
fontSize: string;
|
|
162
154
|
};
|
|
155
|
+
add: {};
|
|
156
|
+
delete: {};
|
|
163
157
|
};
|
|
164
158
|
export declare const canvasGeometry: {
|
|
165
159
|
EDGE_PADDING_BOTTOM: number;
|
|
166
160
|
EDGE_BORDER_RADIUS: number;
|
|
167
161
|
HANDLE_SIZE: number;
|
|
162
|
+
SELF_LOOP_EXIT_OFFSET: number;
|
|
163
|
+
SELF_LOOP_DEPTH: number;
|
|
168
164
|
};
|
|
169
165
|
export declare const connectionRules: {
|
|
170
166
|
undeletableEdgeTargetTypes: NodeType[];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 当前画布 Trigger 节点派生信息。
|
|
3
|
+
*
|
|
4
|
+
* 由 useWorkflowCanvasState 在 onNodesChange / 初始化 setNodes 时被动维护。
|
|
5
|
+
* 一个画布只有一个 trigger 节点,记录它即可推导 hasTriggerNode 与
|
|
6
|
+
* isMcpServerCanvas,避免各组件在渲染期全量扫描节点。
|
|
7
|
+
*/
|
|
8
|
+
export interface WorkflowTriggerInfo {
|
|
9
|
+
hasTriggerNode: boolean;
|
|
10
|
+
isMcpServerCanvas: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 向画布子树(Header / 节点选择面板等)提供 trigger 信息。
|
|
14
|
+
*/
|
|
15
|
+
export declare const WorkflowTriggerProvider: React.FC<{
|
|
16
|
+
value: WorkflowTriggerInfo;
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* 读取画布 trigger 信息;在 Provider 外使用时返回安全默认值。
|
|
21
|
+
*/
|
|
22
|
+
export declare const useWorkflowTrigger: () => WorkflowTriggerInfo;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { DynamicFormField } from '../../../dynamic-form/types/form-schema';
|
|
2
|
+
import { DynamicFormFields, NodeStatus, NodeType } from '../enums/node';
|
|
3
|
+
export declare const AI_FLOW_ACCEPTANCE_MANIFEST_VERSION = "1.0.0";
|
|
4
|
+
export declare const AI_FLOW_ACCEPTANCE_COVERAGE_VERSION = "2026.07.23-local";
|
|
5
|
+
export type AcceptanceSurface = {
|
|
6
|
+
id: string;
|
|
7
|
+
title: string;
|
|
8
|
+
source: string[];
|
|
9
|
+
uxEntry: string;
|
|
10
|
+
storyId: string;
|
|
11
|
+
tests: string[];
|
|
12
|
+
states: string[];
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* 当前本地验收口径的源码功能分母。
|
|
16
|
+
*
|
|
17
|
+
* 数量来自实际运行时枚举与 DynamicForm 注册类型,不以文档手写数量代替。
|
|
18
|
+
*/
|
|
19
|
+
export declare const AI_FLOW_SOURCE_DENOMINATORS: {
|
|
20
|
+
readonly runtimeNodes: NodeType[];
|
|
21
|
+
readonly nodeStatuses: NodeStatus[];
|
|
22
|
+
readonly classicFields: DynamicFormFields[];
|
|
23
|
+
readonly nodeSchemaFields: DynamicFormField[];
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* 源码功能、UX 入口、Story 与自动化证据的版本化对应关系。
|
|
27
|
+
*
|
|
28
|
+
* 每一项至少提供一个真实本地页面入口、一个 Storybook 入口和一组测试证据。
|
|
29
|
+
*/
|
|
30
|
+
export declare const AI_FLOW_ACCEPTANCE_SURFACES: AcceptanceSurface[];
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export type CoverageGroup = {
|
|
2
|
+
key: string;
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
items: string[];
|
|
6
|
+
source: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const AI_FLOW_COVERAGE_GROUPS: CoverageGroup[];
|
|
9
|
+
export declare const AI_FLOW_EXPECTED_COUNTS: {
|
|
10
|
+
readonly nodes: number;
|
|
11
|
+
readonly statuses: number;
|
|
12
|
+
readonly nodeSchemaFields: number;
|
|
13
|
+
readonly registeredNodeSchemaFields: number;
|
|
14
|
+
readonly classicFields: number;
|
|
15
|
+
};
|
|
16
|
+
export declare const AI_FLOW_COMPONENT_AREAS: readonly [{
|
|
17
|
+
readonly name: "画布骨架";
|
|
18
|
+
readonly components: readonly ["顶部栏", "保存/上线", "网格背景", "缩放控制", "MiniMap", "快速操作", "加载与错误态"];
|
|
19
|
+
}, {
|
|
20
|
+
readonly name: "节点与连线";
|
|
21
|
+
readonly components: readonly ["18 种节点注册", "9 种状态", "主端口", "AI 子端口", "分支端口", "连线操作"];
|
|
22
|
+
}, {
|
|
23
|
+
readonly name: "节点选择";
|
|
24
|
+
readonly components: readonly ["搜索", "分类筛选", "连接器卡片", "动作展开", "空态", "加载态"];
|
|
25
|
+
}, {
|
|
26
|
+
readonly name: "配置工作区";
|
|
27
|
+
readonly components: readonly ["变量树", "参数配置", "设置/错误处理", "节点测试", "账号与凭据", "在线 IDE", "执行管控", "模板设置"];
|
|
28
|
+
}, {
|
|
29
|
+
readonly name: "配置字段";
|
|
30
|
+
readonly components: readonly ["32 种 NodeSchema 字段", "19 种 Classic 字段", "条件显示", "校验", "动态选项", "变量插入"];
|
|
31
|
+
}, {
|
|
32
|
+
readonly name: "运行与调试";
|
|
33
|
+
readonly components: readonly ["节点测试", "忽略调试", "结果查看", "全流程检查", "调试面板", "成功/失败反馈"];
|
|
34
|
+
}];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type AiFlowNodeTestStatus = 'waiting' | 'running' | 'success' | 'failure' | 'ignored' | 'disabled';
|
|
3
|
+
export interface AiFlowNodeTestPanelProps {
|
|
4
|
+
status: AiFlowNodeTestStatus;
|
|
5
|
+
result?: string;
|
|
6
|
+
progress?: number;
|
|
7
|
+
runningAction?: 'run' | 'ignore';
|
|
8
|
+
showAlert?: boolean;
|
|
9
|
+
canEdit?: boolean;
|
|
10
|
+
disabledReason?: string;
|
|
11
|
+
editing?: boolean;
|
|
12
|
+
editableValue?: string;
|
|
13
|
+
onEditableValueChange?: (value: string) => void;
|
|
14
|
+
onRun?: () => void;
|
|
15
|
+
onIgnore?: () => void;
|
|
16
|
+
onReset?: () => void;
|
|
17
|
+
onToggleEdit?: () => void;
|
|
18
|
+
onDismissAlert?: () => void;
|
|
19
|
+
className?: string;
|
|
20
|
+
onClose: () => void;
|
|
21
|
+
onExpandPanel?: (expanded: boolean) => void;
|
|
22
|
+
}
|
|
23
|
+
declare const AiFlowNodeTestPanel: React.FC<AiFlowNodeTestPanelProps>;
|
|
24
|
+
export default AiFlowNodeTestPanel;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type AiFlowVariableType = 'ARRAY' | 'BOOLEAN' | 'NULL' | 'NUMBER' | 'OBJECT' | 'STRING';
|
|
3
|
+
export type AiFlowVariableNode = {
|
|
4
|
+
key: string;
|
|
5
|
+
name: string;
|
|
6
|
+
label: string;
|
|
7
|
+
type: AiFlowVariableType;
|
|
8
|
+
path: string[];
|
|
9
|
+
value?: string;
|
|
10
|
+
multiValued?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
root?: boolean;
|
|
13
|
+
iconUrl?: string;
|
|
14
|
+
children?: AiFlowVariableNode[];
|
|
15
|
+
};
|
|
16
|
+
export type AiFlowVariableSection = {
|
|
17
|
+
key: string;
|
|
18
|
+
label: string;
|
|
19
|
+
source: 'global' | 'node';
|
|
20
|
+
nodes: AiFlowVariableNode[];
|
|
21
|
+
};
|
|
22
|
+
export interface AiFlowVariableTreeProps {
|
|
23
|
+
sections: AiFlowVariableSection[];
|
|
24
|
+
state?: 'ready' | 'loading' | 'error';
|
|
25
|
+
errorMessage?: string;
|
|
26
|
+
selectedKey?: string;
|
|
27
|
+
searchable?: boolean;
|
|
28
|
+
defaultExpandAll?: boolean;
|
|
29
|
+
onSelect?: (node: AiFlowVariableNode) => void;
|
|
30
|
+
onRetry?: () => void;
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
declare const AiFlowVariableTree: React.FC<AiFlowVariableTreeProps>;
|
|
34
|
+
export default AiFlowVariableTree;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { type AiFlowNodeTestPanelProps, type AiFlowNodeTestStatus, default as AiFlowNodeTestPanel, } from './AiFlowNodeTestPanel';
|
|
2
|
+
export { type AiFlowVariableNode, type AiFlowVariableSection, type AiFlowVariableTreeProps, type AiFlowVariableType, default as AiFlowVariableTree, } from './AiFlowVariableTree';
|
|
3
|
+
export { AI_FLOW_DESIGN_SYSTEM_VERSION, type AiFlowTokens, aiFlowCssVariables, aiFlowTokens, } from './tokens';
|
|
@@ -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
|
*/
|