import { type ShellResult, type StreamingShellIo } from "../util/shell.js";
import { type ChildEnvSource } from "./child-env.js";
export type ProcessSessionIo = StreamingShellIo;
export interface ProcessSessionOptions {
    readonly command: string;
    readonly args?: readonly string[];
    readonly cwd?: string;
    readonly env?: ChildEnvSource;
    readonly parentEnv?: ChildEnvSource;
    readonly inheritParentEnv?: boolean;
    readonly allowedParentEnvNames?: readonly string[];
    readonly allowedSecretEnvNames?: readonly string[];
    readonly allowSecretPassthrough?: boolean;
    readonly timeoutMs?: number;
    readonly maxBuffer?: number;
    readonly stdio?: "pipe" | "inherit";
    readonly logPath?: string;
    readonly input?: string;
    readonly signal?: AbortSignal;
    readonly onStdout?: (chunk: string, io?: ProcessSessionIo) => void;
    readonly onStderr?: (chunk: string, io?: ProcessSessionIo) => void;
}
export interface ProcessSessionResult extends ShellResult {
    readonly aborted: boolean;
    readonly durationMs: number;
}
export declare function runProcessSession(options: ProcessSessionOptions): Promise<ProcessSessionResult>;
