feat: GET /agent/status + idempotent POST same-state #22
Reference in New Issue
Block a user
Delete Branch "feat/get-agent-status"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two-in-one cleanup for the calendar agent-status endpoint:
NEW GET
/calendar/agent/status— read-only status query, no side effects. Used by Fabric.OpenclawPlugin's triage on_call gate so it can check whether the on-duty agent is currentlyon_callwithout flipping their state. Returns{agent_id, status}or 404. Previously the only verb was POST (for transitions), so plugin'sgetAgentStatusGET silently 405'd in HF.OpenclawPlugin too.POST
/agent/statussame-state → 200 no_change=true + state-machine violations → 409 with the real error message instead of 500. Was 500 onbusy → busybecause_assert_current(IDLE)raisedAgentStatusErrorwhich wasn't caught.Verified in sim: idempotent same-state returns
{ok, no_change:true}HTTP 200; bad transition returns{detail:"Agent X is on_call; expected one of [idle]"}HTTP 409.🤖 Generated with Claude Code
Previously only POST /agent/status existed (for state transitions). Fabric.OpenclawPlugin's triage on-call gate needs to check whether the on-duty agent is currently on_call without flipping their state — so the wake decision is read-only. GET returns {agent_id, status}, 404 if unknown. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>