import type { FetchChunksFunction } from '../types';
import type { UnifiedChatState } from '../types/unified-chat-state.types';
/**
 * Consumer-supplied configuration for the NATS chat adapter.
 *
 * Every field is consumer-owned — the lib does not assume a particular
 * backend protocol or auth scheme. Hosts wire these up against their
 * own OpenFrame deployment.
 */
export interface UseNatsChatAdapterConfig {
    /**
     * Active conversation/dialog id. When `null` the adapter stays
     * subscription-idle (no NATS connection, no catchup fetch). Set this
     * once the consumer's "open new conversation" flow has allocated an
     * id from the backend.
     */
    dialogId: string | null;
    /**
     * Build the NATS WebSocket URL. Returning `null` short-circuits the
     * subscription — same contract as `useNatsDialogSubscription`.
     */
    getNatsWsUrl: () => string | null;
    /**
     * Optional NATS client auth.
     */
    clientConfig?: {
        name?: string;
        user?: string;
        pass?: string;
    };
    /**
     * Send a user message upstream. Consumer-owned: typically an
     * authenticated HTTP POST to the OpenFrame chat endpoint, or a
     * direct NATS publish to a dedicated subject.
     *
     * The adapter does NOT couple to the wire format — it only:
     *   1. appends the user message to local state for immediate render
     *   2. flips streamingPhase to 'thinking' so the input UI shows status
     *   3. calls this callback
     *
     * Reply arrives asynchronously as NATS chunks via the live tail and
     * is accumulated into the trailing assistant message.
     */
    publishUserMessage: (text: string, options: {
        hidden?: boolean;
        dialogId: string | null;
    }) => Promise<void> | void;
    /**
     * Historical-chunk fetcher used by `useChunkCatchup` to back-fill
     * events that happened while the user was in another mode or before
     * the websocket came online. Consumer-owned: typically a REST GET
     * against the OpenFrame chat-history endpoint.
     *
     * When omitted, `useChunkCatchup` falls back to its own default
     * fetch implementation — see hook docs for the contract.
     */
    fetchChunks?: FetchChunksFunction;
    /**
     * Whether THINKING chunks are surfaced as segments. Default `false`
     * (parity with the existing `useRealtimeChunkProcessor` default).
     */
    enableThinking?: boolean;
    /**
     * Mirrors `UseRealtimeChunkProcessorOptions.batchApprovalsEnabled`.
     * Default `true` — single batch card per APPROVAL_REQUEST with
     * `toolCalls[]`. Set `false` to fall back to legacy per-tool cards.
     */
    batchApprovalsEnabled?: boolean;
}
/**
 * Per-call options for `useNatsChatAdapter`. Carries only the
 * activation gate — config travels through the config object so it
 * survives mode swaps without re-mounting.
 */
export interface UseNatsChatAdapterOptions {
    /**
     * When `false` the adapter goes idle: no NATS subscription, no
     * catchup fetch, no publish. Local message state is preserved so
     * the user sees their history when the mode flips back to active.
     * Default `true`.
     */
    active?: boolean;
}
export declare function useNatsChatAdapter(config: UseNatsChatAdapterConfig, options?: UseNatsChatAdapterOptions): UnifiedChatState;
//# sourceMappingURL=use-nats-chat-adapter.d.ts.map