Repository navigation
ado: agent discovery optimization improvements - #229
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
nikw9944
left a comment
There was a problem hiding this comment.
The catalog looks right. It cross-links the lake's own /.well-known/api-catalog instead of copying its service list, so the two can't drift. One check before merge and two small fixes, inline.
Note, not a change request: the main site serves markdown only when text/markdown is listed before text/html in Accept. This rule fires whenever text/markdown appears at all. Browsers don't send text/markdown, so it's harmless, but using the same rule here would make the two sites behave the same way.
nikw9944
left a comment
There was a problem hiding this comment.
Thanks, all three are addressed. Once it's deployed, please confirm a multi-value header gets markdown: curl -sI -H 'Accept: text/markdown, text/html;q=0.9' https://docs.doublezero.xyz/setup/ | grep -iE 'HTTP|content-type' should return 200 and text/markdown.
TODO:
Link headers - add global Link in vercel build output
Mirrors the main-site header set in doublezero.xyz's next.config.ts so HTTP-only crawlers find the agent-orientation files without parsing HTML. Scored by isitagentready.com's "Link headers" check.
Verification once deployed:
curl -sI https://docs.doublezero.xyz/ | grep -i ^linkAPI catalog - add well-known/api-catalog + linkset Content-Type
Verification once deployed:
curl -sI https://docs.doublezero.xyz/ | grep -i ^linkcurl -s https://docs.doublezero.xyz/.well-known/api-catalog | jq .linkset[0].anchorcurl -sI https://docs.doublezero.xyz/.well-known/api-catalog | grep -i content-typeMarkdown negotiation - Accept-based rewrite + text/markdown Content-Type
Agents sending
Accept: text/markdownon any trailing-slash path are internally rewritten to the sidecar page>/index.md that hooks/emit_markdown.py already emits for every locale. Browsers never advertise text/markdown, so no risk of swapping HTML out from under a human.Positioned after the per-file redirects in redirects.json so an old URL still 308s first; the agent re-requests the new URL with Accept intact and lands on the right .md.
Verification once deployed:
curl -sI -H 'Accept: text/markdown' https://docs.doublezero.xyz/setup/ | grep -iE 'HTTP|content-type'# expect: HTTP/2 200 + content-type: text/markdown; charset=utf-8curl -sI https://docs.doublezero.xyz/setup/ | grep -iE 'HTTP|content-type'# expect: HTTP/2 200 + content-type: text/html; charset=utf-8 (browsers still get HTML)DNS for AI Discovery - added.