@relayflows/sdk 2.0.27 → 2.0.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 (128) hide show
  1. package/dist/authored-flow-executor.d.ts +8 -1
  2. package/dist/authored-flow-executor.d.ts.map +1 -1
  3. package/dist/authored-flow-executor.js +16 -7
  4. package/dist/authored-flow-executor.js.map +1 -1
  5. package/dist/authored-flow-lifecycle.d.ts +68 -1
  6. package/dist/authored-flow-lifecycle.d.ts.map +1 -1
  7. package/dist/authored-flow-lifecycle.js +108 -10
  8. package/dist/authored-flow-lifecycle.js.map +1 -1
  9. package/dist/authored-flow-operation.d.ts +9 -1
  10. package/dist/authored-flow-operation.d.ts.map +1 -1
  11. package/dist/authored-flow-operation.js +7 -1
  12. package/dist/authored-flow-operation.js.map +1 -1
  13. package/dist/authored-node-entry.js +4 -0
  14. package/dist/authored-node-entry.js.map +1 -1
  15. package/dist/authored-node-runner.d.ts.map +1 -1
  16. package/dist/authored-node-runner.js +2 -1
  17. package/dist/authored-node-runner.js.map +1 -1
  18. package/dist/authored-promise-graph.d.ts +19 -4
  19. package/dist/authored-promise-graph.d.ts.map +1 -1
  20. package/dist/authored-promise-graph.js +44 -19
  21. package/dist/authored-promise-graph.js.map +1 -1
  22. package/dist/authored-root.d.ts +2 -0
  23. package/dist/authored-root.d.ts.map +1 -1
  24. package/dist/authored-root.js +2 -0
  25. package/dist/authored-root.js.map +1 -1
  26. package/dist/authored-step-graph.d.ts +83 -0
  27. package/dist/authored-step-graph.d.ts.map +1 -0
  28. package/dist/authored-step-graph.js +217 -0
  29. package/dist/authored-step-graph.js.map +1 -0
  30. package/dist/authored-step-index.d.ts +36 -0
  31. package/dist/authored-step-index.d.ts.map +1 -1
  32. package/dist/authored-step-index.js +68 -15
  33. package/dist/authored-step-index.js.map +1 -1
  34. package/dist/authored-step-output.d.ts +3 -0
  35. package/dist/authored-step-output.d.ts.map +1 -1
  36. package/dist/authored-step-output.js +4 -2
  37. package/dist/authored-step-output.js.map +1 -1
  38. package/dist/authored-worker-step.d.ts +3 -1
  39. package/dist/authored-worker-step.d.ts.map +1 -1
  40. package/dist/authored-worker-step.js +25 -6
  41. package/dist/authored-worker-step.js.map +1 -1
  42. package/dist/cli/direct-run.d.ts.map +1 -1
  43. package/dist/cli/direct-run.js +5 -2
  44. package/dist/cli/direct-run.js.map +1 -1
  45. package/dist/cli/run.d.ts +2 -0
  46. package/dist/cli/run.d.ts.map +1 -1
  47. package/dist/cli/run.js +9 -5
  48. package/dist/cli/run.js.map +1 -1
  49. package/dist/cli/status.d.ts +12 -0
  50. package/dist/cli/status.d.ts.map +1 -1
  51. package/dist/cli/status.js +39 -1
  52. package/dist/cli/status.js.map +1 -1
  53. package/dist/cli/step-excerpt.d.ts +48 -0
  54. package/dist/cli/step-excerpt.d.ts.map +1 -0
  55. package/dist/cli/step-excerpt.js +302 -0
  56. package/dist/cli/step-excerpt.js.map +1 -0
  57. package/dist/cli/step-failure.d.ts.map +1 -1
  58. package/dist/cli/step-failure.js +9 -20
  59. package/dist/cli/step-failure.js.map +1 -1
  60. package/dist/cli-commands.d.ts +8 -0
  61. package/dist/cli-commands.d.ts.map +1 -1
  62. package/dist/cli-commands.js +6 -0
  63. package/dist/cli-commands.js.map +1 -1
  64. package/dist/cli.d.ts +2 -0
  65. package/dist/cli.d.ts.map +1 -1
  66. package/dist/cli.js +38 -7
  67. package/dist/cli.js.map +1 -1
  68. package/dist/failure-kinds.d.ts +10 -2
  69. package/dist/failure-kinds.d.ts.map +1 -1
  70. package/dist/failure-kinds.js.map +1 -1
  71. package/dist/journal-client.d.ts +8 -2
  72. package/dist/journal-client.d.ts.map +1 -1
  73. package/dist/journal-client.js +22 -6
  74. package/dist/journal-client.js.map +1 -1
  75. package/dist/llm-worker.d.ts +2 -1
  76. package/dist/llm-worker.d.ts.map +1 -1
  77. package/dist/llm-worker.js +5 -2
  78. package/dist/llm-worker.js.map +1 -1
  79. package/dist/local-agent.d.ts +1 -1
  80. package/dist/local-agent.d.ts.map +1 -1
  81. package/dist/local-agent.js +8 -3
  82. package/dist/local-agent.js.map +1 -1
  83. package/dist/preflight.d.ts.map +1 -1
  84. package/dist/preflight.js +29 -3
  85. package/dist/preflight.js.map +1 -1
  86. package/dist/promise-ancestry.d.ts +20 -0
  87. package/dist/promise-ancestry.d.ts.map +1 -0
  88. package/dist/promise-ancestry.js +104 -0
  89. package/dist/promise-ancestry.js.map +1 -0
  90. package/dist/validate.d.ts.map +1 -1
  91. package/dist/validate.js +7 -0
  92. package/dist/validate.js.map +1 -1
  93. package/dist/worker-cli.d.ts +7 -0
  94. package/dist/worker-cli.d.ts.map +1 -1
  95. package/dist/worker-cli.js +42 -10
  96. package/dist/worker-cli.js.map +1 -1
  97. package/dist/worker-slots.d.ts +42 -0
  98. package/dist/worker-slots.d.ts.map +1 -0
  99. package/dist/worker-slots.js +94 -0
  100. package/dist/worker-slots.js.map +1 -0
  101. package/package.json +2 -2
  102. package/src/authored-flow-executor.ts +22 -3
  103. package/src/authored-flow-lifecycle.ts +111 -16
  104. package/src/authored-flow-operation.ts +10 -0
  105. package/src/authored-node-entry.ts +4 -1
  106. package/src/authored-node-runner.ts +2 -1
  107. package/src/authored-promise-graph.ts +46 -19
  108. package/src/authored-root.ts +4 -0
  109. package/src/authored-step-graph.ts +246 -0
  110. package/src/authored-step-index.ts +90 -13
  111. package/src/authored-step-output.ts +7 -3
  112. package/src/authored-worker-step.ts +25 -6
  113. package/src/cli/direct-run.ts +5 -2
  114. package/src/cli/run.ts +11 -4
  115. package/src/cli/status.ts +50 -1
  116. package/src/cli/step-excerpt.ts +332 -0
  117. package/src/cli/step-failure.ts +9 -20
  118. package/src/cli-commands.ts +6 -0
  119. package/src/cli.ts +40 -9
  120. package/src/failure-kinds.ts +10 -2
  121. package/src/journal-client.ts +25 -6
  122. package/src/llm-worker.ts +7 -2
  123. package/src/local-agent.ts +8 -2
  124. package/src/preflight.ts +37 -2
  125. package/src/promise-ancestry.ts +98 -0
  126. package/src/validate.ts +7 -0
  127. package/src/worker-cli.ts +41 -9
  128. package/src/worker-slots.ts +92 -0
