feat(agents): add roster + presence subcommands (cueapi #630 + #662 parity)#45
Open
mikemolinet wants to merge 1 commit intomainfrom
Open
feat(agents): add roster + presence subcommands (cueapi #630 + #662 parity)#45mikemolinet wants to merge 1 commit intomainfrom
mikemolinet wants to merge 1 commit intomainfrom
Conversation
…arity)
Adds two new agents subcommands wrapping the Agent Directory v0/v1
read-side endpoints:
cueapi agents roster [--if-none-match <etag>]
GET /v1/agents/roster (cueapi #630). Returns the user's agent
directory with presence blocks. ETag-aware: pass --if-none-match
to cheap-poll without re-fetching the payload when the directory
hasn't shifted (server returns 304 Not Modified).
cueapi agents presence <ref>
GET /v1/agents/{ref}/presence (cueapi #662). Cheap-poll variant
for a single agent — lighter than `agents get`, returns just the
presence-relevant fields (online, derived_status, bucketed_seen,
default_live, labeled_sessions, etag).
3 new help-shape tests:
- test_agents_roster_help (pins --if-none-match flag in help)
- test_agents_presence_help
- test_agents_presence_requires_ref (missing ref → non-zero exit)
186/186 tests pass (was 183).
Source: drift audit handoff/cueapi-package-drift-2026-05-06; Backlog
rows "Parity port: PR #630 → cueapi-cli" + "Parity port: PR #662 →
cueapi-cli". cueapi-main confirmed cueapi-cli lane mine
([CC-CUEAPI-CLI-LANE-OPTION-B-YOURS]).
Related ports same-day:
- cueapi-python PR #35 (agents.roster + agents.presence)
- cueapi-mcp PR #30 (4 read-only directory tools)
- cueapi-action commands tracked in Backlog (depends on this CLI port
for upstream support — Action wraps cueapi-cli).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two new
cueapi agentssubcommands wrapping the Agent Directory v0/v1 read-side endpoints.cueapi agents roster [--if-none-match ETAG]GET /v1/agents/rostercueapi agents presence <ref>GET /v1/agents/{ref}/presenceBehavior
agents roster: returns the user's agent directory with presence blocks for each agent (online/offline, derived_status, bucketed_seen, etag). ETag-aware via--if-none-match— server returns 304 Not Modified when the directory hasn't shifted, CLI prints "Not modified" message and exits cleanly so the caller can reuse cached data.agents presence <ref>: cheap-poll variant for a single agent. Lighter thanagents get <ref>— returns just the presence-relevant fields (online, derived_status, bucketed_seen, default_live cue, labeled_sessions count, etag) without the full agent record. Designed for tools that refresh a single agent's status frequently.Tests
3 new help-shape tests in
tests/test_cli.py:test_agents_roster_help— pins--if-none-matchflag in helptest_agents_presence_help— verifies subcommand registerstest_agents_presence_requires_ref— missing ref → non-zero exit186/186 tests pass.
Source
Drift audit
handoff/cueapi-package-drift-2026-05-06. Backlog rows:cueapi-main confirmed cueapi-cli lane mine via
[CC-CUEAPI-CLI-LANE-OPTION-B-YOURS].Related
agents.roster()+agents.presence())agents-roster/agents-presenceAction commands (currently tracked in Backlog as upstream-bounded — Action wraps cueapi-cli)🤖 Generated with Claude Code