agent-workspace-adapter-local 0.3.0

Secure local filesystem Workspace adapter for Agent Infra
Documentation
use agent_workspace_contract::FileVisibilityOptions;

/// Determine whether a file or directory name should be visible under the given
/// visibility options.
pub fn is_visible_name(name: &str, options: FileVisibilityOptions) -> bool {
    if !options.include_ignored && is_ignored_dir(name) {
        return false;
    }
    if !options.include_hidden && name.starts_with('.') {
        return false;
    }
    true
}

/// Common directories that are high-volume and should be excluded when
/// `include_ignored` is false.
fn is_ignored_dir(name: &str) -> bool {
    matches!(
        name,
        "target" | "node_modules" | ".git" | "__pycache__" | ".venv" | "venv"
    )
}