/** * Production `DecompositionRunner` backed by the real `AgentManager`. * * This is the concrete driver that spawns a bounded, READ-ONLY `planner` * agent through the existing agents machinery and polls it to completion. It * lives in the agents layer (not `core`) precisely so `core/plan-decomposition.ts` * can stay free of any agent-machinery import and be unit-tested against a * stubbed runner. The planning agent it spawns is an ordinary `AgentManager` * agent, so it surfaces in the fleet like any other and honours kill/steer; * an external kill lands here as a `'cancelled'` result → heuristic fallback. * * Bounds are enforced cooperatively by polling `AgentRecord.usage`: * - wall-clock: `cancel()` once `now() >= start + wallTimeoutMs` * - token ceiling: `cancel()` once input+output tokens exceed the ceiling * - turns: `cancel()` once `usage.turnCount` exceeds `maxTurns` * All three collapse to a `'cancelled'` run result (with a `detail`), which the * service turns into an honest `fallbackReason`. */ import type { AgentManager } from '../tools/agent/manager.js'; import type { DecompositionRunner } from '../core/plan-decomposition.js'; /** The read-only tool set the planner template resolves to. Kept in lockstep * with AGENT_TEMPLATES.planner and passed with restrictTools for a hard cap. */ export declare const PLANNER_DECOMPOSITION_TOOLS: readonly ["read", "find", "analyze", "inspect"]; export interface AgentManagerDecompositionRunnerDeps { agentManager: Pick; /** Injectable clock (tests). */ now?: () => number; /** Injectable sleep (tests). */ sleep?: (ms: number) => Promise; /** Poll interval in ms (default 50). */ pollIntervalMs?: number; /** Optional model registry key override for the planner agent. */ model?: string | undefined; /** Optional provider override for the planner agent. */ provider?: string | undefined; } export declare function createAgentManagerDecompositionRunner(deps: AgentManagerDecompositionRunnerDeps): DecompositionRunner; //# sourceMappingURL=planner-decomposition-runner.d.ts.map