Skip to content

docs: add a current Observer page built on scoped observer tokens - #44

Merged
willwashburn merged 3 commits into
mainfrom
claude/agent-relay-skills-review-a8mgtd
Aug 21, 2026
Merged

docs: add a current Observer page built on scoped observer tokens#44
willwashburn merged 3 commits into
mainfrom
claude/agent-relay-skills-review-a8mgtd

Conversation

@willwashburn

@willwashburn willwashburn commented Aug 3, 2026

Copy link
Copy Markdown
Member

Summary

Observer has no page in the current docs. The observer slug appears only in legacyDocsNav and web/content/docs/7.1.1/observer.mdx, so:

  • /docs/observer resolves to v7.1.1 via getDefaultDocsVersionForSlug and redirects into the archive
  • the current docs sidebar never mentions the feature at all

And the archived page documents the only method it knew:

https://agentrelay.com/observer?key=<workspace_key>

A workspace key is an administrative credential — it can send messages, spawn agents, and change workspace settings — and a URL query string is not a place to put one. Current releases ship agent-relay observer, which mints a scoped, expiring, read-only ot_live_ token and builds the link from that.

Changes

  • New web/content/docs/observer.mdx — covers agent-relay observer, narrowing with --channels / --include-dms / --expires, observer list / observer revoke, the get_observer_url MCP tool for orchestrating agents, --observer-url / RELAY_OBSERVER_URL for self-hosted and staging, and a table contrasting what a workspace key can do against what an observer token can do.
  • Registered the slug under Interfaces in docsNav, so the page is reachable and /docs/observer serves current docs instead of redirecting to the archive.
  • Archived page kept, with a warning. It still describes v7.1.1 behaviour accurately, but it's live and indexed, so it now carries a <Note> saying the pattern is unsafe on a current release, linking to the new page.

One subtlety worth flagging for review: that link is written as an absolute URL on purpose. rewriteLegacyDocsLinks (web/lib/docs.ts:139) rewrites bare /docs/… links inside legacy content to /docs/7.1.1/…, so a relative link would have pointed the reader back at the archived page they were already on. I simulated the rewriter against the file to confirm the absolute link passes through untouched while the pre-existing relay-dashboard link is still rewritten as intended.

Depends on agent-relay observer landing in AgentWorkforce/relay#1422 — worth merging after it, since the page documents that command.

Test Plan

  • npx next build --webpack compiles successfully
  • /docs/observer now prerenders — .next/server/app/docs/observer.html exists, where before the slug only redirected
  • Verified the rendered HTML contains every documented command (agent-relay observer, --channels, --include-dms, --expires, --json, observer list, observer revoke, --observer-url)
  • Verified the nav entry renders on other current docs pages (/docs/observer link present in the built quickstart.html)
  • Legacy page still builds and carries the new note
  • Simulated rewriteLegacyDocsLinks against the legacy file to confirm the cross-version link survives
  • npx vitest run — 22 passed, 9 files
  • Reverted unrelated package-lock.json churn from npm install
  • Visual check of the rendered page in a browser — not run

Screenshots

n/a


Generated by Claude Code


Summary by cubic

