Public: anyone can read this; the crew can change it.
iOS: use the same Talk and the game door's write window and lock (#18247) #18328
Parked 14h 15m ago
The iOS app can now read the game door, lock it, set the window length and open a write window with a passkey. All of it goes through five new JSON routes under /api/v1/games/ /door. The new door-API tests, the existing write-window tests and the gate pass, and tsc is clean.
-
Reviews
No review yet.
-
Checks
stopped parked by the crew deploy fb6fb84
-
History
- Game door read route: name it unseeded in the floor walk, declare only the refusals the probe answers fb6fb84
- Name the game door's read route among the pages the budget fixture cannot fill e6d11a8
- Game door: the owner's lock, window length and passkey-opened write window over the API for iOS, one action under page and routes 5fcd388
- Talk opens on the conversation the person was in, at the place they left it (#18322) 3eab8eb
- Universal runner: a Mac registers itself, ships TestFlight from main with the forge's secrets, and has one switch (#18291) 08c168a
- Game door: the desk snapshot carries each player's allowed servers, from whoMayReach (#18325) 9b34956
- Connections 1: one list of proven identities on the account, with the proven email and the Minecraft link moved into it (#18168) 278b2e3
- Game door: one Talk engine for game chat, web and iOS (#18316) 8304196
- Game door: a read-only switch and a one-hour write window the owner opens with a second factor (#18304) 1235063
- Full suite red: 2 files in check run 01m91f4z6qq7gd3712hjm33z1r (#18315) 1f9f7ad
- Tab forge: serve the forge as the tab's own page in the hosted shell, no frame (#18306) d162615
- Connections: a Minecraft name is a second kind of proven connection beside email (#18227) 5948687
- Access 5c: the tab forge and the Apple app's on-device mode present the same visitor to a shared forge, so apps made without a login arrive owned (#18275) ec352f4
- Tab forge: making an app is refused ("not from this forge's own page") (#18267) b869757
- The release was held: could not cut the tag v0.7.741 (#18299) 4d3523d
- Tab forge: a real-browser walk makes an app and edits a file without 'Failed to fetch' (#18307) c343cd7
- Game door: each player sees and reaches only the servers their forge grant allows (#18301) 37e3d90
- Report key: an admin makes, rotates and revokes it through the JSON API, in the settings page's words (#18289) ff66ea0
- Tab forge: the whole tab, the whole forge, and this machine put to work (#18290) 8089d62
- Apple crash reports: the app's owner sees the groups on the telemetry view, is told once per new group, and /privacy says what a report holds (#18302) c6bd3f3
3 earlier comments · 1 event
The iOS app can now read the game door, lock it, set the window length and open a write window with a passkey. All of it goes through five new JSON routes under /api/v1/games/<box>/door. The new door-API tests, the existing write-window tests and the gate pass, and tsc is clean. I did not run the full suite. The one gap in the tests is the passkey success path: no test signs a real WebAuthn assertion, so only the refusals are covered.
Talk and held actions. Talk and a held action's yes or no already ride POST /api/v1/conversation/messages and POST /api/v1/conversation-confirms/:id. A build held in game can therefore already be answered from the app, and the answer shows on the web and in game. I changed nothing there, apart from the shared check below.
The routes. Only the box's owner can use them, on their own session or their own rw token. A run, app or Talk via token cannot. A stranger who cannot see the box gets 404, an operator gets 403, and a browser from another origin gets 403.
GET …/doorreturns the state, the one-line words every door shows, why the window is as long as it is, and whether the owner has a passkey.POST …/door/locklocks the door at once.POST …/door/minuteswith{minutes}sets the next window's length (5 to 720 whole minutes).POST …/door/optionsreturns a passkey challenge,rpIdand the owner's key ids.POST …/door/opentakes the signed answer and opens the window. Missing fields give 422, and a bad or already-used challenge gives 403 with the door unchanged. A token alone never opens a window.
What moved where.
- One action for page and routes. The page's lock, length and passkey-open logic moved from
src/web/pages/games_door.tsintosrc/actions/game_door.ts, so the page and the routes share one implementation. The routes are insrc/http/api/game_door.ts. - Shared own-credential check. The "this is the person's own credential" check from the held-action yes route moved into
src/http/own_credential.ts, and that route and the door routes both use it. - Docs and registration. The five routes have OpenAPI entries and are in the lazy route list. A paragraph in
docs/features/games.mddescribes the door on iOS.
What I chose not to do.
- Terminal. The terminal already shows the door and locks it with
w. A passkey can only be signed in a browser or the app, so I added nothing there. The commit saysNo door:for this. - Swift client. The iOS app's Swift code is not in this repository. This pull is the server side the app calls.
- Automatic lock on leaving the network. The issue's "flip it automatically" setting belongs to #18247's other items, not this split.
- Page look. The page renders as before, so the commit says
No look:.
How to try it. As the box's owner, with an rw token on the preview: curl -H "authorization: Bearer $TOKEN" https://<preview>/api/v1/games/<box>/door. Then POST …/door/lock, or POST …/door/options for a challenge. The tests are in test/game-door-api.test.ts.
The iOS app can now read the game door, lock it, set the window length and open a write window with a passkey, through five new routes under /api/v1/games/<box>/door. The failing check is fixed: the budget fixture could not fill GET /api/v1/games/:box/door. I added test/budgets/unfixtured/api-games-box-door.json to name it, and test/pages-budget.test.ts now passes. I did not re-run the full suite, and the forge's check will run it on this push.
Talk and held actions. Talk and a held action's yes or no already ride POST /api/v1/conversation/messages and POST /api/v1/conversation-confirms/:id. So a build held in game can be answered from the app, and the answer shows on the web and in game. The one change there is that the "this is the person's own credential" check moved to src/http/own_credential.ts, which that route and the door routes both use.
The routes. They are for the box's owner only, on their own session or their own rw token. A run, app or Talk via token cannot use them. A stranger gets 404, an operator gets 403, and a browser from another origin gets 403.
GET …/doorreturns the door's state, the one-line words every door shows, why the window is as long as it is, and whether the owner has a passkey.POST …/door/locklocks the door at once.POST …/door/minuteswith{minutes}sets the next window's length, 5 to 720 whole minutes.POST …/door/optionsreturns a passkey challenge,rpIdand the owner's key ids.POST …/door/opentakes the signed answer and opens the window. Missing fields give 422. A bad or already-used challenge gives 403 and the door stays as it was. A password or a token alone never opens a window.
What moved where.
- Shared action: the page's lock, length and passkey-open logic moved from
src/web/pages/games_door.tsintosrc/actions/game_door.ts. The page and the routes insrc/http/api/game_door.tsshare it, so there is one implementation. - Docs: the five routes have OpenAPI entries and a paragraph in
docs/features/games.md.
What I chose not to do.
- Terminal: it already shows the door and locks it with
w. A passkey can only be signed in a browser or the app, so I added nothing there. - Swift client: the iOS app's Swift code is not in this repository. This pull is the server side the app calls.
- Automatic lock on leaving the network: that setting from #18247 is not part of this split.
- Passkey success path: no test signs a real WebAuthn assertion. The new tests cover only the refusals; the signing itself is untested here.
How to try it. As the box's owner with an rw token on the preview: curl -H "authorization: Bearer $TOKEN" https://<preview>/api/v1/games/<box>/door. Then POST …/door/lock, or POST …/door/options for a challenge. The route tests are in test/game-door-api.test.ts.
🤖 Generated with Claude Code
I fixed both failing tests and pushed. The two suites that failed (test/security-floor-routes.test.ts and test/openapi-errors.test.ts) pass locally, along with test/game-door-api.test.ts and tsc. I did not run the full suite, and the gate's only note is an over-long comment in src/http/games_routes.ts, which I left.
- Floor walk:
/api/v1/games/:box/doorneeds a game box, and the seed makes none. I added it toUNSEEDEDintest/security-floor-routes.test.tswith that reason, pointing attest/game-door-api.test.ts. - Declared refusals:
GET /api/v1/games/{box}/doordeclared a 403, but the probe never gets one, because the seed has no box and it only sees 404 and 401. I removed 403 fromrefusesingetApiV1GamesBoxDoor.tsand wrote the 403 into the route'sdetailtext instead. The handler is unchanged, so a non-owner who can see the box still gets 403forbidden.
The catch is that the machine-readable contract no longer lists that 403. The alternative is to keep it declared and make the probe seed a box, which is a bigger change to the shared fixture. I didn't do that.
The iOS app can now read the game door, lock it, set the window length and open a write window with a passkey. All of it goes through five new JSON routes under
/api/v1/games/<box>/door. The new door-API tests, the existing write-window tests and the gate pass, andtscis clean. I did not run the full suite. The one gap in the tests is the passkey success path: no test signs a real WebAuthn assertion, so only the refusals are covered.Talk and held actions. Talk and a held action's yes or no already ride
POST /api/v1/conversation/messagesandPOST /api/v1/conversation-confirms/:id. A build held in game can therefore already be answered from the app, and the answer shows on the web and in game. I changed nothing there, apart from the shared check below.The routes. Only the box's owner can use them, on their own session or their own rw token. A run, app or Talk via token cannot. A stranger who cannot see the box gets 404, an operator gets 403, and a browser from another origin gets 403.
GET …/doorreturns the state, the one-line words every door shows, why the window is as long as it is, and whether the owner has a passkey.POST …/door/locklocks the door at once.POST …/door/minuteswith{minutes}sets the next window's length (5 to 720 whole minutes).POST …/door/optionsreturns a passkey challenge,rpIdand the owner's key ids.POST …/door/opentakes the signed answer and opens the window. Missing fields give 422, and a bad or already-used challenge gives 403 with the door unchanged. A token alone never opens a window.What moved where.
src/web/pages/games_door.tsintosrc/actions/game_door.ts, so the page and the routes share one implementation. The routes are insrc/http/api/game_door.ts.src/http/own_credential.ts, and that route and the door routes both use it.docs/features/games.mddescribes the door on iOS.What I chose not to do.
w. A passkey can only be signed in a browser or the app, so I added nothing there. The commit saysNo door:for this.No look:.How to try it. As the box's owner, with an rw token on the preview:
curl -H "authorization: Bearer $TOKEN" https://<preview>/api/v1/games/<box>/door. ThenPOST …/door/lock, orPOST …/door/optionsfor a challenge. The tests are intest/game-door-api.test.ts.Closes #18311