Skip to content

Filesystem

The filesystem feature is a host-owned capability. It works with any provider because the daemon manages file access directly.

  • GET /api/fs/roots — list workspace roots
  • GET /api/fs/list?path=... — list a directory
  • GET /api/fs/metadata?path=... — file metadata (size, mtime)
  • GET /api/fs/read?path=... — read file contents
  • POST /api/fs/write — write or overwrite a file
  • POST /api/fs/createDir — create a directory
  • POST /api/fs/remove — delete a file or directory
  • POST /api/fs/copy — copy a file

Connect to WS /api/fs/live to receive real-time file change notifications. When the agent edits a file, the app refreshes the file view automatically.

The daemon resolves paths against configured workspace roots. resolveWorkspacePath uses realpath and a prefix match to prevent escaping the workspace. Attempts to access files outside the workspace raise a WorkspaceAccessError with HTTP 403.

  • Filesystem access requires the shared bearer token
  • There is no per-file permission model; token holders can read/write anything inside the workspace roots
  • Keep the daemon on trusted networks only