feat(cli): add 'hf agent status' wrapper for POST /calendar/agent/status
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>
This commit is contained in:
@@ -29,6 +29,13 @@ func CommandSurface() []Group {
|
||||
{Name: "version", Description: "Show CLI version", Permitted: true},
|
||||
{Name: "health", Description: "Check API health", Permitted: true},
|
||||
{Name: "config", Description: "View and manage CLI configuration", Permitted: true},
|
||||
{
|
||||
Name: "agent",
|
||||
Description: "Runtime status reporting for the calling agent (uses AGENT_ID/CLAW_IDENTIFIER env)",
|
||||
SubCommands: []Command{
|
||||
{Name: "status", Description: "Report runtime status: hf agent status --set <idle|busy|on_call|exhausted|offline>", Permitted: true},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "user",
|
||||
Description: "Manage users",
|
||||
|
||||
Reference in New Issue
Block a user