@oomol-lab/open-flow 0.1.0-beta.27 → 0.1.0-beta.29

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 (56) hide show
  1. package/dist/browser/{createResourceDialog-BwI2JmPE.js → createResourceDialog-C_8I3Fua.js} +1 -1
  2. package/dist/browser/dist-CoszrK7m.js +4 -0
  3. package/dist/browser/{switch-CyZ96-UF.js → editorComponent-Dq4IKp5R.js} +5787 -651
  4. package/dist/browser/flow-authoring-node.d.ts +6 -2
  5. package/dist/browser/flow-authoring.js +1489 -1638
  6. package/dist/browser/flow-change-schema.d.ts +4 -0
  7. package/dist/browser/flow-change.d.ts +20 -14
  8. package/dist/browser/flow-change.js +1057 -1179
  9. package/dist/browser/flow-notifications.d.ts +6 -2
  10. package/dist/browser/{flowChanges-DhEjA0n5.js → flowChanges-BBtkyUGd.js} +2192 -1975
  11. package/dist/browser/{flowRunInputEditorStore-BBqQIOCR.js → flowRunInputEditorStore-CTORQcA2.js} +378 -429
  12. package/dist/browser/{flowWorkspace-zcweMsLS.js → flowWorkspace-DNmBb3ZW.js} +62886 -66618
  13. package/dist/browser/host-conformance.js +7 -1
  14. package/dist/browser/{inputValues-C5ExCCf0.js → inputValues-BbSVOWQP.js} +2 -2
  15. package/dist/browser/{markdownContent-SIlWuHve.js → markdownContent-D2oHGWc6.js} +24 -24
  16. package/dist/browser/ui.css +1 -1
  17. package/dist/browser/value-DPg_9yXB.js +93 -0
  18. package/dist/browser/workbench.css +1 -1
  19. package/dist/browser/workbench.js +769 -605
  20. package/dist/browser/{workbenchSelect-BUu7CjUA.js → workbenchSelect-CQOvpteT.js} +1507 -1642
  21. package/dist/common/authoringExamples.d.ts +28 -0
  22. package/dist/common/control-api-conformance.js +1449 -1556
  23. package/dist/common/control-api-errors.d.ts +8 -0
  24. package/dist/common/control-api.d.ts +12 -4
  25. package/dist/common/control-api.js +1480 -1560
  26. package/dist/common/control-requests.d.ts +13 -6
  27. package/dist/common/control-requests.js +1886 -1445
  28. package/dist/common/cron-trigger.d.ts +2 -1
  29. package/dist/common/cron-trigger.js +27 -24
  30. package/dist/common/draftOperations.d.ts +14 -0
  31. package/dist/common/engine-contract.d.ts +2 -2
  32. package/dist/common/flow-encoding.d.ts +3 -0
  33. package/dist/common/flow-encoding.js +1488 -1524
  34. package/dist/common/flow-graph.d.ts +18 -2
  35. package/dist/common/flow-notifications.d.ts +6 -2
  36. package/dist/common/flow-schema.d.ts +1 -2
  37. package/dist/common/flow-semantics.d.ts +2 -1
  38. package/dist/common/flow-semantics.js +7809 -7820
  39. package/dist/common/flowInspection.d.ts +16 -0
  40. package/dist/common/integration-trigger.d.ts +2 -2
  41. package/dist/common/integration-trigger.js +8 -8
  42. package/dist/common/mcp.d.ts +2 -1
  43. package/dist/common/mcp.js +985 -1060
  44. package/dist/common/poll-trigger.d.ts +3 -0
  45. package/dist/common/poll-trigger.js +26 -22
  46. package/dist/common/provider-triggers.js +3096 -3126
  47. package/dist/common/run-events.js +1 -0
  48. package/dist/common/runtime-contract.js +3 -3
  49. package/dist/common/scheduler.d.ts +6 -5
  50. package/dist/common/scheduler.js +2318 -2383
  51. package/dist/common/trigger-contract.d.ts +5 -0
  52. package/dist/common/webhook-trigger.d.ts +3 -3
  53. package/dist/common/webhook-trigger.js +64 -18
  54. package/package.json +1 -1
  55. package/dist/browser/dist-B_T-OpQp.js +0 -4
  56. package/dist/browser/languages-C0zQ4GSo.js +0 -42
