/** * Shared prompt parser for interactive terminal prompts. * * Parses terminal snapshots (from tmux capture-pane) to extract * interactive prompt options displayed by CLI tools (Gemini, Codex, etc.). * * Used by multiple plugins to dynamically capture options instead of hardcoding. */ export type PromptKind = 'yes_no' | 'numbered' | 'text'; export interface InteractivePromptOption { number: string; text: string; } export interface ParsedInteractivePrompt { kind: PromptKind; promptText: string; options: InteractivePromptOption[]; submitMap: Record; requiresFollowUpText?: boolean; } /** * Parse a terminal snapshot to extract interactive prompt options. * * Detects two prompt types: * - Yes/No prompts: [y/n] patterns * - Numbered prompts: "1. Allow once", "2. Allow for this session", etc. * * Returns null if no prompt is detected. */ export declare function parseInteractivePrompt(snapshot: string): ParsedInteractivePrompt | null; /** * Strip ANSI escape codes, box-drawing characters, and normalize whitespace * from terminal output. * * Box-drawing characters (│, ┌, ┐, └, ┘, ─, etc.) are used by TUI apps like * Gemini CLI to render bordered panels. Stripping them exposes the text content * so the parser can match option lines inside boxes. */ export declare function normalizeSnapshot(snapshot: string): string;