interface RoundLogContext { roundId: string; roundPosition: number; gameId: string; gameType?: string; characters: Array<{ id: string; name: string; traitsSummary?: string; }>; player: { id: string; name: string; }; } /** * Debug Logger Service * * Specialized logging service for debugging game rounds and LLM calls * * Features: * - Round-based logging structure * - Turn-by-turn tracking * - LLM call logging with input/output * - Stage-based organization * - File-based persistence * - Async logging support for background jobs * * @example * ```typescript * // Start a round * debugLogger.startRound({ roundId: '123', roundPosition: 1, gameId: 'game-1', ... }); * * // Log a turn * debugLogger.startTurn(1, { id: 'char-1', name: 'Alice' }); * debugLogger.logLLMCall('analyze', inputData, outputData); * debugLogger.finalizeTurn(); * * // Finalize the round * await debugLogger.finalizeRound(); * ``` */ export declare class DebugLoggerService { private enabled; private logBasePath; private currentRound; private currentTurn; constructor(); /** * Initialize a new round log */ startRound(context: RoundLogContext): void; /** * Start logging a new turn within the current round */ startTurn(turnNumber: number, character: { id: string; name: string; }): void; /** * Log a stage within the current turn */ logStage(stageName: string, data: any): void; /** * Log an LLM call within a stage */ logLLMCall(stageName: string, input: any, output: any, metadata?: any): void; /** * Log a GM (Game Master) LLM call at the round level (no turn required). * Used for GM agent operations that happen before/outside character turns. */ logGMLLMCall(stageName: string, input: any, output: any, metadata?: any): void; /** * Log validation results within a stage */ logValidation(stageName: string, issues: any[]): void; /** * Finalize the current turn and add it to the round */ finalizeTurn(): void; /** * Write the current round log to file (without clearing state) */ private writeRoundLog; /** * Finalize the round and write to file (clears state) */ finalizeRound(): Promise; /** * Get the current round position (for logging purposes) */ getCurrentRoundPosition(): number | null; /** * Check if logging is enabled */ isEnabled(): boolean; /** * Append data to an existing stage (useful for multi-part logging) */ appendToStage(stageName: string, key: string, data: any): void; /** * Async version of appendToStage for background jobs. * Reads the existing log file, appends data to the specified turn/stage, and writes back. */ appendToStageAsync(params: { gameId: string; roundPosition: number; turnNumber: number; characterId: string; stageName: string; key: string; data: any; }): Promise; /** * Async version of logLLMCall for background jobs. * Reads the existing log file, logs the LLM call to the specified turn/stage, and writes back. */ logLLMCallAsync(params: { gameId: string; roundPosition: number; turnNumber: number; characterId: string; stageName: string; input: any; output: any; metadata?: any; }): Promise; /** * Read an existing round log from file */ private readRoundLog; /** * Write a round log to file (async version) */ private writeRoundLogAsync; } export {}; //# sourceMappingURL=debug.logger.service.d.ts.map