Files and search
Core file tools (always on the default catalog):
| Tool | Role |
|---|---|
builtin_read_file / builtin_read_currently_open_file | Read |
builtin_create_new_file / builtin_write_file / builtin_edit_file | Create and edit |
builtin_apply_patch | Unified-diff / Apply Patch hunks |
builtin_view_subdirectory | List a directory (default cap 1000 files if the model omits maxFiles) |
builtin_glob | Find paths by pattern |
builtin_exact_search | Exact / regex search (ripgrep-style) |
builtin_view_repo_map | Structure map |
Deferred: builtin_enhanced_search, builtin_view_diff, builtin_generate_tests.
apply_patch fuzz
Hunks tolerate indent, trailing whitespace, quote/dash drift, stale context (git-style fuzz), partial first/last lines, and unified-diff --- / +++ wrappers. Add File overwrites if the path already exists (same as write).
If a patch still fails, Knox retries writes more tightly in 2.1.3+; you can also apply from chat (Alt+A / ⌥A) or Cmd+I.
Review edits
With Review edits on, file tools stage in memory. Apply writes to disk (checkpoint first on Apply all). Shell still sees the real disk, not the staged tree.
Path policy
Always:
- Hard denies:
~/.ssh,~/.gnupg,**/.ssh/**(lexical and resolved) - Secret files (
.env*,*.pem,id_*) ask, even in Auto - Paths outside the workspace ask or deny (symlinks resolved)
- Cargo registry writes denied; reads of
~/.cargo/registry/srcallowed
.knoxignore affects checkpoints and some walks; it is not a substitute for Ask mode on an untrusted tree.