import type { AgentSessionReloadOptions } from "../../core/agent-session-types.ts";
import type { KeybindingsConfig, KeybindingsManager } from "../../core/keybindings.ts";
import type { EngineExtensionShortcut, EngineKeybindingState } from "../interactive-engine/protocol.ts";
export interface ReloadableSession {
    reload(options?: AgentSessionReloadOptions): Promise<void>;
}
type ShortcutCatalogResolver<TSession extends ReloadableSession> = (session: TSession, effectiveBindings: KeybindingsConfig) => EngineExtensionShortcut[];
/**
 * Serializes the full keybinding/session reload transaction for one shared
 * manager. The queue survives rejection, mutates the manager in place, and
 * publishes only state from a committed successful reload.
 */
export declare class KeybindingsReloadCoordinator<TSession extends ReloadableSession = ReloadableSession> {
    private tail;
    private readonly keybindings;
    private readonly onCommitted;
    private readonly resolveShortcuts;
    constructor(keybindings: KeybindingsManager | undefined, onCommitted?: (state: EngineKeybindingState) => void, resolveShortcuts?: ShortcutCatalogResolver<TSession>);
    reload(session: TSession): Promise<EngineKeybindingState | undefined>;
    publishCurrentState(session: TSession): EngineKeybindingState | undefined;
    private createState;
    private runTransaction;
}
/** Compatibility helper for callers that do not share a longer-lived queue. */
export declare function reloadSessionWithKeybindings(session: ReloadableSession, keybindings: KeybindingsManager | undefined, onKeybindingsReloaded?: () => void): Promise<void>;
export {};
//# sourceMappingURL=rpc-keybindings-reload.d.ts.map