feat(cli): prefill hosted agent claim - #818
Merged
Merged
Conversation
|
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 |
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.
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-typesbunx 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.tsgit diff --checkNote
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 claimflow 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
agentClaimHandoffUrlhelper builds that URL from the API’sclaimUrlandclaimCodewithout mutating the claim object. JSON output is unchanged—still the same three-fieldAgentClaimfromstartAgentClaim; only the human-facing “Claim page” line andopenBrowsertarget 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.