design: owner review of message list flags (#11)
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
+13
-11
@@ -1,6 +1,6 @@
|
|||||||
# FFF_vtt design
|
# FFF_vtt design
|
||||||
|
|
||||||
Status: draft v0.12, 2026-11-14 (owner decisions recorded in section 14; v0.4 records Q4 (tile_size 32 px), the outbox lock invariant (4.2, 4.3), and the follow-ups in 3.4, 8, 11.1, 12, 13; v0.5 records the M2 move-rule decisions in 5.5 and updates 3.4, 4.2, 5.1, 5.4, 6.1, 7.4, 8, 10.3, 12, 13; v0.6 records #14 (characters and player data) in 3.1, 3.4, 4.1, 4.4, 6.1, 8, 9, 10.3, 13, 14; v0.7 records #6 (players and invites) in 3.1, 3.2, 3.4, 4.4, 6.1, 8, 12, 13, 14; v0.8 records #7 (map tiles) in 3.3, 3.4, 11.1, 13, 14; v0.9 records #9 (test tools) in 2, 10.4, 13, 14; v0.10 records #12 (what M3 done means) in 13, 14; v0.11 records #15 (M3 limits) in 4.3, 6.4, 10.1, 13, 14; v0.12 records #11 (M3 message list) in 3.1, 3.2, 3.4, 4.2, 4.3, 5.5, 5.6, 6, 7.5, 13, 14. All of Q1-Q24 are RESOLVED or DEFERRED; none OPEN). Audience: the owner and coding agents.
|
Status: draft v0.13, 2026-11-14 (owner decisions recorded in section 14; v0.4 records Q4 (tile_size 32 px), the outbox lock invariant (4.2, 4.3), and the follow-ups in 3.4, 8, 11.1, 12, 13; v0.5 records the M2 move-rule decisions in 5.5 and updates 3.4, 4.2, 5.1, 5.4, 6.1, 7.4, 8, 10.3, 12, 13; v0.6 records #14 (characters and player data) in 3.1, 3.4, 4.1, 4.4, 6.1, 8, 9, 10.3, 13, 14; v0.7 records #6 (players and invites) in 3.1, 3.2, 3.4, 4.4, 6.1, 8, 12, 13, 14; v0.8 records #7 (map tiles) in 3.3, 3.4, 11.1, 13, 14; v0.9 records #9 (test tools) in 2, 10.4, 13, 14; v0.10 records #12 (what M3 done means) in 13, 14; v0.11 records #15 (M3 limits) in 4.3, 6.4, 10.1, 13, 14; v0.12 records #11 (M3 message list) in 3.1, 3.2, 3.4, 4.2, 4.3, 5.5, 5.6, 6, 7.5, 13, 14; v0.13 records the owner review of #11 flags in 1, 3.1, 5.5, 6.1, 8, 14. All of Q1-Q24 are RESOLVED or DEFERRED; none OPEN). Audience: the owner and coding agents.
|
||||||
|
|
||||||
Legend:
|
Legend:
|
||||||
- **[FIXED]** owner decision, not up for debate here.
|
- **[FIXED]** owner decision, not up for debate here.
|
||||||
@@ -26,7 +26,7 @@ A browser virtual tabletop for one table (1 GM + up to 6 players [FIXED, Q1]), s
|
|||||||
- One table, 1 GM + up to 6 players (max 6 [FIXED, owner decision 2026-11-08, Q1]), a shared site link and per-player keys, no accounts.
|
- One table, 1 GM + up to 6 players (max 6 [FIXED, owner decision 2026-11-08, Q1]), a shared site link and per-player keys, no accounts.
|
||||||
- Exactly one scene in v1 (Q3, FIXED): large tiled map image, optional visual grid, walls and doors (kinds `wall`|`door` only, Q6), tokens.
|
- Exactly one scene in v1 (Q3, FIXED): large tiled map image, optional visual grid, walls and doors (kinds `wall`|`door` only, Q6), tokens.
|
||||||
- GM tools: author walls/doors in the browser (Q6, FIXED), create/move/delete tokens, toggle doors, edit token properties, manage players and player keys.
|
- GM tools: author walls/doors in the browser (Q6, FIXED), create/move/delete tokens, toggle doors, edit token properties, manage players and player keys.
|
||||||
- Player: move owned tokens; see only line-of-sight area, previously explored area (dimmed), and tokens inside LOS.
|
- Player: move owned tokens only; see only line-of-sight area, previously explored area (dimmed), and tokens inside LOS. Character creation and edits and all prop writes are GM-only in v1; opening them to players later is a permission change on the existing intents (6.1), not a redesign.
|
||||||
- Automatic LOS from owned tokens against walls/doors, server-side. Explored area = per-player cell grid, persisted.
|
- Automatic LOS from owned tokens against walls/doors, server-side. Explored area = per-player cell grid, persisted.
|
||||||
- Persistence across restarts; reconnect resync; backups.
|
- Persistence across restarts; reconnect resync; backups.
|
||||||
- Generic entity model (typed properties with visibility buckets) as the seam for FFF.
|
- Generic entity model (typed properties with visibility buckets) as the seam for FFF.
|
||||||
@@ -97,7 +97,7 @@ A browser virtual tabletop for one table (1 GM + up to 6 players [FIXED, Q1]), s
|
|||||||
| Data | GM | Player (own) | Player (others) |
|
| Data | GM | Player (own) | Player (others) |
|
||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
| Walls, doors (geometry, open/closed) | all, always | **never** (WS or HTTP) | never |
|
| Walls, doors (geometry, open/closed) | all, always | **never** (WS or HTTP) | never |
|
||||||
| Tokens/entities (position, radius, statuses, name per 8) | all | controlled by this player (`entity.owner`): always. Others: only if inside own LOS polygon **and** not `gm_only` | -- |
|
| Tokens/entities (position, radius, statuses without `source`, name per 8) | all | controlled by this player (`entity.owner`): always. Others: only if inside own LOS polygon **and** not `gm_only` | -- |
|
||||||
| Token props, `public` bucket | all | for visible tokens | -- |
|
| Token props, `public` bucket | all | for visible tokens | -- |
|
||||||
| Token props, `owner` bucket (owner = token controller) | all | only for tokens this player controls | never |
|
| Token props, `owner` bucket (owner = token controller) | all | only for tokens this player controls | never |
|
||||||
| Token props, `gm` bucket | all | never | never |
|
| Token props, `gm` bucket | all | never | never |
|
||||||
@@ -118,7 +118,7 @@ Notes:
|
|||||||
- Prototype gap [INFERRED from code reading]: `Tok.gmOnly` is loaded from `scene.json` but never consulted in `sync()`; a GM-only token inside a player's LOS would be sent. Real build must enforce `gm_only` in the view builder and test it (new fault class, section 10).
|
- Prototype gap [INFERRED from code reading]: `Tok.gmOnly` is loaded from `scene.json` but never consulted in `sync()`; a GM-only token inside a player's LOS would be sent. Real build must enforce `gm_only` in the view builder and test it (new fault class, section 10).
|
||||||
- Prototype gap [INFERRED]: every message carries the global `gseq`; player-visible gaps in `gseq` reveal that hidden mutations occurred. Real build: players get a per-connection monotonic counter.
|
- Prototype gap [INFERRED]: every message carries the global `gseq`; player-visible gaps in `gseq` reveal that hidden mutations occurred. Real build: players get a per-connection monotonic counter.
|
||||||
- `hello` to a player carries world size, tile size, explored cell size, scene default token and vision radius, art version, own player id and name. None of these is secret (owned token ids travel as `mine` on `token`, 6.1). It must not carry scene/entity counts or wall counts.
|
- `hello` to a player carries world size, tile size, explored cell size, scene default token and vision radius, art version, own player id and name. None of these is secret (owned token ids travel as `mine` on `token`, 6.1). It must not carry scene/entity counts or wall counts.
|
||||||
- A token's radius and status entries (5.5, 5.6) go to every recipient who sees the token [FIXED, owner decision 2026-11-10, #4].
|
- A token's radius and statuses go to every recipient who sees the token [FIXED, owner decision 2026-11-10, #4]. Amended 2026-11-14: a status entry's `source` goes to the GM only; viewers see the status (e.g. `squeezed`), not its cause. The controlling owner gets no `source` either (the doc has no owner-view rule for statuses; revisit if wanted).
|
||||||
- [FIXED, #14] Names and lists: no code path sends an actual name, a reveal state, or another player's character or encountered entry to a player, unless the rules in 8 allow it. Players learn a character only through a token they saw or controlled, or through their own encountered list. A character owner change never changes token controllers.
|
- [FIXED, #14] Names and lists: no code path sends an actual name, a reveal state, or another player's character or encountered entry to a player, unless the rules in 8 allow it. Players learn a character only through a token they saw or controlled, or through their own encountered list. A character owner change never changes token controllers.
|
||||||
|
|
||||||
### 3.2 Authentication: shared link, player keys, GM key
|
### 3.2 Authentication: shared link, player keys, GM key
|
||||||
@@ -304,7 +304,7 @@ Normative for M2. Replaces the prototype move validation (5.1) and the move-rela
|
|||||||
Notation: token centre `c`, radius `r` (entity `radius` if set, else scene `token_radius_default`; 5.6), start `s`, destination `d`. Blocking wall: segment with `kind=wall`, or `kind=door` with `open=false`; open doors do not block. `dist(X, W)` = distance from point or segment `X` to segment `W`. "Overlaps" = `dist < r` (strict; touching at exactly r is clear).
|
Notation: token centre `c`, radius `r` (entity `radius` if set, else scene `token_radius_default`; 5.6), start `s`, destination `d`. Blocking wall: segment with `kind=wall`, or `kind=door` with `open=false`; open doors do not block. `dist(X, W)` = distance from point or segment `X` to segment `W`. "Overlaps" = `dist < r` (strict; touching at exactly r is clear).
|
||||||
|
|
||||||
**Statuses `stuck` and `squeezed`** (replace the M2 `blocked` bool) [FIXED, owner (B), Q14, refined 2026-11-08; FIXED, owner 2026-11-10, #4]. Both are cause-agnostic lock conditions: a locked token cannot be moved by its player; the GM always can. `stuck` = held in place (wall through it, ropes, magic grasp); `squeezed` = pressed, no room (walls around it, closing hand).
|
**Statuses `stuck` and `squeezed`** (replace the M2 `blocked` bool) [FIXED, owner (B), Q14, refined 2026-11-08; FIXED, owner 2026-11-10, #4]. Both are cause-agnostic lock conditions: a locked token cannot be moved by its player; the GM always can. `stuck` = held in place (wall through it, ropes, magic grasp); `squeezed` = pressed, no room (walls around it, closing hand).
|
||||||
- Storage: a token holds a set of `(status, source)` entries (stored on the entity, persisted); the same status may come from several sources. Locked while any entry exists. Both statuses may show at once. Sources: `walls` (set by the rules below) and `GM` (GM sets either status by hand for any reason; GM can clear any single entry at any time).
|
- Storage: a token holds a set of `(status, source)` entries (stored on the entity, persisted); the same status may come from several sources. Locked while any entry exists. Both statuses may show at once. Sources: `walls` (set by the rules below) and `GM` (GM sets either status by hand for any reason; GM can clear any single entry at any time). Visibility: every recipient who sees the token gets `status` only; `source` is GM-only (6.1, amended 2026-11-14).
|
||||||
- Overlap: `dist(c, W) < r` for a blocking wall `W`. An open door stops blocking, so opening = removing that wall for this rule; closing = adding it. Centre-on-wall is not required.
|
- Overlap: `dist(c, W) < r` for a blocking wall `W`. An open door stops blocking, so opening = removing that wall for this rule; closing = adding it. Centre-on-wall is not required.
|
||||||
- Set (source `walls`): a wall is added or updated -> every token overlapping that wall gets `stuck`. (A door CLOSING on a token does not set it: push rule below.) The GM places or moves a token to a position overlapping any blocking wall -> `stuck`.
|
- Set (source `walls`): a wall is added or updated -> every token overlapping that wall gets `stuck`. (A door CLOSING on a token does not set it: push rule below.) The GM places or moves a token to a position overlapping any blocking wall -> `stuck`.
|
||||||
- Keep: while any blocking wall still overlaps the token, its `walls`-sourced entries stay (opening a door does not free it if another wall overlaps).
|
- Keep: while any blocking wall still overlaps the token, its `walls`-sourced entries stay (opening a door does not free it if another wall overlaps).
|
||||||
@@ -401,7 +401,7 @@ Validation for `wall.*`: `a != b`, both in bounds, `kind` in `wall|door`, `flags
|
|||||||
| t | fields | who | ack ok / extra codes | effects and recipients |
|
| t | fields | who | ack ok / extra codes | effects and recipients |
|
||||||
|---|---|---|---|---|
|
|---|---|---|---|---|
|
||||||
| `token.create` | `scene, kind, pos`; plain token (no `character_id`): `descriptive_name, actual_name` required; linked: `character_id` and **no** names; optional `controller` (player id or null = GM; default: the character's owner if linked, else GM), `radius` (px > 0), `vision_radius`, `gm_only`, `flags`, `props` | G | `{id}`; `invalid`, `not-found` (scene, character or controller) | `token` to the GM and to each recipient who sees it (the controller always); vision recompute; GM placement ignores walls, `stuck` if it overlaps one (5.5); a new `encountered` entry for a player who sees it (diff) |
|
| `token.create` | `scene, kind, pos`; plain token (no `character_id`): `descriptive_name, actual_name` required; linked: `character_id` and **no** names; optional `controller` (player id or null = GM; default: the character's owner if linked, else GM), `radius` (px > 0), `vision_radius`, `gm_only`, `flags`, `props` | G | `{id}`; `invalid`, `not-found` (scene, character or controller) | `token` to the GM and to each recipient who sees it (the controller always); vision recompute; GM placement ignores walls, `stuck` if it overlaps one (5.5); a new `encountered` entry for a player who sees it (diff) |
|
||||||
| `token.update` | `id`; any of `kind, descriptive_name, actual_name, character_id (string = link, null = unlink), controller (player id or null), gm_only, flags, vision_radius (number or null)` | G | `{}`; `not-found`, `invalid` (links with names; unlinking without both names) | `token` per view. Controller change: `mine` flips, the old controller loses the token unless it is in their LOS (`token_gone` by diff), vision recomputed for both; **never** changes the character owner. `gm_only` set: players lose it (`token_gone`) |
|
| `token.update` | `id`; any of `kind, descriptive_name, actual_name, character_id (string = link, null = unlink), controller (player id or null), gm_only, flags, vision_radius (number or null)` | G | `{}`; `not-found`, `invalid` (links with names; unlinking without both names) | `token` per view. Controller change: `mine` flips, the old controller loses the token unless it is in their LOS (`token_gone` by diff), vision recomputed for both; **never** changes the character owner. `gm_only` set: players lose it (`token_gone`); their `encountered` entry stays, greyed (8) |
|
||||||
| `token.move` | `id, pos` | P (controlled) / G (any) | `{pos}` (accepted position); P refused: uniform `{ok:false, pos:old}` (5.5); non-controlled or unknown id for P: `not-allowed` (one code for both, no existence oracle); G unknown id: `not-found`; G out of bounds: uniform nack | `token` per view; vision for the mover's player; `explored` fresh cells; pushes/status changes as server-originated `token` updates |
|
| `token.move` | `id, pos` | P (controlled) / G (any) | `{pos}` (accepted position); P refused: uniform `{ok:false, pos:old}` (5.5); non-controlled or unknown id for P: `not-allowed` (one code for both, no existence oracle); G unknown id: `not-found`; G out of bounds: uniform nack | `token` per view; vision for the mover's player; `explored` fresh cells; pushes/status changes as server-originated `token` updates |
|
||||||
| `token.resize` | `id, radius:number>0 or null` (null = back to the scene default) | G | `{}`; `not-found`, `invalid` | `token` per view (effective `radius`); grow pushes or sets `squeezed`, shrink may clear `walls`-sourced entries (5.6) |
|
| `token.resize` | `id, radius:number>0 or null` (null = back to the scene default) | G | `{}`; `not-found`, `invalid` | `token` per view (effective `radius`); grow pushes or sets `squeezed`, shrink may clear `walls`-sourced entries (5.6) |
|
||||||
| `token.remove` | `id` | G | `{}`; `not-found` | `token_gone` to every recipient who knew it; its `encountered` entries stay and turn grey (never auto-removed, 8) |
|
| `token.remove` | `id` | G | `{}`; `not-found` | `token_gone` to every recipient who knew it; its `encountered` entries stay and turn grey (never auto-removed, 8) |
|
||||||
@@ -418,7 +418,7 @@ Validation for `wall.*`: `a != b`, both in bounds, `kind` in `wall|door`, `flags
|
|||||||
| `character.update` | `id`; any of `descriptive_name, actual_name` (props go through `prop.set`) | G | `{}`; `not-found`, `invalid` | `character` to GM and owner; `token` names per view for its tokens; `encountered` upserts for players who met it |
|
| `character.update` | `id`; any of `descriptive_name, actual_name` (props go through `prop.set`) | G | `{}`; `not-found`, `invalid` | `character` to GM and owner; `token` names per view for its tokens; `encountered` upserts for players who met it |
|
||||||
| `character.remove` | `id` | G | `{}`; `not-found`, `in-use` (any token still links it; GM removes or unlinks the tokens first) | `character_gone` to GM and owner |
|
| `character.remove` | `id` | G | `{}`; `not-found`, `in-use` (any token still links it; GM removes or unlinks the tokens first) | `character_gone` to GM and owner |
|
||||||
| `character.reassign` | `id, owner:player id` | G | `{}`; `not-found`, `invalid` | `character` to GM and the new owner, `character_gone` to the old owner; **no** token controller changes (3.1); reveals kept [PROPOSED, 8]; `token` per view (`character_id` and actual name visibility follow the owner) |
|
| `character.reassign` | `id, owner:player id` | G | `{}`; `not-found`, `invalid` | `character` to GM and the new owner, `character_gone` to the old owner; **no** token controller changes (3.1); reveals kept [PROPOSED, 8]; `token` per view (`character_id` and actual name visibility follow the owner) |
|
||||||
| `name.reveal` | `subject:"character"|"token", id, player` (the player's id) | G | `{}`; `not-found`, `invalid` (a token that has a character: reveal through the character) | to that player only: `token`, `character`, `encountered` updated with the actual name; to GM: the updated `revealed` list. Reveals never revoke (3.1); there is no un-reveal intent in M3 |
|
| `name.reveal` | `subject:"character"|"token", id, player` (the player's id) | G | `{}`; `not-found`, `invalid` (a token that has a character: reveal through the character) | to that player only: `token`, `character`, `encountered` updated with the actual name; to GM: the updated `revealed` list. Reveals never revoke (8); there is no un-reveal intent in M3 |
|
||||||
| `name.reveal_all` | `subject, id` | G | `{}`; `not-found`, `invalid` | sets `reveal_all`; as `name.reveal` for every player. Idempotent |
|
| `name.reveal_all` | `subject, id` | G | `{}`; `not-found`, `invalid` | sets `reveal_all`; as `name.reveal` for every player. Idempotent |
|
||||||
| `encountered.remove` | `player, id` (token id) | G | `{}`; `not-found` (player or entry) | `encountered {del:[id]}` to that player, same to GM |
|
| `encountered.remove` | `player, id` (token id) | G | `{}`; `not-found` (player or entry) | `encountered {del:[id]}` to that player, same to GM |
|
||||||
|
|
||||||
@@ -439,7 +439,7 @@ All are built per recipient at egress (single egress rule, 2). "Sent" always mea
|
|||||||
| `wall_gone` | `scene, id` | GM only |
|
| `wall_gone` | `scene, id` | GM only |
|
||||||
| `vision` | `polys:[{id:<token id>, pts:[[x,y],...]}]` integer px, the full set for this player's controlled tokens with `vision` | player only; never GM |
|
| `vision` | `polys:[{id:<token id>, pts:[[x,y],...]}]` integer px, the full set for this player's controlled tokens with `vision` | player only; never GM |
|
||||||
| `explored` | `full:true, rle:[[cy, x0, len, x0, len, ...], ...]` on connect and resync; `full:false, cells:[[cx,cy],...]` afterwards (fresh cells) [format PROPOSED, 6.4] | player only; never GM |
|
| `explored` | `full:true, rle:[[cy, x0, len, x0, len, ...], ...]` on connect and resync; `full:false, cells:[[cx,cy],...]` afterwards (fresh cells) [format PROPOSED, 6.4] | player only; never GM |
|
||||||
| `token` | `id, scene, name, pos, radius, mine, statuses:[{status, source}], props`; `name` = the one name this recipient may see (8), no reveal state; `radius` = effective px; `props` = only the buckets this recipient may read (public; plus owner for the controller; all three for GM). More for specific recipients: `character_id` (GM, and a player who owns that character); `cprops:{public:{}}` the character's public props (player who does not own the character; `{}` for a plain token); `kind, controller (id or null), gm_only, flags, vision_radius, radius_own (number or null)` (GM); `vision_radius` also for the controller (the step cap, 5.5); plain tokens, GM: `descriptive_name, actual_name, reveal_all, revealed:[player ids]` | GM: all tokens; player: tokens they control, plus tokens inside own LOS and not `gm_only` (3.1). Whole view of one token per message |
|
| `token` | `id, scene, name, pos, radius, mine, statuses:[{status}], props`; `name` = the one name this recipient may see (8), no reveal state; `radius` = effective px; `props` = only the buckets this recipient may read (public; plus owner for the controller; all three for GM). More for specific recipients: `statuses[].source` (GM only); `character_id` (GM, and a player who owns that character); `cprops:{public:{}}` the character's public props (player who does not own the character; `{}` for a plain token); `kind, controller (id or null), gm_only, flags, vision_radius, radius_own (number or null)` (GM); `vision_radius` also for the controller (the step cap, 5.5); plain tokens, GM: `descriptive_name, actual_name, reveal_all, revealed:[player ids]` | GM: all tokens; player: tokens they control, plus tokens inside own LOS and not `gm_only` (3.1). Whole view of one token per message |
|
||||||
| `token_gone` | `id` | a recipient who had it in their `known` table and no longer may see it (left LOS, removed, `gm_only` set, controller lost it). Never sent for a token the recipient never saw |
|
| `token_gone` | `id` | a recipient who had it in their `known` table and no longer may see it (left LOS, removed, `gm_only` set, controller lost it). Never sent for a token the recipient never saw |
|
||||||
| `character` | GM: `id, owner, descriptive_name, actual_name, reveal_all, revealed:[player ids], props:{public,owner,gm}`. Owner (P): `id, descriptive_name, actual_name, props:{public,owner}`; the owner is never sent `reveal_all` or `revealed` | GM: every character; player: only the characters they own. No other player ever gets a character record (no browsable list, T16) |
|
| `character` | GM: `id, owner, descriptive_name, actual_name, reveal_all, revealed:[player ids], props:{public,owner,gm}`. Owner (P): `id, descriptive_name, actual_name, props:{public,owner}`; the owner is never sent `reveal_all` or `revealed` | GM: every character; player: only the characters they own. No other player ever gets a character record (no browsable list, T16) |
|
||||||
| `character_gone` | `id` | GM; and the previous owner on reassign |
|
| `character_gone` | `id` | GM; and the previous owner on reassign |
|
||||||
@@ -447,7 +447,7 @@ All are built per recipient at egress (single egress rule, 2). "Sent" always mea
|
|||||||
|
|
||||||
Count: 14 server messages. Reserved, not built: `event` (9).
|
Count: 14 server messages. Reserved, not built: `event` (9).
|
||||||
|
|
||||||
Leak notes (R5 review, #11): (1) `kind` is GM-only because a value like `npc` would tell a player what a visible token is; the client names tokens from `name` and `props`. (2) `character_id` goes only to the character's owner and the GM; showing it to others would link two tokens of one character and mark a token as "a character, not a monster". (3) `cprops` is public bucket only and always present (even empty) for non-owners so presence does not mark a token as character-linked. (4) The roster omits unnamed players for players so an unused key (or the number of keys) is not visible. (5) `hello` carries `vision_radius_default` so the client can respect the step cap (5.5); it states a distance only, no wall fact. (6) `statuses[].source` (`walls`) goes to everyone who sees the token (#4, FIXED); for a token the recipient sees, this reveals at most that a wall overlaps that spot, which the recipient's LOS covers. (7) `encountered.grey` flipping and `token`/`token_gone` carry the same fact (the token left view), so deletion and moving away look identical to the player.
|
Leak notes (R5 review, #11): (1) `kind` is GM-only because a value like `npc` would tell a player what a visible token is; the client names tokens from `name` and `props`. (2) `character_id` goes only to the character's owner and the GM; showing it to others would link two tokens of one character and mark a token as "a character, not a monster". (3) `cprops` is public bucket only and always present (even empty) for non-owners so presence does not mark a token as character-linked. (4) The roster omits unnamed players for players so an unused key (or the number of keys) is not visible. (5) `hello` carries `vision_radius_default` so the client can respect the step cap (5.5); it states a distance only, no wall fact. (6) `statuses[].source` goes to the GM only (amends #4, 2026-11-14): viewers see the status, not its cause, so a player does not learn that a wall or GM action caused it. Open: a `walls`-sourced status still tells a viewer that some blocking wall touches the token; #4 argued LOS covers that, owner to confirm. (7) `encountered.grey` flipping and `token`/`token_gone` carry the same fact (the token left view), so deletion and moving away look identical to the player.
|
||||||
|
|
||||||
### 6.2 Versioning [PROPOSED]
|
### 6.2 Versioning [PROPOSED]
|
||||||
- `proto` is an integer compiled into both client and server; M3 ships `proto = 1`. The client announces it in the upgrade request (`/ws?proto=N`). Any mismatch, older or newer, is refused (6.5): the upgrade completes and the server closes with WS code 4003, because a browser `WebSocket` cannot read an HTTP status, only a close code. The client then shows "reload" (assets are content-hashed by Vite, so a reload fetches the matching client). `hello.proto` is checked again on receipt as a backstop.
|
- `proto` is an integer compiled into both client and server; M3 ships `proto = 1`. The client announces it in the upgrade request (`/ws?proto=N`). Any mismatch, older or newer, is refused (6.5): the upgrade completes and the server closes with WS code 4003, because a browser `WebSocket` cannot read an HTTP status, only a close code. The client then shows "reload" (assets are content-hashed by Vite, so a reload fetches the matching client). `hello.proto` is checked again on receipt as a backstop.
|
||||||
@@ -582,8 +582,8 @@ All ids are server-assigned. **Walls [FIXED, owner decision 2026-11-10, #3]**: p
|
|||||||
- The server never interprets props in v1 except via a registered property schema (type, bucket, writable-by) used for validation and for FFF later.
|
- The server never interprets props in v1 except via a registered property schema (type, bucket, writable-by) used for validation and for FFF later.
|
||||||
- **Character [FIXED, owner decision 2026-11-10, #14]**: own record, separate from tokens. Fields (indicative): `id` (random, same format as token ids), `owner` (exactly one player id; the GM is a player, so GM ownership = the GM's player id; the GM reassigns), `descriptive_name`, `actual_name` (names rule below), `reveal_all`, `props` (three buckets, identity/base values). A character has any number of tokens in any scene. A new token for a character starts controlled by the character's owner; the GM may change it. Changing a character's owner never changes its tokens' controllers (GM adjusts by hand). Rejected: token controller derived from character; auto-follow on reassignment; all data on the token (duplicated stats); all data on the character.
|
- **Character [FIXED, owner decision 2026-11-10, #14]**: own record, separate from tokens. Fields (indicative): `id` (random, same format as token ids), `owner` (exactly one player id; the GM is a player, so GM ownership = the GM's player id; the GM reassigns), `descriptive_name`, `actual_name` (names rule below), `reveal_all`, `props` (three buckets, identity/base values). A character has any number of tokens in any scene. A new token for a character starts controlled by the character's owner; the GM may change it. Changing a character's owner never changes its tokens' controllers (GM adjusts by hand). Rejected: token controller derived from character; auto-follow on reassignment; all data on the token (duplicated stats); all data on the character.
|
||||||
- **Character props vs token props [FIXED, #14]**: the character holds who the figure is (identity, base values); the token holds what is happening to that figure (damage, conditions, scene effects). Plain tokens (monsters, items) keep their own data. Both use the three buckets: `owner` for a character = character owner + GM; for a token = token controller + GM. The server stores both and never interprets them; FFF decides the split (9). A recipient's view of a token is built from its own props and its character's props, each under its own bucket rule [PROPOSED].
|
- **Character props vs token props [FIXED, #14]**: the character holds who the figure is (identity, base values); the token holds what is happening to that figure (damage, conditions, scene effects). Plain tokens (monsters, items) keep their own data. Both use the three buckets: `owner` for a character = character owner + GM; for a token = token controller + GM. The server stores both and never interprets them; FFF decides the split (9). A recipient's view of a token is built from its own props and its character's props, each under its own bucket rule [PROPOSED].
|
||||||
- **Names [FIXED, #14]**: every character and every plain token has a `descriptive_name` (e.g. "a grumpy man") and an `actual_name` (e.g. "Lord Vex"). Players see the descriptive name until the GM reveals the actual name to that player; the GM can also reveal to all at once (`reveal_all`). The owner of a character always sees its actual name. A character's tokens use the character's names, so one reveal covers all of them. Applies to player characters too (introductions). Reveals are not revoked when ownership changes [PROPOSED].
|
- **Names [FIXED, #14]**: every character and every plain token has a `descriptive_name` (e.g. "a grumpy man") and an `actual_name` (e.g. "Lord Vex"). Players see the descriptive name until the GM reveals the actual name to that player; the GM can also reveal to all at once (`reveal_all`). The owner of a character always sees its actual name. A character's tokens use the character's names, so one reveal covers all of them. Applies to player characters too (introductions). A reveal cannot be undone in v1 (no un-reveal intent). Reveals are not revoked when ownership changes [PROPOSED].
|
||||||
- **Encountered list [FIXED, #14]**: per player, every token that the player's controlled tokens have ever seen, shown under the name that player knows. Out of sight: greyed ("met before, whereabouts unknown"). `gm_only` tokens never enter it. Entries are never removed automatically (not on token removal or scene change); only the GM removes an entry for a player. Server tracks and persists it. No browsable list of all characters for players. Not the player roster (Q9 lists players only).
|
- **Encountered list [FIXED, #14]**: per player, every token that the player's controlled tokens have ever seen, shown under the name that player knows. Out of sight: greyed ("met before, whereabouts unknown"). `gm_only` tokens never enter it; a token that becomes `gm_only` after a player met it keeps its entry (greyed). Entries are never removed automatically (not on token removal, scene change or a `gm_only` flip); only the GM removes an entry for a player. Server tracks and persists it. No browsable list of all characters for players. Not the player roster (Q9 lists players only).
|
||||||
- **Player**: `id, name (NULL until first sign-in; unique among players), role (gm|player), colour`. Exactly one GM. A player is a real person who signs in with a player key; not a character. A player may own several characters. Max 6 players; unused keys count toward the cap. GM can rename. Remove: see 3.2 [FIXED, #6].
|
- **Player**: `id, name (NULL until first sign-in; unique among players), role (gm|player), colour`. Exactly one GM. A player is a real person who signs in with a player key; not a character. A player may own several characters. Max 6 players; unused keys count toward the cap. GM can rename. Remove: see 3.2 [FIXED, #6].
|
||||||
- **Player key**: `player_id, secret (plaintext, re-showable by GM, Q11 FIXED), created`; one current key per player; replace overwrites. The GM's key is the GM player's key (3.2). Not a session [FIXED, #6].
|
- **Player key**: `player_id, secret (plaintext, re-showable by GM, Q11 FIXED), created`; one current key per player; replace overwrites. The GM's key is the GM player's key (3.2). Not a session [FIXED, #6].
|
||||||
- **Session**: `id, player_id, token_hash, created, last_seen`; never expires (Q10 FIXED).
|
- **Session**: `id, player_id, token_hash, created, last_seen`; never expires (Q10 FIXED).
|
||||||
@@ -807,3 +807,5 @@ Owner also decided 2026-11-14 [FIXED (owner decision), #12]: what M3 done means.
|
|||||||
Owner also decided 2026-11-14 [FIXED (owner-delegated, 2026-11-14, #15)]: M3 limits. The owner delegated the numbers to the agent and accepted the set. Max inbound WS message 64 KB (mummy default; inbound only; no config). Intent rate: token bucket per connection, 30/s sustained, burst 100, same for GM and players; excess refused with `rate limited`, no rollback (each intent atomic), connection stays open. Connections: 4 per player (a 5th closes the oldest), 16 total (the 17th is refused); replaces the PROPOSED cap of 8. Consequence: the M5 concurrency port spreads load across connections (10.1). See 4.3, 6.4, 10.1, 13.
|
Owner also decided 2026-11-14 [FIXED (owner-delegated, 2026-11-14, #15)]: M3 limits. The owner delegated the numbers to the agent and accepted the set. Max inbound WS message 64 KB (mummy default; inbound only; no config). Intent rate: token bucket per connection, 30/s sustained, burst 100, same for GM and players; excess refused with `rate limited`, no rollback (each intent atomic), connection stays open. Connections: 4 per player (a 5th closes the oldest), 16 total (the 17th is refused); replaces the PROPOSED cap of 8. Consequence: the M5 concurrency port spreads load across connections (10.1). See 4.3, 6.4, 10.1, 13.
|
||||||
|
|
||||||
Owner also decided 2026-11-14 [FIXED (owner-delegated, 2026-11-14, #11)]: M3 message list. The owner delegated the wire shapes; the set is the complete M3 catalogue in 6 (29 client intents, 14 server messages). Client `t` is `<noun>.<verb>` (GLOSSARY nouns: `token`, never "entity"), server `t` is a dotless state noun, so they never collide. Every intent carries `reqId` and gets exactly one `ack` (`ok`, new `id`, `pos` for moves); a refused player move stays the uniform nack (old position, no code), every other refusal has a static code (`rate-limited`, `not-allowed`, `not-found`, `invalid`, `name-taken`, `cap-reached`, `in-use`, `no-rules`, `unknown-type`); frames without a readable `reqId` get `error` (`malformed`, `rate-limited`). `invite.*`, `gmClearBlocked` and `blocked` are retired: `key.*`/`player.*` for player keys and players, `status.set`/`status.clear` and `token.resize` for #4. Connection outcomes: HTTP 403 (Origin), 401 (no session), 400, 503 (17th connection); WS close 4001 revoked, 4002 evicted (5th connection), 4003 proto mismatch, 1008 malformed flood; oversize closes TCP with no frame. `POST /join` is HTTP (6.6). Server `door` is folded into `wall`; `presence` into `roster`; `pong` into the ping `ack`. See 3.1, 3.2, 3.4, 4.2, 4.3, 5.5, 5.6, 6, 7.5, 13.
|
Owner also decided 2026-11-14 [FIXED (owner-delegated, 2026-11-14, #11)]: M3 message list. The owner delegated the wire shapes; the set is the complete M3 catalogue in 6 (29 client intents, 14 server messages). Client `t` is `<noun>.<verb>` (GLOSSARY nouns: `token`, never "entity"), server `t` is a dotless state noun, so they never collide. Every intent carries `reqId` and gets exactly one `ack` (`ok`, new `id`, `pos` for moves); a refused player move stays the uniform nack (old position, no code), every other refusal has a static code (`rate-limited`, `not-allowed`, `not-found`, `invalid`, `name-taken`, `cap-reached`, `in-use`, `no-rules`, `unknown-type`); frames without a readable `reqId` get `error` (`malformed`, `rate-limited`). `invite.*`, `gmClearBlocked` and `blocked` are retired: `key.*`/`player.*` for player keys and players, `status.set`/`status.clear` and `token.resize` for #4. Connection outcomes: HTTP 403 (Origin), 401 (no session), 400, 503 (17th connection); WS close 4001 revoked, 4002 evicted (5th connection), 4003 proto mismatch, 1008 malformed flood; oversize closes TCP with no frame. `POST /join` is HTTP (6.6). Server `door` is folded into `wall`; `presence` into `roster`; `pong` into the ping `ack`. See 3.1, 3.2, 3.4, 4.2, 4.3, 5.5, 5.6, 6, 7.5, 13.
|
||||||
|
|
||||||
|
Owner also decided 2026-11-14 (review of #11 flags) [FIXED (owner decision)]: (1) players cannot create or edit characters or props in v1 (GM only); opening that later is a permission change on the existing intents, not a redesign (1). (2) A revealed name cannot be un-revealed: no un-reveal intent (8, 6.1). (3) `character.remove` is refused with `in-use` while tokens link the character (6.1, 6.5). (4) Encountered stays encountered: a `gm_only` flip leaves the entry, greyed (8, 6.1). (5) Status markers do not reveal their cause to non-GM viewers: `statuses[].source` goes to the GM only (3.1, 5.5, 6.1; amends #4). The controlling owner is not given `source` either, as the doc has no owner-view rule for statuses; revisit if wanted.
|
||||||
|
|||||||
Reference in New Issue
Block a user