import type { DatabaseSync } from "node:sqlite"; import type { AgentHistoryRecord } from "@/types"; /** * Session history repository backed by SQLite without caching. * Expects: schema migrations already applied for session_history. */ export declare class HistoryRepository { private readonly db; constructor(db: DatabaseSync); findBySessionId(sessionId: string): Promise; findByAgentId(agentId: string, limit?: number): Promise; /** * Appends a history record and returns the new auto-increment id. * Expects: sessionId references an existing session. */ append(sessionId: string, record: AgentHistoryRecord): Promise; /** * Returns history records after a given id for a session, ordered by id ASC. * Expects: afterId >= 0; returns empty array when no records exist after afterId. */ findSinceId(sessionId: string, afterId: number): Promise; /** * Returns the maximum history record id for a session. * Returns null when the session has no history records. */ maxId(sessionId: string): Promise; } //# sourceMappingURL=historyRepository.d.ts.map