Skip to main content

vtcode_core/dotfile_protection/
mod.rs

1//! Comprehensive dotfile protection system.
2//!
3//! This module implements protection for hidden configuration files (dotfiles)
4//! to prevent automatic or implicit modifications by AI agents or automated tools.
5//!
6//! Features:
7//! - Explicit user confirmation with clear disclosure
8//! - Immutable audit logging of all access attempts
9//! - Whitelist mechanism with secondary authentication
10//! - Cascade prevention (blocking chain reactions)
11//! - Backup and restore functionality
12//! - Permission preservation
13
14mod audit;
15mod backup;
16mod guardian;
17
18pub use audit::{AccessType, AuditEntry, AuditLog, AuditOutcome};
19pub use backup::{BackupManager, DotfileBackup};
20pub use guardian::{
21    AccessContext, ConfirmationRequest, DotfileGuardian, ProtectionDecision, ProtectionViolation,
22    get_global_guardian, init_global_guardian, is_protected_dotfile,
23};