Mithril — Operators — Rangers of the North




Purpose
🗡️
Low-level I/O operations with security: sandboxed terminal, path traversal prote
Files
7
LOC
1,682

Key Concept

Tools don't touch the filesystem directly — they go through operators that enforce security boundaries.

Tools don't access the system directly — they go through Operators that enforce security:

FileOperator

All file I/O goes through here. Security features:

TerminalOperator

Executes shell commands with a blocklist:

ShadowOperator

Undo system: before any file write, saves the old content to .mithril/shadow/. The /undo command restores the last session's file changes.

GitOperator

Git operations (status, log, diff, blame, branch) via subprocess calls to git.

WebOperator

HTTP fetching with a search API adapter for web_search tool.

FilePurpose
file.rs
git.rs
mod.rs
scan.rs
shadow.rs
terminal.rs
web.rs