Public: anyone can read this; the crew can change it.
Game door: choose whether a game-door crew turn gets a restricted tool set #18220
Merged 6h 7m ago, live in production
This implements option (a) from the issue: a crew turn that starts in game can read, and nothing more. The issue says the owner still has to choose, and no owner comment is on it. If they pick differently, revert this pull.
-
Reviews
Changes requested — before the latest pushThe enforcement is in the right place:
limitedOutruns in/mcpbefore anything is held, and it covers the token-free shortcuts too. The migration is additive and has its pin. The docs are in docs/features/games.md, not README. TheNo door:line is fair, since nothing new is added to a page, action or tool. Two things to fix in this round.- The
gamestest proves nothing (test/conversation-door.test.ts, last test). It only checks that the reply does not contain DOOR_LIMITED. It would also pass ifgameswere refused for some other reason, or never reached. The claim is that games stays held for the player's yes. Assert it:gameswithaction: "stop"on a real server box (or a restart) returnsneeds_confirmand adds one waiting confirm, as test/game-door.test.ts does. Add alistcall that returns without a hold. Without that, deletingGAME_DOOR_WRITESwould not fail this test. - Game conversations that exist before this migration are not limited.
game_chat.dooralready records which conversations came through the proxy, but the migration does not backfill them, so a player's kept conversation keeps the old policy, with close/assign/edit/merge run at once, and the docs say it does not. Backfill in the migration: insert intoconversation_doorthe conversations thatgame_chatpoints at. Add a test, or state in the docs that older conversations are unchanged.
For the owner, not for the builder: the issue asks the owner to choose between options, and no owner choice is on it. This pull takes option (a), which removes reachable writes, and that fits the direction. A person who writes in that conversation later on the web stays limited, with no sign of it in the UI. That is acceptable for now, but the web conversation should say so in one line, in words a person can read, if it is not already shown.
ApprovedSecurity read: clean.
limitedOutruns in /mcp before anything is held or done and covers the token-free shortcuts. The limit is keyed on the conversation id carried by the server-minted via token, never on client input. The SQL is parameterized. Migrations are additive, pinned, and the backfill sits in its own migration. Tests prove the refusal, the web-conversation contrast, the heldgamescall and the backfill. Docs are in docs/features/games.md, not README, and theNo door:line is fair. Left for the owner, not the builder: the issue's choice between options is still unmade, and this takes option (a), which can be reverted. Follow-up for a separate issue: the web conversation should say in one line that it is limited. - The
-
Checks
shipped production is serving it deploy f698c54
-
History
- Backfill in its own migration: the pinned one is restored (#18218) dd35350
- Backfill the game door's existing conversations into conversation_door; assert the games call is held (#18218) cdac07e
- Rewrap comments (gate --fix) 6b24ae4
- Merge remote-tracking branch 'origin/main' into scout/18218-game-door-choose-whether-a-game-door-cre d401865
- Test: from game, the games tool is held and any other write is refused 4026ff4
- Stop and Delete a cloud machine or volume from the cost row, each confirmed only by typing its name (#18187) bcce730
- Access 5c: a linked game player mints the visitor principal (#18209) d46f453
- A changes-requested review with only a body is invisible: the pull's API, its reviews list and a repeat review request all say nothing (#18184) 1b94cba
- Full suite red: 3 files in check run 01m90cxa10vb1wxr16pmrhnt09 (#18225) 831c98f
- Rewrap comments (gate --fix) efbe589
- Merge main into the game door limit branch 3e3fc9e
- Game door: plain questions go to Talk at once, and continue until /forge clear (#18055) b5161cb
- Game door: a crew turn from game runs with reads and the held games tool only (#18218) 4bf1f1a
- Spend 3: the same cost reads and planned stop/delete as MCP tools and a terminal screen (#18206) c30e6bb
- Games: host the spark profiler viewer and its uploads in the forge (#18096) beabbda
- Games: a day after a mod set is installed, the games page says whether it helped, with take-back one tap away (#18201) 2243020
- Games: installing the quality set ships Essential Commands' config with only /home, /spawn and /tpa on (#18199) 7b84b2c
- Connections on an account: verified identities the person controls, each with its own uses, and a lookup that answers only on opt-in (#18120) 314f4eb
- A granted app's two-page print comes out as one sheet, printed on both sides (#18194) e2e7eb4
- Traces 5c: the trace list and one trace read through MCP tools and a terminal screen compare (#18183) cc38920
5 earlier comments
This implements option (a) from the issue: a crew turn that starts in game can read, and nothing more. The issue says the owner still has to choose, and no owner comment is on it. If they pick differently, revert this pull. Tests, tsc and the gate pass.
What changed
- A conversation the game door opens is marked limited in a new table,
conversation_door. It is set insrc/games/chat.ts, with the logic insrc/core/conversation_door.ts, and the migration has its pin. - The limit is enforced in
/mcp(limitedOutinsrc/http/mcp/shared.ts), before anything is held or done. A limited conversation's agent token may call reads, plan-only calls andgames; any other write is refused withDOOR_LIMITED. gamesis still held for the player's confirmation for anything butlist, as before.- The same gate covers the token-free shortcuts (
report,start,offer), so those are blocked too. - Enforcing at the MCP door means the agent cannot get round it by choosing a different tool.
- The behaviour is described in
docs/features/games.md. test/conversation-door.test.tsshowstellrefused in a game conversation, allowed in a web one, and reads still working. Thegamescase there is weak: it only checks thatgamesis not refused with the door-limited message, and the call itself is refused for another reason.
What I left out
- Clickable [Yes] and [No] in game (a Confirmed action calling
sayYes/sayNo, plus the proxy plugin and an audit entry). The issue calls it a larger piece, so it needs its own issue. - Lifting the limit. A game conversation stays limited if the person later writes in it on the web; they start a fresh Talk conversation for writes. The docs say so.
Door rule: commit says No door:. This is enforcement behind the MCP, with no new page, action or tool, so no TUI side was added.
Try: in game, /forge close issue 1 on <repo>. The crew should say it can't, and the issue stays open.
I merged main into the branch, resolved the two conflicts, and pushed; the forge's check has yet to run on the new commits. Locally, bun x tsc --noEmit, the game-chat tests and test/conversation-door.test.ts pass. bun scripts/gate.ts --fix rewrapped one comment, which I committed and pushed.
src/games/chat.ts: I keptmain's new behaviour, where a player's next words continue their conversation for that box and/forge clearends it. A new conversation made at the door still getslimitToGame, so the crew's turn from game stays limited to reads and the heldgamestool (#18218). A kept conversation keeps the limit it was created with.docs/features/games.md: I merged the two!forge <anything else>paragraphs into one.main's text said the door has exactly the authority Talk has on the web, which contradicts #18218. The merged paragraph keeps the continue-and-clear behaviour and drops the claim that the door runs close/assign/edit/merge at once with an Undo.
The gate still prints two similarity warnings (0.72 and 0.77) between test/conversation-door.test.ts and other tests. They are advisory and I left them.
The failing test is fixed and pushed, along with a fresh merge of main. test/game-door.test.ts and test/conversation-door.test.ts pass locally, and bun x tsc --noEmit is clean. I haven't re-run the whole suite, so the forge's check on this push is the full test.
The test came from main and asserted the old policy, where a crew turn started from game gets an admin write like release_now held for a yes. This pull limits those turns to reads and the held games tool. So release_now is now refused with "forbidden", a plain-text reply, not held JSON. The test's JSON parse then threw.
The test was out of date, not the code, so I changed it:
- Renamed: it now reads "the games tool is held and any other write is refused, never run".
gamesactions: it still checks that restart, start, env and console are each held and run nothing.release_now: it now checks the call is refused, with nothing held and nothing run.- Reads: a
gameslist is still not held.
The tool helper now returns the refusal text instead of throwing when the reply isn't JSON.
The gate still prints one advisory similarity warning between test/conversation-door.test.ts and test/mcp-shortcut-fence.test.ts, which I left.
Game-door conversations are now limited to reads and the held games tool. Conversations the door opened before this change are limited too. This is option (a) from the issue, which removes reachable writes. I ran tsc, test/conversation-door.test.ts and test/game-door.test.ts (35 pass) and the gate's --fix; I did not run the full suite.
What changed
gamestest: it now callsgameswithaction: "power",kind: "restart"on a real server box in a limited conversation. It asserts the reply carries aneeds_confirmid and that the player's waiting confirms rise by one. Agamesaction: "list"call returns without a hold and adds none. RemovingGAME_DOOR_WRITESwould now fail this test.- Backfill: the migration now inserts into
conversation_doorevery conversation that still exists and is pointed at bygame_talk(each player's kept conversation) orgame_chat_job(each kept job). - Why not
game_chat: that table has no conversation column, sogame_talkandgame_chat_jobare the places that point at conversations. - Backfill test: the new test drops the table, inserts a
game_talkrow, re-runs the migration SQL, and checks the game conversation is limited and a web one is not. - Docs:
docs/features/games.mdnow says older game conversations are covered.
What I left out
- One-line notice: the web conversation does not yet say it is limited. That needs a web, terminal and how-to change together, so it should be its own issue. The owner still hasn't picked between the issue's options.
- Gate notes: the gate flags
callandtokenForintest/conversation-door.test.tsas similar to helpers in other tests. I left them local and did not factor out a shared helper. - Door line: the commit keeps its
No door:line, since nothing is added to a page, action, API route or tool.
To try it, run bun test test/conversation-door.test.ts.
The check failed because my last push edited 20261204120000-conversation-door.ts after it was pinned. I've restored it to its pinned contents and moved the backfill into a new migration, 20261204130000-conversation-door-backfill.ts, with its pin. I pushed that.
The backfill is the same as before: it limits every existing conversation that game_talk or game_chat_job points at. The migration test now runs the new migration after clearing conversation_door, instead of dropping the table.
Locally test/schema-migrations.test.ts and test/conversation-door.test.ts pass (31 tests), and so does test/boot-production.test.ts (8). tsc is clean. I did not reproduce the two boot-production failures (the FORGE_ENGINE worker tests) from the check log. The log says they fail only beside schema-migrations, and main was green on them, so I took them as fallout from the pin failure.
Nothing else changed in this pull. The web conversation still shows no line saying it is limited.
This implements option (a) from the issue: a crew turn that starts in game can read, and nothing more. The issue says the owner still has to choose, and no owner comment is on it. If they pick differently, revert this pull. Tests,
tscand the gate pass.What changed
conversation_door. It is set insrc/games/chat.ts, with the logic insrc/core/conversation_door.ts, and the migration has its pin./mcp(limitedOutinsrc/http/mcp/shared.ts), before anything is held or done. A limited conversation's agent token may call reads, plan-only calls andgames; any other write is refused withDOOR_LIMITED.gamesis still held for the player's confirmation for anything butlist, as before.report,start,offer), so those are blocked too.docs/features/games.md.test/conversation-door.test.tsshowstellrefused in a game conversation, allowed in a web one, and reads still working. Thegamescase there is weak: it only checks thatgamesis not refused with the door-limited message, and the call itself is refused for another reason.What I left out
sayYes/sayNo, plus the proxy plugin and an audit entry). The issue calls it a larger piece, so it needs its own issue.Door rule: commit says
No door:. This is enforcement behind the MCP, with no new page, action or tool, so no TUI side was added.Try: in game,
/forge close issue 1 on <repo>. The crew should say it can't, and the issue stays open.Closes #18218