import Database from 'better-sqlite3'; /** * Combat Action Log Entry * Represents a single action taken during combat */ export interface CombatActionLogEntry { id?: number; encounterId: string; round: number; turnIndex: number; actorId: string; actorName: string; actionType: string; targetIds?: string[]; resultSummary: string; resultDetail?: string; damageDealt?: number; healingDone?: number; hpChanges?: Record; timestamp: string; } /** * CombatActionLogRepository - Persistence layer for combat action history * * PLAYTEST-FIX: This provides context compaction resilience by logging * all combat actions to the database. When Claude's context window compacts, * the action history can be retrieved to reconstruct what happened. */ export declare class CombatActionLogRepository { private db; constructor(db: Database.Database); /** * Log a combat action */ log(entry: Omit): number; /** * Get all actions for an encounter */ getByEncounter(encounterId: string): CombatActionLogEntry[]; /** * Get actions for a specific round */ getByRound(encounterId: string, round: number): CombatActionLogEntry[]; /** * Get the most recent N actions */ getRecent(encounterId: string, limit?: number): CombatActionLogEntry[]; /** * Get a summary of combat history for context reconstruction * Returns a compact format suitable for LLM context */ getSummary(encounterId: string): string; /** * Delete all actions for an encounter * Called when encounter ends */ deleteByEncounter(encounterId: string): number; /** * Map database row to entry object */ private mapRow; } //# sourceMappingURL=combat-action-log.repo.d.ts.map