import type { InitOptions } from "./state.js"; export type ConfigTuiRoute = { kind: "tier-menu"; } | { kind: "show"; resolved: boolean; json: boolean; } | { kind: "dispatch"; pipeline: string | undefined; json: boolean; } | { kind: "edit-persona"; persona: string; } | { kind: "edit-override"; pipeline: string; phaseRole: string; }; export interface ConfigTuiArgsError { error: string; } export type ParseConfigTuiResult = ConfigTuiRoute | ConfigTuiArgsError; export declare function parseConfigTuiArgs(args: string[]): ParseConfigTuiResult; /** * Caller-provided interaction surface. The pi-extension wrapper supplies * `ctx.mountConfigTui` to give us TUI access; the bin surface omits it (and * gets a non-interactive fallback message). */ export interface ConfigTuiCallbacks { write: (line: string) => void; writeErr?: (line: string) => void; /** Present only when invoked inside a pi session (TUI mount available). */ ctx?: { notify: (msg: string, level?: string) => void; mountConfigTui?: (init: InitOptions) => Promise; /** The running session's ModelRegistry, which includes extension-registered * providers (e.g. ollama-cloud). When provided, discover models through * it instead of creating a fresh registry. */ modelRegistry?: import("@earendil-works/pi-coding-agent").ModelRegistry; }; } export declare function readPipelineCatalogue(cwd: string): string[] | null; export declare function runConfigTui(args: string[], cwd: string, cb: ConfigTuiCallbacks): Promise;