@digitalsee-ai/rcs 2.0.3-beta → 2.0.3-beta3

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.
@@ -1,9 +1,11 @@
1
1
  import { EdgeType } from '../enums/edge';
2
2
  import { EdgeData } from '../types/Edge';
3
- import { Edge } from '@xyflow/react';
4
- interface EdgeCreationOptions {
3
+ import { Edge, Node } from '@xyflow/react';
4
+ export interface EdgeCreationOptions {
5
5
  sourceHandle?: string;
6
6
  targetHandle?: string;
7
+ sourceNode?: Node | null;
8
+ targetNode?: Node | null;
7
9
  data?: EdgeData;
8
10
  onAddNode?: (position: {
9
11
  x: number;
@@ -27,12 +29,12 @@ declare class EdgeFactory {
27
29
  static getEdgeComponent(type: EdgeType): import('react').FC<import('./BaseEdge').CustomEdgeProps>;
28
30
  /**
29
31
  * 创建一个连线实例
30
- * @param type 连线类型
32
+ * @param type 连线类型(若不提供或为 MAIN,则尝试根据 options 中的 sourceNode/targetNode 及 handle 协议解析)
31
33
  * @param id 连线ID
32
34
  * @param source 源节点ID
33
35
  * @param target 目标节点ID
34
- * @param options 可选参数,包括sourceHandle, targetHandle, data和回调函数
36
+ * @param options 可选参数,包括sourceHandle, targetHandle, sourceNode, targetNode, data和回调函数
35
37
  */
36
- static createEdge(type: EdgeType | string, id: string, source: string, target: string, options?: EdgeCreationOptions): Edge;
38
+ static createEdge(type: EdgeType | string | undefined | null, id: string, source: string, target: string, options?: EdgeCreationOptions): Edge;
37
39
  }
38
40
  export default EdgeFactory;
@@ -23,6 +23,8 @@ export interface NodePortSchema extends Omit<DipPortSchema, 'protocol'> {
23
23
  style?: React.CSSProperties;
24
24
  /** isMain 覆盖;缺省 name === 'main' */
25
25
  isMain?: boolean;
26
+ /** 针对某种支持多种协议的情况 */
27
+ protocols?: string[];
26
28
  }
27
29
  /** (type, protocol) 维度的端口覆盖声明;省略一侧即继承 type 级默认。 */
28
30
  export interface NodePortsDeclaration {
@@ -168,7 +168,11 @@ export interface FlowOutputTreeRequest {
168
168
  edges?: any[];
169
169
  }
170
170
  export declare function apiGetFlowOutputTree(flowId: string, data: FlowOutputTreeRequest): Promise<any>;
171
- export declare function apiGetGlobalVariables(): Promise<any>;
171
+ export interface GlobalVariablesQuery {
172
+ /** 传 1 时仅返回允许流程更新的全局变量 */
173
+ allowFlowUpdate?: 0 | 1;
174
+ }
175
+ export declare function apiGetGlobalVariables(query?: GlobalVariablesQuery): Promise<any>;
172
176
  /**
173
177
  * Fetches the account model for a credential schema key.
174
178
  *
@@ -113,6 +113,7 @@ export declare enum NodeProtocol {
113
113
  AI_TEXT_SPLITTER = "AI_TEXTSPLITTER",
114
114
  AI_EMBEDDING = "AI_EMBEDDING",
115
115
  AI_TOOL = "AI_TOOL",
116
+ KNOWLEDGE = "KNOWLEDGE",
116
117
  MCP = "MCP",
117
118
  BUILTIN_MCP = "BUILTIN_MCP",
118
119
  MCP_SERVER = "MCP_SERVER"
@@ -51,7 +51,7 @@ export declare function convertNodesToReactFlowFormat(backendNodes: BackendNode[
51
51
  /**
52
52
  * 将后端连接数据转换为前端可用的边数据
53
53
  */
54
- export declare function convertConnectionsToReactFlowEdges(connections: BackendConnection): Edge[];
54
+ export declare function convertConnectionsToReactFlowEdges(connections: BackendConnection, nodes?: Node[]): Edge[];
55
55
  /**
56
56
  * 将后端响应数据转换为前端工作流数据
57
57
  */