/** * Scheduler/Worker child execution authority port (2.14.0). * * Adapter implementation of `OrchestrationChildExecutionPort`. It wraps the * existing control services and never launches anything itself: * * - `SchedulerControlService` — durable scheduling intent. `executeChild` * enqueues at most one intent per child mission (the scheduler's intent id * is deterministic per mission, so repeated requests reuse the entry). * - `WorkerControlService` — status/terminal polling only. The port calls * the worker read model (`status`) and nothing else: never `start`, never * `runOnce`, never a launch path. * * Actual execution remains owned by Scheduler -> Assignment -> Worker * (`SchedulerControlService.runTick` -> `AssignmentControlService` -> * `WorkerControlService.runOnce`). * * Authority is verified, never defaulted: the durable parent mission names the * child execution authority (`MissionRequest.orchestrationExecution.childExecutionAuthority`) * and this port accepts a child only when that named authority — and the named * orchestration — match this port's `authority` exactly. * * `childStatus` is the port's read-only polling half of the * `OrchestrationChildExecutionPort` contract: it reports mission state, * terminal outcome, scheduling intent, and worker read-model snapshots, and * is the only method the parent lifecycle executor may use to observe a * child without requesting execution. */ import type { DurableMissionStore } from "../mission-domain/durable-store.js"; import type { SchedulerControlService } from "../scheduler/scheduler-control-service.js"; import type { WorkerControlService } from "../worker-daemon/worker-control-service.js"; import type { OrchestrationChildExecutionPort, OrchestrationChildExecutionReceipt, OrchestrationChildExecutionRequest, OrchestrationChildExecutionStatus, OrchestrationStore } from "./types.js"; export interface SchedulerWorkerChildExecutionPortOptions { /** Stable identity of this child execution authority (matched against the parent's durable contract). */ authority: string; /** Durable mission store for child/parent verification and terminal polling. */ missions: DurableMissionStore; /** Orchestration plan store for node verification and scheduling input. */ store: OrchestrationStore; /** Scheduler used to enqueue (and idempotently reuse) the scheduling intent. */ scheduler: SchedulerControlService; /** * Workers consulted for status/terminal polling only. The port never * starts a worker or triggers execution through it. */ workers?: readonly WorkerControlService[]; /** Clock for deterministic enqueue timestamps. */ now?: () => number; } export declare class SchedulerWorkerChildExecutionPort implements OrchestrationChildExecutionPort { private readonly _missions; private readonly _store; private readonly _scheduler; private readonly _workers; private readonly _now; readonly authority: string; constructor(options: SchedulerWorkerChildExecutionPortOptions); /** * Authorize execution of a materialized orchestration child. * * Verifies, in order: the plan exists and names the node; the node is * materialized and its durable identity matches the request; the child * mission's orchestration metadata matches; the parent's durable contract * names exactly this authority for this orchestration; the child is not * terminal. Only then does it enqueue the scheduling intent. It never * launches: execution proceeds through Scheduler -> Assignment -> Worker. */ executeChild(request: OrchestrationChildExecutionRequest): Promise; /** * Status/terminal polling for a materialized child, read from the existing * stores (durable mission store, scheduling intent store) and the worker * read model. Read-only: this never enqueues, assigns, or launches. */ childStatus(request: OrchestrationChildExecutionRequest): Promise; private decline; private _loadPlan; private _loadMission; } //# sourceMappingURL=child-execution-port.d.ts.map