import type { ToolSession } from "../tools/index.js"; import type { JsStatusEvent } from "./js/shared/types.js"; /** Synthetic bridge name reserved for the `sh` helper across both runtimes. */ export declare const EVAL_SHELL_BRIDGE_NAME = "__shell__"; export interface EvalShellBridgeOptions { session: ToolSession; signal?: AbortSignal; emitStatus?: (event: JsStatusEvent) => void; } /** A finished `sh` command; the kernel helper raises `ShellError` unless `exitCode` is 0. */ export interface EvalShellResult { /** Combined stdout and stderr, ANSI-stripped. */ output: string; /** Undefined when the command hit its `timeout`. */ exitCode?: number; timedOut?: boolean; } /** * Run an `sh` command for an eval cell. * * Throws on malformed arguments, when the run is cancelled (cell abort), or when * the shell reports no exit status. A non-zero exit or timeout is a result, not a throw. */ export declare function runEvalShell(args: unknown, options: EvalShellBridgeOptions): Promise;