import { type AutonomyTier } from './autonomy-envelope.js'; import type { GovernanceEvidenceCandidateLedgerEntry } from './evidence-candidate.js'; import type { TaskAggregate } from './task-aggregate.js'; import { type EvidenceKind } from './task-contract.js'; import { type VerificationCheckBindingV1 } from './verification-check-binding.js'; import { type VerificationPlanDraftV1 } from './verification-planner.js'; export declare const VERIFICATION_RUN_REQUEST_SCHEMA_VERSION: 1; declare const VERIFICATION_RUN_CONTRACT_V1_SCHEMA_VERSION: 1; declare const VERIFICATION_RUN_CONTRACT_SCHEMA_VERSION: 2; export declare const MAX_VERIFICATION_RUN_TTL_MS: number; export interface VerificationRunRequestV1 { readonly schemaVersion: typeof VERIFICATION_RUN_REQUEST_SCHEMA_VERSION; readonly draftId: string; readonly requiredCheckId: string; readonly candidateId: string; } /** Supplied by the deterministic daemon/transport, never by the model request payload. */ interface VerificationRunAuthorityContext { readonly verifierClientId: string; readonly issuedAt: string; readonly ttlMs: number; readonly maxDurationMs: number; } interface BoundVerificationRunAuthorityContext extends VerificationRunAuthorityContext { /** Derived from the trusted immutable registry, never from the model request. */ readonly checkBinding: VerificationCheckBindingV1; } export interface VerificationRunContractV1 { readonly schemaVersion: typeof VERIFICATION_RUN_CONTRACT_V1_SCHEMA_VERSION; readonly runId: string; readonly status: 'authorized'; readonly draftId: string; readonly taskId: string; readonly contractVersion: number; readonly planFingerprint: string; readonly workspaceManifestHash: string; readonly requiredCheckId: string; readonly expectedEvidenceKind: EvidenceKind; readonly candidateId: string; readonly candidateSource: string; readonly verifierClientId: string; readonly authorization: { readonly operation: 'focused_check'; readonly mode: 'automatic'; readonly autonomyTier: AutonomyTier; }; readonly limits: { readonly issuedAt: string; readonly expiresAt: string; readonly ttlMs: number; readonly maxDurationMs: number; }; readonly resultPolicy: { readonly executorMayApprove: false; readonly independentToolEvidenceRequired: true; readonly freshWorkspaceIdentityRequired: true; }; } export interface VerificationRunContractV2 extends Omit { readonly schemaVersion: typeof VERIFICATION_RUN_CONTRACT_SCHEMA_VERSION; readonly runId: string; readonly checkBinding: VerificationCheckBindingV1; } export type VerificationRunContract = VerificationRunContractV1 | VerificationRunContractV2; type VerificationRunContractWithoutId = Omit | Omit; type VerificationRunIssuanceIssueCode = 'task_missing' | 'active_contract_missing' | 'workflow_state_invalid' | 'draft_invalid' | 'draft_scope_mismatch' | 'request_invalid' | 'required_check_missing' | 'required_check_drifted' | 'candidate_not_proposed' | 'candidate_missing' | 'candidate_ambiguous' | 'candidate_ineligible' | 'candidate_scope_mismatch' | 'verifier_identity_invalid' | 'verifier_not_independent' | 'operation_not_authorized' | 'check_binding_invalid' | 'check_binding_mismatch' | 'authority_time_invalid' | 'authority_limits_invalid'; export interface VerificationRunIssuanceIssue { readonly code: VerificationRunIssuanceIssueCode; readonly path: string; readonly message: string; } type VerificationRunIssuanceResult = { readonly issued: true; readonly contract: VerificationRunContract; } | { readonly issued: false; readonly issues: readonly VerificationRunIssuanceIssue[]; }; export declare function calculateVerificationRunId(contract: VerificationRunContractWithoutId): string; export declare function isVerificationRunContractIntegrityValid(contract: VerificationRunContract): boolean; export declare function issueVerificationRunContract(task: TaskAggregate | null, draft: VerificationPlanDraftV1, candidates: readonly GovernanceEvidenceCandidateLedgerEntry[], request: VerificationRunRequestV1, authority: VerificationRunAuthorityContext): VerificationRunIssuanceResult; export declare function issueBoundVerificationRunContract(task: TaskAggregate | null, draft: VerificationPlanDraftV1, candidates: readonly GovernanceEvidenceCandidateLedgerEntry[], request: VerificationRunRequestV1, authority: BoundVerificationRunAuthorityContext): VerificationRunIssuanceResult; export {}; //# sourceMappingURL=verification-run-contract.d.ts.map