From 4adc9bccf280e8df6433be6c08d8d2dfce8117c9 Mon Sep 17 00:00:00 2001 From: wtclaude Date: Wed, 23 Sep 2026 05:14:18 -0500 Subject: [PATCH] =?UTF-8?q?feat(sidecar):=20protocol=206=20=E2=80=94=20fir?= =?UTF-8?q?st-party=20clans,=20and=20no=20new=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Protocol 6 adds one board (`clans`) and five clan events. The sidecar files frames by `type`, so none of them needs an arm here. That is protocol 2's promise kept. The bump exists for the other declaration sites: a website that reads clans must not pair with a plugin that never sends them. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY --- sidecar/src/main.rs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/sidecar/src/main.rs b/sidecar/src/main.rs index 050d5fd..779b18c 100644 --- a/sidecar/src/main.rs +++ b/sidecar/src/main.rs @@ -103,9 +103,24 @@ use tracing_subscriber::EnvFilter; /// rollback as well. `web::CONFIG_RELOAD_WINDOW` is that budget, mirrored from the plugin, and a /// test asserts the pairing rather than trusting it. /// +/// # Protocol 6 — first-party clans +/// +/// One board (`clans`) and five events (`clan.created`, `clan.disbanded`, `clan.member.added`, +/// `clan.member.left`, `clan.member.kicked`), from which the website builds core's Teams (R5). +/// +/// **Nothing in this process changed except this number**, and that is protocol 2's promise +/// kept: the board is filed by `type: "snapshot"` and the events by `type: "event"`, so the +/// sidecar needs no arm for any of them. The bump exists for the other two declaration sites — +/// a website that reads clans must not pair with a plugin that never sends them. +/// +/// One property of this process does bear on the board: [`game::MAX_INBOUND_LINE_BYTES`] +/// discards a line over 1 MiB outright. The plugin bounds the board well inside it and says +/// `truncated` when it had to stop, because a board that never arrived would read as a server +/// with no clans. +/// /// `docs/rust-link/PROTOCOL.md` is the specification — §8 the read path, §9 identity, §10 the -/// mirror, §11 configuration; this constant is one of its four declaration sites. -pub const PROTOCOL_VERSION: u32 = 5; +/// mirror, §11 configuration, §12 clans; this constant is one of its four declaration sites. +pub const PROTOCOL_VERSION: u32 = 6; fn main() -> anyhow::Result<()> { let args = match cli::parse(std::env::args().skip(1)) {