pi-crew 0.11.45 → 0.11.46
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.
- package/CHANGELOG.md +22 -0
- package/dist/index.mjs +481 -481
- package/package.json +1 -1
- package/src/config/env-allowlist-registry.ts +4 -0
- package/src/config/env-vars.ts +4 -0
- package/src/prompt/prompt-runtime.ts +16 -3
- package/src/runtime/async-runner.ts +5 -7
- package/src/runtime/broker/crew-broker-child.ts +58 -0
- package/src/runtime/broker/crew-broker-delegate-request.ts +381 -0
- package/src/runtime/broker/crew-broker.ts +17 -294
- package/src/runtime/broker/stdin-handshake.ts +11 -0
- package/src/runtime/child-pi/child-pi-spawn.ts +53 -4
- package/src/runtime/child-pi/child-pi.ts +32 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.11.46] — broker hygiene: token off the child env (stdin handshake) + crew-broker split (2026-10-27)
|
|
4
|
+
|
|
5
|
+
Follow-up wave to the 0.11.45 security hardening: closes the LOW-1 residual (broker token in child env) and pays
|
|
6
|
+
structural debt (crew-broker.ts at 1970/2000 wc-gate) before it blocks further work.
|
|
7
|
+
|
|
8
|
+
**Changed — broker token now travels over spawn stdin, off the child env (LOW-1 closure).** Headless JSON workers
|
|
9
|
+
receive the per-task compound `PI_CREW_BROKER_TOKEN` as a single `buildBrokerStdinLine` v2 payload written to the
|
|
10
|
+
child's stdin right after spawn (heap → pipe → heap — same shape as the F4 background-runner handshake), instead of
|
|
11
|
+
`/proc/<pid>/environ`-visible env. `PI_CREW_BROKER_SOCKET`/`RUN_ID`/`TASK_ID` stay in env (non-secret, needed by the
|
|
12
|
+
worker bootstrap to bind + validate the payload). The worker-side reader (`startChildBrokerClientAsync`) activates
|
|
13
|
+
only when the env token is absent, binds the payload by runId + taskId, cross-checks the socket path, and never
|
|
14
|
+
throws — any mismatch leaves the worker creds-less exactly like today. RPC-mode workers (`--mode rpc` argv guard)
|
|
15
|
+
and surface TUI panes keep the env/launch-script routes untouched. Rollback gate `PI_CREW_BROKER_STDIN=0` restores
|
|
16
|
+
the legacy env route on both sides bit-for-bit. Backward-compat matrix pinned by tests: old-parent→new-worker (env
|
|
17
|
+
route), new-parent→new-worker (stdin), rollback, garbage/wrong-run/socket-mismatch payloads, silent stdin.
|
|
18
|
+
|
|
19
|
+
**Changed — `handleDelegateRequest` extracted from crew-broker.ts (1970 → 1693 lines).** Pure move into
|
|
20
|
+
`src/runtime/broker/crew-broker-delegate-request.ts` via the same deps-object pattern as `protocol/wait-resolve.ts`;
|
|
21
|
+
public `CrewBroker` API unchanged, zero test churn (diff audit: byte-identical modulo `this.`→`deps.` + dedent).
|
|
22
|
+
Re-opens ~300 lines of wc-gate headroom. `scripts/check-lazy-imports.mjs` budget 539 → 540 (new static graph node
|
|
23
|
+
from the split; dynamic import is not an escape — the single-file bundle walks `import()` edges too).
|
|
24
|
+
|
|
3
25
|
## [0.11.45] — security hardening wave: worktree git-injection class closed + verified review fixes (2026-10-27)
|
|
4
26
|
|
|
5
27
|
### Security hardening wave — worktree git-injection (MED-1) + verified review fixes
|