@oomol-lab/open-flow 0.1.0-beta.4 → 0.1.0-beta.40
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/browser/{_virtual_open-flow-twemoji-DJwKsM_w.js → _virtual_open-flow-twemoji-CpHJOEsk.js} +4028 -2
- package/dist/browser/carbon-Cn-DTyjG.js +54 -0
- package/dist/browser/codeDiagnostics-BtH_YuXu.js +44 -0
- package/dist/browser/createResourceDialog-BOrW62JW.js +110 -0
- package/dist/browser/{dist-DWADUsVB.js → dist-By46o5UV.js} +47 -47
- package/dist/browser/dist-Cdna4VV_.js +795 -0
- package/dist/browser/dist-CoszrK7m.js +4 -0
- package/dist/browser/{dist-CPuF50D9.js → dist-D1VYgicl.js} +426 -305
- package/dist/browser/{dist-CeSZ2xSM.js → dist-DINmJ4Gr.js} +171 -112
- package/dist/browser/dist-DSe6KRsr.js +1224 -0
- package/dist/browser/{dist-3Mj8q8Pr.js → dist-DmuE3M0R.js} +53 -54
- package/dist/browser/{dist-BN4ZCyOB.js → dist-DpDLsYtO.js} +14 -15
- package/dist/browser/{dist-CJpzJrLM.js → dist-DwvhuMxw.js} +894 -895
- package/dist/browser/dist-DxahK_I8.js +2688 -0
- package/dist/browser/{dist-C46JByB-.js → dist-Dz6Nglsd.js} +61 -61
- package/dist/browser/{dist-DUzA0Ukh.js → dist-TJfrvoIQ.js} +141 -142
- package/dist/browser/editorComponent-0skblWYk.js +16795 -0
- package/dist/browser/{esm-C9jQK70n.js → esm-B7A42FzW.js} +68 -59
- package/dist/browser/event-sources.d.ts +30 -0
- package/dist/browser/flow-authoring-module.d.ts +2 -2
- package/dist/browser/flow-authoring-node.d.ts +34 -17
- package/dist/browser/flow-authoring.d.ts +1 -1
- package/dist/browser/flow-authoring.js +15906 -457
- package/dist/browser/flow-change-schema.d.ts +11 -0
- package/dist/browser/flow-change.d.ts +245 -44
- package/dist/browser/flow-change.js +5517 -117
- package/dist/browser/flow-input-value.d.ts +6 -0
- package/dist/browser/flow-notifications.d.ts +11 -2
- package/dist/browser/flowChanges-3o9Vs_1I.js +10137 -0
- package/dist/browser/{flowRunInputEditorStore-BYa8zFLC.js → flowRunInputEditorStore-Bgb5vSeS.js} +864 -4000
- package/dist/browser/flowWorkspace-DJzQVVtZ.js +43418 -0
- package/dist/browser/host-conformance.d.ts +7 -0
- package/dist/browser/host-conformance.js +39 -0
- package/dist/browser/inputValues-DkDT6u0o.js +43 -0
- package/dist/browser/licenses.md +137 -662
- package/dist/browser/{getPseudoElementBounds-qDxSDwzN.js → lite-BA96NG4M.js} +4409 -2987
- package/dist/browser/main-BDnNHhkU.js +50 -0
- package/dist/browser/{markdownContent-DUfLdnUt.js → markdownContent-D2oHGWc6.js} +53 -53
- package/dist/browser/theme.css +529 -34
- package/dist/browser/{typeScriptSession-CwMPjseS.js → typeScriptSession-v9Pb3G6d.js} +190 -191
- package/dist/browser/ui-input.d.ts +5 -0
- package/dist/browser/ui-label.d.ts +3 -0
- package/dist/browser/ui-textarea.d.ts +3 -0
- package/dist/browser/ui.css +3 -0
- package/dist/browser/ui.css.d.ts +1 -0
- package/dist/browser/ui.d.ts +62 -0
- package/dist/browser/ui.js +5407 -0
- package/dist/browser/value-B_yE9ean.js +101 -0
- package/dist/browser/warmCodeTheme-DVv4-rDO.js +35 -0
- package/dist/browser/webhook-method.d.ts +3 -0
- package/dist/browser/workbench-contract.d.ts +27 -2
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.d.ts +2 -3
- package/dist/browser/workbench.js +4212 -1472
- package/dist/browser/workbenchSelect-B5zXyaaX.js +6423 -0
- package/dist/common/authoringExamples.d.ts +28 -0
- package/dist/common/connectorDecoders.d.ts +9 -0
- package/dist/common/control-api-conformance.d.ts +57 -0
- package/dist/common/control-api-conformance.js +9793 -208
- package/dist/common/control-api-errors.d.ts +49 -0
- package/dist/common/control-api.d.ts +484 -57
- package/dist/common/control-api.js +8917 -531
- package/dist/common/control-requests.d.ts +129 -0
- package/dist/common/control-requests.js +8662 -0
- package/dist/common/cron-trigger.d.ts +2 -1
- package/dist/common/cron-trigger.js +27 -24
- package/dist/common/draftOperations.d.ts +13 -0
- package/dist/common/engine-contract.d.ts +3 -1
- package/dist/common/event-sources.d.ts +49 -0
- package/dist/common/feishu-events.d.ts +19 -0
- package/dist/common/feishu-subscriptions.d.ts +10 -0
- package/dist/common/flow-agent.d.ts +10 -0
- package/dist/common/flow-connectionUsage.d.ts +12 -0
- package/dist/common/flow-encoding.d.ts +10 -2
- package/dist/common/flow-encoding.js +5170 -84
- package/dist/common/flow-graph.d.ts +59 -0
- package/dist/common/flow-json.d.ts +2 -0
- package/dist/common/flow-modules.d.ts +20 -0
- package/dist/common/flow-notifications.d.ts +11 -2
- package/dist/common/flow-schema.d.ts +17 -0
- package/dist/common/flow-semantics.d.ts +15 -7
- package/dist/common/flow-semantics.js +16394 -9734
- package/dist/common/flowInspection.d.ts +105 -0
- package/dist/common/fr-ClB96SQY.js +298 -0
- package/dist/common/integration-trigger.d.ts +30 -2
- package/dist/common/integration-trigger.js +7880 -71
- package/dist/common/ja-BJF-VrP2.js +298 -0
- package/dist/common/ko-Bght_VaB.js +298 -0
- package/dist/common/localization.d.ts +2 -0
- package/dist/common/localization.js +37 -1
- package/dist/common/mcp-conformance.d.ts +2 -0
- package/dist/common/mcp.d.ts +964 -0
- package/dist/common/mcp.js +9358 -0
- package/dist/common/poll-trigger.d.ts +7 -0
- package/dist/common/poll-trigger.js +7702 -25
- package/dist/common/provider-triggers.d.ts +4 -0
- package/dist/common/provider-triggers.js +11554 -2275
- package/dist/common/providerAccess.d.ts +20 -0
- package/dist/common/ru-DrP4BRM5.js +298 -0
- package/dist/common/run-events.d.ts +2 -2
- package/dist/common/run-events.js +11 -16
- package/dist/common/run-lifecycle.d.ts +5 -1
- package/dist/common/run-lifecycle.js +33 -3
- package/dist/common/run-results.d.ts +57 -0
- package/dist/common/runtime-contract.d.ts +38 -3
- package/dist/common/runtime-contract.js +312 -19
- package/dist/common/scheduler.d.ts +83 -60
- package/dist/common/scheduler.js +8625 -545
- package/dist/common/trigger-catalog.d.ts +22 -0
- package/dist/common/trigger-config-options.d.ts +13 -0
- package/dist/common/trigger-config.d.ts +7 -0
- package/dist/common/trigger-contract.d.ts +7 -0
- package/dist/common/trigger-localization.d.ts +7 -0
- package/dist/common/webhook-trigger.d.ts +5 -3
- package/dist/common/webhook-trigger.js +7071 -67
- package/dist/common/zh-CN-CxZ3yYfR.js +298 -0
- package/dist/common/zh-TW-CRmc3FMz.js +298 -0
- package/dist/index.d.ts +5 -5
- package/package.json +21 -1
- package/dist/browser/DesignerIcon-DdfuH2jW.js +0 -2066
- package/dist/browser/carbon-DMCVsjHo.js +0 -53
- package/dist/browser/createResourceDialog-4YQKl8lG.js +0 -505
- package/dist/browser/dist-BMqL-qR5.js +0 -1894
- package/dist/browser/dist-BpopSHwP.js +0 -1543
- package/dist/browser/dist-CP0883sY.js +0 -4
- package/dist/browser/dist-CUSrALSX.js +0 -1620
- package/dist/browser/flowChanges-Bs-ZcJV8.js +0 -12006
- package/dist/browser/flowWorkspace-BewofPeU.js +0 -45575
- package/dist/browser/icons-DRoMXL5h.js +0 -521
- package/dist/browser/languages-DgJehE1g.js +0 -62
- package/dist/browser/lib-GrGxYjsJ.js +0 -7855
- package/dist/browser/main-DmjVyuWr.js +0 -76
- package/dist/browser/waitNotificationInputs-DtrPBwA1.js +0 -26
- package/dist/browser/workbenchSelect-CX8KtT7L.js +0 -1375
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ChangeOperation, FlowDocument, JsonValue, RevisionContent } from './flow-change.js';
|
|
2
|
+
export declare const currentFlowModelVersion = 4;
|
|
3
|
+
/** Best-effort recovery for a parseable Revision envelope. Invalid collection entries are discarded. */
|
|
4
|
+
export declare function repairRevisionEnvelope(value: unknown): RevisionContent;
|
|
5
|
+
export declare function decodeFlowDocument(value: unknown): FlowDocument;
|
|
6
|
+
export declare function decodeRevisionContent(value: unknown): RevisionContent;
|
|
7
|
+
export declare function decodeRevisionEnvelope(value: unknown): RevisionContent;
|
|
8
|
+
export declare function parseOperation<Value>(candidate: unknown, index: number, parse: (value: unknown) => Value): Value;
|
|
9
|
+
export declare function decodeChangeOperation(candidate: unknown, index: number): ChangeOperation;
|
|
10
|
+
export declare function decodeChangeOperations(value: unknown): readonly ChangeOperation[];
|
|
11
|
+
export declare function changeOperationsSchema(kind?: string): JsonValue;
|
|
@@ -1,6 +1,25 @@
|
|
|
1
|
+
export { fixedInputValue, inputValue, inputValues } from './flow-input-value.js';
|
|
2
|
+
import type { WebhookMethod } from './webhook-method.js';
|
|
3
|
+
import { currentFlowModelVersion } from './flow-change-schema.js';
|
|
4
|
+
export { changeOperationsSchema, currentFlowModelVersion, decodeChangeOperations } from './flow-change-schema.js';
|
|
5
|
+
export type { WebhookMethod };
|
|
1
6
|
export type JsonValue = null | boolean | number | string | readonly JsonValue[] | {
|
|
2
7
|
readonly [key: string]: JsonValue;
|
|
3
8
|
};
|
|
9
|
+
export type SchemaKeyword = 'const' | 'enum' | 'exclusiveMaximum' | 'exclusiveMinimum' | 'maximum' | 'maxItems' | 'maxLength' | 'maxProperties' | 'minimum' | 'minItems' | 'minLength' | 'minProperties' | 'multipleOf' | 'pattern' | 'required' | 'type';
|
|
10
|
+
export type SchemaMismatch = {
|
|
11
|
+
readonly kind: 'artifact' | 'binary' | 'nullable';
|
|
12
|
+
} | {
|
|
13
|
+
readonly kind: 'keyword';
|
|
14
|
+
readonly keyword: SchemaKeyword;
|
|
15
|
+
readonly path: readonly (string | number)[];
|
|
16
|
+
readonly source: JsonValue | undefined;
|
|
17
|
+
readonly target: JsonValue | undefined;
|
|
18
|
+
} | {
|
|
19
|
+
readonly kind: 'schema';
|
|
20
|
+
readonly path?: readonly (string | number)[];
|
|
21
|
+
};
|
|
22
|
+
export declare function isSchemaKeyword(value: string): value is SchemaKeyword;
|
|
4
23
|
export declare const resourceNameMaxLength = 80;
|
|
5
24
|
export type ResourceNameIssue = 'controlCharacter' | 'empty' | 'specialCharacter' | 'tooLong';
|
|
6
25
|
export declare function resourceNameIssue(value: string): ResourceNameIssue | undefined;
|
|
@@ -25,6 +44,7 @@ export interface Group {
|
|
|
25
44
|
}
|
|
26
45
|
export declare function portsByHandle<Value extends Port>(ports: readonly (Value | Group)[]): Readonly<Record<string, Value>>;
|
|
27
46
|
export interface NodeSource {
|
|
47
|
+
readonly field?: string;
|
|
28
48
|
readonly kind: 'node';
|
|
29
49
|
readonly nodeId: string;
|
|
30
50
|
readonly output: string;
|
|
@@ -37,22 +57,26 @@ export interface BindingSource {
|
|
|
37
57
|
readonly bindingId: string;
|
|
38
58
|
readonly kind: 'binding';
|
|
39
59
|
}
|
|
40
|
-
export type
|
|
41
|
-
readonly kind: '
|
|
42
|
-
readonly sources: readonly (BindingSource | FlowSource | NodeSource)[];
|
|
60
|
+
export type FixedInputValue = {
|
|
61
|
+
readonly kind: 'unset';
|
|
43
62
|
} | {
|
|
44
63
|
readonly kind: 'value';
|
|
45
64
|
readonly value: JsonValue;
|
|
46
65
|
};
|
|
66
|
+
export type InputValues = Readonly<Record<string, FixedInputValue>>;
|
|
67
|
+
export type InputMapping = FixedInputValue | {
|
|
68
|
+
readonly kind: 'sources';
|
|
69
|
+
readonly sources: readonly (BindingSource | FlowSource | NodeSource)[];
|
|
70
|
+
};
|
|
47
71
|
export interface OutputMapping {
|
|
48
72
|
readonly sources: readonly (FlowSource | NodeSource)[];
|
|
49
73
|
}
|
|
50
74
|
interface GraphNodeBase {
|
|
51
|
-
readonly concurrency: number;
|
|
52
75
|
readonly description?: string;
|
|
53
76
|
readonly icon?: string;
|
|
54
77
|
readonly inputs: Readonly<Record<string, InputMapping>>;
|
|
55
78
|
readonly name?: string;
|
|
79
|
+
readonly maxExecutions?: number;
|
|
56
80
|
readonly timeoutMs?: number;
|
|
57
81
|
}
|
|
58
82
|
export interface SubflowNode extends GraphNodeBase {
|
|
@@ -64,31 +88,44 @@ export interface ValueNode extends GraphNodeBase {
|
|
|
64
88
|
readonly values: readonly InputPort[];
|
|
65
89
|
}
|
|
66
90
|
export type WaitAction = 'approve' | 'continue' | 'reject';
|
|
67
|
-
|
|
68
|
-
readonly
|
|
69
|
-
readonly kind: 'wait';
|
|
70
|
-
readonly notification?: {
|
|
71
|
-
readonly inputs: Readonly<Record<string, InputMapping>>;
|
|
72
|
-
readonly messageHandle: string;
|
|
73
|
-
readonly taskId: string;
|
|
74
|
-
};
|
|
91
|
+
interface ResolutionNodeBase extends GraphNodeBase {
|
|
92
|
+
readonly inputDefinitions: readonly InputPort[];
|
|
75
93
|
readonly prompt: string;
|
|
94
|
+
readonly timeoutMs?: never;
|
|
76
95
|
}
|
|
96
|
+
export interface WaitNode extends ResolutionNodeBase {
|
|
97
|
+
readonly kind: 'wait';
|
|
98
|
+
}
|
|
99
|
+
export interface ApprovalNode extends ResolutionNodeBase {
|
|
100
|
+
readonly kind: 'approval';
|
|
101
|
+
}
|
|
102
|
+
export type ResolutionNode = ApprovalNode | WaitNode;
|
|
77
103
|
export type ConditionOperator = '!=' | '<' | '<=' | '==' | '>' | '>=' | 'contains' | 'endsWith' | 'hasKey' | 'hasValue' | 'isEmpty' | 'isFalse' | 'isNotEmpty' | 'isNotNull' | 'isNull' | 'isTrue' | 'notContains' | 'notHasKey' | 'notHasValue' | 'startsWith';
|
|
104
|
+
export type Source = BindingSource | FlowSource | NodeSource;
|
|
105
|
+
export type ConditionOperand = {
|
|
106
|
+
readonly kind: 'value';
|
|
107
|
+
readonly value?: JsonValue;
|
|
108
|
+
readonly jsonSchema?: JsonValue;
|
|
109
|
+
} | {
|
|
110
|
+
readonly kind: 'source';
|
|
111
|
+
readonly source: Source;
|
|
112
|
+
};
|
|
78
113
|
export interface ConditionExpression {
|
|
79
|
-
readonly
|
|
114
|
+
readonly left: ConditionOperand;
|
|
80
115
|
readonly operator: ConditionOperator;
|
|
81
|
-
readonly
|
|
116
|
+
readonly right?: ConditionOperand;
|
|
82
117
|
}
|
|
83
|
-
export interface
|
|
118
|
+
export interface ConditionGroup {
|
|
84
119
|
readonly expressions: readonly ConditionExpression[];
|
|
120
|
+
}
|
|
121
|
+
export interface ConditionCase {
|
|
122
|
+
readonly description?: string;
|
|
123
|
+
readonly groups: readonly ConditionGroup[];
|
|
85
124
|
readonly output: string;
|
|
86
|
-
readonly relation: 'all' | 'any';
|
|
87
125
|
}
|
|
88
126
|
export interface ConditionNode extends GraphNodeBase {
|
|
89
127
|
readonly cases: readonly ConditionCase[];
|
|
90
|
-
readonly
|
|
91
|
-
readonly input: InputPort;
|
|
128
|
+
readonly matchMode: 'first' | 'all';
|
|
92
129
|
readonly kind: 'condition';
|
|
93
130
|
}
|
|
94
131
|
export type ManagedTaskExecutor = {
|
|
@@ -98,12 +135,75 @@ export type ManagedTaskExecutor = {
|
|
|
98
135
|
} | {
|
|
99
136
|
readonly kind: 'llm';
|
|
100
137
|
readonly mode: 'chat' | 'json';
|
|
138
|
+
} | {
|
|
139
|
+
readonly kind: 'agent';
|
|
140
|
+
readonly code?: boolean;
|
|
141
|
+
readonly model: string;
|
|
142
|
+
readonly prompt: Exclude<AgentInput, {
|
|
143
|
+
readonly kind: 'model';
|
|
144
|
+
}>;
|
|
145
|
+
readonly system: string;
|
|
146
|
+
readonly maxRounds: number;
|
|
147
|
+
readonly tools: readonly AgentTool[];
|
|
148
|
+
readonly notification?: {
|
|
149
|
+
readonly taskId: string;
|
|
150
|
+
readonly messageHandle: string;
|
|
151
|
+
readonly inputs: Readonly<Record<string, Exclude<AgentInput, {
|
|
152
|
+
readonly kind: 'model';
|
|
153
|
+
}>>>;
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
export type AgentInput = {
|
|
157
|
+
readonly kind: 'value';
|
|
158
|
+
readonly value: JsonValue;
|
|
159
|
+
} | {
|
|
160
|
+
readonly kind: 'input';
|
|
161
|
+
readonly input: string;
|
|
162
|
+
} | {
|
|
163
|
+
readonly kind: 'model';
|
|
101
164
|
};
|
|
102
|
-
export interface
|
|
165
|
+
export interface AgentTool {
|
|
166
|
+
readonly id: string;
|
|
167
|
+
readonly name: string;
|
|
168
|
+
readonly description: string;
|
|
169
|
+
readonly action: string;
|
|
170
|
+
readonly connectionId?: string;
|
|
171
|
+
readonly approval: boolean;
|
|
172
|
+
readonly inputs: readonly (InputPort & {
|
|
173
|
+
readonly source: AgentInput;
|
|
174
|
+
})[];
|
|
175
|
+
}
|
|
176
|
+
export interface ConnectorAccessCapability {
|
|
177
|
+
readonly actionHints?: readonly string[];
|
|
178
|
+
readonly connectionHints?: readonly {
|
|
179
|
+
readonly action: string;
|
|
180
|
+
readonly connectionId: string;
|
|
181
|
+
readonly alias?: string;
|
|
182
|
+
}[];
|
|
183
|
+
readonly kind: 'connector';
|
|
184
|
+
}
|
|
185
|
+
export interface ConnectorActionCapability {
|
|
103
186
|
readonly action: string;
|
|
104
|
-
readonly
|
|
187
|
+
readonly connections: readonly {
|
|
188
|
+
readonly connectionId: string;
|
|
189
|
+
readonly alias?: string;
|
|
190
|
+
}[];
|
|
191
|
+
readonly connectionId?: string;
|
|
105
192
|
readonly kind: 'connector';
|
|
106
193
|
}
|
|
194
|
+
export type ConnectorPermissionCapability = {
|
|
195
|
+
readonly kind: 'connector';
|
|
196
|
+
readonly mode: 'shared';
|
|
197
|
+
} | {
|
|
198
|
+
readonly kind: 'connector';
|
|
199
|
+
readonly mode: 'independent';
|
|
200
|
+
readonly actions: readonly {
|
|
201
|
+
readonly action: string;
|
|
202
|
+
readonly connectionId?: string;
|
|
203
|
+
}[];
|
|
204
|
+
};
|
|
205
|
+
export type ConnectorCapability = ConnectorAccessCapability | ConnectorActionCapability | ConnectorPermissionCapability;
|
|
206
|
+
export declare function decodeConnectorCapabilities(value: unknown): readonly ConnectorCapability[];
|
|
107
207
|
interface TaskDefinitionBase {
|
|
108
208
|
readonly inputs: readonly (InputPort | Group)[];
|
|
109
209
|
readonly name: string;
|
|
@@ -129,6 +229,7 @@ export type TaskNode = GraphNodeBase & {
|
|
|
129
229
|
readonly taskId: string;
|
|
130
230
|
});
|
|
131
231
|
export interface Graph {
|
|
232
|
+
readonly edges: readonly GraphEdge[];
|
|
132
233
|
readonly nodes: Readonly<Record<string, GraphNode>>;
|
|
133
234
|
}
|
|
134
235
|
export type TriggerSchedule = {
|
|
@@ -141,13 +242,13 @@ export type TriggerSchedule = {
|
|
|
141
242
|
readonly value: number;
|
|
142
243
|
};
|
|
143
244
|
interface TriggerKeySnapshotBase {
|
|
144
|
-
readonly
|
|
245
|
+
readonly configInputs: readonly (InputPort | Group)[];
|
|
145
246
|
readonly definitionVersion: number;
|
|
146
247
|
readonly description: string;
|
|
147
248
|
readonly displayName: string;
|
|
148
249
|
readonly key: string;
|
|
149
250
|
readonly name: string;
|
|
150
|
-
readonly
|
|
251
|
+
readonly outputs: readonly Port[];
|
|
151
252
|
readonly provider: string;
|
|
152
253
|
}
|
|
153
254
|
export type IntegrationEndpointMethod = 'DELETE' | 'GET' | 'HEAD' | 'PATCH' | 'POST' | 'PUT';
|
|
@@ -167,12 +268,10 @@ export type TriggerKeySnapshot = (TriggerKeySnapshotBase & {
|
|
|
167
268
|
readonly endpoint: IntegrationEndpointDeclaration;
|
|
168
269
|
readonly type: 'integration';
|
|
169
270
|
});
|
|
170
|
-
export interface
|
|
271
|
+
export interface WebhookBodyField extends InputPort {
|
|
171
272
|
}
|
|
172
273
|
export interface WebhookOptions {
|
|
173
|
-
readonly allowedMethods?: readonly string[];
|
|
174
274
|
readonly allowedOrigins?: readonly string[];
|
|
175
|
-
readonly noResponseBody?: boolean;
|
|
176
275
|
readonly responseData?: string;
|
|
177
276
|
readonly responseHeaders?: Readonly<Record<string, string>>;
|
|
178
277
|
readonly responseStatusCode?: number;
|
|
@@ -183,32 +282,35 @@ interface TriggerNodeBase {
|
|
|
183
282
|
readonly name: string;
|
|
184
283
|
}
|
|
185
284
|
export type TriggerNode = (TriggerNodeBase & {
|
|
186
|
-
readonly
|
|
285
|
+
readonly kind: 'manual';
|
|
286
|
+
}) | (TriggerNodeBase & {
|
|
287
|
+
readonly bodyFields: readonly WebhookBodyField[];
|
|
187
288
|
readonly kind: 'webhook';
|
|
289
|
+
readonly method: WebhookMethod;
|
|
188
290
|
readonly options?: WebhookOptions;
|
|
189
291
|
}) | (TriggerNodeBase & {
|
|
190
292
|
readonly cronTimes: readonly TriggerSchedule[];
|
|
191
293
|
readonly kind: 'cron';
|
|
192
294
|
}) | (TriggerNodeBase & {
|
|
193
|
-
readonly
|
|
194
|
-
readonly config:
|
|
295
|
+
readonly connectionId?: string;
|
|
296
|
+
readonly config: InputValues;
|
|
195
297
|
readonly definition: TriggerKeySnapshot & {
|
|
196
298
|
readonly type: 'poll';
|
|
197
299
|
};
|
|
198
300
|
readonly kind: 'poll';
|
|
199
301
|
readonly pollTimes: readonly TriggerSchedule[];
|
|
200
302
|
}) | (TriggerNodeBase & {
|
|
201
|
-
readonly
|
|
202
|
-
readonly config:
|
|
303
|
+
readonly connectionId?: string;
|
|
304
|
+
readonly config: InputValues;
|
|
203
305
|
readonly definition: TriggerKeySnapshot & {
|
|
204
306
|
readonly type: 'integration';
|
|
205
307
|
};
|
|
206
308
|
readonly kind: 'integration';
|
|
207
309
|
});
|
|
208
|
-
export type GraphNode = ConditionNode | SubflowNode | TaskNode | TriggerNode | ValueNode | WaitNode;
|
|
310
|
+
export type GraphNode = ApprovalNode | ConditionNode | SubflowNode | TaskNode | TriggerNode | ValueNode | WaitNode;
|
|
209
311
|
export interface FlowDocument {
|
|
210
312
|
readonly bindings: Readonly<Record<string, {
|
|
211
|
-
readonly kind: '
|
|
313
|
+
readonly kind: 'variable';
|
|
212
314
|
readonly target: string;
|
|
213
315
|
}>>;
|
|
214
316
|
readonly graph: Graph;
|
|
@@ -227,7 +329,7 @@ export interface CodeModule {
|
|
|
227
329
|
}
|
|
228
330
|
export interface RevisionContent {
|
|
229
331
|
readonly document: FlowDocument;
|
|
230
|
-
readonly modelVersion:
|
|
332
|
+
readonly modelVersion: 2 | typeof currentFlowModelVersion;
|
|
231
333
|
readonly modules: Readonly<Record<string, CodeModule>>;
|
|
232
334
|
}
|
|
233
335
|
export type GraphTarget = {
|
|
@@ -238,21 +340,30 @@ export type GraphTarget = {
|
|
|
238
340
|
};
|
|
239
341
|
export interface GraphEdge {
|
|
240
342
|
readonly source: string;
|
|
241
|
-
readonly sourceHandle
|
|
343
|
+
readonly sourceHandle?: string;
|
|
242
344
|
readonly target: string;
|
|
243
|
-
readonly targetHandle: string;
|
|
244
345
|
}
|
|
346
|
+
export declare function normalizeNodeName(value: string): string;
|
|
347
|
+
export declare function nextNodeName(value: string, names: Iterable<string>): string;
|
|
348
|
+
export declare function nodeNameIssue(graph: Graph, nodeId: string, value: string): 'duplicate' | 'empty' | undefined;
|
|
245
349
|
export type ChangeOperation = {
|
|
350
|
+
readonly before?: readonly ConnectorCapability[];
|
|
351
|
+
readonly kind: 'graph.node.task.capabilities.set';
|
|
352
|
+
readonly nodeId: string;
|
|
353
|
+
readonly target: GraphTarget;
|
|
354
|
+
readonly value?: readonly ConnectorCapability[];
|
|
355
|
+
} | {
|
|
246
356
|
readonly binding: FlowDocument['bindings'][string];
|
|
247
357
|
readonly bindingId: string;
|
|
248
358
|
readonly kind: 'binding.create';
|
|
249
359
|
} | {
|
|
250
|
-
readonly binding: FlowDocument['bindings'][string];
|
|
251
360
|
readonly bindingId: string;
|
|
252
|
-
readonly kind: 'binding.
|
|
361
|
+
readonly kind: 'binding.delete';
|
|
253
362
|
} | {
|
|
363
|
+
readonly before: string;
|
|
254
364
|
readonly bindingId: string;
|
|
255
|
-
readonly kind: 'binding.
|
|
365
|
+
readonly kind: 'binding.target.set';
|
|
366
|
+
readonly value: string;
|
|
256
367
|
} | {
|
|
257
368
|
readonly kind: 'graph.edge.connect';
|
|
258
369
|
readonly edge: GraphEdge;
|
|
@@ -261,6 +372,18 @@ export type ChangeOperation = {
|
|
|
261
372
|
readonly kind: 'graph.edge.disconnect';
|
|
262
373
|
readonly edge: GraphEdge;
|
|
263
374
|
readonly target: GraphTarget;
|
|
375
|
+
} | {
|
|
376
|
+
readonly before?: readonly InputPort[];
|
|
377
|
+
readonly kind: 'graph.node.additional-inputs.set';
|
|
378
|
+
readonly nodeId: string;
|
|
379
|
+
readonly target: GraphTarget;
|
|
380
|
+
readonly value?: readonly InputPort[];
|
|
381
|
+
} | {
|
|
382
|
+
readonly before: Pick<ConditionNode, 'cases' | 'matchMode'>;
|
|
383
|
+
readonly kind: 'graph.node.condition.set';
|
|
384
|
+
readonly nodeId: string;
|
|
385
|
+
readonly target: GraphTarget;
|
|
386
|
+
readonly value: Pick<ConditionNode, 'cases' | 'matchMode'>;
|
|
264
387
|
} | {
|
|
265
388
|
readonly kind: 'graph.node.create';
|
|
266
389
|
readonly node: GraphNode;
|
|
@@ -271,10 +394,68 @@ export type ChangeOperation = {
|
|
|
271
394
|
readonly nodeId: string;
|
|
272
395
|
readonly target: GraphTarget;
|
|
273
396
|
} | {
|
|
274
|
-
readonly
|
|
275
|
-
readonly
|
|
397
|
+
readonly before?: number | string;
|
|
398
|
+
readonly field: 'connectionId' | 'description' | 'icon' | 'maxExecutions' | 'name' | 'timeoutMs';
|
|
399
|
+
readonly kind: 'graph.node.field.set';
|
|
400
|
+
readonly nodeId: string;
|
|
401
|
+
readonly target: GraphTarget;
|
|
402
|
+
readonly value?: number | string;
|
|
403
|
+
} | {
|
|
404
|
+
readonly before?: InputMapping;
|
|
405
|
+
readonly handle: string;
|
|
406
|
+
readonly kind: 'graph.node.input.set';
|
|
407
|
+
readonly nodeId: string;
|
|
408
|
+
readonly target: GraphTarget;
|
|
409
|
+
readonly value?: InputMapping;
|
|
410
|
+
} | {
|
|
411
|
+
readonly before: Pick<InlineTaskDefinition, 'inputs' | 'outputs'>;
|
|
412
|
+
readonly kind: 'graph.node.task.ports.set';
|
|
413
|
+
readonly nodeId: string;
|
|
414
|
+
readonly target: GraphTarget;
|
|
415
|
+
readonly value: Pick<InlineTaskDefinition, 'inputs' | 'outputs'>;
|
|
416
|
+
} | {
|
|
417
|
+
readonly before: string;
|
|
418
|
+
readonly kind: 'graph.node.task.name.set';
|
|
419
|
+
readonly nodeId: string;
|
|
420
|
+
readonly target: GraphTarget;
|
|
421
|
+
readonly value: string;
|
|
422
|
+
} | {
|
|
423
|
+
readonly before: readonly InputPort[];
|
|
424
|
+
readonly kind: 'graph.node.values.set';
|
|
276
425
|
readonly nodeId: string;
|
|
277
426
|
readonly target: GraphTarget;
|
|
427
|
+
readonly value: readonly InputPort[];
|
|
428
|
+
} | {
|
|
429
|
+
readonly before: Pick<ResolutionNode, 'inputDefinitions' | 'prompt'>;
|
|
430
|
+
readonly kind: 'graph.node.resolution.set';
|
|
431
|
+
readonly nodeId: string;
|
|
432
|
+
readonly target: Extract<GraphTarget, {
|
|
433
|
+
readonly kind: 'flow';
|
|
434
|
+
}>;
|
|
435
|
+
readonly value: Pick<ResolutionNode, 'inputDefinitions' | 'prompt'>;
|
|
436
|
+
} | {
|
|
437
|
+
readonly before: Pick<Extract<TriggerNode, {
|
|
438
|
+
readonly kind: 'webhook';
|
|
439
|
+
}>, 'bodyFields' | 'method' | 'options'>;
|
|
440
|
+
readonly kind: 'graph.node.webhook.set';
|
|
441
|
+
readonly nodeId: string;
|
|
442
|
+
readonly target: Extract<GraphTarget, {
|
|
443
|
+
readonly kind: 'flow';
|
|
444
|
+
}>;
|
|
445
|
+
readonly value: Pick<Extract<TriggerNode, {
|
|
446
|
+
readonly kind: 'webhook';
|
|
447
|
+
}>, 'bodyFields' | 'method' | 'options'>;
|
|
448
|
+
} | {
|
|
449
|
+
readonly before?: FixedInputValue;
|
|
450
|
+
readonly kind: 'graph.trigger.config.set';
|
|
451
|
+
readonly name: string;
|
|
452
|
+
readonly nodeId: string;
|
|
453
|
+
readonly value?: FixedInputValue;
|
|
454
|
+
} | {
|
|
455
|
+
readonly before: readonly TriggerSchedule[];
|
|
456
|
+
readonly kind: 'graph.trigger.schedule.set';
|
|
457
|
+
readonly nodeId: string;
|
|
458
|
+
readonly value: readonly TriggerSchedule[];
|
|
278
459
|
} | {
|
|
279
460
|
readonly kind: 'module.create';
|
|
280
461
|
readonly module: CodeModule;
|
|
@@ -283,10 +464,13 @@ export type ChangeOperation = {
|
|
|
283
464
|
readonly kind: 'module.delete';
|
|
284
465
|
readonly moduleId: string;
|
|
285
466
|
} | {
|
|
467
|
+
readonly before: string;
|
|
286
468
|
readonly kind: 'module.rename';
|
|
287
469
|
readonly moduleId: string;
|
|
288
470
|
readonly name: string;
|
|
289
471
|
} | {
|
|
472
|
+
readonly beforeImports: readonly string[];
|
|
473
|
+
readonly beforeSource: string;
|
|
290
474
|
readonly imports: readonly string[];
|
|
291
475
|
readonly kind: 'module.source.replace';
|
|
292
476
|
readonly moduleId: string;
|
|
@@ -296,8 +480,9 @@ export type ChangeOperation = {
|
|
|
296
480
|
readonly subflow: FlowDocument['subflows'][string];
|
|
297
481
|
readonly subflowId: string;
|
|
298
482
|
} | {
|
|
483
|
+
readonly before: Omit<FlowDocument['subflows'][string], 'graph'>;
|
|
299
484
|
readonly definition: Omit<FlowDocument['subflows'][string], 'graph'>;
|
|
300
|
-
readonly kind: 'subflow.definition.
|
|
485
|
+
readonly kind: 'subflow.definition.set';
|
|
301
486
|
readonly subflowId: string;
|
|
302
487
|
} | {
|
|
303
488
|
readonly kind: 'subflow.delete';
|
|
@@ -306,15 +491,31 @@ export type ChangeOperation = {
|
|
|
306
491
|
readonly kind: 'task.create';
|
|
307
492
|
readonly task: FlowDocument['tasks'][string];
|
|
308
493
|
readonly taskId: string;
|
|
494
|
+
} | {
|
|
495
|
+
readonly before?: string;
|
|
496
|
+
readonly kind: 'task.connector.connection.set';
|
|
497
|
+
readonly taskId: string;
|
|
498
|
+
readonly value?: string;
|
|
309
499
|
} | {
|
|
310
500
|
readonly kind: 'task.delete';
|
|
311
501
|
readonly taskId: string;
|
|
312
502
|
} | {
|
|
313
|
-
readonly
|
|
314
|
-
readonly
|
|
503
|
+
readonly before: ManagedTaskDefinition;
|
|
504
|
+
readonly kind: 'task.agent.set';
|
|
505
|
+
readonly taskId: string;
|
|
506
|
+
readonly value: ManagedTaskDefinition;
|
|
507
|
+
} | {
|
|
508
|
+
readonly before: 'chat' | 'json';
|
|
509
|
+
readonly kind: 'task.llm.mode.set';
|
|
510
|
+
readonly taskId: string;
|
|
511
|
+
readonly value: 'chat' | 'json';
|
|
512
|
+
} | {
|
|
513
|
+
readonly before: string;
|
|
514
|
+
readonly kind: 'task.name.set';
|
|
315
515
|
readonly taskId: string;
|
|
516
|
+
readonly value: string;
|
|
316
517
|
};
|
|
317
518
|
export declare class FlowChangeError extends Error {
|
|
519
|
+
constructor(message: string);
|
|
318
520
|
}
|
|
319
521
|
export declare function applyFlowChanges(content: RevisionContent, operations: readonly ChangeOperation[]): RevisionContent;
|
|
320
|
-
export {};
|