Expand description
TOML configuration: parsing, walks-up discovery, and merging.
Discovery rules:
- Start at the working directory and walk up to the filesystem root,
collecting any
.shell-mcp.tomlfiles we find. (We do not stop at git boundaries — a project may legitimately live outside a git repo.) - Then add
~/.shell-mcp.tomlif present, treating it as the outermost (lowest precedence) config. - Merge order: outermost first, innermost last. Innermost wins for
extend = falsesemantics; rules accumulate.
For v0.1 a config has a single field, allow, which is a list of
shell-style pattern strings. A future version may grow deny,
env, or cwd overrides.
Structs§
- Config
- Raw on-disk schema for a single
.shell-mcp.tomlfile. - Config
Cache - Cache so that repeated calls with the same
(root, cwd)skip filesystem I/O. - Loaded
Config - The result of resolving config for a particular working directory.
Enums§
Functions§
- resolve
- Compose a
LoadedConfigfrom the given working directory.