pi-amq 0.1.2 → 0.1.3

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 (29) hide show
  1. package/dist/workflow/run-store.d.ts +3 -2
  2. package/dist/workflow/run-store.d.ts.map +1 -1
  3. package/dist/workflow/run-store.js +4 -4
  4. package/dist/workflow/run-store.js.map +1 -1
  5. package/dist/workflow/worker-child-extension.d.ts.map +1 -1
  6. package/dist/workflow/worker-child-extension.js +104 -32
  7. package/dist/workflow/worker-child-extension.js.map +1 -1
  8. package/dist/workflow/worker-launch.d.ts +7 -4
  9. package/dist/workflow/worker-launch.d.ts.map +1 -1
  10. package/dist/workflow/worker-launch.js +38 -5
  11. package/dist/workflow/worker-launch.js.map +1 -1
  12. package/dist/workflow/worker-process-supervisor.d.ts +1 -0
  13. package/dist/workflow/worker-process-supervisor.d.ts.map +1 -1
  14. package/dist/workflow/worker-process-supervisor.js +131 -77
  15. package/dist/workflow/worker-process-supervisor.js.map +1 -1
  16. package/dist/workflow/workflow-types.d.ts +11 -3
  17. package/dist/workflow/workflow-types.d.ts.map +1 -1
  18. package/dist/workflow/workflow-types.js.map +1 -1
  19. package/docs/conformance.md +3 -3
  20. package/docs/contracts/deferred-findings.md +49 -0
  21. package/docs/contracts/worker-runtime.md +1 -1
  22. package/docs/design.md +2 -2
  23. package/package.json +1 -1
  24. package/workflow/run-store.ts +9 -7
  25. package/workflow/worker-child-extension.ts +116 -34
  26. package/workflow/worker-launch.ts +51 -12
  27. package/workflow/worker-process-supervisor.ts +160 -75
  28. package/workflow/workflow-types.ts +13 -3
  29. package/docs//346/250/241/345/236/213/345/274/272/345/272/246/344/270/216Harness/345/244/215/346/235/202/345/272/246.md +0 -1011
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-types.d.ts","sourceRoot":"","sources":["../../workflow/workflow-types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK,GAAG,OAAO,MAAM,EAAE,CAAC;AACpC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QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-types.js","sourceRoot":"","sources":["../../workflow/workflow-types.ts"],"names":[],"mappings":"AAmVA,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,MAAM;IACN,WAAW;IACX,MAAM;IACN,SAAS;IACT,kBAAkB;IAClB,WAAW;IACX,WAAW;IACX,iBAAiB;CACT,CAAC"}
1
+ {"version":3,"file":"workflow-types.js","sourceRoot":"","sources":["../../workflow/workflow-types.ts"],"names":[],"mappings":"AA6VA,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,MAAM;IACN,WAAW;IACX,MAAM;IACN,SAAS;IACT,kBAAkB;IAClB,WAAW;IACX,WAAW;IACX,iBAAiB;CACT,CAAC"}
@@ -55,12 +55,12 @@ explicitly.
55
55
  | 28 | Spawn contract validation | `test/workflow-run-store.test.ts` — `[appendix 28,41]` invalid-contract no-mutation<br>`test/worker-process-supervisor.test.ts` — `[appendix 28]` required-field matrix and `[appendix 28,34]` grant/depth/concurrency preflight | partially | Goal, acceptance, constraints, budget, model, capability, and workspace omissions all refuse before ledger, worker-session lease, or process effects. Capability, budget, and unresolved trust also fail closed. Missing: an explicit mutation-grant authority and exceedance oracle. |
56
56
  | 29 | Idempotent `spawn_worker` | `test/worker-process-supervisor.test.ts` — `[appendix 28,34]` repeated request returns the existing worker | partially | Same-key replay and conflict fencing exist. Missing: a literal driver crash between tool return and caller observation. |
57
57
  | 30 | One worker session, one owner | `test/workflow-lease.test.ts` — three `[appendix 30]` exclusivity/takeover/fail-closed tests<br>`test/worker-process-supervisor.test.ts` — run-scoped sessions, authoritative child exit, and PID-disappearance negative control | implemented | Canonical session leases are generation-fenced. Lease-owner staleness and worker lifecycle exit remain separate; PID disappearance never synthesizes worker exit or replacement. |
58
- | 31 | Parent death and stale output | `test/node-pi-process-factory.test.ts` — `[appendix 31]` parent-liveness and process-group tests<br>`test/worker-process-supervisor.test.ts` — `[appendix 30,31,40]` detached no-replay recovery, `[appendix 31,32,34]` uncertain-effect ambiguity, and `[appendix 31]` live stale-output fencing | implemented | Parent loss leaves a known-live worker running with detached control and run needs-attention; uncertain effects enter ambiguity. After supervisor takeover, a live mutating old-generation worker cannot commit result, usage, candidate, or exit facts. |
58
+ | 31 | Parent death and stale output | `test/node-pi-process-factory.test.ts` — `[appendix 31]` parent-liveness and process-group tests<br>`test/worker-process-supervisor.test.ts` — `[appendix 30,31,40]` detached no-replay recovery, `[appendix 31,32,34]` uncertain-effect ambiguity, `[appendix 31]` live stale-output fencing, and JSON settled liveness release | implemented | Parent loss leaves a known-live worker running with detached control and run needs-attention; uncertain effects enter ambiguity. After supervisor takeover, a live mutating old-generation worker cannot commit result, usage, candidate, or exit facts. A settled JSON one-shot releases its liveness pipe only after the correlated settled envelope. |
59
59
  | 32 | Broken RPC pipe after uncertain work | `test/worker-process-supervisor.test.ts` — `[appendix 31,32,34]` uncertain external exit becomes ambiguous<br>`test/workflow-run-store.test.ts` — `[appendix 32]` durable reconciliation | implemented | Uncertain effects become ambiguous, never replay, and require explicit reconciliation. |
