@oomol-lab/open-flow 0.1.0-beta.55 → 0.1.0-beta.57

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.
Files changed (51) hide show
  1. package/README.md +1 -1
  2. package/dist/browser/{createResourceDialog-4H5_lZ6s.js → createResourceDialog-C23SBjYd.js} +2 -2
  3. package/dist/browser/flow-authoring-edge.d.ts +3 -3
  4. package/dist/browser/flow-authoring-node.d.ts +30 -46
  5. package/dist/browser/flow-authoring.js +9215 -21030
  6. package/dist/browser/flow-change-schema.d.ts +267 -1
  7. package/dist/browser/flow-change.d.ts +19 -104
  8. package/dist/browser/flow-change.js +154 -298
  9. package/dist/browser/{flowChanges-ZzG-f9cg.js → flowChanges-fBiAeTzR.js} +2347 -2216
  10. package/dist/browser/{flowWorkspace-ChpRaTMX.js → flowWorkspace-MqcEfg7T.js} +118 -293
  11. package/dist/browser/{icons-CdAB9wyS.js → icons-6oQ8Q9Wm.js} +4309 -4454
  12. package/dist/browser/lib-DrKav3HG.js +11403 -0
  13. package/dist/browser/preview.css +1 -1
  14. package/dist/browser/preview.js +9609 -9548
  15. package/dist/browser/ui-idTooltip.d.ts +11 -0
  16. package/dist/browser/ui.d.ts +5 -0
  17. package/dist/browser/ui.js +83 -1
  18. package/dist/browser/workbench.css +1 -1
  19. package/dist/browser/workbench.js +227 -417
  20. package/dist/browser/{workbenchSelect-BRZN4ish.js → workbenchSelect-DpLbIr29.js} +1 -1
  21. package/dist/common/authoring.d.ts +207 -0
  22. package/dist/common/authoringSchema.d.ts +1293 -0
  23. package/dist/common/control-api-conformance.js +1060 -623
  24. package/dist/common/control-api-errors.d.ts +2 -1
  25. package/dist/common/control-api.d.ts +87 -6
  26. package/dist/common/control-api.js +1058 -705
  27. package/dist/common/control-requests.d.ts +128 -0
  28. package/dist/common/control-requests.js +2913 -1145
  29. package/dist/common/decision.js +6337 -6371
  30. package/dist/common/flow-agent.d.ts +1 -1
  31. package/dist/common/flow-connectionUsage.d.ts +1 -2
  32. package/dist/common/flow-encoding.d.ts +2 -4
  33. package/dist/common/flow-encoding.js +131 -182
  34. package/dist/common/flow-graph.d.ts +10 -10
  35. package/dist/common/flow-semantics.d.ts +13 -9
  36. package/dist/common/flow-semantics.js +9051 -9232
  37. package/dist/common/flowInspection.d.ts +3 -21
  38. package/dist/common/integration-trigger.js +8653 -8687
  39. package/dist/common/lib-DrKav3HG.js +11403 -0
  40. package/dist/common/mcp.d.ts +120 -12
  41. package/dist/common/mcp.js +537 -188
  42. package/dist/common/openapi.js +6337 -6371
  43. package/dist/common/poll-trigger.js +8653 -8687
  44. package/dist/common/run-events.js +0 -1
  45. package/dist/common/scheduler.d.ts +3 -9
  46. package/dist/common/scheduler.js +128 -209
  47. package/dist/common/webhook-trigger.js +6337 -6371
  48. package/package.json +7 -1
  49. package/skills/open-flow/SKILL.md +32 -0
  50. package/skills/open-flow/references/flow-authoring.md +356 -0
  51. package/skills/open-flow/references/flow-n8n-conversion.md +196 -0
@@ -1,5 +1,271 @@
1
1
  import type { ChangeOperation, FlowDocument, JsonValue, RevisionContent } from './flow-change.js';
