Expand description
Safety layer for agent file operations.
This module provides protection against destructive operations through:
- Soft delete with trash (files can be recovered)
- Audit history logging
- Undo support for reversible operations
Re-exportsยง
use chrono::DateTime;๐use chrono::Utc;๐use serde::Deserialize;๐use serde::Deserialize;๐use serde::Serialize;๐use serde::Serialize;๐use std::fs;๐use std::fs::File;๐use std::fs::OpenOptions;๐use std::io::BufRead;๐use std::io::BufReader;๐use std::io::Write;๐use std::path::Path;๐use std::path::PathBuf;๐use std::sync::Arc;๐use tokio::sync::RwLock;๐use tracing::debug;๐use tracing::info;๐use tracing::warn;๐use uuid::Uuid;๐
Structsยง
- History
Entry - Entry in the history log.
- Safety
Config - Configuration for the safety manager.
- Safety
Manager - Safety manager for protecting file operations.
- Trash
Entry - Entry in the trash directory.
Enumsยง
- History
Operation - Type of operation for history logging.
- Undo
Data - Data needed to undo an operation.