pi-crew 0.10.4 → 0.10.5
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 +40 -0
- package/dist/index.mjs +782 -784
- package/package.json +1 -1
- package/src/runtime/background-runner.ts +32 -7
- package/src/runtime/run-tracker.ts +9 -8
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,46 @@
|
|
|
2
2
|
|
|
3
3
|
> **Note:** `atomic-write-v2.ts` / `AtomicWriter` mentioned in historical entries below was consolidated into `atomic-write.ts` as of v0.9.42. This changelog is preserved as historical record — the migration was completed (the v2 class was never adopted; v1 won on simplicity + symlink-safety + link+unlink atomicity). See `docs/migration/atomic-write-v2-migration.md` for the decision rationale.
|
|
4
4
|
|
|
5
|
+
## [0.10.5] — user-scope runs: waitForRun + background diagnostics (2026-09-11)
|
|
6
|
+
|
|
7
|
+
### fix: RUN/WAIT instantly errored "Run not found" for user-scope runs (#54)
|
|
8
|
+
|
|
9
|
+
`waitForRun`'s slow-path attempt-0 probe joined `projectCrewRoot(cwd)`
|
|
10
|
+
(`<cwd>/.crew/state/runs/…`) to test run-directory existence. But runs created in
|
|
11
|
+
a **markerless (non-git) cwd** are routed to **user scope**
|
|
12
|
+
(`userCrewRoot()` = `~/.pi/agent/extensions/pi-crew/`) by `createRunPaths` →
|
|
13
|
+
`scopeBaseRoot` — the exact scope resolution `loadRunManifestById` uses when
|
|
14
|
+
reading. Result: the run executed fine (STATUS/STEER/SUMMARY all worked), while
|
|
15
|
+
`team action=run` and every `team action=wait` **instantly** threw
|
|
16
|
+
`Run not found` — so the agent believed the crew had failed and duplicated the
|
|
17
|
+
work itself while it kept running in the background. Reproduced from the #54
|
|
18
|
+
transcript (artifact paths under `~/.pi/agent/extensions/pi-crew/artifacts/…`).
|
|
19
|
+
|
|
20
|
+
- The probe now resolves through the exported, pure `createRunPaths(cwd,
|
|
21
|
+
runId).stateRoot` — the same scope-aware resolver used at run creation, so
|
|
22
|
+
project scope (incl. the `.pi/teams/` fallback, issue #29) and user scope
|
|
23
|
+
both resolve correctly.
|
|
24
|
+
- Regression test: user-scope run in a markerless cwd (isolated
|
|
25
|
+
`PI_TEAMS_HOME`) — the waiter must poll through the user-scope dir and
|
|
26
|
+
resolve on terminal status instead of throwing.
|
|
27
|
+
- Same-family fix (#55, also in this release): `background-runner.ts` computed
|
|
28
|
+
`background.log` + `exit-code.txt` paths via `projectCrewRoot` too, so those
|
|
29
|
+
diagnostics silently went missing for user-scope runs — degrading exactly
|
|
30
|
+
the crash evidence needed to diagnose them. Both sites now resolve via the
|
|
31
|
+
exported `backgroundLogPath()` / `backgroundExitCodePath()` helpers built on
|
|
32
|
+
`createRunPaths` (scope-aware; runId boundary hardening preserved). Ships as
|
|
33
|
+
source — no dist rebuild needed for this half.
|
|
34
|
+
|
|
35
|
+
### test: macOS ENOTEMPTY teardown race — shared `teardownCwd` helper
|
|
36
|
+
|
|
37
|
+
Third and fourth occurrence of the class (CI runs 34557602253 / 34558219451:
|
|
38
|
+
`resume-checkpoint`, `wait-request-broker`): a run's last artifact writes race
|
|
39
|
+
the recursive `rmSync` in test teardown — `rimrafSync` throws ENOTEMPTY when a
|
|
40
|
+
file lands between its unlink pass and a directory rmdir. Extracted the
|
|
41
|
+
5×200ms sleepSync retry (previously copy-pasted in resume-cancel `8197f054`
|
|
42
|
+
and role-tools-integration `6a271822`) into `test/fixtures/teardown-cwd.ts`
|
|
43
|
+
and switched both affected files to it.
|
|
44
|
+
|
|
5
45
|
## [0.10.3] — MuxSurface: workers in real panes + per-team-run tabs (2026-09-01)
|
|
6
46
|
|
|
7
47
|
128 commits since v0.10.2. The headline feature is **MuxSurface A1** (spec
|