2
- export declare const currentFlowModelVersion = 5;
2
+ import { z } from 'zod';
3
+ export declare const currentFlowModelVersion = 6;
4
+ /** Configuration schemas shared by the node authoring boundary. */
5
+ export declare const authoringDefinitionSchemas: {
6
+ input: z.ZodObject<{
7
+ description: z.ZodOptional<z.ZodString>;
8
+ jsonSchema: z.ZodJSONSchema;
9
+ nullable: z.ZodBoolean;
10
+ handle: z.ZodString;
11
+ value: z.ZodOptional<z.ZodJSONSchema>;
12
+ }, z.core.$strip>;
13
+ port: z.ZodObject<{
14
+ description: z.ZodOptional<z.ZodString>;
15
+ jsonSchema: z.ZodJSONSchema;
16
+ nullable: z.ZodBoolean;
17
+ handle: z.ZodString;
18
+ }, z.core.$strip>;
19
+ ports: {
20
+ inputs: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
21
+ description: z.ZodOptional<z.ZodString>;
22
+ jsonSchema: z.ZodJSONSchema;
23
+ nullable: z.ZodBoolean;
24
+ handle: z.ZodString;
25
+ value: z.ZodOptional<z.ZodJSONSchema>;
26
+ }, z.core.$strip>, z.ZodObject<{
27
+ collapsed: z.ZodOptional<z.ZodBoolean>;
28
+ group: z.ZodString;
29
+ }, z.core.$strip>]>>;
30
+ outputs: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
31
+ description: z.ZodOptional<z.ZodString>;
32
+ jsonSchema: z.ZodJSONSchema;
33
+ nullable: z.ZodBoolean;
34
+ handle: z.ZodString;
35
+ }, z.core.$strip>, z.ZodObject<{
36
+ collapsed: z.ZodOptional<z.ZodBoolean>;
37
+ group: z.ZodString;
38
+ }, z.core.$strip>]>>;
39
+ };
40
+ condition: z.ZodObject<{
41
+ matchMode: z.ZodEnum<{
42
+ all: "all";
43
+ first: "first";
44
+ }>;
45
+ cases: z.ZodArray<z.ZodObject<{
46
+ description: z.ZodOptional<z.ZodString>;
47
+ output: z.ZodString;
48
+ groups: z.ZodArray<z.ZodObject<{
49
+ expressions: z.ZodArray<z.ZodObject<{
50
+ left: z.ZodUnion<readonly [z.ZodObject<{
51
+ kind: z.ZodLiteral<"value">;
52
+ value: z.ZodOptional<z.ZodJSONSchema>;
53
+ jsonSchema: z.ZodOptional<z.ZodJSONSchema>;
54
+ }, z.core.$strip>, z.ZodObject<{
55
+ kind: z.ZodLiteral<"source">;
56
+ source: z.ZodUnion<readonly [z.ZodObject<{
57
+ kind: z.ZodLiteral<"node">;
58
+ nodeId: z.ZodString;
59
+ output: z.ZodString;
60
+ field: z.ZodOptional<z.ZodString>;
61
+ }, z.core.$strip>, z.ZodObject<{
62
+ kind: z.ZodLiteral<"binding">;
63
+ bindingId: z.ZodString;
64
+ }, z.core.$strip>]>;
65
+ }, z.core.$strip>]>;
66
+ operator: z.ZodEnum<{
67
+ "!=": "!=";
68
+ "<": "<";
69
+ "<=": "<=";
70
+ "==": "==";
71
+ ">": ">";
72
+ ">=": ">=";
73
+ contains: "contains";
74
+ endsWith: "endsWith";
75
+ hasKey: "hasKey";
76
+ hasValue: "hasValue";
77
+ isEmpty: "isEmpty";
78
+ isFalse: "isFalse";
79
+ isNotEmpty: "isNotEmpty";
80
+ isNotNull: "isNotNull";
81
+ isNull: "isNull";
82
+ isTrue: "isTrue";
83
+ notContains: "notContains";
84
+ notHasKey: "notHasKey";
85
+ notHasValue: "notHasValue";
86
+ startsWith: "startsWith";
87
+ }>;
88
+ right: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
89
+ kind: z.ZodLiteral<"value">;
90
+ value: z.ZodOptional<z.ZodJSONSchema>;
91
+ jsonSchema: z.ZodOptional<z.ZodJSONSchema>;
92
+ }, z.core.$strip>, z.ZodObject<{
93
+ kind: z.ZodLiteral<"source">;
94
+ source: z.ZodUnion<readonly [z.ZodObject<{
95
+ kind: z.ZodLiteral<"node">;
96
+ nodeId: z.ZodString;
97
+ output: z.ZodString;
98
+ field: z.ZodOptional<z.ZodString>;
99
+ }, z.core.$strip>, z.ZodObject<{
100
+ kind: z.ZodLiteral<"binding">;
101
+ bindingId: z.ZodString;
102
+ }, z.core.$strip>]>;
103
+ }, z.core.$strip>]>>;
104
+ }, z.core.$strip>>;
105
+ }, z.core.$strip>>;
106
+ }, z.core.$strip>>;
107
+ }, z.core.$strict>;
108
+ wait: z.ZodObject<{
109
+ inputDefinitions: z.ZodArray<z.ZodObject<{
110
+ description: z.ZodOptional<z.ZodString>;
111
+ jsonSchema: z.ZodJSONSchema;
112
+ nullable: z.ZodBoolean;
113
+ handle: z.ZodString;
114
+ value: z.ZodOptional<z.ZodJSONSchema>;
115
+ }, z.core.$strip>>;
116
+ prompt: z.ZodString;
117
+ }, z.core.$strict>;
118
+ webhook: z.ZodObject<{
119
+ bodyFields: z.ZodArray<z.ZodObject<{
120
+ description: z.ZodOptional<z.ZodString>;
121
+ jsonSchema: z.ZodJSONSchema;
122
+ nullable: z.ZodBoolean;
123
+ handle: z.ZodString;
124
+ value: z.ZodOptional<z.ZodJSONSchema>;
125
+ }, z.core.$strip>>;
126
+ method: z.ZodEnum<{
127
+ DELETE: "DELETE";
128
+ GET: "GET";
129
+ PATCH: "PATCH";
130
+ POST: "POST";
131
+ PUT: "PUT";
132
+ }>;
133
+ options: z.ZodOptional<z.ZodObject<{
134
+ allowedMethods: z.ZodOptional<z.ZodNever>;
135
+ allowedOrigins: z.ZodOptional<z.ZodArray<z.ZodString>>;
136
+ noResponseBody: z.ZodOptional<z.ZodNever>;
137
+ responseData: z.ZodOptional<z.ZodString>;
138
+ responseHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
139
+ responseStatusCode: z.ZodOptional<z.ZodNumber>;
140
+ }, z.core.$strip>>;
141
+ }, z.core.$strict>;
142
+ schedule: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
143
+ type: z.ZodLiteral<"cron">;
144
+ expression: z.ZodString;
145
+ timezone: z.ZodString;
146
+ }, z.core.$strip>, z.ZodObject<{
147
+ type: z.ZodLiteral<"every">;
148
+ unit: z.ZodEnum<{
149
+ day: "day";
150
+ hour: "hour";
151
+ minute: "minute";
152
+ month: "month";
153
+ week: "week";
154
+ }>;
155
+ value: z.ZodNumber;
156
+ }, z.core.$strip>]>>;
157
+ capabilities: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
158
+ kind: z.ZodLiteral<"connector">;
159
+ action: z.ZodString;
160
+ connectionId: z.ZodOptional<z.ZodString>;
161
+ connections: z.ZodArray<z.ZodObject<{
162
+ connectionId: z.ZodString;
163
+ alias: z.ZodOptional<z.ZodString>;
164
+ }, z.core.$strict>>;
165
+ }, z.core.$strict>, z.ZodObject<{
166
+ kind: z.ZodLiteral<"connector">;
167
+ mode: z.ZodLiteral<"shared">;
168
+ }, z.core.$strict>, z.ZodObject<{
169
+ kind: z.ZodLiteral<"connector">;
170
+ mode: z.ZodLiteral<"independent">;
171
+ actions: z.ZodArray<z.ZodObject<{
172
+ action: z.ZodString;
173
+ connectionId: z.ZodOptional<z.ZodString>;
174
+ }, z.core.$strict>>;
175
+ }, z.core.$strict>, z.ZodObject<{
176
+ kind: z.ZodLiteral<"connector">;
177
+ actionHints: z.ZodOptional<z.ZodArray<z.ZodString>>;
178
+ connectionHints: z.ZodOptional<z.ZodArray<z.ZodObject<{
179
+ action: z.ZodString;
180
+ connectionId: z.ZodString;
181
+ alias: z.ZodOptional<z.ZodString>;
182
+ }, z.core.$strict>>>;
183
+ }, z.core.$strict>]>>;
184
+ connector: z.ZodObject<{
185
+ action: z.ZodString;
186
+ connectionId: z.ZodOptional<z.ZodString>;
187
+ }, z.core.$strict>;
188
+ openapi: z.ZodObject<{
189
+ sourceUrl: z.ZodString;
190
+ method: z.ZodString;
191
+ path: z.ZodString;
192
+ serverUrl: z.ZodString;
193
+ document: z.ZodJSONSchema;
194
+ auth: z.ZodArray<z.ZodObject<{
195
+ id: z.ZodString;
196
+ type: z.ZodEnum<{
197
+ apiKey: "apiKey";
198
+ basic: "basic";
199
+ bearer: "bearer";
200
+ }>;
201
+ name: z.ZodOptional<z.ZodString>;
202
+ in: z.ZodOptional<z.ZodEnum<{
203
+ header: "header";
204
+ query: "query";
205
+ }>>;
206
+ }, z.core.$strip>>;
207
+ }, z.core.$strict>;
208
+ decision: z.ZodObject<{
209
+ questions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
210
+ name: z.ZodString;
211
+ instructions: z.ZodString;
212
+ type: z.ZodLiteral<"noul">;
213
+ criteria: z.ZodOptional<z.ZodObject<{
214
+ true: z.ZodOptional<z.ZodString>;
215
+ false: z.ZodOptional<z.ZodString>;
216
+ }, z.core.$strict>>;
217
+ }, z.core.$strict>, z.ZodObject<{
218
+ name: z.ZodString;
219
+ instructions: z.ZodString;
220
+ type: z.ZodLiteral<"choice">;
221
+ criteria: z.ZodArray<z.ZodObject<{
222
+ name: z.ZodString;
223
+ description: z.ZodString;
224
+ }, z.core.$strict>>;
225
+ }, z.core.$strict>, z.ZodObject<{
226
+ name: z.ZodString;
227
+ instructions: z.ZodString;
228
+ type: z.ZodLiteral<"score">;
229
+ criteria: z.ZodArray<z.ZodString>;
230
+ }, z.core.$strict>], "type">>;
231
+ }, z.core.$strict>;
232
+ llm: z.ZodObject<{
233
+ mode: z.ZodEnum<{
234
+ chat: "chat";
235
+ json: "json";
236
+ }>;
237
+ }, z.core.$strict>;
238
+ agent: z.ZodObject<{
239
+ code: z.ZodOptional<z.ZodBoolean>;
240
+ model: z.ZodString;
241
+ prompt: z.ZodString;
242
+ maxRounds: z.ZodNumber;
243
+ tools: z.ZodArray<z.ZodObject<{
244
+ id: z.ZodString;
245
+ name: z.ZodString;
246
+ description: z.ZodString;
247
+ action: z.ZodString;
248
+ connectionId: z.ZodOptional<z.ZodString>;
249
+ approval: z.ZodBoolean;
250
+ inputs: z.ZodArray<z.ZodObject<{
251
+ description: z.ZodOptional<z.ZodString>;
252
+ jsonSchema: z.ZodJSONSchema;
253
+ nullable: z.ZodBoolean;
254
+ handle: z.ZodString;
255
+ value: z.ZodOptional<z.ZodJSONSchema>;
256
+ source: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
257
+ kind: z.ZodLiteral<"value">;
258
+ value: z.ZodJSONSchema;
259
+ }, z.core.$strip>, z.ZodObject<{
260
+ kind: z.ZodLiteral<"input">;
261
+ input: z.ZodString;
262
+ }, z.core.$strip>]>, z.ZodObject<{
263
+ kind: z.ZodLiteral<"model">;
264
+ }, z.core.$strip>]>;
265
+ }, z.core.$strip>>;
266
+ }, z.core.$strip>>;
267
+ }, z.core.$strict>;
268
+ };
3
269
  /** Best-effort recovery for a parseable Revision envelope. Invalid collection entries are discarded. */
