@oomol-lab/open-flow 0.1.0-beta.1 → 0.1.0-beta.11

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 (69) hide show
  1. package/dist/browser/DesignerIcon-ckcKnxxJ.js +2267 -0
  2. package/dist/browser/createResourceDialog-DhIU-HYW.js +111 -0
  3. package/dist/browser/{dist-CPuF50D9.js → dist-BZ5PTFAs.js} +1 -1
  4. package/dist/browser/dist-Bmb2mZvW.js +795 -0
  5. package/dist/browser/{dist-DWADUsVB.js → dist-By46o5UV.js} +47 -47
  6. package/dist/browser/dist-CP0883sY.js +4 -0
  7. package/dist/browser/{dist-CJpzJrLM.js → dist-Ce71Szg7.js} +894 -895
  8. package/dist/browser/dist-DSe6KRsr.js +1224 -0
  9. package/dist/browser/{dist-DUzA0Ukh.js → dist-DY4qlXTK.js} +140 -141
  10. package/dist/browser/{dist-3Mj8q8Pr.js → dist-DmuE3M0R.js} +53 -54
  11. package/dist/browser/{dist-BN4ZCyOB.js → dist-DpDLsYtO.js} +14 -15
  12. package/dist/browser/dist-DxahK_I8.js +2688 -0
  13. package/dist/browser/{esm-DGQbgYoJ.js → esm-C64_h7HF.js} +58 -59
  14. package/dist/browser/flow-authoring-module.d.ts +2 -2
  15. package/dist/browser/flow-authoring-node.d.ts +17 -7
  16. package/dist/browser/flow-authoring.d.ts +1 -1
  17. package/dist/browser/flow-authoring.js +5329 -286
  18. package/dist/browser/flow-change-schema.d.ts +3 -0
  19. package/dist/browser/flow-change.d.ts +131 -14
  20. package/dist/browser/flow-change.js +5216 -114
  21. package/dist/browser/flow-notifications.d.ts +5 -0
  22. package/dist/browser/flowChanges-BINNGoug.js +12896 -0
  23. package/dist/browser/{flowRunInputEditorStore-BeyUSWpO.js → flowRunInputEditorStore-NPGePkvP.js} +775 -776
  24. package/dist/browser/flowWorkspace-Dp_b8KXF.js +158409 -0
  25. package/dist/browser/{getPseudoElementBounds-ESJExRFX.js → getPseudoElementBounds-Dfqo78k7.js} +2051 -2542
  26. package/dist/browser/{languages-DgJehE1g.js → languages-i3Xmpt6S.js} +6 -15
  27. package/dist/browser/licenses.md +82 -0
  28. package/dist/browser/{markdownContent-DdlIRN3_.js → markdownContent-BawLYUjh.js} +24 -24
  29. package/dist/browser/select-CbQHq-GM.js +6851 -0
  30. package/dist/browser/theme.css +34 -34
  31. package/dist/browser/{typeScriptSession-mPCiA9sV.js → typeScriptSession-BoV-FDl3.js} +68 -69
  32. package/dist/browser/waitNotificationInputs-fzyKN6mk.js +29 -0
  33. package/dist/browser/workbench-contract.d.ts +8 -2
  34. package/dist/browser/workbench.css +1 -1
  35. package/dist/browser/workbench.d.ts +3 -1
  36. package/dist/browser/workbench.js +1647 -1299
  37. package/dist/browser/workbenchSelect-BjbJjlNd.js +435 -0
  38. package/dist/common/control-api-conformance.d.ts +1 -0
  39. package/dist/common/control-api-conformance.js +309 -81
  40. package/dist/common/control-api-errors.d.ts +12 -0
  41. package/dist/common/control-api.d.ts +95 -23
  42. package/dist/common/control-api.js +567 -364
  43. package/dist/common/engine-contract.d.ts +1 -1
  44. package/dist/common/flow-encoding.js +33 -15
  45. package/dist/common/flow-graph.d.ts +6 -0
  46. package/dist/common/flow-modules.d.ts +20 -0
  47. package/dist/common/flow-notifications.d.ts +5 -0
  48. package/dist/common/flow-schema.d.ts +8 -0
  49. package/dist/common/flow-semantics.d.ts +7 -5
  50. package/dist/common/flow-semantics.js +8880 -1702
  51. package/dist/common/integration-trigger.d.ts +2 -0
  52. package/dist/common/provider-triggers.js +4 -1
  53. package/dist/common/run-events.d.ts +2 -2
  54. package/dist/common/run-events.js +10 -16
  55. package/dist/common/run-lifecycle.d.ts +17 -2
  56. package/dist/common/run-lifecycle.js +53 -2
  57. package/dist/common/runtime-contract.d.ts +10 -2
  58. package/dist/common/runtime-contract.js +143 -6
  59. package/dist/common/scheduler.d.ts +52 -13
  60. package/dist/common/scheduler.js +7315 -242
  61. package/dist/index.d.ts +6 -5
  62. package/package.json +1 -1
  63. package/dist/browser/createResourceDialog-DXQz0thK.js +0 -504
  64. package/dist/browser/diagnostics-BGoGFvHA.js +0 -9237
  65. package/dist/browser/dist-BMqL-qR5.js +0 -1894
  66. package/dist/browser/dist-BpopSHwP.js +0 -1543
  67. package/dist/browser/dist-CUSrALSX.js +0 -1620
  68. package/dist/browser/flowWorkspace-DwyxAOBH.js +0 -47615
  69. package/dist/browser/workbenchSelect-B2s1HV-Y.js +0 -1374
