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

The page manifest knows the docs, changelog, templates, sign-in, sign-up, status and agents pages, and says what an agent can do on each #13859

Merged opened this

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

Merged

The page manifest now gives /docs, /changelog, /templates, /signin, /signup, /status and /agents their own kind and actions. Before, they all answered forge with the same generic list. I pushed the branch.

Notes

shipped production is serving it deploy 4adf612

opened this

The page manifest now gives /docs, /changelog, /templates, /signin, /signup, /status and /agents their own kind and actions. Before, they all answered forge with the same generic list. I pushed the branch.

bun x tsc --noEmit is clean. test/here-manifest.test.ts, test/mcp-here.test.ts, test/here-roles.test.ts and test/mcp-size.test.ts pass, including a new test that covers each kind. scripts/gate.ts --fix changed nothing. I did not run the full suite.

Each page lists its own actions first, then the generic forge list with duplicates dropped:

  • /docs and /docs/…: GET /docs?q=, which carries your query over, and GET /docs/{name}.md.
  • /changelog and /changelog.atom: GET /api/v1/changelog with the releases MCP tool, and the Atom feed.
  • /templates and /templates/…:
    • List the templates: GET /api/v1/templates with the templates tool.
    • Start a forge from one: POST /api/v1/forges {template} with the spawn tool. It is marked as needing an account for anonymous callers.
  • /signin and /signup: kind is signin or signup. Anonymous callers get POST /api/v1/users, plus a note that a passkey needs a person at a browser. Signed-in callers get neither, since they have an account already.
  • /status: GET /status, which answers JSON when sent Accept: application/json.
  • /agents: POST /api/v1/start with the start tool, unless the agent-start setting is off, and GET /llms.txt.

The change is in src/actions/here.ts. The MCP here tool shares manifestFor, so it needed no edit. No new MCP tool, and the size ceilings are untouched.

What I left out:

  • /pricing still answers forge. The issue's checklist doesn't list it.
  • /docs/{name}.md renders HTML. There is no raw-markdown route, so the action says "the markdown source rendered" rather than promising raw markdown.
  • The status action's wording says to send the Accept header, since the route has no MCP tool.

The pre-push hook wanted a "Try:" commit, so the last commit is an empty one that says how to try it. To try it, open GET /api/v1/here?path=/changelog on the preview and look for kind: changelog and the releases tool.

Closes #13849

3 earlier comments · 2 events
commented

The page manifest now gives /docs, /changelog, /templates, /signin, /signup, /status and /agents their own kind and actions. Before, they all answered forge with the same generic list. I pushed the branch.

bun x tsc --noEmit is clean. test/here-manifest.test.ts, test/mcp-here.test.ts, test/here-roles.test.ts and test/mcp-size.test.ts pass, including a new test that covers each kind. scripts/gate.ts --fix changed nothing. I did not run the full suite.

Each page lists its own actions first, then the generic forge list with duplicates dropped:

  • /docs and /docs/…: GET /docs?q=, which carries your query over, and GET /docs/{name}.md.
  • /changelog and /changelog.atom: GET /api/v1/changelog with the releases MCP tool, and the Atom feed.
  • /templates and /templates/…:
    • List the templates: GET /api/v1/templates with the templates tool.
    • Start a forge from one: POST /api/v1/forges {template} with the spawn tool. It is marked as needing an account for anonymous callers.
  • /signin and /signup: kind is signin or signup. Anonymous callers get POST /api/v1/users, plus a note that a passkey needs a person at a browser. Signed-in callers get neither, since they have an account already.
  • /status: GET /status, which answers JSON when sent Accept: application/json.
  • /agents: POST /api/v1/start with the start tool, unless the agent-start setting is off, and GET /llms.txt.

The change is in src/actions/here.ts. The MCP here tool shares manifestFor, so it needed no edit. No new MCP tool, and the size ceilings are untouched.

What I left out:

  • /pricing still answers forge. The issue's checklist doesn't list it.
  • /docs/{name}.md renders HTML. There is no raw-markdown route, so the action says "the markdown source rendered" rather than promising raw markdown.
  • The status action's wording says to send the Accept header, since the route has no MCP tool.

The pre-push hook wanted a "Try:" commit, so the last commit is an empty one that says how to try it. To try it, open GET /api/v1/here?path=/changelog on the preview and look for kind: changelog and the releases tool.

commented

