pi-crew 0.9.55 → 0.9.56
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 +29 -0
- package/dist/index.mjs +1153 -857
- package/package.json +1 -2
- package/scripts/smoke-team-perf.ts +43 -0
- package/src/extension/registration/team-tool.ts +2 -1
- package/src/extension/team-tool/param-error.ts +114 -0
- package/src/extension/team-tool/status.ts +6 -1
- package/src/runtime/attention-events.ts +3 -2
- package/src/runtime/child-pi-streams.ts +12 -0
- package/src/runtime/child-pi.ts +20 -7
- package/src/runtime/compact-stages/bounded-tail.ts +84 -0
- package/src/runtime/concurrency.ts +8 -2
- package/src/runtime/crew-agent-records.ts +48 -2
- package/src/runtime/diagnostic-export.ts +3 -2
- package/src/runtime/manifest-cache.ts +5 -1
- package/src/runtime/semaphore.ts +4 -1
- package/src/runtime/supervisor-contact.ts +27 -12
- package/src/runtime/task-runner/child-executor.ts +5 -9
- package/src/runtime/team-runner.ts +62 -37
- package/src/schema/team-tool-schema.ts +19 -11
- package/src/state/event-log-rotation.ts +28 -0
- package/src/state/event-log.ts +39 -13
- package/src/state/state-store.ts +18 -4
- package/src/utils/redaction.ts +39 -0
- package/src/worktree/worktree-manager.ts +23 -8
- package/dist/build-meta.json +0 -16807
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,35 @@
|
|
|
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
5
|
|
|
6
|
+
## [0.9.56] — performance remediation + team-tool schema fix (2026-07-30)
|
|
7
|
+
|
|
8
|
+
Follows the verified `performance-audit-2026-07-29.md` (16 findings addressed). Independently deep-reviewed by a 4-agent review team (explore/code-review/security-review/verify — no P0/P1), full unit 6486/0 + integration 190/0, CI green on ubuntu/macos/windows.
|
|
9
|
+
|
|
10
|
+
### Performance
|
|
11
|
+
- **P0-1**: new `BoundedTail` segment ring replaces the O(n²) `appendBoundedTail` rebuild-per-line on stdout/stderr (5000 CJK lines: 112s → 26ms).
|
|
12
|
+
- **P0-2**: per-eventsPath rotation counter — the async append path's `% 100` gate was always true (counter never incremented there) so `needsRotation` ran every event; now ticked on all three append paths.
|
|
13
|
+
- **P0-3**: the per-batch hot-loop `saveCrewAgents` switched to `saveCrewAgentsCoalesced` (removes the `Atomics.wait`/`sleepSync` main-thread block); terminal writes flush coalesced first.
|
|
14
|
+
- **P0-4**: async event append drops from 5 fsyncs to ~0 (non-terminal) / 1 (terminal) — best-effort pid/`.seq` + F3a-style terminal-only data fsync.
|
|
15
|
+
- **P1-5**: memoize validated agent paths per task (~60 syscalls/event → ~0 after first).
|
|
16
|
+
- **P1-6**: redaction pre-filter `mayContainSecret` skips the ~14 redaction passes on clean strings (no bypass — every secret type still redacted).
|
|
17
|
+
- **P1-7**: scheduler consults the global worker cap (no more over-dispatch on low-core machines).
|
|
18
|
+
- **P1-8**: tail readers use `readJsonlTail`; `status.ts` O(events×messages) → O(events+messages).
|
|
19
|
+
- **P1-9**: manifest cache-hit skips the redundant path re-validation.
|
|
20
|
+
- **P1-10**: `before_task_start` hooks run via `Promise.all`.
|
|
21
|
+
- **P1-11**: `git worktree prune` memoized per-repo (coalesces concurrent calls + once per process).
|
|
22
|
+
- **P1-12**: `resolveRunStateRoot` memoized (containment check was ~8-12 syscalls/call).
|
|
23
|
+
- **P2-21**: drop `dist/build-meta.json` from the npm tarball (−470KB).
|
|
24
|
+
- **P2-25**: `supervisor_contact` events now reach `recordSupervisorContact` (was fully dead — the compact pipeline stripped the payload and `onStdoutLine` received display prose).
|
|
25
|
+
- **H2**: archive retention sweep (`.archive.jsonl` no longer accumulate forever).
|
|
26
|
+
- **H5**: `tasks.find` O(N²) → `Map` at all scheduler sites.
|
|
27
|
+
|
|
28
|
+
### Platform fix
|
|
29
|
+
- **team-tool schema flatten**: `TeamToolParams` was `Type.Union([5 domain objects])`, emitting a giant `anyOf` that LLM tool-callers could not reliably satisfy → empty/malformed calls → the tool silently defaulted to `list`. Flattened to a single `Type.Object` (all 54 actions + shared fields optional); the handler still validates per-action fields at runtime (defense-in-depth, unchanged).
|
|
30
|
+
|
|
31
|
+
### Review follow-ups
|
|
32
|
+
- Tighten the `"gh"` redaction marker to `gh[pousr]_` (reduces false-positives like "though"/"highlight").
|
|
33
|
+
- Test guard: `allActionLiterals.length === 54` (schema-derivation regression guard).
|
|
34
|
+
|
|
6
35
|
## [0.9.55] — HOTFIX: ship src/ (child workers load src/prompt/prompt-runtime.ts by path) (2026-07-29)
|
|
7
36
|
|
|
8
37
|
**Fixes the delegation / team-run regression** that affected 0.9.52–0.9.54. The extension loaded fine (0.9.54), but delegation/team-run failed with "pi-crew run failed" — the child worker `pi` process could not find its extension.
|