60
- | 33 | JSON/RPC contract boundary | `test/worker-launch-contract.test.ts` and `test/worker-process-supervisor.test.ts` — `[appendix 24,33,36]`, `[appendix 33]` | partially | JSON one-shot and RPC control/contract differences are enforced. Driver-inbox forwarding is not part of W3. |
60
+ | 33 | JSON/RPC contract boundary | `test/worker-launch-contract.test.ts` and `test/worker-process-supervisor.test.ts` — `[appendix 24,33,36]`, `[appendix 33]`, EOF-before-ready, and exit-after-drain<br>`test/stock-worker-protocol-integration.test.ts` — real Pi JSON/RPC fd-4 and descriptor-mismatch cases | partially | JSON closes stdin before ready while RPC retains stdin for control. Both use a dedicated worker-control descriptor; Pi stdout and diagnostic stderr cannot impersonate launch parity. Driver-inbox forwarding is not part of W3. |
61
61
  | 34 | Hard budget enforcement | `test/worker-process-supervisor.test.ts` — `[appendix 28,34]`, `[appendix 31,32,34]`, and five `[appendix 34]` cases | implemented | Every run ceiling has direct evidence: max-workers, concurrency, depth, total attempts, token, wall-clock, cost, and output bytes. Preflight exhaustion refuses before process creation or ledger mutation; observed runtime exhaustion persists the trigger usage and cancellation intent before signaling. |
62
62
  | 35 | Mutation isolation | — | deferred-with-reason | Requires worker mutation/worktree leases and concurrent mutating worker execution. |
63
- | 36 | Child launch parity and trust | `test/worker-launch-contract.test.ts` — `[appendix 24,33,36]` and `[appendix 28,33,36]` | implemented | Model, thinking level, cwd, tools, capability, channel, and trust mismatches fail before useful child work. |
63
+ | 36 | Child launch parity and trust | `test/worker-launch-contract.test.ts` — `[appendix 24,33,36]`, `[appendix 28,33,36]`, schema-1 historical compatibility, and schema-2 fd parity<br>`test/stock-worker-protocol-integration.test.ts` — real Pi descriptor mismatch fails closed | implemented | Model, thinking level, cwd, tools, capability, channel, trust, and liveness/control descriptor mismatches fail before useful child work. |
64
64
  | 37 | Dormant transport independence | `test/workflow-run-store.test.ts` — `[appendix 37,47,48] zero-AMQ run demonstrates three governed workers and live FleetView`<br>`test/extension-registration.test.ts` and `test/worker-tools.test.ts` | implemented | One interactive non-AMQ run exercises three distinct model/difficulty/channel contracts, steer, cancellation, collection, Gate completion, budget projection, and Fleet navigation while proving no `.agent-mail` path is created. Worker tools register independently of transport activation. |
65
65
  | 38 | Cross-domain correlation without merged state | `test/workflow-domain-isolation.test.ts` — `[appendix 38]` | implemented | AMQ correlation cannot cross-replay or mutate the workflow persistence owner. |
66
66
  | 39 | Ledger projection correctness | `test/workflow-run-store.test.ts` — `[appendix 26,39,40]` and `[appendix 39,45]` | implemented | Snapshot corruption is ignored in favor of the contiguous event chain; gaps and checksum changes fail closed. |
@@ -74,3 +74,52 @@ path that lies **outside** every seam listed above.
74
74
 
75
75
  A bug found *inside* one of those seams is an ordinary bug fix in that seam. It is not evidence
76
76
  that a new active-frame owner is needed, and it does not reopen this row.
