aiignoreToPermissions
aiignoreToPermissions(
patterns,base?):FilesystemPermission[]
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/core/deepAgentPermissions.ts:97
Convert .aiignore patterns (relative, .gitignore-ish) into deepagents deny rules.
deepagents matches the path argument the model passes to a fs tool against ABSOLUTE
globs. EXT-13: the backend now runs WITHOUT virtualMode in both the default and widened
cases, so paths are REAL absolute paths and the caller passes the absolute cwd as base
to anchor these deny rules there.
A bare pattern (*.env, secret.txt) should match at any depth, so we emit both a
top-level (<base>/secret.txt) and a recursive (<base>/**/secret.txt) rule. A pattern
already containing “/” (config/secrets.json) is anchored as-is (plus a /** subtree rule).
base defaults to “” (anchoring at the virtual root “/”) for legacy callers; gsloth’s
buildPermissions always passes the absolute cwd now.
Parameters
Section titled “Parameters”patterns
Section titled “patterns”string[]
string = ''