/**
 * ApprovalQueueStore -- Storage abstraction for the ApprovalGateEnforcer.
 *
 * Follows the same interface + InMemory pattern used by HealthMetricsStore
 * (src/observability/health-metrics-store.ts) so future drop-ins
 * (Redis, Prisma) can be swapped without changing the enforcer.
 *
 * Relationship to PR #24 (ApprovalQueue):
 *   PR #24 ships ApprovalQueue, which is a file-backed persistent queue
 *   coupled to the AutonomySpectrumEnforcer workflow (poll-based, HMAC
 *   token verification). That class is reused as-is for the autonomy-
 *   spectrum path.
 *
 *   This module is a SEPARATE, lighter-weight store designed for the
 *   ApprovalGateEnforcer's synchronous-blocking workflow. It holds
 *   PendingApproval records in memory and resolves them via Promise
 *   callbacks. No HMAC, no file I/O required here -- the enforcer layer
 *   owns replay-protection and audit integration.
 *
 * @connexum/ai-governance P3-T2
 */
export type ApprovalDecisionKind = 'approved' | 'rejected' | 'timed-out';
export interface PendingApproval {
    /** Unique ID for this approval request. */
    approvalId: string;
    /** ISO timestamp when the request was created. */
    createdAt: string;
    /** ISO timestamp when the request will expire. */
    expiresAt: string;
    /** The action class that triggered the gate. */
    actionClass: string;
    /** Contextual description of the action. */
    actionDescription: string;
    /** Agent or context that initiated the action. */
    initiator: string;
    /** Pack IDs governing this request. */
    packBinding: string[];
    /** Current state of this entry. */
    status: 'pending' | ApprovalDecisionKind;
    /** Who made the decision (undefined while still pending). */
    approverId?: string;
    /** Human-readable reason for the decision. */
    reason?: string;
    /** ISO timestamp of the decision. */
    decidedAt?: string;
}
export interface ApprovalQueueStore {
    /**
     * Insert a new pending approval record.
     * Returns the generated approvalId.
     */
    insert(record: Omit<PendingApproval, 'approvalId' | 'status'>): string;
    /**
     * Retrieve a pending approval by ID. Returns null if not found.
     */
    get(approvalId: string): PendingApproval | null;
    /**
     * Resolve a pending approval (approved or rejected).
     * Returns false if the approvalId was not found or already decided.
     *
     * PT-APPROVAL-3: if the record has already been decided, this method
     * is a no-op and returns false -- replay protection.
     */
    resolve(approvalId: string, decision: 'approved' | 'rejected', approverId: string, reason?: string): boolean;
    /**
     * Mark a pending approval as timed out.
     * Returns false if the approvalId was not found or already decided.
     */
    timeout(approvalId: string): boolean;
    /**
     * Retrieve all records currently in 'pending' status.
     * Optionally filter by action class.
     */
    getPending(filter?: {
        actionClass?: string;
        initiator?: string;
    }): PendingApproval[];
    /**
     * Return a snapshot of all records regardless of status.
     * Useful for audit and dashboard queries.
     */
    getAll(): PendingApproval[];
    /**
     * Remove decided records older than maxAgeMs to bound memory growth.
     * Returns the count of removed records.
     */
    prune(maxAgeMs?: number): number;
}
/**
 * Default in-memory implementation of ApprovalQueueStore.
 *
 * All data is lost on process restart. Suitable for testing and single-
 * process deployments. Production deployments that span multiple processes
 * or require crash-recovery should use a Prisma or Redis-backed store.
 *
 * PT-APPROVAL-3: The `_decided` set tracks all approvalIds that have been
 * resolved or timed out. `resolve()` and `timeout()` silently return false
 * if the ID is already in this set, preventing duplicate decisions.
 */
export declare class InMemoryApprovalQueueStore implements ApprovalQueueStore {
    private readonly records;
    private readonly _decided;
    insert(record: Omit<PendingApproval, 'approvalId' | 'status'>): string;
    get(approvalId: string): PendingApproval | null;
    resolve(approvalId: string, decision: 'approved' | 'rejected', approverId: string, reason?: string): boolean;
    timeout(approvalId: string): boolean;
    getPending(filter?: {
        actionClass?: string;
        initiator?: string;
    }): PendingApproval[];
    getAll(): PendingApproval[];
    prune(maxAgeMs?: number): number;
}
//# sourceMappingURL=approval-queue-store.d.ts.map