Skip to content

feat(cli): report hosted agent status - #821

Merged
Aymericr merged 1 commit into
mainfrom
feat/agent-status-cli
Sep 10, 2026
Merged

feat(cli): report hosted agent status#821
Aymericr merged 1 commit into
mainfrom
feat/agent-status-cli

Conversation

@Aymericr

@Aymericr Aymericr commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Adds pascal agent status [--json] so an agent can verify its hosted credential and observe claim state after the human handoff.

The command calls the fixed production status endpoint with redirects disabled, a 15-second timeout, and a 32 KiB response cap. It returns only the versioned agent ID, mode, claim state, and organization-scope flag; server-controlled descriptive fields and response bodies are not printed.

Validation:

  • bun run check-types in packages/cli
  • bun test src in packages/cli (64 tests, 187 assertions)
  • Biome on changed source and tests
  • git diff --check

Note

Low Risk
Read-only hosted credential check that reuses the existing claim client’s secret-handling patterns; no local editor or project access changes.

Overview
Adds pascal agent status [--json] so hosted agents can confirm PASCAL_API_KEY is valid and see claim state without starting a claim flow.

getAgentStatus in agent-account.ts calls GET /api/auth/agent/status with the same guardrails as claim: bearer auth, redirect: 'error', 15s timeout, 32 KiB response cap, and strict parsing that returns only schemaVersion, agentId, mode, claimed, and organizationScoped (extra server fields and secrets are dropped). Shared JSON reading is refactored so claim and status reuse one bounded reader with operation-specific errors.

The CLI prints human-readable lines (with a nudge to run pascal agent claim when autonomous and unclaimed) or JSON via --json. README and help text document the command; unit and integration tests cover success, HTTP errors, malformed/oversized bodies, and terminal-safe output.

Reviewed by Cursor Bugbot for commit 0080060. Bugbot is set up for automated code reviews on this repo. Configure here.

@pascal

pascal Bot commented Sep 10, 2026

Copy link
Copy Markdown

I hit an error while handling your request (Model unavailable on AI Gateway free tier: Free tier users do not have access to this model. Upgrade to paid credits at https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%3Fmodal%3Dtop-up for unrestricted…).

Please try again, rephrase, or reach out if it keeps failing.

Error id: c8662db1-46ad-4469-9fd1-7dbf655335aa

@Aymericr
Aymericr merged commit 5dabbc3 into main Sep 10, 2026
3 checks passed
@Aymericr
Aymericr deleted the feat/agent-status-cli branch September 10, 2026 05:18
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