Skip to content

Serve website A2A handle routes#246

Open
naturedesk wants to merge 1 commit into
tinyhumansai:mainfrom
naturedesk:fix/website-a2a-handle-routes
Open

Serve website A2A handle routes#246
naturedesk wants to merge 1 commit into
tinyhumansai:mainfrom
naturedesk:fix/website-a2a-handle-routes

Conversation

@naturedesk

Copy link
Copy Markdown
Contributor

Summary

  • add website route handlers for /a2a/[id], /a2a/[id]/agent-card.json, /a2a/[id]/skill.md, /a2a/[id]/swagger.json, and /a2a/[id]/swagger.md
  • resolve @handle through the directory before reading the agent card, while direct cryptoId/agent ids read the card directly
  • proxy advertised docs URLs from card.docs.*Url / URL-valued docs fields, and derive sibling docs from external card.url paths such as /agent-card.json
  • return the directory agent card JSON for /a2a/[id] and /agent-card.json instead of a generic website 404

Verification

  • ./node_modules/.bin/vitest run src/common/a2a-route.test.ts
  • ./node_modules/.bin/tsc --noEmit --project tsconfig.json --pretty false
  • ./node_modules/.bin/next build

Resolves the remaining hosted /a2a/@handle + docs-path caveat from #216.

Refs #216

@vercel

vercel Bot commented Jul 11, 2026

Copy link
Copy Markdown

@naturedesk is attempting to deploy a commit to the Vezures Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@naturedesk, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 26 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 82175257-f115-440b-a4dd-8a46c5f10adc

📥 Commits

Reviewing files that changed from the base of the PR and between adedeb7 and 7988532.

📒 Files selected for processing (7)
  • website/app/a2a/[id]/agent-card.json/route.ts
  • website/app/a2a/[id]/route.ts
  • website/app/a2a/[id]/skill.md/route.ts
  • website/app/a2a/[id]/swagger.json/route.ts
  • website/app/a2a/[id]/swagger.md/route.ts
  • website/src/common/a2a-route.test.ts
  • website/src/common/a2a-route.ts

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: 7988532496

ℹ️ 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 on lines +97 to +99
const upstream = await fetcher(url, {
headers: { Accept: DOC_CONTENT_TYPES[kind] },
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Block arbitrary server-side doc fetches

When an untrusted directory card advertises docs.*Url (or a card.url used to derive one) pointing at an internal or metadata endpoint, this unauthenticated route makes the website server fetch that URL and returns the body to the caller. Because agent cards are user-controlled public directory data and fetch follows redirects by default, this creates an SSRF primitive in hosted environments where the server can reach private control-plane or metadata services; restrict proxied hosts/addresses or avoid server-side proxying external card URLs.

Useful? React with 👍 / 👎.

Comment on lines +117 to +118
if (typeof advertisedUrl === "string" && isHttpUrl(advertisedUrl)) {
return advertisedUrl;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Honor relative advertised docs URLs

Valid cards can advertise docs as relative paths: the SDK validates docs.*Url with allowRelative=true, and the directory spec/e2e examples use values like /a2a/<id>/skill.md. This branch only accepts absolute HTTP(S) URLs, so those advertised docs are ignored; cards without inline docs will then 404 or fall back to deriving a wrong sibling from a base card.url such as https://tiny.place/a2a/@agent, leaving hosted /a2a/<id>/skill.md broken for valid directory cards.

Useful? React with 👍 / 👎.

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