Fifteen hooks: presence, deaths, chat, gathering, raided structures, bans,
reports, login attempts and the wipe. Every frame now carries an envelope —
`type`, `serverId` and `wipeId` — built in one place so nothing can emit a frame
without one.
Three rules the code enforces structurally rather than by intention:
• A read-path hook never vetoes. Four of these are documented as "returning a
non-null value overrides default behavior", so every hook is declared `void`
and cannot answer. `CanUserLogin` is in the wave for what it observes.
• A hook that can fire more than once a second per player is a counter.
`OnDispenserGather` fires on every swing at a tree; it accumulates into a
per-player tally flushed once a minute as one `player.tally` frame, as a
delta rather than a running total.
• `wipeId` is derived here, from the save's creation time, because this is the
only component that can read it. PROTOCOL.md §8.2 reverses protocol 1 on
that point deliberately.
`server.hello` becomes a board rather than a greeting, and `players.online`
joins it; both are re-sent on connect and every 60 seconds, which is what makes
a restarted sidecar repopulate itself without asking.
`rg.hooks` reports which hooks have actually fired. Hooks bind by name and arity
through reflection on both frameworks, so a rename by Facepunch and a name
Carbon's catalogue omits present identically — as silence. This is the standing
answer to both, and it outranks either catalogue because it is a measurement.
The repository had no `.gitea/workflows/` at all. `scripts/checkPlugin.js` asks
the three questions a compiler here cannot: every hook is in `ExpectedHooks`, so
`rg.hooks` can see it; every hook is `void`, unless answering is a decision
written down in `ANSWERS_DELIBERATELY`; and `ProtocolVersion` agrees with
`overlay.toml`, which is what stops a bundle that will not compose. The void
rule is inverted on purpose — a list of *vetoable* hooks would have to be
maintained against a catalogue in another repository, and the first one somebody
forgot to add is the one that would pass. Its own suite breaks it seven ways,
including the failure that would make the other six meaningless: a method parser
that silently matches nothing.
Proven on a live Oxide server: compiled, loaded, the envelope correct, both ban
hooks firing, and the boards repopulating a sidecar whose database had been
deleted 0.3 seconds earlier.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016wDDVXWMDz82WqE1i969r4
50 lines
2.7 KiB
TOML
50 lines
2.7 KiB
TOML
# Release metadata for the deployable overlay.
|
|
#
|
|
# Consumed by the release workflow, which folds these values into the
|
|
# manifest.json shipped inside the overlay tarball. The Runic Gateway installer
|
|
# reads that manifest to decide what it is deploying and whether it is compatible
|
|
# with the sidecar it is about to install.
|
|
#
|
|
# There is deliberately NO version key here. The release version is derived from
|
|
# git tags and conventional commits by the release workflow, so there is no bump
|
|
# commit to keep in sync and no way for this file to disagree with the tag.
|
|
|
|
# ── The loopback wire-protocol version this overlay speaks ───────────────────
|
|
#
|
|
# The plugin half of the compatibility contract. It MUST equal the sidecar's
|
|
# PROTOCOL_VERSION (Rust-Link's sidecar/src/main.rs) for a deployment to work:
|
|
# the sidecar rejects a mismatched WEBSITE with 409, and a mismatched PLUGIN is
|
|
# worse, because the game link has no such check — it would simply mis-parse.
|
|
#
|
|
# That asymmetry is why this file exists. The plugin announces its protocol in
|
|
# `server.hello`, which is only readable after the game server has booted with it
|
|
# loaded — far too late for an installer to refuse a bad pairing. This
|
|
# declaration is what lets the bundle CI check the pair BEFORE an operator
|
|
# installs either half.
|
|
#
|
|
# Keeping it honest is a manual duty: when the protocol changes, bump it here in
|
|
# the same change that alters the emitters, exactly as the sidecar bumps
|
|
# PROTOCOL_VERSION and the module bumps its own constant.
|
|
#
|
|
# Current: 2 — the transport plus the read path (docs/rust-link/PROTOCOL.md §8).
|
|
protocol = 2
|
|
|
|
# ── Oxide compatibility ──────────────────────────────────────────────────────
|
|
#
|
|
# The overlay only ADDS a file — one plugin into `oxide/plugins/` — and patches
|
|
# nothing, so it is expected to work on any reasonably current Oxide. This is the
|
|
# oldest build it is known good on.
|
|
#
|
|
# There is no `patches_verified_against` key, and there is no `patches/` tier:
|
|
# Rust's server is a binary and Oxide's hook API is the supported way in, so
|
|
# there is nothing to diff against. That is the whole reason the Rust payload is
|
|
# simpler than the ServUO one.
|
|
min_oxide_version = "2.0.7585"
|
|
|
|
# The `oxide/plugins/` files this overlay expects to find already installed. They
|
|
# are not shipped here — they are third-party plugins an operator installs from
|
|
# uMod — and the installer's `doctor` reports a missing one rather than
|
|
# installing it. Listing them is what turns "the site shows no clans" into a
|
|
# named prerequisite.
|
|
requires_plugins = ["Clans", "Kits", "PopupNotifications", "ZoneManager"]
|