import { type MinimizerOptions } from "@oh-my-pi/pi-natives";
import { type ShellMinimizerSettings } from "../config/settings.js";
export interface BashExecutorOptions {
    cwd?: string;
    /** Milliseconds before aborting the command; 0 disables the executor deadline. */
    timeout?: number;
    onChunk?: (chunk: string) => void;
    chunkThrottleMs?: number;
    signal?: AbortSignal;
    /** Session key suffix to isolate shell sessions per agent */
    sessionKey?: string;
    /** Additional environment variables to inject */
    env?: Record<string, string>;
    /** Run through the configured user shell instead of brush parsing directly. */
    useUserShell?: boolean;
    /** Artifact path/id for full output storage */
    artifactPath?: string;
    artifactId?: string;
    /**
     * Invoked when the native minimizer rewrote the command's output, giving
     * the caller a chance to persist the lossless original capture (typically
     * via the session's `ArtifactManager`). The returned id is spliced into
     * the sink output as `artifact://<id>` so the agent can retrieve the raw
     * bytes. Return `undefined` to skip the footer.
     */
    onMinimizedSave?: (originalText: string, info: {
        filter: string;
        inputBytes: number;
        outputBytes: number;
    }) => Promise<string | undefined>;
}
export interface BashResult {
    output: string;
    exitCode: number | undefined;
    cancelled: boolean;
    truncated: boolean;
    totalLines: number;
    totalBytes: number;
    outputLines: number;
    outputBytes: number;
    artifactId?: string;
    workingDir?: string;
}
/** Translate `ShellMinimizerSettings` into native `MinimizerOptions`, or `undefined` when disabled. */
export declare function buildMinimizerOptions(group: ShellMinimizerSettings): MinimizerOptions | undefined;
export declare function executeBash(command: string, options?: BashExecutorOptions): Promise<BashResult>;
