Skip to content

feat: logout, machines, agents --all, run agent@machine#52

Merged
vreshch merged 1 commit intomasterfrom
feature/phase-4-cli-commands
Mar 21, 2026
Merged

feat: logout, machines, agents --all, run agent@machine#52
vreshch merged 1 commit intomasterfrom
feature/phase-4-cli-commands

Conversation

@vreshch
Copy link
Contributor

@vreshch vreshch commented Mar 21, 2026

Summary

Final CLI commands for hub integration — complete multi-machine experience.

  • Logout: agentage logout — deregisters from hub (best-effort), deletes auth.json, daemon continues standalone
  • Machines: agentage machines — lists machines from hub with name, platform, status, last seen. --json flag. Returns 401 when not logged in.
  • Agents --all: agentage agents --all — queries hub for aggregated agents across all machines. Shows machine name + status columns. Falls back to local-only without --all.
  • Run agent@machine: agentage run deploy@server-1 "deploy staging" — parses agent@machine syntax, resolves machine name to ID, creates remote run via hub, polls for events (~1s latency, MVP approach). Plain agentage run hello "hi" still runs locally.
  • Hub proxy routes: GET /api/hub/runs/:id, GET /api/hub/runs/:id/events?after= for remote run event polling
  • Hub client: added getRun, getRunEvents methods
  • 131 tests passing

User experience after this PR

$ agentage login --hub https://dev.agentage.io
✓ Logged in as volodymyr@example.com

$ agentage machines
NAME         PLATFORM   STATUS    LAST SEEN
laptop       linux      online    just now
server-1     linux      online    12s ago

$ agentage agents --all
NAME         MACHINE      DESCRIPTION        STATUS
hello        laptop       Greets you         online
deploy       server-1     Deploy to staging  online

$ agentage run deploy@server-1 "deploy staging"
Running deploy on server-1...
Deploying to staging... done.

$ agentage logout
Disconnected from hub. Machine deregistered.

Test plan

  • npm run verify passes (type-check + lint + format + 131 tests + build)
  • Review agent@machine parsing and remote run flow
  • Review logout deregistration flow
  • Review hub proxy routes for run events

- Logout command: deregisters from hub, deletes auth.json, daemon
  continues standalone
- Machines command: lists machines from hub with name, platform,
  status, last seen. --json flag. 401 when not logged in.
- Agents --all: queries hub for aggregated agents across all machines,
  shows machine name + status columns
- Run agent@machine: parses agent@machine syntax, resolves machine
  name to ID via hub, creates remote run, polls hub for events
  (MVP polling approach, ~1s latency)
- Hub proxy routes: added GET /api/hub/runs/:id and
  GET /api/hub/runs/:id/events for remote run polling
- Hub client: added getRun, getRunEvents methods
- 131 tests passing
@github-actions
Copy link

🎉 PR Validation ✅ PASSED

Commit: 40eb0dcca1b17b7d6ec27eb1b2d6e107b2430a2e
Branch: feature/phase-4-cli-commands

Checks:

  • ✅ Dependencies installed
  • ✅ Type check passed
  • ✅ Linting passed
  • ✅ Format check passed
  • ✅ Tests passed
  • ✅ Build successful

Ready to merge!


🔗 View workflow run
⏰ Generated at: 2026-03-21T12:33:15.911Z

@vreshch vreshch merged commit 6fc0c63 into master Mar 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant