@oomol-lab/open-flow 0.1.0-alpha.1 → 0.1.0-alpha.12

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 (78) hide show
  1. package/README.md +5 -1
  2. package/dist/browser/addNodeOptions-BYQXyUmQ.js +9571 -0
  3. package/dist/browser/carbon-DMCVsjHo.js +53 -0
  4. package/dist/browser/{project-change.js → change-7rp2OZLm.js} +16 -46
  5. package/dist/browser/createResourceDialog-CWD62rU0.js +467 -0
  6. package/dist/browser/{dist-o4dBuwiG.js → dist-3Mj8q8Pr.js} +28 -28
  7. package/dist/browser/{dist-CIq6ue3I.js → dist-BKuSVKCC.js} +1115 -1103
  8. package/dist/browser/{dist-DL0SDskM.js → dist-BMqL-qR5.js} +473 -906
  9. package/dist/browser/{dist-CLZJNoWB.js → dist-BN4ZCyOB.js} +10 -10
  10. package/dist/browser/{dist-zyY--HOV.js → dist-BpopSHwP.js} +3 -3
  11. package/dist/browser/dist-C46JByB-.js +252 -0
  12. package/dist/browser/{dist-BbyiRq3c.js → dist-CJpzJrLM.js} +294 -284
  13. package/dist/browser/{dist-Djd02JSy.js → dist-CPuF50D9.js} +198 -198
  14. package/dist/browser/{dist-CvcmLAMW.js → dist-CUSrALSX.js} +115 -115
  15. package/dist/browser/dist-CeSZ2xSM.js +444 -0
  16. package/dist/browser/{dist-7oZK9QXZ.js → dist-DMi8_lU3.js} +5 -5
  17. package/dist/browser/{dist-B9OV3YTx.js → dist-DUzA0Ukh.js} +22 -22
  18. package/dist/browser/{dist-aWSZx4q1.js → dist-DWADUsVB.js} +75 -75
  19. package/dist/browser/{dist-BLk5M0uK.js → dist-Mecbzdl2.js} +3 -3
  20. package/dist/browser/{esm-DXw7EADW.js → esm-DmVDlOEJ.js} +14 -24
  21. package/dist/browser/flow-authoring-edge.d.ts +3 -0
  22. package/dist/browser/flow-authoring-module.d.ts +4 -0
  23. package/dist/browser/flow-authoring-node.d.ts +86 -0
  24. package/dist/browser/flow-authoring.d.ts +4 -0
  25. package/dist/browser/flow-authoring.js +783 -0
  26. package/dist/browser/{project-change.d.ts → flow-change.d.ts} +29 -37
  27. package/dist/browser/flow-change.js +234 -0
  28. package/dist/browser/{project-notifications.d.ts → flow-notifications.d.ts} +6 -3
  29. package/dist/browser/flowRunInputEditorStore-BYxwvHZl.js +8952 -0
  30. package/dist/browser/flowWorkspace-Bwqmoq-c.js +47439 -0
  31. package/dist/browser/languages-DgJehE1g.js +62 -0
  32. package/dist/browser/lib-C5Ipyfps.js +7856 -0
  33. package/dist/browser/{lib-S4ccuMeT.js → lib-GrGxYjsJ.js} +3 -5
  34. package/dist/browser/licenses.md +620 -12
  35. package/dist/browser/main-DmjVyuWr.js +76 -0
  36. package/dist/browser/{markdownContent-ZZFfSRqO.js → markdownContent-0teWaxq8.js} +5188 -5144
  37. package/dist/browser/theme.css +63 -0
  38. package/dist/browser/theme.css.d.ts +1 -0
  39. package/dist/browser/typeScriptSession-D5neIpug.js +2560 -0
  40. package/dist/browser/{composite-7VwgfnXx.js → useOpenInteractionType-CRgOHg5M.js} +2209 -2750
  41. package/dist/browser/workbench-contract.d.ts +6 -6
  42. package/dist/browser/workbench.css +1 -1
  43. package/dist/browser/workbench.d.ts +18 -2
  44. package/dist/browser/workbench.js +4200 -2233
  45. package/dist/common/connector-action.d.ts +6 -0
  46. package/dist/common/connector-action.js +38 -30
  47. package/dist/common/control-api-conformance.js +262 -359
  48. package/dist/common/control-api-errors.d.ts +32 -24
  49. package/dist/common/control-api.d.ts +57 -73
  50. package/dist/common/control-api.js +199 -205
  51. package/dist/common/cron-trigger.d.ts +1 -1
  52. package/dist/common/cron-trigger.js +1 -1
  53. package/dist/common/flow-encoding.d.ts +11 -0
  54. package/dist/common/{project-encoding.js → flow-encoding.js} +14 -13
  55. package/dist/common/{project-notifications.d.ts → flow-notifications.d.ts} +6 -3
  56. package/dist/common/{project-semantics.d.ts → flow-semantics.d.ts} +11 -12
  57. package/dist/common/{project-semantics.js → flow-semantics.js} +959 -934
  58. package/dist/common/integration-trigger.d.ts +2 -1
  59. package/dist/common/integration-trigger.js +1 -1
  60. package/dist/common/licenses.md +1 -25
  61. package/dist/common/localization.d.ts +21 -0
  62. package/dist/common/localization.js +62 -0
  63. package/dist/common/poll-trigger.d.ts +1 -1
  64. package/dist/common/provider-triggers.js +1057 -948
  65. package/dist/common/run-lifecycle.js +1 -1
  66. package/dist/common/runtime-contract.d.ts +1 -1
  67. package/dist/common/runtime-contract.js +1 -1
  68. package/dist/common/scheduler.d.ts +8 -7
  69. package/dist/common/scheduler.js +251 -232
  70. package/dist/common/webhook-trigger.d.ts +1 -1
  71. package/dist/common/webhook-trigger.js +35 -1
  72. package/package.json +23 -10
  73. package/dist/browser/addNodeOptions-DqoIueCR.js +0 -33746
  74. package/dist/browser/carbon-nMY84Amv.js +0 -53
  75. package/dist/browser/createResourceDialog-ByuJWdSL.js +0 -439
  76. package/dist/browser/dist-n-z5HtaO.js +0 -4
  77. package/dist/browser/flowWorkspace-DwVMpcar.js +0 -22092
  78. package/dist/common/project-encoding.d.ts +0 -11
