import type { LoopMessage, AgentLoopConfig } from "./types.js"; export type AgentStatus = "running" | "completed" | "failed" | "cancelled"; export interface AgentHandle { readonly id: string; readonly status: AgentStatus; readonly result: Promise; send(message: string): void; cancel(): void; onEvent(handler: (event: LoopMessage) => void): () => void; } export interface SpawnAgentOptions { prompt: string; config: AgentLoopConfig; id?: string; } export declare function spawnAgent(opts: SpawnAgentOptions): AgentHandle; //# sourceMappingURL=background-agent.d.ts.map