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

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 (43) hide show
  1. package/README.md +1 -1
  2. package/dist/browser/{createResourceDialog-4H5_lZ6s.js → createResourceDialog-Btjes3wD.js} +2 -2
  3. package/dist/browser/flow-authoring-edge.d.ts +3 -3
  4. package/dist/browser/flow-authoring-node.d.ts +26 -46
  5. package/dist/browser/flow-authoring.js +9155 -21002
  6. package/dist/browser/flow-change-schema.d.ts +1 -1
  7. package/dist/browser/flow-change.d.ts +14 -104
  8. package/dist/browser/flow-change.js +121 -296
  9. package/dist/browser/{flowChanges-ZzG-f9cg.js → flowChanges-BxutPLYO.js} +1494 -1830
  10. package/dist/browser/{flowWorkspace-ChpRaTMX.js → flowWorkspace-Dg4mqfa6.js} +118 -293
  11. package/dist/browser/{icons-CdAB9wyS.js → icons-p2A9zs8t.js} +126 -317
  12. package/dist/browser/lib-DrKav3HG.js +11403 -0
  13. package/dist/browser/preview.css +1 -1
  14. package/dist/browser/preview.js +9308 -9565
  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 +210 -411
  20. package/dist/browser/{workbenchSelect-BRZN4ish.js → workbenchSelect-LRp_Xjeq.js} +1 -1
  21. package/dist/common/control-api-conformance.js +212 -245
  22. package/dist/common/control-api.d.ts +6 -6
  23. package/dist/common/control-api.js +216 -250
  24. package/dist/common/control-requests.js +468 -1476
  25. package/dist/common/decision.js +6325 -6369
  26. package/dist/common/flow-agent.d.ts +1 -1
  27. package/dist/common/flow-connectionUsage.d.ts +1 -2
  28. package/dist/common/flow-encoding.d.ts +2 -4
  29. package/dist/common/flow-encoding.js +119 -180
  30. package/dist/common/flow-graph.d.ts +10 -10
  31. package/dist/common/flow-semantics.d.ts +4 -9
  32. package/dist/common/flow-semantics.js +9024 -9230
  33. package/dist/common/flowInspection.d.ts +3 -21
  34. package/dist/common/integration-trigger.js +8642 -8686
  35. package/dist/common/mcp.d.ts +0 -1
  36. package/dist/common/mcp.js +117 -140
  37. package/dist/common/openapi.js +6325 -6369
  38. package/dist/common/poll-trigger.js +8642 -8686
  39. package/dist/common/run-events.js +0 -1
  40. package/dist/common/scheduler.d.ts +3 -9
  41. package/dist/common/scheduler.js +116 -207
  42. package/dist/common/webhook-trigger.js +6325 -6369
  43. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import type { ChangeOperation, FlowDocument, JsonValue, RevisionContent } from './flow-change.js';
2
- export declare const currentFlowModelVersion = 5;
2
+ export declare const currentFlowModelVersion = 6;
3
3
  /** Best-effort recovery for a parseable Revision envelope. Invalid collection entries are discarded. */
4
4
  export declare function repairRevisionEnvelope(value: unknown): RevisionContent;
5
5
  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;
