Mission-Control/FUTURE.md

213 lines
6.7 KiB
Markdown

# Mission Control — Future Improvements
**This document tracks potential future enhancements for Mission Control.**
**Last Updated:** 2026-05-10
**Current Version:** v0.0.2
## How to Use This Document
This file is a living document. Agents should:
1. Read this file before proposing changes
2. Add new recommendations with priority levels
3. Never add completed items — move those to HISTORY.md instead
4. Reference this file when dispatching improvement tasks
5. Only Ripley can remove items from this list.
### Priority Format
All items must include the priority emoji in their heading, matching the section they belong to:
| Priority | Emoji | Heading Format |
|----------|-------|---------------|
| CRITICAL | 🔴 | `### 🔴 Title — CRITICAL` |
| HIGH | 🟠 | `### 🟠 Title — HIGH` |
| MEDIUM | 🟡 | `### 💡 Title — MEDIUM` |
| LOW | 🔵 | `### 🔵 Title — LOW` |
| NICE TO HAVE | 💭 | `### 💭 Title — NICE TO HAVE` |
Items are grouped under their priority section heading (`## 🔴 CRITICAL`, `## 🟠 HIGH`, etc.) and sorted most-impactful-first within each tier.
---
## Pending Recommendations
### 🟠 HIGH
### 🟠 Gateway Data Collection Service — HIGH
**Priority:** HIGH
**Status:** PENDING
**Added:** 2026-05-10 by Ripley
**Description:**
Port the dashboard's Go data collection (`refresh.go`, `refresh_sessions.go`, `refresh_tokens.go`, etc.) to Python services that poll the OpenClaw gateway.
**Implementation Notes:**
- Create `app/services/monitoring/gateway_collector.py`
- Reuse existing `gateway_rpc.py` for all RPC calls
- Poll: usage.cost, usage.status, cron.list/status, sessions.list/preview, agents.list, health, status
- Run as background asyncio task with configurable intervals
- Store collected data in new PostgreSQL models
### 🟠 Monitoring Database Models — HIGH
**Priority:** HIGH
**Status:** PENDING
**Added:** 2026-05-10 by Ripley
**Description:**
Create new PostgreSQL models for tracking data (cost, sessions, crons, system health, alerts).
**Implementation Notes:**
- CostSnapshot, CronJobStatus, SessionEvent, SubAgentRun, SystemHealthMetric, AlertRule
- Alembic migration for all new tables
- CRUD API endpoints under `/api/monitoring/`
### 🟠 WebSocket for Agent Events — HIGH
**Priority:** HIGH
**Status:** PENDING
**Added:** 2026-05-10 by Ripley
**Description:**
Add FastAPI WebSocket endpoint for real-time agent event broadcasting, porting the JSONL session watcher from pixel-agents.
**Implementation Notes:**
- Port `sessionWatcher.ts` logic to Python
- Watch `~/.openclaw/agents/*/sessions/*.jsonl`
- Parse events and broadcast via WebSocket
- Front-end client in `agent-events.ts`
---
### 🟡 MEDIUM
### 🟡 Cost Tracking UI — MEDIUM
**Priority:** MEDIUM
**Status:** PENDING
**Added:** 2026-05-10 by Ripley
**Description:**
Port the dashboard's cost cards, donut charts, and trend lines to React/Recharts components.
**Implementation Notes:**
- Today's cost, all-time cost, projected monthly
- Per-model cost breakdown (7d/30d/all-time tabs)
- Cost trend line chart (SVG → Recharts)
- Theme-aware styling
### 🟡 Session & Sub-Agent UI — MEDIUM
**Priority:** MEDIUM
**Status:** PENDING
**Added:** 2026-05-10 by Ripley
**Description:**
Active sessions with model, type badges, context % bars, sub-agent activity grid.
**Implementation Notes:**
- Session list with filtering (model, type, status)
- Context % bars, token counts
- Sub-agent activity grid with cost/duration/status
- Session detail panel with conversation preview
### 🟡 Cron Job Management — MEDIUM
**Priority:** MEDIUM
**Status:** PENDING
**Added:** 2026-05-10 by Ripley
**Description:**
Cron job list with schedule, status, run history. Trigger manual runs from UI.
**Implementation Notes:**
- List, add, edit, delete cron jobs via gateway RPC
- Run history with duration and status badges
- Manual trigger button
- Uses existing `cron.*` gateway RPC methods
### 🟡 System Health Dashboard — MEDIUM
**Priority:** MEDIUM
**Status:** PENDING
**Added:** 2026-05-10 by Ripley
**Description:**
Gateway status, CPU/RAM/disk gauges, alert banners with configurable thresholds.
**Implementation Notes:**
- Gateway uptime, PID, memory, compaction status
- CPU/RAM/swap/disk gauge cards
- Alert banner for high cost, failed crons, gateway offline
- Auto-refresh with countdown timer
---
### 🔵 LOW
### 🔵 AI Chat Panel — LOW
**Priority:** LOW
**Status:** PENDING
**Added:** 2026-05-10 by Ripley
**Description:**
Port the dashboard's AI chat to a React component that uses OpenClaw gateway's `/v1/chat/completions`.
**Implementation Notes:**
- Context-aware: feed live monitoring data into system prompt
- Persistent chat history per user
- Streaming responses
### 🔵 Theme System Merge — LOW
**Priority:** LOW
**Status:** PENDING
**Added:** 2026-05-10 by Ripley
**Description:**
Port the 6 dashboard themes into Mission Control's Tailwind config.
**Implementation Notes:**
- Map dashboard's 19 CSS color variables to Tailwind config
- Theme picker in header (persists via localStorage)
- Glass morphism effects where appropriate
### 🔵 Engineering Reference Manual — LOW
**Priority:** LOW
**Status:** PENDING — Requires explicit user initiation
**Added:** 2026-05-10 by Ripley
**Description:**
Comprehensive engineering reference manual documenting the full system architecture, API endpoints, data models, frontend pages/components, and infrastructure.
**Implementation Notes:**
- ⚠️ This task requires explicit initiation by the user. Do not create the Engineering Reference Manual unless specifically asked.
- Should document: system architecture, tech stack, all API endpoints, data models, frontend structure, Docker setup, auth flows
- Bishop would own this task when initiated
---
### 💭 NICE TO HAVE
### 💭 Pixel Agent Canvas — NICE TO HAVE
**Priority:** NICE TO HAVE
**Status:** PENDING
**Added:** 2026-05-10 by Ripley
**Description:**
Port the pixel-art office scene with agent sprites, activity bubbles, and day/night cycle to React Canvas.
**Implementation Notes:**
- Use `useRef` + `requestAnimationFrame` for animation, not React state
- Agent sprites with activity state (working, idle, talking)
- Activity bubbles showing current task/conversation
- Conversation heat glow based on recent activity
- Pan/zoom controls (touch + mouse)
### 💭 Hardware Monitor & Service Controls — NICE TO HAVE
**Priority:** NICE TO HAVE
**Status:** PENDING
**Added:** 2026-05-10 by Ripley
**Description:**
Server rack component for hardware gauges, breaker panel for gateway start/stop/restart.
**Implementation Notes:**
- CPU/GPU/RAM/disk/network gauges
- Gateway start/stop/restart controls
- Update checker (ham radio component)
- All via gateway RPC methods