Expand description
Workspace-scoped filesystem tool support.
This module contains shared path resolution, text decoding/encoding, size limits, and atomic write helpers used by the read, write, search, and edit filesystem tools. Public tool structs are re-exported from the submodules.
All four tools report the same capability group via fs_tool_group_info,
so the discovery layer presents them to the model as one workspace bundle.
Structs§
- Edit
File Args - Arguments for filesystem edit operations.
- Edit
File Output - Normalized result returned by a filesystem edit operation.
- Edit
File Tool - Tool implementation for atomic string replacement in text files.
- Read
File Args - Arguments for filesystem read operations.
- Read
File Output - Normalized result returned by a filesystem read operation.
- Read
File Tool - Tool implementation for reading files inside configured workspaces.
- Search
File Args - Arguments for filesystem glob operations.
- Search
File Output - Normalized result returned by a filesystem glob operation.
- Search
File Tool - Tool implementation for glob-based workspace path search.
- Write
File Args - Arguments for filesystem write operations.
- Write
File Output - Normalized result returned by a filesystem write operation.
- Write
File Tool - Tool implementation for atomic writes inside configured workspaces.
Constants§
- FS_
TOOL_ GROUP_ ID - Stable id of the filesystem workspace capability group.
Functions§
- atomic_
write_ file - Atomically writes data to a file by first writing to a temporary file and then renaming it into place.
- fs_
tool_ group_ info - Returns the shared
ToolGroupInfofor the filesystem workspace tools. - resolve_
read_ path - Resolves an existing read target reachable from the workspace namespace.
- resolve_
write_ path - Resolves a write target inside the workspace, even when the destination does not yet exist.
Type Aliases§
- Edit
File Hook - Typed hook for edit-file tool calls.
- Read
File Hook - Typed hook for read-file tool calls.
- Search
File Hook - Typed hook for search-file tool calls.
- Write
File Hook - Typed hook for write-file tool calls.