import { Hono } from 'hono'; import { type SpawnExecutionMode } from '../../services/spawn-bridge.js'; import { type SpawnRelayTarget } from '../../services/spawn-session.js'; type SpawnBody = { taskId: string; runId: string; phase: string; goal: string; adapterId?: string; mode?: SpawnExecutionMode; delegationDepth?: number; guardrails?: { maxConcurrent?: number; maxPerTask?: number; maxDelegationDepth?: number; }; /** Chat session that originated a detached spawn; correlates lifecycle events to the chat UI. */ parentChatSessionId?: string; /** Human-friendly label surfaced in the chat UI. */ label?: string; /** Sibling spawn to build and launch once this spawn settles. See SpawnRelayTarget. */ relayTarget?: SpawnRelayTarget; }; /** * Validates a spawn body and launches a detached (fire-and-forget) spawn. * Shared by POST /spawn/detach and the chat-facing POST /chat/delegate wrapper so * both lanes route through the same guardrails and correlation plumbing. Returns * 202 with the session summary, or 400 on validation failure. */ export declare function launchDetachedSpawn(cwd: string, body: SpawnBody): Promise<{ status: 202 | 400; payload: Record; }>; export declare function spawnRoute(cwd: string): Hono; export {};