Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
ea8c0c0
Use cloudflare worker as router
willwashburn Mar 5, 2026
dbbd843
Match routes and strip proxy prefixes
willwashburn Mar 5, 2026
7e62f88
fix(router): stop stripping /observer prefix
willwashburn Mar 5, 2026
8d4dddf
Merge pull request #1 from AgentWorkforce/fix/observer-no-strip-prefix
willwashburn Mar 5, 2026
e0a07cb
Add Footer, tweak Header, routes, favicon, types
willwashburn Mar 6, 2026
51c4e4b
Update index.ts
willwashburn Mar 6, 2026
b03dc1f
Add Footer, tweak Header, routes, favicon, types
willwashburn Mar 6, 2026
b50c16b
Update index.ts
willwashburn Mar 6, 2026
1bda6f8
Merge pull request #3 from AgentWorkforce/orchestrator
khaliqgant Mar 10, 2026
1d5dc5c
fix: resolve Google OAuth redirect_uri_mismatch in production
willwashburn Mar 19, 2026
1b0299c
fix: rewrite Location headers in router to preserve agentrelay.dev do…
willwashburn Mar 19, 2026
8923aa4
Use origin URL and forward original Host
willwashburn Mar 19, 2026
4665712
Set X-Original-Host header and use for auth
willwashburn Mar 19, 2026
01afb31
feat: add cloud base path and route apex traffic to web
Mar 21, 2026
da127bd
fix: keep observer routes on relaycast
Mar 21, 2026
73e709e
refactor: make apex router split explicit
Mar 21, 2026
a2a2145
refactor(web): use NEXT_PUBLIC_APP_URL as canonical app URL
Mar 21, 2026
2a657e7
refactor: simplify stage-based public app URLs
Mar 21, 2026
9059ed2
Merge pull request #37 from AgentWorkforce/feat/org-email-invites
willwashburn Mar 21, 2026
4881a42
Always route /cloud to cloud app
willwashburn Mar 26, 2026
932f206
Merge pull request #55 from AgentWorkforce/feat/web-brand-system-refresh
willwashburn Mar 26, 2026
6ca15d5
Fix cloud domain
willwashburn Mar 26, 2026
0fea248
Merge pull request #59 from AgentWorkforce/fix-routing
willwashburn Mar 27, 2026
0772893
Support asset origin and cloud base-path rewrites
willwashburn Mar 27, 2026
7b472bb
fix: route /api/* through cloud app in edge router
khaliqgant Mar 31, 2026
ac11337
fix: revert /api route — use /cloud/api prefix per convention
khaliqgant Mar 31, 2026
b9c5b9e
Add README.md for router package documentation
willwashburn Mar 31, 2026
aa7d73a
Add code block to README for visual structure
willwashburn Mar 31, 2026
f7ceecd
Merge pull request #74 from AgentWorkforce/fix/router-api-paths
willwashburn Mar 31, 2026
8477e4a
Switch primary domain from .dev to .com
willwashburn Apr 4, 2026
26d63b9
Simplify preview secrets & update migration lookups
willwashburn Apr 5, 2026
14bc273
Merge pull request #79 from AgentWorkforce/fix-base-path
willwashburn Apr 7, 2026
250fc92
Add shadcn skill, CLI docs, and UI components
willwashburn Apr 10, 2026
88aedd1
Merge pull request #132 from AgentWorkforce/update-dashboard-2
willwashburn Apr 10, 2026
7446dbb
Expose RelayFile observer from integrations (#201)
khaliqgant Apr 17, 2026
368801a
fix(ci): create relayfile observer pages project (#205)
khaliqgant Apr 17, 2026
e232150
fix(router): strip relayfile observer mount prefix (#207)
khaliqgant Apr 17, 2026
b789b42
fix(router): preserve relayfile observer redirects (#210)
khaliqgant Apr 17, 2026
36bb2e4
fix(workers): audit + replace bare fetch sites (#410)
khaliqgant May 3, 2026
3da64fd
feat(migration): Phase 2 — webhook Worker + CF Queue (KV-flagged, dor…
khaliqgant May 14, 2026
8300d1c
feat(migration): Phase 0 — production traffic recorder + R2 (#619)
khaliqgant May 14, 2026
b0a5a70
feat(migration): Phase 3 bundle — Hyperdrive Option B + Worker dorman…
khaliqgant May 14, 2026
7057512
feat(webhook-worker): add dormant queue foundation (#744)
khaliqgant May 19, 2026
6392e9b
feat(router): gate nango webhook worker cutover (#753)
khaliqgant May 19, 2026
e55df92
Drop cloudOrigin router gate (#854)
khaliqgant May 20, 2026
0721d9a
fix(router): prefer corrected relay web origin
willwashburn May 22, 2026
9a1405b
Merge pull request #930 from AgentWorkforce/codex/fix-agentrelay-rout…
willwashburn May 22, 2026
2b8c069
fix(router): break /webhooks/nango loop on webhook-worker forward hea…
khaliqgant May 22, 2026
895fb68
Repair preflight clone materialization
khaliqgant May 27, 2026
8557ae3
Revert "Repair preflight clone materialization" (895fb683)
May 27, 2026
b82df26
feat(transcripts): recorder transcript ingest → workspace VFS → meeti…
khaliqgant Jun 14, 2026
36e4ace
router: cut the agentrelay.com apex fallback to the Cloudflare web or…
willwashburn Jun 23, 2026
d1acaec
Merge remote-tracking branch 'router-extract/realmain' into relocate-…
willwashburn Jun 23, 2026
3d7ac21
feat(router): relocate the front-door router from cloud (prod, Wrangler)
willwashburn Jun 23, 2026
d760150
router: pin prod ROUTER_CONFIG + RATE_LIMIT_COUNTERS KV ids
willwashburn Jun 23, 2026
799cd99
router: bind the webhook worker by service binding, not a pinned URL
willwashburn Jun 23, 2026
f816915
router: fix webhook-request stream disturbance + 500 content-type
willwashburn Jun 23, 2026
67eb255
docs(router): update README diagram for the agentrelay.com relocation
willwashburn Jun 23, 2026
4b06f49
Update agent name in README for clarity
willwashburn Jun 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/deploy-router.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Deploy Router (Cloudflare)

on:
push:
branches:
- main
paths:
- router/**
- .github/workflows/deploy-router.yml
workflow_dispatch:

concurrency:
group: deploy-router-production
cancel-in-progress: false

permissions:
contents: read

jobs:
deploy-router:
name: Deploy router
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
Comment on lines +24 to +25

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.

🔒 Security & Privacy | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

git ls-files | grep -i "deploy-router"

Repository: AgentWorkforce/agentrelay.com

Length of output: 203


🏁 Script executed:

cat -n .github/workflows/deploy-router.yml | head -40

Repository: AgentWorkforce/agentrelay.com

Length of output: 1281


🌐 Web query:

actions/checkout v4 persist-credentials security best practice GitHub Actions

💡 Result:

Setting persist-credentials: false in the actions/checkout action is considered a security best practice for most GitHub Actions workflows [1][2][3]. By default (persist-credentials: true), the action configures the Git local configuration with the provided token or SSH key [4][5][6]. This allows subsequent steps in the same job to perform authenticated Git operations automatically, but it also creates a security risk: any process or action executed later in the job can access these credentials from the.git/config file [7][2]. If a workflow step is compromised, or if the working directory is inadvertently uploaded as an artifact, the credentials may be exposed to unauthorized parties [2][3]. Key security considerations: 1. Recommended Practice: Set persist-credentials: false unless your workflow explicitly requires authenticated Git operations (e.g., pushing commits back to the repository) after the checkout step [1][2][3]. 2. Risk Reduction: Disabling credential persistence ensures that credentials are not stored on disk in the runner's working directory, significantly reducing the potential blast radius if a workflow is compromised [1][2]. 3. Manual Credential Management: If you disable persistence but still need to perform authenticated Git operations, you must manually configure the required authentication (e.g., by using an environment variable or explicit configuration) in the steps that require it [2]. 4. Context Matters: While GITHUB_TOKEN has default permissions and is handled by the runner environment, persist-credentials specifically controls whether that token is written to the Git configuration on disk [4][7]. For high-value workflows, such as those performing releases or deployments, it is especially important to follow the principle of least privilege, limit the scope of tokens, and consider using more secure alternatives like OIDC (OpenID Connect) for authentication with cloud providers rather than relying on long-lived or persisted secrets [8][3].

Citations:


Disable checkout credential persistence.

Set persist-credentials: false on the checkout action to avoid leaving a writable token in the workspace for subsequent steps. This workflow performs no authenticated Git operations after checkout, so credential persistence is unnecessary and increases the attack surface.

Suggested change
      - name: Checkout code
        uses: actions/checkout@v4
+       with:
+         persist-credentials: false
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: false
🧰 Tools
🪛 zizmor (1.26.1)

[warning] 24-25: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 25-25: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/deploy-router.yml around lines 24 - 25, The
actions/checkout@v4 step in the deploy-router workflow is missing the
persist-credentials configuration which leaves a writable authentication token
in the workspace after checkout. Add the persist-credentials input parameter set
to false on the checkout action to prevent this security risk, as the workflow
performs no authenticated Git operations after the initial checkout step.

Source: Linters/SAST tools


- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Deploy router to Cloudflare
working-directory: router
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
run: ../node_modules/.bin/wrangler deploy
Comment on lines +33 to +41

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.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Add a pre-deploy guard for unresolved config sentinels.

A fast validation step should fail the job if REPLACE_ME__ values remain in router/wrangler.jsonc, preventing bad production deploys.

Suggested change
       - name: Install dependencies
         run: npm ci

+      - name: Validate router wrangler config
+        run: |
+          if grep -q "REPLACE_ME__" router/wrangler.jsonc; then
+            echo "Unresolved placeholder found in router/wrangler.jsonc"
+            exit 1
+          fi
+
       - name: Deploy router to Cloudflare
         working-directory: router
         env:
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/deploy-router.yml around lines 33 - 41, The workflow is
missing a validation step to prevent deploying with unresolved configuration
values. Add a new step between "Install dependencies" and "Deploy router to
Cloudflare" that checks the router/wrangler.jsonc file for any remaining
REPLACE_ME__ sentinel values using a grep or similar validation command, and
fails the job if any are found. This guard should execute before the wrangler
deploy command runs to catch configuration issues early.

75 changes: 48 additions & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
"node": ">=20.9.0"
},
"workspaces": [
"web"
"web",
"router"
],
"scripts": {
"dev": "npm --workspace web run dev",
"build": "npm --workspace web run build",
"test": "npm --workspace web run test",
"test": "npm --workspaces run test",
"preview": "npm --workspace web run preview",
"deploy": "npm --workspace web run deploy"
"deploy": "npm --workspace web run deploy",
"deploy:router": "npm --workspace router run deploy"
}
}
66 changes: 66 additions & 0 deletions router/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
Route precedence:

- `/cloud*` routes to the Agent Relay Cloud Next.js app.
- `/observer/file*` routes to the RelayFile observer app, expected to be built with `basePath: "/observer/file"`.
- `/observer*` routes to the Relaycast observer app.
- everything else falls back to the legacy proxy target.

RelayFile observer deployment is wired from the production job in
`.github/workflows/deploy.yml`. The job runs
`scripts/deploy-file-observer-pages.sh`, which packs
`@relayfile/file-observer@latest`, builds it with
`FILE_OBSERVER_BASE_PATH=/observer/file`, and deploys the detected static output
to the Cloudflare Pages project `relayfile-file-observer`. The script creates
that Pages project with the configured production branch when it is missing, so
the first production deploy does not require manual Cloudflare setup.

```
┌────────────────────────────────────┐
│ @agentworkforce/agentrelay.com │
│ │
│ /router (Cloudflare worker) │
└────────────────────────────────────┘

┌──────────────────────────────────────┐
│ agentrelay.com │
└──────────────────────────────────────┘
│
│
│
All cloud routes │ Observer Routes
┌───(/cloud/*, /cloud/api)───────────┼────(/observer*, /observer/file*)───────┐
│ │ │
│ │ │
│ │ │
▼ │ ▼
┌────────────────────────────────────┐ │ ┌────────────────────────────────────┐
│ https://agentrelay.cloud │ │ │ https://relaycast.dev/observer │
└────────────────────────────────────┘ │ └────────────────────────────────────┘
│
│
┌────────────────────────────────────┐ All Other Routes ┌────────────────────────────────────┐
│ @agentworkforce/cloud │ (/, /docs, /blog, /openclaw) │ @agentworkforce/relaycast │
│ │ │ │ │
│ /web (NextJs App) │ │ │ /packages/observer-dashboard │
│ │ │ │ /@relayfile/file-observer │
└────────────────────────────────────┘ │ └────────────────────────────────────┘
│
│
│
│
│
│
│
│
▼
┌────────────────────────────────────┐
│ https://origin-web.agentrelay.com │
└────────────────────────────────────┘


┌────────────────────────────────────┐
│ @agentworkforce/agentrelay.com │
│ │
│ /web (NextJs App) │
└────────────────────────────────────┘
```
Loading
Loading