/**
 * RuntimeRouter — intent-aware runtime selection with evidence pass history.
 *
 * Routes capsules based on:
 * 1. NodeIntent (research, planning, coding, debugging, etc.)
 * 2. RuntimeScore (quality, cost, latency, evidence pass rate)
 * 3. Historical evidence pass rates from graph-state memory
 * 4. Fallback chain with runtime.supports() check
 */
import type { AgentRuntime, AgentRunResult, AgentTask } from "./agent-runtime.js";
import type { ContextCapsule } from "./context-capsule.js";
export type NodeIntent = "research" | "planning" | "coding" | "debugging" | "refactor" | "review" | "test-generation" | "documentation" | "shell-operation";
export interface RuntimeScore {
    readonly runtime: string;
    readonly qualityScore: number;
    readonly costScore: number;
    readonly latencyScore: number;
    readonly evidencePassRate: number;
    readonly recentFailurePenalty: number;
}
export interface RuntimeRouterOptions {
    readonly runtimes?: AgentRuntime[];
    readonly fallbackChain?: string[];
    readonly memoryPath?: string;
}
export interface RuntimeRouteDecision {
    readonly runtime: AgentRuntime;
    readonly reason: string;
    readonly fallbacks: AgentRuntime[];
    readonly intent: NodeIntent;
    readonly scores: RuntimeScore[];
}
interface EvidenceHistoryEntry {
    readonly runtime: string;
    readonly intent: string;
    readonly passed: boolean;
    readonly timestamp: string;
    readonly nodeId: string;
}
export declare function createRuntimeRouter(options?: RuntimeRouterOptions): {
    select: (capsule: ContextCapsule) => RuntimeRouteDecision;
    selectByIntent: (capsule: ContextCapsule, history: EvidenceHistoryEntry[]) => RuntimeRouteDecision;
    runNode: (capsule: ContextCapsule, signal: AbortSignal) => Promise<AgentRunResult>;
    execute: (task: AgentTask, signal?: AbortSignal) => Promise<AgentRunResult>;
    executeTask: (task: AgentTask, capsule: ContextCapsule, signal: AbortSignal) => Promise<AgentRunResult>;
    classifyIntent: (capsule: ContextCapsule) => NodeIntent;
    listRuntimes(): AgentRuntime[];
    setRuntimes(nextRuntimes: AgentRuntime[]): void;
    invalidateCache: () => void;
};
export {};
