Message list #11

Closed
opened 2026-11-10 16:48:47 +01:00 by SirStone · 5 comments
Owner

Part of #2

Question

Complete the §6.1 wire message list for M3. Missing pieces:

  • GM clear-blocked intent (§5.5; gmClearBlocked exists).
  • CRUD intent and diff shapes for wall., entity., prop.set, scene.set, invite.*.
  • moveAck mapping from MoveResult.
  • Error shapes (static strings). act is reserved.
  • Depends on #3 (ids appear in messages).
Part of #2 ## Question Complete the §6.1 wire message list for M3. Missing pieces: - GM clear-blocked intent (§5.5; gmClearBlocked exists). - CRUD intent and diff shapes for wall.*, entity.*, prop.set, scene.set, invite.*. - moveAck mapping from MoveResult. - Error shapes (static strings). act is reserved. - Depends on #3 (ids appear in messages).
SirStone added the wayfinder:grilling label 2026-11-10 16:48:47 +01:00
SirStone added a new dependency 2026-11-10 16:49:02 +01:00
SirStone added a new dependency 2026-11-10 16:49:07 +01:00
Author
Owner

Note from #4 (Token size, decided 2026-11-10, commit 90576381df). M3 needs these GM intents, names still open for this card:

  • Token resize (GM only): sets the token's radius, or clears it to use the scene default.
  • Set status (stuck | squeezed, source GM).
  • Clear status entry (status + source).

Token message (server -> client) carries the token's radius and its status entries ({status, source}) to anyone who sees the token.

Scene default size (token_radius_default) goes in hello.

Details: docs/DESIGN.md 5.5 and 5.6.

Note from #4 (Token size, decided 2026-11-10, commit 90576381df2e1c0724aa386c96d21747e838532b). M3 needs these GM intents, names still open for this card: - Token resize (GM only): sets the token's radius, or clears it to use the scene default. - Set status (`stuck` | `squeezed`, source `GM`). - Clear status entry (status + source). Token message (server -> client) carries the token's radius and its status entries (`{status, source}`) to anyone who sees the token. Scene default size (`token_radius_default`) goes in `hello`. Details: docs/DESIGN.md 5.5 and 5.6.
Author
Owner

Input from #14 (Characters and player data, decided 2026-11-10; see docs/DESIGN.md 8, 3.1, 6.1). M3 needs these messages, names and fields to be defined here:

  • Character CRUD: create, update (identity/base values, character props), delete. Create/update name a descriptive_name and actual_name.
  • Character owner reassignment (GM only): one owner at a time (player or GM). Does not change token controllers.
  • Token controller change (GM only): per token, independent of the character owner. Also covers a token's link to a character (character_id) on create/update.
  • Name reveal: per player (GM reveals a character's or plain token's actual name to one player), and "reveal to all" shortcut (reveal_all).
  • Encountered list sync: server-to-player full list on connect and diffs after. Entries carry the name that player knows and a greyed flag when out of sight.
  • Encountered list remove (GM only): removes one entry for one player. Nothing else removes entries.
  • Character data edits: owner-bucket and gm-bucket prop writes, with the same authority rules as token props (section 8).

Per the note in DESIGN 6.1, the message names and fields are defined here, not in DESIGN.

Input from #14 (Characters and player data, decided 2026-11-10; see docs/DESIGN.md 8, 3.1, 6.1). M3 needs these messages, names and fields to be defined here: - **Character CRUD**: create, update (identity/base values, character props), delete. Create/update name a `descriptive_name` and `actual_name`. - **Character owner reassignment** (GM only): one owner at a time (player or GM). Does not change token controllers. - **Token controller change** (GM only): per token, independent of the character owner. Also covers a token's link to a character (`character_id`) on create/update. - **Name reveal**: per player (GM reveals a character's or plain token's actual name to one player), and "reveal to all" shortcut (`reveal_all`). - **Encountered list sync**: server-to-player full list on connect and diffs after. Entries carry the name that player knows and a greyed flag when out of sight. - **Encountered list remove** (GM only): removes one entry for one player. Nothing else removes entries. - **Character data edits**: owner-bucket and gm-bucket prop writes, with the same authority rules as token props (section 8). Per the note in DESIGN 6.1, the message names and fields are defined here, not in DESIGN.
Author
Owner

