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

The agent card lists what a stranger may call, not all 199 tools, and agrees with llms.txt #12411

Merged opened this

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

Merged

The agent card now shows a stranger only the tools open without a token, and a signed-in reader gets the full list. The card and /llms.txt agree on the count. bun x tsc --noEmit and the card and standards-conformance tests pass.

Notes

shipped production is serving it deploy 5bb6da3

opened this

The agent card now shows a stranger only the tools open without a token, and a signed-in reader gets the full list. The card and /llms.txt agree on the count. bun x tsc --noEmit and the card and standards-conformance tests pass. The gate printed only a pre-push reminder to add a "Try:" line, which I added. I did not run the full suite; the forge runs it on push.

What changed

  • Anonymous card: skills is report, start and one more-after-sign-in entry that reads "N more tools with an account: call tools/list on …/mcp once signed in." It stays under 8 KB.
  • Token card: with a token it still lists one skill per tool, the same list mcp.json names.
  • Who counts as signed in: the card uses the same check /llms.txt uses, so a session cookie counts as well as a bearer token.
  • Caching: the response sends Vary: Cookie, Authorization, and each kind of reader has its own cached body and its own ETag. A 304 is honoured per reader.
  • One list: both cards and /llms.txt still read the one tool list. I added moreAfterSignIn() in src/core/mcp_card.ts, which counts the tools beyond the token-free ones.
  • Tests: test/agent-card.test.ts covers the full list with a token, the anonymous skills and size, the ETag per reader, and a check that the card's number equals the one /llms.txt prints.

What I chose not to do

  • /llms.txt still counts from its own variable, not from moreAfterSignIn(). The test is what keeps the two equal, as the issue asked.
  • Caches that served the old 64 KB card hold it for up to an hour (max-age=3600). I did not try to purge them; the new body has a different ETag.

How to try it

  • Run curl -s <origin>/.well-known/agent-card.json for the short card.
  • Add -H 'Authorization: Bearer <token>' for the full card.

Closes #12398

6 earlier comments · 1 event
commented

The agent card now shows a stranger only the tools open without a token, and a signed-in reader gets the full list. The card and /llms.txt agree on the count. bun x tsc --noEmit and the card and standards-conformance tests pass. The gate printed only a pre-push reminder to add a "Try:" line, which I added. I did not run the full suite; the forge runs it on push.

What changed

  • Anonymous card: skills is report, start and one more-after-sign-in entry that reads "N more tools with an account: call tools/list on …/mcp once signed in." It stays under 8 KB.
  • Token card: with a token it still lists one skill per tool, the same list mcp.json names.
  • Who counts as signed in: the card uses the same check /llms.txt uses, so a session cookie counts as well as a bearer token.
  • Caching: the response sends Vary: Cookie, Authorization, and each kind of reader has its own cached body and its own ETag. A 304 is honoured per reader.
  • One list: both cards and /llms.txt still read the one tool list. I added moreAfterSignIn() in src/core/mcp_card.ts, which counts the tools beyond the token-free ones.
  • Tests: test/agent-card.test.ts covers the full list with a token, the anonymous skills and size, the ETag per reader, and a check that the card's number equals the one /llms.txt prints.

What I chose not to do

  • /llms.txt still counts from its own variable, not from moreAfterSignIn(). The test is what keeps the two equal, as the issue asked.
  • Caches that served the old 64 KB card hold it for up to an hour (max-age=3600). I did not try to purge them; the new body has a different ETag.

How to try it

  • Run curl -s <origin>/.well-known/agent-card.json for the short card.
  • Add -H 'Authorization: Bearer <token>' for the full card.
commented

The preview needs no fix from me, and I'm pushing nothing new.

  • The preview is up. It answers 200 at https://lab--12411--forge-trevato-apps.open-platform.sh/. The log you pasted is the app running normally: process counts and SQL statistics.
  • What the message means. "No tests declared, none run" comes from forge.json. Its app block declares no test command, so the preview deploy runs none. Tests run in the check block (gate, tsc, sharded tests), which the forge runs on every push. My change didn't touch forge.json, and the same message would show on any pull.
  • My own checks. bun x tsc --noEmit and the agent-card and standards-conformance tests passed locally.

If a specific preview check is still red, send me its log.

commented

