@digitalsee-ai/rcs 1.1.1 → 1.1.2
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/classicNodeCreate.d.ts +19 -0
- package/dist/components/digitalsee/workflow/Canvas/constants.d.ts +15 -1
- package/dist/components/digitalsee/workflow/Canvas/hooks/createNodeAddHandlerNext.d.ts +16 -1
- package/dist/components/digitalsee/workflow/Canvas/hooks/useNodeAddCallback.d.ts +17 -4
- package/dist/components/digitalsee/workflow/Canvas/hooks/useWorkflowCanvasState.d.ts +1 -3
- package/dist/components/digitalsee/workflow/Handles/CustomHandle.d.ts +0 -3
- package/dist/components/digitalsee/workflow/Nodes/ConditionNode.d.ts +1 -1
- package/dist/components/digitalsee/workflow/Nodes/SuperBaseNode.d.ts +1 -6
- package/dist/components/digitalsee/workflow/Nodes/SwitchNode.d.ts +1 -1
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useCategories.d.ts +2 -5
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useNavigation.d.ts +2 -3
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/types.d.ts +1 -19
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/dataTransformers.d.ts +2 -13
- package/dist/components/digitalsee/workflow/api/dip.types.d.ts +0 -30
- package/dist/components/digitalsee/workflow/api/index.d.ts +1 -6
- package/dist/components/digitalsee/workflow/events/eventBus.d.ts +12 -2
- package/dist/components/digitalsee/workflow/hooks/usePanel.d.ts +17 -3
- package/dist/components/digitalsee/workflow/store/panelSlice.d.ts +41 -118
- package/dist/components/digitalsee/workflow/types/Node.d.ts +1 -1
- package/dist/components/digitalsee/workflow/types/engine.d.ts +0 -15
- package/dist/components/digitalsee/workflow/utils/nextNodeSchemaCache.d.ts +0 -8
- package/dist/locales/en-US/link/flow.d.ts +0 -22
- package/dist/locales/en-US.d.ts +0 -22
- package/dist/locales/zh-CN/link/flow.d.ts +0 -22
- package/dist/locales/zh-CN.d.ts +0 -22
- package/dist/locales/zh-TW/link/flow.d.ts +0 -22
- package/dist/locales/zh-TW.d.ts +0 -22
- package/dist/rcs.css +1 -1
- package/dist/rcs.es.js +16150 -18077
- package/dist/rcs.es.js.map +1 -1
- package/dist/rcs.umd.js +58 -58
- package/dist/rcs.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/digitalsee/workflow/Canvas/actionItemToNodeData.d.ts +0 -14
- package/dist/components/digitalsee/workflow/Canvas/hooks/classicNodeAddConnection.d.ts +0 -31
- package/dist/components/digitalsee/workflow/Canvas/hooks/classicNodeAddConnection.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/Handles/customHandleConnectable.d.ts +0 -35
- package/dist/components/digitalsee/workflow/Handles/customHandleConnectable.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/Nodes/classicNodePackageNodes.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/Nodes/classicNodePackagePortLayout.d.ts +0 -23
- package/dist/components/digitalsee/workflow/Nodes/classicNodePackagePortLayout.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/Nodes/useClassicNodePackagePorts.d.ts +0 -26
- package/dist/components/digitalsee/workflow/Nodes/useClassicNodePackagePorts.test.d.ts +0 -1
- 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 -19
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useConnectableNodeSelector.d.ts +0 -40
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useNavigation.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useNodeActionState.d.ts +0 -30
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useNodeSelectorPresentation.d.ts +0 -24
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/connectableActionLoader.d.ts +0 -16
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/connectableActionLoader.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/connectableFallback.d.ts +0 -2
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/connectableFallback.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/connectableQuery.d.ts +0 -40
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/connectableQuery.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/connectableResponse.d.ts +0 -35
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/connectableResponse.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/filterEdgeInsertActions.d.ts +0 -62
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/filterEdgeInsertActions.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/nodeAddContext.d.ts +0 -26
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/nodeAddContext.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/api/connectable.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/api/connectable.types.d.ts +0 -75
- package/dist/components/digitalsee/workflow/config/defaultCanvasEngineConfig.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/config/defaultNodeSelectorConfig.d.ts +0 -9
- package/dist/components/digitalsee/workflow/types/NodeAddContext.d.ts +0 -31
- package/dist/components/digitalsee/workflow/utils/classicNodeActionIdentity.d.ts +0 -7
- package/dist/components/digitalsee/workflow/utils/classicNodeActionIdentity.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/utils/classicNodePackageConnection.d.ts +0 -28
- package/dist/components/digitalsee/workflow/utils/classicNodePackageConnection.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/utils/classicNodePackageGraphValidation.d.ts +0 -29
- package/dist/components/digitalsee/workflow/utils/classicNodePackageGraphValidation.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/utils/compatiblePortSelection.d.ts +0 -79
- package/dist/components/digitalsee/workflow/utils/compatiblePortSelection.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/utils/nodeDataFormatter.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/utils/portConnectionValidationMessages.d.ts +0 -48
- package/dist/components/digitalsee/workflow/utils/portConnectionValidationMessages.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/utils/portConnectionValidator.d.ts +0 -66
- package/dist/components/digitalsee/workflow/utils/portConnectionValidator.test.d.ts +0 -1
- package/dist/components/digitalsee/workflow/utils/workflowConnectionValidator.d.ts +0 -20
- package/dist/components/digitalsee/workflow/utils/workflowConnectionValidator.test.d.ts +0 -1
- /package/dist/components/digitalsee/workflow/Canvas/{constants.test.d.ts → classicNodeCreate.test.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { NodeData as NodeFactoryData } from '../Nodes/NodeFactory';
|
|
2
|
-
import { ActionItem } from '../Panels/ModernNodeSelectorPanel/types';
|
|
3
|
-
type ConvertibleActionItem = Partial<ActionItem> & {
|
|
4
|
-
status?: string;
|
|
5
|
-
protocol?: string;
|
|
6
|
-
} & Record<string, unknown>;
|
|
7
|
-
/** 将节点动作转换为 CLASSIC 画布节点数据。 */
|
|
8
|
-
export declare const convertActionItemToNodeData: (actionItem: ConvertibleActionItem) => NodeFactoryData;
|
|
9
|
-
/**
|
|
10
|
-
* NEXT 模式专用转换函数(暂废保留分支):额外保留 name 字段。
|
|
11
|
-
* 当前 nodepackage 节点仍走 CLASSIC 的 convertActionItemToNodeData。
|
|
12
|
-
*/
|
|
13
|
-
export declare const convertActionItemToNodeDataNext: (actionItem: ConvertibleActionItem) => NodeFactoryData;
|
|
14
|
-
export {};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { NodeData as NodeFactoryData } from '../../Nodes/NodeFactory';
|
|
2
|
-
import { NodeAddInfo } from '../../types/NodeAddContext';
|
|
3
|
-
import { EdgeConfig } from '../../types/engine';
|
|
4
|
-
import { Edge, Node } from '@xyflow/react';
|
|
5
|
-
type ReportConnectable = (messageId: string, details: Record<string, unknown>) => void;
|
|
6
|
-
type ReportAmbiguousPorts = (details: Record<string, unknown>) => void;
|
|
7
|
-
export interface TryConnectClassicNodePackageParams {
|
|
8
|
-
info: NodeAddInfo;
|
|
9
|
-
newNode: Node<NodeFactoryData>;
|
|
10
|
-
currentNodes: Node[];
|
|
11
|
-
currentEdges: Edge[];
|
|
12
|
-
canUseConnectablePorts: boolean;
|
|
13
|
-
addEdges: (edges: Edge[]) => void;
|
|
14
|
-
removeEdges: (edgeIds: string[]) => void;
|
|
15
|
-
handleEdgeAddNode: (position: {
|
|
16
|
-
x: number;
|
|
17
|
-
y: number;
|
|
18
|
-
}, edge?: Edge) => void;
|
|
19
|
-
saveFlow: () => Promise<void>;
|
|
20
|
-
reportConnectableFallback: ReportConnectable;
|
|
21
|
-
reportAmbiguousPorts: ReportAmbiguousPorts;
|
|
22
|
-
validateConnectionAgainstSnapshot: (edge: EdgeConfig, nodes: Node[], edges: Edge[]) => boolean;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* 尝试按 NodePackage Schema 连接新建节点。
|
|
26
|
-
*
|
|
27
|
-
* 返回 true 表示该上下文已完整处理(成功连线或保留独立节点并给出提示);
|
|
28
|
-
* 返回 false 时调用方继续 legacy 固定 handle 流程。
|
|
29
|
-
*/
|
|
30
|
-
export declare function tryConnectClassicNodePackage({ info, newNode, currentNodes, currentEdges, canUseConnectablePorts, addEdges, removeEdges, handleEdgeAddNode, saveFlow, reportConnectableFallback, reportAmbiguousPorts, validateConnectionAgainstSnapshot, }: TryConnectClassicNodePackageParams): Promise<boolean>;
|
|
31
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Node } from '@xyflow/react';
|
|
2
|
-
import { NodeAddInfo } from '../types/NodeAddContext';
|
|
3
|
-
interface HandleExtenderVisibilityOptions {
|
|
4
|
-
type: 'source' | 'target';
|
|
5
|
-
isFull: boolean;
|
|
6
|
-
connectionInProgress: boolean;
|
|
7
|
-
canEdit: boolean;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* 判断连接桩是否展示快捷新增入口。
|
|
11
|
-
*
|
|
12
|
-
* 画布连线始终由 output/source 发起,input/target 只接收连线,
|
|
13
|
-
* 因此快捷新增入口只允许展示在输出桩。连接数达到上限时隐藏入口。
|
|
14
|
-
*/
|
|
15
|
-
export declare function shouldShowHandleExtender(options: HandleExtenderVisibilityOptions): boolean;
|
|
16
|
-
/** output 只能发起连线,input 只能接收连线;空间布局不改变端口语义。 */
|
|
17
|
-
export declare function getHandleConnectionPermissions(type: 'source' | 'target', canEdit: boolean): {
|
|
18
|
-
isConnectableStart: boolean;
|
|
19
|
-
isConnectableEnd: boolean;
|
|
20
|
-
};
|
|
21
|
-
interface BuildHandleNodeAddInfoOptions {
|
|
22
|
-
type: 'source' | 'target';
|
|
23
|
-
nodeId: string;
|
|
24
|
-
handleId: string;
|
|
25
|
-
position: {
|
|
26
|
-
x: number;
|
|
27
|
-
y: number;
|
|
28
|
-
};
|
|
29
|
-
protocol?: string;
|
|
30
|
-
anchorNode?: Node;
|
|
31
|
-
refresh: boolean;
|
|
32
|
-
}
|
|
33
|
-
/** 构造连接桩快捷新增上下文,避免输入桩误带 source/protocol 语义。 */
|
|
34
|
-
export declare function buildHandleNodeAddInfo(options: BuildHandleNodeAddInfoOptions): NodeAddInfo;
|
|
35
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { DipNodeSchema } from '../api/dip';
|
|
2
|
-
import { HandleConfig } from './SuperBaseNode';
|
|
3
|
-
export interface ClassicNodePackagePortLayout {
|
|
4
|
-
inputs: HandleConfig[];
|
|
5
|
-
outputs: HandleConfig[];
|
|
6
|
-
height: number;
|
|
7
|
-
compact: boolean;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* 按端口较多的一侧计算 CLASSIC nodepackage 节点高度。
|
|
11
|
-
*
|
|
12
|
-
* 1–6 个端口保持 72px;7–12 个端口按 24px 递增;超过 12 个端口
|
|
13
|
-
* 使用 16px 紧凑步长,并在极端 Schema 下限制节点最大高度。
|
|
14
|
-
*/
|
|
15
|
-
export declare function getClassicNodePackageHeight(portCount: number): {
|
|
16
|
-
height: number;
|
|
17
|
-
compact: boolean;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* 将 NodeSchema 的 inputs/outputs 转为 SuperBaseNode 所需的 handle 配置。
|
|
21
|
-
* 不补造默认端口,空数组即代表该方向没有端口。
|
|
22
|
-
*/
|
|
23
|
-
export declare function createClassicNodePackagePortLayout(schema: Pick<DipNodeSchema, 'inputs' | 'outputs'>): ClassicNodePackagePortLayout;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { DipNodeSchema } from '../api/dip';
|
|
2
|
-
import { HandleConfig } from './SuperBaseNode';
|
|
3
|
-
import { NodeData, NodeType } from '../types/Node';
|
|
4
|
-
type PortLoadStatus = 'legacy' | 'loading' | 'ready' | 'error';
|
|
5
|
-
interface UseClassicNodePackagePortsOptions {
|
|
6
|
-
nodeType: NodeType;
|
|
7
|
-
data: NodeData;
|
|
8
|
-
legacyInputs: HandleConfig[];
|
|
9
|
-
legacyOutputs: HandleConfig[];
|
|
10
|
-
}
|
|
11
|
-
interface ClassicNodePackagePortsResult {
|
|
12
|
-
inputs: HandleConfig[];
|
|
13
|
-
outputs: HandleConfig[];
|
|
14
|
-
height?: number;
|
|
15
|
-
status: PortLoadStatus;
|
|
16
|
-
isNodePackage: boolean;
|
|
17
|
-
schema: DipNodeSchema | null;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* 为 CLASSIC nodepackage 节点加载 NodeSchema 并生成动态端口。
|
|
21
|
-
*
|
|
22
|
-
* 仅当宿主开启 connectable 能力、引擎是 CLASSIC 且
|
|
23
|
-
* isClassicNextCompatibleNode 返回 true 时生效;其它节点完整保留 legacy 端口。
|
|
24
|
-
*/
|
|
25
|
-
export declare function useClassicNodePackagePorts({ nodeType, data, legacyInputs, legacyOutputs, }: UseClassicNodePackagePortsOptions): ClassicNodePackagePortsResult;
|
|
26
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export type EntryMode = 'automation' | 'mcp' | null;
|
|
3
|
-
interface EntryTypeSelectorProps {
|
|
4
|
-
onSelect: (mode: Exclude<EntryMode, null>) => void;
|
|
5
|
-
}
|
|
6
|
-
/** @description 首节点入口类型选择。 */
|
|
7
|
-
declare const EntryTypeSelector: React.FC<EntryTypeSelectorProps>;
|
|
8
|
-
export default EntryTypeSelector;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { NodeActionMeta } from '../hooks/useNodeActionState';
|
|
2
|
-
import { ActionItem, NodeTypeItem } from '../types';
|
|
3
|
-
import { default as React } from 'react';
|
|
4
|
-
interface NodeCardListProps {
|
|
5
|
-
isSearching: boolean;
|
|
6
|
-
visibleNodes: NodeTypeItem[];
|
|
7
|
-
useConnectableDataSource: boolean;
|
|
8
|
-
expandedNodeIds: string[];
|
|
9
|
-
nodeActionsMap: Record<string, NodeActionMeta>;
|
|
10
|
-
searchText: string;
|
|
11
|
-
isLoadingNodes: boolean;
|
|
12
|
-
hasMore: boolean;
|
|
13
|
-
onNodeToggle: (node: NodeTypeItem) => void;
|
|
14
|
-
onActionSelect: (node: NodeTypeItem, action: ActionItem) => void;
|
|
15
|
-
onLoadAllActions: (node: NodeTypeItem) => void;
|
|
16
|
-
}
|
|
17
|
-
/** @description 节点卡片集合及其加载、空态和分页尾部。 */
|
|
18
|
-
declare const NodeCardList: React.FC<NodeCardListProps>;
|
|
19
|
-
export default NodeCardList;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { ActionItem, LinkSearchParams, ModernNodeSelectorProps, NodeFetchResult, NodeTypeItem } from '../types';
|
|
2
|
-
import { NodeAddInfo } from '../../../types/NodeAddContext';
|
|
3
|
-
type SearchHandler = NonNullable<ModernNodeSelectorProps['onSearch']>;
|
|
4
|
-
type CategoryHandler = NonNullable<ModernNodeSelectorProps['onFetchCategories']>;
|
|
5
|
-
type NodeCategoryHandler = NonNullable<ModernNodeSelectorProps['onFetchNodesByCategory']>;
|
|
6
|
-
type EntryMode = 'automation' | 'mcp' | null;
|
|
7
|
-
interface FetchNodeActionOptions {
|
|
8
|
-
suppressLoading?: boolean;
|
|
9
|
-
}
|
|
10
|
-
interface UseConnectableNodeSelectorProps {
|
|
11
|
-
nodeSelectorVisible: boolean;
|
|
12
|
-
entryMode: EntryMode;
|
|
13
|
-
effectiveNodeAddInfo?: NodeAddInfo | null;
|
|
14
|
-
workflowId?: string;
|
|
15
|
-
onSearch?: SearchHandler;
|
|
16
|
-
onFetchCategories?: CategoryHandler;
|
|
17
|
-
onFetchNodesByCategory?: NodeCategoryHandler;
|
|
18
|
-
fetchLegacyNodeActions: (node: NodeTypeItem, options?: FetchNodeActionOptions) => Promise<ActionItem[]>;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* @description 为 NodePackage 连线场景选择数据源,并封装查询、边中插入求交与旧接口回退。
|
|
22
|
-
*/
|
|
23
|
-
export declare function useConnectableNodeSelector({ nodeSelectorVisible, entryMode, effectiveNodeAddInfo, workflowId, onSearch, onFetchCategories, onFetchNodesByCategory, fetchLegacyNodeActions, }: UseConnectableNodeSelectorProps): {
|
|
24
|
-
actionRequestContextKey: string;
|
|
25
|
-
connectableContext: import('../utils/connectableQuery').ConnectableQueryContext;
|
|
26
|
-
useConnectableDataSource: boolean;
|
|
27
|
-
onSearch: (params?: LinkSearchParams) => Promise<NodeFetchResult>;
|
|
28
|
-
onFetchCategories: (type?: import('../types').CategoryRequestType) => Promise<import('../types').CategoryItem[] | {
|
|
29
|
-
id: any;
|
|
30
|
-
name: any;
|
|
31
|
-
description: any;
|
|
32
|
-
icon: any;
|
|
33
|
-
search_action: any;
|
|
34
|
-
children: any;
|
|
35
|
-
nodes: any[];
|
|
36
|
-
}[]>;
|
|
37
|
-
onFetchNodesByCategory: (params?: LinkSearchParams) => Promise<NodeFetchResult>;
|
|
38
|
-
fetchNodeActions: (node: NodeTypeItem, options?: FetchNodeActionOptions) => Promise<ActionItem[]>;
|
|
39
|
-
};
|
|
40
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { ActionItem, NodeTypeItem } from '../types';
|
|
2
|
-
export interface NodeActionMeta {
|
|
3
|
-
actions: ActionItem[];
|
|
4
|
-
loading: boolean;
|
|
5
|
-
source?: 'search-partial' | 'full';
|
|
6
|
-
}
|
|
7
|
-
interface UseNodeActionStateProps {
|
|
8
|
-
actionRequestContextKey: string;
|
|
9
|
-
contextMode?: string;
|
|
10
|
-
fetchNodeActions: (node: NodeTypeItem, options?: {
|
|
11
|
-
suppressLoading?: boolean;
|
|
12
|
-
}) => Promise<ActionItem[]>;
|
|
13
|
-
isMcpServerEntryMode: boolean;
|
|
14
|
-
visibleNodes: NodeTypeItem[];
|
|
15
|
-
searchResults: NodeTypeItem[];
|
|
16
|
-
searchText: string;
|
|
17
|
-
activeCategoryId?: string;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* @description 管理连接器的展开状态、动作缓存,以及异步动作请求的竞态保护。
|
|
21
|
-
*/
|
|
22
|
-
export declare function useNodeActionState({ actionRequestContextKey, contextMode, fetchNodeActions, isMcpServerEntryMode, visibleNodes, searchResults, searchText, activeCategoryId, }: UseNodeActionStateProps): {
|
|
23
|
-
expandedNodeIds: string[];
|
|
24
|
-
nodeActionsMap: Record<string, NodeActionMeta>;
|
|
25
|
-
handleNodeToggle: (node: NodeTypeItem) => Promise<void>;
|
|
26
|
-
handleLoadAllActions: (node: NodeTypeItem) => Promise<void>;
|
|
27
|
-
resetNodeActionState: () => void;
|
|
28
|
-
setExpandedNodeIds: import('react').Dispatch<import('react').SetStateAction<string[]>>;
|
|
29
|
-
};
|
|
30
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { CategoryItem, LinkSearchParams, NodeTypeItem } from '../types';
|
|
2
|
-
import { NodeAddInfo } from '../../../types/NodeAddContext';
|
|
3
|
-
interface UseNodeSelectorPresentationProps {
|
|
4
|
-
effectiveNodeAddInfo?: NodeAddInfo | null;
|
|
5
|
-
isEntryTypeSelection: boolean;
|
|
6
|
-
activeCategoryId?: string;
|
|
7
|
-
currentCategory: CategoryItem | null;
|
|
8
|
-
categoryNodes: NodeTypeItem[];
|
|
9
|
-
searchResults: NodeTypeItem[];
|
|
10
|
-
searchText: string;
|
|
11
|
-
isRealTriggerMode: boolean;
|
|
12
|
-
workflowId?: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* @description 汇总节点选择器的协议展示状态和列表/搜索派生参数。
|
|
16
|
-
*/
|
|
17
|
-
export declare function useNodeSelectorPresentation({ effectiveNodeAddInfo, isEntryTypeSelection, activeCategoryId, currentCategory, categoryNodes, searchResults, searchText, isRealTriggerMode, workflowId, }: UseNodeSelectorPresentationProps): {
|
|
18
|
-
panelTitle: string;
|
|
19
|
-
searchPlaceholder: string;
|
|
20
|
-
visibleNodes: NodeTypeItem[];
|
|
21
|
-
buildSearchParams: () => LinkSearchParams;
|
|
22
|
-
isMcpServerEntryMode: boolean;
|
|
23
|
-
};
|
|
24
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { QueryConnectableNodePackageDto } from '../../../api/connectable.types';
|
|
2
|
-
import { ActionItem, NodeFetchResult, NodeTypeItem } from '../types';
|
|
3
|
-
interface LoadConnectableNodeActionsOptions {
|
|
4
|
-
node: NodeTypeItem;
|
|
5
|
-
query: QueryConnectableNodePackageDto | null;
|
|
6
|
-
fallbackToLegacy: boolean;
|
|
7
|
-
fetchConnectablePage: (query: QueryConnectableNodePackageDto) => Promise<NodeFetchResult>;
|
|
8
|
-
fetchLegacyActions: () => Promise<ActionItem[]>;
|
|
9
|
-
filterPage?: (page: NodeFetchResult) => NodeFetchResult;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* 加载连接器动作;connectable 查询不可用或明确未发布时回退旧 `/actions/v2`。
|
|
13
|
-
* 不能回退 `/links/search`,因为该接口在 linkId 场景不会加载 matchedActions。
|
|
14
|
-
*/
|
|
15
|
-
export declare function loadConnectableNodeActions({ node, query, fallbackToLegacy, fetchConnectablePage, fetchLegacyActions, filterPage, }: LoadConnectableNodeActionsOptions): Promise<ActionItem[]>;
|
|
16
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { QueryConnectableNodePackageDto } from '../../../api/connectable.types';
|
|
2
|
-
type ConnectableNodeId = string | number;
|
|
3
|
-
export type ConnectableQueryContext = {
|
|
4
|
-
mode: 'independent';
|
|
5
|
-
} | {
|
|
6
|
-
mode: 'source';
|
|
7
|
-
sourceId: ConnectableNodeId;
|
|
8
|
-
sourceHandle: string;
|
|
9
|
-
} | {
|
|
10
|
-
mode: 'target';
|
|
11
|
-
targetId: ConnectableNodeId;
|
|
12
|
-
targetHandle: string;
|
|
13
|
-
} | {
|
|
14
|
-
mode: 'edge-insert';
|
|
15
|
-
sourceId: ConnectableNodeId;
|
|
16
|
-
sourceHandle: string;
|
|
17
|
-
targetId: ConnectableNodeId;
|
|
18
|
-
targetHandle: string;
|
|
19
|
-
};
|
|
20
|
-
export interface ConnectableQueryOptions {
|
|
21
|
-
scene: string;
|
|
22
|
-
trigger: boolean;
|
|
23
|
-
categoryId?: string | number | null;
|
|
24
|
-
linkId?: string | null;
|
|
25
|
-
keyword?: string | null;
|
|
26
|
-
page?: number | null;
|
|
27
|
-
size?: number | null;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* 校验后端 Long 节点 ID,并保持字符串原值以避免 19 位雪花 ID 精度丢失。
|
|
31
|
-
* number 只接受 JS 安全正整数;临时 ReactFlow id 返回 undefined。
|
|
32
|
-
*/
|
|
33
|
-
export declare const parsePersistedNodeId: (value: ConnectableNodeId) => string | number | undefined;
|
|
34
|
-
/**
|
|
35
|
-
* 将节点新增上下文转换为后端三种合法查询之一。
|
|
36
|
-
*
|
|
37
|
-
* `edge-insert` 暂按 source 查询,原 target 由调用方保留并在本地求交。
|
|
38
|
-
*/
|
|
39
|
-
export declare const buildConnectableQuery: (context: ConnectableQueryContext, options: ConnectableQueryOptions) => QueryConnectableNodePackageDto | null;
|
|
40
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,35 +0,0 @@
|
|
|
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;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,62 +0,0 @@
|
|
|
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 {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/nodeAddContext.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
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 {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,75 +0,0 @@
|
|
|
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 {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,31 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ActionItem } from '../Panels/ModernNodeSelectorPanel/types';
|
|
2
|
-
/**
|
|
3
|
-
* 解析 CLASSIC create-node API 使用的原始 Long action_id。
|
|
4
|
-
*
|
|
5
|
-
* NodePackage 的 UI key 通常是 actionKey,而后端 action id 可能为 0/负数;两者不可混用。
|
|
6
|
-
*/
|
|
7
|
-
export declare function resolveClassicCreateActionId(action: Pick<ActionItem, 'id' | 'backendActionId' | 'action_id'>): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|