@digitalsee-ai/rcs 1.0.13 → 1.0.14
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/dist/components/digitalsee/workflow/Canvas/hooks/createNodeAddHandlerNext.d.ts +1 -0
- package/dist/components/digitalsee/workflow/Canvas/hooks/useNodeAddCallback.d.ts +1 -0
- package/dist/components/digitalsee/workflow/Nodes/ActionNode.d.ts +1 -1
- package/dist/components/digitalsee/workflow/Nodes/NodeFactory.d.ts +1 -1
- package/dist/components/digitalsee/workflow/Nodes/SuperBaseNode.d.ts +2 -2
- package/dist/components/digitalsee/workflow/Nodes/components/NextNodeOperations.d.ts +1 -1
- package/dist/components/digitalsee/workflow/NodesConfig/ActionNodeConfig/index.d.ts +2 -0
- package/dist/components/digitalsee/workflow/NodesConfig/submitPayload.d.ts +10 -0
- package/dist/components/digitalsee/workflow/NodesConfig/submitPayload.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/components/ActionItem.d.ts +1 -1
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useActions.d.ts +2 -0
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useCategories.d.ts +2 -2
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/types.d.ts +3 -1
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/dataTransformers.d.ts +2 -2
- package/dist/components/digitalsee/workflow/api/dip.types.d.ts +8 -4
- package/dist/components/digitalsee/workflow/api/index.d.ts +5 -1
- package/dist/components/digitalsee/workflow/enums/node.d.ts +4 -0
- package/dist/components/digitalsee/workflow/hooks/use-nodes-interaction.d.ts +1 -1
- package/dist/components/digitalsee/workflow/store/panelSlice.d.ts +20 -0
- package/dist/components/digitalsee/workflow/types/engine.d.ts +2 -0
- package/dist/components/digitalsee/workflow/utils/mcpCanvas.d.ts +33 -0
- package/dist/components/digitalsee/workflow/utils/mcpCanvas.test.d.ts +1 -0
- package/dist/rcs.css +1 -1
- package/dist/rcs.es.js +16478 -16057
- package/dist/rcs.es.js.map +1 -1
- package/dist/rcs.umd.js +57 -57
- package/dist/rcs.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { NodeData, NodeStatus } from '../types/Node';
|
|
1
2
|
import { Node, NodeProps } from '@xyflow/react';
|
|
2
3
|
import { default as React } from 'react';
|
|
3
|
-
import { NodeData, NodeStatus } from '../types/Node';
|
|
4
4
|
interface ActionNodeProps extends NodeProps<Node<NodeData>> {
|
|
5
5
|
status?: NodeStatus;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { NodeData, NodeType } from '../types/Node';
|
|
1
2
|
import { Node, XYPosition } from '@xyflow/react';
|
|
2
3
|
import { ComponentType } from 'react';
|
|
3
|
-
import { NodeData, NodeType } from '../types/Node';
|
|
4
4
|
export type { NodeData } from '../types/Node';
|
|
5
5
|
export interface BackendNodeData {
|
|
6
6
|
node_type: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Position } from '@xyflow/react';
|
|
2
|
-
import { default as React } from 'react';
|
|
3
1
|
import { HandleType } from '../types/Handle';
|
|
4
2
|
import { NodeData, NodeStatus, NodeType } from '../types/Node';
|
|
3
|
+
import { Position } from '@xyflow/react';
|
|
4
|
+
import { default as React } from 'react';
|
|
5
5
|
export interface HandleConfig {
|
|
6
6
|
id: string;
|
|
7
7
|
position: Position;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NodeType } from '../types/Node';
|
|
2
|
+
type AnyRecord = Record<string, any>;
|
|
3
|
+
export declare function isMcpGatewayNodeType(nodeType?: string | null): nodeType is NodeType;
|
|
4
|
+
export declare function getMcpGatewayActionKey(nodeType?: string | null): string;
|
|
5
|
+
export declare function isNextCompatibleNodeType(nodeType?: string | null): nodeType is NodeType;
|
|
6
|
+
export declare function isClassicNextCompatibleNode(nodeType: string | undefined, data?: AnyRecord): boolean;
|
|
7
|
+
export declare function unwrapNextCompatiblePropertiesEnvelope(value: unknown): AnyRecord;
|
|
8
|
+
export declare function getNextCompatibleSubmittedProperties(values: unknown): AnyRecord;
|
|
9
|
+
export declare function getNextCompatibleAccountId(values: unknown): any;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useCategories.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CategoryItem } from '../types';
|
|
1
|
+
import { CategoryItem, CategoryRequestType } from '../types';
|
|
2
2
|
interface UseCategoriesProps {
|
|
3
|
-
onFetchCategories: (type?:
|
|
3
|
+
onFetchCategories: (type?: CategoryRequestType) => Promise<CategoryItem[]>;
|
|
4
4
|
restrictToCategory?: string;
|
|
5
5
|
nodeSelectorVisible: boolean;
|
|
6
6
|
nodeAddInfo?: any;
|
|
@@ -119,11 +119,12 @@ export interface ApiActionItem {
|
|
|
119
119
|
/**
|
|
120
120
|
* 面板属性接口定义
|
|
121
121
|
*/
|
|
122
|
+
export type CategoryRequestType = 'trigger' | 'action' | 'tool' | 'mcp' | 'mcp_trigger' | 'model' | 'memory';
|
|
122
123
|
export interface ModernNodeSelectorProps {
|
|
123
124
|
availableCategories?: CategoryItem[];
|
|
124
125
|
initialCategory?: string;
|
|
125
126
|
onSearch?: (params?: LinkSearchParams) => Promise<NodeFetchResult>;
|
|
126
|
-
onFetchCategories?: (type?:
|
|
127
|
+
onFetchCategories?: (type?: CategoryRequestType) => Promise<CategoryItem[]>;
|
|
127
128
|
onFetchNodesByCategory?: (params?: LinkSearchParams) => Promise<NodeFetchResult>;
|
|
128
129
|
onFetchSubCategories?: (categoryId: string) => Promise<CategoryItem[]>;
|
|
129
130
|
restrictToCategory?: string;
|
|
@@ -136,6 +137,7 @@ export interface LinkSearchParams {
|
|
|
136
137
|
build_type?: string;
|
|
137
138
|
deployment_type?: string;
|
|
138
139
|
app_domain_category?: string;
|
|
140
|
+
action_type?: string;
|
|
139
141
|
page?: number;
|
|
140
142
|
size?: number;
|
|
141
143
|
type?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ActionItem, ApiActionItem, ConnectorInfo, LinkSearchParams, NodeFetchResult } from '../types';
|
|
1
|
+
import { ActionItem, ApiActionItem, CategoryRequestType, ConnectorInfo, LinkSearchParams, NodeFetchResult } from '../types';
|
|
2
2
|
export declare const transformAction: (action: ApiActionItem, connector: ConnectorInfo) => ActionItem;
|
|
3
3
|
export declare const fetchNodesByCategory: (params?: LinkSearchParams) => Promise<NodeFetchResult>;
|
|
4
|
-
export declare const fetchCategories: (type?:
|
|
4
|
+
export declare const fetchCategories: (type?: CategoryRequestType) => Promise<import('../types').CategoryItem[] | {
|
|
5
5
|
id: any;
|
|
6
6
|
name: any;
|
|
7
7
|
description: any;
|
|
@@ -300,10 +300,10 @@ export interface DipWorkflowDefinition {
|
|
|
300
300
|
* | `SELECT` | 下拉选择 | Select |
|
|
301
301
|
* | `DATETIME` | 日期时间 | DatePicker |
|
|
302
302
|
* | `OBJECT` | 嵌套对象 | 递归渲染子字段 |
|
|
303
|
-
* | `ARRAY` | 数组/列表 | 动态增减表单项 |
|
|
303
|
+
* | `ARRAY` / `DYNAMIC_ARRAY` | 数组/列表 | 动态增减表单项 |
|
|
304
304
|
* | `KEYVALUE` | 键值对列表 | Key-Value 编辑器 |
|
|
305
305
|
*/
|
|
306
|
-
export type DipFieldType = 'STRING' | 'TEXTAREA' | 'PASSWORD' | 'HIDDEN' | 'NUMBER' | 'BOOLEAN' | 'SELECT' | 'DATETIME' | 'OBJECT' | 'ARRAY' | 'KEYVALUE';
|
|
306
|
+
export type DipFieldType = 'STRING' | 'TEXTAREA' | 'PASSWORD' | 'HIDDEN' | 'NUMBER' | 'BOOLEAN' | 'SELECT' | 'DATETIME' | 'OBJECT' | 'ARRAY' | 'DYNAMIC_ARRAY' | 'KEYVALUE';
|
|
307
307
|
/**
|
|
308
308
|
* 数组元素类型
|
|
309
309
|
*
|
|
@@ -381,8 +381,12 @@ export interface DipFieldValidation {
|
|
|
381
381
|
pattern?: string;
|
|
382
382
|
/** 最小字符长度(STRING / TEXTAREA 类型) */
|
|
383
383
|
minLength?: number;
|
|
384
|
+
/** 最小字符长度(后端 snake_case 字段) */
|
|
385
|
+
min_length?: number;
|
|
384
386
|
/** 最大字符长度(STRING / TEXTAREA 类型) */
|
|
385
387
|
maxLength?: number;
|
|
388
|
+
/** 最大字符长度(后端 snake_case 字段) */
|
|
389
|
+
max_length?: number;
|
|
386
390
|
}
|
|
387
391
|
/**
|
|
388
392
|
* 字段 Schema 定义
|
|
@@ -393,7 +397,7 @@ export interface DipFieldValidation {
|
|
|
393
397
|
*
|
|
394
398
|
* 不同 {@link DipFieldType} 使用不同的可选字段:
|
|
395
399
|
* - `SELECT` → `options`
|
|
396
|
-
* - `ARRAY` → `item_type`, `item_schema`, `item_label`, `min_items`, `max_items`
|
|
400
|
+
* - `ARRAY` / `DYNAMIC_ARRAY` → `item_type`, `item_schema`, `item_label`, `min_items`, `max_items`
|
|
397
401
|
* - `OBJECT` → `properties`
|
|
398
402
|
* - `KEYVALUE` → `key_placeholder`, `value_placeholder`
|
|
399
403
|
* - `DATETIME` → `picker_mode`
|
|
@@ -419,7 +423,7 @@ export interface DipFieldSchema {
|
|
|
419
423
|
example?: string;
|
|
420
424
|
/** 下拉选项列表(仅 type 为 SELECT 时使用) */
|
|
421
425
|
options?: DipSelectOption[];
|
|
422
|
-
/** 数组元素类型(仅 type 为 ARRAY 时使用) */
|
|
426
|
+
/** 数组元素类型(仅 type 为 ARRAY / DYNAMIC_ARRAY 时使用) */
|
|
423
427
|
item_type?: DipItemType;
|
|
424
428
|
/** 数组元素为 OBJECT 时的子字段 Schema(递归定义) */
|
|
425
429
|
item_schema?: DipFieldSchema[];
|
|
@@ -82,9 +82,13 @@ export declare const apiGetActions: (params: {
|
|
|
82
82
|
linkId?: string;
|
|
83
83
|
name?: string;
|
|
84
84
|
actionType?: string;
|
|
85
|
+
action_type?: string;
|
|
85
86
|
trigger?: boolean;
|
|
86
87
|
protocol?: string;
|
|
87
|
-
|
|
88
|
+
page?: number;
|
|
89
|
+
size?: number;
|
|
90
|
+
flow_id?: string;
|
|
91
|
+
flowId?: string;
|
|
88
92
|
}) => Promise<any>;
|
|
89
93
|
export declare const apiGetActionNodeSchema: (nodeKey: string, version: number) => Promise<DipNodeSchema>;
|
|
90
94
|
export declare function apiCreateNode(data: any): Promise<unknown>;
|
|
@@ -19,6 +19,8 @@ export declare enum NodeType {
|
|
|
19
19
|
SELF_LOOP = "SelfLoopNode",
|
|
20
20
|
/** MCP服务节点 */
|
|
21
21
|
MCPServer = "MCPServerNode",
|
|
22
|
+
/** MCP网关触发节点 */
|
|
23
|
+
MCP_TRIGGER_NODE = "MCP_TRIGGER_NODE",
|
|
22
24
|
/** 内置MCP节点 */
|
|
23
25
|
BuiltinMCP = "BuiltinMCPNode",
|
|
24
26
|
/** 向量存储节点 */
|
|
@@ -31,6 +33,8 @@ export declare enum NodeType {
|
|
|
31
33
|
AI_SUB_NODE = "AISubNode",
|
|
32
34
|
/** MCP工具节点 */
|
|
33
35
|
MCP_TOOL = "MCPToolNode",
|
|
36
|
+
/** MCP网关工具列表节点 */
|
|
37
|
+
MCP_TOOLS_NODE = "MCP_TOOLS_NODE",
|
|
34
38
|
/** 多分支节点 */
|
|
35
39
|
SWITCH = "SwitchNode",
|
|
36
40
|
/** 便签节点 */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NodeMouseHandler, OnNodesChange } from '@xyflow/react';
|
|
2
1
|
import { NodeType } from '../types/Node';
|
|
2
|
+
import { NodeMouseHandler, OnNodesChange } from '@xyflow/react';
|
|
3
3
|
export declare const useNodesInteraction: () => {
|
|
4
4
|
autoSaveNum: number;
|
|
5
5
|
onNodeMouseEnter: NodeMouseHandler;
|
|
@@ -9,8 +9,12 @@ export interface NodeAddInfo {
|
|
|
9
9
|
x: number;
|
|
10
10
|
y: number;
|
|
11
11
|
};
|
|
12
|
+
edge?: any;
|
|
13
|
+
sourceNode?: any;
|
|
14
|
+
targetNode?: any;
|
|
12
15
|
trigger?: boolean;
|
|
13
16
|
protocol?: string;
|
|
17
|
+
refresh?: boolean;
|
|
14
18
|
}
|
|
15
19
|
type NodeAddCallback = ((info: NodeAddInfo, nodeType: ActionItem) => void) | null;
|
|
16
20
|
export interface PanelState {
|
|
@@ -30,8 +34,12 @@ export declare const panelSlice: import('@reduxjs/toolkit').Slice<PanelState, {
|
|
|
30
34
|
x: number;
|
|
31
35
|
y: number;
|
|
32
36
|
};
|
|
37
|
+
edge?: any;
|
|
38
|
+
sourceNode?: any;
|
|
39
|
+
targetNode?: any;
|
|
33
40
|
trigger?: boolean;
|
|
34
41
|
protocol?: string;
|
|
42
|
+
refresh?: boolean;
|
|
35
43
|
};
|
|
36
44
|
nodeAddCallback: NodeAddCallback;
|
|
37
45
|
}, action: PayloadAction<NodeAddInfo>) => void;
|
|
@@ -46,8 +54,12 @@ export declare const panelSlice: import('@reduxjs/toolkit').Slice<PanelState, {
|
|
|
46
54
|
x: number;
|
|
47
55
|
y: number;
|
|
48
56
|
};
|
|
57
|
+
edge?: any;
|
|
58
|
+
sourceNode?: any;
|
|
59
|
+
targetNode?: any;
|
|
49
60
|
trigger?: boolean;
|
|
50
61
|
protocol?: string;
|
|
62
|
+
refresh?: boolean;
|
|
51
63
|
};
|
|
52
64
|
nodeAddCallback: NodeAddCallback;
|
|
53
65
|
}) => void;
|
|
@@ -62,8 +74,12 @@ export declare const panelSlice: import('@reduxjs/toolkit').Slice<PanelState, {
|
|
|
62
74
|
x: number;
|
|
63
75
|
y: number;
|
|
64
76
|
};
|
|
77
|
+
edge?: any;
|
|
78
|
+
sourceNode?: any;
|
|
79
|
+
targetNode?: any;
|
|
65
80
|
trigger?: boolean;
|
|
66
81
|
protocol?: string;
|
|
82
|
+
refresh?: boolean;
|
|
67
83
|
};
|
|
68
84
|
nodeAddCallback: NodeAddCallback;
|
|
69
85
|
}, action: PayloadAction<NodeAddCallback>) => void;
|
|
@@ -78,8 +94,12 @@ export declare const panelSlice: import('@reduxjs/toolkit').Slice<PanelState, {
|
|
|
78
94
|
x: number;
|
|
79
95
|
y: number;
|
|
80
96
|
};
|
|
97
|
+
edge?: any;
|
|
98
|
+
sourceNode?: any;
|
|
99
|
+
targetNode?: any;
|
|
81
100
|
trigger?: boolean;
|
|
82
101
|
protocol?: string;
|
|
102
|
+
refresh?: boolean;
|
|
83
103
|
};
|
|
84
104
|
nodeAddCallback: NodeAddCallback;
|
|
85
105
|
}, action: PayloadAction<NodeTypeItem>) => void;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { HandleConnectionType } from '../types/Handle';
|
|
2
|
+
import { NodeProtocol } from '../types/NodeProtocol';
|
|
3
|
+
import { Edge, Node } from '@xyflow/react';
|
|
4
|
+
export declare const MCP_TRIGGER_CATEGORY = "MCP_TRIGGER";
|
|
5
|
+
export declare const MCP_CATEGORY_TYPE = "mcp_trigger";
|
|
6
|
+
export declare const MCP_ACTION_LINK_ID = "mcp-gateway";
|
|
7
|
+
export declare const MCP_CATALOG_PAGE_SIZE = 200;
|
|
8
|
+
export declare const MCP_ACTION_PAGE_SIZE = 10;
|
|
9
|
+
export declare const MCP_SERVER_PROTOCOL = NodeProtocol.MCP_SERVER;
|
|
10
|
+
export declare const MCP_MAX_TOOLS_PER_SERVER = 20;
|
|
11
|
+
export declare const MCP_TOOL_MAX_DOWNSTREAM = 1;
|
|
12
|
+
export declare const MCP_CANVAS_TARGET_HANDLE = "top";
|
|
13
|
+
export declare const MCP_RETURN_VARIABLE_ACTION_KEY = "dip.core.mcp.return-variable";
|
|
14
|
+
export declare const isMcpServerNode: (node?: Pick<Node, "type"> | null) => boolean;
|
|
15
|
+
export declare const isMcpToolNode: (node?: Pick<Node, "type"> | null) => boolean;
|
|
16
|
+
export declare const isMcpReturnVariableNode: (node?: (Pick<Node, "data"> & {
|
|
17
|
+
data?: Record<string, unknown>;
|
|
18
|
+
}) | null) => boolean;
|
|
19
|
+
export declare const isMcpCanvas: (nodes: Array<Pick<Node, "type">>) => boolean;
|
|
20
|
+
export declare const isMcpServerCanvas: (nodes: Array<Pick<Node, "type">>) => boolean;
|
|
21
|
+
export declare const markMcpServerCanvasNode: <T extends Node>(node: T) => T;
|
|
22
|
+
export declare const isMcpServerToolHandle: (handleId?: string | null) => handleId is HandleConnectionType.BUILTIN_MCP;
|
|
23
|
+
export declare const isMcpToolChainHandle: (handleId?: string | null) => handleId is "main" | HandleConnectionType.OUTPUT;
|
|
24
|
+
export declare const getDirectMcpToolCount: (serverId: string, nodes: Array<Pick<Node, "id" | "type">>, edges: Array<Pick<Edge, "source" | "target">>) => number;
|
|
25
|
+
export declare const canAddMoreMcpTools: (serverId: string, nodes: Array<Pick<Node, "id" | "type">>, edges: Array<Pick<Edge, "source" | "target">>) => boolean;
|
|
26
|
+
export declare const getMcpToolDownstreamCount: (toolId: string, edges: Array<Pick<Edge, "source" | "sourceHandle">>) => number;
|
|
27
|
+
export declare const canAddMcpToolDownstream: (toolId: string, edges: Array<Pick<Edge, "source" | "sourceHandle">>) => boolean;
|
|
28
|
+
export declare const isMcpServerToToolConnection: (sourceNode?: Pick<Node, "type"> | null, targetNode?: Pick<Node, "type"> | null, sourceHandle?: string | null) => boolean;
|
|
29
|
+
export declare const isMcpToolToExecutionConnection: (sourceNode?: Pick<Node, "id" | "type"> | null, targetNode?: Pick<Node, "id" | "type"> | null, sourceHandle?: string | null) => boolean;
|
|
30
|
+
export declare const getNodeTypeById: (nodes: Array<Pick<Node, "id" | "type">>, nodeId?: string | null) => string;
|
|
31
|
+
export declare const resolveMcpCanvasTargetHandle: (nodes: Array<Pick<Node, "type">>, fallback?: string | null) => string;
|
|
32
|
+
export declare const normalizeMcpCanvasEdge: <T extends Pick<Edge, "targetHandle">>(nodes: Array<Pick<Node, "type">>, edge: T) => T;
|
|
33
|
+
export declare const normalizeMcpCanvasEdges: <T extends Pick<Edge, "targetHandle">>(nodes: Array<Pick<Node, "type">>, edges: T[]) => T[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|