@thegeem/protocol 0.1.34 → 0.1.35
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.d.cts +32 -1
- package/dist/index.d.ts +32 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -692,6 +692,34 @@ interface LobbyPlayer {
|
|
|
692
692
|
/** Team index once the game has started; null/absent in the lobby. */
|
|
693
693
|
teamIndex?: number | null;
|
|
694
694
|
}
|
|
695
|
+
/**
|
|
696
|
+
* Who is in the room, carried ON the game-state push (gs#71).
|
|
697
|
+
*
|
|
698
|
+
* `players[]` in the `lobby` frame is the only other carrier of names, and the lobby does not go out
|
|
699
|
+
* mid-game — deliberately, since a stray `lobby` under a running game bounces clients off their board
|
|
700
|
+
* (the gs#49 class). So a client that refreshed mid-game had NO roster for the rest of the game, and
|
|
701
|
+
* every id→name lookup degraded to whatever that client happened to use as its null-fallback: «؟» on
|
|
702
|
+
* web, the colour name in دامة on Android (readable by luck), and an empty string in ارسمها (a sentence
|
|
703
|
+
* with a hole in it).
|
|
704
|
+
*
|
|
705
|
+
* It rides ON the state message rather than arriving as a separate frame because both consuming teams
|
|
706
|
+
* asked for that independently, for the same reason: a roster in its own message can land either side
|
|
707
|
+
* of the state push, giving one render with names and one without on clients that redraw per state.
|
|
708
|
+
* Bundled, it cannot race.
|
|
709
|
+
*
|
|
710
|
+
* Unlike `LobbyPlayer` this INCLUDES THE HOST (`isHost`), who is filtered out of `lobby.players` by
|
|
711
|
+
* design and therefore has no row — yet needs a face wherever the host can appear, e.g. the `tally`.
|
|
712
|
+
*/
|
|
713
|
+
interface RosterEntry {
|
|
714
|
+
id: string;
|
|
715
|
+
name: string;
|
|
716
|
+
/** Privacy-safe avatar (emoji + color); absent if unset. */
|
|
717
|
+
avatar?: AvatarView;
|
|
718
|
+
/** True for the room's host, who has no row in `lobby.players`. */
|
|
719
|
+
isHost?: boolean;
|
|
720
|
+
/** Is this person currently connected? Mirrors `LobbyPlayer.connected`. */
|
|
721
|
+
connected?: boolean;
|
|
722
|
+
}
|
|
695
723
|
/** Per-recipient context attached to lobby/state pushes. */
|
|
696
724
|
interface YouContext {
|
|
697
725
|
id: string;
|
|
@@ -954,16 +982,19 @@ type ServerMsg = {
|
|
|
954
982
|
view: GameStateView;
|
|
955
983
|
you: YouContext;
|
|
956
984
|
teamConnected: boolean[];
|
|
985
|
+
roster?: RosterEntry[];
|
|
957
986
|
} | {
|
|
958
987
|
t: 'damaState';
|
|
959
988
|
gameId: 'dama';
|
|
960
989
|
view: DamaStateView;
|
|
961
990
|
you: YouContext;
|
|
991
|
+
roster?: RosterEntry[];
|
|
962
992
|
} | {
|
|
963
993
|
t: 'ersimhaState';
|
|
964
994
|
gameId: 'ersimha';
|
|
965
995
|
view: ErsimhaStateView;
|
|
966
996
|
you: YouContext;
|
|
997
|
+
roster?: RosterEntry[];
|
|
967
998
|
} | {
|
|
968
999
|
t: 'strokeBatch';
|
|
969
1000
|
from: string;
|
|
@@ -995,4 +1026,4 @@ type ServerMsg = {
|
|
|
995
1026
|
message: string;
|
|
996
1027
|
};
|
|
997
1028
|
|
|
998
|
-
export { type AvatarView, type BuzzerGameMode, CHARACTER_IDS, type CategoryView, type CharacterId, ClientMsg, type DamaMoveView, type DamaPieceView, type DamaStateView, EMOTE_IDS, type Effect, type EmoteId, type ErsimhaStateView, GAMES, GAME_IDS, type GameId, type GameInfo, type GameStateView, type GameStatus, type GameplayFlow, type HelpName, LIMITS, type LobbyPlayer, MIN_SUPPORTED_PV, MODES, MODE_IDS, type ModeId, type ModeInfo, PROTOCOL_VERSION, type QuestionView, ROOM_ALPHABET, type ServerMsg, type SoundName, type StrokePointView, type TeamSlotView, type TeamView, type YouContext, gameIdForPv, gamesForPv, modesForGame };
|
|
1029
|
+
export { type AvatarView, type BuzzerGameMode, CHARACTER_IDS, type CategoryView, type CharacterId, ClientMsg, type DamaMoveView, type DamaPieceView, type DamaStateView, EMOTE_IDS, type Effect, type EmoteId, type ErsimhaStateView, GAMES, GAME_IDS, type GameId, type GameInfo, type GameStateView, type GameStatus, type GameplayFlow, type HelpName, LIMITS, type LobbyPlayer, MIN_SUPPORTED_PV, MODES, MODE_IDS, type ModeId, type ModeInfo, PROTOCOL_VERSION, type QuestionView, ROOM_ALPHABET, type RosterEntry, type ServerMsg, type SoundName, type StrokePointView, type TeamSlotView, type TeamView, type YouContext, gameIdForPv, gamesForPv, modesForGame };
|
package/dist/index.d.ts
CHANGED
|
@@ -692,6 +692,34 @@ interface LobbyPlayer {
|
|
|
692
692
|
/** Team index once the game has started; null/absent in the lobby. */
|
|
693
693
|
teamIndex?: number | null;
|
|
694
694
|
}
|
|
695
|
+
/**
|
|
696
|
+
* Who is in the room, carried ON the game-state push (gs#71).
|
|
697
|
+
*
|
|
698
|
+
* `players[]` in the `lobby` frame is the only other carrier of names, and the lobby does not go out
|
|
699
|
+
* mid-game — deliberately, since a stray `lobby` under a running game bounces clients off their board
|
|
700
|
+
* (the gs#49 class). So a client that refreshed mid-game had NO roster for the rest of the game, and
|
|
701
|
+
* every id→name lookup degraded to whatever that client happened to use as its null-fallback: «؟» on
|
|
702
|
+
* web, the colour name in دامة on Android (readable by luck), and an empty string in ارسمها (a sentence
|
|
703
|
+
* with a hole in it).
|
|
704
|
+
*
|
|
705
|
+
* It rides ON the state message rather than arriving as a separate frame because both consuming teams
|
|
706
|
+
* asked for that independently, for the same reason: a roster in its own message can land either side
|
|
707
|
+
* of the state push, giving one render with names and one without on clients that redraw per state.
|
|
708
|
+
* Bundled, it cannot race.
|
|
709
|
+
*
|
|
710
|
+
* Unlike `LobbyPlayer` this INCLUDES THE HOST (`isHost`), who is filtered out of `lobby.players` by
|
|
711
|
+
* design and therefore has no row — yet needs a face wherever the host can appear, e.g. the `tally`.
|
|
712
|
+
*/
|
|
713
|
+
interface RosterEntry {
|
|
714
|
+
id: string;
|
|
715
|
+
name: string;
|
|
716
|
+
/** Privacy-safe avatar (emoji + color); absent if unset. */
|
|
717
|
+
avatar?: AvatarView;
|
|
718
|
+
/** True for the room's host, who has no row in `lobby.players`. */
|
|
719
|
+
isHost?: boolean;
|
|
720
|
+
/** Is this person currently connected? Mirrors `LobbyPlayer.connected`. */
|
|
721
|
+
connected?: boolean;
|
|
722
|
+
}
|
|
695
723
|
/** Per-recipient context attached to lobby/state pushes. */
|
|
696
724
|
interface YouContext {
|
|
697
725
|
id: string;
|
|
@@ -954,16 +982,19 @@ type ServerMsg = {
|
|
|
954
982
|
view: GameStateView;
|
|
955
983
|
you: YouContext;
|
|
956
984
|
teamConnected: boolean[];
|
|
985
|
+
roster?: RosterEntry[];
|
|
957
986
|
} | {
|
|
958
987
|
t: 'damaState';
|
|
959
988
|
gameId: 'dama';
|
|
960
989
|
view: DamaStateView;
|
|
961
990
|
you: YouContext;
|
|
991
|
+
roster?: RosterEntry[];
|
|
962
992
|
} | {
|
|
963
993
|
t: 'ersimhaState';
|
|
964
994
|
gameId: 'ersimha';
|
|
965
995
|
view: ErsimhaStateView;
|
|
966
996
|
you: YouContext;
|
|
997
|
+
roster?: RosterEntry[];
|
|
967
998
|
} | {
|
|
968
999
|
t: 'strokeBatch';
|
|
969
1000
|
from: string;
|
|
@@ -995,4 +1026,4 @@ type ServerMsg = {
|
|
|
995
1026
|
message: string;
|
|
996
1027
|
};
|
|
997
1028
|
|
|
998
|
-
export { type AvatarView, type BuzzerGameMode, CHARACTER_IDS, type CategoryView, type CharacterId, ClientMsg, type DamaMoveView, type DamaPieceView, type DamaStateView, EMOTE_IDS, type Effect, type EmoteId, type ErsimhaStateView, GAMES, GAME_IDS, type GameId, type GameInfo, type GameStateView, type GameStatus, type GameplayFlow, type HelpName, LIMITS, type LobbyPlayer, MIN_SUPPORTED_PV, MODES, MODE_IDS, type ModeId, type ModeInfo, PROTOCOL_VERSION, type QuestionView, ROOM_ALPHABET, type ServerMsg, type SoundName, type StrokePointView, type TeamSlotView, type TeamView, type YouContext, gameIdForPv, gamesForPv, modesForGame };
|
|
1029
|
+
export { type AvatarView, type BuzzerGameMode, CHARACTER_IDS, type CategoryView, type CharacterId, ClientMsg, type DamaMoveView, type DamaPieceView, type DamaStateView, EMOTE_IDS, type Effect, type EmoteId, type ErsimhaStateView, GAMES, GAME_IDS, type GameId, type GameInfo, type GameStateView, type GameStatus, type GameplayFlow, type HelpName, LIMITS, type LobbyPlayer, MIN_SUPPORTED_PV, MODES, MODE_IDS, type ModeId, type ModeInfo, PROTOCOL_VERSION, type QuestionView, ROOM_ALPHABET, type RosterEntry, type ServerMsg, type SoundName, type StrokePointView, type TeamSlotView, type TeamView, type YouContext, gameIdForPv, gamesForPv, modesForGame };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thegeem/protocol",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.35",
|
|
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",
|