feat(bridge): Dangerous Treasures on protocol 14 (PLAN_REDESIGNS §14.3.4) #38

Merged
whitlocktech merged 1 commits from feat/dangerous-treasures into edge 2026-10-15 07:05:04 -05:00
Member

Stage 5 of the §14.3 integration plan. Spec: docs rust-link/PROTOCOL.md §20.8 and §17.3 (docs PR alongside). Record: modules/rust/PLAN_REDESIGNS.md §14.3.18.

  • Three events from DT's own hooks:

    • dt.started { x, z, key? }
    • dt.won { steamId, name, invaders (at most 32), invaderCount, x, z }
    • dt.ended { x, z }

    None is sent while the world is not live. A win is still counted.

  • The key's join is exact. DT raises its start hook inside the call that opens the chest, so the key a dt.start is running is attached to that start before ConsoleSystem.Run returns. The plan's "first start within ten seconds" is not needed.

  • dt.start { key, level } (0 Easy, 1 Medium, 2 Hard) runs dtevent <level> and answers dt.opened { key, level, repeat, x, z }. A key already answered gets its first answer again and opens nothing; keys are kept seven days.

  • Refusals (dt.error):

    • malformed, bad-level
    • dt-missing
    • console-unavailable (D363)
    • dt-not-ready: nothing opened, DT's reply was its own Manual Event Failed message (read from DT's lang file, so a translated reply still matches), and DT loaded under fifteen minutes ago (D365)
    • dt-no-spot: the same, after fifteen minutes
    • refused: DT said anything else
  • Tally: treasuresWon (Treasure Hunter, D375).

  • Map: map.live's world gains kind: "treasure" for each running chest. The set is seeded at load by finding DT's chests in the world, because DT has no API that lists them.

  • Hello gains integrations.dangerousTreasures, sent again when DT loads or unloads. rg.world prints dangerousTreasures=, treasures=, dtStarts= and dtWarmingUp=. README lists DT.

Tested: checkPlugin.js passes (81 hooks), 18 tests. Compiled and loaded on both rigs (Rust 25902425, Oxide 2.0.7830, Carbon 2.0.262). rg.world read dangerousTreasures=False treasures=0 on each, then both went back on the protocol-13 bridge. DT itself is not on the rigs, so its hooks and the start are left to §14.3.4's rows at the end walk (D331, D359).

AI-assisted: written with Claude Code (disclosed per org policy).

🤖 Generated with Claude Code

https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY

Stage 5 of the §14.3 integration plan. Spec: docs `rust-link/PROTOCOL.md` §20.8 and §17.3 (docs PR alongside). Record: `modules/rust/PLAN_REDESIGNS.md` §14.3.18. - **Three events from DT's own hooks:** - `dt.started` `{ x, z, key? }` - `dt.won` `{ steamId, name, invaders (at most 32), invaderCount, x, z }` - `dt.ended` `{ x, z }` None is sent while the world is not live. A win is still counted. - **The key's join is exact.** DT raises its start hook inside the call that opens the chest, so the key a `dt.start` is running is attached to that start before `ConsoleSystem.Run` returns. The plan's "first start within ten seconds" is not needed. - **`dt.start` `{ key, level }`** (0 Easy, 1 Medium, 2 Hard) runs `dtevent <level>` and answers `dt.opened` `{ key, level, repeat, x, z }`. A key already answered gets its first answer again and opens nothing; keys are kept seven days. - **Refusals** (`dt.error`): - `malformed`, `bad-level` - `dt-missing` - `console-unavailable` (D363) - `dt-not-ready`: nothing opened, DT's reply was its own *Manual Event Failed* message (read from DT's lang file, so a translated reply still matches), and DT loaded under fifteen minutes ago (D365) - `dt-no-spot`: the same, after fifteen minutes - `refused`: DT said anything else - **Tally:** `treasuresWon` (Treasure Hunter, D375). - **Map:** `map.live`'s `world` gains `kind: "treasure"` for each running chest. The set is seeded at load by finding DT's chests in the world, because DT has no API that lists them. - **Hello** gains `integrations.dangerousTreasures`, sent again when DT loads or unloads. `rg.world` prints `dangerousTreasures=`, `treasures=`, `dtStarts=` and `dtWarmingUp=`. README lists DT. **Tested:** `checkPlugin.js` passes (81 hooks), 18 tests. Compiled and loaded on both rigs (Rust 25902425, Oxide 2.0.7830, Carbon 2.0.262). `rg.world` read `dangerousTreasures=False treasures=0` on each, then both went back on the protocol-13 bridge. DT itself is not on the rigs, so its hooks and the start are left to §14.3.4's rows at the end walk (D331, D359). AI-assisted: written with Claude Code (disclosed per org policy). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
wtclaude added 1 commit 2026-10-15 06:46:16 -05:00
feat(bridge): Dangerous Treasures on protocol 14 (PLAN_REDESIGNS §14.3.4)
All checks were successful
PR Checks / plugin-checks (pull_request) Successful in 14s
72f51c3d9e
Stage 5 of the §14.3 integration plan (docs rust-link/PROTOCOL.md §20.8).

- Three events from DT's own hooks: dt.started { x, z, key? },
  dt.won { steamId, name, invaders (max 32), invaderCount, x, z } and
  dt.ended { x, z }. None while the world is not live; a win still counts.
- The start hook fires inside the call that opens the chest, so the key a
  dt.start is running joins its start exactly, not by a ten-second window.
- dt.start { key, level 0-2 } runs `dtevent <level>` through
  ConsoleSystem.Run and answers dt.opened { key, level, repeat, x, z }. A key
  already answered is answered again and opens nothing (kept seven days in
  dt-starts.json). Refusals: malformed, bad-level, dt-missing,
  console-unavailable (D363), dt-not-ready (nothing opened, DT's own "Manual
  Event Failed" reply, under fifteen minutes since DT loaded, D365),
  dt-no-spot (after), refused (anything else DT said).
- The tally gains treasuresWon (Treasure Hunter, D375); map.live's world gains
  kind "treasure" for each running chest, seeded at load from DT's chests in
  the world (DT has no API that lists them).
- Hello's integrations gain dangerousTreasures, sent again on DT's load and
  unload. rg.world prints dangerousTreasures, treasures, dtStarts and
  dtWarmingUp. README lists Dangerous Treasures.

checkPlugin: 81 hooks, every one void and listed; 18 tests. Compiled and
loaded on both rigs (Rust 25902425, Oxide 2.0.7830, Carbon 2.0.262);
rg.world read dangerousTreasures=False treasures=0, then both went back on
the protocol-13 bridge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
whitlocktech merged commit 7b1eabcd8b into edge 2026-10-15 07:05:04 -05:00
whitlocktech deleted branch feat/dangerous-treasures 2026-10-15 07:05:05 -05:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: RunicGateway/Rust-Plugins#38
No description provided.