pi-crew 0.10.1 → 0.10.2
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 +98 -0
- package/NOTICE.md +21 -0
- package/README.md +44 -2
- package/agents/executor.md +1 -1
- package/agents/test-engineer.md +1 -1
- package/dist/index.mjs +2781 -949
- package/package.json +1 -1
- package/schema.json +492 -94
- package/src/config/config-validation.ts +7 -1
- package/src/config/defaults.ts +8 -1
- package/src/config/role-tools.ts +4 -2
- package/src/config/types.ts +19 -1
- package/src/extension/crew-cleanup.ts +13 -0
- package/src/extension/crew-vibes/footer.ts +19 -0
- package/src/extension/crew-vibes/index.ts +11 -1
- package/src/extension/register.ts +8 -0
- package/src/extension/registration/command-registration.ts +1 -0
- package/src/extension/registration/commands/run.ts +15 -1
- package/src/extension/registration/commands/shared.ts +8 -0
- package/src/extension/registration/foreground-run-controller.ts +10 -2
- package/src/extension/registration/lifecycle-handlers.ts +52 -2
- package/src/extension/registration/runtime-cleanup.ts +23 -5
- package/src/extension/registration/team-tool.ts +5 -1
- package/src/extension/registration/ui.ts +5 -4
- package/src/extension/team-tool/run-deadline.ts +20 -3
- package/src/extension/team-tool/run.ts +26 -2
- package/src/runtime/child-pi/child-pi-constants.ts +8 -0
- package/src/runtime/child-pi/child-pi-streams.ts +21 -1
- package/src/runtime/detached-run-results.ts +90 -0
- package/src/runtime/goal-workflow/adaptive-plan.ts +30 -3
- package/src/runtime/goal-workflow/dynamic-workflow-runner.ts +5 -1
- package/src/runtime/merge-gate.ts +25 -9
- package/src/runtime/model/model-fallback.ts +7 -3
- package/src/runtime/process-status.ts +16 -1
- package/src/runtime/recovery/crash-recovery.ts +16 -0
- package/src/runtime/run-tracker.ts +77 -10
- package/src/runtime/team-runner.ts +3 -2
- package/src/schema/config-schema.ts +1 -1
- package/src/state/stores/plan-store.ts +1 -1
- package/src/state/stores/state-store.ts +73 -3
- package/src/state/types.ts +2 -0
- package/src/ui/dock-footer.ts +49 -0
- package/src/ui/inline-panel/agent-pane.ts +375 -0
- package/src/ui/inline-panel/agent-transcript.ts +338 -0
- package/src/ui/inline-panel/agent-view-overlay.ts +225 -0
- package/src/ui/inline-panel/crew-editor.ts +192 -0
- package/src/ui/inline-panel/index.ts +290 -0
- package/src/ui/inline-panel/panel-rows.ts +37 -0
- package/src/ui/inline-panel/panel-selection.ts +157 -0
- package/src/ui/inline-panel/panel-store.ts +111 -0
- package/src/ui/inline-panel/view-session-store.ts +36 -0
- package/src/ui/pi-ui-compat.ts +9 -0
- package/src/ui/widget/index.ts +176 -22
- package/src/ui/widget/task-list.ts +198 -0
- package/src/ui/widget/widget-formatters.ts +240 -4
- package/src/ui/widget/widget-renderer.ts +234 -37
- package/src/ui/widget/widget-types.ts +11 -0
- package/src/utils/child-process-shield.ts +106 -0
- package/src/utils/redaction.ts +7 -0
- package/src/utils/safe-abort.ts +45 -0
- package/src/workflows/discover-workflows.ts +1 -0
- package/src/workflows/workflow-config.ts +7 -0
- package/workflows/default.workflow.md +36 -26
- package/workflows/strict-fast-fix.workflow.md +26 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,104 @@
|
|
|
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.2] — UI rewrite + adaptive default team (2026-08-24)
|
|
6
|
+
|
|
7
|
+
40 commits after `v0.10.1` (≈3,500 LOC, 54 files). Headline: the UI surface
|
|
8
|
+
goes from "two modal overlays + status widget" to a proper in-document
|
|
9
|
+
panel — task list above the editor, dock at the very bottom, and an inline
|
|
10
|
+
agent transcript that opens with `↓` from the empty prompt. The default
|
|
11
|
+
team also moves from a fixed 4-step chain to a single adaptive `assess` →
|
|
12
|
+
parallel-execute → verify DAG.
|
|
13
|
+
|
|
14
|
+
### UI: task list above the editor (`src/ui/widget/task-list.ts`)
|
|
15
|
+
|
|
16
|
+
- **Pi-tasks style plan rows** (commits `3d930579`, `7434afd7`, `f37619c0`,
|
|
17
|
+
`54e638ef`). One numbered row per task painted in plan order: `#1`, `#2`,
|
|
18
|
+
… — no more `01_explore` style technical ids leaking into the user view.
|
|
19
|
+
Completed rows dim and strike through; the running row carries a spinner
|
|
20
|
+
frame with elapsed time and live token counts; queued rows name the open
|
|
21
|
+
dependencies they wait on (`› blocked by #2`).
|
|
22
|
+
- **Header is Claude-Code style**: `● 4 tasks (1 done, 1 in progress, 2 open)` —
|
|
23
|
+
plain counts, no agent/role identity (those belong to the dock).
|
|
24
|
+
- **Role/agent/model visibility removed from the row** — they live in the dock
|
|
25
|
+
below the editor. The list above the editor is the *plan*, not a worker
|
|
26
|
+
report.
|
|
27
|
+
- **10-row cap with `… and N more`** — unfinished work never falls out of the
|
|
28
|
+
cap; finished rows collapse behind the overflow marker.
|
|
29
|
+
- **Templated titles / descriptions** (commit `f51f7095`) — the task packet
|
|
30
|
+
emits `title` + `description` fields, `{goal}` substitution lands in the
|
|
31
|
+
persisted task record (not the run goal), so the list reflects what was
|
|
32
|
+
actually scoped per phase.
|
|
33
|
+
|
|
34
|
+
### UI: inline agent panel (`src/ui/inline-panel/`)
|
|
35
|
+
|
|
36
|
+
A new module (1,761 LOC across 10 files) that replaces the modal-only agent
|
|
37
|
+
surface with an in-document path. Design rationale: `docs/design/2026-08-20-inline-agent-panel.md`.
|
|
38
|
+
Attribution: `NOTICE.md` §"Inline agent panel" — adapted from `pi-subtask`
|
|
39
|
+
v0.7.4 (Victor Mustar, MIT); no code copied verbatim; steering rides
|
|
40
|
+
pi-crew's existing `team steer` channel rather than pi-subtask's stdin pipe.
|
|
41
|
+
|
|
42
|
+
- **`↓` from the empty prompt opens the dock** (commits `cfcad621`, `cf4895e8`,
|
|
43
|
+
`bff74c4f`). Static-icon flat rows, footer usage meter, `belowEditor`
|
|
44
|
+
placement. Enter on a row drops you into the worker's transcript.
|
|
45
|
+
- **Worker view is an in-document pane, never a session switch** (commits
|
|
46
|
+
`11c6649a`, `21ff211d`, `87497bd5`, `de3d44a0`, `50f41f30`, `5526c279`,
|
|
47
|
+
`402bb2a5`, `3dd68cc8`, `2b3e899d`, `9ee89866`, `ec8efd0a`, `e1708b20`,
|
|
48
|
+
`27c5c402`, `56279b00`, `c16cb332`). A sequence of fixes that landed
|
|
49
|
+
together: a) the `/crew-view` dispatch was routed through pi's immediate
|
|
50
|
+
command path (not a custom overlay), b) the agent view is a *byte-copy*
|
|
51
|
+
of the worker's own session log via a derived sessions ROOT, c) live
|
|
52
|
+
refresh polls the worker transcript and re-renders, d) `Enter` always
|
|
53
|
+
opens a real Pi session (no broken overlay), e) the worker-143 kill on
|
|
54
|
+
switches is root-caused (stale `ctx` was being passed around) and the
|
|
55
|
+
`AbortError` post-exit crash is fixed (`9db66cda`).
|
|
56
|
+
- **Dock survives until the run is done** (commit `67fa202a`) — rows no
|
|
57
|
+
longer disappear at "completed", the 3-row scroll window keeps the
|
|
58
|
+
in-progress task visible, and each row remembers its model.
|
|
59
|
+
- **Full-screen overlay still works for end-of-run review** (commit `c16cb332`)
|
|
60
|
+
— transcripts are complete; `Escape` returns to the dock.
|
|
61
|
+
|
|
62
|
+
### Workflow: default is now adaptive (BREAKING for templates)
|
|
63
|
+
|
|
64
|
+
`workflows/default.workflow.md` was rewritten (commit `fff4b98d`) — old
|
|
65
|
+
sequential `explore → plan → execute → verify` was too rigid for the
|
|
66
|
+
common case of "small goal, fast turnaround". The new default is a
|
|
67
|
+
single-`assess` adaptive plan:
|
|
68
|
+
|
|
69
|
+
- Topology: `complex-dag` (was `sequential`).
|
|
70
|
+
- Frontmatter: `adaptive: true`.
|
|
71
|
+
- The `assess` step (planner role) inspects the repo and emits an
|
|
72
|
+
`ADAPTIVE_PLAN_JSON` block with the concrete phases + tasks. Independent
|
|
73
|
+
tasks go into the SAME phase so they run in parallel; the verifier still
|
|
74
|
+
closes the loop at the end of any implementation plan.
|
|
75
|
+
- Hard cap: 12 tasks per phase. A simple goal may produce 1-2 phases with
|
|
76
|
+
1-2 tasks; broader goals fan out.
|
|
77
|
+
- Workflow file is **runtime data** (no rebuild needed) — the change is live
|
|
78
|
+
the next time a worker loads it.
|
|
79
|
+
- Migration: anyone pinning the old `explore/plan/execute/verify` chain
|
|
80
|
+
should switch to `workflow='plan-execute'` (still ships the fixed DAG).
|
|
81
|
+
|
|
82
|
+
### Misc
|
|
83
|
+
|
|
84
|
+
- **Model-routing transparency**: `console.warn` per-model passthrough
|
|
85
|
+
muted (`273c4f83`) + test pins the muted behaviour (`b019e645`).
|
|
86
|
+
- **Biome 2.5.3 lint + format sync** (commit `69a0460e`, no logic changes).
|
|
87
|
+
- 5 `docs/real-test/reports/real-test-2026-08-2{0..4}-*.md` reports landed
|
|
88
|
+
alongside the B5 real-test battery (the subagent-v2 release was
|
|
89
|
+
end-to-end verified before this UI batch).
|
|
90
|
+
- Real-test re-run on the released bundle (`b0cf3a3a` onward): test:critical
|
|
91
|
+
102/102, typecheck clean, 9a 10/10, 9b 5/5, chain 306.8s observation;
|
|
92
|
+
opportunistic finding #5 (SPEC-EVIDENCE marker format mismatch `===` vs
|
|
93
|
+
`:`) filed separately.
|
|
94
|
+
|
|
95
|
+
### See also
|
|
96
|
+
- `NOTICE.md` §"Inline agent panel" — pi-subtask attribution.
|
|
97
|
+
- `NOTICE.md` §"Source inspiration" — pi-tasks attribution for task list rendering.
|
|
98
|
+
- `docs/design/2026-08-20-inline-agent-panel.md` — inline panel design rationale.
|
|
99
|
+
- `workflows/default.workflow.md` — adaptive default workflow (runtime data).
|
|
100
|
+
- `docs/real-test/reports/real-test-2026-08-11-full-battery.md` — full 9-tier
|
|
101
|
+
battery on the post-v0.10.1 HEAD (`54e638ef`).
|
|
102
|
+
|
|
5
103
|
## [0.10.1] — subagent v2: governed delegation, plan objects, spec system, transparency (2026-08-20)
|
|
6
104
|
|
|
7
105
|
The full subagent-v2 effort (design `docs/design/subagent-v2-design.md`, plan
|
package/NOTICE.md
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
- Primary design and Pi-extension implementation inspiration: `pi-subagents` by Nico Bailon, MIT license.
|
|
8
8
|
- Team orchestration, state, and worktree contract inspiration: `oh-my-claudecode` by Yeachan Heo, MIT license.
|
|
9
|
+
- Task-list-above-the-editor rendering (numbered plan rows, dependency hints, one-line-per-task) draws on `pi-tasks` (tintinweb, MIT) and Claude Code's plan header convention; no code copied — the pi-crew implementation lives in `src/ui/widget/task-list.ts` and is original work informed by those surfaces.
|
|
9
10
|
- Conceptual inspiration only: `oh-my-openagent` / `oh-my-opencode`, SUL-1.0. No source code from this project should be copied into `pi-crew` unless explicitly reviewed for license compatibility and documented here.
|
|
10
11
|
- Built-in skill topics are original pi-crew guidance informed by common agent-skill patterns in `Source/awesome-agent-skills`, `Source/oh-my-claudecode`, and related local references; no verbatim skill text was copied.
|
|
11
12
|
|
|
@@ -13,6 +14,26 @@
|
|
|
13
14
|
|
|
14
15
|
When code is copied or substantially adapted from an MIT source, add the source path and license note here.
|
|
15
16
|
|
|
17
|
+
### Inline agent panel (2026-08-20)
|
|
18
|
+
|
|
19
|
+
The inline agent panel (`src/ui/inline-panel/`) adapts the display architecture
|
|
20
|
+
of `pi-subtask` v0.7.4 by Victor Mustar (MIT,
|
|
21
|
+
https://github.com/gary149/pi-subtask):
|
|
22
|
+
|
|
23
|
+
- width-budgeted single-line agent rows (compact widget row style),
|
|
24
|
+
- identity-tracked panel cursor (`panel-selection.ts` matches its
|
|
25
|
+
`panelSelId` state machine),
|
|
26
|
+
- in-document `aboveEditor` transcript pane reusing pi's native transcript
|
|
27
|
+
components instead of a viewport overlay,
|
|
28
|
+
- `CustomEditor` wrapper with `↓`/`↑`/`enter`/`x`/`escape` panel navigation
|
|
29
|
+
and the `@agent` editor-border label, and the
|
|
30
|
+
`!ctx.ui.getEditorComponent()` yield rule for editor ownership.
|
|
31
|
+
|
|
32
|
+
No code was copied verbatim; the pi-crew implementation is a fresh port onto
|
|
33
|
+
pi-crew's own widget/store/event architecture (steering rides pi-crew's
|
|
34
|
+
existing `team steer` steering-file channel rather than pi-subtask's stdin
|
|
35
|
+
pipe).
|
|
36
|
+
|
|
16
37
|
Current scaffold status: no substantial source files have been copied verbatim; implementation is a fresh scaffold based on documented design lessons.
|
|
17
38
|
|
|
18
39
|
## crew-vibes font assets
|
package/README.md
CHANGED
|
@@ -53,7 +53,9 @@ repo: https://github.com/baphuongna/pi-crew
|
|
|
53
53
|
- **Durable state** — manifest, tasks, events, artifacts all persisted to disk
|
|
54
54
|
- **Async/background runs** — detached runs survive session switches with completion notifications
|
|
55
55
|
- **Worktree isolation** — opt-in git worktrees per task for safe parallel edits
|
|
56
|
-
- **Rich UI** —
|
|
56
|
+
- **Rich UI** — task list above the editor (pi-tasks style: numbered plan rows, dependency hints, `… and N more` overflow), dock at the very bottom (static icons, per-row model, footer usage), and an inline agent panel (open a worker's transcript with `↓` from the empty prompt — never a session switch). Live widget, dashboard, and progress tracking unchanged.
|
|
57
|
+
- **Inline agent panel** (`src/ui/inline-panel/`) — status rows at the bottom, transcript in-document with pi's native components, `CustomEditor` overlay for steering (rides the existing `team steer` channel). Adapted from `pi-subtask` v0.7.4 (MIT) — attribution `NOTICE.md` §"Inline agent panel"; no code copied verbatim.
|
|
58
|
+
- **Adaptive default team** (`workflows/default.workflow.md`) — the built-in default is now a single `assess` → adaptive-DAG step instead of a fixed `explore → plan → execute → verify` chain. The planner inspects the repo and emits a JSON plan; independent tasks run in parallel; the verifier closes the loop. Workflow files are runtime data — the change is live without a rebuild. Pin to `workflow='plan-execute'` if you need the old fixed DAG.
|
|
57
59
|
- **Observability** — metrics registry, Prometheus/OTLP exporters, heartbeat watching, deadletter queue
|
|
58
60
|
- **Resource management** — create/update/delete agents, teams, workflows with validation
|
|
59
61
|
- **Import/export** — portable run bundles for sharing and archiving
|
|
@@ -212,7 +214,7 @@ When unsure which team/workflow fits:
|
|
|
212
214
|
|
|
213
215
|
| Team | Workflow | Purpose |
|
|
214
216
|
|------|----------|----------|
|
|
215
|
-
| `default` |
|
|
217
|
+
| `default` | adaptive: planner derives concrete tasks from the goal, parallel phases, verify | Balanced, general-purpose |
|
|
216
218
|
| `fast-fix` | explore → execute → verify | Quick bug fixes |
|
|
217
219
|
| `implementation` | Adaptive planner decides fanout | Multi-file implementation |
|
|
218
220
|
| `review` | explore → code-review → security-review → verify | Code review + security audit |
|
|
@@ -289,6 +291,46 @@ The advisory is **informational only** — there is no `force:true` flag needed
|
|
|
289
291
|
|
|
290
292
|
## Recent changes
|
|
291
293
|
|
|
294
|
+
### v0.10.2: UI rewrite + adaptive default team (2026-08-24)
|
|
295
|
+
|
|
296
|
+
40 commits after `v0.10.1` (≈3,500 LOC, 54 files). Headline: the UI surface
|
|
297
|
+
goes from "two modal overlays + status widget" to a proper in-document
|
|
298
|
+
panel — task list above the editor, dock at the very bottom, and an inline
|
|
299
|
+
agent transcript that opens with `↓` from the empty prompt. The default
|
|
300
|
+
team also moves from a fixed 4-step chain to a single adaptive `assess` →
|
|
301
|
+
parallel-execute → verify DAG.
|
|
302
|
+
|
|
303
|
+
- **Task list above the editor** — pi-tasks style numbered plan rows
|
|
304
|
+
(`#1`, `#2`, …) instead of `01_explore` ids; completed rows dim and
|
|
305
|
+
strike through; running row shows spinner + elapsed time + token
|
|
306
|
+
counts; queued rows name dependencies (`› blocked by #2`). Header
|
|
307
|
+
is Claude-Code style (`● 4 tasks (1 done, 1 in progress, 2 open)`).
|
|
308
|
+
Role/agent/model identity moved to the dock — the list is the *plan*,
|
|
309
|
+
not a worker report. 10-row cap with `… and N more` overflow.
|
|
310
|
+
- **Inline agent panel** (`src/ui/inline-panel/`, ~1,761 LOC, 10 files) —
|
|
311
|
+
`↓` from the empty prompt opens the dock; Enter drops into the worker's
|
|
312
|
+
full transcript rendered in-document with pi's native components;
|
|
313
|
+
steering rides the existing `team steer` channel (no stdin pipe).
|
|
314
|
+
Worker view is a *byte-copy* of the worker's own session log, polled
|
|
315
|
+
for live refresh, and Enter on the dock row always opens a real Pi
|
|
316
|
+
session (the worker-143 kill on switches and the `AbortError`
|
|
317
|
+
post-exit crash are both fixed). Full-screen overlay preserved for
|
|
318
|
+
end-of-run review.
|
|
319
|
+
- **Dock survives until the run is done** — rows no longer disappear at
|
|
320
|
+
"completed"; 3-row scroll window keeps the in-progress task visible;
|
|
321
|
+
per-row model display.
|
|
322
|
+
- **Adaptive default team** (`workflows/default.workflow.md`, runtime
|
|
323
|
+
data — no rebuild needed) — old fixed `explore → plan → execute →
|
|
324
|
+
verify` replaced by a single `assess` step (planner role) that emits
|
|
325
|
+
an `ADAPTIVE_PLAN_JSON` block. Independent tasks go into the SAME
|
|
326
|
+
phase so they run in parallel; verifier still closes the loop.
|
|
327
|
+
**Pin to `workflow='plan-execute'` if you need the old fixed DAG.**
|
|
328
|
+
- **Model-routing passthrough muted** + Biome 2.5.3 lint/format sync.
|
|
329
|
+
- Real-test re-run on the released v0.10.1 bundle: test:critical 102/102,
|
|
330
|
+
typecheck clean, 9a 10/10, 9b 5/5, chain 306.8s observation.
|
|
331
|
+
See `CHANGELOG.md` §Unreleased for full notes and `NOTICE.md` for
|
|
332
|
+
pi-subtask / pi-tasks attributions.
|
|
333
|
+
|
|
292
334
|
### v0.9.65: team-tool schema empty-string guard + effectiveness empty-result guard (2026-08-10)
|
|
293
335
|
|
|
294
336
|
- **`budgetTotal` empty-string unset marker accepted**: `budgetTotal` was the only numeric `TeamToolParams` field missing the `Literal("")` union branch its siblings had. Calling models that emit every schema key with defaults were rejected by pi-ai's pre-handler validation → `Validation failed for tool "team"` on every action. The `MISCONFIGURATION GUARD` (rejects 1-999) is preserved. Caught by the Tier 9 feature battery — Tiers 1-8 stayed green while the team tool was broken for emitting models.
|
package/agents/executor.md
CHANGED
|
@@ -5,7 +5,7 @@ model: false
|
|
|
5
5
|
systemPromptMode: replace
|
|
6
6
|
inheritProjectContext: true
|
|
7
7
|
inheritSkills: false
|
|
8
|
-
tools: read, grep, find, ls, bash, edit, write, scratchpad, ask
|
|
8
|
+
tools: read, grep, find, ls, glob, bash, edit, write, scratchpad, ask, delegate
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
You are an implementation specialist. Follow the provided plan, make targeted changes, keep edits minimal, and report changed files plus validation status. Do not broaden scope without explaining why.
|
package/agents/test-engineer.md
CHANGED
|
@@ -5,7 +5,7 @@ model: false
|
|
|
5
5
|
systemPromptMode: replace
|
|
6
6
|
inheritProjectContext: true
|
|
7
7
|
inheritSkills: false
|
|
8
|
-
tools: read, edit, write, bash, ls, scratchpad, ask
|
|
8
|
+
tools: read, edit, write, bash, ls, glob, grep, find, scratchpad, ask, delegate
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
You are a test engineer. Identify the right test level, add or adjust tests when asked, detect flaky assumptions, and report exact validation commands and results.
|