The page manifest now gives docs, changelog, templates, sign-in, sign-up, status and agents their own kind and actions (src/actions/here.ts, with tests in test/here-manifest.test.ts). The check was red on one cause of mine, which this push fixes. The other two failures passed when I re-ran them here, so I changed nothing for them.

  • Fixed: "every http route the manifest names is described" failed because the new manifest actions point at page and feed URLs that the OpenAPI document rightly doesn't describe. These are /docs, /docs/{name}.md, /changelog.atom, /status and /llms.txt. The test already exempted /signin and /signup as pages, so I added those five to the same exempt list in test/openapi.test.ts. The test was wrong here, not the code.
  • Not changed: "the screen shows the share, the budgets that refused and the agent refused" (test/tui-crawlers.test.ts) and "contributing costs the host no forge > the archive answers only what a reader may read" (test/contribute-no-forge.test.ts) both pass when I run them here. The check log marks the second as failing only beside other tests, and my diff doesn't touch either area. I couldn't rule out an order-dependent flake. If they fail again on this push, send me the log.
  • Verified: scripts/gate.ts --fix and tsc --noEmit are clean, and here-manifest, openapi and manifest-roles pass (65 tests).

To try it: GET /api/v1/here?path=/changelog returns kind changelog with the releases tool.

Changes requested — before the latest push

The preview works: /api/v1/here?path=/agents answers kind agents with start and llms.txt first. Fixes needed, in one round:

  1. Tests (box 7): only the happy path is covered. Add (a) /agents with the agent-start setting off must NOT list POST /api/v1/start, and on must list it; (b) /changelog.atom and /docs/x map to their kinds; (c) /docs/a/b or /status/x stay forge (the name-undefined rule); (d) an anonymous vs signed-in comparison for each kind showing they differ only in account flags / the users action; (e) the docs q carry-over is capped/encoded (q with & and a 300-char value).
  2. Box 1 says read a guide as markdown, but /docs/{name}.md returns rendered HTML (the pull admits this). Either add a real raw-markdown answer or word the action honestly and leave the box open; the http string GET /docs/{name}.md still promises markdown.
  3. here.ts: keptActions is computed twice in the dedup filter, and the dedup runs per forge action; compute it once. Also the nested ternary is hard to read; pull it into a helper (e.g. actionsFor). The new test/openapi.test.ts line is over-long and not wrapped.
  4. The pull is a feature while the direction is pipeline first; keep it small and do not widen scope further.
commented

This round's changes are pushed to the branch. tsc is clean and the here-manifest, openapi and manifest-roles tests pass (69). I ran gate.ts --fix too, which printed nothing.

What changed

  • Docs action worded honestly (item 2): I did not add a raw-markdown route. The action now reads "read a guide page, as HTML (/llms.txt lists them)" and its http string is GET /docs/{name}. That keeps this pull small, as item 4 asks. The openapi test's exempt list now has /docs/{name} in place of /docs/{name}.md.
  • here.ts (item 3):
    • A new actionsFor helper replaces the nested ternary.
    • keptActions is computed once per request, and the forge actions are filtered against that one result.
  • Where /docs/a/b stands (item 1c): this was a real bug, which the new test caught. /docs/a/b was being read as docs. A kept page now matches only one level deep, so /docs/a/b, /status/x, /agents/x and /changelog/x all stay forge.
  • New tests (item 1):
    • (a) /agents lists POST /api/v1/start when the agent-start setting is open and drops it when off.
    • (b) /changelog.atom maps to changelog and /docs/x to docs.
    • (c) The deeper paths above stay forge.
    • (d) For /docs, /changelog, /templates, /signin, /status and /agents, anonymous and signed-in have the same here. They differ only in the users action (signin) and the spawn account flag (templates).
    • (e) A q containing &, =, # and 300 characters comes out percent-encoded and capped.
  • test/openapi.test.ts (item 3): the long exempt-pages line is now one array entry per line.

Disagreement

  • (d) is only partly pinned. Signed-in users get the same page actions as anonymous ones, apart from the signin users action and the templates spawn flag. The test checks that no extra docs or status actions appear for them. It does not check the full action list.
Approved

Earlier asks are met: the docs action now says HTML and not markdown; actionsFor replaces the nested ternary; /docs/a/b and other deeper paths stay forge; the new tests cover agent-start off/open, the atom and one-deep mapping, q capping and encoding, and the anonymous/signed-in difference. On the preview, /changelog, /docs/x, /agents and /signin answer with their own kind and actions, and /docs/a/b stays forge. Next, non-blocking: (1) make test (d) compare the full action lists, so it pins the anonymous/signed-in difference and not only the absence of extra docs/status actions; (2) /pricing still answers forge, so follow up when the issue lists it. Box 2 is met as a manifest action: the changelog actions name the API, the releases tool and the atom feed.

commented

Left #13849 open: 1 unticked item remain (A test per kind; the anonymous and signed-in answers differ only where the person can do more.).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs