@oomol-lab/open-flow 0.1.0-alpha.0 → 0.1.0-alpha.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 (72) hide show
  1. package/dist/browser/addNodeOptions-BwrMvPQC.js +5230 -0
  2. package/dist/browser/assets/typeScriptWorker-CaA4llbX.js +59850 -0
  3. package/dist/browser/carbon-DMCVsjHo.js +53 -0
  4. package/dist/browser/{project-change.js → change-Cu6pQIit.js} +15 -45
  5. package/dist/browser/createLucideIcon-COMgwa_u.js +5317 -0
  6. package/dist/browser/createResourceDialog-YgMLylQz.js +467 -0
  7. package/dist/browser/{dist-o4dBuwiG.js → dist-3Mj8q8Pr.js} +28 -28
  8. package/dist/browser/{dist-CIq6ue3I.js → dist-BKuSVKCC.js} +1115 -1103
  9. package/dist/browser/{dist-DL0SDskM.js → dist-BMqL-qR5.js} +473 -906
  10. package/dist/browser/{dist-CLZJNoWB.js → dist-BN4ZCyOB.js} +10 -10
  11. package/dist/browser/{dist-zyY--HOV.js → dist-BpopSHwP.js} +3 -3
  12. package/dist/browser/dist-C46JByB-.js +252 -0
  13. package/dist/browser/{dist-BbyiRq3c.js → dist-CJpzJrLM.js} +294 -284
  14. package/dist/browser/{dist-Djd02JSy.js → dist-CPuF50D9.js} +198 -198
  15. package/dist/browser/{dist-CvcmLAMW.js → dist-CUSrALSX.js} +115 -115
  16. package/dist/browser/dist-CeSZ2xSM.js +444 -0
  17. package/dist/browser/{dist-7oZK9QXZ.js → dist-DMi8_lU3.js} +5 -5
  18. package/dist/browser/{dist-B9OV3YTx.js → dist-DUzA0Ukh.js} +22 -22
  19. package/dist/browser/{dist-aWSZx4q1.js → dist-DWADUsVB.js} +75 -75
  20. package/dist/browser/{dist-BLk5M0uK.js → dist-Mecbzdl2.js} +3 -3
  21. package/dist/browser/{esm-DXw7EADW.js → esm-CvAs_mAS.js} +14 -24
  22. package/dist/browser/field-BrEG-7ap.js +312 -0
  23. package/dist/browser/flow-authoring-edge.d.ts +3 -0
  24. package/dist/browser/flow-authoring-module.d.ts +4 -0
  25. package/dist/browser/flow-authoring-node.d.ts +84 -0
  26. package/dist/browser/flow-authoring.d.ts +4 -0
  27. package/dist/browser/flow-authoring.js +522 -0
  28. package/dist/browser/{project-change.d.ts → flow-change.d.ts} +27 -36
  29. package/dist/browser/flow-change.js +231 -0
  30. package/dist/browser/{project-notifications.d.ts → flow-notifications.d.ts} +6 -3
  31. package/dist/browser/flowRunInputEditorStore-DXOyyY7o.js +8219 -0
  32. package/dist/browser/flowWorkspace-X_T_DcQf.js +46003 -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/{markdownContent-ZZFfSRqO.js → markdownContent-BI-2PmDX.js} +4071 -4035
  36. package/dist/browser/typeScriptSession-Dagu_tRs.js +2549 -0
  37. package/dist/browser/workbench-contract.d.ts +4 -5
  38. package/dist/browser/workbench.css +1 -1
  39. package/dist/browser/workbench.d.ts +2 -1
  40. package/dist/browser/workbench.js +3920 -2138
  41. package/dist/common/connector-action.d.ts +6 -0
  42. package/dist/common/connector-action.js +38 -30
  43. package/dist/common/control-api-conformance.js +223 -359
  44. package/dist/common/control-api-errors.d.ts +20 -24
  45. package/dist/common/control-api.d.ts +44 -73
  46. package/dist/common/control-api.js +150 -203
  47. package/dist/common/cron-trigger.d.ts +1 -1
  48. package/dist/common/cron-trigger.js +1 -1
  49. package/dist/common/flow-encoding.d.ts +11 -0
  50. package/dist/common/{project-encoding.js → flow-encoding.js} +14 -13
  51. package/dist/common/{project-notifications.d.ts → flow-notifications.d.ts} +6 -3
  52. package/dist/common/{project-semantics.d.ts → flow-semantics.d.ts} +9 -12
  53. package/dist/common/{project-semantics.js → flow-semantics.js} +594 -597
  54. package/dist/common/integration-trigger.d.ts +2 -1
  55. package/dist/common/integration-trigger.js +1 -1
  56. package/dist/common/poll-trigger.d.ts +1 -1
  57. package/dist/common/provider-triggers.js +1057 -948
  58. package/dist/common/run-lifecycle.js +1 -1
  59. package/dist/common/runtime-contract.d.ts +1 -1
  60. package/dist/common/runtime-contract.js +1 -1
  61. package/dist/common/scheduler.d.ts +7 -7
  62. package/dist/common/scheduler.js +237 -232
  63. package/dist/common/webhook-trigger.d.ts +1 -1
  64. package/dist/common/webhook-trigger.js +35 -1
  65. package/package.json +20 -10
  66. package/dist/browser/addNodeOptions-DqoIueCR.js +0 -33746
  67. package/dist/browser/carbon-nMY84Amv.js +0 -53
  68. package/dist/browser/composite-7VwgfnXx.js +0 -6088
  69. package/dist/browser/createResourceDialog-ByuJWdSL.js +0 -439
  70. package/dist/browser/dist-n-z5HtaO.js +0 -4
  71. package/dist/browser/flowWorkspace-DwVMpcar.js +0 -22092
  72. 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,7 @@ 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
