import { type ConversationArcEvent, type ConversationArcEventInput, type ConversationArcEventType, type EnableConversationArcOptions } from "./conversationArc";
/**
 * Talk-friendly summary of an arc. Computed from the current buffer
 * each time it's read. `summarizeArc` is exported separately for
 * server-side or batch use.
 */
export interface ConversationArcSummary {
    /** Total events buffered. */
    total: number;
    /** Per-type counts. Missing types implicitly zero. */
    byType: Partial<Record<ConversationArcEventType, number>>;
    /** Component names referenced across the buffer (deduplicated). */
    componentsSeen: string[];
    /** Audience labels referenced across the buffer (most recent last). */
    audiencesSeen: string[];
    /** Latest event's `arcId`, if any. */
    latestArcId?: string;
    /** Timestamp of the first event (epoch ms), or `null` if empty. */
    startedAt: number | null;
    /** Timestamp of the most recent event (epoch ms), or `null` if empty. */
    lastAt: number | null;
    /** Wall-clock duration covered by the buffer in ms, or `0` if empty. */
    durationMs: number;
}
/**
 * Reduce an event array to the talk-friendly `ConversationArcSummary`.
 *
 * Pure function — no `Date.now()` calls, no I/O. Safe to use on
 * the server, in batch jobs, or against a replayed arc fixture.
 *
 * Walks the events once, so cost scales with buffer size; the default
 * 1000-event capacity makes this trivially fast in practice.
 */
export declare function summarizeArc(events: ReadonlyArray<ConversationArcEvent>): ConversationArcSummary;
/**
 * Options for {@link useConversationArc}. Mirrors the underlying
 * `enableConversationArc` options, plus a `disableOnUnmount` escape
 * hatch for consumers that own the entire arc lifecycle.
 */
export interface UseConversationArcOptions extends EnableConversationArcOptions {
    /**
     * Auto-enable the arc store on mount. Defaults to `true` — the
     * common case is "I'm rendering the arc inspector / live dashboard,
     * I want recording on while I'm mounted." Set to `false` if you
     * want the hook to read but not flip the enable flag.
     */
    enableOnMount?: boolean;
    /**
     * Auto-disable on unmount. Defaults to `false` — disabling on
     * unmount would cut off any other consumer that depends on
     * recording staying live (the audience picker, an inspector panel
     * in a sibling tree). Set to `true` if you own the whole session.
     */
    disableOnUnmount?: boolean;
}
/**
 * Result returned from {@link useConversationArc}.
 */
export interface UseConversationArcResult {
    /** Live event buffer, refreshed on every recorded event. */
    /** Frozen snapshot of the live event buffer. Read-only; `.slice()` for a mutable copy. */
    history: ReadonlyArray<ConversationArcEvent>;
    /** Reduced summary of the current buffer. Recomputed on each event. */
    summary: ConversationArcSummary;
    /** `true` while the store is actively recording. */
    enabled: boolean;
    /** Current session ID, or `null` before any `enable*` call. */
    sessionId: string | null;
    /** Record an event — stable across renders. Returns the stamped event, or `null` if disabled. */
    record: (input: ConversationArcEventInput) => ConversationArcEvent | null;
    /** Clear the buffered events without disabling the store. */
    clear: () => void;
}
/**
 * React hook that participates in the conversation-arc session.
 *
 * Subscribes via `useSyncExternalStore` so re-renders are coordinated
 * with React's concurrent rendering (no tearing between the buffer
 * snapshot and the rendered tree). Auto-enables the store on mount
 * by default; the underlying store is module-scoped, so all hook
 * instances share the same buffer.
 *
 * ```tsx
 * const { history, summary, record } = useConversationArc()
 * // Later, in a click handler:
 * record({ type: "chart-exported", component: "LineChart", format: "jsx" })
 * ```
 */
export declare function useConversationArc(options?: UseConversationArcOptions): UseConversationArcResult;
