feat(bridge): protocol 14 — kits.uses and reward notices (PLAN_REDESIGNS §2) #30

Merged
whitlocktech merged 1 commits from feat/protocol-14-step-editor into edge 2026-10-12 04:52:12 -05:00
Member

What & why

The bridge's half of protocol 14 (D332), for the event step editor (Module-Rust PLAN_REDESIGNS.md §2).

  • kits.uses (§2.6). The input is {kit, steamIds} and the reply is {kit, max, cooldown, asked, exhausted, onCooldown}. It returns counts only and runs on the main thread: two Kits reads per player (GetPlayerKitUses, GetPlayerKitCooldown). The list is bounded by the sync's own bound (PermMaxOps). Refusals come back as kits.error: kits-missing, unknown-kit or too-large.
  • perm.sync notices (D333), the one-time "you earned kit vip" messages:
    • The field carries the site's whole untold set, each {key, steamId, message, delivery}.
    • A player who is connected and awake is told at the end of the sync. Anyone else is told on OnPlayerSleepEnded, the next time they wake on the server.
    • Delivery is a popup when PopupNotifications is loaded and the step chose one; otherwise it is chat.
    • Told keys persist in data/RunicGateway/notices.json until the site stops sending them, so a reload cannot tell a player twice.
    • perm.report gains noticesTold.
    • An absent field leaves the set alone, just as with credits.
  • ProtocolVersion and overlay.toml go from 13 to 14. OnPlayerSleepEnded joins ExpectedHooks.

Spec: rust-link/PROTOCOL.md §20 (docs PR docs/rust-protocol-14-step-editor). Companion PRs: Rust-Link and Module-Rust feat/protocol-14-step-editor, and website#212.

How it was tested

  • node scripts/checkPlugin.js: plugin ok — protocol 14, 55 hooks declared, every one void and listed. checkPlugin.test.js passes 14/14.
  • Compiled on both rigs, 2026-10-12, after bringing them up to date (Rust 25823813 on both):
    • Carbon 2.0.262: compiled and loaded in 3.8 s.
    • Oxide 2.0.7820: compiled in 5.3 s and loaded. The Oxide rig was behind on both Rust and Oxide; its first restart's steamcmd update did not finish, and the second did.
    • On both, the log shows protocol 14 and 0 told notices on record, and the bridge reconnected to its sidecar.
    • Both rigs were then put back on their protocol-13 bridge, to match their sidecars until the end-of-plan walk (D331).
  • Not walked: telling a player on wake, popup versus chat, and a withdrawn reward telling nobody are rows in the end-of-plan walk (§2.7).

Checklist

  • I have read CONTRIBUTING.md.
  • The change builds and existing tests/checks pass locally.
  • I have added or updated tests/docs where it makes sense.
  • My commits are reasonably scoped with clear messages.

AI-assisted contributions (required)

  • No AI tools were used to produce this contribution.
  • AI tools were used. Tool(s): Claude Code (Claude Opus 5.5). I have reviewed and understand
    every change, and take responsibility for it. AI-authored commits are
    marked with a Co-Authored-By / Assisted-By trailer.

License

  • I agree that my contribution is licensed under this project's license
    (GNU GPL v3.0 or later), and I have the right to contribute it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY

## What & why The bridge's half of protocol 14 (D332), for the event step editor (Module-Rust `PLAN_REDESIGNS.md` §2). - **`kits.uses`** (§2.6). The input is `{kit, steamIds}` and the reply is `{kit, max, cooldown, asked, exhausted, onCooldown}`. It returns counts only and runs on the main thread: two Kits reads per player (`GetPlayerKitUses`, `GetPlayerKitCooldown`). The list is bounded by the sync's own bound (`PermMaxOps`). Refusals come back as `kits.error`: `kits-missing`, `unknown-kit` or `too-large`. - **`perm.sync` `notices`** (D333), the one-time "you earned kit vip" messages: - The field carries the site's whole untold set, each `{key, steamId, message, delivery}`. - A player who is connected and **awake** is told at the end of the sync. Anyone else is told on `OnPlayerSleepEnded`, the next time they wake on the server. - Delivery is a popup when PopupNotifications is loaded and the step chose one; otherwise it is chat. - Told keys persist in `data/RunicGateway/notices.json` until the site stops sending them, so a reload cannot tell a player twice. - `perm.report` gains `noticesTold`. - An absent field leaves the set alone, just as with `credits`. - `ProtocolVersion` and `overlay.toml` go from 13 to 14. `OnPlayerSleepEnded` joins `ExpectedHooks`. Spec: `rust-link/PROTOCOL.md` §20 (docs PR `docs/rust-protocol-14-step-editor`). Companion PRs: Rust-Link and Module-Rust `feat/protocol-14-step-editor`, and website#212. ## How it was tested - `node scripts/checkPlugin.js`: `plugin ok — protocol 14, 55 hooks declared, every one void and listed`. `checkPlugin.test.js` passes 14/14. - **Compiled on both rigs, 2026-10-12**, after bringing them up to date (Rust 25823813 on both): - Carbon 2.0.262: compiled and loaded in 3.8 s. - Oxide 2.0.7820: compiled in 5.3 s and loaded. The Oxide rig was behind on both Rust and Oxide; its first restart's steamcmd update did not finish, and the second did. - On both, the log shows `protocol 14` and `0 told notices on record`, and the bridge reconnected to its sidecar. - Both rigs were then put back on their protocol-13 bridge, to match their sidecars until the end-of-plan walk (D331). - **Not walked:** telling a player on wake, popup versus chat, and a withdrawn reward telling nobody are rows in the end-of-plan walk (§2.7). ## Checklist - [x] I have read [CONTRIBUTING.md](CONTRIBUTING.md). - [x] The change builds and existing tests/checks pass locally. - [x] I have added or updated tests/docs where it makes sense. - [x] My commits are reasonably scoped with clear messages. ## AI-assisted contributions (required) - [ ] No AI tools were used to produce this contribution. - [x] AI tools were used. Tool(s): `Claude Code (Claude Opus 5.5)`. I have reviewed and understand every change, and take responsibility for it. AI-authored commits are marked with a `Co-Authored-By` / `Assisted-By` trailer. ## License - [x] I agree that my contribution is licensed under this project's license (**GNU GPL v3.0 or later**), and I have the right to contribute it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
wtclaude added 1 commit 2026-10-12 02:49:37 -05:00
feat(bridge): protocol 14 — kits.uses and reward notices (PLAN_REDESIGNS §2)
All checks were successful
PR Checks / plugin-checks (pull_request) Successful in 9s
6952fbf123
Opens protocol 14 (D332):
- kits.uses {kit, steamIds} -> {kit, max, cooldown, asked, exhausted,
  onCooldown}: counts only, bounded by the sync's own bound (§2.6).
- perm.sync notices [{key, steamId, message, delivery}] (D333): the site's
  whole untold set. Told at once to a player who is awake, else on
  OnPlayerSleepEnded; popup where PopupNotifications is loaded and chosen,
  chat otherwise. Told keys persist in notices.json until the site stops
  sending them; the report lists noticesTold.

ProtocolVersion and overlay.toml 13 -> 14; OnPlayerSleepEnded joins
ExpectedHooks (checkPlugin: 55 hooks, all void).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
whitlocktech merged commit cc7b2b2a0e into edge 2026-10-12 04:52:12 -05:00
whitlocktech deleted branch feat/protocol-14-step-editor 2026-10-12 04:52:12 -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#30
No description provided.