@thegeem/protocol 0.1.25 → 0.1.26

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
@@ -155,6 +155,12 @@ var ClientMsg = import_zod.z.discriminatedUnion("t", [
155
155
  // false = the first two approved joiners take the board and the host WATCHES
156
156
  // (yourColor:null) while keeping every host power. Needs 2 approved joiners.
157
157
  hostPlays: import_zod.z.boolean().optional(),
158
+ // Name the seats explicitly instead of taking them by join order (gs#47 Ask 2, layered on per
159
+ // D-037). Exactly two DISTINCT ids, both approved members of the room (the host may be one):
160
+ // `players[0]` plays black and moves first, `players[1]` plays white; everyone else in the room
161
+ // spectates. When present this OVERRIDES `hostPlays` — an explicit seating beats an implicit one.
162
+ // Violations are rejected with `bad_players`. Consumed by دامة (the only fixed-seat game today).
163
+ players: import_zod.z.array(PlayerId).length(2).optional(),
158
164
  // PREFERRED: pick a mode from the registry (see MODES). The server maps it to the engine
159
165
  // rules. Send this and omit buzzerMode/noHost. Falls back to the legacy flags below if omitted.
160
166
  modeId: import_zod.z.enum(MODE_IDS).optional(),
package/dist/index.d.cts CHANGED
@@ -356,6 +356,7 @@ declare const ClientMsg: z.ZodDiscriminatedUnion<"t", [z.ZodObject<{
356
356
  totalRounds: z.ZodNumber;
357
357
  categoryIds: z.ZodArray<z.ZodString, "many">;
358
358
  hostPlays: z.ZodOptional<z.ZodBoolean>;
359
+ players: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
359
360
  modeId: z.ZodOptional<z.ZodEnum<["solo", "oneDevice", "snag", "multiplayer"]>>;
360
361
  buzzerMode: z.ZodOptional<z.ZodEnum<["off", "solo", "race", "controller"]>>;
361
362
  noHost: z.ZodOptional<z.ZodBoolean>;
@@ -366,6 +367,7 @@ declare const ClientMsg: z.ZodDiscriminatedUnion<"t", [z.ZodObject<{
366
367
  game?: "seedha" | "snag" | "trivia" | "dama" | "ersimha" | undefined;
367
368
  modeId?: "snag" | "solo" | "oneDevice" | "multiplayer" | undefined;
368
369
  hostPlays?: boolean | undefined;
370
+ players?: string[] | undefined;
369
371
  buzzerMode?: "solo" | "off" | "race" | "controller" | undefined;
370
372
  noHost?: boolean | undefined;
371
373
  }, {
@@ -375,6 +377,7 @@ declare const ClientMsg: z.ZodDiscriminatedUnion<"t", [z.ZodObject<{
375
377
  game?: "seedha" | "snag" | "trivia" | "dama" | "ersimha" | undefined;
376
378
  modeId?: "snag" | "solo" | "oneDevice" | "multiplayer" | undefined;
377
379
  hostPlays?: boolean | undefined;
380
+ players?: string[] | undefined;
378
381
  buzzerMode?: "solo" | "off" | "race" | "controller" | undefined;
379
382
  noHost?: boolean | undefined;
380
383
  }>, z.ZodObject<{
package/dist/index.d.ts CHANGED
@@ -356,6 +356,7 @@ declare const ClientMsg: z.ZodDiscriminatedUnion<"t", [z.ZodObject<{
356
356
  totalRounds: z.ZodNumber;
357
357
  categoryIds: z.ZodArray<z.ZodString, "many">;
358
358
  hostPlays: z.ZodOptional<z.ZodBoolean>;
359
+ players: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
359
360
  modeId: z.ZodOptional<z.ZodEnum<["solo", "oneDevice", "snag", "multiplayer"]>>;
360
361
  buzzerMode: z.ZodOptional<z.ZodEnum<["off", "solo", "race", "controller"]>>;
361
362
  noHost: z.ZodOptional<z.ZodBoolean>;
@@ -366,6 +367,7 @@ declare const ClientMsg: z.ZodDiscriminatedUnion<"t", [z.ZodObject<{
366
367
  game?: "seedha" | "snag" | "trivia" | "dama" | "ersimha" | undefined;
367
368
  modeId?: "snag" | "solo" | "oneDevice" | "multiplayer" | undefined;
368
369
  hostPlays?: boolean | undefined;
370
+ players?: string[] | undefined;
369
371
  buzzerMode?: "solo" | "off" | "race" | "controller" | undefined;
370
372
  noHost?: boolean | undefined;
371
373
  }, {
@@ -375,6 +377,7 @@ declare const ClientMsg: z.ZodDiscriminatedUnion<"t", [z.ZodObject<{
375
377
  game?: "seedha" | "snag" | "trivia" | "dama" | "ersimha" | undefined;
376
378
  modeId?: "snag" | "solo" | "oneDevice" | "multiplayer" | undefined;
377
379
  hostPlays?: boolean | undefined;
380
+ players?: string[] | undefined;
378
381
  buzzerMode?: "solo" | "off" | "race" | "controller" | undefined;
379
382
  noHost?: boolean | undefined;
380
383
  }>, z.ZodObject<{
package/dist/index.js CHANGED
@@ -118,6 +118,12 @@ var ClientMsg = z.discriminatedUnion("t", [
118
118
  // false = the first two approved joiners take the board and the host WATCHES
119
119
  // (yourColor:null) while keeping every host power. Needs 2 approved joiners.
120
120
  hostPlays: z.boolean().optional(),
121
+ // Name the seats explicitly instead of taking them by join order (gs#47 Ask 2, layered on per
122
+ // D-037). Exactly two DISTINCT ids, both approved members of the room (the host may be one):
123
+ // `players[0]` plays black and moves first, `players[1]` plays white; everyone else in the room
124
+ // spectates. When present this OVERRIDES `hostPlays` — an explicit seating beats an implicit one.
125
+ // Violations are rejected with `bad_players`. Consumed by دامة (the only fixed-seat game today).
126
+ players: z.array(PlayerId).length(2).optional(),
121
127
  // PREFERRED: pick a mode from the registry (see MODES). The server maps it to the engine
122
128
  // rules. Send this and omit buzzerMode/noHost. Falls back to the legacy flags below if omitted.
123
129
  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.25",
3
+ "version": "0.1.26",
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",