Public: anyone can read this; the crew can change it.
The Minecraft kind's console adapter answers /forge in game in under 300 ms, in rich text, and keeps a conversation #18533
Merged 1h 36m ago, live in production
I built the in-game /forge handler and the rich-text replies inside src/kinds/minecraft/. It is not wired to the box agent or the plugin yet, so no player can type /forge against it today. The new tests and the kinds, feature-index and feature-doors tests pass, and bun x tsc --noEmit is clean.
-
Reviews
Changes requested — before the latest pushNot usable yet: no player can type /forge against this head. The pull's own description says so ("not wired to the box agent or the plugin"). I checked the diff and it agrees.
Changes needed, in one round:
- Wire it (first).
console.forgeandhandlerhave no caller outside the test.ForgeDoor.read,askandreplyhave no implementation. Box 1 asks for the agent heartbeat on a marked request, with the forge answering a read in that same response.agent.sh,games/door.tsandgames/chat.tsstill send plain tellraw text. Make that path callkind.console.forge(door)and send the component JSON, and replace the plain-text path in the same pull so there is one way to do it. As it stands this is dead code. - Talk.
askandreplymust start and continue a real Talk conversation, withreplycontinuing that player's latest one. Today they are empty interface methods. Add a realForgeDoor, and a test that goes through it to a conversation. - Test what is claimed. There is no test of the same-response read, and no test that the token never reaches the plugin. Add both once the wiring exists.
- Identity.
playeris a name typed by the client. TheForgeDoorimplementation must resolve it from the proxy's verified identity and never trust the name. Per-player cooldown andreplycontinuity key on it, so spoofing a name would read or continue someone else's conversation. - Cooldown order. The cooldown is taken before the call. A slow or failed forge answer still burns the player's 5 s. Take it only when the call succeeds, or say why not.
- Clean. There are two blank lines before
HELP.handler'snextandcopyableternary is hard to read, so split it.Command,parseandMOST_WORDSare exported but used only here and in the test. The gate's duplicate notes also stand:plainvsforge_read.tsline. Reuse one or justify the second. - Doc.
docs/features/game-forge-command.mddescribes behaviour that does not exist for a player yet. Write it after the wiring lands.
The pure pieces are good: components only ever carry
text,suggestis limited to/forge …, and the §-strip and caps are tested. Approving this head would tick no box fully. Box 2 (rich text) is built but has no path to a player.ApprovedEarlier asks: wiring the rich reply into the door that already runs /forge, so the kind owns the words, is met. So is dropping the dead ForgeDoor, handler and cooldown code. A spoofed name with another player's UUID is refused and tested. The read is answered in the same sync response and the token is not in the body, also tested. I tried: ask and reply with no words, 'asking about it' (no false match), the ask keyword followed by 'clear', 300-character lines, 20 lines, § codes and control characters in the text, a confirm row (no component, so no code leaks), and a component pushed through agent.sh's put (about 1 KB, far under the 16 KiB cap). I found nothing that breaks. The head differs from the issue in two ways. There is no click-to-copy, only click-to-suggest. The plugin that reads
componentis not in this repo, so I could not see it in a player's chat. Non-blocking: (1) /forge reply with no earlier conversation silently starts one; say so in the answer. (2) Add a copy-to-clipboard event, or change the issue's box 2. (3) The plugin's 250 ms handler bound is not in this repo; open an issue for it. - Wire it (first).
-
Checks
shipped production is serving it deploy 5a6b787
-
History
- Rewrap comments a6e14d1
- Wire /forge's rich reply into the game door: ask starts a conversation, reply continues it, answers carry the kind's component 8f815d9
- Name the Minecraft handler bound among the allowed timers a313d2d
- The Minecraft kind answers /forge in rich text within 250 ms and keeps a conversation (#18466) ebea409
- forge.json declares jobs: steps, needs (macos, xcode, docker), on (pull, land) and secrets, read and validated at the boundary (#18512) 85e7b4f
- Lending speaks the versioned agent protocol, and each machine's page shows when it last used the old sync route (#18521) 7db7ea2
- A pull that changes an MCP tool's schema runs mcp-size.test.ts in its fast check (#18529) 9b4b38b
- may() is the only permission check: every remaining helper beside it is deleted, and a test fails if one returns (#18498) ad5d09a
- A test fails a new terminal screen for a thing that already has a web page, and today's screens are the only ones allowed (#18527) a068c28
- No new terminal screen for a thing that has a web page: a rule test lists today's screens and the list can only shrink (#18519) 8a9f7de
- Automate a review finding as a lint or test: Small: `src/http/git_access.ts` ends with a stray blank line. (#18511) 6b5946b
- Neutral public names, step 1 of 2 (expand): the new name beside the old for the game_* tables, the games MCP tool, connection.kind and the game and design: minecraft plan options (#18513) 6368d15
- The runners page is live: connected, busy, the run it holds, its log and last seen, updated as they change (#18497) 24da6e3
- A rule test fails any page whose form answers with a full page, and the list of today's pages can only shrink (#18495) c10b305
- A new account's home offers three things it can do, each one click away, and an empty page says what goes there and how (#18496) bf74994
- An invite carries a bundle: the owner picks Use, Host or Build, each with a line saying what it allows (#18473) d231856
- A machine agent that does not check in after its update goes back to the version before, and the forge says so (#18483) 49c1b5a
- A machine stays trustworthy under load: power cycle, live status, a memory check, a patient healer (#18472) a7825b4
- Main red: plan tool's `owner` description is 91 bytes, over mcp-size's 60-byt… (#18494) 09902a4
- A repository's crew page adds a member to a slot in place: no reload, and the scroll position stays (#18474) 99ed63c
3 earlier comments
I built the in-game /forge handler and the rich-text replies inside src/kinds/minecraft/. It is not wired to the box agent or the plugin yet, so no player can type /forge against it today. The new tests and the kinds, feature-index and feature-doors tests pass, and bun x tsc --noEmit is clean. I did not run the full suite, the design lint or the gate's duplicate-code check beyond its last run. That last gate run only printed two "one implementation?" notes about near-duplicate helpers (see below).
What changed
speak.tsbuilds replies as Adventure component JSON. Each reply opens with a gold bold[forge]prefix and has grey body text, a hover, a click-to-suggest/forge …button and a click-to-copy value.- Replies stay short: at most 5 lines of 120 characters each.
§codes and control characters are stripped.- Player or forge text only ever goes into a
textfield, and suggest buttons are limited to/forge …commands.
command.tsparsesstatus,servers,ask <words>andreply <words>. It also holds:within, which gives every handler 250 ms and then falls back to a "did not answer in time" reply with a try-again suggestion.- A per-player cooldown of 5 s on
askandreply; reads are not limited.
kind.tsgetsconsole.forge(door), and the Minecraft kind returns the handler from it.ForgeDoor(read,ask,reply) is how the forge side plugs in. The forge token stays with the box's agent, so this code never holds one.- I added
test/minecraft-command.test.tsanddocs/features/game-forge-command.md. The commit saysNo door:because this is a command typed in the game, with no page, route or tool.
Not done
- The heartbeat-on-marked-request path and the forge answering a read in that same response are not changed.
agent.sh,games/door.tsandgames/chat.tsalready handle/forge, but they send plaintellrawtext. I did not wire them to produce components. - I wrote no Java plugin.
speak.tsonly produces the JSON the plugin would send. - I did not connect
askandreplytoaskThroughor the Talk conversation code. They areForgeDoormethods to be filled in. - The gate noted
withinas similar to a test helper andplainas similar tolineingames/forge_read.ts. I keptplainseparate to avoid a kind-to-general import, andforge_read.tscould later reuse it.
To try it: bun test test/minecraft-command.test.ts.
🤖 Generated with Claude Code
The failing timer check is fixed and pushed. test/timers-named.test.ts now passes locally (9 of 9). I ran bun scripts/gate.ts --fix, which changed nothing. I did not run tsc or any other suite.
The setTimeout in within() (src/kinds/minecraft/command.ts:48) is the Minecraft plugin's 250 ms handler bound. It only resolves the race with the fallback and does no work of its own. That is the same kind of timer as the machine-load deadline already on the test's allow list. I added it there, with the reason, instead of wrapping it in background. The only change is that one allow entry in test/timers-named.test.ts.
The gate also printed two "one implementation?" similarity notes, which I did not act on:
withinincommand.tsagainsttest/helpers/real-spawn-e2e.ts.plaininspeak.tsagainstlineinsrc/games/forge_read.ts.
/forge's rich reply is now wired into the games door that already runs /forge, and it works end to end in the forge. The pinned forge-velocity jar isn't in this repo and I couldn't change it, so I haven't seen a player's chat show the component. bun x tsc --noEmit is clean. About 270 tests pass, including dup-imports, unused-exports, timers-named, kinds, and the game-door, game-chat, game-desk and game-agent suites. I did not run the first-view-budget tests, since no page changed.
What changed
- Wiring.
toldToinsrc/games/door.tsaddscomponent, the Minecraft kind's rich reply, to every answer except a confirm. The agent forwards it, with onejqline inagent.sh. It rides the same response as a read, which the door already returns within 250 ms. textstays. It stays besidecomponentso the pinned plugin jar keeps working. Nothing in the repo can make the jar readcomponent, so the plaintextisn't retired yet. Once the plugin readscomponent,textcan go.- Talk.
/forge ask <words>starts a new Talk conversation, and/forge reply <words>continues the account's latest one on that box. Other words behave as before.gameAskinchat.tscalls the kind'sforge.hear. - Tests. New in
test/game-door.test.ts:- Same-response read. A read comes back in the same sync reply with the component, and the box token isn't in the body.
- Ask/reply. The ask/reply conversation test goes through the door to real Talk conversations.
- Spoofed name. A spoofed name is refused.
- Doc.
docs/features/game-forge-command.mdis rewritten for what now exists.
Where I disagree with the review
- No new
ForgeDoororhandler. The door'sone()already maps the proxy's verified UUID to a linked account, role and limits, so a second implementation would have been a second policy. I deletedForgeDoor,handler,within,cooldownandHANDLER_MS; they were dead code, and so is thetimers-namedallow entry I added earlier. The kind now supplies onlyforge.hear(ask and reply) andforge.say(the rich reply). - Identity (item 4). The name and UUID in an ask are the proxy's. A name sent with another player's UUID is refused and its link dropped, and an unlinked name reads nothing; both are tested.
- Cooldown (item 5). I dropped the extra 5 s cooldown. The account's existing limits (5 commands, 30 reads, 12 Talk turns a minute) apply, and they're counted when a command is accepted. They aren't refunded if the forge's later answer fails.
- Clean (item 6). The two blank lines, the
next/copyableternary and the unused exports are gone.plainwas a copy oflineinforge_read.ts, sospeak.tsnow usesline, which is exported.
Left out
/forge replywith no earlier conversation starts one. It doesn't say so.- The terminal side has no change ("No door:" is in the commit).
Left #18466 open: 3 unticked items remain (instant: the agent sends a heartbeat the moment the proxy marks a request, and the forge answers a read in that same response; every plugin handler times out at 250 ms with a clear fallback; the forge token stays with the agent, never in the plugin; rich text: replies as Adventure components with a [forge] prefix, colour, hover, click-to-suggest and copy-to-clipboard; private to the player and short; all of it lives in src/kinds/minecraft/).
I built the in-game
/forgehandler and the rich-text replies insidesrc/kinds/minecraft/. It is not wired to the box agent or the plugin yet, so no player can type/forgeagainst it today. The new tests and the kinds, feature-index and feature-doors tests pass, andbun x tsc --noEmitis clean. I did not run the full suite, the design lint or the gate's duplicate-code check beyond its last run. That last gate run only printed two "one implementation?" notes about near-duplicate helpers (see below).What changed
speak.tsbuilds replies as Adventure component JSON. Each reply opens with a gold bold[forge]prefix and has grey body text, a hover, a click-to-suggest/forge …button and a click-to-copy value.§codes and control characters are stripped.textfield, and suggest buttons are limited to/forge …commands.command.tsparsesstatus,servers,ask <words>andreply <words>. It also holds:within, which gives every handler 250 ms and then falls back to a "did not answer in time" reply with a try-again suggestion.askandreply; reads are not limited.kind.tsgetsconsole.forge(door), and the Minecraft kind returns the handler from it.ForgeDoor(read,ask,reply) is how the forge side plugs in. The forge token stays with the box's agent, so this code never holds one.test/minecraft-command.test.tsanddocs/features/game-forge-command.md. The commit saysNo door:because this is a command typed in the game, with no page, route or tool.Not done
agent.sh,games/door.tsandgames/chat.tsalready handle/forge, but they send plaintellrawtext. I did not wire them to produce components.speak.tsonly produces the JSON the plugin would send.askandreplytoaskThroughor the Talk conversation code. They areForgeDoormethods to be filled in.withinas similar to a test helper andplainas similar tolineingames/forge_read.ts. I keptplainseparate to avoid a kind-to-general import, andforge_read.tscould later reuse it.To try it:
bun test test/minecraft-command.test.ts.🤖 Generated with Claude Code
Closes #18466