15
  export interface Diagnostic {
16
16
  readonly code: string;
17
17
  readonly column: number;
@@ -26,30 +26,27 @@ export interface FlowValidation {
26
26
  }
27
27
  export declare function triggerPayloadSchema(trigger: TriggerNode): JsonValue;
28
28
  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;
29
+ export type FlowInputsValidation = 'invalid' | 'valid';
30
+ export declare function validateFlowInputs(revision: RevisionContent, value: unknown): FlowInputsValidation;
31
31
  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>;
32
+ export declare function validateFlow(revision: RevisionContent, engine: EngineContract): Promise<FlowValidation>;
33
33
  export interface PreparedFlow {
34
34
  readonly closureDigest: string;
35
35
  readonly engineContract: string;
36
- readonly flow: ProjectDocument['flows'][string];
37
- readonly flowId: string;
36
+ readonly graph: Graph;
38
37
  readonly modules: RevisionContent['modules'];
39
- readonly subflows: ProjectDocument['subflows'];
40
- readonly tasks: ProjectDocument['tasks'];
38
+ readonly subflows: FlowDocument['subflows'];
39
+ readonly tasks: FlowDocument['tasks'];
41
40
  }
42
41
  export type PrepareFlowResult = {
43
42
  readonly kind: 'engine-unsupported';
44
43
  } | {
45
44
  readonly kind: 'flow-invalid';
46
45
  readonly validation: FlowValidation;
47
- } | {
48
- readonly kind: 'flow-not-found';
49
46
  } | {
50
47
  readonly flow: PreparedFlow;
51
48
  readonly kind: 'prepared';
52
49
  readonly validation: FlowValidation;
53
50
  };
54
- export declare function prepareFlow(revision: RevisionContent, flowId: string, engineContract: string): Promise<PrepareFlowResult>;
51
+ export declare function prepareFlow(revision: RevisionContent, engineContract: string): Promise<PrepareFlowResult>;
55
52
  export declare function createRuntimeProgram(prepared: PreparedFlow, entryModuleId: string, engineDigest: string): RuntimeProgram | undefined;