import type { ModelTier } from './multi-agent.js';
export type { ModelTier } from './multi-agent.js';
/** Task type classification for routing decisions. */
export type TaskType = 'search' | 'generation' | 'architecture' | 'debugging' | 'refactor';
/** Operator for evaluating a routing rule condition. */
export type RuleOperator = 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'between';
/** 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;
}
/** 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[];
}
/** 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;
    }[];
}
/** 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;
}
//# sourceMappingURL=model-routing.d.ts.map