Add agent status tracking (status, status_updated_at)
Done
Subtask
High
Description
Add `status` and `status_updated_at` columns to the agents table so agents can report their availability state.
## Changes Required
1. **Migration:** Add columns to agents table
- `status` integer, default: 0 (idle)
- `status_updated_at` datetime
2. **Model updates:**
- Add `enum status: { idle: 0, busy: 1 }`
- Add scope `idle`
- Add scope `busy`
- Add instance method `idle_for?(duration)` - returns true if status is idle and status_updated_at is older than duration
3. **No React Callbacks:** AgentChannel does NOT update status on connect/disconnect (WebSocket is transient)
## Deliverable
Agents can track and report their own state via MCP tools (separate task).
## Parent Epic
#62 - Autonomous Agent Coordination via WebSocket
Ticket Stats
Status:
Done
Priority:
High
Type:
Subtask
Comments
0 commentsAdd a Comment
No Subtasks Yet
Break down this ticket into smaller, manageable subtasks