@@ -341,7 +313,6 @@ export type ChangeOperation = {
341
313
  readonly before?: readonly ConnectorCapability[];
342
314
  readonly kind: 'graph.node.task.capabilities.set';
343
315
  readonly nodeId: string;
344
- readonly target: GraphTarget;
345
316
  readonly value?: readonly ConnectorCapability[];
346
317
  } | {
347
318
  readonly kind: 'graph.trigger.sources.set';
@@ -363,71 +334,57 @@ export type ChangeOperation = {
363
334
  } | {
364
335
  readonly kind: 'graph.edge.connect';
365
336
  readonly edge: GraphEdge;
366
- readonly target: GraphTarget;
367
337
  } | {
368
338
  readonly kind: 'graph.edge.disconnect';
369
339
  readonly edge: GraphEdge;
370
- readonly target: GraphTarget;
371
340
  } | {
372
341
  readonly before?: readonly InputPort[];
373
342
  readonly kind: 'graph.node.additional-inputs.set';
374
343
  readonly nodeId: string;
375
- readonly target: GraphTarget;
376
344
  readonly value?: readonly InputPort[];
377
345
  } | {
378
346
  readonly before: Pick<ConditionNode, 'cases' | 'matchMode'>;
379
347
  readonly kind: 'graph.node.condition.set';
380
348
  readonly nodeId: string;
381
- readonly target: GraphTarget;
382
349
  readonly value: Pick<ConditionNode, 'cases' | 'matchMode'>;
383
350
  } | {
384
351
  readonly kind: 'graph.node.create';
385
352
  readonly node: GraphNode;
386
353
  readonly nodeId: string;
387
- readonly target: GraphTarget;
388
354
  } | {
389
355
  readonly kind: 'graph.node.delete';
390
356
  readonly nodeId: string;
391
- readonly target: GraphTarget;
392
357
  } | {
393
358
  readonly before?: number | string;
394
359
  readonly field: 'connectionId' | 'description' | 'icon' | 'maxExecutions' | 'name' | 'timeoutMs';
395
360
  readonly kind: 'graph.node.field.set';
396
361
  readonly nodeId: string;
397
- readonly target: GraphTarget;
398
362
  readonly value?: number | string;
399
363
  } | {
400
364
  readonly before?: InputMapping;
401
365
  readonly handle: string;
402
366
  readonly kind: 'graph.node.input.set';
403
367
  readonly nodeId: string;
404
- readonly target: GraphTarget;
405
368
  readonly value?: InputMapping;
406
369
  } | {
407
370
  readonly before: Pick<InlineTaskDefinition, 'inputs' | 'outputs'>;
408
371
  readonly kind: 'graph.node.task.ports.set';
409
372
  readonly nodeId: string;
410
- readonly target: GraphTarget;
411
373
  readonly value: Pick<InlineTaskDefinition, 'inputs' | 'outputs'>;
412
374
  } | {
413
375
  readonly before: string;
414
376
  readonly kind: 'graph.node.task.name.set';
415
377
  readonly nodeId: string;
416
- readonly target: GraphTarget;
417
378
  readonly value: string;
418
379
  } | {
419
380
  readonly before: readonly InputPort[];
420
381
  readonly kind: 'graph.node.values.set';
421
382
  readonly nodeId: string;
422
- readonly target: GraphTarget;
423
383
  readonly value: readonly InputPort[];
424
384
  } | {
425
385
  readonly before: Pick<ResolutionNode, 'inputDefinitions' | 'prompt'>;
426
386
  readonly kind: 'graph.node.resolution.set';
427
387
  readonly nodeId: string;
428
- readonly target: Extract<GraphTarget, {
429
- readonly kind: 'flow';
430
- }>;
431
388
  readonly value: Pick<ResolutionNode, 'inputDefinitions' | 'prompt'>;
432
389
  } | {
433
390
  readonly before: Pick<Extract<TriggerNode, {
@@ -435,9 +392,6 @@ export type ChangeOperation = {
435
392
  }>, 'bodyFields' | 'method' | 'options'>;
436
393
  readonly kind: 'graph.node.webhook.set';
437
394
  readonly nodeId: string;
438
- readonly target: Extract<GraphTarget, {
439
- readonly kind: 'flow';
440
- }>;
441
395
  readonly value: Pick<Extract<TriggerNode, {
442
396
  readonly kind: 'webhook';
443
397
  }>, 'bodyFields' | 'method' | 'options'>;
@@ -472,54 +426,10 @@ export type ChangeOperation = {
472
426
  readonly moduleId: string;
473
427
  readonly source: string;
474
428
  } | {
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;
429
+ readonly kind: 'graph.node.task.set';
430
+ readonly nodeId: string;
431
+ readonly before: TaskDefinition;
432
+ readonly value: TaskDefinition;
523
433
  };
524
434
  export declare class FlowChangeError extends Error {
525
435
  constructor(message: string);