/** * Certification planning (T2.4). * * A certification is a different claim from a remediation: remediation asserts "this correction was * applied", certification asserts "the corrected state was independently validated". They therefore * use separate record types, separate archives and separate anchors — but the same transaction * discipline, because both are immutable evidence that must never be silently rewritten. * * Nothing here writes. `planCertification` is a warrant computed from observed state; only * `applyCertificationTransaction` may act on it, and only while holding the state-writer lock. */ import type { CertificationAnchor, ScopeRecertificationV1, SprintFile } from '../types'; export declare const CERTIFICATION_MANIFEST_KIND = "scope-certification-manifest"; export declare const CERTIFICATION_MANIFEST_SCHEMA_VERSION = 1; export declare const CERTIFICATION_TRANSACTION_STATUS: { /** No record and no anchor on disk — this certificate has never been published. */ readonly NOT_APPLIED: "NOT_APPLIED"; /** The immutable record exists but the live anchor does not: persistence was interrupted. */ readonly PREPARED: "PREPARED"; /** Record, anchor and commitment all agree. */ readonly APPLIED: "APPLIED"; /** Record and anchor exist but disagree with each other. */ readonly DIVERGED: "DIVERGED"; /** The record is unreadable or fails the certification contract. */ readonly CORRUPT: "CORRUPT"; /** The record declares a schema version this runtime cannot evaluate. */ readonly UNSUPPORTED_VERSION: "UNSUPPORTED_VERSION"; }; export type CertificationTransactionStatus = (typeof CERTIFICATION_TRANSACTION_STATUS)[keyof typeof CERTIFICATION_TRANSACTION_STATUS]; export interface CertificationPlanOptions { scope: string; manifestPath: string; now: string; kyroVersion: string; } export interface CertificationPlan { scope: string; certificationId: string; recordPath: string; sprintPath: string; record: ScopeRecertificationV1; commitment: string; anchor: CertificationAnchor; projectedSprint: SprintFile; /** Human-readable description of each evidence entry that was re-verified from the workspace. */ evidenceSummary: string[]; transactionStatus: CertificationTransactionStatus; transactionDetail: string; } export declare function certificationsDir(scope: string): string; export declare function certificationRecordPath(scope: string, certificationId: string): string; /** Scope-relative path stored in the live anchor. Bound to the id so neither can drift alone. */ export declare function relativeCertificationPath(certificationId: string): string; export declare function readCertificationRecord(scope: string, certificationId: string): ScopeRecertificationV1 | null; /** * Classify a certification id's on-disk transaction. PREPARED means the record was persisted but * the live anchor was not — an interrupted write, never a certificate. */ export declare function inspectCertificationTransaction(scope: string, certificationId: string, expectedCommitment: string | null): { status: CertificationTransactionStatus; detail: string; }; /** * Build the certification warrant. Every refusal here happens before any write, so a rejected * certification leaves the scope byte-identical. */ export declare function planCertification(options: CertificationPlanOptions): CertificationPlan; /** * Resolve whether a valid certificate exists for a given chain head. This is what makes the * `recertified` verification state reachable: an anchor alone proves nothing, the record behind it * must be readable, contract-valid, commitment-matching and bound to THIS head. */ export declare function resolveCertificationForChainHead(scope: string): { kind: 'none'; } | { kind: 'valid'; through: string; }; /** Certification record files present on disk, used by doctor to spot unanchored records. */ export declare function listCertificationRecordFiles(scope: string): string[]; //# sourceMappingURL=certification-plan.d.ts.map