@@ -1,4 +1,4 @@
1
- import type { JsonValue, TriggerSchedule } from '../browser/project-change.js';
1
+ import type { JsonValue, TriggerSchedule } from '../browser/flow-change.js';
2
2
  export declare function validateTriggerSchedule(rules: readonly TriggerSchedule[]): void;
3
3
  export declare function nextTriggerScheduledAt(rules: readonly TriggerSchedule[], afterMs: number): number;
4
4
  export declare function scheduledTriggerOccurrenceId(bindingId: string, runtimeVersion: number, scheduledAt: string): Promise<string>;
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/croner/dist/croner.js
1
+ //#region ../../node_modules/.bun/croner@10.0.1/node_modules/croner/dist/croner.js
2
2
  function e(e) {
3
3
  return Date.UTC(e.y, e.m - 1, e.d, e.h, e.i, e.s);
4
4
  }
@@ -0,0 +1,11 @@
1
+ import type { CodeModule, FlowDocument, Graph, InputPort, JsonValue, OutputMapping, Port, RevisionContent } from '@oomol-lab/open-flow/flow-change';
2
+ export declare const maxJsonDepth = 64;
3
+ export declare function canonicalJsonBytes(value: JsonValue): Uint8Array;
4
+ export declare function digestBytes(bytes: Uint8Array): Promise<string>;
5
+ export declare function canonicalPorts(value: readonly (InputPort | Port)[]): JsonValue;
6
+ export declare function canonicalOutputs(value: readonly (OutputMapping & Port)[]): JsonValue;
7
+ export declare function canonicalGraph(value: Graph): JsonValue;
8
+ export declare function canonicalTask(task: FlowDocument['tasks'][string]): JsonValue;
9
+ export declare function canonicalDocument(document: FlowDocument): JsonValue;
10
+ export declare function canonicalModule(module: CodeModule): JsonValue;
11
+ export declare function encodeRevision(content: RevisionContent): Uint8Array;
@@ -1,4 +1,4 @@
1
- //#region src/project/common/encoding.ts
1
+ //#region src/flow/common/encoding.ts
2
2
  var e = new TextEncoder(), t = 64;
