@digitalsee-ai/rcs 1.0.15 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/digitalsee/workflow/Canvas/NextConfigModalWrapper.d.ts +1 -1
- package/dist/components/digitalsee/workflow/Canvas/constants.d.ts +2 -1
- package/dist/components/digitalsee/workflow/Canvas/hooks/createNodeAddHandlerNext.d.ts +4 -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/NextNodeFactory.d.ts +2 -1
- package/dist/components/digitalsee/workflow/Nodes/NextNodes/NextBaseNode.d.ts +2 -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/NextNodeConfig/index.d.ts +4 -2
- package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/index.d.ts +2 -0
- package/dist/components/digitalsee/workflow/NodesConfig/submitPayload.d.ts +23 -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 +7 -5
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/dataTransformers.d.ts +2 -2
- package/dist/components/digitalsee/workflow/Panels/SimpleNodeSelectorPanel/index.d.ts +2 -1
- 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/canvas.d.ts +5 -2
- 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/index.d.ts +2 -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 +16859 -16411
- package/dist/rcs.es.js.map +1 -1
- package/dist/rcs.umd.js +59 -59
- package/dist/rcs.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -24,8 +24,9 @@ export declare const convertActionItemToNodeData: (actionItem: Partial<ActionIte
|
|
|
24
24
|
protocol?: string;
|
|
25
25
|
} & Record<string, any>) => NodeFactoryData;
|
|
26
26
|
/**
|
|
27
|
-
* NEXT
|
|
27
|
+
* NEXT 模式专用转换函数(暂废保留分支):在 convertActionItemToNodeData 基础上额外保留 name 字段
|
|
28
28
|
* name 在 NEXT 模式下作为节点实例的唯一显示名称
|
|
29
|
+
* 当前 nodepackage 节点仍走 CLASSIC 的 convertActionItemToNodeData。
|
|
29
30
|
*/
|
|
30
31
|
export declare const convertActionItemToNodeDataNext: (actionItem: Partial<ActionItem> & {
|
|
31
32
|
status?: string;
|
|
@@ -24,6 +24,7 @@ interface CreateNodeAddHandlerNextParams {
|
|
|
24
24
|
store: {
|
|
25
25
|
getState: () => {
|
|
26
26
|
nodes: Node[];
|
|
27
|
+
edges: Edge[];
|
|
27
28
|
};
|
|
28
29
|
};
|
|
29
30
|
addNodes: (nodes: Node<NodeFactoryData>[]) => void;
|
|
@@ -40,6 +41,9 @@ interface CreateNodeAddHandlerNextParams {
|
|
|
40
41
|
/**
|
|
41
42
|
* 创建 NEXT 模式的节点添加处理函数(纯函数,非 Hook)
|
|
42
43
|
*
|
|
44
|
+
* 该分支目前暂废保留;当前 AI 连接流里的 nodepackage 节点是在
|
|
45
|
+
* CLASSIC 画布中兼容渲染新版 NodeSchema,不走这里的添加逻辑。
|
|
46
|
+
*
|
|
43
47
|
* 与 Classic 模式的关键区别:
|
|
44
48
|
* 1. 端口名称完全由 DIP Schema 动态定义(通过 getCachedNextNodeSchema 获取)
|
|
45
49
|
* 2. 使用 convertActionItemToNodeDataNext 转换数据(保留 name 字段)
|
|
@@ -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,9 +1,10 @@
|
|
|
1
1
|
import { ComponentType } from 'react';
|
|
2
2
|
/**
|
|
3
|
-
* NEXT
|
|
3
|
+
* NEXT 模式专属节点工厂(暂废保留分支)
|
|
4
4
|
*
|
|
5
5
|
* 提供 NEXT 模式的 nodeTypes 映射,所有节点基于 DIP Schema 动态渲染锚点
|
|
6
6
|
* 与 classic 模式完全隔离,直接使用 DIP 端口名,无需适配层
|
|
7
|
+
* 当前 nodepackage 节点使用 Classic NodeFactory,并在配置面板兼容新版 NodeSchema。
|
|
7
8
|
*/
|
|
8
9
|
declare class NextNodeFactory {
|
|
9
10
|
static getNodeTypes(): Record<string, ComponentType<any>>;
|
|
@@ -6,10 +6,11 @@ interface NextBaseNodeProps extends NodeProps {
|
|
|
6
6
|
className?: string;
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
|
-
* NEXT
|
|
9
|
+
* NEXT 模式基础节点组件(暂废保留分支)
|
|
10
10
|
*
|
|
11
11
|
* 根据 DIP Schema 动态渲染锚点,直接使用 DIP 端口名作为 handle ID
|
|
12
12
|
* 不再需要端口适配层,实现 NEXT 模式与 classic 模式的完全隔离
|
|
13
|
+
* 当前 nodepackage 节点仍复用 Classic 节点外观,仅配置面板兼容新版 NodeSchema。
|
|
13
14
|
*/
|
|
14
15
|
declare const NextBaseNode: React.FC<NextBaseNodeProps>;
|
|
15
16
|
export default NextBaseNode;
|
|
@@ -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;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* EngineMode.NEXT 配置组件(暂废保留分支)
|
|
3
3
|
*
|
|
4
|
-
* 根据 nodeKey 获取 NodeSchema,用 DynamicForm 渲染配置表单。
|
|
4
|
+
* 根据 nodeKey 从 DIP 获取 NodeSchema,用 DynamicForm 渲染配置表单。
|
|
5
5
|
* 当 NodeSchema.credentials 非空时,显示凭据选择器。
|
|
6
|
+
* 当前日常说的“新版节点”一般指 CLASSIC 兼容渲染 NodeSchema 的 nodepackage 节点,
|
|
7
|
+
* 不走这个组件。
|
|
6
8
|
*/
|
|
7
9
|
interface NextNodeConfigProps {
|
|
8
10
|
nodeId: string;
|
package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ExecuteAction } from '../../define/actions';
|
|
2
|
+
import { NodeType } from '../../../types/Node';
|
|
2
3
|
interface IFormFieldRendererProps {
|
|
3
4
|
action: ExecuteAction & {
|
|
4
5
|
proxy_id?: string;
|
|
5
6
|
};
|
|
7
|
+
nodeType?: NodeType | string;
|
|
6
8
|
connector?: {
|
|
7
9
|
id: string;
|
|
8
10
|
deployment_type?: string;
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
/**
|
|
7
|
+
* 判断 classic 画布中的节点是否需要用新版 NodeSchema 渲染/保存。
|
|
8
|
+
*
|
|
9
|
+
* 返回 true 的含义不是 EngineMode.NEXT 节点,而是 nodepackage 节点:
|
|
10
|
+
* classic 配置面板里要启用 DynamicForm + NodeSchema 兼容链路。
|
|
11
|
+
* 判定顺序按后端数据可信度从强到弱:
|
|
12
|
+
*
|
|
13
|
+
* 1. `config_schema/properties.sub_params` 是旧节点强信号,直接走旧表单。
|
|
14
|
+
* 2. `action_id/id > 0` 是旧节点强信号;`action_id/id <= 0` 才可能是新版节点。
|
|
15
|
+
* 3. 没有 `action_key/nodeKey` 的节点不能拉新版 schema,仍走旧表单。
|
|
16
|
+
* 4. 老 Loop/If/Switch 保存后没有 `sub_params`,但会出现控制节点业务配置,
|
|
17
|
+
* 这些也必须继续走专用控制表单。
|
|
18
|
+
*/
|
|
19
|
+
export declare function isClassicNextCompatibleNode(nodeType: string | undefined, data?: AnyRecord): boolean;
|
|
20
|
+
export declare function unwrapNextCompatiblePropertiesEnvelope(value: unknown): AnyRecord;
|
|
21
|
+
export declare function getNextCompatibleSubmittedProperties(values: unknown): AnyRecord;
|
|
22
|
+
export declare function getNextCompatibleAccountId(values: unknown): any;
|
|
23
|
+
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;
|
|
@@ -23,7 +23,7 @@ export interface NodeTypeItem {
|
|
|
23
23
|
defaultExpanded?: boolean;
|
|
24
24
|
matchType?: 'CONNECTOR_ONL' | 'CONNECTOR_ONLY' | 'ACTION_ONLY' | 'BOTH_MATCHED' | 'BOTH' | string;
|
|
25
25
|
connector?: ConnectorInfo;
|
|
26
|
-
/**
|
|
26
|
+
/** 新版 NodeSchema 版本号;CLASSIC nodepackage 兼容链路也会使用 */
|
|
27
27
|
nodeVersion?: number;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
@@ -54,11 +54,11 @@ export interface ActionItem {
|
|
|
54
54
|
connector_name: string;
|
|
55
55
|
config_schema?: any;
|
|
56
56
|
node_schema?: DipNodeSchema;
|
|
57
|
-
/**
|
|
57
|
+
/** nodepackage 节点 key;CLASSIC 模式下由 action_key 映射 */
|
|
58
58
|
nodeKey?: string;
|
|
59
|
-
/**
|
|
59
|
+
/** 新版 NodeSchema 版本号;CLASSIC nodepackage 兼容链路也会使用 */
|
|
60
60
|
nodeVersion?: number;
|
|
61
|
-
/**
|
|
61
|
+
/** 节点分类;NEXT 暂废分支和 CLASSIC nodepackage 兼容链路都会传递 */
|
|
62
62
|
category?: string;
|
|
63
63
|
/** 是否为动作节点 */
|
|
64
64
|
isAction?: boolean;
|
|
@@ -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;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* 简化版节点选择面板(暂废的 DIP Next 模式专用)
|
|
4
4
|
*
|
|
5
5
|
* 仅依赖 GET /dip/api/nodes 获取全部节点列表
|
|
6
6
|
* 支持客户端搜索和按 pluginId 分组显示
|
|
7
|
+
* 当前 nodepackage 节点仍通过 Classic 的 ModernNodeSelectorPanel 获取 ACM actions。
|
|
7
8
|
*/
|
|
8
9
|
declare const SimpleNodeSelectorPanel: React.FC;
|
|
9
10
|
export default SimpleNodeSelectorPanel;
|
|
@@ -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>;
|
|
@@ -3,11 +3,14 @@
|
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* 引擎模式
|
|
6
|
+
*
|
|
7
|
+
* 当前 AI 连接流主路径是 CLASSIC。日常描述里的“新版节点”通常指
|
|
8
|
+
* CLASSIC 模式兼容渲染新版 NodeSchema 的 nodepackage 节点,不是 NEXT 模式。
|
|
6
9
|
*/
|
|
7
10
|
export declare enum EngineMode {
|
|
8
|
-
/** 经典模式,使用 ACM
|
|
11
|
+
/** 经典模式,使用 ACM 后端;同时承载 nodepackage 节点的新版 schema 兼容渲染 */
|
|
9
12
|
CLASSIC = "classic",
|
|
10
|
-
/** Next 模式,使用 DIP 后端 + DynamicForm */
|
|
13
|
+
/** Next 模式,使用 DIP 后端 + DynamicForm;当前为暂废保留分支 */
|
|
11
14
|
NEXT = "next"
|
|
12
15
|
}
|
|
13
16
|
/**
|
|
@@ -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;
|
|
@@ -90,7 +90,8 @@ export interface DigitalseeWorkFlowProps {
|
|
|
90
90
|
/**
|
|
91
91
|
* 引擎模式
|
|
92
92
|
*
|
|
93
|
-
* @description 'classic'
|
|
93
|
+
* @description 'classic' 是当前 AI 连接流主路径,使用 ACM 后端,并兼容渲染
|
|
94
|
+
* nodepackage 节点的新版 NodeSchema 配置;'next' 是暂废保留的 DIP 直连分支。
|
|
94
95
|
* @default 'classic'
|
|
95
96
|
*/
|
|
96
97
|
engineMode?: EngineMode;
|
|
@@ -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 {};
|