import type { SpawnAgentInput } from "../types.js"; /** * v2.1 Phase 4j: pre-register the child agent PARENT-SIDE and persist the * plaintext token via the FileTokenStore vault so the spawned terminal's * SessionStart hook can resolve identity from disk. Removes the operator- * paste step that violated `feedback_spawn_must_carry_token`. * * v2.6.1: token no longer flows through the env-var spawn-arg channel — it * flows through the per-instance file vault at `/agents/ * .token`. The hook reads the vault first; on miss it falls back to * `register_agent` + capture + write. Eliminates the "spawn-agent.sh * directly without pre-mint" failure mode (3-min broken state) hit * 2026-05-04 during a builder spawn. * * Rollback: if the platform driver fails to launch, unregister the agent * row AND delete the vault entry so we don't leak a registered-but-not- * running phantom or a stale vault file blocking the next spawn. * * Name-collision: refuses cleanly if an agent with the requested name already * exists. Re-spawning on top would either silently rotate caps or force a * legacy-migration path we don't want to conflate with new-agent creation — * operator must unregister the existing one first. */ export declare function handleSpawnAgent(input: SpawnAgentInput): Promise<{ content: { type: "text"; text: string; }[]; isError: boolean; } | { content: { type: "text"; text: string; }[]; isError?: undefined; }>; //# sourceMappingURL=spawn.d.ts.map