-
Notifications
You must be signed in to change notification settings - Fork 10
feat: agent discovery (Link headers, markdown negotiation, Content-Signal) #263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ff151bf
2bf43d2
9060762
9df7666
ee5d04e
9666309
c4158a3
2c5fbf7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,5 +1,16 @@ | ||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||
| "cleanUrls": true, | ||||||||||||||||||||||||||||||||||||
| "headers": [ | ||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||
| "source": "/(.*)", | ||||||||||||||||||||||||||||||||||||
| "headers": [ | ||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||
| "key": "Link", | ||||||||||||||||||||||||||||||||||||
| "value": "</llms.txt>; rel=\"describedby\"; type=\"text/plain\", </api-reference/introduction>; rel=\"service-doc\"; type=\"text/html\", </sitemap.xml>; rel=\"sitemap\"; type=\"application/xml\"" | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||||||||||||
| "redirects": [ | ||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||
| "source": "/api-reference", | ||||||||||||||||||||||||||||||||||||
|
|
@@ -93,5 +104,12 @@ | |||||||||||||||||||||||||||||||||||
| "source": "/self-hosting", | ||||||||||||||||||||||||||||||||||||
| "destination": "/self-hosting/overview" | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||||||||||||
| "rewrites": [ | ||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||
| "source": "/:path*", | ||||||||||||||||||||||||||||||||||||
| "has": [{ "type": "header", "key": "accept", "value": ".*text/markdown.*" }], | ||||||||||||||||||||||||||||||||||||
| "destination": "/:path*.md" | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
|
Comment on lines
+108
to
+113
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
: "${PREVIEW_URL:?Set PREVIEW_URL to the Vercel preview origin, e.g. https://example.vercel.app}"
curl -fsSI -H 'Accept: text/markdown' "$PREVIEW_URL/" | tr -d '\r' | grep -Ei '^HTTP/|^content-type:'
curl -fsS -H 'Accept: text/markdown' "$PREVIEW_URL/" | head -n 20Repository: makeplane/developer-docs Length of output: 177 🏁 Script executed: cat -n vercel.json | sed -n '100,120p'Repository: makeplane/developer-docs Length of output: 566 🏁 Script executed: # Search for all rewrite rules in vercel.json to understand the full context
rg -A2 '"source"' vercel.json | head -60Repository: makeplane/developer-docs Length of output: 1888 🏁 Script executed: # Check if there's any rewrite rule for the root path "/" already
rg '"source".*"/"' vercel.jsonRepository: makeplane/developer-docs Length of output: 50 Add explicit root rewrite for Markdown content negotiation. The catch-all rule Proposed fix "rewrites": [
+ {
+ "source": "/",
+ "has": [{ "type": "header", "key": "accept", "value": ".*text/markdown.*" }],
+ "destination": "/index.md"
+ },
{
"source": "/:path*",
"has": [{ "type": "header", "key": "accept", "value": ".*text/markdown.*" }],
"destination": "/:path*.md"
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: makeplane/developer-docs
Length of output: 177
🏁 Script executed:
git ls-files | grep -i vercelRepository: makeplane/developer-docs
Length of output: 79
🏁 Script executed:
cat -n vercel.json | head -120Repository: makeplane/developer-docs
Length of output: 4281
Add
Vary: Acceptresponse header for content negotiated Markdown responses.The rewrite rule at lines 108–113 serves different content (HTML vs. Markdown) based on the
Acceptheader. WithoutVary: Accept, caches may serve the wrong representation to clients requesting a different format.Proposed fix
"headers": [ { "key": "Link", "value": "</llms.txt>; rel=\"describedby\"; type=\"text/plain\", </api-reference/introduction>; rel=\"service-doc\"; type=\"text/html\", </sitemap.xml>; rel=\"sitemap\"; type=\"application/xml\"" + }, + { + "key": "Vary", + "value": "Accept" } ]📝 Committable suggestion
🤖 Prompt for AI Agents