import type { ToolExecutionResult } from './executor.js'; /** Minimal transcript shape accepted by the completion verifier. */ export interface CompletionEvidenceEvent { /** Stable event identity. Tool events emitted by Horizon use `tool:`. */ id?: string; role: 'model' | 'tool' | 'summary'; text: string; receipt?: ToolExecutionResult; } /** Reference to one immutable transcript event used as evidence for a claim. */ export interface CompletionEvidenceRef { /** Stable event ID, never a mutable transcript array position. */ eventId: string; /** Optional binding to the exact workspace artifact digest observed at the event. */ artifactDigest?: string; } /** One answer claim whose value must be reconstructable from referenced evidence. */ export interface CompletionClaim { id: string; value: string; evidence: CompletionEvidenceRef[]; } /** Model-proposed certificate presented at the COMPLETE boundary. */ export interface CompletionCertificate { claims: CompletionClaim[]; } export interface CompletionConfig { /** Claim IDs that must be present exactly once before completion is accepted. */ requiredClaims: string[]; /** Eligible transcript roles. Tool evidence is the safe default. */ allowedEvidenceRoles?: CompletionEvidenceEvent['role'][]; /** Require referenced tool actions to have been authorized by policy. Default true. */ requireAuthorizedToolEvidence?: boolean; /** Require referenced tool actions to have exited successfully. Default true. */ requireSuccessfulToolEvidence?: boolean; /** Bound verifier work and certificate size. Default 32. */ maxEvidenceRefsPerClaim?: number; } /** Trusted replay seam. It must deterministically reconstruct the claim value from evidence. */ export type CompletionReplay = (claim: CompletionClaim, evidence: CompletionEvidenceEvent[]) => string | Promise; export interface CompletionVerification { ok: boolean; errors: string[]; checkedClaims: string[]; } /** * Verify an evidence-carrying completion certificate against the recorded transcript. * * This proves only that declared claims are supported by eligible recorded evidence and * reconstruct under the caller's deterministic replay function. It does not prove external * truth, safety, or alignment and it cannot grant execution authority. */ export declare function verifyCompletionCertificate(certificate: CompletionCertificate | undefined, events: CompletionEvidenceEvent[], config: CompletionConfig, replay: CompletionReplay | undefined): Promise; //# sourceMappingURL=completion.d.ts.map