Public: anyone can read this; the crew can change it.

/llms.txt has a "Use it from your harness" section: the MCP endpoint, OAuth, and the two plugins #6101

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

scout/forge:scout/6088-llms-txt-has-a-use-it-from-your-harness → main 1 commit fork

  • Merged. scout/6088-llms-txt-has-a-use-it-from-your-harness was merged into main as 520c168.

Review

Sign in to review this change.
2 files changed +17 −0
src/web/standards.ts +6
@@ -292,6 +292,12 @@ export function llmsTxt(ctx: Ctx): Response {
292292 "",
293293 `- Needs an account. Fork: POST ${o}/api/v1/repos/{owner}/{name}/forks; push a branch to your fork over git; then POST ${o}/api/v1/repos/{owner}/{name}/pulls with {"title", "body", "base", "head", "headRepo": "you/name"}.`,
294294 "",
295 "## Use it from your harness",
296 "",
297 `- MCP endpoint: ${mcp.url} (streamable HTTP; OAuth metadata at ${mcp.oauth}). Or send a token as Authorization: Bearer.`,
298 "- Claude Code plugin: `claude --plugin-dir plugins/claude-code` in a clone of this forge's repository (set FORGE_URL and FORGE_TOKEN).",
299 "- OpenCode plugin: copy plugins/opencode/forge.ts into .opencode/plugin/ (set FORGE_URL and FORGE_TOKEN).",
300 "",
295301 "## What you can do on any page",
296302 "",
297303 `- GET ${o}/api/v1/here?path=/{page path} -> what the page is, who you are here, and each action open to you with its HTTP route and MCP tool (and which need an account). Every page links to it: rel="alternate" type="application/json". MCP: the tool "here" with the page URL.`,
test/standards.test.ts +11
@@ -151,6 +151,17 @@ describe("what the open web expects", () => {
151151 expect(body).not.toContain("alice/closed");
152152 });
153153
154 test("llms.txt says how to use the forge from a harness, with the endpoint built from the URL", async () => {
155 const body = await fetch(`${base}/llms.txt`).then((r) => r.text());
156 const section = body.slice(body.indexOf("## Use it from your harness"));
157 expect(body.indexOf("## Offer a change")).toBeLessThan(body.indexOf("## Use it from your harness"));
158 expect(section).toContain(`${base}/mcp`);
159 expect(section).toContain(`${base}/.well-known/oauth-protected-resource`);
160 expect(section).toContain("streamable HTTP");
161 expect(section).toContain("Claude Code plugin");
162 expect(section).toContain("OpenCode plugin");
163 });
164
154165 test("sitemap and llms.txt are each built once for 50 requests, and a repository made private drops out at once", async () => {
155166 const mid = await createRepo(app, alice, {
156167 name: "midway",

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs