feat: add orchestrator observability to Mission Control

Add real-time visibility into the parallel orchestrator's decisions
and state in the Mission Control UI. The orchestrator now has its
own avatar ("Maestro") and displays capacity/queue information.

Backend changes (server/websocket.py):
- Add OrchestratorTracker class that parses orchestrator stdout
- Define regex patterns for key orchestrator events (spawn, complete, capacity)
- Track coding/testing agent counts, ready queue, blocked features
- Emit orchestrator_update WebSocket messages
- Reset tracker state when agent stops or crashes

Frontend changes:
- Add OrchestratorState, OrchestratorStatus, OrchestratorEvent types
- Add WSOrchestratorUpdateMessage to WSMessage union
- Handle orchestrator_update in useWebSocket hook
- Create OrchestratorAvatar component (Maestro - robot conductor)
- Create OrchestratorStatusCard with capacity badges and event ticker
- Update AgentMissionControl to show orchestrator above agent cards
- Add conducting/baton-tap CSS animations for Maestro

The orchestrator status card shows:
- Maestro avatar with state-based animations
- Current orchestrator state and message
- Coding agents, testing agents, ready queue badges
- Blocked features count (when > 0)
- Collapsible recent events list

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Auto
2026-01-23 13:02:36 +02:00
parent b21d2e3adc
commit a03d945fcd
8 changed files with 751 additions and 31 deletions

View File

@@ -206,8 +206,39 @@ export interface ActiveAgent {
logs?: AgentLogEntry[] // Per-agent log history
}
// Orchestrator state for Mission Control
export type OrchestratorState =
| 'idle'
| 'initializing'
| 'scheduling'
| 'spawning'
| 'monitoring'
| 'complete'
// Orchestrator event for recent activity
export interface OrchestratorEvent {
eventType: string
message: string
timestamp: string
featureId?: number
featureName?: string
}
// Orchestrator status for Mission Control
export interface OrchestratorStatus {
state: OrchestratorState
message: string
codingAgents: number
testingAgents: number
maxConcurrency: number
readyCount: number
blockedCount: number
timestamp: string
recentEvents: OrchestratorEvent[]
}
// WebSocket message types
export type WSMessageType = 'progress' | 'feature_update' | 'log' | 'agent_status' | 'pong' | 'dev_log' | 'dev_server_status' | 'agent_update'
export type WSMessageType = 'progress' | 'feature_update' | 'log' | 'agent_status' | 'pong' | 'dev_log' | 'dev_server_status' | 'agent_update' | 'orchestrator_update'
export interface WSProgressMessage {
type: 'progress'
@@ -265,6 +296,21 @@ export interface WSDevServerStatusMessage {
url: string | null
}
export interface WSOrchestratorUpdateMessage {
type: 'orchestrator_update'
eventType: string
state: OrchestratorState
message: string
timestamp: string
codingAgents?: number
testingAgents?: number
maxConcurrency?: number
readyCount?: number
blockedCount?: number
featureId?: number
featureName?: string
}
export type WSMessage =
| WSProgressMessage
| WSFeatureUpdateMessage
@@ -274,6 +320,7 @@ export type WSMessage =
| WSPongMessage
| WSDevLogMessage
| WSDevServerStatusMessage
| WSOrchestratorUpdateMessage
// ============================================================================
// Spec Chat Types