Protocol 2.0 + 2.1 — account provisioning, world-state streams, Town Cryer news #7
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/protocol2-account-provisioning"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements Protocol 2.0 (account provisioning + social/political world-state streams) and 2.1 (Town Cryer news gump), per
docs/PROTOCOL_2.md. All script-layer — no core/stock ServUO edits, no new patches.Part A — account provisioning & unlinking
account.create(POST /accounts/create) — website mints a game account and links it in one step. Reuses the shard's own char-safety validation and per-IP cap (CanCreate/LogAccess), fails closed on a missing/loopback IP, refuses duplicates. Password never logged or echoed.account.unlink(DELETE /link/{account}, Owner-floor guarded, clears the sidecar mirror) and an in-game[unlink.Bridge.SignupMode=website/game/hybrid(default), with a boot warning when the coreAccounts.AutoCreateAccountscontradicts the mode.PROTOCOL_VERSION→ 2 (outbound events stay additive; new endpoints require v2).Part B — social & political world-state streams
Diff-board sweeps mirroring the existing champ board (full-state upsert on change, re-emit on reconnect, served from SQLite so a fresh page / restarted sidecar hydrates without the shard):
guild.update/remove+ real-timeguild.join;GET /guilds.city.updatefrom the City Loyalty system;GET /governors.presence.online(total + per-facet + per-region) + real-timeregion.enter;GET /online.house.update/remove(owner/decay/co-owners/price);GET /houses.titlesblock added tochar.profile.Protocol 2.1 — Town Cryer news
news.add/news.remove(POST /news,DELETE /news/{id}) — website articles (title, HTML body, image, URL) go into the modern Town Cryer News gump (TownCryerSystem.NewsEntries), and the criers proclaim the title in-world (default on). Pure overlay — inserts into the public list and tracks its own entries, leaving stock news intact. Sidecar re-pushes articles on shard reconnect (website is source of truth).Verification
cargo checkclean; overlay compiles in the full ServUO Scripts tree (0 errors, 0 warnings).docs/PROTOCOL_2.md §15): Part A create/dup/IP-cap(429 at the shard's real limit)/loopback/unlink all correct;/houses(28),/governors(9 cities),/guilds,/online,/chartitles all returned; news add/replace/remove/error + the reconnect replay verified end-to-end.presence.onlinewith real players,region.enter, real-timeguild.join,char.vitals, and gump rendering (verified by source inspection).Notes
docs/INTEGRATION.mddocuments every new event/endpoint;docs/PROTOCOL_2.mdis the full design + verification log.Dynamicrecompile can't replaceScripts.dllwhile the server holdsServUO.exelocked — buildScripts.csprojwith the server stopped, then boot.🤖 Generated with Claude Code
Adds the first Part B streams from docs/PROTOCOL_2.md: guild rosters and town governors ("mayors"), both outbound diff-board sweeps mirroring the existing champ board. Overlay: - BridgeSocial (new): guild sweep+diff over BaseGuild.List -> guild.update / guild.remove (full-state upsert; disband detected via Disbanded), plus a real-time guild.join from EventSink.JoinGuild. (EventSink.CreateGuild is only the load-time factory, so creation is derived sidecar-side from a first-seen id, as champs do.) - BridgeGovernance (new): city sweep over CityLoyaltySystem.Cities -> city.update (governor / governor-elect / election phase), gated on CityLoyaltySystem.Enabled. - BridgeJson.Actor: shared serial/name/acct/webId/player writer used by both. - BridgeConfig: GuildSweepSeconds (60s), CitySweepSeconds (300s). - BridgeBoot: both wired into [bridge reload|sweepnow|status. Sidecar: - store: guilds + governors board tables with upsert/delete/all. - main: route guild.update/remove and city.update into the boards. - web: GET /guilds, GET /governors served from the store (snapshot-companion rule, so a fresh page or a restarted sidecar hydrates without the shard). Docs: INTEGRATION.md event catalog (guild.*, city.update) + board endpoints; PROTOCOL_2.md Part B phase 1 marked built. Verified: sidecar cargo check clean; overlay compiles in the full ServUO Scripts tree (0 errors, 0 warnings). Live end-to-end run still pending. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>Adds §16: sync website news articles into the modern Town Cryer News gump (TownCryerSystem.NewsEntries), distinct from the Protocol 1.0 scrolling-crier lines (GlobalTownCrierEntryList). Grounded in the shard's Town Cryer source. Key findings / decisions: - NewsEntries is a public mutable List and TownCryerNewsEntry's ctor is public, and the display gumps already branch on Title/Body .Number>0 (cliloc) vs string (AddLabelCropped / AddHtml with HTML support). So website content needs NO gump changes and NO stock patch — the overlay inserts/removes directly and tracks its own entries, leaving stock uo.com news intact. (Refines the pasted guidance, which proposed adding methods to the stock TownCryerSystem.cs = a patch.) - Ties the two surfaces together: full article -> news gump; crier "says" just the title via the existing GlobalTownCrierEntryList path. - news.add/news.remove verbs (id-correlated, idempotent), POST /news + DELETE /news/{id}; website is source of truth, re-synced on shard reconnect since NewsEntries isn't persisted across reboot. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>Website news articles now land in the modern Town Cryer News gump (TownCryerSystem.NewsEntries), separate from the scrolling-crier lines. Overlay BridgeNews (new): news.add / news.remove insert/remove a TownCryerNewsEntry directly in the public NewsEntries list (no stock edit), tracking our own id->entry map so stock uo.com news is left intact. Title, HTML body, image, and URL are all supported (the stock gumps already branch on TextDefinition.Number, so string content renders). On add the article title is also proclaimed via GlobalTownCrierEntryList (announce defaults on; set announce:false to suppress). Config caps: NewsMaxTitleLength/BodyLength/ External, NewsAnnounceDurationSec. Sidecar: POST /news (add/replace, id-correlated), DELETE /news/{id}; news table stores each article as its news.add command; on shard server.hello the sidecar replays the stored set with announce:false (the shard rebuilds NewsEntries each boot and does not persist ours, so the website is the source of truth). Docs: PROTOCOL_2 §16 (design + verified), INTEGRATION.md /news endpoints. Verified live: sidecar cargo check clean; overlay compiles in the full ServUO Scripts tree (0 errors); booted shard + sidecar and exercised add/replace/ remove/error paths and the reconnect replay end-to-end. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>