@thegeem/protocol 0.1.28 → 0.1.30
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 +4 -2
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +4 -2
- package/package.json +1 -1
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).
|
|
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).
|
|
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
|
@@ -800,6 +800,9 @@ type Effect = {
|
|
|
800
800
|
} | {
|
|
801
801
|
t: 'noHostAdvance';
|
|
802
802
|
ms: number;
|
|
803
|
+
} | {
|
|
804
|
+
t: 'answerWindow';
|
|
805
|
+
ms: number;
|
|
803
806
|
} | {
|
|
804
807
|
t: 'endGame';
|
|
805
808
|
};
|
|
@@ -832,6 +835,8 @@ interface DamaStateView {
|
|
|
832
835
|
yourColor: 'black' | 'white' | null;
|
|
833
836
|
legalMoves: DamaMoveView[];
|
|
834
837
|
moveCount: number;
|
|
838
|
+
black?: string;
|
|
839
|
+
white?: string;
|
|
835
840
|
}
|
|
836
841
|
/**
|
|
837
842
|
* The authoritative Ersimha round state. Anti-cheat boundary (D-030): `word` is set ONLY in the
|
package/dist/index.d.ts
CHANGED
|
@@ -800,6 +800,9 @@ type Effect = {
|
|
|
800
800
|
} | {
|
|
801
801
|
t: 'noHostAdvance';
|
|
802
802
|
ms: number;
|
|
803
|
+
} | {
|
|
804
|
+
t: 'answerWindow';
|
|
805
|
+
ms: number;
|
|
803
806
|
} | {
|
|
804
807
|
t: 'endGame';
|
|
805
808
|
};
|
|
@@ -832,6 +835,8 @@ interface DamaStateView {
|
|
|
832
835
|
yourColor: 'black' | 'white' | null;
|
|
833
836
|
legalMoves: DamaMoveView[];
|
|
834
837
|
moveCount: number;
|
|
838
|
+
black?: string;
|
|
839
|
+
white?: string;
|
|
835
840
|
}
|
|
836
841
|
/**
|
|
837
842
|
* 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).
|
|
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).
|
|
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.
|
|
3
|
+
"version": "0.1.30",
|
|
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",
|