Message list: messages needed for #6 (Players and invites), names to be set here:

  • key create (GM creates a player key, no name)
  • key replace (GM; old key invalid; closes that player's sessions and connections)
  • key re-show (GM)
  • player rename (GM)
  • player remove (GM; characters and controlled tokens to GM; encountered list deleted)
  • sign-in with key (HTTP; POST /join, key in body; sets session cookie; /join path is the proposed default in DESIGN.md 3.2)
  • first-sign-in name prompt (player with no name; unique among players)
Message list: messages needed for #6 (Players and invites), names to be set here: - key create (GM creates a player key, no name) - key replace (GM; old key invalid; closes that player's sessions and connections) - key re-show (GM) - player rename (GM) - player remove (GM; characters and controlled tokens to GM; encountered list deleted) - sign-in with key (HTTP; `POST /join`, key in body; sets session cookie; `/join` path is the proposed default in DESIGN.md 3.2) - first-sign-in name prompt (player with no name; unique among players)
SirStone self-assigned this 2026-11-14 20:32:05 +01:00
Author
Owner

Resolved (owner-delegated, 2026-11-14), commit 277cb5f, docs/DESIGN.md section 6 (6.1-6.6), v0.12.

Rules:

  • R1 naming: client t = <noun>.<verb> (GLOSSARY nouns; token, never "entity"); server t = dotless snake_case noun. Sets cannot collide.
  • R2 correlation: every intent has reqId, gets exactly one ack {reqId, ok, code?, id?, pos?, key?, ts?} (moveAck generalised). Refused controller move stays uniform (old pos, no code, T9). Unreadable frame: error.
  • R3 codes: ack codes rate-limited, unknown-type, not-allowed, not-found, invalid, name-taken, cap-reached, in-use, no-rules; error codes malformed, rate-limited. Connection: HTTP 403 Origin, 401 no session, 400, 503 (17th conn); WS close 4001 revoked, 4002 evicted (5th conn), 4003 proto mismatch, 1008 malformed flood (10 in 10 s); oversize = mummy TCP close, no frame; 1001 shutdown is M5. Pipeline order of checks fixed in 6.5. Versioning: mismatch both ways closes 4003 after upgrade (browser cannot read HTTP status).
  • R4 clean-up: invite.* and invite wording gone (M3 scope now says player keys); blocked/gmClearBlocked -> status.set/status.clear; token.resize (null = default); prop.set/prop.unset take target token|character and bucket; all #14 and #6 messages added; POST /join specified in 6.6 (HTTP); act stays reserved as act.do.
  • R5 every row lists sender and recipients; leak review notes in 6.1.

Counts: 29 intents (conn/reserved 2, players+keys 6, scene/walls/doors 5, tokens/status/props 9, characters/names/encountered 7); 14 server messages (hello, ack, error, roster, walls, wall, wall_gone, vision, explored, token, token_gone, character, character_gone, encountered). Folded: server door into wall, presence into roster, pong into the ping ack, hello.owned into token.mine.

Flags for the owner (not decided by me beyond the safe default):

  1. Leak, decided safe: kind is GM-only (an npc value would tell players what a token is); character_id only to GM and the character's owner; cprops public bucket only, always present for non-owners; roster hides unnamed players from players.
  2. Players cannot create or edit characters in M3 (all character and prop writes are GM-only, following section 1 v1 scope). Player-facing play UX.
  3. No un-reveal intent (reveals never revoke, #14).
  4. character.remove is refused with in-use while tokens link it.
  5. token.update on gm_only after a player already met the token leaves the encountered entry (never auto-removed); unspecified.
  6. key.show/key.replace on the GM's own id refused (GM key via CLI only, 3.2).
  7. statuses[].source goes to all who see the token (#4 FIXED); leak review found no extra fact beyond LOS.
Resolved (owner-delegated, 2026-11-14), commit 277cb5f, docs/DESIGN.md section 6 (6.1-6.6), v0.12. Rules: - R1 naming: client `t` = `<noun>.<verb>` (GLOSSARY nouns; `token`, never "entity"); server `t` = dotless snake_case noun. Sets cannot collide. - R2 correlation: every intent has `reqId`, gets exactly one `ack {reqId, ok, code?, id?, pos?, key?, ts?}` (moveAck generalised). Refused controller move stays uniform (old pos, no code, T9). Unreadable frame: `error`. - R3 codes: ack codes `rate-limited, unknown-type, not-allowed, not-found, invalid, name-taken, cap-reached, in-use, no-rules`; error codes `malformed, rate-limited`. Connection: HTTP 403 Origin, 401 no session, 400, 503 (17th conn); WS close 4001 revoked, 4002 evicted (5th conn), 4003 proto mismatch, 1008 malformed flood (10 in 10 s); oversize = mummy TCP close, no frame; 1001 shutdown is M5. Pipeline order of checks fixed in 6.5. Versioning: mismatch both ways closes 4003 after upgrade (browser cannot read HTTP status). - R4 clean-up: invite.* and invite wording gone (M3 scope now says player keys); `blocked`/gmClearBlocked -> `status.set`/`status.clear`; `token.resize` (null = default); `prop.set`/`prop.unset` take `target` token|character and `bucket`; all #14 and #6 messages added; `POST /join` specified in 6.6 (HTTP); `act` stays reserved as `act.do`. - R5 every row lists sender and recipients; leak review notes in 6.1. Counts: 29 intents (conn/reserved 2, players+keys 6, scene/walls/doors 5, tokens/status/props 9, characters/names/encountered 7); 14 server messages (hello, ack, error, roster, walls, wall, wall_gone, vision, explored, token, token_gone, character, character_gone, encountered). Folded: server `door` into `wall`, `presence` into `roster`, `pong` into the ping ack, `hello.owned` into `token.mine`. Flags for the owner (not decided by me beyond the safe default): 1. Leak, decided safe: `kind` is GM-only (an `npc` value would tell players what a token is); `character_id` only to GM and the character's owner; `cprops` public bucket only, always present for non-owners; roster hides unnamed players from players. 2. Players cannot create or edit characters in M3 (all character and prop writes are GM-only, following section 1 v1 scope). Player-facing play UX. 3. No un-reveal intent (reveals never revoke, #14). 4. `character.remove` is refused with `in-use` while tokens link it. 5. `token.update` on `gm_only` after a player already met the token leaves the encountered entry (never auto-removed); unspecified. 6. `key.show`/`key.replace` on the GM's own id refused (GM key via CLI only, 3.2). 7. `statuses[].source` goes to all who see the token (#4 FIXED); leak review found no extra fact beyond LOS.
Author
Owner

Owner review of the #11 play-visible flags, decided 2026-11-14. Applied in commit 7667e28 (docs/DESIGN.md, v0.13).

  1. Players cannot create or edit characters or props in v1 (GM only). Opening this later is a permission change on the existing intents, not a redesign.
  2. A revealed name cannot be un-revealed. No un-reveal intent.
  3. character.remove is refused with in-use while tokens link the character.
  4. Encountered stays encountered. A gm_only flip after a player met the token leaves the entry (greyed).
  5. Status markers do not reveal their cause to non-GM viewers. Viewers see the status only (e.g. squeezed). statuses[].source goes to the GM only. This amends the #4 wording. The controlling owner is not given source either, since the doc has no owner-view rule for statuses; revisit if wanted.
Owner review of the #11 play-visible flags, decided 2026-11-14. Applied in commit 7667e28 (docs/DESIGN.md, v0.13). 1. Players cannot create or edit characters or props in v1 (GM only). Opening this later is a permission change on the existing intents, not a redesign. 2. A revealed name cannot be un-revealed. No un-reveal intent. 3. `character.remove` is refused with `in-use` while tokens link the character. 4. Encountered stays encountered. A `gm_only` flip after a player met the token leaves the entry (greyed). 5. Status markers do not reveal their cause to non-GM viewers. Viewers see the status only (e.g. `squeezed`). `statuses[].source` goes to the GM only. This amends the #4 wording. The controlling owner is not given `source` either, since the doc has no owner-view rule for statuses; revisit if wanted.
Sign in to join this conversation.