Skip to content

feat(cli): prefill hosted agent claim - #818

Merged
Aymericr merged 1 commit into
mainfrom
feat/agent-claim-deep-link
Sep 10, 2026
Merged

feat(cli): prefill hosted agent claim#818
Aymericr merged 1 commit into
mainfrom
feat/agent-claim-deep-link

Conversation

@Aymericr

@Aymericr Aymericr commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

The hosted claim page already accepts ?code=, but the CLI opened the bare page and made the human copy the code manually. This change opens and prints the prefilled handoff URL while preserving the existing three-field JSON contract and the short claim code as a fallback.

Validation:

  • bun test packages/cli/src/agent-account.test.ts packages/cli/src/cli.test.ts (27 tests, 90 assertions)
  • bun run --cwd packages/cli check-types
  • bunx biome check packages/cli/src/agent-account.ts packages/cli/src/agent-account.test.ts packages/cli/src/bin/pascal.ts packages/cli/src/cli.test.ts
  • git diff --check

Note

Low Risk
CLI UX-only change; claim API contract and JSON shape are preserved, with no changes to auth or credential handling.

Overview
The pascal agent claim flow now opens the browser and prints a prefilled claim URL (?code=<claimCode>) instead of the bare hosted page, so users do not have to copy the code manually.

A new agentClaimHandoffUrl helper builds that URL from the API’s claimUrl and claimCode without mutating the claim object. JSON output is unchanged—still the same three-field AgentClaim from startAgentClaim; only the human-facing “Claim page” line and openBrowser target use the handoff URL. The claim code line remains as a fallback.

Tests cover the URL builder and assert the CLI stdout includes the prefilled link.

Reviewed by Cursor Bugbot for commit de07aab. 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: 8f3a6721-822c-42bf-86c0-b7d4342d0777

@Aymericr
Aymericr merged commit 8ca0b79 into main Sep 10, 2026
3 checks 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