Skip to main content

Module path_guard

Module path_guard 

Source

Structs§

GovernanceGuard
Write guard for MicroClaw’s own governance files: the config file, the AGENTS.md / SOUL.md / USER.md files under the data directory, soul and project-context directories, and the path allowlist. These are injected into other chats’ prompts or define access policy, so the generic file tools must not rewrite them; scoped tools (write_memory) keep their own permission checks. An empty guard allows everything.

Functions§

check_path
Check if a path is blocked. Returns Err(message) if blocked.
filter_paths
Filter a list of paths, removing blocked ones. For glob results.
is_blocked
Check if a file path should be blocked.
path_allowlist_file
The path allowlist file in effect (MICROCLAW_PATH_ALLOWLIST or the default under ~/.microclaw), whether or not it exists.