Skip to content

Protocol versions

The loopback wire protocol between the bridge plugin and the sidecar is a versioned compatibility contract, not a build dependency. Nothing compiles the three sides together, so the number is what stops a mismatch from being discovered as corrupted data.

Each game has its own protocol, numbered independently: Ultima Online is on 8 and Rust on 14. The two numbers are not comparable — they version two different wires. Everything below holds for both.

The same number is written down in three places, and they must move together:

  1. The sidecar’s source declares PROTOCOL_VERSION — what the sidecar speaks.
  2. The bridge plugin’s release manifest declares protocol — what the plugin speaks.
  3. The bundle manifest copies the plugin’s number in CI, so a released pair carries its own claim.
Ultima Online
Where What declares it
link sidecar/src/main.rs PROTOCOL_VERSION, currently 8
servuo-plugins overlay.toml protocol, currently 8
Rust
Where What declares it
Rust-Link sidecar/src/main.rs PROTOCOL_VERSION, currently 14
Rust-Plugins overlay.toml protocol, currently 14

Two independent mechanisms, at two different boundaries.

Sidecar ↔ website. Every sidecar response carries its protocol version in a header. A mismatch is rejected with 409 rather than mis-parsed, and the game module’s admin screen is where an administrator sees it.

Bridge plugin ↔ sidecar. The installer resolves a bundle — an exact, protocol-checked pair of sidecar and bridge plugin published by CI — and never “latest of each”. That is the whole reason bundles exist: two independently released components that must agree cannot be allowed to be chosen independently.

Changing a message shape means editing every side plus the specification: the bridge plugin, the sidecar, the game module, and the protocol document in docs.

website is usually not on that list, and its absence is the interesting part. Core holds no game connection and names no game noun, so most protocol bumps do not reach it at all. One reaches core only when what changes is the shape of something core owns — a ledger, a place to store a picture — rather than a game noun.

Ultima Online

Protocol 8 taught the bridge to carry a game’s own client files, and touched four repositories:

Repository What had to change
servuo-plugins The extractors and the decoders they call, the switches and caps in Bridge.cfg, and overlay.toml
link PROTOCOL_VERSION, a cap on how large a line the shard may send, and the endpoints that carry the new commands
module-uo The importers, the admin screen, and the pages that render a picture
docs The protocol document and the integration guide

Core’s entire share of eight phases of work was a deletion: a developer tool it no longer needed. Everything the bump needed — somewhere to put a picture — core already offered every module.

A protocol bump can also require a store migration, because the sidecar persists what it forwards. That is not automatic, and it is rare: every frame is persisted whole, so a bump that only widens a frame, or adds a kind, or adds a guarantee about how a command is executed, asks nothing of a store that defines no schema for a frame’s contents. That is the dumb-forwarder property paying for itself.

Ultima Online

It has happened once: version 4 added a column to a table that already existed. Versions 5 to 8 needed none. Version 8 is the largest bump the protocol has had, and it moves megabytes of artwork rather than events — and it changed no line of the sidecar’s store, because the things it carries are answers to requests rather than events to keep.

Two different numbers, versioning two different contracts, and confusing them is easy.

Versions Lives in Checked
PROTOCOL_VERSION The game ↔ sidecar wire, one per game The sidecar, the bridge plugin, the bundle The sidecar’s version header, and the installer’s pairing check
MODULE_API_VERSION The website ↔ module contract website, and every module’s coreApi At module load, before the module’s code runs

A module that never talks to a game server has no protocol version at all. See The module manifest.

The rule this project settled on: a contract owes a bump only once it has landed on main.

While a version has only ever existed on a development branch, additions join it in place rather than forcing a new number. Once it has shipped, it is somebody else’s dependency and a change to it is a change to a published contract.

If you are building a bridge for another game

Section titled “If you are building a bridge for another game”

You do not inherit this protocol — you define your own between your plugin and your sidecar. What is worth inheriting is the shape:

  • Declare the version on both sides, in files a release can read.
  • Make a released pair carry its own compatibility claim, so a deployment tool can refuse a bad combination rather than discovering it at runtime.
  • Reject a mismatch loudly and early. A 409 is a good outcome; a successful parse of a message you did not expect is not.

Each game’s protocol has its own record in the docs repository. For Ultima Online, link/v8.md is the current protocol’s record, including its cross-repository obligations, and link/PLAN.md §7 is the wire protocol. For Rust, the Rust bridge protocol is both.