Skip to content

improvement(api): publish an RFC 9727 API catalog and stop padding tables in docs markdown - #9066

Merged
waleedlatif1 merged 2 commits into
stagingfrom
improvement/api-catalog-llms-tables
Oct 15, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
improvement/api-catalog-llms-tables

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Add /.well-known/api-catalog (RFC 9727): a Linkset (application/linkset+json with the RFC's profile) whose entry anchors the v2 REST API at the deployment's own origin and links its OpenAPI document (service-desc), reference docs (service-doc), and health endpoint (status) with the RFC 8631 relations. Link: rel="api-catalog" makes a HEAD request discoverable too (§2). The dedicated MCP host still serves only MCP paths
  • Exempt the catalog from the empty-User-Agent block alongside the other protocol discovery paths (/api/*, including the status link, never reaches that filter)
  • Docs markdown: stop padding tables at the source. remark-gfm's serializer pads every cell to its column's widest cell; configuring the preset's remark-gfm with tablePipeAlign: false drops that padding for every processed-markdown consumer (.md pages, llms-full.txt, Copy page) and replaces the post-processing compactTables string pass. Only serialization changes; rendered pages do not. The config throws if a fumadocs upgrade stops registering remark-gfm, so the setting cannot silently fall off

Type of Change

  • Improvement

Testing

  • test-mcp-host-e2e.ts against a local next dev configured like the CI cli group: 13/13 pass. New checks cover the catalog's GET (empty and tool User-Agents) and HEAD, content type, exact Link/anchor/status/service-desc URLs against the configured origin, the status link resolving, and the MCP host rejecting the path. Reverting the proxy exemption, or pointing the anchor at another origin, turns them red
  • Docs, local next dev vs production: .md output for /integrations/plane, /integrations/file, /integrations/checkr, /cli/tables, /introduction is identical after normalizing table cells (same rows, cells, and alignment; all other lines byte-identical). /cli/reference (content differs from production) compared before/after the config change on the same build: equivalent, 524 KB → 294 KB. HTML pages render the same tables as production
  • bun run lint, check:source-conventions, check:api-validation:strict, check:comment-hygiene, check:unused-exports

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Oct 15, 2026 6:56am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new blocking issue was found.

Summary

The PR adds a public API catalog and moves compact table output into the docs markdown settings.

  • API clients can find the v2 service details from one catalog.
  • Docs Markdown tables use less padding in their output.

Reviews (2) · Last reviewed commit: "fix(docs): turn off table padding in the..." · Reviewed by Greptile

Comment thread apps/sim/scripts/test-mcp-host-e2e.ts Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

2 issues found across 4 files

Confidence score: 4/5

  • Clients sending HEAD to the API root won’t discover the catalog because apps/sim/app/.well-known/api-catalog/route.ts advertises it only after the catalog is requested. Add the rel="api-catalog" link to the API response context.
  • Clients with an empty User-Agent can retrieve the catalog but get a 403 when following its status link. Exempt /api/health from the empty-User-Agent block in apps/sim/proxy.ts.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/sim/proxy.ts">

<violation number="1" location="apps/sim/proxy.ts:302">
P3: A client that retrieves this catalog with an empty User-Agent cannot follow its `status` link: `/api/health` still matches the empty-UA block and returns 403. Exempt the linked health endpoint as well so the advertised status relation works for these clients.</violation>
</file>

<file name="apps/sim/app/.well-known/api-catalog/route.ts">

<violation number="1" location="apps/sim/app/.well-known/api-catalog/route.ts:38">
P2: This advertises the catalog only after a client already requests `/.well-known/api-catalog`, so a `HEAD` to the API root cannot discover it through `rel="api-catalog"`. Add this link to the API response context (for example, `/api/v2`) so relation-based discovery works.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/scripts/test-mcp-host-e2e.ts Outdated
Comment thread apps/docs/lib/llms.ts Outdated
Comment thread apps/sim/app/.well-known/api-catalog/route.ts
Comment thread apps/sim/proxy.ts
@waleedlatif1 waleedlatif1 changed the title improvement(api): publish an RFC 9727 API catalog and compact indented tables in docs markdown improvement(api): publish an RFC 9727 API catalog and stop padding tables in docs markdown Oct 15, 2026
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 5 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 21c4f73 into staging Oct 15, 2026
54 of 55 checks passed
@waleedlatif1
waleedlatif1 deleted the improvement/api-catalog-llms-tables branch October 15, 2026 07:03

This branch was successfully deployed

1 active deployment
Preview — 0975944e Deployed Oct 15, 2026 by vercel[bot]
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