/** * Route classification and compression for governed agent runs. * * Decides whether a task needs manager/planner orchestration or can go * directly to a worker, based on task complexity signals. Prevents * wasted coordination cost (Pre Work Burn) on simple tasks. */ import type { RoutingMode, RoutingPolicy } from "../contracts/index.js"; export interface RouteDecision { selectedMode: RoutingMode; confidence: number; expectedCostUsd: number; expectedPreworkBurnPct: number; reason: string[]; blockedSteps: string[]; compressed: boolean; compressionSummary?: string; } export interface RouteClassificationInput { objective: string; verificationPlan: string[]; repoRoot?: string; allowedPaths?: string[]; deniedPaths?: string[]; budgetUsd: number; policy?: Partial; /** Number of files the task references or is scoped to. */ scopedFileCount?: number; /** Historical success rate for similar tasks with direct execution (0-1). */ historicalDirectSuccessRate?: number; } export declare function classifyRoute(input: RouteClassificationInput): RouteDecision; /** * Checks whether a run's Pre Work Burn exceeds the routing policy limits. * Returns a block reason if exceeded, undefined if within bounds. */ export declare function evaluatePreworkBurnPolicy(preworkCostUsd: number, totalCostUsd: number, policy?: Partial): { exceeded: boolean; reason?: string; };