import { Effect, Schema } from "effect";
import type { PlatformProcessBoundary } from "./platform-process.js";
interface ManagedProcess {
    readonly pid?: number | undefined;
    readonly on: {
        (event: "close", listener: (code: number | null) => void): unknown;
        (event: "error", listener: (error: Error) => void): unknown;
    };
}
declare const ProcessStartError_base: Schema.TaggedErrorClass<ProcessStartError, "ProcessStartError", {
    readonly _tag: Schema.tag<"ProcessStartError">;
} & {
    message: typeof Schema.String;
    code: Schema.optional<typeof Schema.String>;
}>;
declare class ProcessStartError extends ProcessStartError_base {
}
interface ManagedProcessOptions<Process extends ManagedProcess, Result> {
    readonly processBoundary: PlatformProcessBoundary;
    readonly spawn: () => Process;
    readonly captureResult: (process: Process) => (exitCode: number) => Result;
}
/**
 * Owns one child-process attempt from spawn through close, startup error, or interruption.
 *
 * Rust performs one blocking `Command::output` call and keeps the trace directory alive
 * through `TempDir` ownership. Node exposes asynchronous close/error events instead, so
 * this adapter uses an Effect scope as the corresponding resource-ownership boundary.
 * https://github.com/informalsystems/quint-connect/blob/4f018f54fc7dd4cef341d10111427bab59d3b307/connect/src/trace/generator/mod.rs#L23-L33
 */
export declare const runManagedProcess: <Process extends ManagedProcess, Result>(options: ManagedProcessOptions<Process, Result>) => Effect.Effect<Result, ProcessStartError>;
export {};
//# sourceMappingURL=managed-process.d.ts.map