/**
 * CrossSessionMemoryStore -- Persistent memory that survives session
 * boundaries, with mandatory pseudonymisation of protected identifiers.
 *
 * On every write the payload is scanned for PII, PHI, and HMDA demographic
 * fields. Detected identifiers are replaced with deterministic SHA-256
 * pseudonyms (SHA-256(subjectId + pepper)). The reverse-lookup map
 * (`subjectPseudonymMap`) is protected by the governance key-manager and
 * is only accessible to callers that present a `reidentificationToken`
 * earned through an approval-queue route with the required ReviewerTier.
 *
 * Pack-binding determines which identifier classes are protected:
 *   - GDPR: subject names + contact info
 *   - HIPAA: PHI fields (18 safe harbour identifiers)
 *   - HMDA: demographic fields (race, ethnicity, sex, age, national origin)
 *
 * P3-T1 coverage gap: Cross-session memory with pseudonymisation support.
 *
 * Compliance bindings:
 *   - GDPR Art. 4(5) + Recital 26: pseudonymisation as a data protection measure
 *   - HIPAA 164.514(b): safe harbour de-identification
 *   - HMDA Reg C 1003.6: data privacy in HMDA reporting
 *   - CCPA 1798.100: right to know / access
 *
 * @connexum/ai-governance
 */
export declare class ReidentificationTokenRequiredError extends Error {
    readonly memoryKey: string;
    constructor(memoryKey: string);
}
export declare class InvalidReidentificationTokenError extends Error {
    constructor();
}
export type { IdentifierClass } from '../pii-patterns';
import { type IdentifierClass } from '../pii-patterns';
export interface PackIdentifierPolicy {
    packId: string;
    protectedClasses: IdentifierClass[];
    reviewerTierRequired: 'legal-reviewer' | 'privacy-officer';
}
declare const PACK_POLICIES: PackIdentifierPolicy[];
export interface CrossSessionMemoryEntry {
    /** Possibly pseudonymised payload. */
    payload: unknown;
    /** True if any identifier was pseudonymised. */
    pseudonymised: boolean;
    /** Classes detected and pseudonymised. */
    pseudonymisedClasses: IdentifierClass[];
    writtenAt: string;
    writtenBy: string;
}
export interface CrossSessionMemoryConfig {
    /**
     * Pepper for SHA-256 pseudonymisation. Must be >= 32 chars.
     * In production, derive from KeyManager. Default: random per-instance.
     */
    pepper?: string;
    /** Active pack IDs (determines which identifier classes are protected). */
    activePackIds?: string[];
}
export declare class CrossSessionMemoryStore {
    private readonly store;
    /**
     * Reverse lookup: pseudonym -> original value. Protected; only accessible
     * with a valid reidentificationToken.
     */
    private readonly subjectPseudonymMap;
    private readonly tokenStore;
    private readonly pepper;
    private readonly activePackIds;
    constructor(config?: CrossSessionMemoryConfig);
    /**
     * Persist a value under `key`. Scans for protected identifiers and
     * pseudonymises them before storing. Emits a write receipt.
     */
    write(agentId: string, key: string, payload: unknown): CrossSessionMemoryEntry;
    /**
     * Read a value. Returns pseudonymised payload unless a valid
     * `reidentificationToken` is supplied.
     */
    read(agentId: string, key: string, reidentificationToken?: string): {
        entry: CrossSessionMemoryEntry | undefined;
        reidentified: boolean;
    };
    /** Return a raw entry without attempting reidentification. */
    peek(key: string): CrossSessionMemoryEntry | undefined;
    delete(key: string): boolean;
    keys(): string[];
    /**
     * Issue a reidentification token for an agent. In production this is
     * called by the approval-queue route after the required ReviewerTier
     * decision is recorded. Token is valid for 15 minutes.
     */
    issueReidentificationToken(agentId: string, reviewerTier: 'legal-reviewer' | 'privacy-officer'): string;
    private resolveProtectedClasses;
    private pseudonymisePayload;
    private resolvePayload;
    private validateToken;
}
export { PACK_POLICIES };
//# sourceMappingURL=cross-session-memory.d.ts.map