/** * Bash command execution for the interactive mode (the `!cmd` prompt mode). * * Runs a bash command through the session (letting extensions intercept via * the user_bash event), renders a BashExecutionComponent for it, and streams * output into that component. Commands started while the agent is streaming are * parked in the pending area and moved into the chat transcript once the turn * finishes. Extracted from interactive-mode.ts behind a narrow * BashExecutionControllerDeps interface. */ import type { Container, TUI } from "@kolisachint/hoocode-tui"; import type { AgentSession } from "../../core/agent-session.js"; /** The slice of the interactive mode the bash execution needs. */ export interface BashExecutionControllerDeps { /** The active session (read at call time; the session can be swapped). */ get session(): AgentSession; ui: TUI; /** Holds bash rows started while the agent is streaming. */ pendingMessagesContainer: Container; /** The chat transcript. */ chatContainer: Container; showError(errorMessage: string): void; } export declare class BashExecutionController { private readonly deps; private bashComponent; private pendingBashComponents; constructor(deps: BashExecutionControllerDeps); private get session(); /** Move pending bash components from pending area to chat */ flushPendingBashComponents(): void; handleBashCommand(command: string, excludeFromContext?: boolean): Promise; } //# sourceMappingURL=bash-execution-controller.d.ts.map