Go to file
Ripley 461ccbcb88 feat: add dashboard data processing + WebSocket agent events (Phase 2 complete)
Dashboard Data Processing (data_processing.py):
- ModelName() — maps raw provider/model strings to display names
- BuildDailyChart() — aggregates cost/token/call data into daily chart buckets
- BuildAlerts() — evaluates cost, cron, context, gateway, memory alert conditions
- BuildCostBreakdown() — ranks models by cost descending
- FmtTokens() — formats token counts (1.2M, 1.5K, etc.)
- round2(), sum_bucket_costs(), TitleCase() — utility functions
- All pure Python, no I/O or RPC — transforms data from DB

WebSocket Agent Events (ws.py + event_parser.py):
- WebSocket endpoint at /ws/agents for real-time agent event broadcasting
- On connect: sends last 50 session events as initial state
- Background task polls SessionEvent table every 2s for new events
- Parses events into dashboard format (agentStatus, agentToolStart, etc.)
- broadcast_event() for other services to push events in real-time
- Lifespan integration: start/stop broadcast task with app startup/shutdown

Fixed in Ripley review:
- Removed duplicate method definitions in WebSocketConnectionManager
- Fixed broken import in main.py (dangling tuple)
- Removed inline import re in event_parser.py (already at module level)
- Fixed duplicate memory_search/memory_get entries in format_tool_status
- Used asyncio.get_running_loop() instead of deprecated get_event_loop()
- Cleaned up broadcast_to_all with proper broken connection cleanup
2026-05-10 21:01:38 -05:00
src feat: add dashboard data processing + WebSocket agent events (Phase 2 complete) 2026-05-10 21:01:38 -05:00
.dockerignore feat: initial project setup - base platform forked and running 2026-05-10 11:14:55 -05:00
.gitignore feat: initial project setup - base platform forked and running 2026-05-10 11:14:55 -05:00
DEVELOPMENT_LOG.md docs: update DEVELOPMENT_LOG for v0.0.4 collector work 2026-05-10 20:16:42 -05:00
FUTURE.md docs: update FUTURE.md and MEMORY.md for monitoring API endpoints 2026-05-10 20:45:23 -05:00
HISTORY.md docs: update VERSION, HISTORY, FUTURE for v0.0.4 — gateway collector complete 2026-05-10 20:15:31 -05:00
PROJECT.md feat: initial project setup - base platform forked and running 2026-05-10 11:14:55 -05:00
STRUCTURE.md docs: update STRUCTURE.md with full agent structure, pipeline, dispatch protocol 2026-05-10 18:14:26 -05:00
VERSION.md docs: update VERSION, HISTORY, FUTURE for v0.0.4 — gateway collector complete 2026-05-10 20:15:31 -05:00
compose.yml feat: initial project setup - base platform forked and running 2026-05-10 11:14:55 -05:00