/**
 * SessionMemoryStore -- Session-scoped in-memory key-value store with
 * auto-clear at session boundaries.
 *
 * Memory is strictly scoped to (agentId, sessionId). No entry survives a
 * session close, idle timeout, or max-duration expiry. If any bound pack
 * declares `requiresSessionMemoryIsolation: true`, the store also wipes
 * itself when the regulated pack exits (e.g. exiting a HIPAA-governed
 * block auto-wipes PHI that was held in memory during that block).
 *
 * All clear events emit `governance:memory-cleared` audit events so the
 * chain records what was wiped, why, and when.
 *
 * P3-T1 coverage gap: Session-scoped memory with auto-clear between cycles.
 *
 * Compliance bindings:
 *   - HIPAA 164.312(a)(2)(i): automatic logoff / session termination
 *   - GDPR Art. 5(1)(e): storage limitation
 *   - SOC 2 CC6.7: data disposal controls
 *   - ISO 42001 A.8.1: AI data minimization
 *
 * @connexum/ai-governance
 */
export declare class SessionMemoryExpiredError extends Error {
    readonly agentId: string;
    readonly sessionId: string;
    readonly reason: SessionClearReason;
    constructor(opts: {
        agentId: string;
        sessionId: string;
        reason: SessionClearReason;
    });
}
export type SessionClearReason = 'explicit-close' | 'idle-timeout' | 'max-session-exceeded' | 'regulated-pack-exit';
/**
 * DataClassTag -- data sensitivity tags for session memory entries.
 *
 * W1 directive: 'PHI' is no longer a hardcoded category constant.
 * Use 'SENSITIVE' for any content that matched one or more pack-declared
 * BLOCK categories. The specific category is recorded in the audit event
 * emitted by PackDrivenClassifier.applyActions().
 */
export type DataClassTag = 'SENSITIVE' | 'PII' | 'PAN' | 'DEMOGRAPHIC' | 'LEGAL-MATTER' | 'UNCLASSIFIED';
export interface SessionMemoryEntry {
    value: unknown;
    dataClass: DataClassTag;
    writtenAt: number;
}
export interface SessionMemoryClearedAuditEvent {
    type: 'governance:memory-cleared';
    agentId: string;
    sessionId: string;
    entriesCleared: number;
    reason: SessionClearReason;
    timestamp: string;
}
export interface SessionMemoryConfig {
    /** Idle timeout in ms: clear if no read/write for this long. Default 15 min. */
    maxIdleMs: number;
    /** Absolute session duration cap in ms. Default 60 min. */
    maxSessionMs: number;
    /**
     * When true, clear memory whenever a regulated pack exits.
     * Defaults to true if any bound pack sets `requiresSessionMemoryIsolation`.
     */
    clearOnRegulatedPackExit: boolean;
}
export declare class SessionMemoryStore {
    private readonly config;
    private readonly sessions;
    private readonly auditSink;
    constructor(config?: Partial<SessionMemoryConfig>, auditSink?: (event: SessionMemoryClearedAuditEvent) => void);
    /**
     * Open a new session. Returns the session key for subsequent operations.
     * Throws if a session with this (agentId, sessionId) is already open.
     */
    openSession(agentId: string, sessionId: string): void;
    /**
     * Explicitly close a session. All entries are wiped and a
     * `governance:memory-cleared` audit event is emitted.
     */
    close(agentId: string, sessionId: string): void;
    /**
     * Call when a regulated pack exits (e.g. end of HIPAA-governed block).
     * If `clearOnRegulatedPackExit` is true, wipes memory for the session.
     */
    onRegulatedPackExit(agentId: string, sessionId: string): void;
    set(agentId: string, sessionId: string, memKey: string, value: unknown, dataClass?: DataClassTag): void;
    get(agentId: string, sessionId: string, memKey: string): unknown;
    has(agentId: string, sessionId: string, memKey: string): boolean;
    delete(agentId: string, sessionId: string, memKey: string): boolean;
    /** Return entry count for a live session (does not update lastAccessedAt). */
    size(agentId: string, sessionId: string): number;
    /**
     * Check all open sessions against idle and max-session limits.
     * Clears any that have expired and emits audit events.
     * Returns the number of sessions that were cleared.
     */
    sweepExpired(): number;
    private sessionKey;
    private splitKey;
    private requireAlive;
    private clearSession;
}
//# sourceMappingURL=session-memory.d.ts.map