@digitalsee-ai/rcs 1.1.0 → 1.1.1
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/actionItemToNodeData.d.ts +14 -0
- package/dist/components/digitalsee/workflow/Canvas/constants.d.ts +1 -15
- package/dist/components/digitalsee/workflow/Canvas/constants.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/Canvas/hooks/classicNodeAddConnection.d.ts +31 -0
- package/dist/components/digitalsee/workflow/Canvas/hooks/classicNodeAddConnection.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/Canvas/hooks/createNodeAddHandlerNext.d.ts +1 -16
- package/dist/components/digitalsee/workflow/Canvas/hooks/useNodeAddCallback.d.ts +4 -17
- package/dist/components/digitalsee/workflow/Canvas/hooks/useWorkflowCanvasState.d.ts +3 -1
- package/dist/components/digitalsee/workflow/Handles/CustomHandle.d.ts +3 -0
- package/dist/components/digitalsee/workflow/Handles/customHandleConnectable.d.ts +35 -0
- package/dist/components/digitalsee/workflow/Handles/customHandleConnectable.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/Nodes/ConditionNode.d.ts +1 -1
- package/dist/components/digitalsee/workflow/Nodes/SuperBaseNode.d.ts +6 -1
- package/dist/components/digitalsee/workflow/Nodes/SwitchNode.d.ts +1 -1
- package/dist/components/digitalsee/workflow/Nodes/classicNodePackageNodes.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/Nodes/classicNodePackagePortLayout.d.ts +23 -0
- package/dist/components/digitalsee/workflow/Nodes/classicNodePackagePortLayout.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/Nodes/useClassicNodePackagePorts.d.ts +26 -0
- package/dist/components/digitalsee/workflow/Nodes/useClassicNodePackagePorts.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/components/EntryTypeSelector.d.ts +8 -0
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/components/NodeCardList.d.ts +19 -0
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useCategories.d.ts +5 -2
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useConnectableNodeSelector.d.ts +40 -0
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useNavigation.d.ts +4 -2
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useNavigation.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useNodeActionState.d.ts +30 -0
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useNodeSelectorPresentation.d.ts +24 -0
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/types.d.ts +19 -1
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/connectableActionLoader.d.ts +16 -0
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/connectableActionLoader.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/connectableFallback.d.ts +2 -0
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/connectableFallback.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/connectableQuery.d.ts +40 -0
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/connectableQuery.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/connectableResponse.d.ts +35 -0
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/connectableResponse.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/dataTransformers.d.ts +13 -2
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/filterEdgeInsertActions.d.ts +62 -0
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/filterEdgeInsertActions.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/nodeAddContext.d.ts +26 -0
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/nodeAddContext.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/queryParams.d.ts +18 -0
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/queryParams.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/api/connectable.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/api/connectable.types.d.ts +75 -0
- package/dist/components/digitalsee/workflow/api/dip.types.d.ts +30 -0
- package/dist/components/digitalsee/workflow/api/index.d.ts +6 -1
- package/dist/components/digitalsee/workflow/config/defaultCanvasEngineConfig.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/config/defaultNodeSelectorConfig.d.ts +9 -0
- package/dist/components/digitalsee/workflow/events/eventBus.d.ts +2 -12
- package/dist/components/digitalsee/workflow/hooks/usePanel.d.ts +3 -17
- package/dist/components/digitalsee/workflow/store/panelSlice.d.ts +118 -41
- package/dist/components/digitalsee/workflow/types/Node.d.ts +1 -1
- package/dist/components/digitalsee/workflow/types/NodeAddContext.d.ts +31 -0
- package/dist/components/digitalsee/workflow/types/engine.d.ts +15 -0
- package/dist/components/digitalsee/workflow/utils/classicNodeActionIdentity.d.ts +7 -0
- package/dist/components/digitalsee/workflow/utils/classicNodeActionIdentity.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/utils/classicNodePackageConnection.d.ts +28 -0
- package/dist/components/digitalsee/workflow/utils/classicNodePackageConnection.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/utils/classicNodePackageGraphValidation.d.ts +29 -0
- package/dist/components/digitalsee/workflow/utils/classicNodePackageGraphValidation.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/utils/compatiblePortSelection.d.ts +79 -0
- package/dist/components/digitalsee/workflow/utils/compatiblePortSelection.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/utils/nextNodeSchemaCache.d.ts +8 -0
- package/dist/components/digitalsee/workflow/utils/nodeDataFormatter.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/utils/portConnectionValidationMessages.d.ts +48 -0
- package/dist/components/digitalsee/workflow/utils/portConnectionValidationMessages.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/utils/portConnectionValidator.d.ts +66 -0
- package/dist/components/digitalsee/workflow/utils/portConnectionValidator.test.d.ts +1 -0
- package/dist/components/digitalsee/workflow/utils/workflowConnectionValidator.d.ts +20 -0
- package/dist/components/digitalsee/workflow/utils/workflowConnectionValidator.test.d.ts +1 -0
- package/dist/locales/en-US/link/flow.d.ts +22 -0
- package/dist/locales/en-US.d.ts +22 -0
- package/dist/locales/zh-CN/link/flow.d.ts +22 -0
- package/dist/locales/zh-CN.d.ts +22 -0
- package/dist/locales/zh-TW/link/flow.d.ts +22 -0
- package/dist/locales/zh-TW.d.ts +22 -0
- package/dist/rcs.css +1 -1
- package/dist/rcs.es.js +19150 -17210
- 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
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ApiActionItem, ConnectorInfo } from '../types';
|
|
2
|
+
export interface NormalizedConnectableCategory {
|
|
3
|
+
/** 面板稳定 key;有 categoryId 时与 categoryId 一致。 */
|
|
4
|
+
id: string;
|
|
5
|
+
/** 后端分类筛选参数;缺失时该分类只能展示,不能用于过滤。 */
|
|
6
|
+
categoryId?: string | number;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
icon?: string;
|
|
10
|
+
searchAction: boolean;
|
|
11
|
+
filterable: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface NormalizedConnectableConnector extends ConnectorInfo {
|
|
14
|
+
selectable: boolean;
|
|
15
|
+
identifierSource?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface NormalizedConnectableAction extends ApiActionItem {
|
|
18
|
+
selectable: boolean;
|
|
19
|
+
identifierSource?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface NormalizedConnectablePluginItem {
|
|
22
|
+
connector: NormalizedConnectableConnector;
|
|
23
|
+
matched_actions: NormalizedConnectableAction[];
|
|
24
|
+
default_expanded: boolean;
|
|
25
|
+
match_type?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface NormalizedConnectablePluginPage {
|
|
28
|
+
items: NormalizedConnectablePluginItem[];
|
|
29
|
+
total: number;
|
|
30
|
+
size: number;
|
|
31
|
+
page: number;
|
|
32
|
+
pages: number;
|
|
33
|
+
}
|
|
34
|
+
export declare const normalizeConnectableCategories: (response: unknown) => NormalizedConnectableCategory[];
|
|
35
|
+
export declare const normalizeConnectablePluginPage: (response: unknown) => NormalizedConnectablePluginPage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,18 @@
|
|
|
1
|
-
import { ActionItem, ApiActionItem, CategoryRequestType, ConnectorInfo, LinkSearchParams, NodeFetchResult } from '../types';
|
|
1
|
+
import { ActionItem, ApiActionItem, CategoryItem, CategoryRequestType, ConnectorInfo, LinkSearchParams, NodeFetchResult } from '../types';
|
|
2
|
+
import { QueryConnectableNodePackageDto } from '../../../api/connectable.types';
|
|
2
3
|
export declare const transformAction: (action: ApiActionItem, connector: ConnectorInfo) => ActionItem;
|
|
4
|
+
/**
|
|
5
|
+
* 将 connectable 分类响应转换成现有面板模型。
|
|
6
|
+
*/
|
|
7
|
+
export declare const transformConnectableCategoriesResponse: (response: unknown) => CategoryItem[];
|
|
8
|
+
/**
|
|
9
|
+
* 将 connectable 节点包分页响应转换成现有面板模型。
|
|
10
|
+
*/
|
|
11
|
+
export declare const transformConnectablePluginResponse: (response: unknown) => NodeFetchResult;
|
|
12
|
+
export declare const fetchConnectableCategories: (query: QueryConnectableNodePackageDto) => Promise<CategoryItem[]>;
|
|
13
|
+
export declare const fetchConnectableNodes: (query: QueryConnectableNodePackageDto) => Promise<NodeFetchResult>;
|
|
3
14
|
export declare const fetchNodesByCategory: (params?: LinkSearchParams) => Promise<NodeFetchResult>;
|
|
4
|
-
export declare const fetchCategories: (type?: CategoryRequestType) => Promise<
|
|
15
|
+
export declare const fetchCategories: (type?: CategoryRequestType) => Promise<CategoryItem[] | {
|
|
5
16
|
id: any;
|
|
6
17
|
name: any;
|
|
7
18
|
description: any;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { DipNodeSchema } from '../../../api/dip';
|
|
2
|
+
import { ActionItem, NodeFetchResult } from '../types';
|
|
3
|
+
import { PortConnectionEdge, PortConnectionNode } from '../../../utils/portConnectionValidator';
|
|
4
|
+
import { Edge, Node } from '@xyflow/react';
|
|
5
|
+
type SourceSchema = Pick<DipNodeSchema, 'outputs'>;
|
|
6
|
+
type TargetSchema = Pick<DipNodeSchema, 'inputs'>;
|
|
7
|
+
/** 边中插入候选动作执行双侧本地校验所需的稳定上下文。 */
|
|
8
|
+
export interface EdgeInsertActionFilterContext {
|
|
9
|
+
sourceNode: PortConnectionNode;
|
|
10
|
+
targetNode: PortConnectionNode;
|
|
11
|
+
sourceSchema: SourceSchema;
|
|
12
|
+
targetSchema: TargetSchema;
|
|
13
|
+
sourceHandle: string;
|
|
14
|
+
targetHandle: string;
|
|
15
|
+
edges?: readonly PortConnectionEdge[];
|
|
16
|
+
replacedEdgeId?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface EdgeInsertActionFilterStats {
|
|
19
|
+
contextReady: boolean;
|
|
20
|
+
serverActionCount: number;
|
|
21
|
+
compatibleActionCount: number;
|
|
22
|
+
filteredActionCount: number;
|
|
23
|
+
sourceCompatibleActionCount: number;
|
|
24
|
+
targetCompatibleActionCount: number;
|
|
25
|
+
missingActionSchemaCount: number;
|
|
26
|
+
}
|
|
27
|
+
export interface EdgeInsertActionFilterResult {
|
|
28
|
+
actions: ActionItem[];
|
|
29
|
+
stats: EdgeInsertActionFilterStats;
|
|
30
|
+
}
|
|
31
|
+
export interface EdgeInsertEndpointContext {
|
|
32
|
+
sourceId: string | number;
|
|
33
|
+
targetId: string | number;
|
|
34
|
+
sourceHandle: string;
|
|
35
|
+
targetHandle: string;
|
|
36
|
+
}
|
|
37
|
+
export type EdgeInsertActionFilterContextResolutionCode = 'READY' | 'SOURCE_NODE_NOT_FOUND' | 'TARGET_NODE_NOT_FOUND' | 'SOURCE_SCHEMA_NOT_READY' | 'TARGET_SCHEMA_NOT_READY';
|
|
38
|
+
export interface EdgeInsertActionFilterContextResolution {
|
|
39
|
+
code: EdgeInsertActionFilterContextResolutionCode;
|
|
40
|
+
context: EdgeInsertActionFilterContext | null;
|
|
41
|
+
}
|
|
42
|
+
export interface ResolveEdgeInsertActionFilterContextInput {
|
|
43
|
+
edgeContext: EdgeInsertEndpointContext;
|
|
44
|
+
nodes: readonly Node[];
|
|
45
|
+
edges: readonly Edge[];
|
|
46
|
+
replacedEdgeId?: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* 对边中插入动作执行 source→candidate 与 candidate→target 的本地求交。
|
|
50
|
+
*
|
|
51
|
+
* 后端明确禁止同时携带 source/target 端点,因此 target 侧使用动作响应中的完整
|
|
52
|
+
* NodeSchema 在前端二次过滤。
|
|
53
|
+
*/
|
|
54
|
+
export declare function filterEdgeInsertActions(actions: readonly ActionItem[], context: EdgeInsertActionFilterContext | null): EdgeInsertActionFilterResult;
|
|
55
|
+
/** 从当前 ReactFlow 快照解析候选过滤所需的原边两端。 */
|
|
56
|
+
export declare function resolveEdgeInsertActionFilterContext({ edgeContext, nodes, edges, replacedEdgeId, }: ResolveEdgeInsertActionFilterContextInput): EdgeInsertActionFilterContextResolution;
|
|
57
|
+
/** 对 connectable 连接器分页中的所有 matchedActions 执行双侧求交并汇总统计。 */
|
|
58
|
+
export declare function filterEdgeInsertNodePage(page: NodeFetchResult, context: EdgeInsertActionFilterContext | null): {
|
|
59
|
+
page: NodeFetchResult;
|
|
60
|
+
stats: EdgeInsertActionFilterStats;
|
|
61
|
+
};
|
|
62
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/nodeAddContext.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ConnectableQueryContext } from './connectableQuery';
|
|
2
|
+
interface EdgeInsertInfo {
|
|
3
|
+
source?: string | number;
|
|
4
|
+
target?: string | number;
|
|
5
|
+
sourceHandle?: string | null;
|
|
6
|
+
sourceHandleId?: string | null;
|
|
7
|
+
targetHandle?: string | null;
|
|
8
|
+
targetHandleId?: string | null;
|
|
9
|
+
}
|
|
10
|
+
export interface NodeAddContextInput {
|
|
11
|
+
sourceNodeId?: string;
|
|
12
|
+
sourceHandle?: string;
|
|
13
|
+
targetNodeId?: string;
|
|
14
|
+
targetHandle?: string;
|
|
15
|
+
edge?: EdgeInsertInfo | null;
|
|
16
|
+
position?: {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
};
|
|
20
|
+
trigger?: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 将画布面板上下文收敛为 connectable 查询的四种前端模式。
|
|
24
|
+
*/
|
|
25
|
+
export declare const resolveConnectableQueryContext: (info: NodeAddContextInput | null | undefined) => ConnectableQueryContext | null;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/queryParams.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { NodeProtocol } from '../../../types/NodeProtocol';
|
|
2
|
+
interface CanvasContextNode {
|
|
3
|
+
data?: {
|
|
4
|
+
__isMcpServerCanvas?: unknown;
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
interface ResolveNodeSelectorProtocolParams {
|
|
8
|
+
protocol?: string;
|
|
9
|
+
sourceNode?: CanvasContextNode | null;
|
|
10
|
+
targetNode?: CanvasContextNode | null;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Resolve the protocol used by node-catalog requests without changing the
|
|
14
|
+
* selector's entry mode. MCP execution-node selectors have no entry protocol,
|
|
15
|
+
* so they fall back to the canvas marker carried by their source/target node.
|
|
16
|
+
*/
|
|
17
|
+
export declare const resolveNodeSelectorProtocol: ({ protocol, sourceNode, targetNode, }: ResolveNodeSelectorProtocolParams) => NodeProtocol.AI_LANGUAGE_MODEL | NodeProtocol.AI_MEMORY | NodeProtocol.MCP | NodeProtocol.MCP_SERVER;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ACM 的 Long ID 在 JSON 响应中序列化为字符串,19 位雪花 ID 不能转成 JS number。
|
|
3
|
+
* 请求侧保留字符串可避免精度损失;Jackson 可将纯数字字符串反序列化为 Long。
|
|
4
|
+
*/
|
|
5
|
+
export type ConnectablePersistedNodeId = string | number;
|
|
6
|
+
/**
|
|
7
|
+
* 可连线节点包查询的公共筛选条件。
|
|
8
|
+
*
|
|
9
|
+
* `mode` 是前端判别字段,API 方法发送请求前会将它移除。
|
|
10
|
+
*/
|
|
11
|
+
export interface ConnectableNodePackageQueryBase {
|
|
12
|
+
scene: string;
|
|
13
|
+
trigger: boolean;
|
|
14
|
+
categoryId?: ConnectablePersistedNodeId;
|
|
15
|
+
linkId?: string;
|
|
16
|
+
keyword?: string;
|
|
17
|
+
page?: number;
|
|
18
|
+
size?: number;
|
|
19
|
+
}
|
|
20
|
+
export interface IndependentConnectableNodePackageQuery extends ConnectableNodePackageQueryBase {
|
|
21
|
+
mode: 'independent';
|
|
22
|
+
sourceId?: never;
|
|
23
|
+
sourceHandle?: never;
|
|
24
|
+
targetId?: never;
|
|
25
|
+
targetHandle?: never;
|
|
26
|
+
}
|
|
27
|
+
export interface SourceConnectableNodePackageQuery extends ConnectableNodePackageQueryBase {
|
|
28
|
+
mode: 'source';
|
|
29
|
+
sourceId: ConnectablePersistedNodeId;
|
|
30
|
+
sourceHandle: string;
|
|
31
|
+
targetId?: never;
|
|
32
|
+
targetHandle?: never;
|
|
33
|
+
}
|
|
34
|
+
export interface TargetConnectableNodePackageQuery extends ConnectableNodePackageQueryBase {
|
|
35
|
+
mode: 'target';
|
|
36
|
+
targetId: ConnectablePersistedNodeId;
|
|
37
|
+
targetHandle: string;
|
|
38
|
+
sourceId?: never;
|
|
39
|
+
sourceHandle?: never;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* 前端使用的强类型 QueryConnectableNodePackageDto。
|
|
43
|
+
*
|
|
44
|
+
* 判别联合在编译期排除 source/target 半组参数以及两组参数同时出现的情况。
|
|
45
|
+
*/
|
|
46
|
+
export type QueryConnectableNodePackageDto = IndependentConnectableNodePackageQuery | SourceConnectableNodePackageQuery | TargetConnectableNodePackageQuery;
|
|
47
|
+
interface ConnectableNodePackageRequestBase {
|
|
48
|
+
scene: string;
|
|
49
|
+
trigger: boolean;
|
|
50
|
+
category_id?: ConnectablePersistedNodeId;
|
|
51
|
+
link_id?: string;
|
|
52
|
+
keyword?: string;
|
|
53
|
+
page?: number;
|
|
54
|
+
size?: number;
|
|
55
|
+
}
|
|
56
|
+
/** 实际发送给 ACM SNAKE_CASE ObjectMapper 的 wire DTO。 */
|
|
57
|
+
export type QueryConnectableNodePackageRequestBody = (ConnectableNodePackageRequestBase & {
|
|
58
|
+
source_id?: never;
|
|
59
|
+
source_handle?: never;
|
|
60
|
+
target_id?: never;
|
|
61
|
+
target_handle?: never;
|
|
62
|
+
}) | (ConnectableNodePackageRequestBase & {
|
|
63
|
+
source_id: ConnectablePersistedNodeId;
|
|
64
|
+
source_handle: string;
|
|
65
|
+
target_id?: never;
|
|
66
|
+
target_handle?: never;
|
|
67
|
+
}) | (ConnectableNodePackageRequestBase & {
|
|
68
|
+
target_id: ConnectablePersistedNodeId;
|
|
69
|
+
target_handle: string;
|
|
70
|
+
source_id?: never;
|
|
71
|
+
source_handle?: never;
|
|
72
|
+
});
|
|
73
|
+
/** 移除只在前端使用的判别字段,避免污染后端请求体。 */
|
|
74
|
+
export declare const toConnectableNodePackageRequestBody: (query: QueryConnectableNodePackageDto) => QueryConnectableNodePackageRequestBody;
|
|
75
|
+
export {};
|
|
@@ -465,6 +465,36 @@ export interface DipPortSchema {
|
|
|
465
465
|
name: string;
|
|
466
466
|
/** UI 显示名称,如 "输入"、"True 分支"、"默认输出" */
|
|
467
467
|
displayName?: string;
|
|
468
|
+
/** ACM SNAKE_CASE 传输字段;消费前由 normalizePortSchema 归一化 */
|
|
469
|
+
display_name?: string;
|
|
470
|
+
/**
|
|
471
|
+
* 端口连接能力类型,缺失或空字符串时按 `main` 处理。
|
|
472
|
+
*
|
|
473
|
+
* 常见值:`main`、`trigger`、`control`、`ai_model`、`ai_tool`、`ai_memory`。
|
|
474
|
+
*/
|
|
475
|
+
type?: string;
|
|
476
|
+
/** 输入端口是否必须存在至少一条连线 */
|
|
477
|
+
required?: boolean;
|
|
478
|
+
/** 端口允许的最大连线数,`null` 或缺失表示不限制 */
|
|
479
|
+
maxConnections?: number | null;
|
|
480
|
+
/** ACM SNAKE_CASE 传输字段 */
|
|
481
|
+
max_connections?: number | null;
|
|
482
|
+
/** 输入端口允许连接的源节点 schema key 白名单,空列表表示不限制 */
|
|
483
|
+
allowedSourceNodeKeys?: string[];
|
|
484
|
+
/** ACM SNAKE_CASE 传输字段 */
|
|
485
|
+
allowed_source_node_keys?: string[];
|
|
486
|
+
/** 输出端口允许连接的目标节点 schema key 白名单,空列表表示不限制 */
|
|
487
|
+
allowedTargetNodeKeys?: string[];
|
|
488
|
+
/** ACM SNAKE_CASE 传输字段 */
|
|
489
|
+
allowed_target_node_keys?: string[];
|
|
490
|
+
/** 输入端口禁止连接的源节点 schema key 黑名单 */
|
|
491
|
+
deniedSourceNodeKeys?: string[];
|
|
492
|
+
/** ACM SNAKE_CASE 传输字段 */
|
|
493
|
+
denied_source_node_keys?: string[];
|
|
494
|
+
/** 输出端口禁止连接的目标节点 schema key 黑名单 */
|
|
495
|
+
deniedTargetNodeKeys?: string[];
|
|
496
|
+
/** ACM SNAKE_CASE 传输字段 */
|
|
497
|
+
denied_target_node_keys?: string[];
|
|
468
498
|
}
|
|
469
499
|
/**
|
|
470
500
|
* 节点输出字段 Schema
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { QueryConnectableNodePackageDto } from './connectable.types';
|
|
1
2
|
import { DipNodeSchema } from './dip.types';
|
|
2
3
|
import { LinkSearchParams, LinkSearchResponse } from '../Panels/ModernNodeSelectorPanel/types';
|
|
3
4
|
import { AxiosRequestConfig } from 'axios';
|
|
5
|
+
export type { ConnectableNodePackageQueryBase, ConnectablePersistedNodeId, IndependentConnectableNodePackageQuery, QueryConnectableNodePackageDto, QueryConnectableNodePackageRequestBody, SourceConnectableNodePackageQuery, TargetConnectableNodePackageQuery, } from './connectable.types';
|
|
4
6
|
export interface WorkflowRequestOptions {
|
|
5
7
|
method?: AxiosRequestConfig['method'];
|
|
6
8
|
headers?: Record<string, string>;
|
|
@@ -13,6 +15,8 @@ export interface WorkflowApiEndpoints {
|
|
|
13
15
|
nodeCategory: string;
|
|
14
16
|
nodesList: string;
|
|
15
17
|
searchLinks: string;
|
|
18
|
+
connectableNodePackageCategories: string;
|
|
19
|
+
connectableNodePackagePlugins: string;
|
|
16
20
|
actions: string;
|
|
17
21
|
actionNodeSchema: string;
|
|
18
22
|
createNode: string;
|
|
@@ -78,6 +82,8 @@ export declare function apiGetNodesList(params: {
|
|
|
78
82
|
name?: string;
|
|
79
83
|
}): Promise<unknown>;
|
|
80
84
|
export declare function apiSearchLinks(params: LinkSearchParams): Promise<LinkSearchResponse>;
|
|
85
|
+
export declare function apiQueryConnectableNodePackageCategories(query: QueryConnectableNodePackageDto): Promise<unknown>;
|
|
86
|
+
export declare function apiQueryConnectableNodePackagePlugins(query: QueryConnectableNodePackageDto): Promise<unknown>;
|
|
81
87
|
export declare const apiGetActions: (params: {
|
|
82
88
|
linkId?: string;
|
|
83
89
|
name?: string;
|
|
@@ -199,4 +205,3 @@ export declare function onlineFlow(id: any): Promise<unknown>;
|
|
|
199
205
|
export declare const apiGetAccountInstanceV2: (linkId?: string | null, actionAccountSchemaId?: string | number) => Promise<unknown>;
|
|
200
206
|
export declare const getAppList: (params: any, formData?: any) => Promise<unknown>;
|
|
201
207
|
export declare const fetchSubFlowList: (name: any, formData?: any) => Promise<unknown>;
|
|
202
|
-
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
import { NodeTypeItem } from '../Panels/ModernNodeSelectorPanel/types';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
sourceHandle?: string;
|
|
5
|
-
targetNodeId?: string;
|
|
6
|
-
targetHandle?: string;
|
|
7
|
-
position: {
|
|
8
|
-
x: number;
|
|
9
|
-
y: number;
|
|
10
|
-
};
|
|
11
|
-
trigger?: boolean;
|
|
12
|
-
edge?: any;
|
|
13
|
-
}
|
|
2
|
+
import { NodeAddInfo } from '../types/NodeAddContext';
|
|
3
|
+
export type { NodeAddInfo } from '../types/NodeAddContext';
|
|
14
4
|
export type NodeAddEvent = {
|
|
15
5
|
info: NodeAddInfo;
|
|
16
6
|
nodeType: NodeTypeItem;
|
|
@@ -1,23 +1,9 @@
|
|
|
1
1
|
import { ActionItem } from '../Panels/ModernNodeSelectorPanel/types';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
sourceHandle?: string;
|
|
5
|
-
targetNodeId?: string;
|
|
6
|
-
targetHandle?: string;
|
|
7
|
-
position?: {
|
|
8
|
-
x: number;
|
|
9
|
-
y: number;
|
|
10
|
-
};
|
|
11
|
-
edge?: any;
|
|
12
|
-
sourceNode?: any;
|
|
13
|
-
targetNode?: any;
|
|
14
|
-
trigger?: boolean;
|
|
15
|
-
protocol?: string;
|
|
16
|
-
refresh?: boolean;
|
|
17
|
-
}
|
|
2
|
+
import { NodeAddInfo } from '../types/NodeAddContext';
|
|
3
|
+
export type { NodeAddInfo } from '../types/NodeAddContext';
|
|
18
4
|
export declare function usePanel(): {
|
|
19
5
|
nodeSelectorVisible: boolean;
|
|
20
|
-
nodeAddInfo:
|
|
6
|
+
nodeAddInfo: NodeAddInfo;
|
|
21
7
|
openNodeSelector: (info: NodeAddInfo) => void;
|
|
22
8
|
closeNodeSelector: () => void;
|
|
23
9
|
handleNodeSelect: (nodeType: ActionItem) => void;
|
|
@@ -1,21 +1,6 @@
|
|
|
1
1
|
import { PayloadAction } from '@reduxjs/toolkit';
|
|
2
2
|
import { ActionItem, NodeTypeItem } from '../Panels/ModernNodeSelectorPanel/types';
|
|
3
|
-
|
|
4
|
-
sourceNodeId: string;
|
|
5
|
-
sourceHandle: string;
|
|
6
|
-
targetNodeId?: string;
|
|
7
|
-
targetHandle?: string;
|
|
8
|
-
position: {
|
|
9
|
-
x: number;
|
|
10
|
-
y: number;
|
|
11
|
-
};
|
|
12
|
-
edge?: any;
|
|
13
|
-
sourceNode?: any;
|
|
14
|
-
targetNode?: any;
|
|
15
|
-
trigger?: boolean;
|
|
16
|
-
protocol?: string;
|
|
17
|
-
refresh?: boolean;
|
|
18
|
-
}
|
|
3
|
+
import { NodeAddInfo } from '../types/NodeAddContext';
|
|
19
4
|
type NodeAddCallback = ((info: NodeAddInfo, nodeType: ActionItem) => void) | null;
|
|
20
5
|
export interface PanelState {
|
|
21
6
|
nodeSelectorVisible: boolean;
|
|
@@ -26,17 +11,40 @@ export declare const panelSlice: import('@reduxjs/toolkit').Slice<PanelState, {
|
|
|
26
11
|
openNodeSelector: (state: {
|
|
27
12
|
nodeSelectorVisible: boolean;
|
|
28
13
|
nodeAddInfo: {
|
|
29
|
-
sourceNodeId
|
|
30
|
-
sourceHandle
|
|
14
|
+
sourceNodeId?: string;
|
|
15
|
+
sourceHandle?: string;
|
|
31
16
|
targetNodeId?: string;
|
|
32
17
|
targetHandle?: string;
|
|
33
|
-
position
|
|
18
|
+
position?: {
|
|
34
19
|
x: number;
|
|
35
20
|
y: number;
|
|
36
21
|
};
|
|
37
|
-
edge?:
|
|
38
|
-
|
|
39
|
-
|
|
22
|
+
edge?: {
|
|
23
|
+
id: string;
|
|
24
|
+
source: string;
|
|
25
|
+
target: string;
|
|
26
|
+
sourceHandle?: string | null;
|
|
27
|
+
sourceHandleId?: string | null;
|
|
28
|
+
targetHandle?: string | null;
|
|
29
|
+
targetHandleId?: string | null;
|
|
30
|
+
data?: {
|
|
31
|
+
[x: string]: unknown;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
sourceNode?: {
|
|
35
|
+
data: {
|
|
36
|
+
[x: string]: unknown;
|
|
37
|
+
};
|
|
38
|
+
id: string;
|
|
39
|
+
type?: string;
|
|
40
|
+
};
|
|
41
|
+
targetNode?: {
|
|
42
|
+
data: {
|
|
43
|
+
[x: string]: unknown;
|
|
44
|
+
};
|
|
45
|
+
id: string;
|
|
46
|
+
type?: string;
|
|
47
|
+
};
|
|
40
48
|
trigger?: boolean;
|
|
41
49
|
protocol?: string;
|
|
42
50
|
refresh?: boolean;
|
|
@@ -46,17 +54,40 @@ export declare const panelSlice: import('@reduxjs/toolkit').Slice<PanelState, {
|
|
|
46
54
|
closeNodeSelector: (state: {
|
|
47
55
|
nodeSelectorVisible: boolean;
|
|
48
56
|
nodeAddInfo: {
|
|
49
|
-
sourceNodeId
|
|
50
|
-
sourceHandle
|
|
57
|
+
sourceNodeId?: string;
|
|
58
|
+
sourceHandle?: string;
|
|
51
59
|
targetNodeId?: string;
|
|
52
60
|
targetHandle?: string;
|
|
53
|
-
position
|
|
61
|
+
position?: {
|
|
54
62
|
x: number;
|
|
55
63
|
y: number;
|
|
56
64
|
};
|
|
57
|
-
edge?:
|
|
58
|
-
|
|
59
|
-
|
|
65
|
+
edge?: {
|
|
66
|
+
id: string;
|
|
67
|
+
source: string;
|
|
68
|
+
target: string;
|
|
69
|
+
sourceHandle?: string | null;
|
|
70
|
+
sourceHandleId?: string | null;
|
|
71
|
+
targetHandle?: string | null;
|
|
72
|
+
targetHandleId?: string | null;
|
|
73
|
+
data?: {
|
|
74
|
+
[x: string]: unknown;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
sourceNode?: {
|
|
78
|
+
data: {
|
|
79
|
+
[x: string]: unknown;
|
|
80
|
+
};
|
|
81
|
+
id: string;
|
|
82
|
+
type?: string;
|
|
83
|
+
};
|
|
84
|
+
targetNode?: {
|
|
85
|
+
data: {
|
|
86
|
+
[x: string]: unknown;
|
|
87
|
+
};
|
|
88
|
+
id: string;
|
|
89
|
+
type?: string;
|
|
90
|
+
};
|
|
60
91
|
trigger?: boolean;
|
|
61
92
|
protocol?: string;
|
|
62
93
|
refresh?: boolean;
|
|
@@ -66,17 +97,40 @@ export declare const panelSlice: import('@reduxjs/toolkit').Slice<PanelState, {
|
|
|
66
97
|
setNodeAddCallback: (state: {
|
|
67
98
|
nodeSelectorVisible: boolean;
|
|
68
99
|
nodeAddInfo: {
|
|
69
|
-
sourceNodeId
|
|
70
|
-
sourceHandle
|
|
100
|
+
sourceNodeId?: string;
|
|
101
|
+
sourceHandle?: string;
|
|
71
102
|
targetNodeId?: string;
|
|
72
103
|
targetHandle?: string;
|
|
73
|
-
position
|
|
104
|
+
position?: {
|
|
74
105
|
x: number;
|
|
75
106
|
y: number;
|
|
76
107
|
};
|
|
77
|
-
edge?:
|
|
78
|
-
|
|
79
|
-
|
|
108
|
+
edge?: {
|
|
109
|
+
id: string;
|
|
110
|
+
source: string;
|
|
111
|
+
target: string;
|
|
112
|
+
sourceHandle?: string | null;
|
|
113
|
+
sourceHandleId?: string | null;
|
|
114
|
+
targetHandle?: string | null;
|
|
115
|
+
targetHandleId?: string | null;
|
|
116
|
+
data?: {
|
|
117
|
+
[x: string]: unknown;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
sourceNode?: {
|
|
121
|
+
data: {
|
|
122
|
+
[x: string]: unknown;
|
|
123
|
+
};
|
|
124
|
+
id: string;
|
|
125
|
+
type?: string;
|
|
126
|
+
};
|
|
127
|
+
targetNode?: {
|
|
128
|
+
data: {
|
|
129
|
+
[x: string]: unknown;
|
|
130
|
+
};
|
|
131
|
+
id: string;
|
|
132
|
+
type?: string;
|
|
133
|
+
};
|
|
80
134
|
trigger?: boolean;
|
|
81
135
|
protocol?: string;
|
|
82
136
|
refresh?: boolean;
|
|
@@ -86,17 +140,40 @@ export declare const panelSlice: import('@reduxjs/toolkit').Slice<PanelState, {
|
|
|
86
140
|
executeNodeAddCallback: (state: {
|
|
87
141
|
nodeSelectorVisible: boolean;
|
|
88
142
|
nodeAddInfo: {
|
|
89
|
-
sourceNodeId
|
|
90
|
-
sourceHandle
|
|
143
|
+
sourceNodeId?: string;
|
|
144
|
+
sourceHandle?: string;
|
|
91
145
|
targetNodeId?: string;
|
|
92
146
|
targetHandle?: string;
|
|
93
|
-
position
|
|
147
|
+
position?: {
|
|
94
148
|
x: number;
|
|
95
149
|
y: number;
|
|
96
150
|
};
|
|
97
|
-
edge?:
|
|
98
|
-
|
|
99
|
-
|
|
151
|
+
edge?: {
|
|
152
|
+
id: string;
|
|
153
|
+
source: string;
|
|
154
|
+
target: string;
|
|
155
|
+
sourceHandle?: string | null;
|
|
156
|
+
sourceHandleId?: string | null;
|
|
157
|
+
targetHandle?: string | null;
|
|
158
|
+
targetHandleId?: string | null;
|
|
159
|
+
data?: {
|
|
160
|
+
[x: string]: unknown;
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
sourceNode?: {
|
|
164
|
+
data: {
|
|
165
|
+
[x: string]: unknown;
|
|
166
|
+
};
|
|
167
|
+
id: string;
|
|
168
|
+
type?: string;
|
|
169
|
+
};
|
|
170
|
+
targetNode?: {
|
|
171
|
+
data: {
|
|
172
|
+
[x: string]: unknown;
|
|
173
|
+
};
|
|
174
|
+
id: string;
|
|
175
|
+
type?: string;
|
|
176
|
+
};
|
|
100
177
|
trigger?: boolean;
|
|
101
178
|
protocol?: string;
|
|
102
179
|
refresh?: boolean;
|
|
@@ -104,6 +181,6 @@ export declare const panelSlice: import('@reduxjs/toolkit').Slice<PanelState, {
|
|
|
104
181
|
nodeAddCallback: NodeAddCallback;
|
|
105
182
|
}, action: PayloadAction<NodeTypeItem>) => void;
|
|
106
183
|
}, "panel", "panel", import('@reduxjs/toolkit').SliceSelectors<PanelState>>;
|
|
107
|
-
export declare const openNodeSelector: import('@reduxjs/toolkit').
|
|
184
|
+
export declare const openNodeSelector: import('@reduxjs/toolkit').ActionCreatorWithNonInferrablePayload<"panel/openNodeSelector">, closeNodeSelector: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"panel/closeNodeSelector">, setNodeAddCallback: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<(info: NodeAddInfo, nodeType: ActionItem) => void, "panel/setNodeAddCallback">, executeNodeAddCallback: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<NodeTypeItem, "panel/executeNodeAddCallback">;
|
|
108
185
|
declare const _default: import('@reduxjs/toolkit').Reducer<PanelState>;
|
|
109
186
|
export default _default;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Node } from '@xyflow/react';
|
|
2
|
+
/** 节点选择器只需保留 MCP 判定需要的轻量锚点信息,避免 Redux 声明泄漏 ReactFlow 样式类型。 */
|
|
3
|
+
export type NodeAddAnchorNode = Pick<Node, 'id' | 'type' | 'data'>;
|
|
4
|
+
/** 边上插入节点时保留的原边上下文。 */
|
|
5
|
+
export interface NodeAddEdgeContext {
|
|
6
|
+
id: string;
|
|
7
|
+
source: string;
|
|
8
|
+
target: string;
|
|
9
|
+
sourceHandle?: string | null;
|
|
10
|
+
sourceHandleId?: string | null;
|
|
11
|
+
targetHandle?: string | null;
|
|
12
|
+
targetHandleId?: string | null;
|
|
13
|
+
data?: Record<string, unknown>;
|
|
14
|
+
}
|
|
15
|
+
/** 节点选择器与节点创建回调共享的唯一新增上下文。 */
|
|
16
|
+
export interface NodeAddInfo {
|
|
17
|
+
sourceNodeId?: string;
|
|
18
|
+
sourceHandle?: string;
|
|
19
|
+
targetNodeId?: string;
|
|
20
|
+
targetHandle?: string;
|
|
21
|
+
position?: {
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
};
|
|
25
|
+
edge?: NodeAddEdgeContext;
|
|
26
|
+
sourceNode?: NodeAddAnchorNode;
|
|
27
|
+
targetNode?: NodeAddAnchorNode;
|
|
28
|
+
trigger?: boolean;
|
|
29
|
+
protocol?: string;
|
|
30
|
+
refresh?: boolean;
|
|
31
|
+
}
|