77
+
78
+ ---
79
+
80
+ ## DF-3 — Spawn identity is sampled during the child's `exec` transition
81
+
82
+ **Status:** deferred.
83
+
84
+ **Observation.** `workflow/worker-process-supervisor.ts` proves child identity with a single
85
+ `inspect(child.pid)` immediately after `waitForSpawn` resolves. When the launcher is a wrapper
86
+ script — which is the normal shape for a PATH- or Homebrew-installed `pi`, and the reason
87
+ [§A.5.1](../design.md#a51-namespace-and-authority) supports PATH launch at all — `waitForSpawn`
88
+ resolves while `/bin/sh` still owns the image, before `exec` replaces it. Darwin `ps -o comm=`
89
+ therefore reports a value that changes underneath the sample:
90
+
91
+ ```text
92
+ t=0ms "/bin/sh"
93
+ t=50ms "/opt/homebrew/Cellar/node/<version>/bin/node"
94
+ ```
95
+
96
+ Reproduced 150 spawns of a `#!/bin/sh` + `exec node` wrapper under process churn:
97
+
98
+ ```text
99
+ {"live":148,"unknown":2}
100
+ recorded executables: [ ".../bin/node", "/bin/sh" ]
101
+ diag: Darwin process executable is unavailable
102
+ ```
103
+
104
+ Two consequences follow from the one cause:
105
+
106
+ - `selectDarwinExecutable` has no fallback for a child PID — only `pid === process.pid` falls back
107
+ to `process.execPath` — so a transient non-absolute `comm` yields `unknown` and the attempt
108
+ fails with "Spawned worker identity could not be proven" (~1.3% under load);
109
+ - the same launcher records either `/bin/sh` or the node path, so a later comparison in
110
+ `workflow/workflow-lease.ts` reaches "PID executable changed" and judges a live worker stale.
111
+
112
+ The visible symptom today is that `test/worker-runtime-reload.test.ts` — "worker runtime core
113
+ survives extension replacement without duplicate UI subscribers" — fails intermittently in the
114
+ full suite and passes in isolation.
115
+
116
+ **Why it is deferred.** The narrow fix (resample until two reads agree) and the deeper fix (drop
117
+ `executable` from the identity predicate, leaving pid plus `processStartIdentity` plus
118
+ `bootIdentity`) trade against each other, and the deeper one weakens Darwin PID-reuse defence
119
+ because `lstart` has one-second resolution. It also rewrites a persisted lease field, which is an
120
+ expensive-to-reverse seam requiring the [§17](../design.md#17-versioning-and-compatibility)
121
+ migration path. Neither belongs inside a worker-control-channel change.
122
+
123
+ **Reopen only on:** any work that touches spawn-time identity capture or the lease staleness
124
+ predicate, or a reproduced production spawn failure or false-stale judgement outside the test
125
+ suite. An intermittent red on the reload test alone is this row, not a new finding.
@@ -34,7 +34,7 @@ implementation drifted from the section.
34
34
  | Lifecycle and recovery rules | [§A.5.3](../design.md#a53-lifecycle-and-recovery-rules) | `evaluateRunTransition`, `evaluateWorkerAttemptTransition` | `workflow/run-gate.ts`, `workflow/worker-gate.ts` | `test/run-gate.test.ts`, `test/worker-gate.test.ts` |
35
35
  | Completion notices | [§A.5.3](../design.md#a53-lifecycle-and-recovery-rules) | `WorkerCompletionNotifier` | `integration/worker-completion-notifier.ts` | `test/worker-completion-notifier.test.ts` |
36
36
  | Implemented W2 process-supervision boundary | [§A.5.4](../design.md#a54-implemented-w2-process-supervision-boundary) | `WorkerProcessSupervisor`, `NodePiProcessFactory` | `workflow/worker-process-supervisor.ts` | `test/worker-process-supervisor.test.ts`, `test/node-pi-process-factory.test.ts` |
37
- | Exact send-only child launch contract | [§A.5.4](../design.md#a54-implemented-w2-process-supervision-boundary) | `parseWorkerLaunchContractV1`, `resolveWorkerLaunch`, `validateWorkerChildContext` | `workflow/worker-launch.ts`, `workflow/worker-child-extension.ts` | `test/worker-launch-contract.test.ts` |
37
+ | Exact send-only child launch contract | [§A.5.4](../design.md#a54-implemented-w2-process-supervision-boundary) | `parseWorkerLaunchContract`, `parseWorkerLaunchContractV2`, `resolveWorkerLaunch`, `validateWorkerChildContext` | `workflow/worker-launch.ts`, `workflow/worker-child-extension.ts` | `test/worker-launch-contract.test.ts`, `test/stock-worker-protocol-integration.test.ts` — schema-1 historical read compatibility plus real Pi JSON/RPC fd-4 and fail-closed descriptor evidence |
38
38
  | Worker session fork source | [§A.5.4](../design.md#a54-implemented-w2-process-supervision-boundary) | `describeCurrentPiSessionFork`, `NodePiSessionForker` | `workflow/pi-session-fork.ts` | `test/pi-session-fork.test.ts` |
39
39
  | Supervisor process identity | [§A.5.4](../design.md#a54-implemented-w2-process-supervision-boundary) | `SystemProcessIdentityInspector` — the only owner outside the receiver lease's own inspector | `workflow/system-process-inspector.ts` | `test/system-process-inspector.test.ts` — see [deferred findings](deferred-findings.md) |
40
40
 
package/docs/design.md CHANGED
@@ -1224,9 +1224,9 @@ The extra model turn on resume is intentional: the ledger supplies truth, while
1224
1224
 
1225
1225
  W2 implemented the internal process-governance layer without registering model-visible worker tools. W3 now exposes the six atomic tools through the extension composition root while retaining this W2 process boundary.
1226
1226
 
1227
- Every attempt persists a schema-1 launch contract containing the run/worker/attempt identities and both generations, `transportMode:"send-only"`, exact channel, depth, model/thinking level, capabilities, projected pi tools, cwd/worktree, project-trust decision, worker budget, side-effect policy, parent-liveness FD, and a deterministic per-worker session directory. The supervisor removes inherited `AM_*`, `ORCH_*`, parent `PI_SESSION_*`, and stale `PI_AMQ_*` values, then injects only the new launch-contract path and liveness descriptor. The child extension validates mode, model, thinking, cwd, trust, tools, and receiver-authority absence before provider work; mismatch requests shutdown and emits a generation-correlated refusal.
1227
+ Every new attempt persists a schema-2 launch contract containing the run/worker/attempt identities and both generations, `transportMode:"send-only"`, exact channel, depth, model/thinking level, capabilities, projected pi tools, cwd/worktree, project-trust decision, worker budget, side-effect policy, parent-liveness FD, worker-control FD, and a deterministic per-worker session directory. Historical schema-1 launch contracts remain readable ledger evidence but are never used to launch a new child. The supervisor removes inherited `AM_*`, `ORCH_*`, parent `PI_SESSION_*`, and stale `PI_AMQ_*` values, then injects only the new launch-contract path plus generation-bound liveness and worker-control descriptors. The child extension validates the descriptor environment, mode, model, thinking, cwd, trust, tools, and receiver-authority absence before provider work; mismatch requests shutdown and, when the authenticated control descriptor is usable, emits a generation-correlated refusal.
1228
1228
 
1229
- JSON is selected only for bounded one-shot work with no live steer or driver-inbox forwarding capability. Its prompt is fixed at process creation and stdin closes after the generation-correlated ready handshake. RPC is selected for multi-turn or live-control work: it starts without a prompt, validates the ready generation, then accepts JSONL prompt/abort control. The streaming decoder tolerates a UTF-8 sequence split across chunks and parses one final unterminated line at EOF. Each stdout protocol line is capped at 4 MiB; overflow records a structured `protocol_output_limit` error and cancels the attempt. Only the final 128 KiB of stderr is retained for a failed-exit diagnostic. Contract revisions queued during inference are released by a generation-correlated `agent_settled` event, not by `message_end`, because retries and follow-up turns may still be active at message completion. A broken RPC pipe is never reconnectable state.
1229
+ JSON is selected only for bounded one-shot work with no live steer or driver-inbox forwarding capability. Its prompt is fixed at process creation. After process identity, lease activation, durable start evidence, and stream monitoring are established, the supervisor closes JSON stdin before awaiting the generation-correlated ready handshake. RPC is selected for multi-turn or live-control work: it keeps stdin open, starts without a prompt, validates the ready generation, then accepts JSONL prompt/abort control. Both modes emit `pi_amq_worker_*` control envelopes only through inherited FD 4; stdout remains Pi's JSON/RPC event stream and stderr remains diagnostic output. The streaming decoders tolerate a UTF-8 sequence split across chunks and parse one final unterminated line at EOF. Each stdout or worker-control JSONL line is capped at 4 MiB; overflow records a structured `protocol_output_limit` error and cancels the attempt. A raw child exit cannot defeat a ready envelope already buffered in the control pipe: missing-ready failure is established only after process exit and worker-control drain. Once a JSON worker emits generation-correlated `worker_settled`, the supervisor closes its parent-liveness pipe so the one-shot Pi process can exit; RPC retains that pipe until ordinary cancellation or process teardown. Only the final 128 KiB of stderr is retained for a failed-exit diagnostic. Contract revisions queued during inference are released by a generation-correlated `agent_settled` event, not by `message_end`, because retries and follow-up turns may still be active at message completion. A broken RPC pipe is never reconnectable state. `(debate: stock Pi 0.80.10, 0.84.1, and 0.84.2 await readPipedStdin before runPrintMode/session.bindExtensions, making JSON ready-before-EOF impossible; Pi 0.84.2 redirects extension process.stdout to stderr in both JSON and RPC, requiring a dedicated worker-control descriptor; process exit is adjudicated only after that descriptor drains so a buffered ready remains authoritative.)`
1230
1230
 
1231
1231
  The deterministic session path leased before spawn is the worker's exclusive pi session directory. Pi allocates its JSONL filename inside that directory; the child-ready event records the actual generated session file in the ledger. Reservation ownership initially carries the current supervisor's full process evidence and is atomically promoted, under the same lease generation, to the spawned child's PID/start/boot/executable/host evidence. This closes the create-process-before-session-lease race while making one worker's full session namespace exclusive.
1232
1232
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-amq",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "A daemonless AMQ bridge and governed worker runtime for pi",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -47,10 +47,11 @@ import type {
47
47
  WorkerProposalProvenance,
48
48
  WorkerRequest,
49
49
  WorkerRoleContract,
50
- WorkerLaunchContractV1,
50
+ WorkerLaunchContract,
51
+ WorkerLaunchContractV2,
51
52
  WorkspaceGrant,
52
53
  } from "./workflow-types.js";
53
- import { parseWorkerLaunchContractV1 } from "./worker-launch.js";
54
+ import { parseWorkerLaunchContract, parseWorkerLaunchContractV2 } from "./worker-launch.js";
54
55
  import {
55
56
  UNLIMITED,
56
57
  budgetExceeded,
@@ -472,7 +473,8 @@ export class WorkflowRunStore {
472
473
  readonly workerAttemptGeneration: string;
473
474
  readonly leaseGeneration: string;
474
475
  readonly processIdentity: ProcessIdentity;
475
- readonly launchContract: WorkerLaunchContractV1;
476
+ /** Write side is schema 2 only; schema 1 stays readable history and never launches a child. */
477
+ readonly launchContract: WorkerLaunchContractV2;
476
478
  }): Promise<RunProjectionV2> {
477
479
  const requestKey = validateRequestKey(inputRequestKey);
478
480
  return this.#withRunMutation(requestKey, async (current, events) => {
@@ -496,7 +498,7 @@ export class WorkflowRunStore {
496
498
  workerAttemptGeneration: input.workerAttemptGeneration,
497
499
  leaseGeneration: requireNonEmpty(input.leaseGeneration, "lease generation"),
498
500
  processIdentity: parseProcessIdentity(input.processIdentity),
499
- launchContract: parseWorkerLaunchContractV1(input.launchContract),
501
+ launchContract: parseWorkerLaunchContractV2(input.launchContract),
500
502
  }),
501
503
  };
502
504
  });
@@ -2186,7 +2188,7 @@ function parseAttemptStartPayload(value: unknown): {
2186
2188
  readonly workerAttemptGeneration: string;
2187
2189
  readonly leaseGeneration: string;
2188
2190
  readonly processIdentity: ProcessIdentity;
2189
- readonly launchContract: WorkerLaunchContractV1;
2191
+ readonly launchContract: WorkerLaunchContract;
2190
2192
  } {
2191
2193
  const object = strictRecord(
2192
2194
  value,
@@ -2199,7 +2201,7 @@ function parseAttemptStartPayload(value: unknown): {
2199
2201
  workerAttemptGeneration: nonEmptyString(object, "workerAttemptGeneration"),
2200
2202
  leaseGeneration: nonEmptyString(object, "leaseGeneration"),
2201
2203
  processIdentity: parseProcessIdentity(object["processIdentity"]),
2202
- launchContract: parseWorkerLaunchContractV1(object["launchContract"]),
2204
+ launchContract: parseWorkerLaunchContract(object["launchContract"]),
2203
2205
  };
2204
2206
  }
2205
2207
 
@@ -2590,7 +2592,7 @@ function parseWorkerAttempt(value: unknown): WorkerAttemptProjection {
2590
2592
  },
2591
2593
  launchContract: object["launchContract"] === null
2592
2594
  ? null
2593
- : parseWorkerLaunchContractV1(object["launchContract"]),
2595
+ : parseWorkerLaunchContract(object["launchContract"]),
2594
2596
  ...(modelSelection ? {
2595
2597
  modelSelection: {
2596
2598
  model: parseModelSpec(modelSelection["model"]),
@@ -1,25 +1,39 @@
1
- import { createReadStream, readFileSync } from "node:fs";
1
+ import { createReadStream, readFileSync, writeSync } from "node:fs";
2
2
 
3
3
  import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
4
4
  import { Type } from "typebox";
5
5
 
6
6
  import {
7
- parseWorkerLaunchContractV1,
7
+ parseWorkerLaunchContractV2,
8
8
  validateWorkerChildContext,
9
9
  type WorkerChildContext,
10
10
  } from "./worker-launch.js";
11
11
  import { classifyProviderFallbackFailure } from "./model-fallback.js";
12
- import type { WorkerLaunchContractV1 } from "./workflow-types.js";
12
+ import type { WorkerLaunchContractV2 } from "./workflow-types.js";
13
+
14
+ type ProtocolWriter = (value: unknown) => void;
13
15
 
14
16
  export default function workerChildExtension(pi: ExtensionAPI): void {
15
17
  const loaded = loadLaunchContract();
16
18
  if (!loaded.ok) {
17
- pi.on("session_start", (_event, ctx) => refuse(loaded.error, ctx));
18
- pi.on("before_agent_start", (_event, ctx) => refuse(loaded.error, ctx));
19
+ pi.on("session_start", (_event, ctx) => refuseWithoutProtocol(loaded.error, ctx));
20
+ pi.on("before_agent_start", (_event, ctx) => refuseWithoutProtocol(loaded.error, ctx));
19
21
  return;
20
22
  }
21
23
  const contract = loaded.contract;
24
+ let writeProtocol: ProtocolWriter;
25
+ try {
26
+ writeProtocol = createProtocolWriter(contract);
27
+ } catch (error) {
28
+ pi.on("session_start", (_event, ctx) => refuseWithoutProtocol(error, ctx));
29
+ pi.on("before_agent_start", (_event, ctx) => refuseWithoutProtocol(error, ctx));
30
+ return;
31
+ }
22
32
  let ready = false;
33
+ // The inherited liveness descriptor is single-use for this process: releasing it closes fd 3,
34
+ // so a later re-attach could never succeed. Track the state explicitly instead of detaching
35
+ // and reopening, which would surface as a silent shutdown rather than a visible refusal.
36
+ const liveness = createParentLivenessGuard(contract);
23
37
 
24
38
  pi.registerTool({
25
39
  name: "message_worker",
@@ -31,7 +45,7 @@ export default function workerChildExtension(pi: ExtensionAPI): void {
31
45
  correlation: Type.String({ minLength: 1, maxLength: 256 }),
32
46
  }),
33
47
  async execute(_id, params) {
34
- writeProtocolLine({
48
+ writeProtocol({
35
49
  type: "pi_amq_worker_peer_message",
36
50
  runId: contract.runId,
37
51
  workerId: contract.workerId,
@@ -56,7 +70,7 @@ export default function workerChildExtension(pi: ExtensionAPI): void {
56
70
  correlation: Type.String({ minLength: 1, maxLength: 256 }),
57
71
  }),
58
72
  async execute(_id, params) {
59
- writeProtocolLine({
73
+ writeProtocol({
60
74
  type: "pi_amq_worker_wait",
61
75
  runId: contract.runId,
62
76
  workerId: contract.workerId,
@@ -78,10 +92,10 @@ export default function workerChildExtension(pi: ExtensionAPI): void {
78
92
  pi.on("session_start", (_event, ctx) => {
79
93
  try {
80
94
  validateWorkerChildContext(contract, childContext(ctx));
81
- attachParentLiveness(contract, ctx);
95
+ liveness.attach(ctx);
82
96
  const sessionFile = ctx.sessionManager.getSessionFile();
83
97
  if (!sessionFile) throw new Error("Pi worker session file is unavailable");
84
- writeProtocolLine({
98
+ writeProtocol({
85
99
  type: "pi_amq_worker_ready",
86
100
  runId: contract.runId,
87
101
  workerId: contract.workerId,
@@ -92,7 +106,7 @@ export default function workerChildExtension(pi: ExtensionAPI): void {
92
106
  });
93
107
  ready = true;
94
108
  } catch (error) {
95
- refuse(error, ctx);
109
+ refuse(error, ctx, writeProtocol);
96
110
  }
97
111
  });
98
112
 
@@ -101,15 +115,16 @@ export default function workerChildExtension(pi: ExtensionAPI): void {
101
115
  if (!ready) throw new Error("Worker launch parity was not established");
102
116
  validateWorkerChildContext(contract, childContext(ctx, event.systemPromptOptions.selectedTools));
103
117
  } catch (error) {
104
- refuse(error, ctx);
118
+ refuse(error, ctx, writeProtocol);
105
119
  }
106
120
  });
107
121
 
108
- pi.on("model_select", (_event, ctx) => revalidateOrRefuse(contract, ctx));
109
- pi.on("thinking_level_select", (_event, ctx) => revalidateOrRefuse(contract, ctx));
122
+ pi.on("model_select", (_event, ctx) => revalidateOrRefuse(contract, ctx, writeProtocol));
123
+ pi.on("thinking_level_select", (_event, ctx) => revalidateOrRefuse(contract, ctx, writeProtocol));
124
+ pi.on("session_shutdown", () => liveness.release());
110
125
  pi.on("agent_settled", () => {
111
126
  if (!ready) return;
112
- writeProtocolLine({
127
+ writeProtocol({
113
128
  type: "pi_amq_worker_settled",
114
129
  runId: contract.runId,
115
130
  workerId: contract.workerId,
@@ -123,7 +138,7 @@ export default function workerChildExtension(pi: ExtensionAPI): void {
123
138
  if (message.role !== "assistant") return;
124
139
  const reason = classifyProviderFallbackFailure(message.stopReason, message.errorMessage);
125
140
  if (!reason) return;
126
- writeProtocolLine({
141
+ writeProtocol({
127
142
  type: "pi_amq_worker_provider_failure",
128
143
  runId: contract.runId,
129
144
  workerId: contract.workerId,
@@ -137,13 +152,13 @@ export default function workerChildExtension(pi: ExtensionAPI): void {
137
152
  }
138
153
 
139
154
  function loadLaunchContract():
140
- | { readonly ok: true; readonly contract: WorkerLaunchContractV1 }
155
+ | { readonly ok: true; readonly contract: WorkerLaunchContractV2 }
141
156
  | { readonly ok: false; readonly error: Error } {
142
157
  try {
143
158
  const path = process.env["PI_AMQ_WORKER_LAUNCH_CONTRACT"];
144
159
  if (!path) throw new Error("PI_AMQ_WORKER_LAUNCH_CONTRACT is required");
145
160
  const value = JSON.parse(readFileSync(path, "utf8")) as unknown;
146
- return { ok: true, contract: parseWorkerLaunchContractV1(value) };
161
+ return { ok: true, contract: parseWorkerLaunchContractV2(value) };
147
162
  } catch (error) {
148
163
  return { ok: false, error: error instanceof Error ? error : new Error(String(error)) };
149
164
  }
@@ -161,33 +176,100 @@ function childContext(ctx: ExtensionContext, tools?: readonly string[]): WorkerC
161
176
  };
162
177
  }
163
178
 
164
- function revalidateOrRefuse(contract: WorkerLaunchContractV1, ctx: ExtensionContext): void {
179
+ function revalidateOrRefuse(
180
+ contract: WorkerLaunchContractV2,
181
+ ctx: ExtensionContext,
182
+ writeProtocol: ProtocolWriter,
183
+ ): void {
165
184
  try {
166
185
  validateWorkerChildContext(contract, childContext(ctx));
167
186
  } catch (error) {
168
- refuse(error, ctx);
187
+ refuse(error, ctx, writeProtocol);
169
188
  }
170
189
  }
171
190
 
172
- function attachParentLiveness(contract: WorkerLaunchContractV1, ctx: ExtensionContext): void {
173
- const configured = Number(process.env["PI_AMQ_PARENT_LIVENESS_FD"]);
174
- if (configured !== contract.parentLivenessFd) {
175
- throw new Error("Parent-liveness descriptor does not match the launch contract");
191
+ interface ParentLivenessGuard {
192
+ /** Idempotent: a repeated session_start keeps the existing stream instead of reopening fd 3. */
193
+ attach(ctx: ExtensionContext): void;
194
+ /** Closes the descriptor so a settled one-shot child can exit. The guard stays released. */
195
+ release(): void;
196
+ }
197
+
198
+ function createParentLivenessGuard(contract: WorkerLaunchContractV2): ParentLivenessGuard {
199
+ let state: "unattached" | "attached" | "released" = "unattached";
200
+ let detach = (): void => {};
201
+ return {
202
+ attach(ctx) {
203
+ if (state === "attached") return;
204
+ if (state === "released") {
205
+ throw new Error("Parent-liveness descriptor was already released and cannot be reattached");
206
+ }
207
+ const configured = Number(process.env["PI_AMQ_PARENT_LIVENESS_FD"]);
208
+ if (configured !== contract.parentLivenessFd) {
209
+ throw new Error("Parent-liveness descriptor does not match the launch contract");
210
+ }
211
+ const stream = createReadStream("", { fd: configured, autoClose: true });
212
+ const requestShutdown = (): void => {
213
+ try {
214
+ ctx.shutdown();
215
+ } catch (error) {
216
+ console.error(`pi-amq parent-liveness shutdown failed: ${errorMessage(error)}`);
217
+ }
218
+ };
219
+ stream.on("end", requestShutdown);
220
+ stream.on("error", requestShutdown);
221
+ stream.resume();
222
+ detach = () => {
223
+ stream.off("end", requestShutdown);
224
+ stream.off("error", requestShutdown);
225
+ stream.destroy();
226
+ };
227
+ state = "attached";
228
+ },
229
+ release() {
230
+ if (state !== "attached") return;
231
+ detach();
232
+ detach = (): void => {};
233
+ state = "released";
234
+ },
235
+ };
236
+ }
237
+
238
+ function refuse(error: unknown, ctx: ExtensionContext, writeProtocol: ProtocolWriter): void {
239
+ try {
240
+ writeProtocol({
241
+ type: "pi_amq_worker_refused",
242
+ error: error instanceof Error ? error.message : String(error),
243
+ });
244
+ } catch (protocolError) {
245
+ console.error(`pi-amq worker protocol refusal failed: ${errorMessage(protocolError)}`);
176
246
  }
177
- const stream = createReadStream("", { fd: configured, autoClose: false });
178
- stream.on("end", () => ctx.shutdown());
179
- stream.on("error", () => ctx.shutdown());
180
- stream.resume();
247
+ ctx.shutdown();
181
248
  }
182
249
 
183
- function refuse(error: unknown, ctx: ExtensionContext): void {
184
- writeProtocolLine({
185
- type: "pi_amq_worker_refused",
186
- error: error instanceof Error ? error.message : String(error),
187
- });
250
+ function refuseWithoutProtocol(error: unknown, ctx: ExtensionContext): void {
251
+ console.error(`pi-amq worker launch refused: ${errorMessage(error)}`);
188
252
  ctx.shutdown();
189
253
  }
190
254
 
191
- function writeProtocolLine(value: unknown): void {
192
- process.stdout.write(`${JSON.stringify(value)}\n`);
255
+ function createProtocolWriter(contract: WorkerLaunchContractV2): ProtocolWriter {
256
+ const configured = Number(process.env["PI_AMQ_PROTOCOL_FD"]);
257
+ if (configured !== contract.protocolFd) {
258
+ throw new Error("Worker protocol descriptor does not match the launch contract");
259
+ }
260
+ return (value) => writeProtocolLine(contract.protocolFd, value);
261
+ }
262
+
263
+ function writeProtocolLine(fd: number, value: unknown): void {
264
+ const line = Buffer.from(`${JSON.stringify(value)}\n`, "utf8");
265
+ let offset = 0;
266
+ while (offset < line.byteLength) {
267
+ const written = writeSync(fd, line, offset, line.byteLength - offset);
268
+ if (written <= 0) throw new Error("Worker protocol descriptor accepted no bytes");
269
+ offset += written;
270
+ }
271
+ }
272
+
273
+ function errorMessage(error: unknown): string {
274
+ return error instanceof Error ? error.message : String(error);
193
275
  }
@@ -4,7 +4,9 @@ import type {
4
4
  AttemptId,
5
5
  ModelSpec,
6
6
  WorkerContract,
7
+ WorkerLaunchContract,
7
8
  WorkerLaunchContractV1,
9
+ WorkerLaunchContractV2,
8
10
  } from "./workflow-types.js";
9
11
  import { parseBudgetLimit } from "./budget.js";
10
12
 
@@ -44,12 +46,13 @@ export interface PiProcessLaunchCommand {
44
46
  readonly cwd: string;
45
47
  readonly env: Readonly<Record<string, string>>;
46
48
  readonly parentLivenessFd: 3;
47
- readonly launchContract: WorkerLaunchContractV1;
49
+ readonly protocolFd: 4;
50
+ readonly launchContract: WorkerLaunchContractV2;
48
51
  readonly launchContractPath: string;
49
52
  }
50
53
 
51
54
  export interface ResolvedWorkerLaunch {
52
- readonly contract: WorkerLaunchContractV1;
55
+ readonly contract: WorkerLaunchContractV2;
53
56
  readonly command: PiProcessLaunchCommand;
54
57
  }
55
58
 
@@ -71,19 +74,50 @@ export class WorkerLaunchValidationError extends Error {
71
74
  }
72
75
 
73
76
  export function parseWorkerLaunchContractV1(value: unknown): WorkerLaunchContractV1 {
77
+ const parsed = parseWorkerLaunchContractVersion(value, 1);
78
+ if (parsed.schema !== 1) throw new WorkerLaunchValidationError("Worker launch schema must be 1");
79
+ return parsed;
80
+ }
81
+
82
+ export function parseWorkerLaunchContractV2(value: unknown): WorkerLaunchContractV2 {
83
+ const parsed = parseWorkerLaunchContractVersion(value, 2);
84
+ if (parsed.schema !== 2) throw new WorkerLaunchValidationError("Worker launch schema must be 2");
85
+ return parsed;
86
+ }
87
+
88
+ export function parseWorkerLaunchContract(value: unknown): WorkerLaunchContract {
89
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
90
+ throw new WorkerLaunchValidationError("worker launch contract must be an object");
91
+ }
92
+ const schema = (value as Record<string, unknown>)["schema"];
93
+ if (schema === 1) return parseWorkerLaunchContractV1(value);
94
+ if (schema === 2) return parseWorkerLaunchContractV2(value);
95
+ throw new WorkerLaunchValidationError("Worker launch schema must be 1 or 2");
96
+ }
97
+
98
+ function parseWorkerLaunchContractVersion(
99
+ value: unknown,
100
+ schema: 1 | 2,
101
+ ): WorkerLaunchContract {
74
102
  const object = strictObject(value, [
75
103
  "schema", "runId", "workerId", "attemptId", "workerAttemptGeneration",
76
104
  "supervisorGeneration", "transportMode", "channel", "depth", "model", "capabilities",
77
105
  "tools", "workspace", "sessionDirectory", "projectTrust", "parentLivenessFd", "budget",
78
106
  "sideEffectPolicy", "continuedSessionFile", "forkedSessionFile",
107
+ ...(schema === 2 ? ["protocolFd"] : []),
79
108
  ], "worker launch contract");
80
- if (object["schema"] !== 1) throw new WorkerLaunchValidationError("Worker launch schema must be 1");
109
+ if (object["schema"] !== schema) {
110
+ throw new WorkerLaunchValidationError(`Worker launch schema must be ${schema}`);
111
+ }
81
112
  if (object["transportMode"] !== "send-only") {
82
113
  throw new WorkerLaunchValidationError("Worker launch transport mode must be send-only");
83
114
  }
84
115
  if (object["parentLivenessFd"] !== 3) {
85
116
  throw new WorkerLaunchValidationError("Worker parent-liveness descriptor must be 3");
86
117
  }
118
+ if (schema === 2 && object["protocolFd"] !== 4) {
119
+ throw new WorkerLaunchValidationError("Worker protocol descriptor must be 4");
120
+ }
87
121
  const model = strictObject(object["model"], ["provider", "id", "thinkingLevel"], "worker model");
88
122
  const workspace = strictObject(object["workspace"], ["path", "mode", "worktreePath"], "worker workspace");
89
123
  const budget = strictObject(
@@ -118,11 +152,10 @@ export function parseWorkerLaunchContractV1(value: unknown): WorkerLaunchContrac
118
152
  if (continuedSessionFile !== undefined && forkedSessionFile !== undefined) {
119
153
  throw new WorkerLaunchValidationError("Worker launch cannot continue and fork a session together");
120
154
  }
121
- return {
122
- schema: 1,
123
- runId: prefixedString(object["runId"], "run", "run ID") as WorkerLaunchContractV1["runId"],
124
- workerId: prefixedString(object["workerId"], "worker", "worker ID") as WorkerLaunchContractV1["workerId"],
125
- attemptId: prefixedString(object["attemptId"], "attempt", "attempt ID") as WorkerLaunchContractV1["attemptId"],
155
+ const fields: Omit<WorkerLaunchContractV1, "schema"> = {
156
+ runId: prefixedString(object["runId"], "run", "run ID") as WorkerLaunchContract["runId"],
157
+ workerId: prefixedString(object["workerId"], "worker", "worker ID") as WorkerLaunchContract["workerId"],
158
+ attemptId: prefixedString(object["attemptId"], "attempt", "attempt ID") as WorkerLaunchContract["attemptId"],
126
159
  workerAttemptGeneration: requiredString(
127
160
  object["workerAttemptGeneration"],
128
161
  "worker attempt generation",
@@ -169,6 +202,9 @@ export function parseWorkerLaunchContractV1(value: unknown): WorkerLaunchContrac
169
202
  "worker side-effect policy",
170
203
  ),
171
204
  };
205
+ return schema === 1
206
+ ? { schema: 1, ...fields }
207
+ : { schema: 2, ...fields, protocolFd: 4 };
172
208
  }
173
209
 
174
210
  export function resolveWorkerLaunch(input: {
@@ -260,8 +296,8 @@ export function resolveWorkerLaunch(input: {
260
296
  ),
261
297
  ...(contract.channel === "rpc" ? ["wait_for_input"] : []),
262
298
  ])].sort();
263
- const launchContract: WorkerLaunchContractV1 = {
264
- schema: 1,
299
+ const launchContract: WorkerLaunchContractV2 = {
300
+ schema: 2,
265
301
  runId: contract.runId,
266
302
  workerId: contract.workerId,
267
303
  attemptId: attempt.attemptId,
@@ -286,6 +322,7 @@ export function resolveWorkerLaunch(input: {
286
322
  ...(forkedSessionFile ? { forkedSessionFile } : {}),
287
323
  projectTrust,
288
324
  parentLivenessFd: 3,
325
+ protocolFd: 4,
289
326
  budget: contract.budget,
290
327
  sideEffectPolicy: contract.sideEffectPolicy,
291
328
  };
@@ -303,6 +340,7 @@ export function resolveWorkerLaunch(input: {
303
340
  cwd: absolutePath(contract.workspace.worktreePath ?? contract.workspace.path, "worker cwd"),
304
341
  env: childEnvironment(authority.inheritedEnvironment, launchContractPath),
305
342
  parentLivenessFd: 3,
343
+ protocolFd: 4,
306
344
  launchContract,
307
345
  launchContractPath,
308
346
  },
@@ -310,7 +348,7 @@ export function resolveWorkerLaunch(input: {
310
348
  }
311
349
 
312
350
  export function validateWorkerChildContext(
313
- contract: WorkerLaunchContractV1,
351
+ contract: WorkerLaunchContract,
314
352
  context: WorkerChildContext,
315
353
  ): void {
316
354
  const expectedMode = contract.channel === "json-result" ? "json" : "rpc";
@@ -352,7 +390,7 @@ export function isReceiverAuthorityEnvironmentKey(key: string): boolean {
352
390
  }
353
391
 
354
392
  function buildPiArguments(
355
- contract: WorkerLaunchContractV1,
393
+ contract: WorkerLaunchContract,
356
394
  childExtensionPath: string,
357
395
  requiresProjectResources: boolean,
358
396
  prompt: string,
@@ -400,6 +438,7 @@ function childEnvironment(
400
438
  }
401
439
  env["PI_AMQ_WORKER_LAUNCH_CONTRACT"] = launchContractPath;
402
440
  env["PI_AMQ_PARENT_LIVENESS_FD"] = "3";
441
+ env["PI_AMQ_PROTOCOL_FD"] = "4";
403
442
  return env;
404
443
  }
405
444