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

/docs opens the forge's documentation instead of a 404 #10900

Parked opened this
Closed without merging

scout/forge:scout/10894-docs-opens-the-forge-s-documentation-ins → main 4 commits fork

  • Closed without merging. Nothing was applied to main.

Review

Sign in to review this change.
11 files changed +121 −3
src/http/server.ts +4
@@ -165,6 +165,7 @@ import { flowsCheck, flowsPage, flowsProbe, flowsUpdate } from "../web/pages/flo
165165 import { findingAccept, findingsPage } from "../web/pages/findings.ts";
166166 import { betAct, betPage, betPropose, betsPage } from "../web/pages/bets.ts";
167167 import { changelogJson, changelogPage } from "../web/pages/changelog.ts";
168 import { docsFile, docsFolder } from "../web/pages/docs_link.ts";
168169 import { releaseHoldSubmit, liftSubmit, releasesPage, rollbackSubmit } from "../web/pages/releases.ts";
169170 import {
170171 changePassword,
@@ -908,6 +909,9 @@ export function buildRouter(): Router<Handler> {
908909 router.add("GET", "/now/:stage", nowPage);
909910 router.add("GET", "/audit", auditPage);
910911 router.add("GET", "/releases", releasesPage);
912 // The forge's own documentation: a redirect built from configuration only.
913 router.add("GET", "/docs", docsFolder);
914 router.add("GET", "/docs/:file", docsFile);
911915 router.add("GET", "/changelog", changelogPage);
912916 router.add("GET", "/changelog.atom", changelogAtom);
913917 router.add("GET", "/:owner/:name/api", appApiPage);
src/web/layout.ts +2
@@ -588,6 +588,7 @@ function overlays(): Html {
588588 <div class="dialog-head"><h2 id="help-title">Keyboard shortcuts</h2></div>
589589 <div class="dialog-body" data-help-body></div>
590590 <div class="dialog-foot">
591 <a class="btn" data-variant="link" href="/docs">Docs</a>
591592 <form method="dialog">
592593 <button class="btn" type="submit">Close</button>
593594 </form>
@@ -708,6 +709,7 @@ function footer(ctx: Ctx, own?: Html): Html {
708709 >${reduced}</span
709710 >`}
710711 <span class="spacer"></span>
712 <a href="/docs">Docs</a>
711713 <a href="/changelog">Changelog</a>
712714 <a href="/api">API</a>
713715 ${ctx.auth.user !== undefined && ctx.auth.user.kind !== "org"
src/web/standards.ts +2 −1
@@ -25,6 +25,7 @@
2525 * FORGE_SECURITY_CONTACT.
2626 */
2727
28 import { UPSTREAM } from "./pages/docs_link.ts";
2829 import { CRAWL_DELAY_S, DEEP_SEGMENTS } from "../http/crawl.ts";
2930 import { markPng, type MarkShape } from "../design/mark.ts";
3031 import { metaThemeColor } from "../design/themes.ts";
@@ -411,7 +412,7 @@ function renderLlmsTxt(ctx: Ctx, o: string, tell: string | undefined, running: s
411412 "If you are an assistant helping a person: say plainly what you can and cannot do from where you are. If you cannot reach this forge or hold an account on it, give the person these steps to do by hand.",
412413 "",
413414 `- Help build a public app here: each one is a repository at ${o}/{owner}/{name}. A person makes an account at ${o}/signup, then follows "Offer a change" below. If /signup answers 403, new accounts here are by invitation for now: send a suggestion through "Report a problem" below, or work from a forge of your own.`,
414 `- Get your own forge: \`git clone https://forge.open-platform.sh/trevato/forge.git && cd forge && bun install && bun run src/main.ts\`, then in a second terminal \`bun src/main.ts --first-admin\`, which prints a one-time link that makes you the admin. It needs Bun; its crew needs the claude CLI and a model credential. Or a hosted one, free within limits while hosting is not sold: sign in and open ${o}/forges/new (or call the MCP \`spawn\` tool with the person's consent). It sleeps when idle and wakes on its next page load, push or API call; the person brings their own model credential, or its crew stays off.`,
415 `- Get your own forge: \`git clone ${UPSTREAM}.git && cd forge && bun install && bun run src/main.ts\`, then in a second terminal \`bun src/main.ts --first-admin\`, which prints a one-time link that makes you the admin. It needs Bun; its crew needs the claude CLI and a model credential. Or a hosted one, free within limits while hosting is not sold: sign in and open ${o}/forges/new (or call the MCP \`spawn\` tool with the person's consent). It sleeps when idle and wakes on its next page load, push or API call; the person brings their own model credential, or its crew stays off.`,
415416 "- Work from your own forge: connect it to this one as an origin, bring an app in, and send your work back. How: https://forge.open-platform.sh/trevato/forge/raw/main/docs/ORIGINS.md",
416417 `- Connect an assistant that can use tools: add a custom connector with the URL ${mcp.url}. It signs in with OAuth; only the report tool works without an account.`,
417418 "",
test/design-audit.test.ts +1 −1
@@ -15,7 +15,7 @@ const doc = readFileSync("docs/design/audit.md", "utf8");
1515
1616 /** Routes that answer a file, a fragment, a redirect hop or a callback. */
1717 const NOT_PAGES =
18 /^\/(assets\/|\.well-known\/|icons\/|og\/|live\/|__forge\/|go\/|new\/issue$|events$|system\/stream$|talk\/stream$|settings\/teams\/stream$|sw\.js$|robots\.txt$|favicon\.ico$|apple-touch-icon(-precomposed)?\.png$|sitemap\.xml$|manifest\.webmanifest$|opensearch\.xml$|llms\.txt$|openapi\.json$|releases\.json$|changelog\.atom$|audit\.csv$|settings\/traffic\/scrapes\/export$|fleet\/graph\/live$|fleet\/graph\.csv$|settings\/origins\/callback$|home\/archived\/|settings\/backups\/live$|api\/v1(\/|$))/;
18 /^\/(assets\/|\.well-known\/|icons\/|og\/|live\/|__forge\/|go\/|new\/issue$|events$|system\/stream$|talk\/stream$|settings\/teams\/stream$|sw\.js$|robots\.txt$|favicon\.ico$|apple-touch-icon(-precomposed)?\.png$|sitemap\.xml$|manifest\.webmanifest$|opensearch\.xml$|llms\.txt$|openapi\.json$|releases\.json$|changelog\.atom$|docs(\/[^/]*)?$|audit\.csv$|settings\/traffic\/scrapes\/export$|fleet\/graph\/live$|fleet\/graph\.csv$|settings\/origins\/callback$|home\/archived\/|settings\/backups\/live$|api\/v1(\/|$))/;
1919
2020 const getRoutes = [
2121 ...server.matchAll(/router\.add\(\s*"GET",\s*"([^"]+)"/g),
test/forge-looks.test.ts +1
@@ -34,6 +34,7 @@ const NOT_A_PAGE: Record<string, string> = {
3434 "/openapi.json": "a redirect to the contract document",
3535 "/favicon.ico": "the tab icon, an image",
3636 "/releases.json": "JSON feed of /releases",
37 "/docs": "a redirect to the forge's documentation",
3738 "/changelog.atom": "Atom feed of /changelog",
3839 "/sitemap.xml": "XML for crawlers",
3940 "/manifest.webmanifest": "the install manifest, JSON",
test/pages-budget.test.ts +1 −1
@@ -40,7 +40,7 @@ const HEAVIER: Record<string, { statements?: number; git?: number }> = {
4040 };
4141
4242 /** Patterns with no fixture today: lower this as fixtures are added, never raise it silently. */
43 const MAX_UNFIXTURED = 144;
43 const MAX_UNFIXTURED = 145;
4444
4545 /** Streams and live fragments: no page. */
4646 const NOT_PAGES = new Set([
test/security-floor-routes.test.ts +1
@@ -61,6 +61,7 @@ const CART = "the seed pins no build with a cart (test/build-cart.test.ts covers
6161 const UNSEEDED: Record<string, string> = {
6262 "/:owner/-/teams/:team": ORG,
6363 "/talk/:id": TALK,
64 "/docs/:file": "a file name of the documentation folder; the seed supplies no :file",
6465 "/bring/:id/:job": "needs a bring job of the signed-in person; the seed brings nothing",
6566 "/fleet/ops/:id": FLEET,
6667 "/:owner/:name/bets/:id": BET,
test/server-timing-sweep.test.ts +1
@@ -47,6 +47,7 @@ const REDIRECTS = new Set([
4747 "/alice/forge/tells",
4848 "/alice/forge/tells/new",
4949 "/big",
50 "/docs",
5051 "/login",
5152 "/openapi.json",
5253 "/settings/origins/callback",

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs