@thegeem/protocol 0.1.28 → 0.1.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -168,12 +168,14 @@ var ClientMsg = import_zod.z.discriminatedUnion("t", [
168
168
  // (yourColor:null) while keeping every host power. Needs 2 approved joiners.
169
169
  hostPlays: import_zod.z.boolean().optional(),
170
170
  // Name the seats explicitly instead of taking them by join order (gs#47 Ask 2, layered on per
171
- // D-037). Exactly two DISTINCT ids, both approved members of the room (the host may be one):
171
+ // D-037). DISTINCT ids, all approved members of the room (the host may be one). ARITY is the
172
+ // GAME's rule, not the wire's: each driver checks the list against its own capacity (دامة needs
173
+ // exactly 2; ارسمها/trivia take any number), so a new game never needs a protocol change here.
172
174
  // Order matters where a game seats a fixed number: دامة takes `players[0]` as black (moves first).
173
175
  // Everyone not listed WATCHES. When present this OVERRIDES `hostPlays` and the lobby's playing list —
174
176
  // an explicit seating beats an implicit one.
175
177
  // Violations are rejected with `invalid_seat`. Consumed by دامة (the only fixed-seat game today).
176
- players: import_zod.z.array(PlayerId).length(2).optional(),
178
+ players: import_zod.z.array(PlayerId).min(1).max(LIMITS.MAX_PLAYERS).optional(),
177
179
  // PREFERRED: pick a mode from the registry (see MODES). The server maps it to the engine
178
180
  // rules. Send this and omit buzzerMode/noHost. Falls back to the legacy flags below if omitted.
179
181
  modeId: import_zod.z.enum(MODE_IDS).optional(),
package/dist/index.d.cts CHANGED
@@ -832,6 +832,8 @@ interface DamaStateView {
832
832
  yourColor: 'black' | 'white' | null;
833
833
  legalMoves: DamaMoveView[];
834
834
  moveCount: number;
835
+ black?: string;
836
+ white?: string;
835
837
  }
836
838
  /**
837
839
  * The authoritative Ersimha round state. Anti-cheat boundary (D-030): `word` is set ONLY in the
package/dist/index.d.ts CHANGED
@@ -832,6 +832,8 @@ interface DamaStateView {
832
832
  yourColor: 'black' | 'white' | null;
833
833
  legalMoves: DamaMoveView[];
834
834
  moveCount: number;
835
+ black?: string;
836
+ white?: string;
835
837
  }
836
838
  /**
837
839
  * The authoritative Ersimha round state. Anti-cheat boundary (D-030): `word` is set ONLY in the
package/dist/index.js CHANGED
@@ -131,12 +131,14 @@ var ClientMsg = z.discriminatedUnion("t", [
131
131
  // (yourColor:null) while keeping every host power. Needs 2 approved joiners.
132
132
  hostPlays: z.boolean().optional(),
133
133
  // Name the seats explicitly instead of taking them by join order (gs#47 Ask 2, layered on per
134
- // D-037). Exactly two DISTINCT ids, both approved members of the room (the host may be one):
134
+ // D-037). DISTINCT ids, all approved members of the room (the host may be one). ARITY is the
135
+ // GAME's rule, not the wire's: each driver checks the list against its own capacity (دامة needs
136
+ // exactly 2; ارسمها/trivia take any number), so a new game never needs a protocol change here.
135
137
  // Order matters where a game seats a fixed number: دامة takes `players[0]` as black (moves first).
136
138
  // Everyone not listed WATCHES. When present this OVERRIDES `hostPlays` and the lobby's playing list —
137
139
  // an explicit seating beats an implicit one.
138
140
  // Violations are rejected with `invalid_seat`. Consumed by دامة (the only fixed-seat game today).
139
- players: z.array(PlayerId).length(2).optional(),
141
+ players: z.array(PlayerId).min(1).max(LIMITS.MAX_PLAYERS).optional(),
140
142
  // PREFERRED: pick a mode from the registry (see MODES). The server maps it to the engine
141
143
  // rules. Send this and omit buzzerMode/noHost. Falls back to the legacy flags below if omitted.
142
144
  modeId: z.enum(MODE_IDS).optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thegeem/protocol",
3
- "version": "0.1.28",
3
+ "version": "0.1.29",
4
4
  "description": "Geem's wire protocol — shared zod schemas + TypeScript types for talking to the Geem game server over Socket.IO. The source of truth all clients implement against.",
5
5
  "license": "UNLICENSED",
6
6
  "homepage": "https://geem.tv",