I merged main into the branch and pushed it. The agent-card tests pass (5 of 5). I ran only that file, not the whole suite.

  • Conflict: test/agent-card.test.ts clashed in two places. I kept both sides: the new OFFER_TOOL import and its place in the served list, plus my createUser / createToken imports for the bearer token.
  • Test change: on main the card lists the open tools in a different order (explore, search, report, start, offer). My stranger test expected them in the order of TOKEN_FREE_TOOLS. It now checks that more-after-sign-in comes last and that the rest match TOKEN_FREE_TOOLS as a set. The card itself is unchanged.
  • Type check: bun x tsc --noEmit reports two "latin1" encoding errors, in src/web/render/kinds.ts and test/render-xlsx.test.ts. I didn't touch either file. I did not run scripts/gate.ts.
commented

The check on this pull's head fails, and it is not the preview: the deploy log you were shown is a success. These are the failing lines from check run 01m7eq1y57934ngsk69azcrne6 (ended 2026-11-15T04:22), quoted from its log:

gate: rule "before/after looks": this pull changes src/web/standards.ts but no commit message has a "Looks: <path>" line naming the page of app.looks that shows it; the forge takes the before/after pictures (light and dark) of that page on the preview. Or put a "No look: <why>" line (10+ characters)
gate: rule "a comment line is wrapped at 100 columns": src/core/mcp_card.ts:183 is 110 long; rewrap it

Fix exactly these, then push. Nothing else is being asked.

commented

The gate ran before the commit, so its output above was stale. I did not re-run it afterwards, so neither fix is confirmed. I pushed the fix for both failures, and the forge's check on this push will show whether they clear.

  • Comment wrap: the doc comment on moreAfterSignIn in src/core/mcp_card.ts is now three lines, none over 100 columns.
  • Looks rule: I added a No look: line to the commit message instead of a Looks: line. The change to src/web/standards.ts only alters the plain-text /llms.txt output, and no page in app.looks renders that.

bun x tsc --noEmit printed nothing, so it is clean. I ran no tests, since the only code edit is a comment.

I left four other comment lines in src/core/mcp_card.ts over 100 columns. They were not in the gate's failure log and are not in this pull's diff, so I did not touch them.

Changes requested — before the latest push

Close, one fix needed. The anonymous card works (report, start, offer-style open tools plus one more-after-sign-in line, about 3 KB), Vary and per-reader ETags are right, and the card/llms.txt count test is good. Fix first: the signed-in card must say it is the full list (box 2); today it is byte-identical in shape to the old card with nothing naming it. Also: (a) a signed-in body is served with cache-control: public; make it private for the signed-in reader (or no-store) so a shared cache never stores an account's view; (b) the test for the signed-in card should assert the statement. No design-system issue: this is machine JSON/plain text, no page markup changed.

commented

The signed-in agent card now says it is the full list, and it is no longer served with cache-control: public. I pushed both changes. test/agent-card.test.ts passes, tsc is clean and the gate printed nothing.

  • Scope field: the card has a new skillsScope field. It is "full" for a signed-in reader and "open" for a stranger, so an agent can tell which list it holds. The change is in src/core/mcp_card.ts.
  • Cache header: the signed-in card is served with private, max-age=3600. The stranger's card keeps public, max-age=3600. The change is in agentCardJson in src/web/standards.ts.
  • Tests: the signed-in test asserts skillsScope is "full", that more-after-sign-in is absent, and that the header is private, max-age=3600. The stranger test asserts "open" and the public header.

The commit message carries a No look: line, since this is JSON that no page in app.looks shows.

commented

The gate failure is fixed and pushed. The skillsScope comment I added last round was 107 columns. It is now two lines, and scripts/gate.ts prints nothing on a re-run.

The first gate run in my earlier command still showed the old line. I think it was reading the tree before my edit landed, but I didn't check. bun x tsc --noEmit is clean and test/agent-card.test.ts passes. I did not run the wider fast tier the forge runs after the gate.

Approved

Earlier asks are met: the signed-in card says it is the full list (skillsScope: full) and is served private; the stranger card is public, carries Vary on Cookie and Authorization, has its own ETag, and the 304 is honoured per reader. On the preview the stranger card lists the open tools plus one more-after-sign-in entry saying 196 more, and /llms.txt prints the same 196. The new test fails if the two differ. Both come from the one tool list. Next, in order: 1) Non-blocking: have llms.txt call moreAfterSignIn() so the number has one source and the test is a backstop. 2) Non-blocking: the issue says a bearer token, but a session cookie also gets the full card. That matches llms.txt, so keep it and say so in the docs.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs