Repository navigation
AR-20261125-1: Add same-origin WebMCP documentation tools - #1092
Open
warp-agent-staging[bot] wants to merge 4 commits into
Open
warp-agent-staging[bot] wants to merge 4 commits into
warp-agent-staging[bot] wants to merge 4 commits into
Conversation
Co-Authored-By: Oz <oz-agent@warp.dev>
Contributor
Author
|
This PR was generated with Warp. Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Oz <oz-agent@warp.dev>
Co-Authored-By: Oz <oz-agent@warp.dev>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
AR-20261125-1 adds same-origin, read-only WebMCP tools so browser agents can search documentation by title/keyword, browse its documentation tree, and read a page’s Markdown twin. Kapa and its semantic search tool are unchanged. Astro bundles the new script under
/_astro/and loads it on every page, including the homepage.Related issues
Experiment AR-20261125-1, 2026-11-25 AEO/SEO autoresearch run. No tracked issue.
Changes
search(query)yieldsresults, each hydrated withdata()./to/index.md, normalizes a trailing slash, rejects traversal and absolute/external URLs before normalization, and disallows redirects and credentials.document.modelContext, fall back tonavigator.modelContext, and no-op without the API. Abort/unregister cleanup runs on pagehide; bfcache restores registration.list_docs_pagesreads generated page titles/canonical paths from same-origin/llms-small.txt, rebases links onto the current origin, and optionally filters by a section validated against current entries. This avoids a hardcoded page/section list. The existing abridged corpus is approximately 3.6 MB and is fetched only when navigation is invoked, not on page load.Metric prediction
The canonical docs.warp.dev ora score is predicted to rise from 71 (scan 647963, 2026-11-25, scoring v3 rev 22) to 75–76 (+4 to +5) on the first production scan after deployment, within one week after merge. Baseline required-tier WebMCP score: 0/8; each point contributes approximately 0.663 overall points. No Peec effect expected. This is a hypothesis, not a measured production improvement.
Validation
Security: Markdown paths are decoded and rejected for dot segments, nested/malformed escapes, encoded separators, backslashes, internal double slashes, controls, schemes, or hosts before URL construction or network access; navigation sections have matching no-fetch traversal regression coverage.
Passed:
npm run typecheck(0 errors),test:webmcp-tools(10),test:kapa-webmcp(2),test:heading-vars(5),npm run build,test:heading-tocs(3,736 entries across 430 pages),test:homepage-json-ld,test:docs-markdown(12),test:agent-discovery(6), andtest:markdown-negotiation(8). Internal link check: 5,313 links, zero broken. Changed-file style lint andgit diff --checkpassed.npm run lintandnpm run fmtwere attempted but unavailable:sh: 1: trunk: not found. Trunk is not vendored; no formatting/lint success is claimed.Controlled regression gate — passed
Unchanged
main(d3768f828ae0da90ec9eaf6ee1985f4bb681fa50) and candidate31e5db8f2afc1f82c56994159469ffd77c3b5e12were built with the same installed dependencies and Node version, then served from their generated.vercel/output/statictrees using identical Python HTTP servers. Ora’s account-free--tunnel-cmdephemeral mode used the same cloudflared HTTP/2 protocol, CLI version, and scoring revision.npm run previewwas attempted but the Vercel adapter reports that preview is unsupported; these static controls do not exercise server-side Vercel functions. Real browser verification on Vercel separately covers all three new tool paths.Commands (main uses port 4321):
npx -y @ora-ai/ax@0.5 audit http://127.0.0.1:4322 --tunnel-cmd '/tmp/docs-cloudflared tunnel --url http://127.0.0.1:4322 --protocol http2 --no-autoupdate' --jsonRaw per-check score diff (every changed score):
{ "mainScanId": 649778, "mainScore": 48, "candidateScanId": 650289, "candidateScore": 53, "scoredCheckDeltas": [ { "id": "webmcp", "main": 0, "candidate": 8 } ], "regressions": [] }Canonical versus Vercel preview — not domain-equivalent
CI status is tracked by the checks on this PR; local production build, typecheck, and all ten tool tests passed on the navigation head. Vercel deployment completed successfully and is publicly readable, not authentication-protected.
Preview: https://docs-git-factory-ar-20261125-1-same-origin-webmcp-warpdotdev.vercel.app/
The refreshed Vercel preview scan 650346 reports WebMCP 8/8 and coverage pass, with all three tools detected. This matches the controlled candidate result. The earlier two-tool result was 7.2/8 with a coverage warning.
This unmatched-origin comparison is not the regression gate: overall Vercel preview score 56 vs canonical production 71, with lower-scoring checks retained below. Several explicitly compare the temporary preview domain’s web discovery, package identity, and Vercel
X-Robots-Tag: noindex; others use different API/MCP/content samples. These results are not domain-equivalent and do not establish a production regression or improvement. The controlled same-environment comparison above is the regression gate; no unrelated fixes were made to chase preview-domain scores.Browser functional smoke (real preview network, fake document.modelContext registration):
Warp overview | Warp.search_docs_pages({query: 'skills'})returns eight real Pagefind results, led by “Skills for agents.” All Pagefind entry/index/metadata/WASM/fragment requests returned 200./returns/index.md(3,407 characters);/agents/capabilities/skills/returns its.mdtwin (14,892 characters), both HTTP 200./and/agents/capabilities/skills/Markdown requests still succeed on the security-fixed preview. Browser instrumentation confirmed zero fetches for eleven rejected path variants (literal/encoded dot segments, nested escapes, separators, host/scheme inputs, and malformed escapes) and five unsafe section variants. Regression tests first failed on the old code and then passed after the fix. Absolute external paths are rejected withProvide a root-relative documentation path without dot segments, queries, or fragments.Complete fast-verifier output (raw):
Ora CLI stderr on both runs:
ora reports contract 1.42.0; this CLI was built against 1.23.0. Newer fields may be missing from the output - upgrade with: npm i -g @ora-ai/ax@latest. Requested CLI version@ora-ai/ax@0.5was retained. The initial audits used no--force. The navigation refresh used it only after proving the cached scan predated its push. For the security refresh, the first audit returned cached scan 650047 dated 16:58, predating the security push; only then was--forceused to obtain scan 650346. No feedback APIs were used.Follow-ups / human decision
Keep this PR draft with no requested reviewers. Human decision: whether to merge the experiment after normal review. The controlled regression gate passes; no preview-domain exception is required. The canonical production score prediction still requires a post-deploy scan within one week. No content, route, llms configuration, or off-limits PR changes.
Co-Authored-By: Oz oz-agent@warp.dev