import type { VerificationReport } from '../types.js'; export type SharedStatus = 'ok' | 'degraded' | 'broken' | 'unknown' | 'n/a'; export interface ClaimRecord { id: string; kind: 'code-claim'; subject: string; holder: null; status: SharedStatus; rawStatus: string; evidence: { file: string | null; line: number | null; note: string; }[]; } export interface ClaimsFile { claimSchemaVersion: 1; source: 'assay'; generatedAt: string; anchor: { repo: string; commit: string; }; records: ClaimRecord[]; } /** * Normalize either report shape `export-claims` may be pointed at into the flat * VerificationReport `toClaimsFile` expects: * * - The `verify`/`report` pipeline's flat shape: top-level `verifications` array. * - The `assess` pipeline's nested shape (`AssessmentResult`): no top-level * `verifications`, instead `routeResults[].verifications` per route/flow. * * `assess` output carries no absolute codebase path (only `repoName`, a basename, * and `repoUrl`, which is the literal string `'local'` for on-disk targets), so * `codebasePath` is derived from `repoName` with a `'.'` fallback. Callers pointing * `export-claims` at assess output should pass `--repo`/`--commit` explicitly * rather than relying on the git-derived defaults, since there is no real * codebase path to resolve those from. */ export declare function normalizeToVerificationReport(parsed: unknown): VerificationReport; /** * Structural check against the shared release-claim contract — the same rules * Training-Generator's `lib/claims.mjs` applies when it joins claim files into a * certificate. Returns a list of violations (empty when valid) and never throws, * so a malformed file is reported rather than crashing the exporter. * * Kept deliberately in sync with `schemas/release-claim.schema.json` in * Training-Generator; that repo's validator is the canonical one. */ export declare function validateClaimsFile(file: unknown): string[]; export declare function toClaimsFile(report: VerificationReport, opts: { repo: string; commit: string; now: string; }): ClaimsFile;