import type { AcpEvent } from "./acp/types.js"; export interface StreamingSpawnReturn { events: AsyncIterable; result: Promise; } export type StreamingSpawnFn = (service: string, options: TOptions) => StreamingSpawnReturn; export type AutonomousOptions = 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(streamSpawn: StreamingSpawnFn, options: AutonomousOptions): Promise;