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
| Property | Type | Description | Defined in |
|---|---|---|---|
deniedPaths | string[] | Never readable, searchable or writable. | core/hooks/fileScopeGate.ts:20 |
projectDir | string | Base 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 |
searchableDirs | string[] | 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 |
writableDirs | string[] | Write/Edit are only allowed inside these. | core/hooks/fileScopeGate.ts:14 |