/**
 * SessionTimeout -- Enforces session timeout policies.
 *
 * HIPAA requires automatic session timeout (15-minute inactivity default).
 * SOC 2, PCI DSS, and DORA also require session management.
 *
 * Features:
 *   - Configurable idle timeout per compliance framework
 *   - Absolute session duration limits
 *   - Activity tracking and heartbeat
 *   - Automatic session invalidation
 *   - Audit trail of session events
 *
 * T-052: Session timeout enforcement.
 *
 * @connexum/ai-governance
 */
export interface SessionTimeoutConfig {
    /** Directory for session data */
    sessionDir: string;
    /** Idle timeout in ms (default: 15 min for HIPAA) */
    idleTimeoutMs?: number;
    /** Absolute session max duration in ms (default: 8 hours) */
    maxDurationMs?: number;
    /** Session check interval in ms (default: 60000) */
    checkIntervalMs?: number;
}
export interface ManagedSession {
    id: string;
    operatorId: string;
    startedAt: string;
    lastActivity: string;
    expiresAt: string;
    absoluteExpiry: string;
    active: boolean;
    metadata?: Record<string, unknown>;
}
export interface SessionEvent {
    sessionId: string;
    event: 'CREATED' | 'ACTIVITY' | 'EXPIRED_IDLE' | 'EXPIRED_ABSOLUTE' | 'TERMINATED' | 'RENEWED';
    timestamp: string;
    details?: string;
}
export declare const TIMEOUT_PRESETS: Record<string, {
    idleTimeoutMs: number;
    maxDurationMs: number;
}>;
export declare class SessionTimeout {
    private config;
    private sessionsFile;
    private eventsFile;
    private checker;
    constructor(config: SessionTimeoutConfig);
    /**
     * Create a new managed session.
     */
    createSession(operatorId: string, metadata?: Record<string, unknown>): ManagedSession;
    /**
     * Record activity on a session (resets idle timer).
     */
    heartbeat(sessionId: string): boolean;
    /**
     * Validate a session (check if still active and not expired).
     */
    validate(sessionId: string): ManagedSession | null;
    /**
     * Terminate a session explicitly.
     */
    terminate(sessionId: string): boolean;
    /**
     * Get all active sessions.
     */
    getActiveSessions(): ManagedSession[];
    /**
     * Get sessions for a specific operator.
     */
    getOperatorSessions(operatorId: string): ManagedSession[];
    /**
     * Expire all timed-out sessions. Returns count of expired sessions.
     */
    expireStale(): number;
    /**
     * Start periodic session cleanup.
     */
    startMonitor(): void;
    /**
     * Stop the session monitor.
     */
    stopMonitor(): void;
    /**
     * Get session statistics.
     */
    getStats(): {
        activeSessions: number;
        totalSessions: number;
        idleTimeoutMs: number;
        maxDurationMs: number;
    };
    /**
     * Create config from a compliance preset.
     */
    static fromPreset(preset: string, sessionDir: string): SessionTimeoutConfig;
    private loadSessions;
    private saveSessions;
    private logEvent;
}
//# sourceMappingURL=session-timeout.d.ts.map