-
Notifications
You must be signed in to change notification settings - Fork 0
feat: department health, provider status, and activity feed endpoints #773
Copy link
Copy link
Closed
Labels
prio:highImportant, should be prioritizedImportant, should be prioritizedscope:medium1-3 days of work1-3 days of workspec:apispec:architectureDESIGN_SPEC Section 15 - Technical ArchitectureDESIGN_SPEC Section 15 - Technical Architecturetype:featureNew feature implementationNew feature implementationv0.5Minor version v0.5Minor version v0.5v0.5.0Patch release v0.5.0Patch release v0.5.0
Description
Phase 3.3 -- Department Health, Provider Status, Activity Feed
Parent: #762
Context
The new dashboard needs department-level health aggregation, provider health status, and a REST-based activity feed (fallback for WebSocket).
Scope
GET /api/v1/departments/{dept_name}/health
- Response: agent_count, active_agent_count, utilization_percent, avg_performance_score, department_cost_7d, cost_trend, collaboration_score
- Data source: aggregate TaskMetricRecord + CollaborationScoreResult by department
Extend GET /api/v1/providers/{name}
- Add fields: health_status (enum: up/degraded/down), last_check_timestamp, avg_response_time_ms, error_rate_percent_24h, calls_last_24h
- Data source: new ProviderHealthRecord model tracking call outcomes + response times
GET /api/v1/activities (paginated)
- Query params: type (filter), agent_id (filter), last_n_hours (24/48/168)
- Response: paginated ActivityLogEntry with event_type, actor, action, target, timestamp, related_ids
- Data source: WebSocket event history + AgentLifecycleEvent + TaskMetricRecord events
- Purpose: REST fallback for non-WebSocket clients, also used for historical activity feeds
Deliverables
- Department health aggregation endpoint
- Extended provider response with health data
- Unified activity feed endpoint
- ProviderHealthRecord model and tracking
- Unit tests
- OpenAPI schema updated
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
prio:highImportant, should be prioritizedImportant, should be prioritizedscope:medium1-3 days of work1-3 days of workspec:apispec:architectureDESIGN_SPEC Section 15 - Technical ArchitectureDESIGN_SPEC Section 15 - Technical Architecturetype:featureNew feature implementationNew feature implementationv0.5Minor version v0.5Minor version v0.5v0.5.0Patch release v0.5.0Patch release v0.5.0