@@ -1 +1 @@
1
- {"version":3,"file":"worker-cli.js","sourceRoot":"","sources":["../src/worker-cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvH,OAAO,EAAE,eAAe,EAA2B,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAqE,MAAM,uBAAuB,CAAC;AAChJ,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EACL,cAAc,EACd,YAAY,EACZ,cAAc,EACd,eAAe,GAGhB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,iBAAiB,GAElB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAA6B,MAAM,sBAAsB,CAAC;AAC5G,OAAO,EACL,iBAAiB,EACjB,wBAAwB,GAEzB,MAAM,4BAA4B,CAAC;AAEpC,kFAAkF;AAClF,MAAM,CAAC,MA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EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACvE,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC7B,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,iBAAiB,CAAC;YAC9C,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC;YACnD,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC;SACpD,CAAC,CAAC,CAAC;QACJ,IAAI,UAAU,CAAC,SAAS,GAAG,CAAC,EAAE,CAAC;YAC7B,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE;gBACtB,wEAAwE;gBACxE,wEAAwE;gBACxE,mEAAmE;gBACnE,IAAI,CAAC,SAAS,EAAE,CAAC;gBACjB,MAAM,CAAC;oBACL,SAAS,EAAE,IAAI;oBACf,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC;oBACnD,WAAW,EAAE,kCAAkC,UAAU,CAAC,SAAS,KAAK;iBACzE,CAAC,CAAC;YACL,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,42 @@
1
+ /** The local agent worker's default concurrency, and the ceiling `--agent-capacity` accepts. */
2
+ export declare const DEFAULT_LOCAL_AGENT_CAPACITY = 4;
3
+ export declare const MAX_LOCAL_AGENT_CAPACITY = 32;
4
+ /** A positive integer no larger than the ceiling; anything else is not a capacity. */
5
+ export declare function isAgentCapacity(value: unknown): value is number;
6
+ /**
7
+ * First-come admission to a worker that holds `capacity` dispatches at once.
8
+ *
9
+ * The kernel never queues a step for a busy worker: an attempt with no worker
10
+ * below capacity parks the run ("no worker is attached for step type …"). An
11
+ * authored body opens one child run per `f.agent`/`f.llm`, so `Promise.all`
12
+ * over more calls than the worker holds would park the overflow. Holding the
13
+ * overflow here, before `run.start`, keeps the kernel's admission exact and
14
+ * turns "too many at once" into "wait for a slot".
15
+ */
16
+ export declare class WorkerSlots {
17
+ readonly capacity: number;
18
+ private held;
19
+ private readonly waiting;
20
+ private closed;
21
+ constructor(capacity: number);
22
+ run<T>(work: () => Promise<T>): Promise<T>;
23
+ /** Read through a call so a check after an `await` is not narrowed away. */
24
+ private closedReason;
25
+ /**
26
+ * Hand the slot to the next waiter on a later macrotask, not synchronously.
27
+ * When the work that held it rejected and that rejection fails the body, the
28
+ * failure reaches `close` through microtasks only (operation → Promise.all →
29
+ * body → executor). Waking the waiter synchronously let it admit a child run
30
+ * before `close` could refuse it; deferring lets the teardown land first.
31
+ */
32
+ private release;
33
+ /**
34
+ * Refuse every queued and future admission with `reason`; work already
35
+ * holding a slot is not interrupted. The authored body calls this when it
36
+ * fails: a queued call is already `running` as an operation, so operation
37
+ * cancellation cannot reach it, and without this it would still be admitted
38
+ * and run after the flow had failed.
39
+ */
40
+ close(reason: unknown): void;
41
+ }
42
+ //# sourceMappingURL=worker-slots.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker-slots.d.ts","sourceRoot":"","sources":["../src/worker-slots.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAC9C,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C,sFAAsF;AACtF,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAE/D;AAED;;;;;;;;;GASG;AACH,qBAAa,WAAW;IAKV,QAAQ,CAAC,QAAQ,EAAE,MAAM;IAJrC,OAAO,CAAC,IAAI,CAAK;IACjB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyE;IACjG,OAAO,CAAC,MAAM,CAA2C;gBAEpC,QAAQ,EAAE,MAAM;IAI/B,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAqBhD,4EAA4E;IAC5E,OAAO,CAAC,YAAY;IAIpB;;;;;;OAMG;IACH,OAAO,CAAC,OAAO;IAkBf;;;;;;OAMG;IACH,KAAK,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI;CAK7B"}
@@ -0,0 +1,94 @@
1
+ /** The local agent worker's default concurrency, and the ceiling `--agent-capacity` accepts. */
2
+ export const DEFAULT_LOCAL_AGENT_CAPACITY = 4;
3
+ export const MAX_LOCAL_AGENT_CAPACITY = 32;
4
+ /** A positive integer no larger than the ceiling; anything else is not a capacity. */
5
+ export function isAgentCapacity(value) {
6
+ return Number.isInteger(value) && value >= 1 && value <= MAX_LOCAL_AGENT_CAPACITY;
7
+ }
8
+ /**
9
+ * First-come admission to a worker that holds `capacity` dispatches at once.
10
+ *
11
+ * The kernel never queues a step for a busy worker: an attempt with no worker
12
+ * below capacity parks the run ("no worker is attached for step type …"). An
13
+ * authored body opens one child run per `f.agent`/`f.llm`, so `Promise.all`
14
+ * over more calls than the worker holds would park the overflow. Holding the
15
+ * overflow here, before `run.start`, keeps the kernel's admission exact and
16
+ * turns "too many at once" into "wait for a slot".
17
+ */
18
+ export class WorkerSlots {
19
+ capacity;
20
+ held = 0;
21
+ waiting = [];
22
+ closed;
23
+ constructor(capacity) {
24
+ this.capacity = capacity;
25
+ if (!isAgentCapacity(capacity))
26
+ throw new RangeError(`worker capacity must be an integer from 1 to ${MAX_LOCAL_AGENT_CAPACITY} (got ${capacity})`);
27
+ }
28
+ async run(work) {
29
+ if (this.closed !== undefined)
30
+ throw this.closed.reason;
31
+ if (this.held < this.capacity)
32
+ this.held++;
33
+ // A released slot is handed straight to the next waiter, so `held` never
34
+ // dips below capacity while anyone is queued and no later caller can jump it.
35
+ else {
36
+ await new Promise((resolve, reject) => this.waiting.push({ resolve, reject }));
37
+ // Woken with the slot, but the body may have failed in between (see release).
38
+ const closed = this.closedReason();
39
+ if (closed !== undefined) {
40
+ this.release();
41
+ throw closed.reason;
42
+ }
43
+ }
44
+ try {
45
+ return await work();
46
+ }
47
+ finally {
48
+ this.release();
49
+ }
50
+ }
51
+ /** Read through a call so a check after an `await` is not narrowed away. */
52
+ closedReason() {
53
+ return this.closed;
54
+ }
55
+ /**
56
+ * Hand the slot to the next waiter on a later macrotask, not synchronously.
57
+ * When the work that held it rejected and that rejection fails the body, the
58
+ * failure reaches `close` through microtasks only (operation → Promise.all →
59
+ * body → executor). Waking the waiter synchronously let it admit a child run
60
+ * before `close` could refuse it; deferring lets the teardown land first.
61
+ */
62
+ release() {
63
+ const next = this.waiting.shift();
64
+ if (next === undefined) {
65
+ this.held--;
66
+ return;
67
+ }
68
+ setImmediate(() => {
69
+ if (this.closed === undefined) {
70
+ next.resolve();
71
+ return;
72
+ }
73
+ // Closed meanwhile. `close` could not see this waiter (already taken off
74
+ // the queue), so refuse it here, and pass the slot on instead of leaking it.
75
+ next.reject(this.closed.reason);
76
+ this.release();
77
+ });
78
+ }
79
+ /**
80
+ * Refuse every queued and future admission with `reason`; work already
81
+ * holding a slot is not interrupted. The authored body calls this when it
82
+ * fails: a queued call is already `running` as an operation, so operation
83
+ * cancellation cannot reach it, and without this it would still be admitted
84
+ * and run after the flow had failed.
85
+ */
86
+ close(reason) {
87
+ if (this.closed !== undefined)
88
+ return;
89
+ this.closed = { reason };
90
+ for (const waiter of this.waiting.splice(0))
91
+ waiter.reject(reason);
92
+ }
93
+ }
94
+ //# sourceMappingURL=worker-slots.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker-slots.js","sourceRoot":"","sources":["../src/worker-slots.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC;AAC9C,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,CAAC;AAE3C,sFAAsF;AACtF,MAAM,UAAU,eAA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,YAAY;QAClB,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED;;;;;;OAMG;IACK,OAAO;QACb,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QAClC,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,IAAI,CAAC,IAAI,EAAE,CAAC;YACZ,OAAO;QACT,CAAC;QACD,YAAY,CAAC,GAAG,EAAE;YAChB,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;gBAC9B,IAAI,CAAC,OAAO,EAAE,CAAC;gBACf,OAAO;YACT,CAAC;YACD,yEAAyE;YACzE,6EAA6E;YAC7E,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAChC,IAAI,CAAC,OAAO,EAAE,CAAC;QACjB,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,MAAe;QACnB,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS;YAAE,OAAO;QACtC,IAAI,CAAC,MAAM,GAAG,EAAE,MAAM,EAAE,CAAC;QACzB,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;YAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACrE,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@relayflows/sdk",
3
- "version": "2.0.27",
3
+ "version": "2.0.29",
4
4
  "description": "TypeScript-first authoring SDK for Relayflows. Compiles specs; speaks the journal protocol.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -49,7 +49,7 @@
49
49
  "@modelcontextprotocol/sdk": "^1.30.0",
50
50
  "@relayfile/adapter-core": "0.6.2",
51
51
  "@relayfile/relay-helpers": "0.4.12",
52
- "@relayflows/surface": "2.0.27",
52
+ "@relayflows/surface": "2.0.29",
53
53
  "@types/js-yaml": "^4.0.9",
54
54
  "ai-hist": "0.4.1",
55
55
  "ajv": "^8.17.1",
@@ -43,6 +43,7 @@ import {
43
43
  verifyAuthoredOperations,
44
44
  } from './authored-flow-operation.js';
45
45
  import { AuthoredFlowLifecycle } from './authored-flow-lifecycle.js';
46
+ import { displayLabel, type AuthoredStepEdges } from './authored-step-index.js';
46
47
  import { JournalClient } from './journal-client.js';
47
48
  import { PluginError } from './plugin-manifest.js';
48
49
  import { createHookEvaluator } from './authored-hooks.js';
@@ -77,7 +78,7 @@ type EveryRunCompletionReasonIsAcceptedByDone = Assert<
77
78
 
78
79
  export { AuthoredFlowExecutionError, type AuthoredFlowExecutionErrorCode };
79
80
 
80
- export interface AuthoredFlowJournalStep {
81
+ export interface AuthoredFlowJournalStep extends AuthoredStepEdges {
81
82
  readonly id: string;
82
83
  readonly runId: string;
83
84
  readonly completionReason: ProtocolCompletionReason;
@@ -154,6 +155,12 @@ export interface ExecuteAuthoredFlowOptions {
154
155
  readonly onWait?: RunLifecycleOptions['onWait'];
155
156
  readonly onProgress?: (event: ProgressEvent) => void;
156
157
  readonly localAgentStream?: string;
158
+ /**
159
+ * How many agent (and, separately, LLM) dispatches the attached local
160
+ * workers hold at once. Set, it caps this body's concurrent `f.agent` /
161
+ * `f.llm` child runs to match; unset, calls are admitted as they arrive.
162
+ */
163
+ readonly workerCapacity?: number;
157
164
  /** Durable kernel root that owns this body's child admission identities. */
158
165
  readonly rootRunId?: string;
159
166
  /** Installed flow-extension plugins, in lock order, so `f.hook` can AND-compose them. */
@@ -233,6 +240,7 @@ export async function executeAuthoredFlow<Input = undefined>(
233
240
  const journalSteps: AuthoredFlowJournalStep[] = [];
234
241
  const authoredSteps: AuthoredFlowOperation<unknown>[] = [];
235
242
  const lifecycle = new AuthoredFlowLifecycle();
243
+ const stepEdges = (step: string): AuthoredStepEdges | undefined => lifecycle.stepEdges(step);
236
244
  let nextStep = 1;
237
245
  let requestedCompletion: LoweredCompletionReason | undefined;
238
246
 
@@ -240,12 +248,13 @@ export async function executeAuthoredFlow<Input = undefined>(
240
248
  definition.name, journal, journalSteps, budget, {
241
249
  ...(options.rootRunId === undefined ? {} : { rootRunId: options.rootRunId }),
242
250
  ...(options.dataDir === undefined ? {} : { dataDir: options.dataDir }),
251
+ stepEdges,
243
252
  },
244
253
  );
245
254
 
246
255
  const worker = authoredWorkerRunner(
247
256
  definition, journal, flowPath, journalSteps, waitOptions,
248
- localAgentStream, budget, definition.header.budget, options.rootRunId,
257
+ localAgentStream, budget, definition.header.budget, options.rootRunId, options.workerCapacity, stepEdges,
249
258
  );
250
259
 
251
260
  /**
@@ -359,6 +368,7 @@ export async function executeAuthoredFlow<Input = undefined>(
359
368
  return worker.llm(id, text, undefined, llmOp.namedGate);
360
369
  }, onProgress),
361
370
  lifecycle,
371
+ {},
362
372
  );
363
373
  return trackStep(authoredSteps, llmOp);
364
374
  }
@@ -436,13 +446,17 @@ export async function executeAuthoredFlow<Input = undefined>(
436
446
  () => assertOperationAllowed('run', definition.name, requestedCompletion),
437
447
  () => observeStep(id, 'deterministic', () => lowerDeterministic(id, command, false, leaseMs, runOp.namedGate), options.onProgress),
438
448
  lifecycle,
449
+ // No label: a command is not a display name. It carries literal
450
+ // tokens and URLs, and no prefix of it is safe to show (displayLabel).
451
+ {},
439
452
  );
440
453
  return trackStep(authoredSteps, runOp);
441
454
  },
442
455
  llm: llmOperation,
443
456
  agent(name, options) {
444
457
  assertOperationAllowed('agent', definition.name, requestedCompletion);
445
- void name; // Authored headers do not yet declare reusable named agents.
458
+ // Authored headers do not yet declare reusable named agents, so the name
459
+ // identifies nothing to the kernel; it is the step's label in the DAG.
446
460
  const id = `agent-${nextStep++}`;
447
461
  let agentOp!: AuthoredFlowOperation<AgentResult>;
448
462
  agentOp = new AuthoredFlowOperation<AgentResult>(
@@ -451,6 +465,7 @@ export async function executeAuthoredFlow<Input = undefined>(
451
465
  () => assertOperationAllowed('agent', definition.name, requestedCompletion),
452
466
  () => observeStep(id, 'agent', () => worker.agent(id, options, agentOp.namedGate), onProgress),
453
467
  lifecycle,
468
+ displayLabel(typeof name === 'string' ? name : undefined),
454
469
  );
455
470
  return trackStep(authoredSteps, agentOp);
456
471
  },
@@ -512,6 +527,7 @@ export async function executeAuthoredFlow<Input = undefined>(
512
527
  return recorded.answer;
513
528
  }, options.onProgress),
514
529
  lifecycle,
530
+ {},
515
531
  );
516
532
  return trackStep(authoredSteps, humanOp);
517
533
  },
@@ -534,6 +550,7 @@ export async function executeAuthoredFlow<Input = undefined>(
534
550
  return verdict;
535
551
  },
536
552
  lifecycle,
553
+ displayLabel(typeof name === 'string' ? name : undefined),
537
554
  ));
538
555
  },
539
556
  done(reason) {
@@ -600,6 +617,7 @@ export async function executeAuthoredFlow<Input = undefined>(
600
617
  }
601
618
  if (bodyFailed) {
602
619
  try {
620
+ worker.stop(bodyFailure);
603
621
  await stopAuthoredOperations(authoredSteps, bodyFailure);
604
622
  } finally {
605
623
  lifecycle.close();
@@ -626,6 +644,7 @@ export async function executeAuthoredFlow<Input = undefined>(
626
644
  `flow "${definition.name}" returned without done()`,
627
645
  );
628
646
  try {
647
+ worker.stop(missingCompletion);
629
648
  await stopAuthoredOperations(authoredSteps, missingCompletion);
630
649
  } finally {
631
650
  lifecycle.close();
@@ -1,6 +1,8 @@
1
1
  import { AsyncLocalStorage, executionAsyncId } from 'node:async_hooks';
2
2
  import { AuthoredFlowExecutionError } from './authored-flow-error.js';
3
3
  import { AuthoredPromiseGraph } from './authored-promise-graph.js';
4
+ import { AuthoredStepGraph } from './authored-step-graph.js';
5
+ import type { AuthoredStepEdges } from './authored-step-index.js';
4
6
 
5
7
  type OperationToken = object;
6
8
  type ResolverProbe = Set<number>;
@@ -66,7 +68,7 @@ const observedCombinators: Record<CombinatorName, Combinator> = Object.fromEntri
66
68
  const members = collectMembers(values);
67
69
  if (members === undefined) return native.call(this, values);
68
70
  const aggregate = native.call(this, members);
69
- activeLifecycle.getStore()?.registerCombinator(members, aggregate);
71
+ activeLifecycle.getStore()?.registerCombinator(members, aggregate, name);
70
72
  return aggregate;
71
73
  };
72
74
  Object.defineProperty(observed, 'name', { value: name, configurable: true });
@@ -117,6 +119,8 @@ export class AuthoredFlowLifecycle {
117
119
  */
118
120
  applyPredicateGate: (<T>(operation: { id: string; predicateGate: unknown }, value: T) => Promise<T>) | undefined = undefined;
119
121
  private readonly graph: AuthoredPromiseGraph;
122
+ private readonly stepGraph: AuthoredStepGraph;
123
+ private readonly operationPromises = new Map<OperationToken, number>();
120
124
  private readonly activeResolverProbes: ResolverProbe[] = [];
121
125
  private readonly invocations = new Map<OperationToken, AuthoredOperationInvocation[]>();
122
126
  private readonly promiseAllAggregates = new Map<OperationToken, Set<number>>();
@@ -124,6 +128,9 @@ export class AuthoredFlowLifecycle {
124
128
  private readonly callbackFailures = new Map<OperationToken, unknown>();
125
129
  private completionAsyncId: number | undefined;
126
130
  private closed = false;
131
+ /** Bumped by every invocation and combinator registration; with the graph's version it keys `groupsByInvocation`. */
132
+ private registrations = 0;
133
+ private groupsByInvocation: { readonly key: string; readonly groups: Map<number, ReadonlySet<number>> } | undefined;
127
134
 
128
135
  constructor() {
129
136
  this.graph = new AuthoredPromiseGraph(
@@ -132,6 +139,7 @@ export class AuthoredFlowLifecycle {
132
139
  for (const probe of this.activeResolverProbes) probe.add(asyncId);
133
140
  },
134
141
  );
142
+ this.stepGraph = new AuthoredStepGraph((asyncId) => this.graph.causesOf(asyncId));
135
143
  installPromiseAllObserver();
136
144
  try {
137
145
  this.graph.enable();
@@ -149,16 +157,25 @@ export class AuthoredFlowLifecycle {
149
157
  stepOwners.set(step, { lifecycle: this, operation });
150
158
  }
151
159
 
152
- registerCombinator(values: readonly unknown[], aggregate: Promise<unknown>): void {
160
+ registerCombinator(
161
+ values: readonly unknown[],
162
+ aggregate: Promise<unknown>,
163
+ combinator: CombinatorName,
164
+ ): void {
153
165
  const aggregateId = this.graph.idOf(aggregate);
154
166
  if (aggregateId === undefined) return;
155
167
  this.graph.registerRoot(aggregateId);
156
168
  const memberIds = new Set<number>();
169
+ const awaitedMembers: number[] = [];
157
170
  for (const value of values) {
158
171
  if ((typeof value !== 'object' && typeof value !== 'function') || value === null) continue;
159
172
  const memberId = this.graph.idOf(value);
160
173
  if (memberId !== undefined) memberIds.add(memberId);
161
174
  const owner = stepOwners.get(value);
175
+ // A Step is a thenable, not a promise: its member identity for the step
176
+ // graph is the operation's own promise.
177
+ const awaited = owner?.lifecycle === this ? this.operationPromises.get(owner.operation) : memberId;
178
+ if (awaited !== undefined) awaitedMembers.push(awaited);
162
179
  if (owner?.lifecycle !== this) continue;
163
180
  let operationAggregates = this.promiseAllAggregates.get(owner.operation);
164
181
  if (operationAggregates === undefined) {
@@ -168,6 +185,34 @@ export class AuthoredFlowLifecycle {
168
185
  operationAggregates.add(aggregateId);
169
186
  }
170
187
  this.promiseAllGroups.push({ aggregate: aggregateId, members: memberIds });
188
+ this.registrations++;
189
+ this.stepGraph.registerAggregate(aggregateId, aggregate, combinator, awaitedMembers);
190
+ }
191
+
192
+ /**
193
+ * Record an operation's own promise and, for a step the run's DAG draws, its
194
+ * place in that DAG. Called synchronously from the operation's constructor:
195
+ * the causal predecessors are read from the context that invoked
196
+ * `f.agent`/`f.run`/`f.llm`, which is observable only at that moment.
197
+ *
198
+ * Every operation's promise is recorded so `Promise.all([step, …])` can
199
+ * expand to it; only a `node` becomes a frontier the walk stops at. An
200
+ * operation that is not drawn (a helper effect) is walked through instead,
201
+ * so an edge never names a step the index has no record for.
202
+ */
203
+ registerOperation(
204
+ operation: OperationToken,
205
+ promise: Promise<unknown>,
206
+ node?: { readonly step: string; readonly label?: string },
207
+ ): AuthoredStepEdges | undefined {
208
+ const promiseId = this.graph.idOf(promise);
209
+ if (promiseId !== undefined) this.operationPromises.set(operation, promiseId);
210
+ if (node === undefined) return undefined;
211
+ return this.stepGraph.registerStep(node.step, promiseId, executionAsyncId(), node.label);
212
+ }
213
+
214
+ stepEdges(step: string): AuthoredStepEdges | undefined {
215
+ return this.stepGraph.edgesOf(step);
171
216
  }
172
217
 
173
218
  registerInvocation(
@@ -178,6 +223,7 @@ export class AuthoredFlowLifecycle {
178
223
  const operationInvocations = this.invocations.get(operation);
179
224
  if (operationInvocations === undefined) this.invocations.set(operation, [invocation]);
180
225
  else operationInvocations.push(invocation);
226
+ this.registrations++;
181
227
  this.graph.registerRoot(asyncId);
182
228
  return invocation;
183
229
  }
@@ -244,21 +290,43 @@ export class AuthoredFlowLifecycle {
244
290
  * Must be called before the gate awaits anything.
245
291
  */
246
292
  derivedWorkInFlight<T extends OperationToken>(operations: readonly T[]): T[] {
293
+ const inFlight = this.graph.rootsInFlight();
247
294
  return operations.filter((operation) =>
248
- this.graph.inFlightFrom(this.rootsFor(operation)).length > 0);
295
+ [...this.rootsFor(operation)].some((root) => inFlight.has(root)));
249
296
  }
250
297
 
298
+ /**
299
+ * Observe each settled derived promise once, crediting a rejection to every
300
+ * operation whose roots it derives from. Observing it once per operation
301
+ * instead — each after a scan of every tracked promise — was the gate's
302
+ * second quadratic term: roots of a task graph overlap heavily, so every
303
+ * operation re-observed most of the flow.
304
+ */
251
305
  async observeCallbackFailures(operations: readonly OperationToken[]): Promise<void> {
252
- const observations: Promise<unknown>[] = [];
306
+ const operationsByRoot = new Map<number, OperationToken[]>();
253
307
  for (const operation of operations) {
254
- for (const promise of this.graph.settledFrom(this.rootsFor(operation))) {
255
- observations.push(nativePromiseThen.call(
256
- promise,
257
- () => undefined,
258
- (error: unknown) => { this.recordCallbackFailure(operation, error); },
259
- ));
308
+ for (const root of this.rootsFor(operation)) {
309
+ const owners = operationsByRoot.get(root);
310
+ if (owners === undefined) operationsByRoot.set(root, [operation]);
311
+ else owners.push(operation);
260
312
  }
261
313
  }
314
+ const owners = new Map<Promise<unknown>, Set<OperationToken>>();
315
+ for (const { root, handle } of this.graph.settledWithRoots()) {
316
+ const rootOwners = operationsByRoot.get(root);
317
+ if (rootOwners === undefined) continue;
318
+ let promiseOwners = owners.get(handle);
319
+ if (promiseOwners === undefined) owners.set(handle, promiseOwners = new Set());
320
+ for (const operation of rootOwners) promiseOwners.add(operation);
321
+ }
322
+ const observations: Promise<unknown>[] = [];
323
+ for (const [promise, promiseOwners] of owners) {
324
+ observations.push(nativePromiseThen.call(
325
+ promise,
326
+ () => undefined,
327
+ (error: unknown) => { for (const operation of promiseOwners) this.recordCallbackFailure(operation, error); },
328
+ ));
329
+ }
262
330
  await Promise.all(observations);
263
331
  }
264
332
 
@@ -277,9 +345,12 @@ export class AuthoredFlowLifecycle {
277
345
  this.closed = true;
278
346
  this.graph.disable();
279
347
  this.graph.clear();
348
+ this.stepGraph.release();
349
+ this.operationPromises.clear();
280
350
  this.invocations.clear();
281
351
  this.promiseAllAggregates.clear();
282
352
  this.promiseAllGroups.length = 0;
353
+ this.groupsByInvocation = undefined;
283
354
  this.callbackFailures.clear();
284
355
  this.activeResolverProbes.length = 0;
285
356
  uninstallPromiseAllObserver();
@@ -301,17 +372,41 @@ export class AuthoredFlowLifecycle {
301
372
 
302
373
  private aggregatesFor(operation: OperationToken): Set<number> {
303
374
  const aggregates = new Set(this.promiseAllAggregates.get(operation) ?? []);
375
+ const groups = this.aggregatesByInvocation();
304
376
  for (const invocation of this.invocations.get(operation) ?? []) {
305
- for (const group of this.promiseAllGroups) {
306
- if (
307
- group.members.size > 0
308
- && [...group.members].some((member) => this.graph.dependsOn(member, invocation.asyncId))
309
- ) {
377
+ for (const aggregate of groups.get(invocation.asyncId) ?? []) aggregates.add(aggregate);
378
+ }
379
+ return aggregates;
380
+ }
381
+
382
+ /**
383
+ * For each invocation, the aggregates of every combinator group with a
384
+ * member that depends on it. Asked per group member per invocation, this was
385
+ * the gate's quadratic hot path: each question re-walked the member's whole
386
+ * ancestry. It is now one batch pass, recomputed only when the graph or the
387
+ * registrations have changed since the last gate question.
388
+ */
389
+ private aggregatesByInvocation(): Map<number, ReadonlySet<number>> {
390
+ const key = `${this.graph.version}:${this.registrations}`;
391
+ if (this.groupsByInvocation?.key === key) return this.groupsByInvocation.groups;
392
+ const targets: number[] = [];
393
+ for (const operationInvocations of this.invocations.values()) {
394
+ for (const invocation of operationInvocations) targets.push(invocation.asyncId);
395
+ }
396
+ const members = [...new Set(this.promiseAllGroups.flatMap((group) => [...group.members]))];
397
+ const reached = this.graph.dependenciesAmong(members, targets);
398
+ const groups = new Map<number, Set<number>>();
399
+ for (const group of this.promiseAllGroups) {
400
+ for (const member of group.members) {
401
+ for (const target of reached.get(member) ?? []) {
402
+ let aggregates = groups.get(target);
403
+ if (aggregates === undefined) groups.set(target, aggregates = new Set());
310
404
  aggregates.add(group.aggregate);
311
405
  }
312
406
  }
313
407
  }
314
- return aggregates;
408
+ this.groupsByInvocation = { key, groups };
409
+ return groups;
315
410
  }
316
411
  }
317
412
 
@@ -5,6 +5,7 @@ import {
5
5
  AuthoredFlowLifecycle,
6
6
  type AuthoredOperationInvocation,
7
7
  } from './authored-flow-lifecycle.js';
8
+ import type { AuthoredStepEdges } from './authored-step-index.js';
8
9
 
9
10
  /** Slice-P kinds the surface `.gate(config)` accepts and the SDK lowers. */
10
11
  const NAMED_GATE_KINDS = new Set([
@@ -39,6 +40,11 @@ export class AuthoredFlowOperation<T> {
39
40
  * function itself is never serialized. `flows check` cannot prove it.
40
41
  */
41
42
  predicateGate: { predicate: (value: T) => boolean; because?: string } | undefined = undefined;
43
+ /**
44
+ * This step's label and causal predecessors in the run's DAG, captured when
45
+ * it was invoked. Undefined for an operation the step index does not draw.
46
+ */
47
+ readonly edges: AuthoredStepEdges | undefined;
42
48
  private state: OperationState = 'created';
43
49
  private thenInvoked = false;
44
50
  private rootFailureRecorded = false;
@@ -55,6 +61,7 @@ export class AuthoredFlowOperation<T> {
55
61
  private readonly assertCanStart: () => void,
56
62
  private readonly start: () => Promise<T>,
57
63
  private readonly scope: AuthoredFlowLifecycle,
64
+ node?: { readonly label?: string },
58
65
  ) {
59
66
  let resolve!: (value: T | PromiseLike<T>) => void;
60
67
  let reject!: (reason?: unknown) => void;
@@ -64,6 +71,9 @@ export class AuthoredFlowOperation<T> {
64
71
  });
65
72
  this.resolve = resolve;
66
73
  this.reject = reject;
74
+ this.edges = scope.registerOperation(
75
+ this, this.promise, node === undefined ? undefined : { step: id, ...node },
76
+ );
67
77
 
68
78
  observeRejection(this.promise, (error) => this.recordRootFailure(error));
69
79
  const operation = this;
@@ -6,6 +6,7 @@ import { executeAuthoredFlow } from './authored-flow-executor.js';
6
6
  import { loadPinnedAuthoredSource } from './authored-source-authority.js';
7
7
  import { assertAuthoredNodeVersion, parseAuthoredParentPid } from './authored-runtime-capability.js';
8
8
  import { AuthoredFlowExecutionError, AuthoredHumanParked } from './authored-flow-error.js';
9
+ import { isAgentCapacity } from './worker-slots.js';
9
10
  import type { AuthoredRootMetadata } from './authored-root.js';
10
11
 
11
12
  let channelKey: string | undefined, sequence = 0;
@@ -48,7 +49,7 @@ try {
48
49
  send({ type: 'ready', runtime: { kind: 'node', version: process.versions.node,
49
50
  executableSha256: hash(process.execPath), payloadSha256: hash(process.argv[1]!) } });
50
51
  const request = await new Promise<{ channelKey: string; metadata: AuthoredRootMetadata; socketPath: string;
51
- rootRunId: string; dataDir: string; localAgentStream?: string }>((resolve, reject) => {
52
+ rootRunId: string; dataDir: string; localAgentStream?: string; workerCapacity?: number }>((resolve, reject) => {
52
53
  let buffer = '';
53
54
  process.stdin.setEncoding('utf8');
54
55
  const onData = (chunk: string): void => {
@@ -66,6 +67,7 @@ try {
66
67
  controller.signal.throwIfAborted();
67
68
  const loaded = await loadPinnedAuthoredSource(request.metadata, true);
68
69
  if (request.localAgentStream !== request.metadata.localAgentStream) throw new Error('authored root local agent surface mismatch');
70
+ if (request.workerCapacity !== undefined && !isAgentCapacity(request.workerCapacity)) throw new Error('invalid authored worker capacity');
69
71
  client = new JournalClient(request.socketPath);
70
72
  await client.connect(); await client.hello('flows-authored-node');
71
73
  const result = await executeAuthoredFlow(loaded.handle, client,
@@ -74,6 +76,7 @@ try {
74
76
  flowPath: request.metadata.flowPath, rootRunId: request.rootRunId,
75
77
  extensions: loaded.extensions,
76
78
  localAgentStream: request.localAgentStream, signal: controller.signal,
79
+ ...(request.workerCapacity === undefined ? {} : { workerCapacity: request.workerCapacity }),
77
80
  onProgress: event => send({ type: 'progress', event }),
78
81
  onWait: event => send({ type: 'wait', event }),
79
82
  });