@oomol-lab/open-flow 0.1.0-beta.4 → 0.1.0-beta.6

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 (41) hide show
  1. package/dist/browser/{DesignerIcon-DdfuH2jW.js → DesignerIcon-XKBRy_0Q.js} +640 -640
  2. package/dist/browser/createResourceDialog-Cf7QpXp6.js +505 -0
  3. package/dist/browser/{dist-BMqL-qR5.js → dist-BMRLCebL.js} +291 -292
  4. package/dist/browser/{dist-DWADUsVB.js → dist-By46o5UV.js} +47 -47
  5. package/dist/browser/{dist-CJpzJrLM.js → dist-Cc0y2Pli.js} +811 -812
  6. package/dist/browser/{dist-DUzA0Ukh.js → dist-Dg_VXC8f.js} +134 -135
  7. package/dist/browser/{dist-3Mj8q8Pr.js → dist-DmuE3M0R.js} +53 -54
  8. package/dist/browser/{dist-BN4ZCyOB.js → dist-DpDLsYtO.js} +14 -15
  9. package/dist/browser/dist-DxahK_I8.js +2688 -0
  10. package/dist/browser/{dist-CPuF50D9.js → dist-meg_oHVR.js} +335 -335
  11. package/dist/browser/{esm-C9jQK70n.js → esm-CTcBY7hh.js} +5 -6
  12. package/dist/browser/flow-authoring-module.d.ts +2 -2
  13. package/dist/browser/flow-authoring-node.d.ts +2 -2
  14. package/dist/browser/flow-authoring.js +475 -209
  15. package/dist/browser/flow-change.d.ts +98 -8
  16. package/dist/browser/flow-change.js +319 -96
  17. package/dist/browser/{flowChanges-Bs-ZcJV8.js → flowChanges-BDqD_Q4G.js} +1628 -1555
  18. package/dist/browser/{flowRunInputEditorStore-BYa8zFLC.js → flowRunInputEditorStore-DDidwd8h.js} +9 -1
  19. package/dist/browser/{flowWorkspace-BewofPeU.js → flowWorkspace-CPBHm14t.js} +9803 -9769
  20. package/dist/browser/{getPseudoElementBounds-qDxSDwzN.js → getPseudoElementBounds-5LArT6Xc.js} +494 -474
  21. package/dist/browser/icons-CRxvozBE.js +726 -0
  22. package/dist/browser/{typeScriptSession-CwMPjseS.js → typeScriptSession-_TgJ_7Oq.js} +256 -257
  23. package/dist/browser/{waitNotificationInputs-DtrPBwA1.js → waitNotificationInputs-lPrLDTOd.js} +2 -2
  24. package/dist/browser/workbench.css +1 -1
  25. package/dist/browser/workbench.js +573 -578
  26. package/dist/browser/{workbenchSelect-CX8KtT7L.js → workbenchSelect-Cf1zlVm9.js} +398 -398
  27. package/dist/common/control-api-conformance.js +27 -19
  28. package/dist/common/control-api.d.ts +4 -11
  29. package/dist/common/control-api.js +6 -18
  30. package/dist/common/flow-encoding.js +4 -0
  31. package/dist/common/flow-semantics.js +8 -10
  32. package/dist/common/runtime-contract.d.ts +1 -1
  33. package/dist/common/runtime-contract.js +27 -0
  34. package/dist/common/scheduler.d.ts +1 -1
  35. package/dist/common/scheduler.js +17 -18
  36. package/dist/index.d.ts +1 -1
  37. package/package.json +1 -1
  38. package/dist/browser/createResourceDialog-4YQKl8lG.js +0 -505
  39. package/dist/browser/dist-BpopSHwP.js +0 -1543
  40. package/dist/browser/dist-CUSrALSX.js +0 -1620
  41. package/dist/browser/icons-DRoMXL5h.js +0 -521
