feat: agent readiness for maple.dev — OpenAPI, MCP manifest, Accept-aware 404s, trust pages - #566
Merged
Merged
Conversation
…are 404s, trust pages Landing (maple.dev): - worker: pick the 404 representation from Accept — HTML for browsers, a markdown note with recovery links for everything else, and the v2 JSON error envelope under /api, /v1, /v2, /rpc, /mcp. Home page gets a markdown twin (/index.md); HTML pages with a twin send Vary: Accept and an RFC 8288 alternate Link. - /openapi.json (derived from MapleApiV2), /.well-known/mcp.json and /.well-known/mcp/server.json (registry server.json), /about and /contact (+ .md twins), docs pages /docs/api and /docs/mcp. - Organization JSON-LD gains legalName, email, contactPoint, address; llms.txt gains API, MCP server and Company sections; robots.txt names the machine-readable entry points. API: - /openapi.json, /v2/openapi.json, /.well-known/mcp.json, a JSON index at /, and a wildcard catch-all that returns the v2 RouteNotFound envelope instead of an empty 404. Domain: - @maple/domain/mcp-manifest (single source of the server.json) and V2RouteNotFound. Tests: landing worker + endpoints (vitest, new), domain manifest, API discovery router.
Makisuo
force-pushed
the
feat/landing-agent-readiness
branch
from
August 21, 2026 23:38
0bdb725 to
c7c34c0
Compare
🍁 Maple PR previewNote Preview resources were removed when this pull request closed. Final commit |
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
Raises maple.dev's machine-readability for agents (audit baseline 73/100). Product behaviour and visual design are unchanged for browsers.
Landing (
apps/landing)src/worker.ts: 404 representation followsAccept— HTML for browsers, a short markdown note with recovery links (llms.txt, sitemap, docs, OpenAPI, MCP manifest, about/contact) for everything else, and the v2 JSON error envelope under/api,/v1,/v2,/rpc,/mcp./gets a markdown twin (/index.md); HTML pages with a twin sendVary: Accept+Link: <…md>; rel="alternate"; type="text/markdown"./openapi.json(OpenAPI 3.1 fromMapleApiV2),/.well-known/mcp.json+/.well-known/mcp/server.json(MCP registryserver.json, validated against the 2025-12-11 schema),/about,/contact(+.mdtwins), docs/docs/apiand/docs/mcp(the API's OAuth metadata already linked/docs/mcp).legalName,email,contactPoint[],address;llms.txt: API / MCP server / Company sections, Homebrew + releases for the CLI;robots.txtnames the machine-readable entry points; small "where to look next" row on the HTML 404.API (
apps/api)routes/discovery.http.ts:/openapi.json,/v2/openapi.json,/.well-known/mcp.json, JSON index at/, and a wildcard catch-all answering unmatched routes with the v2RouteNotFoundenvelope instead of an empty 404.Domain (
packages/domain)@maple/domain/mcp-manifest(single source of the server.json;McpServerversion reads the same constant) andV2RouteNotFound.Test plan
apps/landing: new vitest suite (worker negotiation/404s, OpenAPI + MCP endpoints, trust pages) — 22 passingpackages/domain:mcp-manifest.test.ts+ existingopenapi.test.ts— 43 passingapps/api:discovery.http.test.ts(spec, manifest, catch-all precedence) +mcp/app.test.ts— passing;tsc --noEmitcleanastro buildok; built site run under the real worker locally and curl-verified every endpoint (404 markdown/HTML/JSON by Accept,Vary/Linkheaders, twins, manifests)Open decisions (not in this PR)
US).support@maple.dev(already in the OpenAPIinfo.contact); privacy/legal stay on@getmaple.dev.dev.maple/maplein the MCP registry and publishing the CLI to npm need account access.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.