4
270
  export declare function repairRevisionEnvelope(value: unknown): RevisionContent;
5
271
  export declare function decodeFlowDocument(value: unknown): FlowDocument;
@@ -40,10 +40,6 @@ export interface NodeSource {
40
40
  readonly nodeId: string;
41
41
  readonly output: string;
42
42
  }
43
- export interface FlowSource {
44
- readonly input: string;
45
- readonly kind: 'flow';
46
- }
47
43
  export interface BindingSource {
48
44
  readonly bindingId: string;
49
45
  readonly kind: 'binding';
@@ -57,11 +53,8 @@ export type FixedInputValue = {
57
53
  export type InputValues = Readonly<Record<string, FixedInputValue>>;
58
54
  export type InputMapping = FixedInputValue | {
59
55
  readonly kind: 'sources';
60
- readonly sources: readonly (BindingSource | FlowSource | NodeSource)[];
56
+ readonly sources: readonly (BindingSource | NodeSource)[];
61
57
  };
62
- export interface OutputMapping {
63
- readonly sources: readonly (FlowSource | NodeSource)[];
64
- }
65
58
  interface GraphNodeBase {
66
59
  readonly description?: string;
67
60
  readonly icon?: string;
@@ -70,10 +63,6 @@ interface GraphNodeBase {
70
63
  readonly maxExecutions?: number;
71
64
  readonly timeoutMs?: number;
72
65
  }
73
- export interface SubflowNode extends GraphNodeBase {
74
- readonly kind: 'subflow';
75
- readonly subflowId: string;
76
- }
77
66
  export interface ValueNode extends GraphNodeBase {
78
67
  readonly kind: 'value';
79
68
  readonly values: readonly InputPort[];
@@ -92,7 +81,7 @@ export interface ApprovalNode extends ResolutionNodeBase {
92
81
  }
93
82
  export type ResolutionNode = ApprovalNode | WaitNode;
94
83
  export type ConditionOperator = '!=' | '<' | '<=' | '==' | '>' | '>=' | 'contains' | 'endsWith' | 'hasKey' | 'hasValue' | 'isEmpty' | 'isFalse' | 'isNotEmpty' | 'isNotNull' | 'isNull' | 'isTrue' | 'notContains' | 'notHasKey' | 'notHasValue' | 'startsWith';
95
- export type Source = BindingSource | FlowSource | NodeSource;
84
+ export type Source = BindingSource | NodeSource;
96
85
  export type ConditionOperand = {
97
86
  readonly kind: 'value';
98
87
  readonly value?: JsonValue;
@@ -134,7 +123,9 @@ export type ManagedTaskExecutor = import('../common/decision.js').DecisionExecut
134
123
  readonly maxRounds: number;
135
124
  readonly tools: readonly AgentTool[];
136
125
  readonly notification?: {
137
- readonly taskId: string;
126
+ readonly action: string;
127
+ readonly connectionId?: string;
128
+ readonly inputDefinitions: readonly InputPort[];
138
129
  readonly messageHandle: string;
139
130
  readonly inputs: Readonly<Record<string, Exclude<AgentInput, {
140
131
  readonly kind: 'model';
@@ -205,17 +196,11 @@ export interface ManagedTaskDefinition extends TaskDefinitionBase {
205
196
  readonly executor: ManagedTaskExecutor;
206
197
  }
207
198
  export type TaskDefinition = InlineTaskDefinition | ManagedTaskDefinition;
208
- export type TaskNode = GraphNodeBase & {
199
+ export interface TaskNode extends GraphNodeBase {
209
200
  readonly kind: 'task';
210
- } & ({
211
- readonly additionalInputs?: readonly InputPort[];
212
- readonly task: InlineTaskDefinition;
213
- readonly taskId?: never;
214
- } | {
215
201
  readonly additionalInputs?: readonly InputPort[];
216
- readonly task?: never;
217
- readonly taskId: string;
218
- });
202
+ readonly task: TaskDefinition;
203
+ }
219
204
  export interface Graph {
220
205
  readonly edges: readonly GraphEdge[];
221
206
  readonly nodes: Readonly<Record<string, GraphNode>>;
@@ -298,20 +283,13 @@ export type TriggerNode = (TriggerNodeBase & {
298
283
  };
299
284
  readonly kind: 'integration';
300
285
  });
301
- export type GraphNode = ApprovalNode | ConditionNode | SubflowNode | TaskNode | TriggerNode | ValueNode | WaitNode;
286
+ export type GraphNode = ApprovalNode | ConditionNode | TaskNode | TriggerNode | ValueNode | WaitNode;
302
287
  export interface FlowDocument {
303
288
  readonly bindings: Readonly<Record<string, {
304
289
  readonly kind: 'variable';
305
290
  readonly target: string;
306
291
  }>>;
307
292
  readonly graph: Graph;
308
- readonly subflows: Readonly<Record<string, {
309
- readonly graph: Graph;
310
- readonly inputs: readonly InputPort[];
311
- readonly name: string;
312
- readonly outputs: readonly (OutputMapping & Port)[];
313
- }>>;
314
- readonly tasks: Readonly<Record<string, ManagedTaskDefinition>>;
315
293
  }
316
294
  export interface CodeModule {
317
295
  readonly imports: readonly string[];
@@ -320,15 +298,9 @@ export interface CodeModule {
320
298
  }
321
299
  export interface RevisionContent {
322
300
  readonly document: FlowDocument;
323
- readonly modelVersion: 2 | 4 | typeof currentFlowModelVersion;
301
+ readonly modelVersion: 2 | 4 | 5 | typeof currentFlowModelVersion;
324
302
  readonly modules: Readonly<Record<string, CodeModule>>;
325
303
  }
326
- export type GraphTarget = {
327
- readonly kind: 'flow';
328
- } | {
329
- readonly id: string;
330
- readonly kind: 'subflow';
331
- };
332
304
  export interface GraphEdge {
333
305
  readonly source: string;
334
306
  readonly sourceHandle?: string;
@@ -338,10 +310,14 @@ export declare function normalizeNodeName(value: string): string;
338
310
  export declare function nextNodeName(value: string, names: Iterable<string>): string;
339
311
  export declare function nodeNameIssue(graph: Graph, nodeId: string, value: string): 'duplicate' | 'empty' | undefined;
340
312
  export type ChangeOperation = {
313
+ readonly kind: 'graph.node.replace';
314
+ readonly nodeId: string;
315
+ readonly before: GraphNode;
316
+ readonly node: GraphNode;
317
+ } | {
341
318
  readonly before?: readonly ConnectorCapability[];
342
319
  readonly kind: 'graph.node.task.capabilities.set';
343
320
  readonly nodeId: string;
344
- readonly target: GraphTarget;
345
321
  readonly value?: readonly ConnectorCapability[];
346
322
  } | {
347
323
  readonly kind: 'graph.trigger.sources.set';
@@ -363,71 +339,57 @@ export type ChangeOperation = {
363
339
  } | {
364
340
  readonly kind: 'graph.edge.connect';
365
341
  readonly edge: GraphEdge;
366
- readonly target: GraphTarget;
367
342
  } | {
368
343
  readonly kind: 'graph.edge.disconnect';
369
344
  readonly edge: GraphEdge;
370
- readonly target: GraphTarget;
371
345
  } | {
372
346
  readonly before?: readonly InputPort[];
373
347
  readonly kind: 'graph.node.additional-inputs.set';
374
348
  readonly nodeId: string;
375
- readonly target: GraphTarget;
376
349
  readonly value?: readonly InputPort[];
377
350
  } | {
378
351
  readonly before: Pick<ConditionNode, 'cases' | 'matchMode'>;
379
352
  readonly kind: 'graph.node.condition.set';
380
353
  readonly nodeId: string;
381
- readonly target: GraphTarget;
382
354
  readonly value: Pick<ConditionNode, 'cases' | 'matchMode'>;
383
355
  } | {
384
356
  readonly kind: 'graph.node.create';
385
357
  readonly node: GraphNode;
386
358
  readonly nodeId: string;
387
- readonly target: GraphTarget;
388
359
  } | {
389
360
  readonly kind: 'graph.node.delete';
390
361
  readonly nodeId: string;
391
- readonly target: GraphTarget;
392
362
  } | {
393
363
  readonly before?: number | string;
394
364
  readonly field: 'connectionId' | 'description' | 'icon' | 'maxExecutions' | 'name' | 'timeoutMs';
395
365
  readonly kind: 'graph.node.field.set';
396
366
  readonly nodeId: string;
397
- readonly target: GraphTarget;
398
367
  readonly value?: number | string;
399
368
  } | {
400
369
  readonly before?: InputMapping;
401
370
  readonly handle: string;
402
371
  readonly kind: 'graph.node.input.set';
403
372
  readonly nodeId: string;
404
- readonly target: GraphTarget;
405
373
  readonly value?: InputMapping;
406
374
  } | {
407
375
  readonly before: Pick<InlineTaskDefinition, 'inputs' | 'outputs'>;
408
376
  readonly kind: 'graph.node.task.ports.set';
409
377
  readonly nodeId: string;
410
- readonly target: GraphTarget;
411
378
  readonly value: Pick<InlineTaskDefinition, 'inputs' | 'outputs'>;
412
379
  } | {
413
380
  readonly before: string;
414
381
  readonly kind: 'graph.node.task.name.set';
415
382
  readonly nodeId: string;
416
- readonly target: GraphTarget;
417
383
  readonly value: string;
418
384
  } | {
419
385
  readonly before: readonly InputPort[];
420
386
  readonly kind: 'graph.node.values.set';
421
387
  readonly nodeId: string;
422
- readonly target: GraphTarget;
423
388
  readonly value: readonly InputPort[];
424
389
  } | {
425
390
  readonly before: Pick<ResolutionNode, 'inputDefinitions' | 'prompt'>;
426
391
  readonly kind: 'graph.node.resolution.set';
427
392
  readonly nodeId: string;
428
- readonly target: Extract<GraphTarget, {
429
- readonly kind: 'flow';
430
- }>;
431
393
  readonly value: Pick<ResolutionNode, 'inputDefinitions' | 'prompt'>;
432
394
  } | {
433
395
  readonly before: Pick<Extract<TriggerNode, {
@@ -435,9 +397,6 @@ export type ChangeOperation = {
435
397
  }>, 'bodyFields' | 'method' | 'options'>;
436
398
  readonly kind: 'graph.node.webhook.set';
437
399
  readonly nodeId: string;
438
- readonly target: Extract<GraphTarget, {
439
- readonly kind: 'flow';
440
- }>;
441
400
  readonly value: Pick<Extract<TriggerNode, {
442
401
  readonly kind: 'webhook';
443
402
  }>, 'bodyFields' | 'method' | 'options'>;
@@ -472,54 +431,10 @@ export type ChangeOperation = {
472
431
  readonly moduleId: string;
473
432
  readonly source: string;
474
433
  } | {
475
- readonly kind: 'subflow.create';
476
- readonly subflow: FlowDocument['subflows'][string];
477
- readonly subflowId: string;
478
- } | {
479
- readonly before: Omit<FlowDocument['subflows'][string], 'graph'>;
480
- readonly definition: Omit<FlowDocument['subflows'][string], 'graph'>;
481
- readonly kind: 'subflow.definition.set';
482
- readonly subflowId: string;
483
- } | {
484
- readonly kind: 'subflow.delete';
485
- readonly subflowId: string;
486
- } | {
487
- readonly kind: 'task.create';
488
- readonly task: FlowDocument['tasks'][string];
489
- readonly taskId: string;
490
- } | {
491
- readonly before?: string;
492
- readonly kind: 'task.connector.connection.set';
493
- readonly taskId: string;
494
- readonly value?: string;
495
- } | {
496
- readonly kind: 'task.delete';
497
- readonly taskId: string;
498
- } | {
499
- readonly before: ManagedTaskDefinition;
500
- readonly kind: 'task.openapi.set';
501
- readonly taskId: string;
502
- readonly value: ManagedTaskDefinition;
503
- } | {
504
- readonly before: ManagedTaskDefinition;
505
- readonly kind: 'task.agent.set';
506
- readonly taskId: string;
507
- readonly value: ManagedTaskDefinition;
508
- } | {
509
- readonly before: ManagedTaskDefinition;
510
- readonly kind: 'task.decision.set';
511
- readonly taskId: string;
512
- readonly value: ManagedTaskDefinition;
513
- } | {
514
- readonly before: 'chat' | 'json';
515
- readonly kind: 'task.llm.mode.set';
516
- readonly taskId: string;
517
- readonly value: 'chat' | 'json';
518
- } | {
519
- readonly before: string;
520
- readonly kind: 'task.name.set';
521
- readonly taskId: string;
522
- readonly value: string;
434
+ readonly kind: 'graph.node.task.set';
435
+ readonly nodeId: string;
436
+ readonly before: TaskDefinition;
437
+ readonly value: TaskDefinition;
523
438
  };
524
439
  export declare class FlowChangeError extends Error {
525
440
  constructor(message: string);