/** * File Organizer MCP Server v3.4.2 * Rollback Service * * Manages operation manifests and performs undo operations. */ import type { RollbackManifest, RollbackAction } from "../types.js"; export declare class RollbackService { private storageDir; private pathValidator; constructor(); private ensureStorage; /** * Create and save a new rollback manifest */ createManifest(description: string, actions: RollbackAction[]): Promise; /** * List available rollbacks * * SECURITY JUSTIFICATION (SEC-001): * - storageDir is an internal path constructed in the constructor from process.cwd() * (line 33: path.join(process.cwd(), ".file-organizer-rollbacks")) * - Files read are NOT user-provided - they're internal manifest files created by this service * (createManifest method writes JSON files with validated UUID names) * - Path validation happens at other layers: storageDir is hardcoded, filenames are filtered * for ".json" extension, and rollback() validates UUID format before reading */ listManifests(): Promise; /** * Restore state from a manifest (Undo) * @param manifestId - UUID of the manifest to rollback * @returns Promise<{ success: number; failed: number; errors: string[] }> - Results object with success count, failed count, and error messages * @throws {Error} When manifest ID format is invalid (must be valid UUID format) * @throws {Error} When manifest file is not found * @throws {Error} When manifest JSON parsing fails * @throws {Error} When file path validation fails for security reasons * * SECURITY JUSTIFICATION (SEC-001): * - storageDir is an internal path constructed in the constructor from process.cwd() * (line 33: path.join(process.cwd(), ".file-organizer-rollbacks")) * - File read is NOT user-provided - it's an internal manifest file created by this service * - Path validation happens at other layers: storageDir is hardcoded, manifestId is validated * as UUID format (line 105-111) before being used to construct the file path */ rollback(manifestId: string): Promise<{ success: number; failed: number; errors: string[]; }>; } //# sourceMappingURL=rollback.service.d.ts.map