feat(bot): vsAi/aiOpponent protocol fields and bot-driver registry

This commit is contained in:
claude (blind_chess)
2026-04-28 14:07:01 -04:00
parent 4407110147
commit 9a837ec319
9 changed files with 52 additions and 3 deletions
+4 -1
View File
@@ -34,6 +34,7 @@ export type ServerMessage =
mode: Mode;
highlightingEnabled: boolean;
opponentConnected: boolean;
aiOpponent?: { color: Color; brain: 'casual' | 'recon' };
}
| {
type: 'update';
@@ -44,6 +45,7 @@ export type ServerMessage =
drawOffer?: { from: Color } | null;
endReason?: EndReason;
winner?: Color | null;
aiOpponent?: { color: Color; brain: 'casual' | 'recon' };
}
| { type: 'peer-status'; color: Color; connected: boolean; graceUntil?: number }
| { type: 'error'; code: ErrorCode; message: string }
@@ -53,10 +55,11 @@ export interface CreateGameRequest {
mode: Mode;
side: Color | 'random';
highlightingEnabled: boolean;
vsAi?: { brain: 'casual' | 'recon' };
}
export interface CreateGameResponse {
gameId: GameId;
creatorToken: PlayerToken;
joinUrl: string;
joinUrl: string | null;
}