Add a bounded filesystem walk RPC (#29841)

Stack 1 of 3. Follow-ups: #29842 and #29844.

## What changes

Adds a general bounded `fs/walk` operation to the exec server.

The operation returns file and directory entries plus recoverable
per-path errors. It skips symlinks, preserves the existing filesystem
sandbox routing, and enforces depth, directory, entry, and response-size
limits.

This PR only defines and wires the filesystem operation. It does not
change any callers yet.
This commit is contained in:
jif
2026-06-24 16:05:43 +01:00
committed by GitHub
parent b4f0f3eff1
commit c14623d04c
13 changed files with 608 additions and 0 deletions
@@ -37,6 +37,8 @@ use crate::protocol::FsReadFileParams;
use crate::protocol::FsReadFileResponse;
use crate::protocol::FsRemoveParams;
use crate::protocol::FsRemoveResponse;
use crate::protocol::FsWalkParams;
use crate::protocol::FsWalkResponse;
use crate::protocol::FsWriteFileParams;
use crate::protocol::FsWriteFileResponse;
use crate::protocol::HttpRequestParams;
@@ -311,6 +313,14 @@ impl ExecServerHandler {
self.file_system.read_directory(params).await
}
pub(crate) async fn fs_walk(
&self,
params: FsWalkParams,
) -> Result<FsWalkResponse, JSONRPCErrorError> {
self.require_initialized_for("filesystem")?;
self.file_system.walk(params).await
}
pub(crate) async fn fs_remove(
&self,
params: FsRemoveParams,