/** * Executor Control Service (2.10.0). * * The authoritative application/operator boundary over executor identity and * runtime liveness. Read models aggregate durable records only and never mutate * them (liveness is computed from `now` without persisting). Mutations compose * the ExecutorRegistryStore atomic RMW and are fenced by runtime proof. * * This is NOT a scheduler. Registration means "this executor exists / is alive / * can do X"; it never means "assign a mission here". */ import type { AssignmentStore } from "../assignment/assignment-store.js"; import { type ExecutorRegistryStore } from "./executor-registry-store.js"; import { type ActivateExecutorInput, type ExecutorActivationOutcome, type ExecutorCapabilities, type ExecutorDeactivateOutcome, type ExecutorDetail, type ExecutorHeartbeatOutcome, type ExecutorListOptions, type ExecutorListResult, type ExecutorRecord, type ExecutorRetireOutcome, type ExecutorRuntimeMutationInput, type ExecutorRuntimeProof, type RegisterExecutorInput } from "./executor-registry-types.js"; export interface ExecutorControlServiceOptions { store: ExecutorRegistryStore; now?: () => number; /** Default runtime heartbeat expiry window. */ expiryMs?: number; /** Optional assignment store for surfacing real current-assignment views. */ assignmentStore?: AssignmentStore; /** Runtime instance id factory (default: UUID, never a PID). */ runtimeInstanceIdFactory?: () => string; ownerIdFactory?: () => string; } export declare const DEFAULT_EXECUTOR_HEARTBEAT_EXPIRY_MS = 30000; export declare class ExecutorControlService { private readonly _store; private readonly _now; private readonly _expiryMs; private readonly _assignmentStore?; private readonly _runtimeInstanceIdFactory; private readonly _ownerIdFactory; constructor(options: ExecutorControlServiceOptions); get store(): ExecutorRegistryStore; listExecutors(options?: ExecutorListOptions): Promise; getExecutor(executorId: string): Promise; /** Register stable definition. Idempotent for a compatible definition. */ registerExecutor(input: RegisterExecutorInput): Promise<{ executorId: string; status: "created" | "idempotent"; record: ExecutorRecord; }>; /** Atomically activate a runtime incarnation, fencing any stale predecessor. */ activateExecutor(executorId: string, input?: ActivateExecutorInput): Promise; /** Fenced runtime heartbeat. A lapsed current runtime must be re-activated. */ heartbeatExecutor(proof: ExecutorRuntimeProof, input?: ExecutorRuntimeMutationInput): Promise; /** Fenced capability update (does not change epoch; requires online runtime). */ updateRuntimeCapabilities(proof: ExecutorRuntimeProof, capabilities: ExecutorCapabilities): Promise; /** Clean shutdown of the current runtime. Epoch is preserved. */ deactivateExecutor(proof: ExecutorRuntimeProof): Promise; /** Retire stable identity. Blocks future activation; never deletes history. */ retireExecutor(executorId: string): Promise; private _requireRecord; private _assertExecutorId; private _assertProof; private _assertNotRetired; private _assertRuntimeProof; private _unwrapMutation; private _toLiveness; private _mergeCapabilities; private _hasCapability; private _toSummary; } //# sourceMappingURL=executor-control-service.d.ts.map