Repository navigation
studio-agent: connect your own NEAR AI account, wallet sign-in or pasted key - #267
Merged
Merged
Conversation
…ted key The agent can now run on the user's own credits and talk to NEAR AI directly from the browser. A wallet sign-in only yields a session and inference accepts API keys only, so the session creates one capped, expiring key and is revoked. Fixes found on the way: - a user key on the deployed site was ignored and routed through the proxy - the session pass was attached to requests going directly to NEAR AI - a 402 on the user's own account cleared the pass and offered to sell one - /pay kept COOP in production, because Pages redirects /pay.html to /pay Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploying webassemblymusic with
|
| Latest commit: |
a6228dc
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1f6a13f0.webassemblymusic.pages.dev |
| Branch Preview URL: | https://nearai-own-account.webassemblymusic.pages.dev |
NEAR AI answers 409 to a second key with the same name in a workspace, so a fixed name broke every sign-in after the first. That included reconnecting in the same browser, since the old key is only deleted after the new one exists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Offering a sign-in to someone already connected read as if they were not. They stay available behind "Use a different account". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <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.
Users can now run the studio agent on their own NEAR AI account, from a new NEAR AI account button in the agent panel. Requests go straight from the browser to NEAR AI, because its CORS settings now allow our site. The existing proxy and session pass stay as they are.
What's new
nearai-connect.html): opens from the panel button or/nearai connect, on its own page because the app's COOP header breaks wallet popups.Keys stay in
localStorageand never reach the OPFS repo.Bugs fixed
/nearai <key>silently used our key./paykept COOP in production, because Pages redirects/pay.htmlto/payand only the.htmlURL was exempt. This could break popup wallets. It's outside the panel work, so drop it if you'd rather ship it separately.Testing
Passing
pages.devpreview and on localhost, with a funded account: connected, and real agent turns ran. Signing in twice no longer hits the duplicate key name.Not tested
/payCOOP header fix hasn't been checked on a deployment.Seen once, unexplained
waitForAppReadyboot wait. They passed on rerun and in CI.Risks
/v1/auth/nearisn't in NEAR AI's API spec, and key management is marked as moving tocloud-platform, which doesn't allow our site today. Pasted keys don't use key management, though their check call is also marked as moving, and they're saved even if that check can't answer.cloud.near.aior until it expires.Related, not in this PR
Our proxy serves users on our key, and the repo has no End User Agreement, which NEAR AI's terms require (§6.1(b), §7.7).
🤖 Generated with Claude Code