@oomol-lab/open-flow 0.1.0-alpha.9 → 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 (74) hide show
  1. package/README.md +5 -1
  2. package/dist/browser/DesignerIcon-DjgOMYI5.js +2065 -0
  3. package/dist/browser/createResourceDialog-DNBueSYZ.js +505 -0
  4. package/dist/browser/{dist-n9WmBm5w.js → dist-BKuSVKCC.js} +1 -1
  5. package/dist/browser/dist-BMRLCebL.js +1893 -0
  6. package/dist/browser/{dist-DWzdGVm9.js → dist-By46o5UV.js} +74 -74
  7. package/dist/browser/dist-CP0883sY.js +4 -0
  8. package/dist/browser/{dist-B0Q2Mn0n.js → dist-Cc0y2Pli.js} +809 -810
  9. package/dist/browser/dist-CeSZ2xSM.js +444 -0
  10. package/dist/browser/{dist-Bc9TvHYl.js → dist-Dg_VXC8f.js} +134 -135
  11. package/dist/browser/{dist-DhsGR_K3.js → dist-DmuE3M0R.js} +47 -48
  12. package/dist/browser/{dist-D5mdziGP.js → dist-DpDLsYtO.js} +18 -19
  13. package/dist/browser/dist-DxahK_I8.js +2688 -0
  14. package/dist/browser/{dist-DXgEYMFx.js → dist-meg_oHVR.js} +230 -230
  15. package/dist/browser/{esm-YIGXG-Js.js → esm-yhVU_KbQ.js} +14 -15
  16. package/dist/browser/flow-authoring-module.d.ts +2 -2
  17. package/dist/browser/flow-authoring-node.d.ts +9 -4
  18. package/dist/browser/flow-authoring.d.ts +2 -1
  19. package/dist/browser/flow-authoring.js +752 -162
  20. package/dist/browser/flow-change.d.ts +122 -13
  21. package/dist/browser/flow-change.js +326 -96
  22. package/dist/browser/flow-notifications.d.ts +5 -0
  23. package/dist/browser/flowChanges-B2ttnaj9.js +12265 -0
  24. package/dist/browser/{flowRunInputEditorStore-DXOyyY7o.js → flowRunInputEditorStore-DDidwd8h.js} +1528 -783
  25. package/dist/browser/{flowWorkspace-D7-rBA1-.js → flowWorkspace-Dr8-Hut9.js} +42428 -42499
  26. package/dist/browser/getPseudoElementBounds-5LArT6Xc.js +7147 -0
  27. package/dist/browser/icons-KIOgjHpD.js +730 -0
  28. package/dist/browser/languages-DgJehE1g.js +62 -0
  29. package/dist/browser/lib-C5Ipyfps.js +7856 -0
  30. package/dist/browser/licenses.md +119 -1
  31. package/dist/browser/main-DmjVyuWr.js +76 -0
  32. package/dist/browser/{markdownContent-ColGUxHy.js → markdownContent-DUfLdnUt.js} +4811 -4795
  33. package/dist/browser/theme.css +63 -0
  34. package/dist/browser/theme.css.d.ts +1 -0
  35. package/dist/browser/typeScriptSession-_TgJ_7Oq.js +2578 -0
  36. package/dist/browser/waitNotificationInputs-BPulOxYt.js +26 -0
  37. package/dist/browser/workbench-contract.d.ts +2 -1
  38. package/dist/browser/workbench.css +1 -1
  39. package/dist/browser/workbench.d.ts +47 -1
  40. package/dist/browser/workbench.js +1524 -1768
  41. package/dist/browser/workbenchSelect-CbXrdwxW.js +1375 -0
  42. package/dist/common/connector-action.d.ts +6 -0
  43. package/dist/common/connector-action.js +37 -29
  44. package/dist/common/control-api-conformance.d.ts +1 -0
  45. package/dist/common/control-api-conformance.js +171 -51
  46. package/dist/common/control-api-errors.d.ts +28 -0
  47. package/dist/common/control-api.d.ts +80 -21
  48. package/dist/common/control-api.js +311 -131
  49. package/dist/common/flow-encoding.d.ts +2 -2
  50. package/dist/common/flow-encoding.js +28 -9
  51. package/dist/common/flow-notifications.d.ts +5 -0
  52. package/dist/common/flow-semantics.d.ts +4 -0
  53. package/dist/common/flow-semantics.js +3544 -1098
  54. package/dist/common/integration-trigger.d.ts +1 -0
  55. package/dist/common/licenses.md +1 -25
  56. package/dist/common/localization.d.ts +21 -0
  57. package/dist/common/localization.js +62 -0
  58. package/dist/common/provider-triggers.js +4 -1
  59. package/dist/common/run-events.js +2 -1
  60. package/dist/common/run-lifecycle.d.ts +17 -2
  61. package/dist/common/run-lifecycle.js +53 -2
  62. package/dist/common/runtime-contract.d.ts +1 -1
  63. package/dist/common/runtime-contract.js +27 -0
  64. package/dist/common/scheduler.d.ts +68 -7
  65. package/dist/common/scheduler.js +528 -240
  66. package/dist/index.d.ts +2 -1
  67. package/package.json +10 -1
  68. package/dist/browser/addNodeOptions-DRndy4EK.js +0 -6910
  69. package/dist/browser/createLucideIcon-CqjqCezK.js +0 -5537
  70. package/dist/browser/createResourceDialog-A64dDFCG.js +0 -467
  71. package/dist/browser/dist-CUkceEvN.js +0 -1620
  72. package/dist/browser/dist-CVtP-E2c.js +0 -1543
  73. package/dist/browser/dist-DQVavPcf.js +0 -2328
  74. package/dist/browser/field-CKGQHCIi.js +0 -312