@@ -0,0 +1,3 @@
1
+ import type { ChangeOperation, JsonValue } from './flow-change.js';
2
+ export declare function decodeChangeOperations(value: unknown): readonly ChangeOperation[];
3
+ export declare function changeOperationsSchema(kind?: string): JsonValue;
@@ -1,3 +1,4 @@
1
+ export { changeOperationsSchema, decodeChangeOperations } from './flow-change-schema.js';
1
2
  export type JsonValue = null | boolean | number | string | readonly JsonValue[] | {
2
3
  readonly [key: string]: JsonValue;
3
4
  };
@@ -48,7 +49,6 @@ export interface OutputMapping {
48
49
  readonly sources: readonly (FlowSource | NodeSource)[];
49
50
  }
50
51
  interface GraphNodeBase {
51
- readonly concurrency: number;
52
52
  readonly description?: string;
53
53
  readonly icon?: string;
54
54
  readonly inputs: Readonly<Record<string, InputMapping>>;
@@ -63,6 +63,19 @@ export interface ValueNode extends GraphNodeBase {
63
63
  readonly kind: 'value';
64
64
  readonly values: readonly InputPort[];
65
65
  }
66
+ export type WaitAction = 'approve' | 'continue' | 'reject';
67
+ export interface WaitNode extends GraphNodeBase {
68
+ readonly actions: readonly ['continue'] | readonly ['approve', 'reject'];
69
+ readonly input: InputPort;
70
+ readonly kind: 'wait';
71
+ readonly notification?: {
72
+ readonly inputs: Readonly<Record<string, InputMapping>>;
73
+ readonly messageHandle: string;
74
+ readonly taskId: string;
75
+ };
76
+ readonly prompt: string;
77
+ readonly timeoutMs?: never;
78
+ }
66
79
  export type ConditionOperator = '!=' | '<' | '<=' | '==' | '>' | '>=' | 'contains' | 'endsWith' | 'hasKey' | 'hasValue' | 'isEmpty' | 'isFalse' | 'isNotEmpty' | 'isNotNull' | 'isNull' | 'isTrue' | 'notContains' | 'notHasKey' | 'notHasValue' | 'startsWith';
67
80
  export interface ConditionExpression {
68
81
  readonly input: string;
@@ -90,9 +103,14 @@ export type ManagedTaskExecutor = {
90
103
  };
91
104
  export interface ConnectorCapability {
92
105
  readonly action: string;
93
- readonly connectionId: string;
106
+ readonly connections: readonly {
107
+ readonly connectionId: string;
108
+ readonly alias?: string;
109
+ }[];
110
+ readonly connectionId?: string;
94
111
  readonly kind: 'connector';
95
112
  }
113
+ export declare function decodeConnectorCapabilities(value: unknown): readonly ConnectorCapability[];
96
114
  interface TaskDefinitionBase {
97
115
  readonly inputs: readonly (InputPort | Group)[];
98
116
  readonly name: string;
@@ -109,13 +127,16 @@ export type TaskDefinition = InlineTaskDefinition | ManagedTaskDefinition;
109
127
  export type TaskNode = GraphNodeBase & {
110
128
  readonly kind: 'task';
111
129
  } & ({
130
+ readonly additionalInputs?: readonly InputPort[];
112
131
  readonly task: InlineTaskDefinition;
113
132
  readonly taskId?: never;
114
133
  } | {
134
+ readonly additionalInputs?: readonly InputPort[];
115
135
  readonly task?: never;
116
136
  readonly taskId: string;
117
137
  });
118
138
  export interface Graph {
139
+ readonly edges: readonly GraphEdge[];
119
140
  readonly nodes: Readonly<Record<string, GraphNode>>;
120
141
  }
121
142
  export type TriggerSchedule = {
@@ -170,6 +191,8 @@ interface TriggerNodeBase {
170
191
  readonly name: string;
171
192
  }
172
193
  export type TriggerNode = (TriggerNodeBase & {
194
+ readonly kind: 'manual';
195
+ }) | (TriggerNodeBase & {
173
196
  readonly inputsDef: readonly WebhookInputDefinition[];
174
197
  readonly kind: 'webhook';
175
198
  readonly options?: WebhookOptions;
@@ -192,7 +215,7 @@ export type TriggerNode = (TriggerNodeBase & {
192
215
  };
193
216
  readonly kind: 'integration';
194
217
  });
195
- export type GraphNode = ConditionNode | SubflowNode | TaskNode | TriggerNode | ValueNode;
218
+ export type GraphNode = ConditionNode | SubflowNode | TaskNode | TriggerNode | ValueNode | WaitNode;
196
219
  export interface FlowDocument {
197
220
  readonly bindings: Readonly<Record<string, {
198
221
  readonly kind: 'connection' | 'variable';
@@ -225,21 +248,30 @@ export type GraphTarget = {
225
248
  };
226
249
  export interface GraphEdge {
227
250
  readonly source: string;
228
- readonly sourceHandle: string;
251
+ readonly sourceHandle?: string;
229
252
  readonly target: string;
230
- readonly targetHandle: string;
231
253
  }
254
+ export declare function normalizeNodeName(value: string): string;
255
+ export declare function nextNodeName(value: string, names: Iterable<string>): string;
256
+ export declare function nodeNameIssue(graph: Graph, nodeId: string, value: string): 'duplicate' | 'empty' | undefined;
232
257
  export type ChangeOperation = {
258
+ readonly before?: readonly ConnectorCapability[];
259
+ readonly kind: 'graph.node.task.capabilities.set';
260
+ readonly nodeId: string;
261
+ readonly target: GraphTarget;
262
+ readonly value?: readonly ConnectorCapability[];
263
+ } | {
233
264
  readonly binding: FlowDocument['bindings'][string];
234
265
  readonly bindingId: string;
235
266
  readonly kind: 'binding.create';
236
267
  } | {
237
- readonly binding: FlowDocument['bindings'][string];
238
268
  readonly bindingId: string;
239
- readonly kind: 'binding.replace';
269
+ readonly kind: 'binding.delete';
240
270
  } | {
271
+ readonly before: string;
241
272
  readonly bindingId: string;
242
- readonly kind: 'binding.delete';
273
+ readonly kind: 'binding.target.set';
274
+ readonly value: string;
243
275
  } | {
244
276
  readonly kind: 'graph.edge.connect';
245
277
  readonly edge: GraphEdge;
@@ -248,6 +280,18 @@ export type ChangeOperation = {
248
280
  readonly kind: 'graph.edge.disconnect';
249
281
  readonly edge: GraphEdge;
250
282
  readonly target: GraphTarget;
283
+ } | {
284
+ readonly before?: readonly InputPort[];
285
+ readonly kind: 'graph.node.additional-inputs.set';
286
+ readonly nodeId: string;
287
+ readonly target: GraphTarget;
288
+ readonly value?: readonly InputPort[];
289
+ } | {
290
+ readonly before: Pick<ConditionNode, 'cases' | 'defaultOutput' | 'input'>;
291
+ readonly kind: 'graph.node.condition.set';
292
+ readonly nodeId: string;
293
+ readonly target: GraphTarget;
294
+ readonly value: Pick<ConditionNode, 'cases' | 'defaultOutput' | 'input'>;
251
295
  } | {
252
296
  readonly kind: 'graph.node.create';
253
297
  readonly node: GraphNode;
@@ -258,10 +302,68 @@ export type ChangeOperation = {
258
302
  readonly nodeId: string;
259
303
  readonly target: GraphTarget;
260
304
  } | {
261
- readonly kind: 'graph.node.replace';
262
- readonly node: GraphNode;
305
+ readonly before?: number | string;
306
+ readonly field: 'description' | 'icon' | 'name' | 'timeoutMs';
307
+ readonly kind: 'graph.node.field.set';
308
+ readonly nodeId: string;
309
+ readonly target: GraphTarget;
310
+ readonly value?: number | string;
311
+ } | {
312
+ readonly before?: InputMapping;
313
+ readonly handle: string;
314
+ readonly kind: 'graph.node.input.set';
315
+ readonly nodeId: string;
316
+ readonly target: GraphTarget;
317
+ readonly value?: InputMapping;
318
+ } | {
319
+ readonly before: Pick<InlineTaskDefinition, 'inputs' | 'outputs'>;
320
+ readonly kind: 'graph.node.task.ports.set';
321
+ readonly nodeId: string;
322
+ readonly target: GraphTarget;
323
+ readonly value: Pick<InlineTaskDefinition, 'inputs' | 'outputs'>;
324
+ } | {
325
+ readonly before: string;
326
+ readonly kind: 'graph.node.task.name.set';
327
+ readonly nodeId: string;
328
+ readonly target: GraphTarget;
329
+ readonly value: string;
330
+ } | {
331
+ readonly before: readonly InputPort[];
332
+ readonly kind: 'graph.node.values.set';
263
333
  readonly nodeId: string;
264
334
  readonly target: GraphTarget;
335
+ readonly value: readonly InputPort[];
336
+ } | {
337
+ readonly before: Pick<WaitNode, 'actions' | 'notification' | 'prompt'>;
338
+ readonly kind: 'graph.node.wait.set';
339
+ readonly nodeId: string;
340
+ readonly target: Extract<GraphTarget, {
341
+ readonly kind: 'flow';
342
+ }>;
343
+ readonly value: Pick<WaitNode, 'actions' | 'notification' | 'prompt'>;
344
+ } | {
345
+ readonly before: Pick<Extract<TriggerNode, {
346
+ readonly kind: 'webhook';
347
+ }>, 'inputsDef' | 'options'>;
348
+ readonly kind: 'graph.node.webhook.set';
349
+ readonly nodeId: string;
350
+ readonly target: Extract<GraphTarget, {
351
+ readonly kind: 'flow';
352
+ }>;
353
+ readonly value: Pick<Extract<TriggerNode, {
354
+ readonly kind: 'webhook';
355
+ }>, 'inputsDef' | 'options'>;
356
+ } | {
357
+ readonly before?: JsonValue;
358
+ readonly kind: 'graph.trigger.config.set';
359
+ readonly name: string;
360
+ readonly nodeId: string;
361
+ readonly value?: JsonValue;
362
+ } | {
363
+ readonly before: readonly TriggerSchedule[];
364
+ readonly kind: 'graph.trigger.schedule.set';
365
+ readonly nodeId: string;
366
+ readonly value: readonly TriggerSchedule[];
265
367
  } | {
266
368
  readonly kind: 'module.create';
267
369
  readonly module: CodeModule;
@@ -270,10 +372,13 @@ export type ChangeOperation = {
270
372
  readonly kind: 'module.delete';
271
373
  readonly moduleId: string;
272
374
  } | {
375
+ readonly before: string;
273
376
  readonly kind: 'module.rename';
274
377
  readonly moduleId: string;
275
378
  readonly name: string;
276
379
  } | {
380
+ readonly beforeImports: readonly string[];
381
+ readonly beforeSource: string;
277
382
  readonly imports: readonly string[];
278
383
  readonly kind: 'module.source.replace';
279
384
  readonly moduleId: string;
@@ -283,8 +388,9 @@ export type ChangeOperation = {
283
388
  readonly subflow: FlowDocument['subflows'][string];
284
389
  readonly subflowId: string;
285
390
  } | {
391
+ readonly before: Omit<FlowDocument['subflows'][string], 'graph'>;
286
392
  readonly definition: Omit<FlowDocument['subflows'][string], 'graph'>;
287
- readonly kind: 'subflow.definition.replace';
393
+ readonly kind: 'subflow.definition.set';
288
394
  readonly subflowId: string;
289
395
  } | {
290
396
  readonly kind: 'subflow.delete';
@@ -293,15 +399,26 @@ export type ChangeOperation = {
293
399
  readonly kind: 'task.create';
294
400
  readonly task: FlowDocument['tasks'][string];
295
401
  readonly taskId: string;
402
+ } | {
403
+ readonly before?: string;
404
+ readonly kind: 'task.connector.connection.set';
405
+ readonly taskId: string;
406
+ readonly value?: string;
296
407
  } | {
297
408
  readonly kind: 'task.delete';
298
409
  readonly taskId: string;
299
410
  } | {
300
- readonly kind: 'task.replace';
301
- readonly task: FlowDocument['tasks'][string];
411
+ readonly before: 'chat' | 'json';
412
+ readonly kind: 'task.llm.mode.set';
413
+ readonly taskId: string;
414
+ readonly value: 'chat' | 'json';
415
+ } | {
416
+ readonly before: string;
417
+ readonly kind: 'task.name.set';
302
418
  readonly taskId: string;
419
+ readonly value: string;
303
420
  };
304
421
  export declare class FlowChangeError extends Error {
422
+ constructor(message: string);
305
423
  }
306
424
  export declare function applyFlowChanges(content: RevisionContent, operations: readonly ChangeOperation[]): RevisionContent;
307
- export {};