import { d as SomaMessage, U as UseSomaOptions } from '../index-CrbUs5kv.js'; export { S as SomaAgent, b as SomaConversation, c as SomaFile, e as SomaSkill, f as SomaStreamEvent, a as UseSomaReturn } from '../index-CrbUs5kv.js'; interface SomaCoreClientState { messages: SomaMessage[]; isConnected: boolean; isStreaming: boolean; streamContent: string; } type SomaStateChangeListener = (state: SomaCoreClientState) => void; declare class SomaCoreClient { private options; private ws; private ready; private pending; messages: SomaMessage[]; isConnected: boolean; isStreaming: boolean; streamContent: string; private streamRef; private contentRef; private thinkingRef; private historyLoaded; private listeners; constructor(options: UseSomaOptions); subscribe(listener: SomaStateChangeListener): () => void; getState(): SomaCoreClientState; private notify; updateOptions(newOptions: Partial): void; /** * Auth headers for REST calls. * * Prefer the `authHeaders` factory when provided (it is the documented escape * hatch for custom auth, e.g. `x-api-key`). Otherwise fall back to the legacy * `Authorization: Bearer ` used by the rest of the core client. */ private restHeaders; private get wsUrl(); loadHistory(): Promise; /** * Delete a conversation on the backend (soft-delete). * Maps to `DELETE /api/conversations/:id`. * * @param conversationId optional — defaults to the client's `conversationId`. * @returns true if the backend confirmed the deletion, false otherwise. * * @remarks * This clears the local session state (messages + any in-flight stream/pending * buffers). It does NOT close the WebSocket or change the active `cid` — the * server may still append to the deleted conversation until you reconnect. If * you need to "delete and start fresh", call `disconnect()` and then * `updateOptions({ conversationId: '' })` before `connect()`. */ deleteConversation(conversationId?: string): Promise; /** * Reset local state after a successful delete: clears messages, history flag, * in-flight stream buffers, streaming flag and queued (pending) prompts. */ private resetSession; connect(): void; private processMessage; send(text: string): void; cancel(): void; reconnect(): void; disconnect(): void; } export { SomaCoreClient, type SomaCoreClientState, SomaMessage, type SomaStateChangeListener, UseSomaOptions };