Public: anyone can read this; the crew can change it.
The game box's agent carries /forge's requests and answers #17666
Merged 10h 55m ago, live in production
Part of #17610. The proxy's plugin leaves each request as a file and reads each answer as one. The agent reads and writes them inside the proxy's own container, follows no link, sends at most 20 requests of at most 2 KiB with a full sync, and deletes those files once the sync is answered.
-
Reviews
Changes requested — before the latest pushThe agent side is careful: the proxy folders are read inside the container, a link is never followed, every file is capped, and every value goes through jq as data, with no shell built from request text. Two things must change before it lands.
- A request is deleted on any 200 answer, but nothing on the forge reads it.
src/http/games_routes.tsignoresbody.askand never answerstold(grep finds neither). So once this agent runs, every/forgerequest is carried, acknowledged, and thenrm'd with no consumer. That is data lost silently. Either land the receiving side in this pull (the sync handler readingask, an answer carryingtold), or have the agent delete only when the answer says it took them. For example, the forge repliesasked: <ids>and the agent removes only those files. - The how-to is missing. The agent's behaviour changed (it now reads and writes
plugins/forge/outboxandinboxin the proxy, sendsaskand handlestold).docs/features/game-box.mddescribes the agent's sync in detail and says nothing about this. Add the paragraph there. Do not put it in README.
Smaller: the comment on
desk_askssays files that are no request "go away with the rest", but only names matching the uuid pattern are collected, and the test itself showshalf.tmpstays. Fix the comment.deskalso runs twodocker compose execcalls on every 5 s sync even on a box with no velocity service. Skip them when the service is absent.ApprovedClean. I read the agent's /forge desk code for security. Requests are deleted only when the answer's
askednames them, and the ids come from the validated sent set, never from the answer. Thetoldfiles are written under agent-made names, so a hostileidnever reaches a path. Folders that are links are refused, links among the files are skipped, each request is capped at 2 KiB, the number of files is capped, and the logged line never holds a request's text. User text goes in only as data: arguments tosh -candjq, never in the script. Tests cover each of these behaviours, andgame-deskandgame-tokenpass here (16 pass). The how-to is in docs/features/game-box.md, not the README. There is no page, API or TUI change, so there is no second door to add. No findings. - A request is deleted on any 200 answer, but nothing on the forge reads it.
-
Checks
shipped production is serving it deploy 01d8b2c
-
History
- The agent deletes a /forge request only when the answer names it (#17610) 0375e5d
- The agent works in /forge's folder as the proxy's user, and takes answers from the quick poll (#17610) 44c1516
- The agent carries /forge's requests and answers for the proxy's plugin (#17610) 08abf42
- A machine says what it boots: a forge, a game box or services (#17662) f1cc743
- A search that finds nothing is sent to the crew on Enter (#17648) bd828f9
- A pull that lands while its check runs keeps the check, and a red it ends with is main's, said on the home's first line (#17632) f270a47
- Merge pull request #17649 from sold/game-token 6e291aa
- Games: a player asks the forge in game and is answered from its own data (#17641) 4f237e3
- Full suite red: 2 files in check run 01m8w6hr59j962wx5rp8ngjz3e (#17655) 4128d1b
- Keep the last two tokens: a restored forge still answers the box e817733
- Talk: a draft change's Undo stands on its own line, and the words name it Undo, never Restore (#17652) 93367a1
- Merge pull request #17650 from sold/game-proxy bbe14be
- First-time studio owner: a cloud bill, an app's deploy and its undo are hard to find (#17640) 1c6bd9c
- Merge pull request #17644 from sold/services-design fe35fac
- A game box's boot token is spent at its first sync 5d3c497
- The agent talks to the proxy itself 00825e2
- The revert lane closes its own revert once main is green without it, naming the commits that fixed the red (#17645) 7558fa7
- Show which app a cloud resource is part of, and find by it with app: (#17642) e0d6c73
- The desk sweep takes the write lock first, so another connection's commit is a wait, not "database is locked" (#17639) e052b8d
- Games: hear what players do, say why it failed, heal what is safe, answer commands in seconds (#17612) 0827b83
Part of #17610. The proxy's plugin leaves each request as a file and reads each answer as one. The agent reads and writes them inside the proxy's own container, follows no link, sends at most 20 requests of at most 2 KiB with a full sync, and deletes those files once the sync is answered. An answer is put in place whole, before anything else from the reply. The forge's side is #17663; without it the forge ignores the field.
An answer takes at least the next full sync. Each full sync runs one more command in the proxy; its cost on a box is not measured yet.
The second part: a token test stopped leaving its agent running when a wait times out.
Not tried: the real proxy image, Ubuntu, a real box. No plugin is on a box yet, so nothing is found there.
Tests (the builder's): four new ones, three failed first. The full games set ran before the rebase with two game-diag failures while the Mac was loaded; game-desk, game-diag and game-token pass since. Not run: the full suite.
No door: the box's agent; the forge's side is its own pull. No look: no page changes. Try: bun test test/game-desk.test.ts
🤖 Generated with Claude Code