import type { JsonValue } from '../control-plane';
import type { CapacityPool, PoolBackend, RemoteBuild, RemoteBuildDriver } from './types';
export interface RemoteBuildTransport {
    provision(input: {
        backend: PoolBackend;
        pool: CapacityPool;
        build: RemoteBuild;
        tokenExpiresAt: string;
    }): Promise<{
        handle: string;
    }>;
    execute(input: {
        handle: string;
        spec: JsonValue;
        sourceSha: string;
        signal: AbortSignal;
        onLog(message: string): void;
    }): Promise<void>;
    publish(input: {
        handle: string;
        sourceSha: string;
    }): Promise<{
        artifactUri: string;
        artifactDigest: string;
        cacheKey?: string;
    }>;
    destroy(input: {
        handle: string;
    }): Promise<void>;
}
/** Provider-neutral orchestration over real server, ECS task, or ASG runner transports. */
export declare class TransportRemoteBuildDriver implements RemoteBuildDriver {
    readonly backend: PoolBackend;
    private transport;
    private handles;
    constructor(backend: PoolBackend, transport: RemoteBuildTransport);
    run({ build, pool, signal, log, }: {
        build: RemoteBuild;
        pool: CapacityPool;
        signal: AbortSignal;
        log(message: string): void;
    }): Promise<{
        artifactUri: string;
        artifactDigest: string;
        cacheKey?: string;
    }>;
    cleanup({ build }: {
        build: RemoteBuild;
        pool: CapacityPool;
    }): Promise<void>;
}
export declare const createServerBuildDriver: (transport: RemoteBuildTransport) => TransportRemoteBuildDriver;
export declare const createEcsBuildDriver: (transport: RemoteBuildTransport) => TransportRemoteBuildDriver;
export declare const createAsgBuildDriver: (transport: RemoteBuildTransport) => TransportRemoteBuildDriver;
