import { KeybindingsManager, type KeybindingsConfig, type MarkdownTheme } from '@earendil-works/pi-tui'; /** pi's user config dir: `~/.pi/agent/`. */ export declare function defaultAgentDir(): string; /** * Read `~/.pi/agent/keybindings.json` (if present) and return the user's binding * overrides. Tolerates a flat `{action: keys}` map or a `{keybindings: {...}}` * wrapper; a missing/malformed file → `undefined` (fall back to defaults). */ export declare function loadUserKeybindings(agentDir?: string): KeybindingsConfig | undefined; export declare function createKeybindingsManager(agentDir?: string): KeybindingsManager; /** Register the manager on the editor's pi-tui instance too (see `editorPiTui`), * so the editor's newline/submit handling honors the same (user-overridden) * bindings as the rest of the viewer. Call once, after `createKeybindingsManager`. */ export declare function mirrorKeybindingsToEditor(km: KeybindingsManager): Promise; /** Mirror the negotiated kitty-keyboard-protocol flag onto the editor's pi-tui * instance (ProcessTerminal sets it only on OUR copy). Call after the terminal * has negotiated, i.e. after `tui.start()`. */ export declare function mirrorKittyProtocolToEditor(active: boolean): Promise; export declare function resolveFdPath(): Promise; /** * The user's theme name from pi settings — project (`/.pi/settings.json`) * overrides global (`~/.pi/agent/settings.json`). `undefined` → pi's default. */ export declare function loadThemeName(opts?: { agentDir?: string; cwd?: string; }): string | undefined; /** Resolve + activate the user's theme so the reused pi components (markdown, * editor, select-list themes) render at parity with the user's pi. */ export declare function applyTheme(opts?: { agentDir?: string; cwd?: string; }): void; /** * The named styling roles the attach chrome paints with, all theme-derived so the * viewer matches whatever theme the user configured for pi. Each is a * `str => str` colorizer applied to a whole token. */ export interface AttachPalette { /** Headings / badges / panel titles — the theme accent (gold in the default). */ accent: (s: string) => string; /** Live/active markers + the working spinner — the theme's bright accent (teal). */ active: (s: string) => string; /** Informational values (model name, counts) — the theme link color (blue). */ info: (s: string) => string; /** Secondary text — the theme muted gray. */ muted: (s: string) => string; /** Least-important text — SGR faint (a style, not a hue). */ faint: (s: string) => string; /** Border rules / frames — the theme border color. */ border: (s: string) => string; /** Distinct-surface paint for a modal/overlay: wraps a WHOLE rendered line so * it sits on the theme's `selectedBg` background, edge to edge, re-asserting * the bg after every embedded full-reset so an inner `\x1b[0m` (a status dot, * the cursor bar) can't punch a hole in the surface. Closes with a bg-only * reset so the surface never bleeds past the line. */ surface: (s: string) => string; /** Emphasis. */ bold: (s: string) => string; /** Error text. pi's public theme API does NOT surface the `error` ThemeColor * (only markdown/select-list/settings-list derived colors are re-exported), so * this is the semantically-correct ANSI red — NOT an ad-hoc hardcode. */ error: (s: string) => string; /** Warning / transient notices. Same constraint as `error` → ANSI yellow. */ warning: (s: string) => string; /** Editor border for a SINGLE-`!` bash command (output IS added to the agent's * context). Dull/normal ANSI green — pi paints shell mode from its `bashMode` * theme color (default `green`), which pi does NOT re-export through its public * surface, so like `error`/`warning` this is the semantically-correct ANSI green. */ bashMode: (s: string) => string; /** Editor border for a `!!` bash command (output is HIDDEN from the agent). * BRIGHT ANSI green, so the more consequential "agent won't see this" form * reads as visually hotter than the plain `!`. */ bashModeAlt: (s: string) => string; } /** Markdown theme for the attach transcript. Fenced code keeps pi's native * shape and syntax, but its content is painted on a distinct theme surface. */ export declare function attachMarkdownTheme(): MarkdownTheme; /** * Build the attach chrome's color palette from the LIVE theme. Call AFTER * `applyTheme()` — the colors are pulled from pi's `getMarkdownTheme()` / * `getSelectListTheme()`, which read the active theme singleton at call time. * * pi does not re-export the raw `Theme` instance (its `.` export map omits the * `theme` const and `getEditorTheme`/`getTheme`), so the accent/border/muted hues * are sourced from the markdown + select-list theme colorizers, which ARE * re-exported and are themselves backed by `theme.fg(...)`. The two semantic * colors pi never exposes through that surface — `error`/`warning` — fall back to * standard ANSI red/yellow. */ export declare function attachPalette(): AttachPalette;