feat(bridge): protocol 12 — BetterChat titles and styles, popups (phase 17) #12

Merged
whitlocktech merged 2 commits from feat/phase-17-integrations into edge 2026-09-25 18:31:04 -05:00
Member

Module-rust phase 17 (docs PLAN.md §33, D134–D144). Protocol 12, specified in docs/rust-link/PROTOCOL.md §18. BetterChat and PopupNotifications become optional: each is looked up when it is needed and answers with a reason when it is missing.

What it adds

  • titles.set: a whole set of chat titles, swapped in by reference. BetterChat's third-party getter does one lookup per line. It is registered at load and again whenever BetterChat loads.
  • A group's BetterChat style on perm.sync, compare-and-set per field:
    • A field somebody changed by hand is reported, not overwritten.
    • One chat group set per touched group saves it, because the API never saves (D143).
    • A retired style is removed with chat group remove (D139).
  • chat.say gains delivery (chat | popup) and a voice format.
    • A popup without PopupNotifications is refused popup-unavailable.
    • Every line said is logged, since the game logs neither a broadcast nor a popup.
  • integrations on server.hello/server.status, and a new console command, rg.titles [steamId].
  • overlay.toml: protocol 12. PopupNotifications leaves requires_plugins (D141).

The fix from the walk: D144

  • A hot reload emptied every title, and the site never re-sent them, because a reload keeps the boot id.
  • The set is now kept in titles.json with its wipe id and read back only while that wipe is current.

Walked on both rigs (Oxide and Carbon 2.0.259), with BetterChat 5.2.15 and PopupNotifications 0.2.1:

  • the titles render;
  • they survive a BetterChat reload and a bridge reload;
  • styles save, report drift, adopt, revoke and delete;
  • the voice and popups work.

node scripts/checkPlugin.js: OK, 32 hooks, all void.

Pairs with Rust-Link (protocol 12), Module-Rust and the docs PR.

  • AI-assisted: Claude Code (Claude Opus 5.5)

🤖 Generated with Claude Code

https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY

Module-rust phase 17 (docs PLAN.md §33, D134–D144). Protocol 12, specified in `docs/rust-link/PROTOCOL.md` §18. BetterChat and PopupNotifications become **optional**: each is looked up when it is needed and answers with a reason when it is missing. **What it adds** - **`titles.set`**: a whole set of chat titles, swapped in by reference. BetterChat's third-party getter does one lookup per line. It is registered at load and again whenever BetterChat loads. - **A group's BetterChat style on `perm.sync`**, compare-and-set per field: - A field somebody changed by hand is reported, not overwritten. - One `chat group set` per touched group saves it, because the API never saves (D143). - A retired style is removed with `chat group remove` (D139). - **`chat.say`** gains `delivery` (chat | popup) and a voice `format`. - A popup without PopupNotifications is refused `popup-unavailable`. - Every line said is logged, since the game logs neither a broadcast nor a popup. - **`integrations`** on `server.hello`/`server.status`, and a new console command, `rg.titles [steamId]`. - **`overlay.toml`**: protocol 12. PopupNotifications leaves `requires_plugins` (D141). **The fix from the walk: D144** - A hot reload emptied every title, and the site never re-sent them, because a reload keeps the boot id. - The set is now kept in `titles.json` with its wipe id and read back only while that wipe is current. **Walked on both rigs** (Oxide and Carbon 2.0.259), with BetterChat 5.2.15 and PopupNotifications 0.2.1: - the titles render; - they survive a BetterChat reload and a bridge reload; - styles save, report drift, adopt, revoke and delete; - the voice and popups work. `node scripts/checkPlugin.js`: OK, 32 hooks, all void. Pairs with Rust-Link (protocol 12), Module-Rust and the docs PR. - [x] AI-assisted: Claude Code (Claude Opus 5.5) 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
wtclaude added 2 commits 2026-09-25 18:26:40 -05:00
- titles.set: a whole set of chat titles, swapped in by reference and read
  by a BetterChat third-party title getter (one lookup, no socket). The
  getter is registered at load and again whenever BetterChat loads.
- perm.sync: a group may carry its BetterChat style. Each field is written
  through API_SetGroupField only when the game still holds what the site
  last pushed (or BetterChat's default); anything else is reported as
  drift. One `chat group set` per touched group saves it, because the API
  never does (D143). A retired style removes the group with `chat group
  remove` (D139). The report gains `chat`.
- chat.say: delivery chat|popup and an optional voice format. A popup with
  PopupNotifications absent is refused `popup-unavailable`. Every line said
  is logged, since the game logs neither a broadcast nor a popup.
- server.hello/status carry `integrations`; `rg.titles [steamId]` prints
  what BetterChat would render for a player.
- overlay.toml: protocol 12; PopupNotifications leaves requires_plugins
  (D141).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
fix(bridge): keep the chat titles across a reload (D144)
All checks were successful
PR Checks / plugin-checks (pull_request) Successful in 22s
5ff88610a5
The walk found that a hot reload of this plugin emptied every title, and
the site never re-sent them: it re-sends on a new boot id or wipe id, and a
reload is neither, because the boot id names the server process. The set
is now written to titles.json with the wipe it was pushed on, and read at
OnServerInitialized only when that wipe is still the current one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
whitlocktech merged commit 78726b89de into edge 2026-09-25 18:31:04 -05:00
whitlocktech deleted branch feat/phase-17-integrations 2026-09-25 18:31:04 -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#12
No description provided.