import { spawn } from 'node:child_process'; import type { Component, KeybindingsManager, TUI } from '@earendil-works/pi-tui'; import type { BashExecutionComponent } from './components/bash-execution.js'; type LocalShellDeps = { chatLog: { addSystem: (line: string) => void; addBashExecution: (command: string, ui: TUI, excludeFromContext: boolean) => BashExecutionComponent; }; tui: TUI & { requestRender: () => void; setFocus: (c: Component) => void; }; editor: Component; openOverlay: (component: Component) => void; closeOverlay: () => void; spawnCommand?: typeof spawn; getCwd?: () => string; env?: NodeJS.ProcessEnv; maxOutputChars?: number; keybindings?: KeybindingsManager; /** Pause stdout/stderr filtering before handing the terminal to a child (`stdio: 'inherit'`). */ pauseStdioFilter?: () => void; resumeStdioFilter?: () => void; /** Wrap work while the TUI is stopped (full-screen subprocess). */ runWithInheritedStdio?: (work: () => Promise) => Promise; onComplete?: (entry: { command: string; output?: string; exitCode?: number | null; signal?: string | null; excludeFromContext: boolean; truncated?: boolean; }) => void | Promise; }; export declare function formatLocalShellConsentHint(keybindings?: KeybindingsManager): string; /** `!command` runs on the local machine (gated by in-session consent). `!!command` uses inherited stdio. */ export declare function createLocalShellRunner(deps: LocalShellDeps): { runLocalShellLine: (line: string) => Promise; }; export {};