export type KeyId = string;
export type KeyEventType = "press" | "release" | "repeat";
/** Placeholder — no terminal key input in headless mode. */
export declare function matchesKey(_data: string, _keyId: KeyId): boolean;
/** Placeholder. */
export declare function parseKey(_data: string): KeyId;
/** Placeholder. */
export declare function isKeyRelease(_data: string): boolean;
/** Placeholder. */
export declare function isKeyRepeat(_data: string): boolean;
/** Placeholder. */
export declare function isKittyProtocolActive(): boolean;
/** Placeholder. */
export declare function setKittyProtocolActive(_active: boolean): void;
/** Placeholder. */
export declare function decodeKittyPrintable(_data: string): string;
/** Key identifier helper. */
export declare class Key {
    static c(key: string): KeyId;
    static m(key: string): KeyId;
    static cm(key: string): KeyId;
    static backspace: KeyId;
    static enter: KeyId;
    static escape: KeyId;
    static tab: KeyId;
    static up: KeyId;
    static down: KeyId;
    static left: KeyId;
    static right: KeyId;
    static delete: KeyId;
    static home: KeyId;
    static end: KeyId;
    static pageUp: KeyId;
    static pageDown: KeyId;
    static f1: KeyId;
    static f2: KeyId;
    static f3: KeyId;
    static f4: KeyId;
    static f5: KeyId;
    static f6: KeyId;
    static f7: KeyId;
    static f8: KeyId;
    static f9: KeyId;
    static f10: KeyId;
    static f11: KeyId;
    static f12: KeyId;
    static space: KeyId;
}
/** Global keybinding registry. Extended via declaration merging by downstream code. */
export interface Keybindings {
    "tui.editor.cursorUp": true;
    "tui.editor.cursorDown": true;
    "tui.editor.cursorLeft": true;
    "tui.editor.cursorRight": true;
    "tui.editor.cursorWordLeft": true;
    "tui.editor.cursorWordRight": true;
    "tui.editor.cursorLineStart": true;
    "tui.editor.cursorLineEnd": true;
    "tui.editor.jumpForward": true;
    "tui.editor.jumpBackward": true;
    "tui.editor.pageUp": true;
    "tui.editor.pageDown": true;
    "tui.editor.deleteCharBackward": true;
    "tui.editor.deleteCharForward": true;
    "tui.editor.deleteWordBackward": true;
    "tui.editor.deleteWordForward": true;
    "tui.editor.deleteToLineStart": true;
    "tui.editor.deleteToLineEnd": true;
    "tui.editor.yank": true;
    "tui.editor.yankPop": true;
    "tui.editor.undo": true;
    "tui.input.newLine": true;
    "tui.input.submit": true;
    "tui.input.tab": true;
    "tui.input.copy": true;
    "tui.select.up": true;
    "tui.select.down": true;
    "tui.select.pageUp": true;
    "tui.select.pageDown": true;
    "tui.select.confirm": true;
    "tui.select.cancel": true;
    "app.interrupt": true;
    "app.clear": true;
    "app.exit": true;
    "app.suspend": true;
    "app.thinking.cycle": true;
    "app.model.cycleForward": true;
    "app.model.cycleBackward": true;
    "app.model.select": true;
    "app.tools.expand": true;
    "app.thinking.toggle": true;
    "app.session.toggleNamedFilter": true;
    "app.editor.external": true;
    "app.message.followUp": true;
    "app.message.dequeue": true;
    "app.clipboard.pasteImage": true;
    "app.session.new": true;
    "app.session.tree": true;
    "app.session.fork": true;
    "app.session.resume": true;
    "app.tree.foldOrUp": true;
    "app.tree.unfoldOrDown": true;
    "app.tree.editLabel": true;
    "app.tree.toggleLabelTimestamp": true;
    "app.session.togglePath": true;
    "app.session.toggleSort": true;
    "app.session.rename": true;
    "app.session.delete": true;
    "app.session.deleteNoninvasive": true;
    "app.models.save": true;
    "app.models.enableAll": true;
    "app.models.clearAll": true;
    "app.models.toggleProvider": true;
    "app.models.reorderUp": true;
    "app.models.reorderDown": true;
    "app.tree.filter.default": true;
    "app.tree.filter.noTools": true;
    "app.tree.filter.userOnly": true;
    "app.tree.filter.labeledOnly": true;
    "app.tree.filter.all": true;
    "app.tree.filter.cycleForward": true;
    "app.tree.filter.cycleBackward": true;
}
export type Keybinding = keyof Keybindings;
export interface KeybindingDefinition {
    defaultKeys: KeyId | KeyId[];
    description?: string;
}
export type KeybindingDefinitions = Record<string, KeybindingDefinition>;
export type KeybindingsConfig = Record<string, KeyId | KeyId[]>;
export interface KeybindingConflict {
    action1: string;
    action2: string;
    key: KeyId;
}
/** Built-in keybinding defaults. */
export declare const TUI_KEYBINDINGS: KeybindingDefinitions;
export declare class BaseKeybindingsManager {
    private definitions;
    private userBindings;
    constructor(definitions?: KeybindingDefinitions, userBindings?: KeybindingsConfig);
    getKeys(binding: Keybinding): KeyId[];
    setUserBindings(bindings: KeybindingsConfig): void;
    getResolvedBindings(): KeybindingsConfig;
    reconfigure(_config: KeybindingsConfig): void;
}
export declare function getKeybindings(): KeybindingsManager;
export declare function setKeybindings(_config: KeybindingsConfig): void;
export interface AppKeybindings {
    "app.interrupt": true;
    "app.clear": true;
    "app.exit": true;
    "app.suspend": true;
    "app.thinking.cycle": true;
    "app.model.cycleForward": true;
    "app.model.cycleBackward": true;
    "app.model.select": true;
    "app.tools.expand": true;
    "app.thinking.toggle": true;
    "app.session.toggleNamedFilter": true;
    "app.editor.external": true;
    "app.message.followUp": true;
    "app.message.dequeue": true;
    "app.clipboard.pasteImage": true;
    "app.session.new": true;
    "app.session.tree": true;
    "app.session.fork": true;
    "app.session.resume": true;
    "app.tree.foldOrUp": true;
    "app.tree.unfoldOrDown": true;
    "app.tree.editLabel": true;
    "app.tree.toggleLabelTimestamp": true;
    "app.session.togglePath": true;
    "app.session.toggleSort": true;
    "app.session.rename": true;
    "app.session.delete": true;
    "app.session.deleteNoninvasive": true;
    "app.models.save": true;
    "app.models.enableAll": true;
    "app.models.clearAll": true;
    "app.models.toggleProvider": true;
    "app.models.reorderUp": true;
    "app.models.reorderDown": true;
    "app.tree.filter.default": true;
    "app.tree.filter.noTools": true;
    "app.tree.filter.userOnly": true;
    "app.tree.filter.labeledOnly": true;
    "app.tree.filter.all": true;
    "app.tree.filter.cycleForward": true;
    "app.tree.filter.cycleBackward": true;
}
export type AppKeybinding = keyof AppKeybindings;
export declare const KEYBINDINGS: {
    readonly "app.interrupt": {
        readonly defaultKeys: "escape";
        readonly description: "Cancel or abort";
    };
    readonly "app.clear": {
        readonly defaultKeys: "ctrl+c";
        readonly description: "Clear editor";
    };
    readonly "app.exit": {
        readonly defaultKeys: "ctrl+d";
        readonly description: "Exit when editor is empty";
    };
    readonly "app.suspend": {
        readonly defaultKeys: never[] | "ctrl+z";
        readonly description: "Suspend to background";
    };
    readonly "app.thinking.cycle": {
        readonly defaultKeys: "shift+tab";
        readonly description: "Cycle thinking level";
    };
    readonly "app.model.cycleForward": {
        readonly defaultKeys: "ctrl+p";
        readonly description: "Cycle to next model";
    };
    readonly "app.model.cycleBackward": {
        readonly defaultKeys: "shift+ctrl+p";
        readonly description: "Cycle to previous model";
    };
    readonly "app.model.select": {
        readonly defaultKeys: "ctrl+l";
        readonly description: "Open model selector";
    };
    readonly "app.tools.expand": {
        readonly defaultKeys: "ctrl+o";
        readonly description: "Toggle tool output";
    };
    readonly "app.thinking.toggle": {
        readonly defaultKeys: "ctrl+t";
        readonly description: "Toggle thinking blocks";
    };
    readonly "app.session.toggleNamedFilter": {
        readonly defaultKeys: "ctrl+n";
        readonly description: "Toggle named session filter";
    };
    readonly "app.editor.external": {
        readonly defaultKeys: "ctrl+g";
        readonly description: "Open external editor";
    };
    readonly "app.message.followUp": {
        readonly defaultKeys: "alt+enter";
        readonly description: "Queue follow-up message";
    };
    readonly "app.message.dequeue": {
        readonly defaultKeys: "alt+up";
        readonly description: "Restore queued messages";
    };
    readonly "app.clipboard.pasteImage": {
        readonly defaultKeys: "alt+v" | "ctrl+v";
        readonly description: "Paste image from clipboard";
    };
    readonly "app.session.new": {
        readonly defaultKeys: [];
        readonly description: "Start a new session";
    };
    readonly "app.session.tree": {
        readonly defaultKeys: [];
        readonly description: "Open session tree";
    };
    readonly "app.session.fork": {
        readonly defaultKeys: [];
        readonly description: "Fork current session";
    };
    readonly "app.session.resume": {
        readonly defaultKeys: [];
        readonly description: "Resume a session";
    };
    readonly "app.tree.foldOrUp": {
        readonly defaultKeys: ["ctrl+left", "alt+left"];
        readonly description: "Fold tree branch or move up";
    };
    readonly "app.tree.unfoldOrDown": {
        readonly defaultKeys: ["ctrl+right", "alt+right"];
        readonly description: "Unfold tree branch or move down";
    };
    readonly "app.tree.editLabel": {
        readonly defaultKeys: "shift+l";
        readonly description: "Edit tree label";
    };
    readonly "app.tree.toggleLabelTimestamp": {
        readonly defaultKeys: "shift+t";
        readonly description: "Toggle tree label timestamps";
    };
    readonly "app.session.togglePath": {
        readonly defaultKeys: "ctrl+p";
        readonly description: "Toggle session path display";
    };
    readonly "app.session.toggleSort": {
        readonly defaultKeys: "ctrl+s";
        readonly description: "Toggle session sort mode";
    };
    readonly "app.session.rename": {
        readonly defaultKeys: "ctrl+r";
        readonly description: "Rename session";
    };
    readonly "app.session.delete": {
        readonly defaultKeys: "ctrl+d";
        readonly description: "Delete session";
    };
    readonly "app.session.deleteNoninvasive": {
        readonly defaultKeys: "ctrl+backspace";
        readonly description: "Delete session when query is empty";
    };
    readonly "app.models.save": {
        readonly defaultKeys: "ctrl+s";
        readonly description: "Save model selection";
    };
    readonly "app.models.enableAll": {
        readonly defaultKeys: "ctrl+a";
        readonly description: "Enable all models";
    };
    readonly "app.models.clearAll": {
        readonly defaultKeys: "ctrl+x";
        readonly description: "Clear all models";
    };
    readonly "app.models.toggleProvider": {
        readonly defaultKeys: "ctrl+p";
        readonly description: "Toggle all models for provider";
    };
    readonly "app.models.reorderUp": {
        readonly defaultKeys: "alt+up";
        readonly description: "Move model up in order";
    };
    readonly "app.models.reorderDown": {
        readonly defaultKeys: "alt+down";
        readonly description: "Move model down in order";
    };
    readonly "app.tree.filter.default": {
        readonly defaultKeys: "ctrl+d";
        readonly description: "Tree filter: default view";
    };
    readonly "app.tree.filter.noTools": {
        readonly defaultKeys: "ctrl+t";
        readonly description: "Tree filter: hide tool results";
    };
    readonly "app.tree.filter.userOnly": {
        readonly defaultKeys: "ctrl+u";
        readonly description: "Tree filter: user messages only";
    };
    readonly "app.tree.filter.labeledOnly": {
        readonly defaultKeys: "ctrl+l";
        readonly description: "Tree filter: labeled entries only";
    };
    readonly "app.tree.filter.all": {
        readonly defaultKeys: "ctrl+a";
        readonly description: "Tree filter: show all entries";
    };
    readonly "app.tree.filter.cycleForward": {
        readonly defaultKeys: "ctrl+o";
        readonly description: "Tree filter: cycle forward";
    };
    readonly "app.tree.filter.cycleBackward": {
        readonly defaultKeys: "shift+ctrl+o";
        readonly description: "Tree filter: cycle backward";
    };
};
export declare function migrateKeybindingsConfig(rawConfig: Record<string, unknown>): {
    config: Record<string, unknown>;
    migrated: boolean;
};
export declare class KeybindingsManager extends BaseKeybindingsManager {
    private configPath;
    constructor(userBindings?: KeybindingsConfig, configPath?: string);
    static create(agentDir?: string): KeybindingsManager;
    reload(): void;
    getEffectiveConfig(): KeybindingsConfig;
    private static loadFromFile;
}
//# sourceMappingURL=keybindings.d.ts.map