@@ -62,17 +62,18 @@ function d(e, t, n) {
62
62
  async function f(e, t, n) {
63
63
  return c(await d(e, t, n), 201, "Create Flow");
64
64
  }
65
- function p(e, t, n, r) {
65
+ function p(e, t, n, r, i = `change-${crypto.randomUUID()}`) {
66
66
  return u(e, `/v1/flows/${encodeURIComponent(t)}/draft/changes`, {
67
67
  body: JSON.stringify({
68
68
  expectedRevisionId: n,
69
69
  operations: r,
70
70
  version: 1
71
71
  }),
72
+ headers: { "idempotency-key": i },
72
73
  method: "POST"
73
74
  });
74
75
  }
75
- function m(e, t, n, r = "marker") {
76
+ function m(e, t, n, r = "marker", i) {
76
77
  return p(e, t, n, [{
77
78
  kind: "graph.node.create",
78
79
  node: {
@@ -88,7 +89,7 @@ function m(e, t, n, r = "marker") {
88
89
  },
89
90
  nodeId: r,
90
91
  target: { kind: "flow" }
91
- }]);
92
+ }], i);
92
93
  }
93
94
  function h(e, t) {
94
95
  return s(a(e.revision, `${t} revision`).revisionId, `${t} revisionId`);
@@ -197,24 +198,25 @@ var b = [
197
198
  {
198
199
  name: "commits immutable Draft Revisions for one Flow",
199
200
  async verify(e) {
200
- let t = await f(e, "Draft flow", "draft-flow"), n = s(t.flowId, "Draft Flow flowId"), r = s(t.draftRevisionId, "Draft Flow revisionId"), o = await c(await m(e, n, r), 200, "Change Draft"), d = h(o, "Changed Draft");
201
- i(a(o.revision, "Changed Draft revision").parentRevisionId, r, "Changed Draft parent"), await l(await p(e, n, d, [{
202
- kind: "graph.node.replace",
203
- node: {
204
- concurrency: 1,
205
- inputs: {},
206
- kind: "value",
207
- values: [{
208
- handle: "ready",
209
- jsonSchema: { type: "boolean" },
210
- nullable: !1,
211
- value: !0
212
- }]
213
- },
201
+ let t = await f(e, "Draft flow", "draft-flow"), n = s(t.flowId, "Draft Flow flowId"), r = s(t.draftRevisionId, "Draft Flow revisionId"), o = await c(await m(e, n, r, "marker", "draft-change"), 200, "Change Draft"), d = h(o, "Changed Draft");
202
+ i(a(o.revision, "Changed Draft revision").parentRevisionId, r, "Changed Draft parent"), i(await c(await m(e, n, r, "marker", "draft-change"), 200, "Replay Draft change"), o, "Replayed Draft change"), await l(await m(e, n, r, "another-marker", "draft-change"), 409, "flow.conflict", "Conflicting Draft change replay"), await l(await p(e, n, d, [{
203
+ before: [{
204
+ handle: "ready",
205
+ jsonSchema: { type: "boolean" },
206
+ nullable: !1,
207
+ value: !0
208
+ }],
209
+ kind: "graph.node.values.set",
214
210
  nodeId: "marker",
215
- target: { kind: "flow" }
211
+ target: { kind: "flow" },
212
+ value: [{
213
+ handle: "ready",
214
+ jsonSchema: { type: "boolean" },
215
+ nullable: !1,
216
+ value: !0
217
+ }]
216
218
  }]), 400, "flow.invalid", "No-op Draft change"), await l(await m(e, n, r, "stale"), 412, "flow.revision-conflict", "Stale Draft change"), i(a(a(a(a((await c(await u(e, `/v1/flows/${n}/revisions/${r}`), 200, "Read old Revision")).content, "Old content").document, "Old document").graph, "Old graph").nodes, "Old nodes"), {}, "Old Revision nodes"), i((await c(await u(e, `/v1/flows/${n}/draft`), 200, "Read Draft")).revisionId, d, "Draft revisionId");
217
- let g = await c(await u(e, `/v1/flows/${n}/draft/sync?fromRevisionId=${r}`), 200, "Sync Draft");
219
+ let g = await c(await u(e, `/v1/flows/${n}/draft/sync`), 200, "Sync Draft");
218
220
  i(g.kind, "snapshot", "Draft sync kind"), i(a(g.draft, "Draft snapshot").revisionId, d, "Draft snapshot revisionId");
219
221
  }
220
222
  },
@@ -299,6 +301,12 @@ var b = [
299
301
  node: {
300
302
  actions: ["approve", "reject"],
301
303
  concurrency: 1,
304
+ input: {
305
+ handle: "value",
306
+ jsonSchema: {},
307
+ nullable: !0,
308
+ value: null
309
+ },
302
310
  inputs: { value: {
303
311
  kind: "value",
304
312
  value: { request: 1 }
@@ -114,18 +114,11 @@ export interface DraftChange {
114
114
  readonly revision: RevisionMetadata;
115
115
  readonly version: 1;
116
116
  }
117
- export type DraftSync = {
118
- readonly kind: 'changes';
119
- readonly revisions: readonly {
120
- readonly operations: readonly ChangeOperation[];
121
- readonly revision: RevisionMetadata;
122
- }[];
123
- readonly version: 1;
124
- } | {
117
+ export interface DraftSync {
125
118
  readonly draft: Draft;
126
119
  readonly kind: 'snapshot';
127
120
  readonly version: 1;
128
- };
121
+ }
129
122
  export interface Publication {
130
123
  readonly actorId: string;
131
124
  readonly closureDigest: string;
@@ -339,7 +332,7 @@ export declare class ControlClient {
339
332
  resumeFlowTrigger(flowId: string, triggerNodeId: string): Promise<TriggerBinding>;
340
333
  testFlowPollTrigger(flowId: string, triggerNodeId: string): Promise<PollTriggerTestResult>;
341
334
  getDraft(flowId: string): Promise<Draft>;
342
- syncDraft(flowId: string, fromRevisionId?: string): Promise<DraftSync>;
335
+ syncDraft(flowId: string): Promise<DraftSync>;
343
336
  getRevision(flowId: string, revisionId: string): Promise<Draft>;
344
337
  listConnectorProviders(signal?: AbortSignal, flowId?: string): Promise<readonly ConnectorProvider[]>;
345
338
  listConnectorActions(serviceId?: string, signal?: AbortSignal, flowId?: string): Promise<readonly ConnectorAction[]>;
@@ -347,7 +340,7 @@ export declare class ControlClient {
347
340
  getConnectorAction(actionId: string, signal?: AbortSignal, flowId?: string): Promise<ConnectorAction>;
348
341
  listConnectorConnections(serviceId: string, signal?: AbortSignal, flowId?: string): Promise<readonly ConnectorConnection[]>;
349
342
  createConnectorConnectionPage(serviceId: string, flowId?: string): Promise<string>;
350
- changeDraft(flowId: string, expectedRevisionId: string, operations: readonly ChangeOperation[]): Promise<DraftChange>;
343
+ changeDraft(flowId: string, expectedRevisionId: string, operations: readonly ChangeOperation[], changeId?: string): Promise<DraftChange>;
351
344
  checkFlow(flowId: string, revisionId: string): Promise<FlowCheck>;
352
345
  getLive(flowId: string): Promise<Live>;
353
346
  listPublications(flowId: string, options?: {
@@ -396,23 +396,11 @@ function M(e) {
396
396
  }
397
397
  function N(e) {
398
398
  let t = a(e);
399
- return t.version == 1 ? t.kind == "snapshot" ? {
399
+ return t.version != 1 || t.kind != "snapshot" ? i() : {
400
400
  draft: j(t.draft),
401
401
  kind: "snapshot",
402
402
  version: 1
403
- } : t.kind != "changes" || !Array.isArray(t.revisions) ? i() : {
404
- kind: "changes",
405
- revisions: t.revisions.map((e) => {
406
- let t = a(e);
407
- if (!Array.isArray(t.operations) || t.operations.length == 0) return i();
408
- for (let e of t.operations) if (typeof a(e).kind != "string") return i();
409
- return {
410
- operations: t.operations,
411
- revision: A(t.revision)
412
- };
413
- }),
414
- version: 1
415
- } : i();
403
+ };
416
404
  }
417
405
  function P(e) {
418
406
  let t = a(e), n = t.operation, r = t.sourcePublicationId;
@@ -839,9 +827,8 @@ var ee = class {
839
827
  async getDraft(e) {
840
828
  return j(await this.request(`/v1/flows/${Q(e)}/draft`));
841
829
  }
842
- async syncDraft(e, t) {
843
- let n = t == null ? "" : `?fromRevisionId=${Q(t)}`;
844
- return N(await this.request(`/v1/flows/${Q(e)}/draft/sync${n}`));
830
+ async syncDraft(e) {
831
+ return N(await this.request(`/v1/flows/${Q(e)}/draft/sync`));
845
832
  }
846
833
  async getRevision(e, t) {
847
834
  return j(await this.request(`/v1/flows/${Q(e)}/revisions/${Q(t)}`));
@@ -887,13 +874,14 @@ var ee = class {
887
874
  return i();
888
875
  }
889
876
  }
890
- async changeDraft(e, t, n) {
877
+ async changeDraft(e, t, n, r = $("change")) {
891
878
  return M(await this.request(`/v1/flows/${Q(e)}/draft/changes`, {
892
879
  body: JSON.stringify({
893
880
  expectedRevisionId: t,
894
881
  operations: n,
895
882
  version: 1
896
883
  }),
884
+ headers: { "idempotency-key": r },
897
885
  method: "POST"
898
886
  }));
899
887
  }
@@ -107,6 +107,10 @@ function d(e) {
107
107
  case "wait": return {
108
108
  ...t,
109
109
  actions: e.actions,
110
+ input: {
111
+ handle: e.input.handle,
112
+ ...o(e.input)
113
+ },
110
114
  kind: e.kind,
111
115
  ...e.notification == null ? {} : { notification: {
112
116
  inputs: l(e.notification.inputs),
@@ -10249,6 +10249,10 @@ function vo(e) {
10249
10249
  case "wait": return {
10250
10250
  ...t,
10251
10251
  actions: e.actions,
10252
+ input: {
10253
+ handle: e.input.handle,
10254
+ ...po(e.input)
10255
+ },
10252
10256
  kind: e.kind,
10253
10257
  ...e.notification == null ? {} : { notification: {
10254
10258
  inputs: go(e.notification.inputs),
@@ -10713,11 +10717,7 @@ function Jo(e, t) {
10713
10717
  case "value": return {};
10714
10718
  case "subflow": return oo(e.subflows[t.subflowId]?.inputs ?? []);
10715
10719
  case "task": return oo([...t.task == null ? e.tasks[t.taskId]?.inputs ?? [] : t.task.inputs, ...t.additionalInputs ?? []]);
10716
- case "wait": return { value: {
10717
- jsonSchema: {},
10718
- nullable: !0,
10719
- value: null
10720
- } };
10720
+ case "wait": return { [t.input.handle]: t.input };
10721
10721
  case "cron":
10722
10722
  case "integration":
10723
10723
  case "poll":
@@ -10733,10 +10733,7 @@ function Yo(e, t) {
10733
10733
  case "value": return oo(t.values);
10734
10734
  case "subflow": return oo(e.subflows[t.subflowId]?.outputs ?? []);
10735
10735
  case "task": return oo(t.task == null ? e.tasks[t.taskId]?.outputs ?? [] : t.task.outputs);
10736
- case "wait": return Object.fromEntries(t.actions.map((e) => [e, {
10737
- jsonSchema: {},
10738
- nullable: !0
10739
- }]));
10736
+ case "wait": return Object.fromEntries(t.actions.map((e) => [e, t.input]));
10740
10737
  case "cron":
10741
10738
  case "integration":
10742
10739
  case "poll":
@@ -10792,6 +10789,7 @@ function Qo(e, t, n, r, i, a, o, s) {
10792
10789
  "concurrency",
10793
10790
  "description",
10794
10791
  "icon",
10792
+ "input",
10795
10793
  "inputs",
10796
10794
  "kind",
10797
10795
  "name",
@@ -10801,7 +10799,7 @@ function Qo(e, t, n, r, i, a, o, s) {
10801
10799
  if (l.length > 0 && s.push(Q("wait.field-unsupported", `Wait node "${e}" contains unsupported fields: ${l.join(", ")}.`, o, {
10802
10800
  fields: l.join(", "),
10803
10801
  nodeId: e
10804
- })), a || s.push(Q("wait.not-allowed", "Wait nodes are only allowed in Flows.", o)), t.concurrency != 1 && s.push(Q("wait.concurrency-invalid", "Wait concurrency must be 1.", `${o}/concurrency`)), (typeof t.prompt != "string" || t.prompt.trim().length == 0 || [...t.prompt].length > 1e3) && s.push(Q("wait.prompt-invalid", "Wait prompt must contain between 1 and 1,000 Unicode code points.", `${o}/prompt`)), (!Array.isArray(t.actions) || !(t.actions.length == 1 && t.actions[0] == "continue" || t.actions.length == 2 && t.actions[0] == "approve" && t.actions[1] == "reject")) && s.push(Q("wait.actions-invalid", "Wait actions must be [\"continue\"] or [\"approve\", \"reject\"].", `${o}/actions`)), t.notification == null) return;
10802
+ })), a || s.push(Q("wait.not-allowed", "Wait nodes are only allowed in Flows.", o)), t.concurrency != 1 && s.push(Q("wait.concurrency-invalid", "Wait concurrency must be 1.", `${o}/concurrency`)), t.input.handle != "value" && s.push(Q("wait.input-invalid", "Wait input handle must be \"value\".", `${o}/input/handle`)), (typeof t.prompt != "string" || t.prompt.trim().length == 0 || [...t.prompt].length > 1e3) && s.push(Q("wait.prompt-invalid", "Wait prompt must contain between 1 and 1,000 Unicode code points.", `${o}/prompt`)), (!Array.isArray(t.actions) || !(t.actions.length == 1 && t.actions[0] == "continue" || t.actions.length == 2 && t.actions[0] == "approve" && t.actions[1] == "reject")) && s.push(Q("wait.actions-invalid", "Wait actions must be [\"continue\"] or [\"approve\", \"reject\"].", `${o}/actions`)), t.notification == null) return;
10805
10803
  let u = t.notification;
10806
10804
  if (typeof u != "object" || Array.isArray(u)) {
10807
10805
  s.push(Q("wait.notification-invalid", "Wait notification must be an object.", `${o}/notification`));
@@ -44,7 +44,7 @@ export interface RuntimeInvocation {
44
44
  }
45
45
  export interface RuntimeHarness {
46
46
  readonly engineDigest: string;
47
- invoke(invocation: RuntimeInvocation): Promise<JsonValue>;
47
+ invoke(invocation: RuntimeInvocation): Promise<JsonValue | undefined>;
48
48
  }
49
49
  export interface RuntimeConformanceCase {
50
50
  readonly name: string;
@@ -129,6 +129,33 @@ var c = [
129
129
  }], "Capability request");
130
130
  }
131
131
  },
132
+ {
133
+ name: "submits Task outputs and accepts a void result",
134
+ async verify(e) {
135
+ let t = [];
136
+ o(await e.invoke({
137
+ capability: async (e) => (t.push(e), {
138
+ body: null,
139
+ status: 200
140
+ }),
141
+ input: null,
142
+ invocationId: "task-outputs",
143
+ program: a(e, "export default async (_input, context) => {\n await context.outputs({ first: 1 })\n await context.outputs({ second: 2 })\n}")
144
+ }), void 0, "Void Task result"), o(t.map(({ invocationId: e, kind: t, payload: n }) => ({
145
+ invocationId: e,
146
+ kind: t,
147
+ payload: n
148
+ })), [{
149
+ invocationId: "task-outputs",
150
+ kind: "outputs",
151
+ payload: { first: 1 }
152
+ }, {
153
+ invocationId: "task-outputs",
154
+ kind: "outputs",
155
+ payload: { second: 2 }
156
+ }], "Task outputs request");
157
+ }
158
+ },
132
159
  {
133
160
  name: "cancels a pending Capability and the user invocation",
134
161
  async verify(e) {
@@ -147,7 +147,7 @@ export interface FlowRunOptions {
147
147
  readonly emit?: (event: SchedulerEvent) => Effect.Effect<void, Error>;
148
148
  readonly flowId: string;
149
149
  readonly inputs?: Readonly<Record<string, Readonly<Record<string, JsonValue>>>>;
150
- readonly invokeTask: (invocation: TaskInvocation) => Effect.Effect<unknown, Error>;
150
+ readonly invokeTask: (invocation: TaskInvocation, outputs: (value: unknown) => Effect.Effect<void, Error>) => Effect.Effect<unknown, Error>;
151
151
  readonly projectFailure?: (error: unknown) => SchedulerFailure;
152
152
  readonly resume?: {
153
153
  readonly action: WaitAction;
@@ -122,14 +122,10 @@ function p(e, t) {
122
122
  case "subflow": return a(e.subflows[t.subflowId].inputs);
123
123
  case "task": return a([...t.task == null ? e.tasks[t.taskId].inputs : t.task.inputs, ...t.additionalInputs ?? []]);
124
124
  case "wait": {
125
- let n = t.notification == null ? void 0 : e.tasks[t.notification.taskId];
125
+ let n = t.notification, r = n == null ? void 0 : e.tasks[n.taskId];
126
126
  return {
127
- value: {
128
- jsonSchema: {},
129
- nullable: !0,
130
- value: null
131
- },
132
- ...t.notification == null || n == null ? {} : Object.fromEntries(n.inputs.flatMap((e) => "handle" in e && e.handle != t.notification.messageHandle ? [[d(e.handle), e]] : []))
127
+ [t.input.handle]: t.input,
128
+ ...n == null || r == null ? {} : Object.fromEntries(r.inputs.flatMap((e) => "handle" in e && e.handle != n.messageHandle ? [[d(e.handle), e]] : []))
133
129
  };
134
130
  }
135
131
  }
@@ -317,6 +313,7 @@ function D(e, t, n) {
317
313
  }
318
314
  }
319
315
  function O(e, t) {
316
+ if (e === void 0) return {};
320
317
  if (typeof e != "object" || !e || Array.isArray(e)) throw Error(`Node "${t}" must return an object.`);
321
318
  return e;
322
319
  }
@@ -374,7 +371,7 @@ function k(r, s, c, d, b, x = {}, S, C, w) {
374
371
  }), ee = (t, n, i, o) => {
375
372
  let l = e.gen(function* () {
376
373
  let l = h(r.prepared, n), u = m(r.prepared, n), d = Object.fromEntries(Object.entries(o).filter(([e]) => {
377
- if (n.kind == "wait") return e == "value";
374
+ if (n.kind == "wait") return e == n.input.handle;
378
375
  let t = n.inputs[e];
379
376
  return t?.kind != "sources" || t.sources.every((e) => e.kind != "binding");
380
377
  }));
@@ -417,7 +414,14 @@ function k(r, s, c, d, b, x = {}, S, C, w) {
417
414
  break;
418
415
  }
419
416
  case "task": {
420
- let a = new Set((n.additionalInputs ?? []).map((e) => e.handle)), l = yield* r.invokeTask({
417
+ let a = new Set((n.additionalInputs ?? []).map((e) => e.handle)), l = /* @__PURE__ */ new Map(), u = (n) => e.gen(function* () {
418
+ let r = yield* e.try({
419
+ try: () => O(n, t),
420
+ catch: (e) => e instanceof Error ? e : Error(String(e))
421
+ });
422
+ for (let [e, n] of Object.entries(r)) yield* Z(t, i, e, n), l.set(e, n);
423
+ });
424
+ yield* u(yield* r.invokeTask({
421
425
  additionalInputs: Object.fromEntries(Object.entries(o).filter(([e]) => a.has(e))),
422
426
  blockId: n.task == null ? n.taskId : n.task.moduleId,
423
427
  flowId: s.flowId,
@@ -430,12 +434,7 @@ function k(r, s, c, d, b, x = {}, S, C, w) {
430
434
  capabilities: n.task.capabilities ?? [],
431
435
  moduleId: n.task.moduleId
432
436
  }
433
- });
434
- f = yield* e.try({
435
- try: () => O(l, t),
436
- catch: (e) => e instanceof Error ? e : Error(String(e))
437
- });
438
- for (let [e, n] of Object.entries(f)) yield* Z(t, i, e, n);
437
+ }, u)), f = Object.fromEntries(l);
439
438
  break;
440
439
  }
441
440
  case "wait": return yield* e.fail(/* @__PURE__ */ Error("Wait jobs are handled by the Scheduler suspension boundary."));
@@ -464,10 +463,10 @@ function k(r, s, c, d, b, x = {}, S, C, w) {
464
463
  taskId: n.notification.taskId
465
464
  } },
466
465
  order: d,
467
- value: a.value ?? null,
466
+ value: a[n.input.handle] ?? null,
468
467
  waitId: i()
469
468
  };
470
- let e = n.inputs.value, o = e?.kind == "sources" && e.sources.some((e) => e.kind == "binding") ? {} : { value: a.value ?? null };
469
+ let e = n.inputs[n.input.handle], o = e?.kind == "sources" && e.sources.some((e) => e.kind == "binding") ? {} : { [n.input.handle]: a[n.input.handle] ?? null };
471
470
  B(r.emit({
472
471
  inputs: o,
473
472
  jobId: l,
@@ -513,7 +512,7 @@ function k(r, s, c, d, b, x = {}, S, C, w) {
513
512
  if (Y = (e) => {
514
513
  if (G != null || q) return;
515
514
  let t = s.graph.nodes[e], n = N.get(e);
516
- for (; n.ready && (R.get(e) ?? 0) < t.concurrency;) te(e);
515
+ for (; n.ready && (R.get(e) ?? 0) < t.concurrency;) if (te(e), q) return;
517
516
  }, w == null) {
518
517
  for (let [e, t] of Object.entries(x)) {
519
518
  let n = N.get(e);
package/dist/index.d.ts CHANGED
@@ -57,7 +57,7 @@ export interface TaskContext<Outputs extends object = Record<string, unknown>> {
57
57
  readonly artifact: ArtifactCapability;
58
58
  readonly fetch: typeof fetch;
59
59
  readonly logger: TaskLogger;
60
- output<Handle extends keyof Outputs & string>(handle: Handle, value: Outputs[Handle]): Promise<void>;
60
+ outputs(value: Partial<Outputs>): Promise<void>;
61
61
  preview(payload: PreviewPayload, id?: string): Promise<void>;
62
62
  reportProgress(progress: number): Promise<void>;
63
63
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oomol-lab/open-flow",
3
- "version": "0.1.0-beta.4",
3
+ "version": "0.1.0-beta.6",
4
4
  "description": "TypeScript contracts and Browser runtime for Open Flow.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {