Skip to content

Route arelay.to registry traffic to relay-agent - #151

Merged
khaliqgant merged 5 commits into
mainfrom
feat/registry-router
Oct 8, 2026
Merged

khaliqgant merged 5 commits into
mainfrom
feat/registry-router

Conversation

@khaliqgant

@khaliqgant khaliqgant commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Summary

  • forward POST /<handle>/<32hex> on arelay.to and www.arelay.to for every registry-shaped handle, leaving 404/410 decisions to relay-agent
  • forward GET/HEAD /register and bounded /api/v1/(registrations|agents)/** routes through the checked-in relay-agent service binding
  • generalize page negotiation so browsers at arelay.to/<handle> rewrite to /u/<handle> and agents rewrite to /u/<handle>/agent.md; agentrelay.com uses the same paths under /u
  • preserve the existing agentrelay.com chat scope and Cloud rollback path for the original agent-relay conversation route
  • fail registry routes closed when relay-agent is unavailable, and exclude registry/page secrets from the traffic recorder

Tests

  • npm --workspace router run typecheck
  • npm --workspace router test (105/105)

The relay-agent Worker and registry PRs must deploy before this router change. Rollback remains removal of RELAY_AGENT_WORKER (and RELAY_AGENT_ORIGIN, if configured) followed by a router redeploy. No deploy, merge, secret, or production changes were performed.


Note

High Risk
Changes edge routing for registration APIs and agent chat on a public short domain; misconfiguration or ordering vs relay-agent deploy could break registry signup or company handles, though rollback via removing the service binding is documented.

Overview
Routes arelay.to agent registry and expanded chat traffic through the relay-agent Worker instead of only the hard-coded agent-relay slug.

On arelay.to, GET/HEAD /register and prefix-bounded /api/v1/(registrations|agents)/** forward to relay-agent; POST /<handle>/<32hex> is accepted for any handle-shaped slug on arelay.to and www.arelay.to (with agentrelay.com still limited to agent-relay). Agent profile/guide negotiation at arelay.to/<handle> now works for arbitrary handles while reserved slugs (register, api, cloud, etc.) stay on their existing router meaning.

When RELAY_AGENT_WORKER (or origin) is configured, registry and chat hits go to relay-agent first; registry and non–agent-relay chat have no Cloud/marketing fallback and return 503 if the Worker is missing or fails. The legacy agent-relay chat path can still fall through to Cloud when relay-agent is rolled back. Traffic recorder and short-host redirects are updated so registry/chat secrets stay out of replay and agent routes are not redirected away incorrectly.

Reviewed by Cursor Bugbot for commit fed8b90. Bugbot is set up for automated code reviews on this repo. Configure here.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-08T00:32:21.718057Z 4987b31 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: eab09abd-f9fc-44ab-a7d3-68f5b9472950
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

Devin Review

Comment thread router/index.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4987b31635

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread router/index.ts
@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployed!

Environment URL
Web https://687df9da-agentrelay-web.agent-workforce.workers.dev

This is a Cloudflare Workers preview version of this PR's build.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All reported issues were addressed

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread router/README.md Outdated
Comment thread router/index.ts

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All reported issues were addressed across 3 files

Requires human review: Auto-approval blocked because this review re-detected 1 unresolved issue already reported by Cubic.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread router/index.ts Outdated
Comment thread router/index.ts Outdated
Session-Id: 01a1176f-b97d-7942-a94a-61f5b8b38013
Session-Id: 01a1176f-b97d-7942-a94a-61f5b8b38013

Session-Id: 01a1176f-b97d-7942-a94a-61f5b8b38013
Session-Id: 01a1176f-b97d-7942-a94a-61f5b8b38013

Session-Id: 01a1176f-b97d-7942-a94a-61f5b8b38013
Session-Id: 01a1176f-b97d-7942-a94a-61f5b8b38013

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b9746c0. Configure here.

Comment thread router/index.ts
Comment thread router/index.ts
Session-Id: 01a1176f-b97d-7942-a94a-61f5b8b38013
@khaliqgant
khaliqgant merged commit 1d537a6 into main Oct 8, 2026
5 checks passed
@khaliqgant
khaliqgant deleted the feat/registry-router branch October 8, 2026 02:15
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