/** * @fileoverview Multi-Approval Workflow for MALICIOUS Severity Quarantine * @module @skillsmith/core/services/quarantine/QuarantineService.multiapproval * @see SMI-2277: Persist multi-approval state to database * @see SMI-2741: Split from QuarantineService.ts to meet 500-line standard * * Handles the multi-approval workflow required for MALICIOUS severity skills. * MALICIOUS severity requires multiple independent reviewers to approve before * a skill can be unquarantined, preventing single-reviewer compromise. */ import type { QuarantineRepository } from '../../repositories/quarantine/index.js'; import type { ApprovalRepository } from '../../repositories/quarantine/ApprovalRepository.js'; import type { AuditLogger } from '../../security/AuditLogger.js'; import type { AuthenticatedSession, AuthenticatedReviewInput, AuthenticatedReviewResult, MultiApprovalStatus } from './types.js'; /** * Number of approvals required for MALICIOUS severity reviews */ export declare const MALICIOUS_APPROVAL_COUNT = 2; /** * Multi-approval timeout in milliseconds (24 hours) */ export declare const MULTI_APPROVAL_TIMEOUT_MS: number; /** * Handle approval for MALICIOUS severity skills * * MALICIOUS severity requires multiple reviewers to approve * before a skill can be unquarantined. This prevents single * reviewer compromise from allowing malicious skills. * * Approval state is persisted to the database (SMI-2277) so * pending approvals survive service restarts. * * @param session - Authenticated session * @param quarantineId - Quarantine entry ID * @param skillId - Skill ID * @param input - Review input * @param repository - Quarantine repository * @param approvalRepository - Approval repository * @param auditLogger - Audit logger * @returns Review result with multi-approval status */ export declare function handleMaliciousApproval(session: AuthenticatedSession, quarantineId: string, skillId: string, input: AuthenticatedReviewInput, repository: QuarantineRepository, approvalRepository: ApprovalRepository, auditLogger: AuditLogger): AuthenticatedReviewResult; /** * Build a MultiApprovalStatus from database rows * * Converts persisted approval entries into the MultiApprovalStatus * interface expected by consumers. */ export declare function buildMultiApprovalStatus(quarantineId: string, approvals: Array<{ reviewerId: string; reviewerEmail: string; createdAt: string; completedAt: string | null; reason: string | null; isComplete: boolean; }>): MultiApprovalStatus; //# sourceMappingURL=QuarantineService.multiapproval.d.ts.map