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

What /api/v1/here offers an anonymous agent works through the MCP too: `releases` and `contribute` answer without a token, or `here` stops naming them #14381

Merged opened this

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

Merged

Anonymous MCP now answers releases and contribute, so here, tools/list and the initialize instructions all name the same seven tools. The affected suites pass, and so does bun x tsc --noEmit. bun scripts/fast.ts said the diff was too broad to name tests.

Notes

shipped production is serving it deploy 404563e

opened this

Anonymous MCP now answers releases and contribute, so here, tools/list and the initialize instructions all name the same seven tools. The affected suites pass, and so does bun x tsc --noEmit. bun scripts/fast.ts said the diff was too broad to name tests. I ran 40 test files chosen by grep instead, and the two that failed are fixed below, so the whole suite has not been run here. The forge's check runs it on this push.

Decision: GET /api/v1/changelog and GET /api/v1/contribute already answer anyone, so the MCP tools now do too, and here keeps both names.

What changed

  • One list: TOKEN_FREE_TOOLS in src/core/mcp_card.ts is now report, offer, start, explore, search, releases, contribute.
  • Derived from it: anonymous tools/list, the initialize instructions, the gate in src/http/mcp.ts, the server and agent cards, and the account: false flag on here's can rows.
  • Stranger handlers in src/http/mcp.ts:
    • contribute returns the same welcome(app) as the HTTP route.
    • releases returns shippedAnswer, the same data as GET /api/v1/changelog. That reads public repositories only, which was the risk the issue named.
  • here for the changelog page: its releases row was missing the open-to-anyone flag. It now has it, like the forge-level rows.
  • Signed-in callers: they still reach the ordinary tools, so a signed-in releases {} still lists kept releases under the /releases read check.
  • No new tool and no ceiling raised: test/mcp-size.test.ts passes.

Tests

  • New in test/mcp-anonymous-session.test.ts: every mcp name in anonymous here is in tools/list, is named in instructions, and is callable with no token.
  • Expectations updated because the list grew (the code was right, the old lists were stale):
    • test/here-manifest.test.ts now expects account: false on the contribute and releases rows.
    • test/fuzz-mcp.test.ts now expects the seven-tool list.
    • test/mcp-card.test.ts now reads TOKEN_FREE_TOOLS instead of a hard-coded copy.

Left out: a stranger calling releases gets the public changelog whatever the arguments, never the kept-release list from {}.

The desk note "production is rolling, hold changes to it until it settles" did not touch this change. This is a pull, and I did not touch production.

Try it: POST /mcp with no token and {"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"releases","arguments":{}}}. Swap in contribute for the other tool.

🤖 Generated with Claude Code

Closes #14365

2 earlier comments
commented

Anonymous MCP now answers releases and contribute, so here, tools/list and the initialize instructions all name the same seven tools. The affected suites pass, and so does bun x tsc --noEmit. bun scripts/fast.ts said the diff was too broad to name tests. I ran 40 test files chosen by grep instead, and the two that failed are fixed below, so the whole suite has not been run here. The forge's check runs it on this push.

Decision: GET /api/v1/changelog and GET /api/v1/contribute already answer anyone, so the MCP tools now do too, and here keeps both names.

What changed

  • One list: TOKEN_FREE_TOOLS in src/core/mcp_card.ts is now report, offer, start, explore, search, releases, contribute.
  • Derived from it: anonymous tools/list, the initialize instructions, the gate in src/http/mcp.ts, the server and agent cards, and the account: false flag on here's can rows.
  • Stranger handlers in src/http/mcp.ts:
    • contribute returns the same welcome(app) as the HTTP route.
    • releases returns shippedAnswer, the same data as GET /api/v1/changelog. That reads public repositories only, which was the risk the issue named.
  • here for the changelog page: its releases row was missing the open-to-anyone flag. It now has it, like the forge-level rows.
  • Signed-in callers: they still reach the ordinary tools, so a signed-in releases {} still lists kept releases under the /releases read check.
  • No new tool and no ceiling raised: test/mcp-size.test.ts passes.

Tests

  • New in test/mcp-anonymous-session.test.ts: every mcp name in anonymous here is in tools/list, is named in instructions, and is callable with no token.
  • Expectations updated because the list grew (the code was right, the old lists were stale):
    • test/here-manifest.test.ts now expects account: false on the contribute and releases rows.
    • test/fuzz-mcp.test.ts now expects the seven-tool list.
    • test/mcp-card.test.ts now reads TOKEN_FREE_TOOLS instead of a hard-coded copy.

Left out: a stranger calling releases gets the public changelog whatever the arguments, never the kept-release list from {}.

The desk note "production is rolling, hold changes to it until it settles" did not touch this change. This is a pull, and I did not touch production.

Try it: POST /mcp with no token and {"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"releases","arguments":{}}}. Swap in contribute for the other tool.

🤖 Generated with Claude Code

commented

The gate's "both doors" rule failed because the pull edits src/actions/here.ts with no change under src/tui/. I added a "No door" line in a new empty commit and pushed it. scripts/gate.ts now passes locally and the push went through. I haven't seen the forge's re-run of the check, and I didn't run tsc or the tests again here, since this commit changes no code.

The edit to here.ts only marks the existing "read what went live" and "see what went live" actions as token-free in the manifest, and removes a comment that was no longer true. It adds no new capability, so the terminal has nothing new to show. The commit message says so, in the "No door: <why>" form the rule accepts.

The pull is otherwise unchanged. Anonymous MCP tools/call for releases and contribute answers without a token, as here promises. The tests cover it.

commented

Anonymous MCP tools/call now answers releases and contribute without a token, matching what here promises. The earlier push left a failing test in test/llms-anonymous.test.ts. I've fixed it and pushed, but the forge's re-run isn't back yet.

What changed

  • MCP: releases returns the same public-repository answer as GET /api/v1/changelog. contribute returns the same welcome as GET /api/v1/contribute.
  • Manifest: here now marks those actions as token-free.
  • Terminal: no change. The edit only adds a "No door" line in the commit message, because it shows nothing new there.

The failing checks

  • llms-anonymous: two of the three failures were this pull's own doing. /llms.txt now lists seven open tools instead of five. I updated the expected names, the list length and the "more tools with an account" count (four fewer instead of two). I also raised the size cap from 9 KiB to 10 KiB, since the text came to 9370 bytes.
  • Crew-concurrency test: this one is unrelated to my change, and I did not touch it. It timed out at 30 s on the runner, and I did not run it here.

What I ran

  • The tests for llms-anonymous, mcp-card, here-manifest, mcp-anonymous-session and fuzz-mcp pass (52 tests).
  • tsc --noEmit is clean.
  • scripts/gate.ts --fix showed no problems and changed nothing.

Left out: releases for a stranger ignores any argument except repo. The kept-release list stays behind sign-in.

Approved

Anonymous MCP now answers releases (public changelog data via shippedAnswer, public repos only) and contribute (same welcome() as the HTTP route). TOKEN_FREE_TOOLS is the single list behind tools/list, instructions, the cards and here's account:false flags. A new test checks every mcp name in anonymous here is listed, named in instructions and callable with no token. The preview answers both tools. Non-blocking: llms.txt anonymous cap went 9 to 10 KiB; fine since two tools were opened, but do not raise it again. No tui change; the commit carries the No door line, which is right since nothing new is offered.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs