pi-crew 0.9.56 → 0.9.58
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/AGENTS.md +1 -1
- package/CHANGELOG.md +61 -0
- package/README.md +53 -5
- package/dist/index.mjs +25867 -23712
- package/docs/README.md +54 -0
- package/package.json +12 -12
- package/skills/real-test-pi-crew/SKILL.md +93 -3
- package/src/agents/discover-agents.ts +74 -10
- package/src/benchmark/feedback-loop.ts +1 -1
- package/src/config/config.ts +15 -3
- package/src/config/markers.ts +9 -1
- package/src/config/types.ts +12 -0
- package/src/extension/action-suggestions.ts +16 -63
- package/src/extension/async-notifier.ts +5 -5
- package/src/extension/command-completions.ts +2 -2
- package/src/extension/crew-cleanup.ts +3 -3
- package/src/extension/crew-vibes/footer.ts +4 -2
- package/src/extension/cross-extension-rpc.ts +10 -5
- package/src/extension/knowledge-injection.ts +57 -10
- package/src/extension/register.ts +2 -2
- package/src/extension/registration/artifact-cleanup.ts +41 -3
- package/src/extension/registration/commands.ts +4 -4
- package/src/extension/registration/context-builder.ts +10 -10
- package/src/extension/registration/crash-recovery-cache.ts +3 -3
- package/src/extension/registration/foreground-run-controller.ts +1 -1
- package/src/extension/registration/lazy-configurers.ts +2 -2
- package/src/extension/registration/lifecycle-handlers.ts +12 -12
- package/src/extension/registration/lifecycle.ts +2 -2
- package/src/extension/registration/observability.ts +2 -2
- package/src/extension/registration/registration-types.ts +3 -3
- package/src/extension/registration/runtime-cleanup.ts +6 -1
- package/src/extension/registration/subagent-helpers.ts +2 -2
- package/src/extension/registration/subagent-manager-setup.ts +2 -2
- package/src/extension/registration/subagent-tools.ts +21 -16
- package/src/extension/registration/team-tool.ts +108 -17
- package/src/extension/registration/viewers.ts +3 -4
- package/src/extension/registration/wire-cross-extension.ts +7 -7
- package/src/extension/rpc-hmac.ts +3 -2
- package/src/extension/run-bundle-schema.ts +13 -4
- package/src/extension/run-export.ts +2 -2
- package/src/extension/run-import.ts +19 -2
- package/src/extension/run-index.ts +2 -3
- package/src/extension/run-maintenance.ts +80 -8
- package/src/extension/team-manager-command.ts +3 -1
- package/src/extension/team-tool/anchor.ts +8 -2
- package/src/extension/team-tool/api.ts +117 -39
- package/src/extension/team-tool/cancel.ts +23 -8
- package/src/extension/team-tool/chain-executor.ts +1 -1
- package/src/extension/team-tool/destructive-gate.ts +12 -6
- package/src/extension/team-tool/dispatch/automate.ts +17 -2
- package/src/extension/team-tool/dispatch/control.ts +17 -2
- package/src/extension/team-tool/dispatch/manage.ts +34 -2
- package/src/extension/team-tool/dispatch/run.ts +17 -2
- package/src/extension/team-tool/dispatch/status.ts +37 -5
- package/src/extension/team-tool/doctor.ts +2 -2
- package/src/extension/team-tool/explain.ts +1 -1
- package/src/extension/team-tool/goal-wrap.ts +5 -5
- package/src/extension/team-tool/goal.ts +30 -9
- package/src/extension/team-tool/handle-schedule.ts +37 -19
- package/src/extension/team-tool/health-monitor.ts +7 -5
- package/src/extension/team-tool/inspect.ts +21 -5
- package/src/extension/team-tool/intent-policy.ts +9 -0
- package/src/extension/team-tool/lifecycle-actions.ts +79 -13
- package/src/extension/team-tool/parallel-dispatch.ts +14 -5
- package/src/extension/team-tool/param-error.ts +24 -0
- package/src/extension/team-tool/respond.ts +20 -6
- package/src/extension/team-tool/run-deadline.ts +7 -2
- package/src/extension/team-tool/run.ts +49 -20
- package/src/extension/team-tool/status.ts +12 -6
- package/src/extension/team-tool.ts +152 -70
- package/src/hooks/registry.ts +1 -1
- package/src/i18n.ts +22 -0
- package/src/observability/event-bus.ts +1 -1
- package/src/prompt/prompt-runtime.ts +2 -2
- package/src/runtime/README.md +35 -0
- package/src/runtime/agent-control.ts +1 -1
- package/src/runtime/anchor-manager.ts +0 -2
- package/src/runtime/async-runner.ts +1 -1
- package/src/runtime/attention-events.ts +1 -1
- package/src/runtime/auto-summarize.ts +0 -2
- package/src/runtime/background-runner.ts +137 -30
- package/src/runtime/{crew-broker-child.ts → broker/crew-broker-child.ts} +2 -2
- package/src/runtime/{crew-broker-client.ts → broker/crew-broker-client.ts} +4 -7
- package/src/runtime/{crew-broker.ts → broker/crew-broker.ts} +13 -21
- package/src/runtime/chain-runner.ts +50 -5
- package/src/runtime/{child-pi-constants.ts → child-pi/child-pi-constants.ts} +1 -1
- package/src/runtime/{child-pi-kill.ts → child-pi/child-pi-kill.ts} +3 -3
- package/src/runtime/{child-pi-spawn.ts → child-pi/child-pi-spawn.ts} +28 -12
- package/src/runtime/{child-pi-steering.ts → child-pi/child-pi-steering.ts} +1 -1
- package/src/runtime/{child-pi-streams.ts → child-pi/child-pi-streams.ts} +11 -4
- package/src/runtime/{child-pi-transcript.ts → child-pi/child-pi-transcript.ts} +6 -6
- package/src/runtime/{child-pi.ts → child-pi/child-pi.ts} +28 -72
- package/src/runtime/{compact-stages → compaction/compact-stages}/bounded-tail.ts +1 -1
- package/src/runtime/{compact-stages → compaction/compact-stages}/index.ts +2 -2
- package/src/runtime/{compaction-summary.ts → compaction/compaction-summary.ts} +3 -3
- package/src/runtime/{tool-output-pruner.ts → compaction/tool-output-pruner.ts} +1 -1
- package/src/runtime/custom-tools/irc-tool.ts +2 -2
- package/src/runtime/delivery-coordinator.ts +0 -3
- package/src/runtime/diagnostic-export.ts +3 -3
- package/src/runtime/foreground-control.ts +1 -1
- package/src/runtime/foreground-watchdog.ts +3 -3
- package/src/runtime/{adaptive-plan.ts → goal-workflow/adaptive-plan.ts} +8 -8
- package/src/runtime/{dynamic-workflow-context.ts → goal-workflow/dynamic-workflow-context.ts} +16 -16
- package/src/runtime/{dynamic-workflow-runner.ts → goal-workflow/dynamic-workflow-runner.ts} +10 -10
- package/src/runtime/{goal-achievement.ts → goal-workflow/goal-achievement.ts} +3 -3
- package/src/runtime/{goal-evaluator.ts → goal-workflow/goal-evaluator.ts} +8 -8
- package/src/runtime/{goal-loop-runner.ts → goal-workflow/goal-loop-runner.ts} +27 -25
- package/src/runtime/{goal-state-store.ts → goal-workflow/goal-state-store.ts} +8 -8
- package/src/runtime/{plan-templates.ts → goal-workflow/plan-templates.ts} +1 -1
- package/src/runtime/group-join.ts +3 -3
- package/src/runtime/handoff-manager.ts +0 -2
- package/src/runtime/{heartbeat-watcher.ts → heartbeat/heartbeat-watcher.ts} +7 -7
- package/src/runtime/iteration-hooks.ts +1 -1
- package/src/runtime/{live-agent-control.ts → live-session/live-agent-control.ts} +2 -2
- package/src/runtime/{live-agent-manager.ts → live-session/live-agent-manager.ts} +4 -4
- package/src/runtime/{live-session-runtime.ts → live-session/live-session-runtime.ts} +39 -41
- package/src/runtime/manifest-cache.ts +1 -1
- package/src/runtime/{model-fallback.ts → model/model-fallback.ts} +4 -2
- package/src/runtime/{pi-args.ts → model/pi-args.ts} +20 -5
- package/src/runtime/model/provider-extensions.ts +152 -0
- package/src/runtime/{runtime-policy.ts → model/runtime-policy.ts} +2 -2
- package/src/runtime/{runtime-resolver.ts → model/runtime-resolver.ts} +3 -3
- package/src/runtime/{runtime-warmup.ts → model/runtime-warmup.ts} +49 -8
- package/src/runtime/orphan-worker-registry.ts +1 -1
- package/src/runtime/{progress-tracker.ts → output/progress-tracker.ts} +1 -1
- package/src/runtime/{result-extractor.ts → output/result-extractor.ts} +4 -4
- package/src/runtime/{sidechain-output.ts → output/sidechain-output.ts} +2 -2
- package/src/runtime/{stream-preview.ts → output/stream-preview.ts} +1 -1
- package/src/runtime/{streaming-output.ts → output/streaming-output.ts} +2 -2
- package/src/runtime/{tool-progress.ts → output/tool-progress.ts} +1 -1
- package/src/runtime/parent-guard.ts +30 -10
- package/src/runtime/peer-dep.ts +35 -8
- package/src/runtime/pipeline-runner.ts +2 -2
- package/src/runtime/policy-engine.ts +2 -2
- package/src/runtime/{cancellation.ts → process/cancellation.ts} +1 -1
- package/src/runtime/{post-exit-stdio-guard.ts → process/post-exit-stdio-guard.ts} +1 -1
- package/src/runtime/{process-lifecycle.ts → process/process-lifecycle.ts} +3 -3
- package/src/runtime/{checkpoint.ts → recovery/checkpoint.ts} +4 -4
- package/src/runtime/{crash-recovery.ts → recovery/crash-recovery.ts} +93 -21
- package/src/runtime/{overflow-recovery.ts → recovery/overflow-recovery.ts} +1 -1
- package/src/runtime/{recovery-recipes.ts → recovery/recovery-recipes.ts} +1 -1
- package/src/runtime/{retry-executor.ts → recovery/retry-executor.ts} +2 -2
- package/src/runtime/{retry-runner.ts → recovery/retry-runner.ts} +2 -8
- package/src/runtime/run-tracker.ts +1 -1
- package/src/runtime/run-worker.ts +3 -3
- package/src/runtime/{coalesce-tasks.ts → scheduling/coalesce-tasks.ts} +3 -3
- package/src/runtime/{concurrency.ts → scheduling/concurrency.ts} +1 -1
- package/src/runtime/{parallel-research.ts → scheduling/parallel-research.ts} +4 -2
- package/src/runtime/{run-coalesced-task-group.ts → scheduling/run-coalesced-task-group.ts} +95 -36
- package/src/runtime/{task-graph-scheduler.ts → scheduling/task-graph-scheduler.ts} +1 -1
- package/src/runtime/session-resources.ts +1 -1
- package/src/runtime/settings-store.ts +1 -1
- package/src/runtime/single-agent-compose.ts +1 -0
- package/src/runtime/skill-instructions.ts +1 -1
- package/src/runtime/stale-reconciler.ts +11 -19
- package/src/runtime/subagent-manager.ts +9 -6
- package/src/runtime/supervisor-contact.ts +1 -1
- package/src/runtime/task-output-context.ts +7 -5
- package/src/runtime/task-packet.ts +26 -4
- package/src/runtime/task-runner/child-executor.ts +62 -22
- package/src/runtime/task-runner/live-executor.ts +8 -8
- package/src/runtime/task-runner/post-execution.ts +12 -12
- package/src/runtime/task-runner/pre-execution.ts +6 -6
- package/src/runtime/task-runner/progress.ts +1 -1
- package/src/runtime/task-runner/run-projection.ts +5 -2
- package/src/runtime/task-runner/scaffold-executor.ts +1 -1
- package/src/runtime/task-runner/state-helpers.ts +2 -2
- package/src/runtime/task-runner.ts +4 -4
- package/src/runtime/team-runner.ts +415 -152
- package/src/runtime/{completion-guard.ts → verification/completion-guard.ts} +11 -2
- package/src/runtime/{green-contract.ts → verification/green-contract.ts} +1 -1
- package/src/runtime/{post-checks.ts → verification/post-checks.ts} +4 -4
- package/src/runtime/{verification-gates.ts → verification/verification-gates.ts} +5 -5
- package/src/runtime/{verification-integrity.ts → verification/verification-integrity.ts} +1 -1
- package/src/schema/config-schema.ts +1 -0
- package/src/schema/team-tool-schema.ts +268 -198
- package/src/skills/validate.ts +28 -2
- package/src/state/README.md +44 -0
- package/src/state/atomic-write.ts +47 -15
- package/src/state/contracts.ts +1 -0
- package/src/state/{locks.ts → coordination/locks.ts} +138 -45
- package/src/state/{mailbox.ts → coordination/mailbox.ts} +34 -10
- package/src/state/{schedule.ts → coordination/schedule.ts} +3 -3
- package/src/state/{task-claims.ts → coordination/task-claims.ts} +1 -1
- package/src/state/decision-ledger.ts +1 -1
- package/src/state/{event-log-rotation.ts → event-log/event-log-rotation.ts} +161 -31
- package/src/state/{event-log.ts → event-log/event-log.ts} +38 -26
- package/src/state/{jsonl-writer.ts → event-log/jsonl-writer.ts} +14 -6
- package/src/state/gitignore-manager.ts +5 -1
- package/src/state/hook-instinct-bridge.ts +2 -2
- package/src/state/{active-run-registry.ts → stores/active-run-registry.ts} +7 -7
- package/src/state/{artifact-store.ts → stores/artifact-store.ts} +67 -9
- package/src/state/{blob-store.ts → stores/blob-store.ts} +3 -3
- package/src/state/{health-store.ts → stores/health-store.ts} +3 -3
- package/src/state/{instinct-store.ts → stores/instinct-store.ts} +3 -3
- package/src/state/{observation-store.ts → stores/observation-store.ts} +2 -2
- package/src/state/{run-cache.ts → stores/run-cache.ts} +13 -5
- package/src/state/{run-graph.ts → stores/run-graph.ts} +4 -4
- package/src/state/{run-metrics.ts → stores/run-metrics.ts} +3 -3
- package/src/state/{state-store.ts → stores/state-store.ts} +295 -22
- package/src/state/types.ts +27 -3
- package/src/ui/component.ts +55 -0
- package/src/ui/crew-select-list.ts +3 -1
- package/src/ui/dashboard-panes/agents-pane.ts +1 -1
- package/src/ui/deploy-bundled-themes.ts +11 -0
- package/src/ui/dwf-phase-display.ts +1 -1
- package/src/ui/heartbeat-aggregator.ts +1 -1
- package/src/ui/keybinding-map.ts +179 -6
- package/src/ui/layout-primitives.ts +9 -5
- package/src/ui/live-conversation-overlay.ts +1 -1
- package/src/ui/live-run-sidebar.ts +1 -1
- package/src/ui/overlay-stack.ts +148 -0
- package/src/ui/overlays/agent-picker-overlay.ts +1 -1
- package/src/ui/overlays/mailbox-compose-overlay.ts +1 -1
- package/src/ui/overlays/mailbox-detail-overlay.ts +2 -2
- package/src/ui/powerbar-publisher.ts +1 -1
- package/src/ui/render-scheduler.ts +1 -1
- package/src/ui/run-action-dispatcher.ts +3 -3
- package/src/ui/run-dashboard.ts +5 -33
- package/src/ui/run-event-bus.ts +3 -3
- package/src/ui/run-snapshot-cache.ts +37 -18
- package/src/ui/settings-overlay.ts +13 -21
- package/src/ui/snapshot-types.ts +1 -1
- package/src/ui/status-colors.ts +0 -2
- package/src/ui/syntax-highlight.ts +31 -12
- package/src/ui/terminal-status.ts +1 -1
- package/src/ui/theme-adapter.ts +33 -13
- package/src/ui/tool-renderers/index.ts +8 -0
- package/src/ui/transcript-viewer.ts +37 -13
- package/src/ui/widget/index.ts +32 -9
- package/src/ui/widget/widget-formatters.ts +62 -4
- package/src/ui/widget/widget-model.ts +2 -2
- package/src/ui/widget/widget-renderer.ts +1 -1
- package/src/utils/conflict-detect.ts +58 -5
- package/src/utils/env-filter.ts +25 -11
- package/src/utils/ndjson.ts +2 -2
- package/src/utils/paths.ts +20 -1
- package/src/utils/redaction.ts +22 -1
- package/src/utils/socket-path.ts +1 -1
- package/src/workflows/workflow-config.ts +1 -1
- package/src/worktree/cleanup.ts +1 -1
- package/src/worktree/worktree-manager.ts +88 -39
- package/workflows/chain.workflow.md +2 -2
- package/index.bundle.ts +0 -25
- package/scripts/bench-check.mjs +0 -96
- package/scripts/bench-cold-start.mjs +0 -216
- package/scripts/build-bundle.mjs +0 -92
- package/scripts/check-all-skills.ts +0 -294
- package/scripts/check-bundle-size.mjs +0 -38
- package/scripts/check-bundle-staleness.mjs +0 -97
- package/scripts/check-conflict-markers.mjs +0 -91
- package/scripts/check-lazy-imports.mjs +0 -28
- package/scripts/dev-runner.mjs +0 -106
- package/scripts/profile-startup.mjs +0 -125
- package/scripts/release-smoke.mjs +0 -74
- package/scripts/run-bench.mjs +0 -47
- package/scripts/run-real-chain.ts +0 -41
- package/scripts/smoke-team-perf.ts +0 -43
- package/scripts/test-issue-29-crash.ts +0 -111
- package/scripts/test-issue-29-e2e.ts +0 -183
- package/scripts/test-issue-29-real-runtime.ts +0 -330
- package/scripts/test-issue-29-real-tasks.ts +0 -387
- package/scripts/test-issue-29-team-tool.ts +0 -105
- package/scripts/test-runner.mjs +0 -84
- package/scripts/verify-flicker-fix.ts +0 -109
- package/scripts/verify-skill.ts +0 -550
- package/scripts/watch-bundle.mjs +0 -259
- package/scripts/watchdog-harness.ts +0 -119
- package/src/adapters/claude-adapter.ts +0 -23
- package/src/adapters/codex-adapter.ts +0 -21
- package/src/adapters/cursor-adapter.ts +0 -17
- package/src/adapters/export-util.ts +0 -143
- package/src/adapters/index.ts +0 -15
- package/src/adapters/registry.ts +0 -18
- package/src/adapters/types.ts +0 -23
- package/src/runtime/code-summary.ts +0 -292
- package/src/runtime/cross-extension-rpc.ts +0 -143
- package/src/runtime/hidden-handoff.ts +0 -407
- package/src/runtime/prose-compressor.ts +0 -162
- package/src/subagents/async-entry.ts +0 -1
- package/src/subagents/index.ts +0 -3
- package/src/subagents/live/control.ts +0 -1
- package/src/subagents/live/manager.ts +0 -1
- package/src/subagents/live/realtime.ts +0 -1
- package/src/subagents/live/session-runtime.ts +0 -1
- package/src/subagents/manager.ts +0 -1
- package/src/subagents/spawn.ts +0 -1
- package/test-integration-check.ts +0 -118
- /package/src/runtime/{broker-issuer.ts → broker/broker-issuer.ts} +0 -0
- /package/src/runtime/{crew-broker-tokens.ts → broker/crew-broker-tokens.ts} +0 -0
- /package/src/runtime/{child-pi-pool.ts → child-pi/child-pi-pool.ts} +0 -0
- /package/src/runtime/{compact-pipeline.ts → compaction/compact-pipeline.ts} +0 -0
- /package/src/runtime/{compact-stages → compaction/compact-stages}/ansi-strip-stage.ts +0 -0
- /package/src/runtime/{compact-stages → compaction/compact-stages}/blank-collapse-stage.ts +0 -0
- /package/src/runtime/{compact-stages → compaction/compact-stages}/deduplicate-stage.ts +0 -0
- /package/src/runtime/{compact-stages → compaction/compact-stages}/head-snap-stage.ts +0 -0
- /package/src/runtime/{compact-stages → compaction/compact-stages}/tail-capture-stage.ts +0 -0
- /package/src/runtime/{compact-stages → compaction/compact-stages}/truncation-stage.ts +0 -0
- /package/src/runtime/{important-line-classifier.ts → compaction/important-line-classifier.ts} +0 -0
- /package/src/runtime/{heartbeat-gradient.ts → heartbeat/heartbeat-gradient.ts} +0 -0
- /package/src/runtime/{worker-heartbeat.ts → heartbeat/worker-heartbeat.ts} +0 -0
- /package/src/runtime/{worker-startup.ts → heartbeat/worker-startup.ts} +0 -0
- /package/src/runtime/{intercom-bridge.ts → live-session/intercom-bridge.ts} +0 -0
- /package/src/runtime/{live-control-realtime.ts → live-session/live-control-realtime.ts} +0 -0
- /package/src/runtime/{live-extension-bridge.ts → live-session/live-extension-bridge.ts} +0 -0
- /package/src/runtime/{live-irc.ts → live-session/live-irc.ts} +0 -0
- /package/src/runtime/{live-session-health.ts → live-session/live-session-health.ts} +0 -0
- /package/src/runtime/{model-resolver.ts → model/model-resolver.ts} +0 -0
- /package/src/runtime/{model-scope.ts → model/model-scope.ts} +0 -0
- /package/src/runtime/{output-validator.ts → output/output-validator.ts} +0 -0
- /package/src/runtime/{pi-json-output.ts → output/pi-json-output.ts} +0 -0
- /package/src/runtime/{progress-event-coalescer.ts → output/progress-event-coalescer.ts} +0 -0
- /package/src/runtime/{cancellation-token.ts → process/cancellation-token.ts} +0 -0
- /package/src/runtime/{zombie-scanner.ts → process/zombie-scanner.ts} +0 -0
- /package/src/runtime/{crash-classification.ts → recovery/crash-classification.ts} +0 -0
- /package/src/runtime/{batch-barrier.ts → scheduling/batch-barrier.ts} +0 -0
- /package/src/runtime/{global-worker-cap.ts → scheduling/global-worker-cap.ts} +0 -0
- /package/src/runtime/{parallel-utils.ts → scheduling/parallel-utils.ts} +0 -0
- /package/src/runtime/{scheduler.ts → scheduling/scheduler.ts} +0 -0
- /package/src/runtime/{semaphore.ts → scheduling/semaphore.ts} +0 -0
- /package/src/runtime/{task-graph.ts → scheduling/task-graph.ts} +0 -0
- /package/src/runtime/{verification-worktree.ts → verification/verification-worktree.ts} +0 -0
- /package/src/state/{event-reconstructor.ts → event-log/event-reconstructor.ts} +0 -0
- /package/src/state/{worker-atomic-writer.ts → event-log/worker-atomic-writer.ts} +0 -0
package/AGENTS.md
CHANGED
|
@@ -10,7 +10,7 @@ Read in this order:
|
|
|
10
10
|
2. `docs/HARNESS.md` for the human-agent collaboration model.
|
|
11
11
|
3. `docs/FEATURE_INTAKE.md` before turning any request into work.
|
|
12
12
|
4. `docs/product/` for current product contracts.
|
|
13
|
-
5. `docs/
|
|
13
|
+
5. `docs/architecture.md` for implementation shape.
|
|
14
14
|
6. `docs/stories/` for story packets and backlog.
|
|
15
15
|
7. `docs/TEST_MATRIX.md` for proof status.
|
|
16
16
|
8. `docs/decisions/` for why important choices were made.
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,67 @@
|
|
|
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.58] — fix load crash on stale hoisted typebox: defensive guard + bundle vendoring (survives `pi update`) + round-1/round-2 fixes (2026-08-04)
|
|
7
|
+
|
|
8
|
+
### Bug fixes
|
|
9
|
+
|
|
10
|
+
- **CRITICAL — extension failed to load after 0.9.57 update (`Cannot read properties of undefined (reading 'Set')`)**. `src/schema/team-tool-schema.ts` called `TypeRegistry.Set("StringEnum", …)` at module top-level. `TypeRegistry` only exists in `@sinclair/typebox@0.34.50+`, but pi-crew declared `^0.34.50`. Pi installs **all** extensions into **one** shared npm store with hoisted deps, and on update it only re-checks the extension's own `package.json` version — if pi-crew is already latest, it does **not** re-resolve transitive deps. So an install could land pi-crew@0.9.57 (needs `TypeRegistry`) over a stale hoisted `@sinclair/typebox@0.34.49` (no `TypeRegistry`). Under ESM↔CJS interop, `import { TypeRegistry }` then resolved to `undefined`, and the unguarded top-level `TypeRegistry.Set(…)` crashed extension load (the bundle path swallowed it and fell through to strip-types, where it was uncaught). `--force` only applies to self-update, not extensions, so the dirty dep tree was never healed.
|
|
11
|
+
- **Fix 1 — defensive guard (src / strip-types path)**: feature-detect `TypeRegistry` (`HAS_TYPE_REGISTRY`) and skip registration when absent. `buildStringEnum()` (renamed from the internal `stringEnum`, now exported) takes an injectable `hasRegistry` flag and falls back to a verbose-but-validating `Type.Union` of `Type.Literal`s when `TypeRegistry` is missing — so the extension **always loads** regardless of the store's typebox version. `Value.Check` works natively in both branches.
|
|
12
|
+
- **Fix 2 — vendor `@sinclair/typebox` into the bundle (`scripts/build-bundle.mjs`, removed from `external`)**: this is what makes pi-crew **run the correct/optimal version after `pi update --all|--extensions`**. The bundle now ships its own typebox (built-in ≥0.34.50) with **zero external `@sinclair/typebox` imports**, so pi-crew is fully immune to whatever stale typebox the shared store holds — under ANY update mechanism. The compact `StringEnum` path (not the verbose fallback) is always active. SAFE to bundle: host pi/pi-ai validate tools with the *unscoped* `typebox` package (not `@sinclair/typebox`), so pi-crew's vendored copy never overlaps pi-ai's instance — they were already separate. (Fix 1 stays as a safety net for the strip-types dev fallback.)
|
|
13
|
+
- Verified: `test/unit/schema/stringenum-typebox-guard.test.ts` exercises both `buildStringEnum` branches against real typebox `Value.Check`; all 95 `test/unit/schema/**` + 245 blast-radius tests green; `tsc --noEmit` clean; bundle-load 2/2; bundle has **zero external `@sinclair/typebox` imports** (self-contained); bundle 2.99 MB (budget 3.5 MB).
|
|
14
|
+
- User remedy: once 0.9.58 is published, just `pi update --extensions` (or `pi update --all`). The 0.9.57→0.9.58 version bump forces a reinstall, and the new bundle carries its own typebox — no manual store cleanup needed. (On an already-broken machine: start once with `pi -ne`, run the update, then restart normally.)
|
|
15
|
+
|
|
16
|
+
### Also bundled in 0.9.58 (already on main, unreleased)
|
|
17
|
+
|
|
18
|
+
- **Round-1 security hardening** (`ea03dd88`): strip `runtime.agentExtensions` from untrusted project config, harden untrusted-data fence injection (no `</untrusted-…>` escape), filter `PI_CREW_*` secrets from child-Pi env.
|
|
19
|
+
- **Round-2 locking fixes** (`6a5d8d16`): PID-guarded `releaseOwnLock` (LOCK-1 — no longer deletes a stolen lock in the `finally`), and `handleResume` releases the resume `withRunLock` before the minutes-long `executeTeamRun` (LOCK-2).
|
|
20
|
+
- **Round-3 correctness** (`ae36cd2a`): `taskTimeoutMs` no longer capped at 10s by the wrong `runtimeMaxTurns` ceiling (RT-NEW-1 — 5-minute timeouts silently disabled before); worktree dirty-snapshots pass `-c core.quotePath=false` so non-ASCII filenames are no longer silently dropped before `git clean -fd` (STATE-8 data-loss fix).
|
|
21
|
+
- **Round-4 state recovery** (`7b7968d5`): corrupt `manifest.json`/`tasks.json` are now quarantined (`.corrupt-<ts>`) + logged instead of silently making a run invisible (STATE-3); the stale-reconciler and health-monitor use the recovery loaders instead of bare `JSON.parse` that silently skipped corrupt runs (NEW-R1/R2).
|
|
22
|
+
- **Round-5 batch** (`59505265`, `26d07b76`, `a0fa1cb2`, `135dfc8b`): state/atomic (async `mode` option, compact `tasks.json`, hash-on-memory, atomic mailbox/subagent/gitignore writes, async-twin manifest quarantine), defense-in-depth (DI-1..DI-4, lazy yaml, bundle-mode warmup skip), TOCTOU `existsSync`+`readFileSync` fixes (NEW-P4), budget-abort drains in-flight units via shared `terminaliseRunWithDrain` (RT-NEW-2), benign signals no longer write terminal `async.failed` (RT-NEW-3), event-log tail-read for notifier/status (STATE-5), lazy `cli-highlight` + lazy `npm root -g` probe + provider-extension cache (PERF-1/2/3), themes mtime fast-path (PERF-7), `userPiRoot` cache keyed on home (NEW-P2 isolation fix).
|
|
23
|
+
- **Bundle rebuild note**: `dist/index.mjs` was rebuilt after R3–R5 — the earlier 13:35 build contained only R1/R2 + the typebox vendoring. Verify the shipped bundle includes the R3+ markers before publishing.
|
|
24
|
+
|
|
25
|
+
### Note on postinstall "bundle build FAILED" message
|
|
26
|
+
|
|
27
|
+
- Harmless and expected on published installs: `scripts/build-bundle.mjs` is intentionally omitted from the npm tarball (`files` list) so the committed `dist/index.mjs` is used as-is. `postinstall.mjs` reports the script's absence as a red FAILED line; the install succeeds via the committed bundle. (No code change — documenting so the red line is not mistaken for the load crash.)
|
|
28
|
+
|
|
29
|
+
### Late-0.9.58 additions — schema validation repair, prune dryRun, cleanup (post round-6)
|
|
30
|
+
|
|
31
|
+
- **Schema — empty-string unset markers** (`9173c6c4`, `bb47191e`): `replyDeadline`, `interval`, `budgetWarning`, `budgetAbort`, `tokenBudget` now accept `""`. Calling models emit `""` for unset optional fields, and pi-ai `validateToolArguments` runs BEFORE the pi-crew handler — a bare `Type.Integer`/`Type.Number` rejected `""` → every team action returned `Validation failed for tool team` and the model looped. Added `Type.Literal("")` to each union.
|
|
32
|
+
- **Schema — stringified numbers** (`9064343b`): pi-ai's tool-argument coercion stringifies a numeric value when the schema `Union` has a string-literal branch (e.g. `interval:0` arrived as `"0"`). Broadened the 5 numeric-union fields to also accept a numeric-string pattern branch, and added `normalizeLooseNumericFields()` in `handleTeamTool` to coerce the string form back to a real number (and treat `""` as unset) before domain routers read params. Without this, `team prune` and any call sending these optional numeric fields with value `0` failed validation.
|
|
33
|
+
- **prune dryRun now a true non-destructive preview** (`85f657c6`, `d5d42032`): `handlePrune` ignored `params.dryRun` entirely — it only checked `confirm`, then deleted. A caller requesting a preview (`dryRun:true`) with `confirm:true` got runs DELETED instead of listed (data-safety bug). `pruneFinishedRuns` now takes a `dryRun` option (stops after the read-only safety check — no deletion, no worktree cleanup, no audit); `handlePrune` lets `dryRun` bypass `confirm`; the `tool_call` destructive gate now allows `prune dryRun=true` (previously only `cleanup` was exempt).
|
|
34
|
+
- **forget resurrect fix** (`672a3d4d`): a still-alive background runner could land one final heartbeat write after the first `rmSync` in `handleForget` — `atomicWriteFile`'s `mkdirSync(recursive)` re-created the state dir, resurrecting `heartbeat.json` in a dir we just forgot. Now drains briefly (250ms) and re-removes any resurrected residue.
|
|
35
|
+
- **Round-6 resource cleanup** (`9f81a081`): `stopAllWatchdogs()` exported + called in `cleanupRuntime`; `RunDeadline.timer` cleared in all 4 run paths (dwf/async/fg/inline); foreground-abort `removeEventListener`.
|
|
36
|
+
- **CI green**: lint + format:check + full `npm test` pass on ubuntu/windows/macos (3 OSes). `2db4c6bc` fixed biome lint/format gaps; `9808f3b0` fixed a macOS-only path-divergence bug in the corrupt-index test.
|
|
37
|
+
|
|
38
|
+
## [0.9.57] — provider-extension auto-discovery + team-tool schema repair + whole-project reorganization (2026-08-03)
|
|
39
|
+
|
|
40
|
+
### New: provider extensions work in subagents (no hardcoding)
|
|
41
|
+
- pi-crew spawns child-pi workers with `--no-extensions` (security posture from SEC-1), which made extension-registered providers (e.g. `pi-commandcode-provider`) unresolvable in subagents → their models fell back to a secondary provider (429 rate-limit deaths, 0 tool uses).
|
|
42
|
+
- **Auto-discovery**: pi-crew now reads `~/.pi/agent/settings.json` `packages` (npm: specs only), resolves each to its extension entry point (`pi.extensions` → `index.ts` → `index.mjs` → `index.js` → `src/index.ts`), and merges the discovered paths into every builtin/user agent (`src/runtime/model/provider-extensions.ts` + `src/agents/discover-agents.ts`).
|
|
43
|
+
- Result: **any provider package installed via `pi install npm:<pkg>` works automatically in subagents** — no manual per-extension config.
|
|
44
|
+
- Optional explicit allowlist `runtime.agentExtensions: string[]` config added on top of auto-discovery.
|
|
45
|
+
- SEC-1 preserved: project/project-pi agents never receive these extensions.
|
|
46
|
+
- Verified end-to-end: `deepseek/deepseek-v4-flash` resolves to `commandcode/deepseek/deepseek-v4-flash` in a real subagent spawn and completes.
|
|
47
|
+
|
|
48
|
+
### Bug fixes (team tool was broken live while tests stayed green)
|
|
49
|
+
- **"Validation failed for tool team"**: pi-ai `validateToolArguments` validates tool args BEFORE the pi-crew handler runs, and rejected model-emitted empty-string defaults (`runId:""`, `workspaceMode:""`, `context:""`, `scope:""`, `budgetTotal:0`, `once:false`, `keep:false`) against Literal unions / patterns / minimums. Schema now accepts the unset markers (`Literal("")`, runId pattern `^$|^...`, `Literal(0)`, `Boolean` in unions); `allActionLiterals` filters the `""`.
|
|
50
|
+
- **"Unknown type"**: `SkillOverride`/`FreeformConfig` used `Type.Unsafe({...})` WITHOUT a `[TypeBox.Kind]` symbol, so `Value.Check` threw "Unknown type" the first time a model sent `skill`/`config`. Switched to TypeBox-native `Type.Union`/`Type.Record`. Handler-side `normalizeTeamParams` drops empty strings before validation (defense-in-depth).
|
|
51
|
+
- **chain-runner mis-split on arrows inside inline goals**: `parseChain` used `split("->")`, incorrectly splitting `"Change A -> B" -> "Analyze"` into 3 steps. New quote-aware `splitChainSteps()` splits only on top-level arrows (backward compatible).
|
|
52
|
+
- These were caught by a new Tier 9 feature battery in the `real-test-pi-crew` skill (live team-tool action coverage), which is now documented there alongside the agent-unauthorized-edit anti-pattern surfaced during testing.
|
|
53
|
+
|
|
54
|
+
### Whole-project reorganization (~92 commits)
|
|
55
|
+
- `src/` clustered: `src/runtime/` → 15 subdirs (child-pi/, broker/, live-session/, recovery/, scheduling/, verification/, model/, output/, heartbeat/, process/, goal-workflow/, compaction/, task-runner/, custom-tools/, errors/), `src/state/` → 3 subdirs (event-log/, stores/, coordination/), plus ui/, config/, utils/, agents/, extension/ clusters. Cluster maps in `src/runtime/README.md`, `src/state/README.md`.
|
|
56
|
+
- `test/unit/` mirrored: 561 of 712 flat `.test.ts` files moved into 35 subdirs matching `src/` (243 runtime/, 53 state/, 110 extension/, plus ui/, config/, utils/, etc.). 151 cross-cutting tests (round*, v0*, package-*, errors, i18n, bundle-*) stay at root by design. Map in `test/unit/README.md`.
|
|
57
|
+
- **REAL bug fixed**: test runner now expands `**` globs — `test/unit/security/` (3 files, 36 tests) were invisible before. All 715 files now discovered (6732 tests, 0 fail).
|
|
58
|
+
- `docs/` consolidated: 27 historical docs → `docs/archive/`; 20 living docs stay at root; new `docs/README.md` index; 5 categories of broken refs fixed (dead links in src/agents/discover-agents.ts, src/runtime/{chain-runner,anchor-manager,handoff-manager,auto-summarize}.ts, recovery/retry-runner.ts, SECURITY-ISSUES.md, ARCHITECTURE.md refs).
|
|
59
|
+
- Root cleanup: 11 stray `.md` files at repo root → `docs/archive/` + `docs/bugs/`.
|
|
60
|
+
- README updated: Repository layout section, provider-extension feature, `runtime.agentExtensions` config row, v0.9.57 Recent-changes entry, 3 broken doc links fixed.
|
|
61
|
+
- Stale worktrees + 4 merged local branches cleaned; `git worktree list` main-only.
|
|
62
|
+
|
|
63
|
+
### Verification
|
|
64
|
+
- Full final gate: typecheck 0 · lint 0 err/warn · format:check clean · unit 6763/6760/0 · integration 200/199/0 · `test:critical` 98/0 · bundle-load + smoke(real-binary) green · bundle 2.70 MB (budget 3.5 MB) · conflict-markers/lazy-imports/bundle-staleness all OK.
|
|
65
|
+
- Live feature battery (Tier 9): `team` action=list/run(sync)/run(async)/chain + `Agent`/`crew_agent`/`get_subagent_result` all green with `deepseek/deepseek-v4-flash` over commandcode; read-only actions (recommend/health/doctor/status/events/summary/get/explain/worktrees) all return clean.
|
|
66
|
+
|
|
6
67
|
## [0.9.56] — performance remediation + team-tool schema fix (2026-07-30)
|
|
7
68
|
|
|
8
69
|
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.
|
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
> a footgun, or a sharp edge, please open an issue or send a note — your
|
|
27
27
|
> feedback is genuinely appreciated. Thanks. ✌️
|
|
28
28
|
>
|
|
29
|
-
> See also: [SECURITY-ISSUES.md](SECURITY-ISSUES.md),
|
|
29
|
+
> See also: [SECURITY-ISSUES.md](docs/bugs/SECURITY-ISSUES.md),
|
|
30
30
|
> [docs/dynamic-workflows.md](docs/dynamic-workflows.md#security-model-important)
|
|
31
31
|
> (trust model), and the [Known limitations](#known-limitations) section below.
|
|
32
32
|
|
|
@@ -70,6 +70,7 @@ repo: https://github.com/baphuongna/pi-crew
|
|
|
70
70
|
- **Lossless-by-default output handling** (L4, v0.9.8) — worker output thresholds sized from measured data (100% of real outputs fit without compaction); when compaction is unavoidable it keeps head+tail (preserves closing code fences/headings) instead of head-only truncation. No more `[pi-crew compacted N chars]` markers eating the end of a worker's result.
|
|
71
71
|
- **Inter-pi broker** (v0.9.47, default-on) — a Unix-domain-socket message bus that lets concurrently-running Pi sessions pass messages, steering notes, and task-status events to each other. **On by default** on Linux + macOS; auto-disabled on native Windows (no unix socket). Three independent kill switches: `broker.enabled: false` (config), `PI_CREW_BROKER=0` (env, always wins), Windows auto-disable. See [docs/decisions/2026-07-22-broker-phase4-gated-on.md](docs/decisions/2026-07-22-broker-phase4-gated-on.md).
|
|
72
72
|
- **`test:critical` + `real-test-pi-crew` skill** (v0.9.47) — a curated 14-file / 97-test subset (`npm run test:critical`, ~20s) for fast in-loop verification, plus a bundled skill distilling the full 8-tier end-to-end verification discipline (unit → 3-path kill-switch proof → typecheck/bundle → live TUI probing → smoke team run). Prevents the verifier-worker hang that full `npm test` (>4 min) caused against the 300s worker timeout.
|
|
73
|
+
- **Provider extensions in subagents** (v0.9.57) — pi-crew spawns child-pi workers with `--no-extensions` (security posture), which made extension-registered providers (e.g. `pi-commandcode-provider`) unresolvable inside subagents. pi-crew now **auto-discovers provider packages** from `~/.pi/agent/settings.json` `packages` (npm: specs) and loads them via `--extension` in every builtin/user subagent — so **all provider models work in subagents**. An explicit `runtime.agentExtensions: string[]` config is an optional extra allowlist on top of auto-discovery. **SEC-1 preserved:** project/project-pi agents never receive these (env-gate unchanged).
|
|
73
74
|
|
|
74
75
|
---
|
|
75
76
|
|
|
@@ -286,6 +287,16 @@ The advisory is **informational only** — there is no `force:true` flag needed
|
|
|
286
287
|
|
|
287
288
|
## Recent changes
|
|
288
289
|
|
|
290
|
+
### v0.9.57: team-tool schema repair + provider-extension auto-discovery + post-reorg repo-layout consolidation
|
|
291
|
+
|
|
292
|
+
- **Team tool repaired (was broken live while tests stayed green)**: calling models emit empty-string/boolean defaults for every schema key, which pi-ai's pre-handler `validateToolArguments` rejected (`Validation failed for tool team`) and `Type.Unsafe` schema fields without `[TypeBox.Kind]` made `Value.Check` throw (`Unknown type`). Schema now accepts unset markers natively; `SkillOverride`/`FreeformConfig` switched to TypeBox-native constructors; `normalizeTeamParams` drops empties in the handler. Chain-runner also fixed (quote-aware step splitting). Caught by a new **Tier 9 feature battery** in the [`real-test-pi-crew`](skills/real-test-pi-crew/SKILL.md) skill (live team-tool action coverage).
|
|
293
|
+
- **Source reorg finalised (~90 commits)**: `src/` is now cluster-organised — `src/runtime/` (15 subdirs + ~77 flat files) and `src/state/` (3 subdirs + 12 root files), with the other top-level dirs (`extension/`, `ui/`, `config/`, `utils/`, `agents/`, …) cluster-honed too. See [Repository layout](#repository-layout) and the cluster maps [`src/runtime/README.md`](src/runtime/README.md) / [`src/state/README.md`](src/state/README.md).
|
|
294
|
+
- **Tests mirrored into subdirs**: 566 flat `.test.ts` files now live in 35 leaf subdirectories mirroring `src/` (`test/unit/runtime/`, `test/unit/state/`, `test/unit/extension/`, …). 151 cross-cutting tests (`round*`, `v0*`, `package-*`, errors, i18n, bundle-*) stay at `test/unit/` root by design. See [`test/unit/README.md`](test/unit/README.md).
|
|
295
|
+
- **Recursive-glob test-runner fix**: `scripts/test-runner.mjs` now expands `**` globs itself — Node v22's `--test` only expands single-level `*`, so subdir tests (e.g. `test/unit/security/`) were **invisible** to `npm test` before.
|
|
296
|
+
- **Docs consolidated**: 47 flat docs at `docs/` root → 20 living docs kept at root, 27 historical moved to `docs/archive/` (flat); 11 stray root `.md` files moved to `docs/archive/` + `docs/bugs/`. New [`docs/README.md`](docs/README.md) indexes the living docs + subdirs.
|
|
297
|
+
- **Provider extensions in subagents** (see [Features](#features)): auto-discovery of provider packages from `~/.pi/agent/settings.json` `packages` (npm: specs) + explicit `runtime.agentExtensions` allowlist. Implementation: `src/runtime/model/provider-extensions.ts` + merge in `src/agents/discover-agents.ts`. SEC-1 preserved (project/project-pi agents never receive these).
|
|
298
|
+
- See [CHANGELOG.md](CHANGELOG.md) for the full reorg + feature log.
|
|
299
|
+
|
|
289
300
|
### v0.9.47 (2026-07-22): Inter-pi broker Phase 4 (default-on) + verifier-hang fix + verification skill
|
|
290
301
|
|
|
291
302
|
- **Broker default-on**: `broker.enabled` flipped `false` → `true` on Linux + macOS. The inter-pi broker lets concurrent Pi sessions exchange messages, steering notes, and task-status events over a Unix-domain socket. Three kill switches remain: config `broker.enabled: false`, env `PI_CREW_BROKER=0` (always wins), Windows auto-disable.
|
|
@@ -315,7 +326,7 @@ The advisory is **informational only** — there is no `force:true` flag needed
|
|
|
315
326
|
|
|
316
327
|
### v0.9.42 – v0.9.44: 4-wave audit + flaky-CI fixes
|
|
317
328
|
|
|
318
|
-
A 4-wave audit + fix pass was completed (see `UPGRADE_REVIEW.md` for the full 647-line report and `CHANGELOG.md` for the diff):
|
|
329
|
+
A 4-wave audit + fix pass was completed (see `docs/archive/UPGRADE_REVIEW.md` for the full 647-line report and `CHANGELOG.md` for the diff):
|
|
319
330
|
|
|
320
331
|
- **−481 KB** bundle size (externalized `acorn` + fixed `@sinclair/typebox` name).
|
|
321
332
|
- **−31.1%** in `child-pi.ts` (1842 → 1270 lines via 6 decomposition steps).
|
|
@@ -481,6 +492,7 @@ For machine-readable validation, see [schema.json](schema.json).
|
|
|
481
492
|
| `runtime.effectivenessGuard` | `off \| warn \| block \| fail` | `off` | Pre-flight topology validator enforcement mode. |
|
|
482
493
|
| `runtime.isolationPolicy` 🔒 | `{ isolatedRoles?, defaultRuntime? }` | _(unset)_ | Per-role runtime selection for crash isolation. |
|
|
483
494
|
| `runtime.excludeContextBash` | `boolean` | `false` | Exclude certain bash results from worker context. |
|
|
495
|
+
| `runtime.agentExtensions` | `string[]` | _(unset)_ | Extra extension paths (file paths or npm entry points) loaded in **every** child-pi worker on top of auto-discovered provider packages (see [Features](#features)). Optional allowlist — auto-discovery already loads provider packages from `~/.pi/agent/settings.json` `packages`. Project/project-pi agents never receive these (SEC-1). |
|
|
484
496
|
|
|
485
497
|
² `requirePlanApproval` is sensitive only when set to `false` in project config
|
|
486
498
|
(the sanitizer blocks *disabling* the gate from untrusted project config).
|
|
@@ -893,7 +905,39 @@ npm run ci # full CI-equivalent check
|
|
|
893
905
|
npm pack --dry-run # package verification
|
|
894
906
|
```
|
|
895
907
|
|
|
896
|
-
Stats: **
|
|
908
|
+
Stats: **476 source files** (112K lines) · **762 test files** (717 unit + 34 integration + 5 smoke + 3 functional + 2 platform + 1 manual) · **CI: Ubuntu ✅ macOS ✅ Windows ✅**
|
|
909
|
+
|
|
910
|
+
---
|
|
911
|
+
|
|
912
|
+
## Repository layout
|
|
913
|
+
|
|
914
|
+
After the v0.9.x reorg (~90 commits) the repo is cluster-organised so related
|
|
915
|
+
files live together — source, tests, and docs mirror each other.
|
|
916
|
+
|
|
917
|
+
```
|
|
918
|
+
src/ # ~476 TS files
|
|
919
|
+
├── runtime/ # team-run execution machinery — 15 subdirs + ~77 flat files
|
|
920
|
+
├── state/ # persistent state layer — 3 subdirs + 12 root files
|
|
921
|
+
├── extension/ # Pi extension surface (register, team-tool, ui glue)
|
|
922
|
+
├── ui/ # TUI, dashboard, overlays
|
|
923
|
+
├── config/ · utils/ · agents/ · workflows/ · … # supporting clusters
|
|
924
|
+
test/
|
|
925
|
+
└── unit/ # mirrors src/ — 35 leaf subdirs + 151 cross-cutting tests at root
|
|
926
|
+
├── runtime/ · state/ · extension/ · ui/ · config/ · …
|
|
927
|
+
docs/ # living docs at root; history in docs/archive/
|
|
928
|
+
```
|
|
929
|
+
|
|
930
|
+
- **`src/`** — each top-level dir has a cluster map; the two largest are
|
|
931
|
+
[`src/runtime/README.md`](src/runtime/README.md) (15 subdirs: child-pi,
|
|
932
|
+
broker, live-session, recovery, scheduling, verification, model, output,
|
|
933
|
+
heartbeat, process, goal-workflow, compaction, task-runner, custom-tools,
|
|
934
|
+
errors) and [`src/state/README.md`](src/state/README.md) (event-log,
|
|
935
|
+
stores, coordination).
|
|
936
|
+
- **`test/unit/`** — mirrors `src/` 1:1; cross-cutting tests (`round*`,
|
|
937
|
+
`v0*`, `package-*`, errors, i18n, bundle-*) stay at the root by design.
|
|
938
|
+
See [`test/unit/README.md`](test/unit/README.md).
|
|
939
|
+
- **`docs/`** — 20 living docs at the root; 27 historical docs moved to
|
|
940
|
+
`docs/archive/`. See [`docs/README.md`](docs/README.md).
|
|
897
941
|
|
|
898
942
|
---
|
|
899
943
|
|
|
@@ -912,7 +956,11 @@ Stats: **477 source files** (108K lines) · **682 test files** (~6,500 tests) ·
|
|
|
912
956
|
| [docs/dynamic-workflows.md](docs/dynamic-workflows.md) | **v0.9.0** `.dwf.ts` script runtime + trust model |
|
|
913
957
|
| [docs/live-mailbox-runtime.md](docs/live-mailbox-runtime.md) | Mailbox + live-session runtime |
|
|
914
958
|
| [docs/publishing.md](docs/publishing.md) | Release & publish process |
|
|
915
|
-
| [docs/
|
|
959
|
+
| [docs/README.md](docs/README.md) | Index of all docs/ (living + subdirs) |
|
|
960
|
+
| [src/runtime/README.md](src/runtime/README.md) | Runtime source cluster map (15 subdirs) |
|
|
961
|
+
| [src/state/README.md](src/state/README.md) | State source cluster map (3 subdirs) |
|
|
962
|
+
| [test/unit/README.md](test/unit/README.md) | Unit-test cluster map (mirrors src/) |
|
|
963
|
+
| [docs/archive/next-upgrade-roadmap.md](docs/archive/next-upgrade-roadmap.md) | Future upgrade roadmap |
|
|
916
964
|
| [schema.json](schema.json) | Config JSON schema |
|
|
917
965
|
|
|
918
966
|
Research docs (not in package): [`docs/pi-crew-research/`](https://github.com/baphuongna/pi-crew/tree/main/docs) — audits, deep research, distillation notes.
|
|
@@ -929,7 +977,7 @@ sharp edges I'm aware of — there are almost certainly others I'm not.
|
|
|
929
977
|
event-loop race that kills the background process with no signal, no core,
|
|
930
978
|
and no V8 diagnostic report (8 investigation attempts: gdb, strace, perf,
|
|
931
979
|
`--report-on-fatalerror`, sync-fs workarounds, worker-thread atomic writer —
|
|
932
|
-
see
|
|
980
|
+
see [CHANGELOG.md](CHANGELOG.md) § v0.9.0 "Phase 1.5 #3").
|
|
933
981
|
**Mitigation:** multi-step workflows silently auto-downgrade to a normal
|
|
934
982
|
team-run (no goal-wrap layer); single-step workflows (`implementation`)
|
|
935
983
|
goal-wrap end-to-end.
|