Skip to main content

Module client_fs

Module client_fs 

Source
Expand description

Client-side filesystem tools for ACP reverse-fs (Sprint 2).

When the ACP client declares fs.readTextFile=true or fs.writeTextFile=true, the agent uses ClientReadFile / ClientWriteFile tools to request file operations from the client (IDE, editor) instead of performing local filesystem operations.

These tools:

  • Are registered in the [ToolRegistry] only when an ACP session is active and the client has declared the relevant capability.
  • Communicate with the client via the ACP session’s bridge channel.
  • Fall back to local filesystem operations when the client does not respond or returns an error (S2-E2).
  • Always enforce sandbox containment via resolve_within before sending a request to the client (S2-E5).

Structs§

AcpClientFsState
Tracks which session (if any) has an ACP client with reverse-fs capabilities.
ClientReadFile
A tool that reads a file from the ACP client’s buffer (IDE/editor).
ClientWriteFile
A tool that writes content to the ACP client’s buffer (IDE/editor).