Capability
FileSystem
Bug Description
list_directory, search_files and find_files use protected_patterns to filter out matching paths:
|
if not self._is_accessible(rel, write=True): |
|
if not self._is_accessible(rel_str, write=True): |
|
if not self._is_accessible(rel, write=True): |
This seems unintended, given that these operations are all read-only and the documentation for protected_patterns states: "Matching paths are read-only -- reads succeed, writes are rejected."
If this behavior is indeed incorrect, I can open a patch addressing it.
Minimal Reproduction
from pydantic_ai_harness import FileSystem
import asyncio
print(
asyncio.run(FileSystem(protected_patterns=["*"]).get_toolset().list_directory())
)
# prints '(empty directory)'
pydantic-ai-harness version
0.4.0
pydantic-ai version
2.4.0
Capability
FileSystem
Bug Description
list_directory,search_filesandfind_filesuseprotected_patternsto filter out matching paths:pydantic-ai-harness/pydantic_ai_harness/filesystem/_toolset.py
Line 344 in 3c5ec34
pydantic-ai-harness/pydantic_ai_harness/filesystem/_toolset.py
Line 397 in 3c5ec34
pydantic-ai-harness/pydantic_ai_harness/filesystem/_toolset.py
Line 447 in 3c5ec34
This seems unintended, given that these operations are all read-only and the documentation for
protected_patternsstates: "Matching paths are read-only -- reads succeed, writes are rejected."If this behavior is indeed incorrect, I can open a patch addressing it.
Minimal Reproduction
pydantic-ai-harness version
0.4.0
pydantic-ai version
2.4.0