/** * Capability Routing — deterministic router (2.15.0). * * Turns structured Mission requirements + a registry snapshot + worker liveness * + remote target health into explainable route candidates. The pure evaluator * (`evaluateRouteCandidates`) has no I/O and no process/transport side effects, * so requirements+snapshots → candidates is independently testable (§72). The * `CapabilityRouter` service gathers the snapshots and deduplicates remote * probes per target within a single evaluation (§56). * * This router never chooses the final executor. The Scheduler consumes the * candidates and applies its own deterministic policy. It also never routes * inference and never models shared-Qwen capacity. */ import type { MissionRequirements } from "../assignment/assignment-types.js"; import type { ExecutorControlService } from "../executor-registry/index.js"; import type { RemoteTargetRegistry } from "../remote-execution/remote-target-registry.js"; import type { RemoteTargetHealth } from "../remote-execution/remote-target-types.js"; import type { CapabilityRouteEvaluator, ExecutionRoute, RouteCandidate, RoutingEvaluation } from "./route-types.js"; export interface EvaluateRoutesInput { requirements: MissionRequirements; routes: readonly ExecutionRoute[]; now: number; } /** * Evaluate one fully-resolved route against hard requirements and availability. * Platform/arch for remote routes are authoritative from the target; the * executor's declared capabilities are merged only for execution capability * matching (never platform inference for a remote physical machine). */ export declare function evaluateRouteCandidate(route: ExecutionRoute, requirements: MissionRequirements): RouteCandidate; /** Deterministic candidate evaluation: ascending executorId ordering. */ export declare function evaluateRouteCandidates(input: EvaluateRoutesInput): RouteCandidate[]; export interface CapabilityRouterOptions { executors: ExecutorControlService; /** Optional target registry for resolving remote route platform/arch + probes. */ targets?: RemoteTargetRegistry; /** Injected health provider (deterministic tests); defaults to target probe. */ healthProvider?: (targetId: string) => Promise; now?: () => number; } export declare class CapabilityRouter implements CapabilityRouteEvaluator { private readonly _executors; private readonly _targets?; private readonly _healthProvider?; private readonly _now; constructor(options: CapabilityRouterOptions); /** * Gather registry/worker/target snapshots, resolve remote routes (platform, * arch, transport from the target) and deduplicate target probes, then run * the pure evaluator. */ evaluate(input: { requirements: MissionRequirements; missionId?: string; }): Promise; private _resolveTarget; private _probe; } //# sourceMappingURL=capability-router.d.ts.map