import { type ResolveShellOpts, type ShellResolution } from "./shell.js"; export interface PersistentRunResult { exitCode: number | "TIMEOUT"; output: string; } export declare class PersistentShell { private readonly cwd; private readonly env; private readonly maxOutputBytes; private readonly shellOpts?; private readonly launch?; private child; private buffer; private busy; constructor(cwd: string, env: NodeJS.ProcessEnv, maxOutputBytes: number, shellOpts?: ResolveShellOpts | undefined, launch?: ShellResolution | undefined); /** True while a previous persistent command is still running. */ get isBusy(): boolean; private ensureChild; /** * Run one command in the session shell. Serialized by the tool's sequential * execution mode; a concurrent call while busy is rejected defensively. * On timeout or abort the whole session is killed (state is gone — the next * call starts a fresh shell) because a wedged command cannot be safely * skipped within the same shell. */ run(command: string, timeoutMs: number, signal: AbortSignal, onChunk?: (text: string) => void): Promise; /** Kill the session shell; the next run() starts a fresh one. */ kill(): void; } //# sourceMappingURL=persistent-shell.d.ts.map