export interface SpawnGuardBlock { block: true; reason: string; } /** Deterministic guard against wrong-agent spawns during an active senai run. * * The 2026-08-20 incident: the parent spawned `agent: "planner"` — the bare * role name — which loaded pi's built-in read-only planner instead of the * mapped generated agent. The built-in has no write tool, so the planner * could never write plan.md and the run stalled. Prompt rules alone did not * stop this, so the tool call is now blocked with the correct name. * * Returns a block object, or undefined to allow the call. Never throws: * any config/state problem means the guard steps aside. */ export declare function guardSpawnCall(toolName: string, input: Record | undefined, cwd: string): SpawnGuardBlock | undefined;