@oomol-lab/open-flow 0.1.0-alpha.5 → 0.1.0-alpha.7

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 (40) hide show
  1. package/dist/browser/{addNodeOptions-B6tOfd2Y.js → addNodeOptions-DRndy4EK.js} +2237 -2599
  2. package/dist/browser/{createLucideIcon-BlEx4FzJ.js → createLucideIcon-CqjqCezK.js} +835 -869
  3. package/dist/browser/{createResourceDialog-CrBp3E8P.js → createResourceDialog-A64dDFCG.js} +140 -140
  4. package/dist/browser/{esm-CoE5_2w7.js → esm-YIGXG-Js.js} +1 -11
  5. package/dist/browser/{field-Daq9Lk-Y.js → field-CKGQHCIi.js} +88 -88
  6. package/dist/browser/{project-authoring-edge.d.ts → flow-authoring-edge.d.ts} +1 -1
  7. package/dist/browser/{project-authoring-module.d.ts → flow-authoring-module.d.ts} +1 -1
  8. package/dist/browser/{project-authoring-node.d.ts → flow-authoring-node.d.ts} +6 -12
  9. package/dist/browser/flow-authoring.d.ts +3 -0
  10. package/dist/browser/{project-authoring.js → flow-authoring.js} +72 -87
  11. package/dist/browser/{project-change.d.ts → flow-change.d.ts} +27 -36
  12. package/dist/browser/{project-change.js → flow-change.js} +69 -97
  13. package/dist/browser/{project-notifications.d.ts → flow-notifications.d.ts} +6 -3
  14. package/dist/browser/{flowWorkspace-CylW6hge.js → flowWorkspace-D7-rBA1-.js} +17147 -12754
  15. package/dist/browser/licenses.md +514 -0
  16. package/dist/browser/workbench-contract.d.ts +4 -4
  17. package/dist/browser/workbench.css +1 -1
  18. package/dist/browser/workbench.d.ts +1 -1
  19. package/dist/browser/workbench.js +969 -1073
  20. package/dist/common/control-api-conformance.js +219 -352
  21. package/dist/common/control-api-errors.d.ts +16 -24
  22. package/dist/common/control-api.d.ts +39 -68
  23. package/dist/common/control-api.js +136 -189
  24. package/dist/common/cron-trigger.d.ts +1 -1
  25. package/dist/common/flow-encoding.d.ts +11 -0
  26. package/dist/common/{project-encoding.js → flow-encoding.js} +14 -13
  27. package/dist/common/{project-notifications.d.ts → flow-notifications.d.ts} +6 -3
  28. package/dist/common/{project-semantics.d.ts → flow-semantics.d.ts} +9 -12
  29. package/dist/common/{project-semantics.js → flow-semantics.js} +591 -592
  30. package/dist/common/integration-trigger.d.ts +1 -1
  31. package/dist/common/poll-trigger.d.ts +1 -1
  32. package/dist/common/runtime-contract.d.ts +1 -1
  33. package/dist/common/scheduler.d.ts +3 -2
  34. package/dist/common/scheduler.js +159 -154
  35. package/dist/common/webhook-trigger.d.ts +1 -1
  36. package/dist/common/webhook-trigger.js +1 -1
  37. package/package.json +13 -13
  38. package/dist/browser/project-authoring-flow.d.ts +0 -4
  39. package/dist/browser/project-authoring.d.ts +0 -4
  40. package/dist/common/project-encoding.d.ts +0 -11
@@ -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;