Adds a current Observer docs page that uses scoped, expiring ot_live_ tokens instead of workspace-key URLs, and updates CLI/MCP references to match. This replaces the archive-only flow and stops recommending an administrative credential in a URL.

  • Adds /docs/observer covering agent-relay observer (flags --channels, --include-dms, --expires, --json), token management (observer list/revoke), MCP get_observer_url, self-hosted config via --observer-url/RELAY_OBSERVER_URL, and the capability differences; notes the realtime endpoint rejects rk_live_*.

  • Registers "Observer" in current docsNav, so /docs/observer serves current docs.

  • Keeps the v7.1.1 page with a safety Note and an absolute link to the new page to bypass the legacy link rewriter.

  • Expands the CLI reference with the Observer commands/flags and clarifies observer is not SDK-backed: it accepts --workspace-key/--base-url and has no --token.

  • Updates the MCP reference to include get_observer_url inputs/returns and a workspace-key warning; links to the Observer page.

  • Fixes internal /docs/ links to resolve within current docs; labels the Relay Dashboard link as an archive.

  • Merge after the agent-relay observer command ships (feat(cli): add agent-relay observer to mint read-only follow-along links relay#1422).

Written for commit cb975f6. Summary will update on new commits.

Review in cubic

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c7fcf6a7-1744-4ca8-baf1-8ec89e95016d

📥 Commits

Reviewing files that changed from the base of the PR and between 0f7db55 and eeb0427.

📒 Files selected for processing (3)
  • web/content/docs/agent-relay-mcp.mdx
  • web/content/docs/observer.mdx
  • web/content/docs/reference-cli.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
  • web/content/docs/observer.mdx

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Added Observer documentation for read-only workspace viewing, scoped observer tokens, security boundaries, deployment configuration, CLI and MCP usage, and related links. Added Observer to the Interfaces navigation and updated versioned guidance about workspace keys.

Changes

Observer documentation

Layer / File(s) Summary
Observer overview and navigation
web/content/docs/observer.mdx, web/lib/docs-nav.ts
Added the Observer overview and added it to the Interfaces navigation group.
Observer CLI, MCP, and token security
web/content/docs/observer.mdx, web/content/docs/reference-cli.mdx, web/content/docs/agent-relay-mcp.mdx, web/content/docs/7.1.1/observer.mdx
Documented observer-link creation, token scopes, expiration, listing, revocation, MCP integration, and workspace-key security.
Deployment and usage guidance
web/content/docs/observer.mdx
Documented self-hosted configuration, Relay Dashboard guidance, and related documentation links.

Estimated code review effort: 2 (Simple) | ~15 minutes

Merge Risk: ⚪ Minimal · up to eeb04

This documentation change adds and links the current Observer guidance without any actionable merge-blocking risk remaining after normal checks and review.

Possibly related PRs

Poem

A rabbit hops through links made clear,
Scoped tokens keep the pathways near.
No workspace keys in URLs roam,
Read-only views now guide us home.
The docs shine bright from burrow to dome.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main change: adding current Observer documentation based on scoped observer tokens.
Description check ✅ Passed The description directly explains the new Observer page, navigation updates, reference changes, security guidance, and validation steps.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/agent-relay-skills-review-a8mgtd

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.

@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: 0f7db55a7f

ℹ️ 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 web/content/docs/observer.mdx
Comment thread web/content/docs/observer.mdx
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Preview deployed!

Environment URL
Web https://261544f7-agentrelay-web.agent-workforce.workers.dev

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

@coderabbitai coderabbitai 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.

🧹 Nitpick comments (1)
web/content/docs/observer.mdx (1)

26-26: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Clarify why observer-token exposure in a URL is acceptable.

Line 26 shows the observer token in the URL query string (?key=ot_live_...), yet lines 55-56 warn that query strings end up in browser history, referrer headers, and proxy logs. An observer token faces the identical exposure surface; only its blast radius is smaller due to scope, expiry, and revocability. Add a sentence noting that observer tokens accept the same URL-exposure surface by design, because their reduced capability and revocability make that acceptable, unlike a workspace key. This avoids leaving readers to infer the distinction on their own.

Also applies to: 51-69

🤖 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 `@web/content/docs/observer.mdx` at line 26, Add a sentence in the
observer-token documentation near the URL example and the query-string warning
explaining that observer tokens intentionally share the URL exposure surface,
and that their limited scope, expiry, and revocability make this acceptable
compared with workspace keys.
🤖 Prompt for all review comments with 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.

Nitpick comments:
In `@web/content/docs/observer.mdx`:
- Line 26: Add a sentence in the observer-token documentation near the URL
example and the query-string warning explaining that observer tokens
intentionally share the URL exposure surface, and that their limited scope,
expiry, and revocability make this acceptable compared with workspace keys.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4d300c34-e02d-4c6f-98e4-c12957e825ce

📥 Commits

Reviewing files that changed from the base of the PR and between d02e9cd and 0f7db55.

📒 Files selected for processing (3)
  • web/content/docs/7.1.1/observer.mdx
  • web/content/docs/observer.mdx
  • web/lib/docs-nav.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

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

Re-trigger cubic

Comment thread web/content/docs/observer.mdx
Comment thread web/content/docs/observer.mdx
Comment thread web/content/docs/observer.mdx Outdated

@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 (changes from recent commits).

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

Re-trigger cubic

Comment thread web/content/docs/reference-cli.mdx Outdated
claude added 3 commits August 20, 2026 11:12
Observer had no page in the current docs. The slug exists only in the
v7.1.1 archive and the legacy nav, so `/docs/observer` redirects into the
archive and the current sidebar never mentions the feature at all.

The archived page also documents the only method it knew:

    https://agentrelay.com/observer?key=<workspace_key>

A workspace key is an administrative credential — it can send messages,
spawn agents, and change workspace settings — and a query string is not a
place to put one. Current releases ship `agent-relay observer`, which
mints a scoped, expiring, read-only `ot_live_` token and builds the link
from that.

- Adds `web/content/docs/observer.mdx` covering `agent-relay observer`,
  the `--channels` / `--include-dms` / `--expires` narrowing, `observer
  list` / `revoke`, the `get_observer_url` MCP tool, and a capability
  table contrasting a workspace key with an observer token.
- Registers the slug under Interfaces in `docsNav`, so the page is
  reachable and `/docs/observer` resolves to current docs instead of
  redirecting to the archive.
- Leaves the archived v7.1.1 page in place but adds a note that the
  pattern is unsafe on a current release, linking to the new page. The
  link is absolute because `rewriteLegacyDocsLinks` rewrites bare
  `/docs/` links back into `/docs/7.1.1/`, which would have pointed it at
  itself.

Depends on the `agent-relay observer` command in AgentWorkforce/relay#1422.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jmke9G9s7ftrN49opNmdx1
Review found the new Observer page pointing at two reference pages that
did not actually cover what it promised, and one link into archived docs.

- `reference-cli.mdx` called itself the complete command matrix but had
  no `observer` entry. Adds an Observer section covering the three
  commands and every flag.
- `agent-relay-mcp.mdx` did not list `get_observer_url`. Adds it to the
  workspace tool inventory plus a section with its inputs, its return
  shape, and the workspace-key warning.
- The "When to use it" link to `/docs/relay-dashboard` resolved to a
  legacy-only slug, so it silently redirected into the v7.1.1 archive —
  the same failure this PR set out to fix for Observer. The link is now
  explicitly labelled as the archive, since Relay Dashboard has no
  current page yet.

Every internal `/docs/` link on the three touched pages now resolves
within the current docs, except the one deliberate archive link.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jmke9G9s7ftrN49opNmdx1
Review flagged an internal inconsistency: the Observer section says all
three commands accept `--workspace-key` and `--base-url`, but the
"Common SDK Options" list of SDK-backed groups does not include
`observer`.

Adding it to that list would have been wrong. `observer` does not use
`addSdkOptions` — it declares those two flags itself and has no `--token`
at all, because minting an observer token requires the workspace key and
an agent token cannot do it. Listing it as SDK-backed would have implied
`--token` works there.

Says so explicitly instead.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jmke9G9s7ftrN49opNmdx1
@willwashburn
willwashburn force-pushed the claude/agent-relay-skills-review-a8mgtd branch from eeb0427 to cb975f6 Compare August 20, 2026 11:16
@willwashburn
willwashburn merged commit a0666bd into main Aug 21, 2026
3 checks passed
@willwashburn
willwashburn deleted the claude/agent-relay-skills-review-a8mgtd branch August 21, 2026 19:49
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.

2 participants