@@ -1,6 +1,10 @@
1
1
  import type { ChangeOperation, FlowDocument, JsonValue, RevisionContent } from './flow-change.js';
2
+ /** Best-effort recovery for a parseable Revision envelope. Invalid collection entries are discarded. */
3
+ export declare function repairRevisionEnvelope(value: unknown): RevisionContent;
2
4
  export declare function decodeFlowDocument(value: unknown): FlowDocument;
3
5
  export declare function decodeRevisionContent(value: unknown): RevisionContent;
4
6
  export declare function decodeRevisionEnvelope(value: unknown): RevisionContent;
7
+ export declare function parseOperation<Value>(candidate: unknown, index: number, parse: (value: unknown) => Value): Value;
8
+ export declare function decodeChangeOperation(candidate: unknown, index: number): ChangeOperation;
5
9
  export declare function decodeChangeOperations(value: unknown): readonly ChangeOperation[];
6
10
  export declare function changeOperationsSchema(kind?: string): JsonValue;
@@ -67,6 +67,7 @@ interface GraphNodeBase {
67
67
  readonly icon?: string;
68
68
  readonly inputs: Readonly<Record<string, InputMapping>>;
69
69
  readonly name?: string;
70
+ readonly maxExecutions?: number;
70
71
  readonly timeoutMs?: number;
71
72
  }
