import type { SessionTransport } from '../shared-types.js';
export interface SessionRuntimeTarget {
    sessionId: string;
    parentSessionId: string | null;
    providerType: string;
    transport: SessionTransport;
    cdpManagerKey?: string;
    adapterKey?: string;
    instanceKey?: string;
    /** Working directory for CLI/ACP sessions. Used by read_chat to resolve
     *  native history when there is no live adapter (e.g. subscription path). */
    workspace?: string;
    /** Wall clock at register time. native-history readers use it as a
     *  cutoff so a fresh session can't show records from a prior one. */
    spawnedAtMs?: number;
    /**
     * Authoritative provider-native conversation id for this session (SSOT).
     * For providers that expose a session id on the CLI (codex/claude/hermes)
     * this equals that id. For antigravity — which takes no --session-id — this
     * is the on-disk conversations/<uuid>.db basename, discovered by the
     * native-history dispatcher and written back here via setProviderSessionId
     * the first time it resolves. Every downstream reader (read_chat, the
     * completion probe, the dashboard) should prefer this over re-deriving the
     * conversation by spawn-floor/mtime heuristics — that re-derivation is the
     * source of the antigravity conversation crosswire/theft class. Empty until
     * the first successful native read binds it.
     */
    providerSessionId?: string;
}
export declare class SessionRegistry {
    private readonly bySessionId;
    private readonly byManagerKey;
    private readonly byInstanceKey;
    private readonly byParentSessionId;
    register(target: SessionRuntimeTarget): void;
    get(sessionId: string | undefined | null): SessionRuntimeTarget | undefined;
    /**
     * Record the authoritative provider-native conversation id for a session
     * (SSOT). Idempotent; a no-op when the session is unknown or the value is
     * empty or unchanged. Never overwrites a known binding with an empty one.
     * Returns whether the stored value changed.
     */
    setProviderSessionId(sessionId: string | undefined | null, providerSessionId: string | undefined | null): boolean;
    unregister(sessionId: string | undefined | null): void;
    unregisterByManagerKey(managerKey: string): void;
    unregisterByInstanceKey(instanceKey: string): void;
    listChildren(parentSessionId: string): SessionRuntimeTarget[];
    private addIndex;
    private removeIndex;
}
