/** * Mission Runtime — the Reliability Kernel's runtime facade. * * Owns the durable Mission Contract, Requirement Ledger, and Mission Execution * State Machine (all from the Long-Horizon subsystem) and exposes a small, * Jensen-owned API for the agent loop: * * - decode/validate model actions (validator is separate; see action-validator) * - record deterministic verification evidence (authoritative, never agent-claim) * - advance acceptance criteria to SATISFIED only from authoritative evidence * - run the Completion Gate on FINAL_CANDIDATE * - serialize/deserialize durably (survives resume/compaction/restart) * * The model interacts only through the untrusted context; the runtime holds the * trusted mutation/validation contexts that authorize authoritative evidence and * SATISFIED transitions. */ import type { MissionConstraint, MissionContractV1, MissionExecutionRecordV1, MissionExecutionTransitionKind, RequirementLedgerV1 } from "../long-horizon/index.js"; import { type MissionDefinitionInput } from "./mission-contract-factory.js"; import { type ReliabilityRecorder } from "./telemetry.js"; import type { CompletionGateResult, CriterionSource, FailureEvent, MissionEvidence, ReliabilityPhase, RuntimeAcceptanceCriterion, VerificationResult, VerificationSpec } from "./types.js"; export declare const MISSION_RUNTIME_SCHEMA_VERSION: 1; export declare const RUNTIME_PRINCIPAL = "jensen-runtime"; export declare const COMPLETION_PRINCIPAL = "completion-operator"; interface CriterionMeta { id: string; description: string; source: CriterionSource; verification: VerificationSpec; } export interface MissionRuntimeDocumentV1 { schemaVersion: 1; missionId: string; goal: string; contract: MissionContractV1; ledger: RequirementLedgerV1; execution: MissionExecutionRecordV1; criteria: CriterionMeta[]; constraints: MissionConstraint[]; createdAtMs: number; updatedAtMs: number; } export declare class MissionRuntime { private _contract; private _ledger; private _execution; private readonly _criteria; private readonly _constraints; private readonly _createdAtMs; private _updatedAtMs; private readonly _recorder; private readonly _failures; private readonly _trustedMutation; private readonly _trustedValidation; private constructor(); static create(definition: MissionDefinitionInput, options?: { recorder?: ReliabilityRecorder; now?: number; }): MissionRuntime; static deserialize(document: unknown, options?: { recorder?: ReliabilityRecorder; now?: number; }): MissionRuntime; get missionId(): string; get goal(): string; get contract(): MissionContractV1; get ledger(): RequirementLedgerV1; get execution(): MissionExecutionRecordV1; get phase(): ReliabilityPhase; get recorder(): ReliabilityRecorder; get failures(): readonly FailureEvent[]; get constraints(): readonly MissionConstraint[]; criterionView(): RuntimeAcceptanceCriterion[]; private _criterionStatus; /** * Record the outcome of a deterministic verification for a criterion. * A passing verification advances the criterion to SATISFIED using only * authoritative evidence; a failing verification records a fail evidence * and leaves the criterion unsatisfied (the model cannot self-certify). */ recordVerification(criterionId: string, result: VerificationResult): void; /** * Record an observed tool-execution outcome as mission evidence (not tied to * a specific criterion). Jensen records the observed facts; the model cannot * fabricate them. */ recordToolEvidence(evidence: MissionEvidence): void; private _nextEvidenceId; private _advanceToSatisfied; /** * When a previously-satisfied criterion fails verification, transition it out * of SATISFIED so the completion gate requires fresh authoritative evidence. */ private _regressIfSatisfied; private _nextTowardSatisfied; private _txId; proposeFinalCandidate(): CompletionGateResult; /** Transition the execution state machine by kind. */ transition(kind: MissionExecutionTransitionKind): { ok: boolean; error?: string; }; /** Approve completion through the execution state machine (COMPLETED). */ approveCompletion(): { ok: boolean; error?: string; }; block(reason: string): { ok: boolean; error?: string; }; /** Compact, token-disciplined mission state for the model context. */ summarizeForModel(): string; serialize(): MissionRuntimeDocumentV1; toJSON(): string; private _touch; private _recordFailure; } /** Convenience: new mission id. */ export declare function newMissionId(): string; export {}; //# sourceMappingURL=mission-runtime.d.ts.map