Skip to contents

Convenience function to create a PreToolUse hook that only allows file writes within a specified directory.

Usage

hook_limit_file_writes(allowed_dir)

Arguments

allowed_dir

Directory where writes are allowed

Value

A HookMatcher object

Examples

if (FALSE) { # \dontrun{
agent$add_hook(hook_limit_file_writes("./output"))
} # }