import type { AcpEvent } from "./acp/types.js";
export interface StreamingSpawnReturn<TResult> {
    events: AsyncIterable<AcpEvent>;
    result: Promise<TResult>;
}
export type StreamingSpawnFn<TOptions, TResult> = (service: string, options: TOptions) => StreamingSpawnReturn<TResult>;
export type AutonomousOptions<TOptions> = TOptions & {
    service: string;
    maxTimeoutRetries?: number;
    activityTimeoutMs?: number;
};
/**
 * Drive a streaming spawn end-to-end: pipe ACP events through `renderAcpStream`
 * (which routes through `withAcpWriter` if bound) and return the final result.
 * Retries on activity timeout up to `maxTimeoutRetries` attempts.
 *
 * Both the SDK `spawn.autonomous` and the superintendent loop consume this —
 * callers supply a streaming spawn function whose `result` promise resolves
 * to their own result shape.
 */
export declare function spawnAutonomous<TOptions extends {
    activityTimeoutMs?: number;
}, TResult>(streamSpawn: StreamingSpawnFn<TOptions, TResult>, options: AutonomousOptions<TOptions>): Promise<TResult>;
