Skip to content

feat: default agent-relay on to production cloud endpoints#667

Merged
khaliqgant merged 5 commits into
mainfrom
on-relay-prod
Mar 31, 2026
Merged

feat: default agent-relay on to production cloud endpoints#667
khaliqgant merged 5 commits into
mainfrom
on-relay-prod

Conversation

@khaliqgant
Copy link
Copy Markdown
Member

@khaliqgant khaliqgant commented Mar 31, 2026

Summary

  • Default --port-auth to https://agentrelay.dev (cloud web app workspace API)
  • Default --port-file to https://api.relayfile.dev (relayfile worker)
  • Overridable via RELAY_AUTH_URL / RELAY_FILE_URL env vars
  • Local dev still works: --port-auth 8787 --port-file 8080

Test plan

  • agent-relay on claude connects to production endpoints
  • agent-relay on claude --port-auth 8787 --port-file 8080 still works for local dev
  • RELAY_AUTH_URL=http://localhost:8787 agent-relay on claude overrides default

🤖 Generated with Claude Code


Open with Devin

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>
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

…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>
devin-ai-integration[bot]

This comment was marked as resolved.

khaliqgant and others added 2 commits March 31, 2026 12:37
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>
@khaliqgant khaliqgant merged commit ec0ff18 into main Mar 31, 2026
38 checks passed
@khaliqgant khaliqgant deleted the on-relay-prod branch March 31, 2026 10:53
@khaliqgant khaliqgant restored the on-relay-prod branch March 31, 2026 11:35
@willwashburn willwashburn deleted the on-relay-prod branch May 15, 2026 13:09
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