pi-crew 0.11.6 → 0.11.7
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 +95 -0
- package/dist/index.mjs +486 -481
- package/package.json +2 -2
- package/src/config/config-validation.ts +28 -0
- package/src/config/env-vars.ts +23 -0
- package/src/config/types.ts +47 -0
- package/src/prompt/prompt-runtime.ts +33 -4
- package/src/runtime/child-pi/child-pi-spawn.ts +7 -0
- package/src/runtime/child-pi/child-pi.ts +93 -4
- package/src/runtime/child-pi/session-recovery.ts +334 -0
- package/src/runtime/model/model-scope.ts +141 -21
- package/src/runtime/model/pi-args.ts +104 -3
- package/src/runtime/peer-dep.ts +24 -0
- package/src/runtime/rpc/README.md +100 -0
- package/src/runtime/rpc/frame-client.ts +328 -0
- package/src/runtime/rpc/rpc-worker.ts +151 -0
- package/src/runtime/rpc/ui-request-policy.ts +112 -0
- package/src/runtime/run-worker.ts +14 -0
- package/src/runtime/surface/surface-spawn.ts +8 -1
- package/src/runtime/task-output-context.ts +191 -32
- package/src/runtime/task-packet.ts +3 -0
- package/src/runtime/task-runner/child-executor.ts +40 -2
- package/src/runtime/task-runner/post-execution.ts +5 -3
- package/src/runtime/task-runner/pre-execution.ts +24 -1
- package/src/runtime/task-runner/prompt-builder.ts +10 -2
- package/src/schema/config-schema.ts +25 -0
- package/src/schema/team-tool-schema.ts +10 -0
- package/src/ui/pi-ui-compat.ts +18 -9
- package/src/ui/widget/index.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,100 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.11.7] — Pi 1.0.0 adoption waves + deep-learn execution (2026-10-04)
|
|
4
|
+
### Added — Pi 1.0.0 adoption wave (see docs/reviews/pi-1.0.0-adoption-review-2026-10-03.md)
|
|
5
|
+
|
|
6
|
+
- **Session-file recovery for crash-killed workers (P1-1)** — workers now spawn with
|
|
7
|
+
deterministic `--session-id`/`--session-dir` (files live under the run's artifacts, not
|
|
8
|
+
`~/.pi`). On signal death (`exitCode === null`) the settle path tail-replays the worker's
|
|
9
|
+
session JSONL (SDK `parseSessionEntries`/`migrateSessionEntries`, torn-tail tolerant, 5s
|
|
10
|
+
bounded) and surfaces the last complete assistant message as a new `"session"` result
|
|
11
|
+
source — ranked below live captures, above stdout/stderr noise — plus a provenance sidecar
|
|
12
|
+
`results/<task>.session-recovery.json`. Config `runtime.sessionRecovery` (default **on**),
|
|
13
|
+
env `PI_CREW_SESSION_RECOVERY`.
|
|
14
|
+
- **Worker auto-compaction observability (P2-2)** — the injected prompt-runtime extension now
|
|
15
|
+
listens for the SDK `session_before_compact` event and emits `worker.session_before_compact`
|
|
16
|
+
(scalar payload) through the worker-events channel. Hook is infra-proven in `-p` mode but
|
|
17
|
+
not yet live-fired at threshold (docs + host-analog evidence).
|
|
18
|
+
- **Experimental RPC transport prototype (P2-3)** — new `src/runtime/rpc/`: strict-LF JSONL
|
|
19
|
+
frame client on SDK protocol types, `extension_ui_request` drain policy (count+drop), dialog
|
|
20
|
+
auto-answer policy `cancel`|`block` (auto-confirm deliberately absent). Config
|
|
21
|
+
`runtime.workerTransport: 'stdio' (default) | 'rpc'` + env `PI_CREW_WORKER_TRANSPORT` /
|
|
22
|
+
`PI_CREW_RPC_DIALOG_ANSWER`. The seam returns a structured not-implemented result until the
|
|
23
|
+
live-fire integration phase — default path is byte-identical.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- **Surface TUI spawns pin `--tui-mode regular` (P0-1)** — Pi 1.0.0 defaults the TUI to
|
|
28
|
+
fullscreen, which silently empties the scrollback capture path (`capture-pane -S`) that
|
|
29
|
+
`readScreen` always uses. The pin restores pre-1.0.0 behavior for surface panes.
|
|
30
|
+
- `parseRuntimeConfig` now emits `runtime.sessionRecovery` and `runtime.workerTransport`
|
|
31
|
+
(F19-1 discipline — both keys were previously parse-dead).
|
|
32
|
+
- Legacy `@mariozechner/pi-coding-agent` fork resolution now warns once per process (staged
|
|
33
|
+
deprecation; canonical `@earendil-works` path unaffected).
|
|
34
|
+
|
|
35
|
+
### Added — deep-learn round 3 execution (see docs/reviews/pi-1.0.0-deep-learn-r3-2026-10-03.md)
|
|
36
|
+
|
|
37
|
+
- **Compaction-surviving worker header (R3-1)** — the run-static worker context (protocol
|
|
38
|
+
block, mailbox contract, workspace structure) moved from the user message to the
|
|
39
|
+
`--append-system-prompt` channel (byte-preserving move; probe-verified coexistence with
|
|
40
|
+
AGENTS.md discovery). Auto-compaction summarizes the user-message span but never the system
|
|
41
|
+
prompt, so long runs keep exactly the context that must not be lost. Prompt breakdown now
|
|
42
|
+
reports `userPrompt`/`userAppend` channels separately.
|
|
43
|
+
- **Worker provenance self-report (R3-2)** — the handoff template's new `### Provenance`
|
|
44
|
+
section asks workers to echo their `PI_SESSION_ID`/`PI_SESSION_FILE`/`PI_MODEL`/`PI_PROVIDER`/
|
|
45
|
+
`PI_REASONING_LEVEL` env — model provenance without log parsing.
|
|
46
|
+
- **Hermetic worker spawns (D5/R3-19)** — headless workers now spawn with `--no-extensions`
|
|
47
|
+
(default on; off-switch `runtime.hermeticWorkers` / `PI_CREW_HERMETIC_WORKERS`). Kills the
|
|
48
|
+
~1.37 s/spawn ambient extension stack and the ambient untrusted tool surface (8 direct-exposure
|
|
49
|
+
MCP tools). Explicit `-e` prompt-runtime injection and `--skill` flags unaffected; surface TUI
|
|
50
|
+
panes keep the ambient stack.
|
|
51
|
+
- **Trust pin (D1/R3-3)** — worker spawns pin `--no-approve` unconditionally: worker trust is
|
|
52
|
+
machine-state-free (no ambient `~/.pi/agent/trust.json` dependence). Project trust does not
|
|
53
|
+
gate write capability and AGENTS.md discovery is unaffected (probe-verified); surface TUI
|
|
54
|
+
spawns keep the interactive prompt.
|
|
55
|
+
|
|
56
|
+
### Fixed
|
|
57
|
+
|
|
58
|
+
- **Session args per-flag idempotency (live battery find)** — partial builder forwarding
|
|
59
|
+
(manifest `sessionId` without `sessionDir`) made the both-or-nothing guard self-disarm the
|
|
60
|
+
full activation: `--session-id` went out but `--session-dir` never did, so worker session
|
|
61
|
+
files silently landed in the cwd-keyed default dir and crash recovery read the wrong place.
|
|
62
|
+
Each missing flag is now filled independently; verified end-to-end by killing a real worker
|
|
63
|
+
(SIGKILL mid-tool) and recovering its last complete assistant message from the per-worker
|
|
64
|
+
artifacts dir in ~1s.
|
|
65
|
+
- **engines floor raised to Node `>=22.19.0`** — aligns pi-crew with the SDK's own declared
|
|
66
|
+
floor (previously `>=22.0.0` let Node 22.0–22.18 users run an SDK that declares itself
|
|
67
|
+
unsupported).
|
|
68
|
+
|
|
69
|
+
### Migration notes
|
|
70
|
+
|
|
71
|
+
- **Hermetic worker spawns are ON by default** (`runtime.hermeticWorkers`): headless workers
|
|
72
|
+
no longer load ambient user extensions/MCP —
|
|
73
|
+
set `PI_CREW_HERMETIC_WORKERS=0` or `runtime.hermeticWorkers: false` to restore the old
|
|
74
|
+
behavior if a worker genuinely needs ambient tooling.
|
|
75
|
+
|
|
76
|
+
### Fixed / removed
|
|
77
|
+
|
|
78
|
+
- Dead `persist: true` widget option removed (call site + compat strip + type alias).
|
|
79
|
+
- `--provider` without `--model` now has an argv contract test across every builder path
|
|
80
|
+
(Pi 1.0.0 turned the silent ignore into an error).
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
### Security
|
|
84
|
+
|
|
85
|
+
- **fast-uri 3.1.2 → 3.1.8** (transitive of `ajv`, shipped runtime tree): patched
|
|
86
|
+
the 9 GHSA advisories (host-confusion / SSRF-via-URI-parsing family). pi-crew
|
|
87
|
+
only compiles its own static JSON schemas with ajv, so exploitability was low,
|
|
88
|
+
but the package ships to users, so the lockfile bump is user-facing hardening.
|
|
89
|
+
- Known-accepted (dev-tree only, NOT shipped — `npm pack` carries 0 copies):
|
|
90
|
+
`brace-expansion@5.0.9` nested under `@earendil-works/pi-coding-agent` →
|
|
91
|
+
`minimatch@10.2.6` carries 3 high ReDoS/stack-exhaustion advisories. Kept at
|
|
92
|
+
5.0.9 because npm's resolver deterministically re-nests 5.0.9 for this scoped
|
|
93
|
+
position (overrides, cache-clean, clean-room regen, and lockfile surgery all
|
|
94
|
+
fail or regress on plain `npm install`; only `npm ci` would hold the pin).
|
|
95
|
+
CI runs `npm ci --no-audit` and has no `npm audit` gate; revisit when the
|
|
96
|
+
SDK bumps minimatch.
|
|
97
|
+
|
|
3
98
|
## [0.11.6] — SDD-3/4 upgrade waves, W-E/W-I, small-wins, Pi 1.0.0 compat, GH #61 fix (2026-10-03)
|
|
4
99
|
|
|
5
100
|
### fix(extensions): GH-061 — normalize directory `pi.extensions` entries to entry-file identity (child workers double-load)
|