import type { AgentDatedMemoryRollupRecord, AgentDatedMemorySourceRecord, GroupXStore, MemoryRecord, StoredEventRecord } from "../storage/types.js"; export declare const AGENT_DATED_MEMORY_TURN_THRESHOLD = 8; export declare const AGENT_DATED_MEMORY_CHAR_THRESHOLD = 16000; export declare const AGENT_DATED_MEMORY_DEBOUNCE_MS: number; export declare const AGENT_DATED_MEMORY_MAX_INPUT_CHARS = 120000; export declare const AGENT_DATED_MEMORY_MAX_OUTPUT_CHARS = 8000; export declare const AGENT_DATED_MEMORY_NO_CONTENT = "GROUPX_NO_DATED_MEMORY"; export interface AgentDatedMemorySummaryRequest { roomId: string; actorId: string; localDate: string; previousMemory?: MemoryRecord; sources: readonly AgentDatedMemorySourceRecord[]; maxOutputChars: number; noContentSentinel: string; signal: AbortSignal; } export interface AgentDatedMemorySummaryResult { content: string; generatorActorId: string; } export interface AgentDatedMemorySummarizer { summarize(input: AgentDatedMemorySummaryRequest): Promise; } export interface AgentDatedMemoryEngineOptions { store: GroupXStore; summarizer: AgentDatedMemorySummarizer; publish?: (event: StoredEventRecord) => void | Promise; onError?: (error: unknown, context: { operation: "summarize" | "publish"; roomId: string; actorId: string; localDate: string; }) => void; now?: () => Date; turnThreshold?: number; charThreshold?: number; debounceMs?: number; maxInputChars?: number; maxOutputChars?: number; attempts?: number; retryBaseMs?: number; } export type AgentDatedMemoryFlushResult = "completed" | "skipped" | "failed"; /** * Converts durable successful-Turn source rows into one generated per-day Agent * memory. Business Turns never wait for this engine: failures leave the source * rows pending and are retried without deleting transcript data. */ export declare class AgentDatedMemoryEngine { #private; constructor(options: AgentDatedMemoryEngineOptions); /** Called after a completed Turn commit; it only (re)schedules background work. */ noteCompleted(record: AgentDatedMemoryRollupRecord): void; /** Reconstructs timers from SQLite after native sessions are ready. */ recover(roomId?: string): void; /** Best-effort flush before a room checkpoint stops carrying older raw messages. */ flushBeforeCompaction(input: { roomId: string; throughSeq: number; signal?: AbortSignal; }): Promise; flushNow(record: Pick, input?: { force?: boolean; throughSeq?: number; }): Promise; close(): Promise; } //# sourceMappingURL=dated-memory-engine.d.ts.map