import { type SpawnRelayTarget, type SpawnSessionEvent } from './spawn-session.js'; /** * Bridges the shared spawn event bus (`onSessionEvent`) to a new sibling * spawn: when a source spawn that declared a `relayTarget` completes (or * fails, if opted in), builds and launches the target spawn with the * source's result folded into its goal. Only forward-relay to a not-yet- * started target is supported — injecting into an already-running sibling * is out of scope (phase-spawns have no resume primitive). * * Idempotent per process, mirroring chat-auto-resume.ts's registration guard. */ export declare function registerSpawnRelay(cwd: string): () => void; /** * Folds the source spawn's result into the target's goal string (rendered * under `## Goal` by renderPacketAsPrompt). Mirrors chat-auto-resume.ts's * composeWakeMessage, adapted to prepend the target's own goal rather than * stand alone, and to frame the relayed content as sibling input rather than * the target's own prior output. */ export declare function composeRelayGoal(event: SpawnSessionEvent, target: SpawnRelayTarget): string;