feat: add real-time subagent visibility - monitor Claude Code background agents

- Add SubagentWatcher service that discovers and tails Claude Code's subagent
  transcript files (~/.claude/projects/.../subagents/agent-*.jsonl)
- Track tool calls, progress events, and messages in real-time via file watching
- Add SSE events for subagent:discovered, subagent:tool_call, subagent:progress,
  subagent:message, subagent:completed
- Add REST API endpoints: GET /api/subagents, /api/subagents/:id,
  /api/subagents/:id/transcript
- Add subagent panel in Monitor section showing active agents and their activity
- Add floating draggable windows that auto-open for each active agent
- Add standalone CLI tool: scripts/watch-subagents.ts for terminal monitoring

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-01-25 14:33:12 +01:00
co-authored by Claude Opus 4.5
parent 4c34966827
commit ad24020cdc
6 changed files with 1907 additions and 0 deletions
+16
View File
@@ -272,6 +272,22 @@
<div class="monitor-section-body" id="backgroundTasksBody">
</div>
</div>
<div class="monitor-section" id="subagentSection">
<div class="monitor-section-header">
<span>Subagents</span>
<span class="subagent-badge" id="subagentBadge" style="display: none;"></span>
</div>
<div class="monitor-section-body">
<div class="subagent-container">
<div class="subagent-list" id="subagentList">
<div class="subagent-empty">No background agents detected</div>
</div>
<div class="subagent-detail" id="subagentDetail">
<div class="subagent-empty">Select an agent to view details</div>
</div>
</div>
</div>
</div>
</div>
</div>