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

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 (54) hide show
  1. package/dist/browser/DesignerIcon-DjgOMYI5.js +2065 -0
  2. package/dist/browser/{createResourceDialog-DXQz0thK.js → createResourceDialog-DNBueSYZ.js} +161 -160
  3. package/dist/browser/{dist-BMqL-qR5.js → dist-BMRLCebL.js} +291 -292
  4. package/dist/browser/{dist-DWADUsVB.js → dist-By46o5UV.js} +47 -47
  5. package/dist/browser/dist-CP0883sY.js +4 -0
  6. package/dist/browser/{dist-CJpzJrLM.js → dist-Cc0y2Pli.js} +811 -812
  7. package/dist/browser/{dist-DUzA0Ukh.js → dist-Dg_VXC8f.js} +134 -135
  8. package/dist/browser/{dist-3Mj8q8Pr.js → dist-DmuE3M0R.js} +53 -54
  9. package/dist/browser/{dist-BN4ZCyOB.js → dist-DpDLsYtO.js} +14 -15
  10. package/dist/browser/dist-DxahK_I8.js +2688 -0
  11. package/dist/browser/{dist-CPuF50D9.js → dist-meg_oHVR.js} +335 -335
  12. package/dist/browser/{esm-DGQbgYoJ.js → esm-yhVU_KbQ.js} +5 -6
  13. package/dist/browser/flow-authoring-module.d.ts +2 -2
  14. package/dist/browser/flow-authoring-node.d.ts +6 -3
  15. package/dist/browser/flow-authoring.d.ts +1 -1
  16. package/dist/browser/flow-authoring.js +509 -209
  17. package/dist/browser/flow-change.d.ts +113 -9
  18. package/dist/browser/flow-change.js +323 -96
  19. package/dist/browser/flow-notifications.d.ts +5 -0
  20. package/dist/browser/flowChanges-B2ttnaj9.js +12265 -0
  21. package/dist/browser/{flowRunInputEditorStore-BeyUSWpO.js → flowRunInputEditorStore-DDidwd8h.js} +728 -719
  22. package/dist/browser/{flowWorkspace-DwyxAOBH.js → flowWorkspace-Dr8-Hut9.js} +40821 -42895
  23. package/dist/browser/{getPseudoElementBounds-ESJExRFX.js → getPseudoElementBounds-5LArT6Xc.js} +1827 -2322
  24. package/dist/browser/icons-KIOgjHpD.js +730 -0
  25. package/dist/browser/{markdownContent-DdlIRN3_.js → markdownContent-DUfLdnUt.js} +1 -1
  26. package/dist/browser/{typeScriptSession-mPCiA9sV.js → typeScriptSession-_TgJ_7Oq.js} +256 -257
  27. package/dist/browser/waitNotificationInputs-BPulOxYt.js +26 -0
  28. package/dist/browser/workbench.css +1 -1
  29. package/dist/browser/workbench.d.ts +3 -1
  30. package/dist/browser/workbench.js +1136 -1038
  31. package/dist/browser/{workbenchSelect-B2s1HV-Y.js → workbenchSelect-CbXrdwxW.js} +479 -478
  32. package/dist/common/control-api-conformance.d.ts +1 -0
  33. package/dist/common/control-api-conformance.js +126 -47
  34. package/dist/common/control-api-errors.d.ts +12 -0
  35. package/dist/common/control-api.d.ts +60 -15
  36. package/dist/common/control-api.js +225 -101
  37. package/dist/common/flow-encoding.js +24 -8
  38. package/dist/common/flow-notifications.d.ts +5 -0
  39. package/dist/common/flow-semantics.d.ts +1 -0
  40. package/dist/common/flow-semantics.js +3464 -1113
  41. package/dist/common/integration-trigger.d.ts +1 -0
  42. package/dist/common/provider-triggers.js +4 -1
  43. package/dist/common/run-events.js +2 -1
  44. package/dist/common/run-lifecycle.d.ts +17 -2
  45. package/dist/common/run-lifecycle.js +53 -2
  46. package/dist/common/runtime-contract.d.ts +1 -1
  47. package/dist/common/runtime-contract.js +27 -0
  48. package/dist/common/scheduler.d.ts +65 -4
  49. package/dist/common/scheduler.js +420 -146
  50. package/dist/index.d.ts +2 -1
  51. package/package.json +1 -1
  52. package/dist/browser/diagnostics-BGoGFvHA.js +0 -9237
  53. package/dist/browser/dist-BpopSHwP.js +0 -1543
  54. package/dist/browser/dist-CUSrALSX.js +0 -1620
