/** * Durable record of what an installed vendor CLI was actually observed doing * (ADR 0038). * * The conformance bench proves Harnery's own planner and normalizer against a * committed fixture. That is an adapter check, not a vendor check * (ADR 0037). An attestation is the other half: one bounded live turn, its * observations, and the vendor version they were observed on. * * A record stores structural facts only. No prompt text, no completion text, * no host paths. It lives under the host's coordination directory and is never * published. */ import type { AdapterId, AdapterProfile, CapabilitySupport } from "./types.js"; export declare const ATTESTATION_SCHEMA_VERSION = 2; /** Dimensions one minimal live turn can honestly establish. Everything else * needs a purpose-built scenario and stays outside the record rather than * being guessed at. */ export declare const ATTESTABLE_DIMENSIONS: readonly ["invocation", "finalResult", "sessionId", "cost", "filesystemPolicyProjection"]; export type AttestableDimension = (typeof ATTESTABLE_DIMENSIONS)[number]; export interface AdapterAttestation { schema_version: number; adapter: AdapterId; /** What the vendor binary reported when this was recorded. Staleness is * keyed on this, so a vendor upgrade invalidates the record automatically. */ binary_version: string; /** Digest of the capability declaration at record time, so an edited * declaration also invalidates the record. */ profile_digest: string; /** The billing policy the probe ran under. A child launched with API keys * scrubbed can behave differently from one that can fall back to them, so an * observation only speaks for the mode it was made in. */ subscription_only: boolean; observed_at: string; /** Only what the probe actually saw. A dimension absent from this map was * not observed, which is not the same as unsupported. */ observations: Partial>; /** Over every field above. A hand-edited record fails to load. */ record_digest: string; } export interface AttestationStoreOptions { /** Test seam and alternate host. Defaults to the resolved coord root. */ coordRoot?: string; } export declare function attestationsDir(opts?: AttestationStoreOptions): string; /** Stable identity of a declaration, so editing a claim invalidates the * attestation that was recorded against the old one. */ export declare function profileDigest(profile: AdapterProfile): string; export declare function sealAttestation(record: Omit): AdapterAttestation; /** Replace-in-place write. Unlike a workflow record an attestation is meant to * be re-recorded, so this is a mutable atomic swap rather than an immutable * create. */ export declare function writeAttestation(record: AdapterAttestation, opts?: AttestationStoreOptions): string; /** Null for absent, unreadable, malformed, wrong-schema, or tampered records. * A record that fails its own digest is discarded rather than trusted, because * the whole point of the file is that it was not hand-written. */ export declare function readAttestation(adapter: AdapterId, opts?: AttestationStoreOptions): AdapterAttestation | null; export declare function validateAttestation(value: unknown, adapter?: AdapterId): AdapterAttestation | null; /** An attestation speaks only for the vendor version and declaration it was * recorded against. */ export declare function isAttestationCurrent(record: AdapterAttestation | null, binaryVersion: string | null, profile: AdapterProfile, subscriptionOnly?: boolean): record is AdapterAttestation; export declare function listAttestations(opts?: AttestationStoreOptions): AdapterAttestation[]; /** Both adapter-derived proof inputs, read once, for a workflow run * (ADR 0038). Callers inject the result so the engine performs no capability * lookups of its own. A adapter with no current attestation simply has no * citation; that absence is not a proof unknown. */ export declare function adapterProofInputs(profiles: readonly AdapterProfile[], opts: AttestationStoreOptions & { versionProbe: (binary: string) => string | null; /** Billing policy this run will use, so a record made under the other mode * is not cited as if it applied. */ subscriptionOnly?: boolean; }): { adapterEvidence: Record; adapterAttestations: Record; }; //# sourceMappingURL=attestation.d.ts.map