import { type NativeAcceptanceEvidenceEntry } from './native-acceptance.js'; import type { NativeArchiveEvidenceFact, NativeVerificationFreshness } from './native-archive-preflight.js'; import type { NativeChangeState, NativeProjectPaths } from './native-types.js'; import { buildNativeAcceptanceEvidenceTrace, type NativeVerificationEvidenceEnvelope } from './native-verification-evidence.js'; export type NativeVerificationFreshnessFindingCode = 'verification-contract-stale' | 'verification-implementation-stale' | 'verification-report-stale' | 'verification-receipt-stale' | 'verification-receipt-invalid' | 'verification-receipt-outcome-mismatch' | 'verification-receipt-binding-mismatch' | 'verification-protocol-legacy' | 'verification-state-mismatch' | 'verification-evidence-missing' | 'verification-evidence-invalid'; export interface NativeVerificationPreparation { ready: boolean; findingCodes: NativeVerificationFreshnessFindingCode[]; envelope: NativeVerificationEvidenceEnvelope | null; evidenceRef: string | null; reportSnapshot: { hash: string; text: string; } | null; /** Parsed report and acceptance trace reused after required-check execution. */ preflight?: NativeVerificationPreflight; /** True when the preparation was used only to validate input before required-check execution. */ preflightOnly?: boolean; /** * Per-receipt diagnostics populated when {@link findingCodes} includes * `verification-receipt-binding-mismatch`. Lets an Agent see exactly which * receipts/acceptances diverged and recover via `receipt refresh` when the * mismatch is limited to sourceRevision; other binding changes require fresh evidence. */ receiptBindingFailures?: NativeReceiptBindingFailureDetail[]; } export interface NativeVerificationPreflight { report: Awaited>; trace: ReturnType; } /** * A single receipt that failed binding/role/coverage validation, with the * precise per-field diagnostics an Agent needs to recover without user help. */ export interface NativeReceiptBindingFailureDetail { ref: string; role: 'required-check' | 'acceptance-evidence'; acceptanceId?: string; /** Per-field mismatches like "sourceRevision: expected 6, got 5". */ mismatches: string[]; } /** * Aggregated receipt-graph validation failure. Carries every offending receipt * at once (rather than the first one) so a single `next` attempt surfaces the * full set of stale receipts to the Agent. */ export declare class NativeVerificationReceiptBindingError extends Error { readonly details: NativeReceiptBindingFailureDetail[]; constructor(details: NativeReceiptBindingFailureDetail[]); } export interface NativeVerificationFreshnessInspection { freshness: NativeVerificationFreshness; findingCodes: NativeVerificationFreshnessFindingCode[]; evidence: NativeArchiveEvidenceFact; envelope: NativeVerificationEvidenceEnvelope | null; } export interface NativeImplementationScopeFreshnessInspection { freshness: 'fresh' | 'stale' | 'missing' | 'invalid'; findingCodes: NativeVerificationFreshnessFindingCode[]; } /** * Recomputes the facts bound by the Build implementation scope without requiring a Verify report. * Verify uses this to retreat safely when its contract or project snapshot changes before an * evidence envelope can be created. */ export declare function inspectNativeImplementationScopeFreshness(options: { paths: NativeProjectPaths; state: NativeChangeState; now?: Date; }): Promise; declare function reportEvidence(options: { paths: NativeProjectPaths; state: NativeChangeState; reportRef: string; }): Promise<{ ref: string; hash: string; text: string; entries: NativeAcceptanceEvidenceEntry[]; }>; export interface NativeVerificationEvidenceOptions { paths: NativeProjectPaths; state: NativeChangeState; result: 'pass' | 'fail'; reportRef: string; receiptRef?: string | null; /** Internal transition option used to validate the report before running the required check. */ requireReceipt?: boolean; /** Do not construct a durable pass envelope until the required receipt exists. */ preflightOnly?: boolean; /** Reuse the parsed report and acceptance trace across the preflight and final inspection. */ preflight?: NativeVerificationPreflight; now?: Date; } /** Build and validate an envelope without mutating the Native evidence store. */ export declare function inspectNativeVerificationEvidence(options: NativeVerificationEvidenceOptions): Promise; export declare function persistNativeVerificationEvidence(options: { paths: NativeProjectPaths; state: NativeChangeState; preparation: NativeVerificationPreparation; }): Promise; /** Backwards-compatible one-shot API for callers that explicitly want durable evidence. */ export declare function prepareNativeVerificationEvidence(options: NativeVerificationEvidenceOptions): Promise; /** Recompute every freshness boundary used by status, Archive preview, and Archive commit. */ export declare function inspectNativeVerificationFreshness(options: { paths: NativeProjectPaths; state: NativeChangeState; now?: Date; }): Promise; export {}; //# sourceMappingURL=native-verification-runtime.d.ts.map