feat: default agent-relay on to production cloud endpoints#667
Merged
Conversation
Point --port-auth and --port-file at production by default: - auth: https://agentrelay.dev (cloud web app workspace API) - file: https://api.relayfile.dev (relayfile worker) Override via RELAY_AUTH_URL / RELAY_FILE_URL env vars, or pass a local port number (e.g. --port-auth 8787) for local dev. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ints When --port-auth points to a remote URL (not localhost), read stored cloud credentials and send Authorization header. If not logged in, triggers the browser OAuth flow via ensureAuthenticated. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The postWorkspaceApi function now includes cloud auth (readStoredAuth/ensureAuthenticated) for remote URLs. Tests using non-localhost authBase were timing out because ensureAuthenticated tries to open a browser. Mock @agent-relay/cloud to provide a test token instead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…fresh Addresses Devin review comment — expired tokens were used without refresh because readStoredAuth bypassed the refresh/re-login logic. Now postWorkspaceApi calls ensureAuthenticated unconditionally for remote endpoints, matching the established pattern in cloud.ts. Co-Authored-By: Claude Opus 4.6 (1M context) <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.
Summary
--port-authtohttps://agentrelay.dev(cloud web app workspace API)--port-filetohttps://api.relayfile.dev(relayfile worker)RELAY_AUTH_URL/RELAY_FILE_URLenv vars--port-auth 8787 --port-file 8080Test plan
agent-relay on claudeconnects to production endpointsagent-relay on claude --port-auth 8787 --port-file 8080still works for local devRELAY_AUTH_URL=http://localhost:8787 agent-relay on claudeoverrides default🤖 Generated with Claude Code