import type { EventBus } from '../kernel/events.js'; import type { ContentBlock } from '../types/blocks.js'; import type { Logger } from '../types/logger.js'; /** * The persisted form of a single queued user message. The TUI's * in-memory QueueItem has a render id; that's pure UI bookkeeping, so * we drop it when serializing — fresh ids are assigned on rehydrate. */ export interface PersistedQueueItem { displayText: string; blocks: ContentBlock[]; /** When true, the item will be refined via model.refine before entering the agent context. */ shouldRefine?: boolean | undefined; } /** Hard memory/disk budgets shared by QueueStore and the TUI reducer. */ export declare const QUEUE_MAX_ITEMS = 100; export declare const QUEUE_MAX_BYTES: number; export declare const QUEUE_MAX_ITEM_BYTES: number; /** * Keep the FIFO prefix that fits the queue budget. Callers can compare the * returned length with the input length to detect a rejected append. */ export declare function retainPersistedQueueItems(items: readonly PersistedQueueItem[]): PersistedQueueItem[]; /** * Side-file storage for a session's pending input queue. Lives at * `/queue.json` next to the attachment spool. Reads are * tolerant (missing/malformed file → empty array); writes are atomic * (tmp + rename) so a crash mid-write can never leave a partial file * the next launch would choke on. * * The contract is "snapshot replacement": every mutation hands the * full queue and we rewrite the file. The queue is small (rarely more * than a handful of messages), so this is cheaper than delta logging * and avoids the replay complexity. */ export declare class QueueStore { private readonly file; private readonly events; private readonly traceId; private readonly logger; constructor(opts: { dir: string; events?: EventBus; traceId?: string; logger?: Logger | undefined; }); private logWarn; write(items: PersistedQueueItem[]): Promise; read(): Promise; clear(): Promise; } //# sourceMappingURL=queue-store.d.ts.map