3
3
  function n(e) {
4
4
  if (e == null || typeof e == "boolean" || typeof e == "string" || typeof e == "number") return JSON.stringify(e);
@@ -19,13 +19,14 @@ function a(e) {
19
19
  function o(e) {
20
20
  return {
21
21
  ...e.description == null ? {} : { description: e.description },
22
+ handle: e.handle,
22
23
  jsonSchema: e.jsonSchema,
23
24
  nullable: e.nullable,
24
25
  ...Object.hasOwn(e, "value") ? { value: e.value } : {}
25
26
  };
26
27
  }
27
28
  function s(e) {
28
- return Object.fromEntries(a(e).map(([e, t]) => [e, o(t)]));
29
+ return e.map(o);
29
30
  }
30
31
  function c(e) {
31
32
  switch (e.kind) {
@@ -43,18 +44,20 @@ function l(e) {
43
44
  return Object.fromEntries(a(e).map(([e, t]) => [e, c(t)]));
44
45
  }
45
46
  function u(e) {
46
- return Object.fromEntries(a(e).map(([e, t]) => [e, {
47
- ...t.description == null ? {} : { description: t.description },
48
- jsonSchema: t.jsonSchema,
49
- nullable: t.nullable,
50
- sources: t.sources.map((e) => ({ ...e }))
51
- }]));
47
+ return e.map((e) => ({
48
+ ...e.description == null ? {} : { description: e.description },
49
+ handle: e.handle,
50
+ jsonSchema: e.jsonSchema,
51
+ nullable: e.nullable,
52
+ sources: e.sources.map((e) => ({ ...e }))
53
+ }));
52
54
  }
53
55
  function d(e) {
54
56
  if (!("inputs" in e)) return v(e);
55
57
  let t = {
56
58
  concurrency: e.concurrency,
57
59
  ...e.description == null ? {} : { description: e.description },
60
+ ...e.icon == null ? {} : { icon: e.icon },
58
61
  inputs: l(e.inputs),
59
62
  ...e.name == null ? {} : { name: e.name },
60
63
  ...e.timeoutMs == null ? {} : { timeoutMs: e.timeoutMs }
@@ -172,6 +175,7 @@ function _(e) {
172
175
  function v(e) {
173
176
  let t = (t) => ({
174
177
  ...e.description == null ? {} : { description: e.description },
178
+ ...e.icon == null ? {} : { icon: e.icon },
175
179
  kind: t,
176
180
  name: e.name
177
181
  });
@@ -206,10 +210,7 @@ function v(e) {
206
210
  function y(e) {
207
211
  return {
208
212
  bindings: Object.fromEntries(a(e.bindings)),
209
- flows: Object.fromEntries(a(e.flows).map(([e, t]) => [e, {
210
- graph: f(t.graph),
211
- name: t.name
212
- }])),
213
+ graph: f(e.graph),
213
214
  subflows: Object.fromEntries(a(e.subflows).map(([e, t]) => [e, {
214
215
  graph: f(t.graph),
215
216
  inputs: s(t.inputs),
@@ -229,7 +230,7 @@ function b(e) {
229
230
  function x(e) {
230
231
  return {
231
232
  document: y(e.document),
232
- kind: "open-flow-project-revision",
233
+ kind: "open-flow-flow-revision",
233
234
  modelVersion: e.modelVersion,
234
235
  modules: Object.fromEntries(a(e.modules).map(([e, t]) => [e, b(t)])),
235
236
  version: 1
@@ -1,12 +1,15 @@
1
- export type ProjectChangeEvent = {
1
+ export interface FlowCatalogEvent {
2
+ readonly kind: 'flows.changed';
3
+ readonly version: 1;
4
+ }
5
+ export type FlowChangeEvent = {
2
6
  readonly kind: 'draft.changed';
3
- readonly projectId: string;
7
+ readonly flowId: string;
4
8
  readonly revisionId: string;
5
9
  readonly version: 1;
6
10
  } | {
7
11
  readonly flowId: string;
8
12
  readonly kind: 'run.created';
9
- readonly projectId: string;
10
13
  readonly runId: string;
11
14
  readonly version: 1;
12
15
  };
@@ -1,4 +1,4 @@
1
- import type { JsonValue, ProjectDocument, RevisionContent, TriggerNode } from '@oomol-lab/open-flow/project-change';
1
+ import type { FlowDocument, Graph, JsonValue, RevisionContent, TriggerNode } from '@oomol-lab/open-flow/flow-change';
2
2
  import type { EngineContract } from './engine-contract.js';
3
3
  import type { RuntimeProgram } from './runtime-contract.js';
4
4
  export interface SemanticClosure {
@@ -11,7 +11,8 @@ export interface SemanticClosure {
11
11
  };
12
12
  readonly digest: string;
13
13
  }
14
- export declare function flowClosure(content: RevisionContent, flowId: string): Promise<SemanticClosure | undefined>;
14
+ export declare function flowClosure(content: RevisionContent): Promise<SemanticClosure>;
15
+ export declare function variableBindings(revision: RevisionContent, bindingIds: Iterable<string>): Readonly<Record<string, string>>;
15
16
  export interface Diagnostic {
16
17
  readonly code: string;
17
18
  readonly column: number;
@@ -26,30 +27,28 @@ export interface FlowValidation {
26
27
  }
27
28
  export declare function triggerPayloadSchema(trigger: TriggerNode): JsonValue;
28
29
  export declare function matchesSchema(value: JsonValue, schema: JsonValue): boolean;
29
- export type FlowInputsValidation = 'flow-not-found' | 'invalid' | 'valid';
30
- export declare function validateFlowInputs(revision: RevisionContent, flowId: string, value: unknown): FlowInputsValidation;
30
+ export declare function variableInputCompatible(jsonSchema: JsonValue): boolean;
31
+ export type FlowInputsValidation = 'invalid' | 'valid';
32
+ export declare function validateFlowInputs(revision: RevisionContent, value: unknown): FlowInputsValidation;
31
33
  export declare function validateModules(revision: RevisionContent, moduleIds: readonly string[], engine: EngineContract): readonly Diagnostic[];
32
- export declare function validateFlow(revision: RevisionContent, flowId: string, engine: EngineContract): Promise<FlowValidation | undefined>;
34
+ export declare function validateFlow(revision: RevisionContent, engine: EngineContract): Promise<FlowValidation>;
33
35
  export interface PreparedFlow {
34
36
  readonly closureDigest: string;
35
37
  readonly engineContract: string;
36
- readonly flow: ProjectDocument['flows'][string];
37
- readonly flowId: string;
38
+ readonly graph: Graph;
38
39
  readonly modules: RevisionContent['modules'];
39
- readonly subflows: ProjectDocument['subflows'];
40
- readonly tasks: ProjectDocument['tasks'];
40
+ readonly subflows: FlowDocument['subflows'];
41
+ readonly tasks: FlowDocument['tasks'];
41
42
  }
42
43
  export type PrepareFlowResult = {
43
44
  readonly kind: 'engine-unsupported';
44
45
  } | {
45
46
  readonly kind: 'flow-invalid';
46
47
  readonly validation: FlowValidation;
47
- } | {
48
- readonly kind: 'flow-not-found';
49
48
  } | {
50
49
  readonly flow: PreparedFlow;
51
50
  readonly kind: 'prepared';
52
51
  readonly validation: FlowValidation;
53
52
  };
54
- export declare function prepareFlow(revision: RevisionContent, flowId: string, engineContract: string): Promise<PrepareFlowResult>;
53
+ export declare function prepareFlow(revision: RevisionContent, engineContract: string): Promise<PrepareFlowResult>;
55
54
  export declare function createRuntimeProgram(prepared: PreparedFlow, entryModuleId: string, engineDigest: string): RuntimeProgram | undefined;