72
73
  export interface SubflowNode extends GraphNodeBase {
@@ -78,13 +79,18 @@ export interface ValueNode extends GraphNodeBase {
78
79
  readonly values: readonly InputPort[];
79
80
  }
80
81
  export type WaitAction = 'approve' | 'continue' | 'reject';
81
- export interface WaitNode extends GraphNodeBase {
82
- readonly actions: readonly ['continue'] | readonly ['approve', 'reject'];
82
+ interface ResolutionNodeBase extends GraphNodeBase {
83
83
  readonly input: InputPort;
84
- readonly kind: 'wait';
85
84
  readonly prompt: string;
86
85
  readonly timeoutMs?: never;
87
86
  }
87
+ export interface WaitNode extends ResolutionNodeBase {
88
+ readonly kind: 'wait';
89
+ }
90
+ export interface ApprovalNode extends ResolutionNodeBase {
91
+ readonly kind: 'approval';
92
+ }
93
+ export type ResolutionNode = ApprovalNode | WaitNode;
88
94
  export type ConditionOperator = '!=' | '<' | '<=' | '==' | '>' | '>=' | 'contains' | 'endsWith' | 'hasKey' | 'hasValue' | 'isEmpty' | 'isFalse' | 'isNotEmpty' | 'isNotNull' | 'isNull' | 'isTrue' | 'notContains' | 'notHasKey' | 'notHasValue' | 'startsWith';
89
95
  export interface ConditionExpression {
90
96
  readonly input: string;
@@ -201,7 +207,7 @@ interface TriggerKeySnapshotBase {
201
207
  readonly displayName: string;
202
208
  readonly key: string;
203
209
  readonly name: string;
204
- readonly payloadSchema: JsonValue;
210
+ readonly outputs: readonly Port[];
205
211
  readonly provider: string;
206
212
  }
207
213
  export type IntegrationEndpointMethod = 'DELETE' | 'GET' | 'HEAD' | 'PATCH' | 'POST' | 'PUT';
@@ -221,7 +227,7 @@ export type TriggerKeySnapshot = (TriggerKeySnapshotBase & {
221
227
  readonly endpoint: IntegrationEndpointDeclaration;
222
228
  readonly type: 'integration';
223
229
  });
224
- export interface WebhookInputDefinition extends InputPort {
230
+ export interface WebhookBodyField extends InputPort {
225
231
  }
226
232
  export interface WebhookOptions {
227
233
  readonly allowedMethods?: readonly string[];
@@ -239,7 +245,7 @@ interface TriggerNodeBase {
239
245
  export type TriggerNode = (TriggerNodeBase & {
240
246
  readonly kind: 'manual';
241
247
  }) | (TriggerNodeBase & {
242
- readonly inputsDef: readonly WebhookInputDefinition[];
248
+ readonly bodyFields: readonly WebhookBodyField[];
243
249
  readonly kind: 'webhook';
244
250
  readonly options?: WebhookOptions;
245
251
  }) | (TriggerNodeBase & {
@@ -261,7 +267,7 @@ export type TriggerNode = (TriggerNodeBase & {
261
267
  };
262
268
  readonly kind: 'integration';
263
269
  });
264
- export type GraphNode = ConditionNode | SubflowNode | TaskNode | TriggerNode | ValueNode | WaitNode;
270
+ export type GraphNode = ApprovalNode | ConditionNode | SubflowNode | TaskNode | TriggerNode | ValueNode | WaitNode;
265
271
  export interface FlowDocument {
266
272
  readonly bindings: Readonly<Record<string, {
267
273
  readonly kind: 'connection' | 'variable';
@@ -283,7 +289,7 @@ export interface CodeModule {
283
289
  }
284
290
  export interface RevisionContent {
285
291
  readonly document: FlowDocument;
286
- readonly modelVersion: 1;
292
+ readonly modelVersion: 2;
287
293
  readonly modules: Readonly<Record<string, CodeModule>>;
288
294
  }
289
295
  export type GraphTarget = {
@@ -349,7 +355,7 @@ export type ChangeOperation = {
349
355
  readonly target: GraphTarget;
350
356
  } | {
351
357
  readonly before?: number | string;
352
- readonly field: 'description' | 'icon' | 'name' | 'timeoutMs';
358
+ readonly field: 'description' | 'icon' | 'maxExecutions' | 'name' | 'timeoutMs';
353
359
  readonly kind: 'graph.node.field.set';
354
360
  readonly nodeId: string;
355
361
  readonly target: GraphTarget;
@@ -380,17 +386,17 @@ export type ChangeOperation = {
380
386
  readonly target: GraphTarget;
381
387
  readonly value: readonly InputPort[];
382
388
  } | {
383
- readonly before: Pick<WaitNode, 'actions' | 'prompt'>;
384
- readonly kind: 'graph.node.wait.set';
389
+ readonly before: Pick<ResolutionNode, 'prompt'>;
390
+ readonly kind: 'graph.node.resolution.set';
385
391
  readonly nodeId: string;
386
392
  readonly target: Extract<GraphTarget, {
387
393
  readonly kind: 'flow';
388
394
  }>;
389
- readonly value: Pick<WaitNode, 'actions' | 'prompt'>;
395
+ readonly value: Pick<ResolutionNode, 'prompt'>;
390
396
  } | {
391
397
  readonly before: Pick<Extract<TriggerNode, {
392
398
  readonly kind: 'webhook';
393
- }>, 'inputsDef' | 'options'>;
399
+ }>, 'bodyFields' | 'options'>;
394
400
  readonly kind: 'graph.node.webhook.set';
395
401
  readonly nodeId: string;
396
402
  readonly target: Extract<GraphTarget, {
@@ -398,7 +404,7 @@ export type ChangeOperation = {
398
404
  }>;
399
405
  readonly value: Pick<Extract<TriggerNode, {
400
406
  readonly kind: 'webhook';
401
- }>, 'inputsDef' | 'options'>;
407
+ }>, 'bodyFields' | 'options'>;
402
408
  } | {
403
409
  readonly before?: JsonValue;
404
410
  readonly kind: 'graph.trigger.config.set';