import type { ServerFrame, Message, ManifestAction, MessageContent, ConversationId, UserId, Subject } from './protocol/index.js'; export type SendStatus = 'pending' | 'sent' | 'delivered' | 'read'; export interface RenderMessage extends Message { clientMsgId?: string; status?: SendStatus; } /** Pure, DOM-free conversation state. Feed it ServerFrames (and local optimistic * sends); read an ordered, de-duplicated view out. Ordering is by `seq`; the * same message arriving twice (live + sync on reconnect) is collapsed by id — * the structural fix for the old duplicate-bubble bug. */ export declare class ChatStore { readonly me: UserId; conversationId?: ConversationId; state: string; version: number; hasMoreHistory: boolean; lastReadByOthers: number; assignedAgentId: UserId | undefined; accent: string | undefined; subject: Subject | undefined; name: string | undefined; e2e: boolean; offline: boolean; offlineMessage: string; launcherMessage: { title: string; subtitle?: string; } | null; /** Server-authored prompts shown above the composer until the guest's first * message (manifest `suggestedQuestions`). Host `quickReplies` win. */ suggestedQuestions: string[]; preChat: import('./protocol/frames.js').PreChatConfig | null; whiteLabel: boolean; readonly typing: Set; readonly online: Set; /** Live sentiment of the guest's latest message (agent-side only). */ sentiment: 'positive' | 'neutral' | 'frustrated' | undefined; sentimentScore: number | undefined; private actions; private readonly byId; private readonly keyByClient; private _maxSeq; private _sorted; constructor(me: UserId); messages(): RenderMessage[]; visibleActions(): ManifestAction[]; /** Any manifest action by id, regardless of state/surface — used to open the * form a `form`-kind message points at (search pre-fill). */ actionById(id: string): ManifestAction | undefined; highestSeq(): number; addOptimistic(clientMsgId: string, content: MessageContent): RenderMessage; apply(frame: ServerFrame): void; private upsert; private markOwnStatus; }