import type { ArkmeTimelinePage } from './types.js'; import type { TimelineCacheCommit } from './unified-timeline-cache.js'; import type { ChatSyncCommand } from './chat-message-sync.js'; export type TimelineCacheCommand = { kind: 'reserve' | 'close' | 'invalidate-all'; } | { kind: 'sync'; command: ChatSyncCommand; } | { kind: 'read'; scope: string; request: string; anchorId?: string; latest?: boolean; } | { kind: 'write'; scope: string; request: string; page: ArkmeTimelinePage; options: TimelineCacheCommit; } | { kind: 'invalidate'; scope: string; timelineItemKey?: string; terminal?: boolean; refreshOnly?: boolean; } | { kind: 'invalidate-source'; sourceKey: string; timelineItemKey?: string; terminal?: boolean; refreshOnly?: boolean; }; export interface TimelineCachePort { /** False distinguishes a healthy worker's admission rejection from a dead worker. */ readonly isClosed?: boolean; call(command: TimelineCacheCommand): Promise; close(): void; } /** One bounded worker per Host. SQL, JSON, cleanup and checkpoints never execute on the Host event loop. */ export declare class TimelineCacheWorker implements TimelineCachePort { private readonly worker; private readonly pending; private queuedBytes; private nextId; private closed; get isClosed(): boolean; private initialized; private readonly startupTimer; constructor(directory: string, workerUrl?: URL); call(command: TimelineCacheCommand): Promise; private fail; close(): void; } //# sourceMappingURL=timeline-cache-port.d.ts.map