pi-crew 0.11.45 → 0.11.47

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 CHANGED
@@ -1,5 +1,38 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.11.47] — live-session split: model/prompt clusters out of live-session-runtime.ts (2026-10-27)
4
+
5
+ **Changed — `live-session-runtime.ts` (1971 → 1634 lines).** The file sat 29 lines under the 2000-line wc-gate LIMIT,
6
+ blocking further live-session work. Pure move into `src/runtime/live-session/live-session-prompt-models.ts` (368
7
+ lines): `LiveSessionSpawnInput`, `LiveSessionLike`, `ROLE_INTENSITY` and 13 model-resolution/prompt-building helpers
8
+ (`resolveScopeModelsPatterns`, `resolveScopedSessionModels`, `resolveParentModelFromRegistry`, `liveSystemPrompt`,
9
+ `filterActiveTools`, …). Byte-identical audit PASS (336 moved lines, modulo added `export` keywords). Public surface
10
+ preserved via re-exports — zero test churn. `scripts/check-lazy-imports.mjs` budget 540 → 541 (new static node from
11
+ the split; zero new reachability). Gates: tsc/lint/wc-gate/lazy green, targeted unit 64/64, live-session-faux-e2e
12
+ 4/4, test:critical green.
13
+
14
+ ## [0.11.46] — broker hygiene: token off the child env (stdin handshake) + crew-broker split (2026-10-27)
15
+
16
+ Follow-up wave to the 0.11.45 security hardening: closes the LOW-1 residual (broker token in child env) and pays
17
+ structural debt (crew-broker.ts at 1970/2000 wc-gate) before it blocks further work.
18
+
19
+ **Changed — broker token now travels over spawn stdin, off the child env (LOW-1 closure).** Headless JSON workers
20
+ receive the per-task compound `PI_CREW_BROKER_TOKEN` as a single `buildBrokerStdinLine` v2 payload written to the
21
+ child's stdin right after spawn (heap → pipe → heap — same shape as the F4 background-runner handshake), instead of
22
+ `/proc/<pid>/environ`-visible env. `PI_CREW_BROKER_SOCKET`/`RUN_ID`/`TASK_ID` stay in env (non-secret, needed by the
23
+ worker bootstrap to bind + validate the payload). The worker-side reader (`startChildBrokerClientAsync`) activates
24
+ only when the env token is absent, binds the payload by runId + taskId, cross-checks the socket path, and never
25
+ throws — any mismatch leaves the worker creds-less exactly like today. RPC-mode workers (`--mode rpc` argv guard)
26
+ and surface TUI panes keep the env/launch-script routes untouched. Rollback gate `PI_CREW_BROKER_STDIN=0` restores
27
+ the legacy env route on both sides bit-for-bit. Backward-compat matrix pinned by tests: old-parent→new-worker (env
28
+ route), new-parent→new-worker (stdin), rollback, garbage/wrong-run/socket-mismatch payloads, silent stdin.
29
+
30
+ **Changed — `handleDelegateRequest` extracted from crew-broker.ts (1970 → 1693 lines).** Pure move into
31
+ `src/runtime/broker/crew-broker-delegate-request.ts` via the same deps-object pattern as `protocol/wait-resolve.ts`;
32
+ public `CrewBroker` API unchanged, zero test churn (diff audit: byte-identical modulo `this.`→`deps.` + dedent).
33
+ Re-opens ~300 lines of wc-gate headroom. `scripts/check-lazy-imports.mjs` budget 539 → 540 (new static graph node
34
+ from the split; dynamic import is not an escape — the single-file bundle walks `import()` edges too).
35
+
3
36
  ## [0.11.45] — security hardening wave: worktree git-injection class closed + verified review fixes (2026-10-27)
4
37
 
5
38
  ### Security hardening wave — worktree git-injection (MED-1) + verified review fixes