/**
 * PersistStage - State persistence after execution.
 *
 * If persistState is enabled and the execution succeeded (exit code 0),
 * commits the execution state (cwd, env, functions, options) back to the
 * parent Bash instance.
 */
import type { InterpreterState } from "../../interpreter/types.js";
import type { PipelineContext, PipelineStage, StageResult } from "../types.js";
/**
 * Callback interface for persisting state back to the Bash instance.
 * Avoids direct coupling to Bash internals.
 */
export interface PersistCallback {
    (execState: InterpreterState, exitCode: number): void;
}
export declare class PersistStage implements PipelineStage {
    readonly name = "persist";
    private readonly defaultPersistState;
    private readonly persistCallback;
    constructor(defaultPersistState: boolean, persistCallback: PersistCallback);
    execute(context: PipelineContext): Promise<StageResult>;
}
