/**
 * Discriminated union for a selected thread item.
 *
 * Mirrors the `ThreadItem.kind` from `MessageThread` but carries
 * only the identifying key — not the full data. The `InspectTab`
 * derives display detail from the execution snapshot separately.
 */
export type SelectedThreadItem = {
    readonly kind: "tool-call";
    readonly toolCallId: string;
} | {
    readonly kind: "sub-agent";
    readonly subAgentId: string;
} | {
    readonly kind: "artifact";
    readonly artifactKey: string;
} | {
    readonly kind: "write-back";
    readonly workspaceEntryName: string;
};
type Listener = () => void;
/**
 * Framework-agnostic store for thread item selection.
 *
 * Implements the `useSyncExternalStore` contract identical to
 * {@link ConversationStore} and `WorkflowExecutionEventStore`.
 *
 * **Render isolation strategy:** consumers subscribe to a
 * per-item boolean via `isSelected(id)`, so only the previously-
 * and newly-selected leaves re-render on a selection change (≤2).
 *
 * The context carries the **store instance (stable ref)**, not the
 * value — so the context provider never triggers consumer re-renders.
 */
export declare class SelectionStore {
    private _selected;
    private _listeners;
    select(item: SelectedThreadItem): void;
    deselect(): void;
    toggle(item: SelectedThreadItem): void;
    subscribe: (listener: Listener) => (() => void);
    /** Returns the full selection object (for the InspectTab). */
    getSelection: () => SelectedThreadItem | null;
    /**
     * Per-item boolean selector. Each selectable leaf calls this inside
     * `useSyncExternalStore` so it only re-renders when its own
     * selected state changes.
     */
    isSelected: (kind: SelectedThreadItem["kind"], id: string) => boolean;
    private _notify;
}
export {};
//# sourceMappingURL=selection-store.d.ts.map