import type { ModelTier } from './multi-agent.js';
export type { ModelTier } from './multi-agent.js';
/** Alias for ModelTier — explicit name used in SPEC-621 subtask routing. */
export type RecommendedModel = ModelTier;
/** Task type classification for routing decisions. */
export type TaskType = 'search' | 'generation' | 'architecture' | 'debugging' | 'refactor';
/** Input shape accepted by the subtask model assigner (SPEC-621). */
export interface SubtaskInput {
    /** Human-readable title of the subtask. */
    title: string;
    /** Optional difficulty score (1-5). Scores >= 4 elevate to opus. */
    difficulty?: number;
    /** Optional scope descriptor. "cross-module" elevates to opus. */
    scope?: string;
}
/** A decomposed subtask enriched with model routing and cost information (SPEC-621). */
export interface SubtaskWithModel {
    /** Unique task identifier. */
    id: string;
    /** Short human-readable title. */
    title: string;
    /** Full task description. */
    description: string;
    /** Acceptance criteria covered by this task. */
    criteria: string[];
    /** Files exclusively owned by this task. */
    ownedFiles: string[];
    /** IDs of tasks that must complete before this one. */
    dependencies: string[];
    /** Model tier recommended for this subtask. */
    recommendedModel: RecommendedModel;
    /** Estimated hours to complete this task. */
    estimatedHours: number;
    /** Whether this task can run in parallel with others. */
    canRunParallel: boolean;
    /** Approximate USD cost at the recommended model tier, e.g. "$0.003". */
    estimatedCost: string;
}
/** Operator for evaluating a routing rule condition. */
export type RuleOperator = 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'between';
/** Effort level suggestion for a task (SPEC-259). */
export type EffortSuggestion = 'low' | 'medium' | 'high' | 'ultrathink';
/** Raw + normalised complexity signals extracted from a spec or task. */
export interface ComplexitySignals {
    criteriaCount: number;
    fileCount: number;
    dependencyDepth: number;
    crossLayerCount: number;
    hasNewTypes: boolean;
    hasDBChanges: boolean;
    hasSecurityImplications: boolean;
    estimatedHours: number;
    isReadOnly: boolean;
    taskType: TaskType;
    /** Overall complexity score in the range [0, 1], computed from all signals. */
    overallScore: number;
    /** SPEC-259: Whether the task requires deep architectural reasoning (opus-level thinking). */
    requiresDeepReasoning?: boolean;
    /** SPEC-259: Effort level suggestion based on task complexity. */
    effortSuggestion?: EffortSuggestion;
}
/** Normalised (0-1) representation of every numeric signal. */
export interface NormalisedSignals {
    criteriaCount: number;
    fileCount: number;
    dependencyDepth: number;
    crossLayerCount: number;
    estimatedHours: number;
    hasNewTypes: number;
    hasDBChanges: number;
    hasSecurityImplications: number;
    isReadOnly: number;
}
/** Estimated token and USD cost for a model tier. */
export interface CostEstimate {
    estimatedTokens: number;
    estimatedUSD: number;
    breakdown: {
        input: number;
        output: number;
    };
}
/** An alternative model recommendation with its cost. */
export interface AlternativeModel {
    model: ModelTier;
    confidence: number;
    costEstimate: CostEstimate;
}
/** Full recommendation returned by the model router. */
export interface ModelRoutingRecommendation {
    model: ModelTier;
    confidence: number;
    reasoning: string[];
    costEstimate: CostEstimate;
    alternatives: AlternativeModel[];
    ultrathinkSuggested?: boolean;
    ultrathinkReason?: string;
    effortLevelCommand?: string;
    thinkingToggle?: string;
    effortLevel?: 'low' | 'medium' | 'high';
}
/** Recorded outcome of using a specific model on a task. */
export interface ModelOutcome {
    taskSignature: string;
    modelUsed: ModelTier;
    success: boolean;
    durationMs: number;
    tokensUsed: number;
    qualityScore?: number;
    timestamp: string;
}
/** Single condition within a routing rule. */
export interface RuleCondition {
    signal: string;
    operator: RuleOperator;
    value: number | boolean | string | [number, number];
}
/** A deterministic routing rule loaded from config. */
export interface RoutingRule {
    id: string;
    name: string;
    conditions: RuleCondition[];
    result: ModelTier;
    weight: number;
}
/** Shape of the model-routing-rules.json config file. */
export interface RoutingRulesConfig {
    version: string;
    rules: RoutingRule[];
}
/** Input accepted by the recommend_model MCP tool. */
export interface RecommendModelInput {
    specId?: string;
    taskDescription?: string;
    signals?: Partial<ComplexitySignals>;
}
/** Pricing entry from the ai-model-pricing.json config. */
export interface PricingEntry {
    id: string;
    inputPricePerMillion: number;
    outputPricePerMillion: number;
}
/** Partial signals that can be provided directly by the user. */
export type PartialSignals = Partial<ComplexitySignals>;
/** Result of evaluating a single routing rule against signals. */
export interface RuleMatch {
    rule: RoutingRule;
    /** Fraction of conditions that matched (0-1). */
    matchRatio: number;
    /** Effective confidence = matchRatio * rule.weight. */
    confidence: number;
}
/** Output of the rules engine evaluation. */
export interface RulesEngineResult {
    model: ModelTier;
    confidence: number;
    reasoning: string[];
    alternatives: {
        model: ModelTier;
        confidence: number;
    }[];
    effortLevel?: 'low' | 'medium' | 'high';
    ultrathinkSuggested?: boolean;
    ultrathinkReason?: string;
    effortLevelCommand?: string;
    thinkingToggle?: string;
}
/** Outcome-based tier suggestion for a task signature. */
export interface HistoricalAdjustment {
    /** Adjusted model tier (may differ from rules engine by at most 1). */
    adjustedModel: ModelTier;
    /** Reason for the adjustment. */
    reason: string;
    /** Whether any adjustment was made. */
    adjusted: boolean;
}
/** SPEC-640: Computed health signals for a file being modified by a spec. */
export interface CodeHealthSignals {
    /** Cyclomatic complexity of the file (approximated by counting decision points). */
    cyclomaticComplexity: number;
    /** Test coverage percentage (0-100), null if unknown. */
    coveragePercent: number | null;
    /** Number of callers of public functions in this file (approximated). */
    callerCount: number;
    /** Whether this file is tagged as public API surface. */
    isPublicApi: boolean;
}
/** SPEC-640: Result of adjusting a model tier based on code health signals. */
export interface HealthAdjustedRoute {
    originalModel: ModelTier;
    adjustedModel: ModelTier;
    rationale: string;
}
//# sourceMappingURL=model-routing.d.ts.map