feat: add EXTRA_READ_PATHS for read-only external file access

Allow agents to read files from directories outside the project folder
via the EXTRA_READ_PATHS environment variable.

Changes:
- Add EXTRA_READ_PATHS_VAR constant in client.py
- Parse comma-separated paths and add Read/Glob/Grep permissions
- Log configured extra read paths on agent startup
- Document the feature in .env.example

Usage:
  EXTRA_READ_PATHS=/path/to/docs,/path/to/libs

Security: External paths are read-only (no Write/Edit permissions)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
nogataka
2026-01-29 11:55:49 +09:00
parent 910ca34eac
commit 3588dc8df7
2 changed files with 26 additions and 0 deletions

View File

@@ -15,6 +15,13 @@
# - false: Browser opens a visible window (useful for debugging)
# PLAYWRIGHT_HEADLESS=true
# Extra Read Paths (Optional)
# Comma-separated list of absolute paths for read-only access to external directories.
# The agent can read files from these paths but cannot write to them.
# Useful for referencing documentation, shared libraries, or other projects.
# Example: EXTRA_READ_PATHS=/Volumes/Data/dev,/Users/shared/libs
# EXTRA_READ_PATHS=
# GLM/Alternative API Configuration (Optional)
# To use Zhipu AI's GLM models instead of Claude, uncomment and set these variables.
# This only affects AutoCoder - your global Claude Code settings remain unchanged.