@@ -4,6 +4,7 @@ export type JsonValue = null | boolean | number | string | readonly JsonValue[]
4
4
  export declare const resourceNameMaxLength = 80;
5
5
  export type ResourceNameIssue = 'controlCharacter' | 'empty' | 'specialCharacter' | 'tooLong';
6
6
  export declare function resourceNameIssue(value: string): ResourceNameIssue | undefined;
7
+ export declare function validVariableName(value: string): boolean;
7
8
  export interface PortDefinition {
8
9
  readonly description?: string;
9
10
  readonly jsonSchema: JsonValue;
@@ -18,7 +19,11 @@ export interface Port extends PortDefinition {
18
19
  export interface InputPort extends InputPortDefinition {
19
20
  readonly handle: string;
20
21
  }
21
- export declare function portsByHandle<Value extends Port>(ports: readonly Value[]): Readonly<Record<string, Value>>;
22
+ export interface Group {
23
+ readonly collapsed?: boolean;
24
+ readonly group: string;
25
+ }
26
+ export declare function portsByHandle<Value extends Port>(ports: readonly (Value | Group)[]): Readonly<Record<string, Value>>;
22
27
  export interface NodeSource {
23
28
  readonly kind: 'node';
24
29
  readonly nodeId: string;
@@ -58,6 +63,19 @@ export interface ValueNode extends GraphNodeBase {
58
63
  readonly kind: 'value';
59
64
  readonly values: readonly InputPort[];
60
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
+ }
61
79
  export type ConditionOperator = '!=' | '<' | '<=' | '==' | '>' | '>=' | 'contains' | 'endsWith' | 'hasKey' | 'hasValue' | 'isEmpty' | 'isFalse' | 'isNotEmpty' | 'isNotNull' | 'isNull' | 'isTrue' | 'notContains' | 'notHasKey' | 'notHasValue' | 'startsWith';
62
80
  export interface ConditionExpression {
63
81
  readonly input: string;
@@ -89,9 +107,9 @@ export interface ConnectorCapability {
89
107
  readonly kind: 'connector';
90
108
  }
91
109
  interface TaskDefinitionBase {
92
- readonly inputs: readonly InputPort[];
110
+ readonly inputs: readonly (InputPort | Group)[];
93
111
  readonly name: string;
94
- readonly outputs: readonly Port[];
112
+ readonly outputs: readonly (Port | Group)[];
95
113
  }
96
114
  export interface InlineTaskDefinition extends TaskDefinitionBase {
97
115
  readonly capabilities?: readonly ConnectorCapability[];
@@ -104,9 +122,11 @@ export type TaskDefinition = InlineTaskDefinition | ManagedTaskDefinition;
104
122
  export type TaskNode = GraphNodeBase & {
105
123
  readonly kind: 'task';
106
124
  } & ({
125
+ readonly additionalInputs?: readonly InputPort[];
107
126
  readonly task: InlineTaskDefinition;
108
127
  readonly taskId?: never;
109
128
  } | {
129
+ readonly additionalInputs?: readonly InputPort[];
110
130
  readonly task?: never;
111
131
  readonly taskId: string;
112
132
  });
@@ -187,10 +207,10 @@ export type TriggerNode = (TriggerNodeBase & {
187
207
  };
188
208
  readonly kind: 'integration';
189
209
  });
190
- export type GraphNode = ConditionNode | SubflowNode | TaskNode | TriggerNode | ValueNode;
210
+ export type GraphNode = ConditionNode | SubflowNode | TaskNode | TriggerNode | ValueNode | WaitNode;
191
211
  export interface FlowDocument {
192
212
  readonly bindings: Readonly<Record<string, {
193
- readonly kind: 'connection' | 'secret';
213
+ readonly kind: 'connection' | 'variable';
194
214
  readonly target: string;
195
215
  }>>;
196
216
  readonly graph: Graph;
@@ -229,20 +249,35 @@ export type ChangeOperation = {
229
249
  readonly bindingId: string;
230
250
  readonly kind: 'binding.create';
231
251
  } | {
232
- readonly binding: FlowDocument['bindings'][string];
233
252
  readonly bindingId: string;
234
- readonly kind: 'binding.replace';
253
+ readonly kind: 'binding.delete';
235
254
  } | {
255
+ readonly before: string;
236
256
  readonly bindingId: string;
237
- readonly kind: 'binding.delete';
257
+ readonly kind: 'binding.target.set';
258
+ readonly value: string;
238
259
  } | {
260
+ readonly before?: InputMapping;
239
261
  readonly kind: 'graph.edge.connect';
240
262
  readonly edge: GraphEdge;
241
263
  readonly target: GraphTarget;
242
264
  } | {
265
+ readonly before?: InputMapping;
243
266
  readonly kind: 'graph.edge.disconnect';
244
267
  readonly edge: GraphEdge;
245
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'>;
246
281
  } | {
247
282
  readonly kind: 'graph.node.create';
248
283
  readonly node: GraphNode;
@@ -253,10 +288,68 @@ export type ChangeOperation = {
253
288
  readonly nodeId: string;
254
289
  readonly target: GraphTarget;
255
290
  } | {
256
- readonly kind: 'graph.node.replace';
257
- 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';
301
+ readonly nodeId: string;
302
+ readonly target: GraphTarget;
303
+ readonly value?: InputMapping;
304
+ } | {
305
+ readonly before: Pick<InlineTaskDefinition, 'inputs' | 'outputs'>;
306
+ readonly kind: 'graph.node.task.ports.set';
258
307
  readonly nodeId: string;
259
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[];
260
353
  } | {
261
354
  readonly kind: 'module.create';
262
355
  readonly module: CodeModule;
@@ -265,10 +358,13 @@ export type ChangeOperation = {
265
358
  readonly kind: 'module.delete';
266
359
  readonly moduleId: string;
267
360
  } | {
361
+ readonly before: string;
268
362
  readonly kind: 'module.rename';
269
363
  readonly moduleId: string;
270
364
  readonly name: string;
271
365
  } | {
366
+ readonly beforeImports: readonly string[];
367
+ readonly beforeSource: string;
272
368
  readonly imports: readonly string[];
273
369
  readonly kind: 'module.source.replace';
274
370
  readonly moduleId: string;
@@ -278,8 +374,9 @@ export type ChangeOperation = {
278
374
  readonly subflow: FlowDocument['subflows'][string];
279
375
  readonly subflowId: string;
280
376
  } | {
377
+ readonly before: Omit<FlowDocument['subflows'][string], 'graph'>;
281
378
  readonly definition: Omit<FlowDocument['subflows'][string], 'graph'>;
282
- readonly kind: 'subflow.definition.replace';
379
+ readonly kind: 'subflow.definition.set';
283
380
  readonly subflowId: string;
284
381
  } | {
285
382
  readonly kind: 'subflow.delete';
@@ -288,15 +385,27 @@ export type ChangeOperation = {
288
385
  readonly kind: 'task.create';
289
386
  readonly task: FlowDocument['tasks'][string];
290
387
  readonly taskId: string;
388
+ } | {
389
+ readonly before?: string;
390
+ readonly kind: 'task.connector.connection.set';
391
+ readonly taskId: string;
392
+ readonly value?: string;
291
393
  } | {
292
394
  readonly kind: 'task.delete';
293
395
  readonly taskId: string;
294
396
  } | {
295
- readonly kind: 'task.replace';
296
- 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';
297
404
  readonly taskId: string;
405
+ readonly value: string;
298
406
  };
299
407
  export declare class FlowChangeError extends Error {
408
+ constructor(message: string);
300
409
  }
301
410
  export declare function applyFlowChanges(content: RevisionContent, operations: readonly ChangeOperation[]): RevisionContent;
302
411
  export {};