Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
dbc1983
docs: orchestration research corpus (files 01-11)
kqb May 5, 2026
a6343be
feat: PWA + mobile orchestrator with management UIs (gated by ORCHEST…
kqb May 5, 2026
4f6866d
docs: design — agent launcher with reusable profiles
kqb May 5, 2026
278a9c1
docs: implementation plan — agent launcher with reusable profiles
kqb May 5, 2026
a7718db
feat(launcher): ProfileConfig flag table, validator, argv builder
kqb May 6, 2026
c1fe261
fix(launcher): tighten profile-schema validation (json arrays, envVar…
kqb May 6, 2026
0739b9e
feat(launcher): newline-delimited JSON line parser
kqb May 6, 2026
2b85088
feat(launcher): expand spawner — flag mapping, stdin pipe, send-messa…
kqb May 6, 2026
186df15
fix(launcher): route uses new spawnAgent shape; remove dead buildArgs…
kqb May 6, 2026
953ae24
feat(launcher): secrets.env reader (names → values resolution)
kqb May 6, 2026
205f6d8
fix(launcher): only swallow ENOENT in secrets.env reader; tighten test
kqb May 6, 2026
be66e1a
feat(launcher): launcher_profiles, launcher_allowed_cwds, launcher_la…
kqb May 6, 2026
e7b84dd
feat(launcher): profiles CRUD library with export/import + duplicate
kqb May 6, 2026
5f6d55f
feat(launcher): cwd allowlist CRUD with path validation
kqb May 6, 2026
d4fb948
feat(launcher): launches audit log (env values never recorded)
kqb May 6, 2026
c42dbee
feat(launcher): /api/orchestrator/profiles route — CRUD + import/export
kqb May 6, 2026
069cdde
feat(launcher): /api/orchestrator/cwds route
kqb May 6, 2026
01f7f6a
feat(launcher): extend spawn route, add /agents/:id/message, mount pr…
kqb May 6, 2026
bf0fa50
feat(launcher): surface live orchestrator handle on session detail
kqb May 6, 2026
a7d5ace
feat(launcher): WSMessage agent_input_ack variant
kqb May 6, 2026
fda6b21
feat(launcher): client TS profile types + argv preview helper
kqb May 6, 2026
1c676a5
feat(launcher): useProfiles + useCwds hooks
kqb May 6, 2026
8954108
feat(launcher): CommandPreview — live argv panel with danger highlight
kqb May 6, 2026
62553f3
feat(launcher): ProfileEditor + 14 section components
kqb May 6, 2026
72d4fbd
fix(launcher): revert UI label paraphrasing; tighten editor tests via…
kqb May 6, 2026
679137a
feat(launcher): LauncherView page (form + command preview + actions)
kqb May 6, 2026
12136a6
feat(launcher): mount /launcher route + nav entry
kqb May 6, 2026
ada7250
feat(launcher): SettingsProfiles tab — list, edit, duplicate, import/…
kqb May 6, 2026
7eb9fc0
feat(launcher): useOrchestrator gains sendMessage + new SpawnArgs shape
kqb May 6, 2026
0086ff2
feat(launcher): SendComposer (live → message, historical → resume-spawn)
kqb May 6, 2026
14fbe0b
feat(launcher): mount SendComposer at bottom of Conversation tab
kqb May 6, 2026
ae6ca60
refactor(launcher): MobileChat reuses SendComposer
kqb May 6, 2026
5c32c84
docs: launcher.md
kqb May 6, 2026
ba53037
docs: cross-reference launcher in README, ARCHITECTURE, .env.example
kqb May 6, 2026
2c8d5de
docs: document ORCHESTRATOR_ENABLED + ORCHESTRATOR_MAX_CONCURRENT in …
kqb May 6, 2026
b3a647e
feat(launcher): wire LauncherView config + SendComposer mode prop
kqb May 6, 2026
67571e6
docs: design — Composer V2 (model + mode + slash + upload)
kqb May 6, 2026
a3086c3
docs: implementation plan — Composer V2
kqb May 6, 2026
9cd1827
feat(composer): uploads lib (per-cwd save/remove + gitignore)
kqb May 6, 2026
723b93c
feat(composer): uploads route (POST multipart + DELETE)
kqb May 6, 2026
6ab69c0
feat(composer): slash-commands lib (built-in + per-cwd)
kqb May 6, 2026
3c5ce20
feat(composer): /api/orchestrator/slash-commands route
kqb May 6, 2026
d80152b
feat(composer): spawner.respawnAgent (kill+spawn with WS notify)
kqb May 6, 2026
9a9fa79
feat(composer): orchestrator respawn route + agent_respawned WS variant
kqb May 6, 2026
936cac5
feat(composer): client types (Attachment, SlashCommand, ComposerProps)
kqb May 6, 2026
35593c7
feat(composer): useUploads hook (add/remove + error surface)
kqb May 6, 2026
f37564a
feat(composer): useSlashCommands hook (load + filter)
kqb May 6, 2026
dcb0d16
feat(composer): useComposerState hook (send/respawn/attachment merging)
kqb May 6, 2026
b22ea2f
feat(composer): Model/Mode/Profile pickers (leaf dropdowns)
kqb May 6, 2026
67ce579
feat(composer): UploadButtons (paperclip + photo capture)
kqb May 6, 2026
ca780c5
feat(composer): AttachmentBar (chips with remove)
kqb May 6, 2026
a5d98dd
feat(composer): SlashMenu (grouped autocomplete with filter)
kqb May 6, 2026
ffdcf2e
fix(composer): restore visible SlashMenu descriptions; tighten test s…
kqb May 6, 2026
8edf967
feat(composer): Toolbar + Textarea + Actions leaf components
kqb May 6, 2026
3487088
feat(composer): Composer orchestrator (toolbar + textarea + slash men…
kqb May 6, 2026
904aa76
refactor(composer): replace SendComposer with Composer; delete old files
kqb May 6, 2026
92f66a2
docs: Composer V2 — file uploads, slash menu, mid-session swap
kqb May 6, 2026
2c535c6
fix(composer): MUI dark theme + mobile tab-bar clearance
kqb May 6, 2026
e9c0e56
feat(composer): pre-populate pickers from session + visible cwd-allow…
kqb May 6, 2026
2ee97c0
fix(composer): mount uploads + slash-commands sub-routers under /api/…
kqb May 6, 2026
49c9fef
fix(composer): live updates via agent_stream + spawner stdin handoff
kqb May 7, 2026
b769171
feat(composer): unified live stream, optimistic states, context-capac…
kqb May 7, 2026
ab8679b
feat(composer): Claude Desktop parity — chip status bar + plus menu +…
kqb May 7, 2026
362942a
feat(routines): scheduled + on-demand + webhook agent runs
kqb May 7, 2026
0467d5c
feat(mobile): sync bottom-tab nav with desktop sidebar
kqb May 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# Claude Code home directory (default: ~/.claude)
# Override this if your Claude Code data is in a different location, e.g.:
# CLAUDE_HOME=~/.codefuse/engine/cc
# CLAUDE_HOME=~/.claude
# CLAUDE_HOME=~/.claude

# Local agent orchestrator — gates the Launcher feature (see docs/launcher.md).
# Without this flag, every /api/orchestrator/* route returns 404.
# ORCHESTRATOR_ENABLED=1
# ORCHESTRATOR_MAX_CONCURRENT=5

# Composer file upload max size in MB (default 25). Applies to the paperclip
# / photo pickers and drag-and-drop on the Conversation tab's send box.
# LAUNCHER_MAX_UPLOAD_MB=25
2 changes: 2 additions & 0 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Architectural overview and technical reference for the Agent Dashboard system, covering design goals, high-level architecture, data flow, server and client components, database design, WebSocket protocol, hook integration, MCP extension layer, Claude Code plugins & skills, state management, security considerations, performance characteristics, deployment modes, and technology choices.

> **Optional control plane (`ORCHESTRATOR_ENABLED=1`)** — the dashboard can also drive new `claude` sessions and continue existing ones. New routes under `/api/orchestrator/*` (profiles, cwds, spawn, agents, message) and three new SQLite tables (`launcher_profiles`, `launcher_allowed_cwds`, `launcher_launches`) become reachable. Default behavior (observe-only) is preserved when the flag is off — every new route 404s. Spawned `claude` processes fire hooks back into the same `POST /api/hooks/event` ingestion path, so the existing observability stack covers them automatically. See [`docs/launcher.md`](docs/launcher.md).

![Claude Code](https://img.shields.io/badge/Claude_Code-orange?style=flat-square&logo=claude&logoColor=white)
![Claude Code Plugins](https://img.shields.io/badge/Claude_Code-Plugins_&_Skills-orange?style=flat-square&logo=anthropic&logoColor=white)
![Node.js](https://img.shields.io/badge/Node.js-%3E%3D18-339933?style=flat-square&logo=node.js&logoColor=white)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ The dashboard offers a comprehensive set of features to monitor and analyze your
| **Notifications** | Full Web Push (VAPID) pipeline for reliable delivery. Arrive even when the tab is backgrounded or the browser is closed. Explicitly configured for macOS audio support. Configurable per-event toggles with subscription management |
| **Update Notifier** | Server periodically runs a non-blocking `git fetch` and compares the local checkout to `origin/master`/`origin/main`/`origin/HEAD`. When upstream is ahead, the UI surfaces a modal with the exact `git pull && npm run setup` command and a one-click **Copy** button; the Sidebar gets a persistent "Check for updates" button with live badge. The dashboard never pulls or restarts itself — the user runs the command in a terminal — so the mechanism cannot break dev sessions, pm2/systemd/Docker supervision, or leave orphaned processes |
| **Settings** | System info, hook status, model pricing management, notification preferences, data export, session cleanup. The Model Pricing section exposes an info popover (the `i` icon next to the title) explaining how rule lookup works (first matching pattern wins), the SQL-style `%` wildcard syntax with concrete examples (`claude-opus-4-7%`, `claude-%-haiku`, exact ids), and that prices must be updated manually when Anthropic publishes new rates — already-stored sessions keep the price applied at ingest time. The CLAUDE_HOME box and Import History panel are fully i18n-driven across en/vi/zh |
| **Agent Launcher** *(opt-in)* | UI-driven `claude` subprocess launcher with every session-launch CLI flag exposed (`--model`, `--effort`, `--permission-mode`, `--tools`, `--system-prompt`, `--mcp-config`, …) and saved as reusable **Profiles** (SQLite-backed, JSON export/import). Per-session **Send composer** at the bottom of the Conversation tab pipes follow-up turns to live agents (`POST /agents/:id/message`) and transparently runs `claude --resume <session-id>` for historical sessions. Cwd allowlist enforced server-side; concurrency cap (`ORCHESTRATOR_MAX_CONCURRENT`, default 5); env-var values resolved at spawn from `~/.claude/launcher/secrets.env` (gitignored) — names only stored in profiles and audit log. Gated by `ORCHESTRATOR_ENABLED=1`; full guide at [`docs/launcher.md`](docs/launcher.md) |
| **MCP Server (Local)** | Enterprise-grade local MCP server in `mcp/` with three transport modes (stdio, HTTP+SSE, interactive REPL), 25 typed tools across 6 domains, strict input schemas, retry/backoff, localhost-only API enforcement, and tiered mutation/destructive safety gates. HTTP mode serves Streamable HTTP (2025-11-25) and legacy SSE (2024-11-05) on configurable port. REPL mode provides tab-completed interactive tool invocation with colored output |
| **Workflows** | D3.js-powered visualization page with 11 interactive sections: agent orchestration DAG, tool execution Sankey diagram, collaboration network, subagent effectiveness (day-of-week sparklines with portal-rendered tooltips that escape the card's `overflow:hidden` and clamp to the viewport so they never get clipped), detected workflow patterns, model delegation flow, error propagation map (horizontal bars with rate badges, agent type breakdown, API/session error cards), concurrency timeline, session complexity scatter, compaction impact analysis, and per-session drill-in. **Rich, i18n-aware tooltips throughout:** every chart's section title carries an `i` icon that opens a structured "What this shows / How to read it / Why it matters" popover; hovering nodes, edges, bars, and bubbles surfaces multi-section tooltips with deterministic, value-dependent interpretations (e.g. share-of-source / share-of-target percentages, success-rate health buckets, family descriptions for Opus / Sonnet / Haiku, timing patterns like front-loaded / mid-session / back-loaded). Each of the six headline stat cards has a bottom-right info popover explaining how the metric is calculated and what its current value means in plain language. Tooltips are DOM-mutated through a single ref per chart with container-level `mouseleave` fallbacks, so they never lag behind the cursor or stick after re-render. Clicking a row in **Detected Workflow Patterns** expands an in-place detail panel with the full step sequence, stats grid, a deterministic narrative (loop detection, frequency bucket), and a practical suggestion. Status filter tabs (Active Only / Completed / All) filter all 11 sections. Cross-filtering, JSON export, and real-time WebSocket auto-refresh with 3-second debounce |
| **Compaction Tracking** | Detects `/compact` events from JSONL transcripts, creates compaction agents and events. Backfills legacy compactions on startup. A periodic scanner (cadence derived from `DASHBOARD_STALE_MINUTES`) catches compactions even when no hooks fire. Shares the transcript cache so no duplicate file reads occur |
Expand Down
Loading