/** * Scheduler Control Service (2.12.0). * * The authoritative application/operator boundary over durable scheduling * intent. It consumes the existing primitives — DurableMissionStore for mission * lifecycle, ExecutorControlService for executor liveness, and * AssignmentControlService for designation — and produces a durable Assignment * via a deterministic policy. It never reimplements those primitives. * * - `enqueueIntent` records pending scheduling intent for a mission. * - `cancelIntent` withdraws a pending/unschedulable intent. * - `previewTick` read-only deterministic decision preview (no mutation). * - `runTick` runs one scheduler pass: eligible missions -> assignable * executors -> deterministic policy -> durable assignment. * * The output of scheduling is an Assignment. Execution, worker daemons, remote * invocation, acceptance, execution start, live migration, and resource * reservation are explicitly out of scope and remain separate authority domains. */ import type { AssignmentControlService } from "../assignment/assignment-control-service.js"; import type { CapabilityRouteEvaluator } from "../capability-routing/route-types.js"; import type { ExecutorControlService } from "../executor-registry/index.js"; import { type DurableMissionStore } from "../mission-domain/durable-store.js"; import { type SchedulingIntentStore } from "./scheduler-store.js"; import { type EnqueueSchedulingIntentInput, type EnqueueSchedulingIntentOutcome, type SchedulingIntentDetail, type SchedulingIntentListOptions, type SchedulingIntentListResult, type SchedulingIntentRecord, type SchedulingPolicy, type SchedulingTickResult } from "./scheduler-types.js"; export interface SchedulerControlServiceOptions { store: SchedulingIntentStore; missions: DurableMissionStore; executors: ExecutorControlService; assignments: AssignmentControlService; policy?: SchedulingPolicy; now?: () => number; /** Intent id factory; default is the deterministic per-mission id. */ intentIdFactory?: (missionId: string) => string; tickIdFactory?: () => string; /** * Optional Capability Router. When wired, the scheduler derives executor * eligibility from the router's route candidates (execution mode, remote * target health) instead of bare executor capability+ONLINE matching. The * router reports feasibility; the scheduler still selects among eligible * candidates via policy and creates the durable Assignment. */ router?: CapabilityRouteEvaluator; } export declare class SchedulerControlService { private readonly _store; private readonly _missions; private readonly _executors; private readonly _assignments; private readonly _policy; private readonly _now; private readonly _intentIdFactory; private readonly _tickIdFactory; private readonly _router?; constructor(options: SchedulerControlServiceOptions); get store(): SchedulingIntentStore; listIntents(options?: SchedulingIntentListOptions): Promise; getIntent(intentId: string): Promise; getIntentForMission(missionId: string): Promise; enqueueIntent(missionId: string, input?: EnqueueSchedulingIntentInput): Promise; cancelIntent(missionId: string): Promise; /** Read-only deterministic decision preview. Never mutates any store. */ previewTick(options?: { now?: number; }): Promise; /** Run one scheduler pass and persist decisions. */ runTick(options?: { now?: number; }): Promise; private _tick; private _decideForIntent; private _decideExecutor; private _decideExecutorRouted; private _unschedulableReason; private _decideExecutorLocal; private _reconcileAssignmentRace; private _markAssigned; private _markUnschedulable; private _unwrapTransition; private _intentIdFor; private _requireIntent; private _requireMission; private _assertMissionId; private _unwrapMutation; private _toSummary; private _toDetail; } //# sourceMappingURL=scheduler-control-service.d.ts.map