diff --git a/docs/README.md b/docs/README.md index 5acd8f0..68f1412 100644 --- a/docs/README.md +++ b/docs/README.md @@ -17,6 +17,6 @@ Project documentation lives here. | Document | Description | |----------|-------------| | [task_plan.md](task_plan.md) | v2 architecture decisions, error handling, testing strategy | -| [phases.md](phases.md) | v2 implementation phases (1-6) with checklists | +| [phases.md](phases.md) | v2 implementation phases (1-7) with checklists | | [findings.md](findings.md) | Research findings (Agent SDK, Tauri, xterm.js, performance) | | [progress.md](progress.md) | Session-by-session progress log | diff --git a/docs/phases.md b/docs/phases.md index 572ff1c..f3fdb87 100644 --- a/docs/phases.md +++ b/docs/phases.md @@ -228,11 +228,11 @@ bterminal-v2/ - [x] Auto-update latest.json generation in CI (version, platform URL, signature from .sig file) - [x] release.yml: TAURI_SIGNING_PRIVATE_KEY env vars passed to build step - [x] Auto-update signing key generated, pubkey set in tauri.conf.json -- [ ] TAURI_SIGNING_PRIVATE_KEY secret must be set in GitHub repo settings +- [x] TAURI_SIGNING_PRIVATE_KEY secret set in GitHub repo settings via `gh secret set` --- -## Phase 7: Agent Teams / Subagent Support [status: in progress] — Post-MVP +## Phase 7: Agent Teams / Subagent Support [status: complete] — Post-MVP - [x] Agent store parent/child hierarchy — parentSessionId, parentToolUseId, childSessionIds fields on AgentSession - [x] Agent store functions — findChildByToolUseId(), getChildSessions(), parent-aware createAgentSession() @@ -242,9 +242,9 @@ bterminal-v2/ - [x] AgentPane parent navigation — SUB badge + button to focus parent agent - [x] AgentPane children bar — clickable chips per child subagent with status colors (running/done/error) - [x] SessionList subagent icon — '↳' for subagent panes +- [x] Subagent cost aggregation — getTotalCost() recursive helper in agents.svelte.ts, total cost shown in parent pane done-bar +- [x] Dispatcher tests for subagent routing — 10 tests covering spawn, dedup, child message routing, init/cost forwarding, fallbacks (28 total dispatcher tests) - [ ] Test with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 -- [ ] Update dispatcher tests for subagent routing -- [ ] Subagent cost aggregation in parent pane ### System Requirements - Node.js 20+ (for Agent SDK sidecar) diff --git a/docs/progress.md b/docs/progress.md index 8329c4a..9ff9620 100644 --- a/docs/progress.md +++ b/docs/progress.md @@ -228,10 +228,32 @@ Build status: TypeScript 0 errors, Rust 0 errors (1 pre-existing warning), all t Design: No separate sidecar process per subagent. Parent's sidecar handles all; routing is purely frontend based on SDK's parentId field. +### Session: 2026-03-06 (continued) — Subagent Tests, Cost Aggregation, Signing Key + +#### Subagent Dispatcher Tests +- [x] 10 new tests in agent-dispatcher.test.ts for subagent routing: + - spawn subagent pane on Agent/Task tool_call + - skip non-subagent tool_calls (Read, etc.) + - deduplicate panes for same toolUseId + - reuse existing child session from findChildByToolUseId + - route messages with parentId to child pane + - route child init message (sets model, marks running) + - route child cost message (updates cost, marks done) + - fallback title when input has no prompt/name + - fallback group when parent pane not found +- [x] Total: 28 dispatcher tests (18 existing + 10 new), 114 vitest tests overall +- [x] New mocks added: mockCreateAgentSession, mockFindChildByToolUseId, mockAddPane, mockGetPanes, layout.svelte mock + +#### Subagent Cost Aggregation +- [x] getTotalCost(id) recursive helper in agents.svelte.ts — aggregates costUsd, inputTokens, outputTokens across parent + all children via childSessionIds +- [x] AgentPane done-bar: shows "(total: $X.XXXX)" in yellow when child sessions exist and total > parent cost +- [x] .total-cost CSS class: var(--ctp-yellow), 10px font-size + +#### TAURI_SIGNING_PRIVATE_KEY +- [x] Set via `gh secret set` on DexterFromLab/BTerminal GitHub repo + ### Next Steps -- [ ] Set TAURI_SIGNING_PRIVATE_KEY secret in GitHub repo settings - [ ] Deno sidecar: test with real claude CLI, benchmark startup time vs Node.js - [ ] E2E testing with Playwright/WebDriver (when display server available) - [ ] Multi-machine support (remote agents via WebSocket) - [ ] Test agent teams with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 -- [ ] Update dispatcher tests for new subagent routing logic diff --git a/docs/task_plan.md b/docs/task_plan.md index 63a51e9..b2068d3 100644 --- a/docs/task_plan.md +++ b/docs/task_plan.md @@ -3,7 +3,7 @@ ## Goal Redesign BTerminal from a GTK3 terminal emulator into a **multi-session Claude agent dashboard** optimized for 32:9 ultrawide (5120x1440). Simultaneous visibility of all active sessions, agent tree visualization, inline markdown rendering, maximum information density. -## Status: Phases 1-6 Complete + Phase 7 (Agent Teams) in progress — Rev 4 +## Status: Phases 1-7 Complete — Rev 4 ---