feat: add 'hf agent status' wrapper #5

Merged
hzhang merged 1 commits from feat/agent-status-cli into main 2026-05-22 18:08:57 +00:00
Contributor

plan-schedule workflow needs to report runtime status at the end of planning (idle / busy / on_call / exhausted / offline), but the cli had no wrapper for POST /calendar/agent/status — workflows resorted to inline curl mid-procedure.

Adds hf agent status --set <status> [--reason <rate_limit|billing>] [--recovery-at <iso>]. Reads AGENT_ID from env (same as the openclaw plugin convention), falls back to hostname() for CLAW_IDENTIFIER when unset. Refuses without AGENT_ID since the endpoint only makes sense from a pcexec/agent runtime context.

Surface entry added so hf --help lists it.

🤖 Generated with Claude Code

`plan-schedule` workflow needs to report runtime status at the end of planning (idle / busy / on_call / exhausted / offline), but the cli had no wrapper for `POST /calendar/agent/status` — workflows resorted to inline `curl` mid-procedure. Adds `hf agent status --set <status> [--reason <rate_limit|billing>] [--recovery-at <iso>]`. Reads `AGENT_ID` from env (same as the openclaw plugin convention), falls back to `hostname()` for `CLAW_IDENTIFIER` when unset. Refuses without `AGENT_ID` since the endpoint only makes sense from a pcexec/agent runtime context. Surface entry added so `hf --help` lists it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
hzhang added 1 commit 2026-05-22 18:08:52 +00:00
The plan-schedule workflow needs to report agent runtime status
(idle/busy/on_call/exhausted/offline) at the end of planning, but the
cli had no wrapper for this — workflows were dropping inline curl in
the middle of their procedure to hit the backend.

This adds 'hf agent status --set <status> [--reason ...] [--recovery-at ...]'.
The endpoint identifies the agent purely from X-Agent-ID + X-Claw-Identifier
headers (no token), so the cli reads AGENT_ID from env and falls back
to hostname() for CLAW_IDENTIFIER if it isn't set — same convention
the openclaw plugin uses. Refuses to send if AGENT_ID env is missing,
since this only makes sense from a pcexec/agent runtime context.

Surface entry added so 'hf --help' lists it.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
hzhang merged commit e99b12ef08 into main 2026-05-22 18:08:57 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: zhi/HarborForge.Cli#5