@thegeem/protocol 0.1.7 → 0.1.9

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
@@ -75,6 +75,9 @@ var ClientMsg = import_zod.z.discriminatedUnion("t", [
75
75
  import_zod.z.object({ t: import_zod.z.literal("setTeams"), teams: import_zod.z.array(DisplayName).min(1).max(LIMITS.MAX_PLAYERS) }),
76
76
  // A player joins team slot `teamIndex` (0-based, into the host's `setTeams` list).
77
77
  import_zod.z.object({ t: import_zod.z.literal("pickTeam"), teamIndex: import_zod.z.number().int().min(0).max(LIMITS.MAX_PLAYERS - 1) }),
78
+ // Host signals it's busy configuring the game (categories/rounds/mode) so waiting players can show
79
+ // a "host is setting up…" state instead of a frozen-looking lobby. 'idle' when the settings close.
80
+ import_zod.z.object({ t: import_zod.z.literal("hostActivity"), activity: import_zod.z.enum(["configuring", "idle"]) }),
78
81
  // host game actions
79
82
  import_zod.z.object({
80
83
  t: import_zod.z.literal("startGame"),
package/dist/index.d.cts CHANGED
@@ -214,6 +214,15 @@ declare const ClientMsg: z.ZodDiscriminatedUnion<"t", [z.ZodObject<{
214
214
  }, {
215
215
  t: "pickTeam";
216
216
  teamIndex: number;
217
+ }>, z.ZodObject<{
218
+ t: z.ZodLiteral<"hostActivity">;
219
+ activity: z.ZodEnum<["configuring", "idle"]>;
220
+ }, "strip", z.ZodTypeAny, {
221
+ t: "hostActivity";
222
+ activity: "configuring" | "idle";
223
+ }, {
224
+ t: "hostActivity";
225
+ activity: "configuring" | "idle";
217
226
  }>, z.ZodObject<{
218
227
  t: z.ZodLiteral<"startGame">;
219
228
  game: z.ZodOptional<z.ZodEnum<["trivia"]>>;
@@ -393,6 +402,15 @@ interface TeamView {
393
402
  type: HelpName;
394
403
  isUsed: boolean;
395
404
  }[];
405
+ /** The team's players in rotation order. Empty for host-run single-device teams. */
406
+ players: {
407
+ id: string;
408
+ name: string;
409
+ emoji: string;
410
+ }[];
411
+ /** The player on THIS team whose turn it is to answer (rotates each turn); null if the team has
412
+ * no seated players. In controller mode only this player may `answer` on the team's turn. */
413
+ currentPlayerId: string | null;
396
414
  /** The seated player's privacy-safe avatar (relay-enriched; engine view omits it). */
397
415
  avatar?: AvatarView;
398
416
  }
@@ -512,6 +530,7 @@ type ServerMsg = {
512
530
  categories: CategoryView[];
513
531
  selectedCategoryIds: string[];
514
532
  teams: TeamSlotView[];
533
+ hostActivity: 'configuring' | 'idle';
515
534
  you: YouContext;
516
535
  } | {
517
536
  t: 'state';
package/dist/index.d.ts CHANGED
@@ -214,6 +214,15 @@ declare const ClientMsg: z.ZodDiscriminatedUnion<"t", [z.ZodObject<{
214
214
  }, {
215
215
  t: "pickTeam";
216
216
  teamIndex: number;
217
+ }>, z.ZodObject<{
218
+ t: z.ZodLiteral<"hostActivity">;
219
+ activity: z.ZodEnum<["configuring", "idle"]>;
220
+ }, "strip", z.ZodTypeAny, {
221
+ t: "hostActivity";
222
+ activity: "configuring" | "idle";
223
+ }, {
224
+ t: "hostActivity";
225
+ activity: "configuring" | "idle";
217
226
  }>, z.ZodObject<{
218
227
  t: z.ZodLiteral<"startGame">;
219
228
  game: z.ZodOptional<z.ZodEnum<["trivia"]>>;
@@ -393,6 +402,15 @@ interface TeamView {
393
402
  type: HelpName;
394
403
  isUsed: boolean;
395
404
  }[];
405
+ /** The team's players in rotation order. Empty for host-run single-device teams. */
406
+ players: {
407
+ id: string;
408
+ name: string;
409
+ emoji: string;
410
+ }[];
411
+ /** The player on THIS team whose turn it is to answer (rotates each turn); null if the team has
412
+ * no seated players. In controller mode only this player may `answer` on the team's turn. */
413
+ currentPlayerId: string | null;
396
414
  /** The seated player's privacy-safe avatar (relay-enriched; engine view omits it). */
397
415
  avatar?: AvatarView;
398
416
  }
@@ -512,6 +530,7 @@ type ServerMsg = {
512
530
  categories: CategoryView[];
513
531
  selectedCategoryIds: string[];
514
532
  teams: TeamSlotView[];
533
+ hostActivity: 'configuring' | 'idle';
515
534
  you: YouContext;
516
535
  } | {
517
536
  t: 'state';
package/dist/index.js CHANGED
@@ -47,6 +47,9 @@ var ClientMsg = z.discriminatedUnion("t", [
47
47
  z.object({ t: z.literal("setTeams"), teams: z.array(DisplayName).min(1).max(LIMITS.MAX_PLAYERS) }),
48
48
  // A player joins team slot `teamIndex` (0-based, into the host's `setTeams` list).
49
49
  z.object({ t: z.literal("pickTeam"), teamIndex: z.number().int().min(0).max(LIMITS.MAX_PLAYERS - 1) }),
50
+ // Host signals it's busy configuring the game (categories/rounds/mode) so waiting players can show
51
+ // a "host is setting up…" state instead of a frozen-looking lobby. 'idle' when the settings close.
52
+ z.object({ t: z.literal("hostActivity"), activity: z.enum(["configuring", "idle"]) }),
50
53
  // host game actions
51
54
  z.object({
52
55
  t: z.literal("startGame"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thegeem/protocol",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
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",