/** * Scheduler Foundation — deterministic policy (2.12.0). * * Pure, side-effect-free executor selection. There is no scoring, ranking, or * random tie-breaking: candidates are total-ordered by `executorId`, and intents * are total-ordered by `priority` (descending), then `enqueuedAtMs` (FIFO), then * `intentId`. Identical scheduler state always yields an identical decision. */ import type { AssignabilityResult } from "../assignment/assignment-types.js"; import type { ExecutorLivenessStatus } from "../executor-registry/executor-registry-types.js"; import type { SchedulingIntentRecord, SchedulingPolicyMode } from "./scheduler-types.js"; /** One executor considered for a single intent, with its liveness observation. */ export interface ExecutorCandidate { executorId: string; status: ExecutorLivenessStatus; assignability: AssignabilityResult; /** Number of current (designation) assignments already held by this executor. */ currentAssignmentCount: number; } /** Deterministic intent processing order. */ export declare function orderPendingIntents(records: readonly SchedulingIntentRecord[]): SchedulingIntentRecord[]; /** Deterministic candidate ordering: ascending executorId. */ export declare function sortExecutorCandidates(candidates: readonly ExecutorCandidate[]): ExecutorCandidate[]; /** * Choose one executor deterministically. * * - `first-fit`: the first assignable executor by ascending executorId. * - `least-assigned`: the assignable executor with the fewest current * assignments, tie-broken by ascending executorId. */ export declare function chooseExecutor(candidates: readonly ExecutorCandidate[], mode: SchedulingPolicyMode): ExecutorCandidate | undefined; //# sourceMappingURL=policy.d.ts.map