import type { SyncEngine } from "@absolutejs/sync/engine"; import type { AIConversationStore } from "../../types/ai"; export type SyncConversationStoreOptions = { /** Engine to register on (one is created if omitted). */ engine?: SyncEngine; /** Backing store for persistence (defaults to the in-memory store). */ inner?: AIConversationStore; /** Live messages collection name (subscribe with the conversation id). Default `aiMessages`. */ collection?: string; /** Change-feed table the live collection reads. Default `aiMessages`. */ table?: string; }; export type SyncConversationStore = AIConversationStore & { /** Mount with `syncSocket` for live conversations. */ engine: SyncEngine; /** Collection name to subscribe to (params = the conversation id). */ collection: string; }; /** * A sync-backed {@link AIConversationStore}: a drop-in for `createMemoryStore` * (or any store via `inner`) that ALSO makes conversations live. Every persisted * message flows through the sync engine's change feed, so a second device or tab * subscribed to the conversation sees messages appear — and stream — without its * own chat socket. Mount `store.engine` with `syncSocket` and subscribe to * `store.collection` with the conversation id as params. */ export declare const createSyncConversationStore: (options?: SyncConversationStoreOptions) => SyncConversationStore;