export interface SubagentSpec {
    tenantId: string;
    task: string;
    parentSessionId?: string;
    parentCustomerId?: string;
    timeoutSeconds?: number;
    metadata?: Record<string, unknown>;
}
export interface SubagentRun {
    id: string;
    tenant_id: string;
    parent_session_id: string | null;
    parent_customer_id: string | null;
    task: string;
    status: 'queued' | 'running' | 'completed' | 'failed' | 'cancelled' | 'timeout';
    result_excerpt: string | null;
    error: string | null;
    metadata: Record<string, unknown>;
    started_at: string | null;
    finished_at: string | null;
    duration_ms: number | null;
    timeout_seconds: number;
    cost_usd: number;
    created_at: string;
}
/**
 * Spawn a subagent. Returns immediately with the run id. Caller polls
 * /api/subagents/:id or listens to the journal for the announce.
 */
export declare function spawnSubagent(spec: SubagentSpec): Promise<SubagentRun>;
export declare function listSubagents(tenantId: string, limit?: number): Promise<SubagentRun[]>;
export declare function getSubagent(tenantId: string, id: string): Promise<SubagentRun | null>;
export declare function cancelSubagent(tenantId: string, id: string): Promise<boolean>;
export declare function getActiveCount(): number;
//# sourceMappingURL=runner.d.ts.map