Skip to main content

Module fs

Module fs 

Source
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§

EditFileArgs
Arguments for filesystem edit operations.
EditFileOutput
Normalized result returned by a filesystem edit operation.
EditFileTool
Tool implementation for atomic string replacement in text files.
ReadFileArgs
Arguments for filesystem read operations.
ReadFileOutput
Normalized result returned by a filesystem read operation.
ReadFileTool
Tool implementation for reading files inside configured workspaces.
SearchFileArgs
Arguments for filesystem glob operations.
SearchFileOutput
Normalized result returned by a filesystem glob operation.
SearchFileTool
Tool implementation for glob-based workspace path search.
WriteFileArgs
Arguments for filesystem write operations.
WriteFileOutput
Normalized result returned by a filesystem write operation.
WriteFileTool
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 ToolGroupInfo for 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§

EditFileHook
Typed hook for edit-file tool calls.
ReadFileHook
Typed hook for read-file tool calls.
SearchFileHook
Typed hook for search-file tool calls.
WriteFileHook
Typed hook for write-file tool calls.