@thegeem/protocol 0.1.1 → 0.1.2

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
@@ -55,6 +55,9 @@ var IdToken = import_zod.z.string().max(4096).optional();
55
55
  var ClientMsg = import_zod.z.discriminatedUnion("t", [
56
56
  // room / lobby
57
57
  import_zod.z.object({ t: import_zod.z.literal("createRoom"), name: DisplayName.optional(), pv: Pv, idToken: IdToken }),
58
+ // Host sets/changes their display name AFTER createRoom (for anonymous one-tap
59
+ // hosts who started nameless). Host-only; the relay re-broadcasts the lobby.
60
+ import_zod.z.object({ t: import_zod.z.literal("renameHost"), name: DisplayName }),
58
61
  import_zod.z.object({ t: import_zod.z.literal("joinRoom"), code: RoomCode, name: DisplayName, pv: Pv, idToken: IdToken }),
59
62
  import_zod.z.object({ t: import_zod.z.literal("resume"), code: RoomCode, token: import_zod.z.string().max(120), pv: Pv, idToken: IdToken }),
60
63
  import_zod.z.object({ t: import_zod.z.literal("leaveRoom") }),
package/dist/index.d.cts CHANGED
@@ -55,6 +55,15 @@ declare const ClientMsg: z.ZodDiscriminatedUnion<"t", [z.ZodObject<{
55
55
  name?: string | undefined;
56
56
  pv?: number | undefined;
57
57
  idToken?: string | undefined;
58
+ }>, z.ZodObject<{
59
+ t: z.ZodLiteral<"renameHost">;
60
+ name: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
61
+ }, "strip", z.ZodTypeAny, {
62
+ t: "renameHost";
63
+ name: string;
64
+ }, {
65
+ t: "renameHost";
66
+ name: string;
58
67
  }>, z.ZodObject<{
59
68
  t: z.ZodLiteral<"joinRoom">;
60
69
  code: z.ZodString;
package/dist/index.d.ts CHANGED
@@ -55,6 +55,15 @@ declare const ClientMsg: z.ZodDiscriminatedUnion<"t", [z.ZodObject<{
55
55
  name?: string | undefined;
56
56
  pv?: number | undefined;
57
57
  idToken?: string | undefined;
58
+ }>, z.ZodObject<{
59
+ t: z.ZodLiteral<"renameHost">;
60
+ name: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
61
+ }, "strip", z.ZodTypeAny, {
62
+ t: "renameHost";
63
+ name: string;
64
+ }, {
65
+ t: "renameHost";
66
+ name: string;
58
67
  }>, z.ZodObject<{
59
68
  t: z.ZodLiteral<"joinRoom">;
60
69
  code: z.ZodString;
package/dist/index.js CHANGED
@@ -27,6 +27,9 @@ var IdToken = z.string().max(4096).optional();
27
27
  var ClientMsg = z.discriminatedUnion("t", [
28
28
  // room / lobby
29
29
  z.object({ t: z.literal("createRoom"), name: DisplayName.optional(), pv: Pv, idToken: IdToken }),
30
+ // Host sets/changes their display name AFTER createRoom (for anonymous one-tap
31
+ // hosts who started nameless). Host-only; the relay re-broadcasts the lobby.
32
+ z.object({ t: z.literal("renameHost"), name: DisplayName }),
30
33
  z.object({ t: z.literal("joinRoom"), code: RoomCode, name: DisplayName, pv: Pv, idToken: IdToken }),
31
34
  z.object({ t: z.literal("resume"), code: RoomCode, token: z.string().max(120), pv: Pv, idToken: IdToken }),
32
35
  z.object({ t: z.literal("leaveRoom") }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thegeem/protocol",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
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",