@@ -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;
@@ -109,9 +122,11 @@ export type TaskDefinition = InlineTaskDefinition | ManagedTaskDefinition;
109
122
  export type TaskNode = GraphNodeBase & {
110
123
  readonly kind: 'task';
111
124
  } & ({
125
+ readonly additionalInputs?: readonly InputPort[];
112
126
  readonly task: InlineTaskDefinition;
113
127
  readonly taskId?: never;
114
128
  } | {
129
+ readonly additionalInputs?: readonly InputPort[];
115
130
  readonly task?: never;
116
131
  readonly taskId: string;
117
132
  });
@@ -192,7 +207,7 @@ export type TriggerNode = (TriggerNodeBase & {
192
207
  };
193
208
  readonly kind: 'integration';
194
209
  });
195
- export type GraphNode = ConditionNode | SubflowNode | TaskNode | TriggerNode | ValueNode;
210
+ export type GraphNode = ConditionNode | SubflowNode | TaskNode | TriggerNode | ValueNode | WaitNode;
196
211
  export interface FlowDocument {
197
212
  readonly bindings: Readonly<Record<string, {
198
213
  readonly kind: 'connection' | 'variable';
@@ -234,20 +249,35 @@ export type ChangeOperation = {
234
249
  readonly bindingId: string;
235
250
  readonly kind: 'binding.create';
236
251
  } | {
237
- readonly binding: FlowDocument['bindings'][string];
238
252
  readonly bindingId: string;
239
- readonly kind: 'binding.replace';
253
+ readonly kind: 'binding.delete';
240
254
  } | {
255
+ readonly before: string;
241
256
  readonly bindingId: string;
242
- readonly kind: 'binding.delete';
257
+ readonly kind: 'binding.target.set';
258
+ readonly value: string;
243
259
  } | {
260
+ readonly before?: InputMapping;
244
261
  readonly kind: 'graph.edge.connect';
245
262
  readonly edge: GraphEdge;
246
263
  readonly target: GraphTarget;
247
264
  } | {
265
+ readonly before?: InputMapping;
248
266
  readonly kind: 'graph.edge.disconnect';
249
267
  readonly edge: GraphEdge;
250
268
  readonly target: GraphTarget;
269
+ } | {
270
+ readonly before?: readonly InputPort[];
271
+ readonly kind: 'graph.node.additional-inputs.set';
272
+ readonly nodeId: string;
273
+ readonly target: GraphTarget;
274
+ readonly value?: readonly InputPort[];
275
+ } | {
276
+ readonly before: Pick<ConditionNode, 'cases' | 'defaultOutput' | 'input'>;
277
+ readonly kind: 'graph.node.condition.set';
278
+ readonly nodeId: string;
279
+ readonly target: GraphTarget;
280
+ readonly value: Pick<ConditionNode, 'cases' | 'defaultOutput' | 'input'>;
251
281
  } | {
252
282
  readonly kind: 'graph.node.create';
253
283
  readonly node: GraphNode;
@@ -258,10 +288,68 @@ export type ChangeOperation = {
258
288
  readonly nodeId: string;
259
289
  readonly target: GraphTarget;
260
290
  } | {
261
- readonly kind: 'graph.node.replace';
262
- readonly node: GraphNode;
291
+ readonly before?: number | string;
292
+ readonly field: 'concurrency' | 'description' | 'icon' | 'name' | 'timeoutMs';
293
+ readonly kind: 'graph.node.field.set';
294
+ readonly nodeId: string;
295
+ readonly target: GraphTarget;
296
+ readonly value?: number | string;
297
+ } | {
298
+ readonly before?: InputMapping;
299
+ readonly handle: string;
300
+ readonly kind: 'graph.node.input.set';
263
301
  readonly nodeId: string;
264
302
  readonly target: GraphTarget;
303
+ readonly value?: InputMapping;
304
+ } | {
305
+ readonly before: Pick<InlineTaskDefinition, 'inputs' | 'outputs'>;
306
+ readonly kind: 'graph.node.task.ports.set';
307
+ readonly nodeId: string;
308
+ readonly target: GraphTarget;
309
+ readonly value: Pick<InlineTaskDefinition, 'inputs' | 'outputs'>;
310
+ } | {
311
+ readonly before: string;
312
+ readonly kind: 'graph.node.task.name.set';
313
+ readonly nodeId: string;
314
+ readonly target: GraphTarget;
315
+ readonly value: string;
316
+ } | {
317
+ readonly before: readonly InputPort[];
318
+ readonly kind: 'graph.node.values.set';
319
+ readonly nodeId: string;
320
+ readonly target: GraphTarget;
321
+ readonly value: readonly InputPort[];
322
+ } | {
323
+ readonly before: Pick<WaitNode, 'actions' | 'notification' | 'prompt'>;
324
+ readonly kind: 'graph.node.wait.set';
325
+ readonly nodeId: string;
326
+ readonly target: Extract<GraphTarget, {
327
+ readonly kind: 'flow';
328
+ }>;
329
+ readonly value: Pick<WaitNode, 'actions' | 'notification' | 'prompt'>;
330
+ } | {
331
+ readonly before: Pick<Extract<TriggerNode, {
332
+ readonly kind: 'webhook';
333
+ }>, 'inputsDef' | 'options'>;
334
+ readonly kind: 'graph.node.webhook.set';
335
+ readonly nodeId: string;
336
+ readonly target: Extract<GraphTarget, {
337
+ readonly kind: 'flow';
338
+ }>;
339
+ readonly value: Pick<Extract<TriggerNode, {
340
+ readonly kind: 'webhook';
341
+ }>, 'inputsDef' | 'options'>;
342
+ } | {
343
+ readonly before?: JsonValue;
344
+ readonly kind: 'graph.trigger.config.set';
345
+ readonly name: string;
346
+ readonly nodeId: string;
347
+ readonly value?: JsonValue;
348
+ } | {
349
+ readonly before: readonly TriggerSchedule[];
350
+ readonly kind: 'graph.trigger.schedule.set';
351
+ readonly nodeId: string;
352
+ readonly value: readonly TriggerSchedule[];
265
353
  } | {
266
354
  readonly kind: 'module.create';
267
355
  readonly module: CodeModule;
@@ -270,10 +358,13 @@ export type ChangeOperation = {
270
358
  readonly kind: 'module.delete';
271
359
  readonly moduleId: string;
272
360
  } | {
361
+ readonly before: string;
273
362
  readonly kind: 'module.rename';
274
363
  readonly moduleId: string;
275
364
  readonly name: string;
276
365
  } | {
366
+ readonly beforeImports: readonly string[];
367
+ readonly beforeSource: string;
277
368
  readonly imports: readonly string[];
278
369
  readonly kind: 'module.source.replace';
279
370
  readonly moduleId: string;
@@ -283,8 +374,9 @@ export type ChangeOperation = {
283
374
  readonly subflow: FlowDocument['subflows'][string];
284
375
  readonly subflowId: string;
285
376
  } | {
377
+ readonly before: Omit<FlowDocument['subflows'][string], 'graph'>;
286
378
  readonly definition: Omit<FlowDocument['subflows'][string], 'graph'>;
287
- readonly kind: 'subflow.definition.replace';
379
+ readonly kind: 'subflow.definition.set';
288
380
  readonly subflowId: string;
289
381
  } | {
290
382
  readonly kind: 'subflow.delete';
@@ -293,15 +385,27 @@ export type ChangeOperation = {
293
385
  readonly kind: 'task.create';
294
386
  readonly task: FlowDocument['tasks'][string];
295
387
  readonly taskId: string;
388
+ } | {
389
+ readonly before?: string;
390
+ readonly kind: 'task.connector.connection.set';
391
+ readonly taskId: string;
392
+ readonly value?: string;
296
393
  } | {
297
394
  readonly kind: 'task.delete';
298
395
  readonly taskId: string;
299
396
  } | {
300
- readonly kind: 'task.replace';
301
- readonly task: FlowDocument['tasks'][string];
397
+ readonly before: 'chat' | 'json';
398
+ readonly kind: 'task.llm.mode.set';
399
+ readonly taskId: string;
400
+ readonly value: 'chat' | 'json';
401
+ } | {
402
+ readonly before: string;
403
+ readonly kind: 'task.name.set';
302
404
  readonly taskId: string;
405
+ readonly value: string;
303
406
  };
304
407
  export declare class FlowChangeError extends Error {
408
+ constructor(message: string);
305
409
  }
306
410
  export declare function applyFlowChanges(content: RevisionContent, operations: readonly ChangeOperation[]): RevisionContent;
307
411
  export {};