import type { AuditLog } from "./audit.js"; import type { ConsentRecord } from "./types.js"; /** * Manages consent persistence at .bober/medical/consent.json. * * Fail-closed: a missing or corrupt consent.json returns false/undefined — * the engine refuses rather than proceeding without consent. * * Depends on AuditLog to record a 'consent' entry on recordConsent(). * * bober: JSON file sidecar; if multi-session concurrent access is needed, * migrate to the SQLite FactStore (see src/state/facts.ts). */ export declare class ConsentGate { private readonly projectRoot; private readonly audit; constructor(projectRoot: string, audit: AuditLog); private path; /** * Fail-closed: missing or corrupt file returns false. Never throws. * Reads .bober/medical/consent.json via node:fs/promises. */ hasConsent(): Promise; /** * Returns the parsed ConsentRecord, or undefined if missing/corrupt. * Validates required fields — a partial/corrupt record returns undefined. */ current(): Promise; /** * Persist a ConsentRecord (mode 0600) AND append a 'consent' audit entry. * * @param record - The consent record to persist. * @param nowIso - INJECTED ISO 8601 timestamp — never wall-clock. */ recordConsent(record: ConsentRecord, nowIso: string): Promise; } //# sourceMappingURL=consent.d.ts.map