/** * Mission Control Plane — service (2.9.0). * * The authoritative application/operator boundary over durable missions. * * Read models aggregate durable record fields only. Mutations compose the * existing DurableMissionCoordinator / DurableMissionDelegator / child-session * restore semantics; the control plane never re-implements fencing, heartbeat, * recovery, or session binding. Consumers use this service instead of reaching * into FileDurableMissionStore, session directories, or lock files. */ import type { AssignmentStore } from "../assignment/assignment-store.js"; import type { EvidenceArchive } from "../context-runtime/evidence-archive.js"; import { type EvidenceRetrievalOptions, type EvidenceRetrievalResult } from "../context-runtime/evidence-retrieval.js"; import { DurableMissionDelegator } from "../durable-delegation/durable-delegation.js"; import type { DurableMissionStore } from "../mission-domain/durable-store.js"; import type { HeartbeatTelemetry } from "../mission-domain/execution-heartbeat.js"; import type { ProcessMissionVerifier } from "../mission-domain/process-mission-executor.js"; import { type AttemptHistoryView, type BuildResumeLaunch, type MissionCancellationView, type MissionControlResumeOutcome, type MissionDetail, type MissionEvidenceRef, type MissionListOptions, type MissionListResult, type MissionOwnershipView, type MissionResultView, type MissionTreeNode, type Resumability } from "./mission-control-types.js"; export interface MissionControlServiceOptions { store: DurableMissionStore; /** Optional injected delegator (defaults to one built from `store`). */ delegator?: DurableMissionDelegator; /** Optional evidence archive for availability checks + bounded retrieval. */ evidenceArchive?: EvidenceArchive; /** Child AgentSession directory for explicit resume. */ sessionDir?: string; /** Optional assignment store for surfacing current designation views. */ assignmentStore?: AssignmentStore; /** Stable executor owner identity (defaults to a fresh host+UUID identity). */ ownerId?: string; now?: () => number; leaseDurationMs?: number; heartbeatIntervalMs?: number; renewalSafetyMarginMs?: number; attemptIdFactory?: () => string; leaseIdFactory?: () => string; } export declare class MissionControlService { private readonly _store; private readonly _delegator; private readonly _evidenceArchive?; private readonly _sessionDir?; private readonly _assignmentStore?; private readonly _now; private readonly _coordinatorOptions; private readonly _active; constructor(options: MissionControlServiceOptions); /** The underlying persistence port (read access for loaders/tests). */ get store(): DurableMissionStore; /** Stable executor owner identity used for local ownership comparison. */ get ownerId(): string; listMissions(options?: MissionListOptions): Promise; getMission(missionId: string): Promise; getAttempts(missionId: string): Promise; getOwnership(missionId: string): Promise; getResult(missionId: string): Promise; getEvidenceRefs(missionId: string): Promise; getResumability(missionId: string): Promise; getMissionTree(rootMissionId: string): Promise; /** Live local heartbeat telemetry, only when this process owns the execution. */ localHeartbeatTelemetry(missionId: string): HeartbeatTelemetry | undefined; /** * Bounded, integrity-verified evidence content retrieval. Delegates to the * existing retrieval architecture; returns `not-found` when no archive is * configured for this control plane. */ resolveEvidence(evidenceId: string, options?: EvidenceRetrievalOptions): Promise; /** * Explicitly resume a durable child mission through the existing fenced * ownership architecture. The mission must be structurally resumable and * must have a durable child session identity; other mission kinds expose * their limitation structurally rather than faking generic execution. */ resumeMission(missionId: string, options: { buildResumeLaunch: BuildResumeLaunch; signal?: AbortSignal; executorId?: string; verifier?: ProcessMissionVerifier; }): Promise; /** * Request cancellation for a mission owned by THIS process. A terminal * mission no-ops; a remote/other-process owner cannot be signalled live and * is reported honestly as `remote_owner` (no remote control protocol is * invented here). When a local execution is active it is aborted and the * fenced terminal CANCELLED write is awaited so `executorConfirmedStopped` * is accurate. */ cancelMission(missionId: string, reason?: string): Promise; /** Conservative restart reconciliation. Never auto-runs missions. */ recoverMission(options?: { now?: number; }): Promise>>; private _requireRecord; private _toSummary; private _currentAssignmentFor; private _toRequestView; private _currentAttemptView; private _toOwnership; private _leaseStatus; private _toResumability; private _toResultView; private _evidenceRefs; private _buildTree; } //# sourceMappingURL=mission-control-service.d.ts.map