Skip to content

FileToolsOptions

Defined in: packages/tools/src/file/tools.ts:21

Shared constructor fields for tools that materialize through an EffectGate.

optional allowRead?: FileAllowRead

Defined in: packages/tools/src/file/tools.ts:33

Directories readFile may read. Omitted defaults to [root] (same as createFileJail). import(”../unbounded-allow-read.ts”).UNBOUNDED_ALLOW_READ is host-wide. null (or []) means nothing can be read. A list is exactly those roots — root is not inserted. denyRead still wins.


optional allowWrite?: string[]

Defined in: packages/tools/src/file/tools.ts:38

Write allow list. Omitted → [root]. [] — no writes. A list is exactly those roots (no intersection with a privileged root).


optional denyRead?: string[]

Defined in: packages/tools/src/file/tools.ts:40

Paths hidden from readFile, even when they sit inside root or allowRead.


optional denyWrite?: string[]

Defined in: packages/tools/src/file/tools.ts:42

Paths writeFile / editFile may not write, even under allowWrite.


effectGate: EffectGate

Defined in: packages/tools/src/approval/types.ts:25

Pre-materialize gate. Required — pass import(“@agent-dev-lab/core”).allowAllGate explicitly for tests / permissive local hosts.

GatedToolOptions.effectGate


effectScope: ToolEffectScope

Defined in: packages/tools/src/approval/types.ts:27

Run identity stamped onto each tool intent.

GatedToolOptions.effectScope


optional maxReadBytes?: number

Defined in: packages/tools/src/file/tools.ts:44

Refuse to read a file over this many bytes. Default 1,000,000 (1 MB).


optional maxWriteBytes?: number

Defined in: packages/tools/src/file/tools.ts:46

Refuse to write more than this many bytes. Default 1,000,000 (1 MB).


root: string

Defined in: packages/tools/src/file/tools.ts:26

Relative-path base and omit-default for allow lists (passed to the jail as cwd). Required so factories do not silently fall back to the home directory.