import { Type } from "typebox"; /** Kinds of work a routed task can be, each described for the router in plain words. */ export declare const WORK_KINDS: { readonly computer_use: "Operating desktop or mobile apps through screenshots, clicks and typing"; readonly coding: "Writing, changing or debugging code in a repository"; readonly code_review: "Reviewing code or systems for defects or security problems"; readonly codebase_lookup: "Finding files, definitions or facts in a codebase without changing anything"; readonly research: "Reading documents or the web and summarizing findings"; readonly business_workflow: "Multi-step work across business tools or APIs"; readonly math_science: "Math, physics or scientific computation"; readonly writing: "Writing or editing prose, documents or slides"; }; export declare const DIFFICULTY_LEVELS: { readonly trivial: "One obvious step"; readonly easy: "A few simple steps"; readonly moderate: "Several steps with some judgment"; readonly hard: "Many dependent steps, debugging or verification"; readonly very_hard: "Long work across many tools with frequent recovery"; }; export declare const MISTAKE_COST_LEVELS: { readonly negligible: "Easily noticed and redone"; readonly low: "Minor rework"; readonly moderate: "Wasted time or a confusing result"; readonly high: "Broken builds, bad data or wrong conclusions"; readonly severe: "Security, money, data loss or production impact"; }; export type WorkKind = keyof typeof WORK_KINDS; export type Difficulty = keyof typeof DIFFICULTY_LEVELS; export type MistakeCost = keyof typeof MISTAKE_COST_LEVELS; /** What a caller may state about a task so routing need not infer it. Every field is optional. */ export interface TaskNeeds { readonly work?: WorkKind; readonly difficulty?: Difficulty; readonly mistakeCost?: MistakeCost; readonly needsImages?: boolean; readonly longContext?: boolean; readonly latencySensitive?: boolean; } export type ResolvedTaskNeeds = Required; /** Tool and stage schema for caller-stated task needs. */ export declare const TaskNeedsSchema: Type.TObject<{ work: Type.TOptional>; difficulty: Type.TOptional>; mistakeCost: Type.TOptional>; needsImages: Type.TOptional; longContext: Type.TOptional; latencySensitive: Type.TOptional; }>; /** Validate caller-stated needs. Unknown keys and values fail rather than being guessed. */ export declare function parseTaskNeeds(value: unknown): TaskNeeds | undefined; /** Later stated needs win field by field (for example a call over an agent default). */ export declare function mergeTaskNeeds(...needs: readonly (TaskNeeds | undefined)[]): TaskNeeds | undefined; export interface NeedsQuestion { readonly id: "work" | "difficulty" | "mistake_cost" | "needs_images" | "long_context" | "latency_sensitive"; readonly instructions: string; readonly criteria: Record; } /** Questions for only the needs the caller did not state, in a fixed order. */ export declare function missingNeedsQuestions(stated: TaskNeeds | undefined): NeedsQuestion[]; /** * Combine stated needs with the router's answers keyed by question id. Computer * use always works from screenshots, so it needs image input unless the caller * explicitly said otherwise. */ export declare function resolveTaskNeeds(stated: TaskNeeds | undefined, answers: Record): ResolvedTaskNeeds; /** 0 for the easiest or cheapest-to-get-wrong task, 1 for the hardest or costliest. */ export declare function taskDemand(needs: ResolvedTaskNeeds): number; /** * Effort for a model from the task's difficulty, one level lower (never below * `minimal`) when speed matters: the supported level closest to the target, * preferring the lower one on a tie. `null` for models without * configurable reasoning. */ export declare function effortForDifficulty(efforts: readonly (string | null)[], difficulty: Difficulty, latencySensitive?: boolean): string | null; //# sourceMappingURL=model-routing-needs.d.ts.map