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

An app page's Link header says which JSON manifest is the app's and which is its repository's on the forge #8298

Merged opened this

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

Merged

scout/forge:scout/8288-an-app-page-s-link-header-says-which-jso → main 1 commit fork

  • Merged. scout/8288-an-app-page-s-link-header-says-which-jso was merged into main as ad3fd0e.

Review

Sign in to review this change.
3 files changed +117 −2
src/apps/proxy.ts +7 −1
@@ -787,6 +787,9 @@ const reportOf = (runtime: AppsRuntime, repo: Repo): URL =>
787787 const REPORT_LINK =
788788 `</__forge/report>; rel="help"; title="${REPORT_LINK_TITLE}"`;
789789
790 /** Names the forge's manifest, so it is told apart from an app's own alternate. */
791 export const REPO_LINK_TITLE = "this app's repository on its forge";
792
790793 /**
791794 * The `Link` values a public app's pages carry: the report door and the
792795 * forge's role-aware manifest for the app's repository, so an agent that
@@ -798,7 +801,10 @@ export function discoveryLinks(runtime: AppsRuntime, target: AppTarget): string[
798801 if (repo === undefined) return [];
799802 const here = new URL("/api/v1/here", runtime.options.forgeUrl);
800803 here.search = `?path=${encodeURIComponent(`/${repo.ownerName}/${repo.name}`)}`;
801 return [REPORT_LINK, `<${here.href}>; rel="alternate"; type="application/json"`];
804 return [
805 REPORT_LINK,
806 `<${here.href}>; rel="alternate"; type="application/json"; title="${REPO_LINK_TITLE}"`,
807 ];
802808 }
803809
804810 const isHtml = (headers: Headers): boolean =>
src/web/standards.ts +1 −1
@@ -364,7 +364,7 @@ export function llmsTxt(ctx: Ctx): Response {
364364 "",
365365 "## What you can do on any page",
366366 "",
367 `- 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.`,
367 `- 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". On an app's own pages the forge's link is the one titled "this app's repository on its forge"; follow that one. MCP: the tool "here" with the page URL.`,
368368 "",
369369 ...(tell === undefined
370370 ? []

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs