import { type AutonomousSpawnOptions } from "./autonomous.js";
import type { AcpEvent, SpawnOptions, SpawnResult, SpawnRetryOptions } from "./types.js";
/**
 * Spawns an agent with optional streaming.
 *
 * Returns both:
 * - `events`: an async stream of ACP events (empty when the provider doesn't support streaming)
 * - `result`: a promise resolving to the final SpawnResult
 *
 * @example
 * ```typescript
 * import { spawn } from "poe-code"
 *
 * const { events, result } = spawn("codex", "Fix the bug in auth.ts")
 *
 * for await (const e of events) {
 *   // render or log events
 * }
 *
 * const final = await result
 * console.log(final.exitCode)
 * ```
 */
export declare function spawn(service: string, prompt: string, options?: Omit<SpawnOptions, "prompt">): SpawnHandle;
export declare function spawn(service: string, options: SpawnOptions): SpawnHandle;
export declare namespace spawn {
    var pretty: (service: string, promptOrOptions: string | SpawnOptions, maybeOptions?: Omit<SpawnOptions, "prompt">) => Promise<SpawnResult>;
    var autonomous: (service: string, promptOrOptions: string | Omit<AutonomousSpawnOptions, "service">, maybeOptions?: Omit<AutonomousSpawnOptions, "prompt" | "service">) => Promise<SpawnResult>;
    var parallel: (calls: import("../../packages/agent-spawn/dist/index.js").SpawnParallelCall<string, SpawnOptions, SpawnResult>[], options?: import("../../packages/agent-spawn/dist/index.js").SpawnParallelOptions) => Promise<SpawnResult[]>;
    var retry: (service: string, options: SpawnOptions, retryOptions: SpawnRetryOptions) => {
        events: AsyncIterable<AcpEvent>;
        result: Promise<SpawnResult>;
    };
}
type SpawnHandle = {
    events: AsyncIterable<AcpEvent>;
    result: Promise<SpawnResult>;
    unstable_setSessionModel?(model: string): Promise<void>;
};
export {};
