Skip to main content
Version: 0.13.0

Interface: FileScope

Defined in: core/hooks/fileScopeGate.ts:10

Where the built-in file tools may act. Without this, the only boundary is the SDK's own working-directory scope — the whole project directory — so keeping the agent out of the user's own files (a config file holding a password, the originals in sources/) would rest on the system prompt alone.

Properties​

PropertyTypeDescriptionDefined in
deniedPathsstring[]Never readable, searchable or writable.core/hooks/fileScopeGate.ts:20
projectDirstringBase for relative paths: the session's cwd.core/hooks/fileScopeGate.ts:12
readOnlyDirs?string[]Readable and searchable but never writable; only affects the wording of the denial.core/hooks/fileScopeGate.ts:16
searchableDirsstring[]Grep is only allowed inside these — it prints file contents, so it isn't let loose on the whole project.core/hooks/fileScopeGate.ts:18
writableDirsstring[]Write/Edit are only allowed inside these.core/hooks/fileScopeGate.ts:14