Define exec-server protocol types for streamed file writes (#49778)

## What changed

- Add `read` and `replace` modes to `fs/open`, defaulting omitted modes to `read` for existing callers.
- Define `fs/writeBlock` request and response types for offset-based writes, with a maximum decoded chunk size of 1 MiB.
- Add the `fileWriteStreaming` capability, defaulting to `false`. Keep writable streams unsupported in the server and explicitly reject replacement opens.

## Testing

Add a protocol test verifying that legacy `fs/open` requests without a mode deserialize as read-only opens.

GitOrigin-RevId: 4d3997717e821cd1f62df12a03c8eec36332a66d
This commit is contained in:
Adam Perry @ OpenAI
2026-10-01 00:43:55 +00:00
committed by copyberry
parent 60947e2341
commit 875bf9209b
6 changed files with 80 additions and 1 deletions
@@ -11,6 +11,7 @@ use crate::FileSystemResult;
use crate::FileSystemSandboxContext;
use crate::protocol::FS_READ_BLOCK_METHOD;
use crate::protocol::FsCloseParams;
use crate::protocol::FsOpenMode;
use crate::protocol::FsOpenParams;
use crate::protocol::FsReadBlockParams;
@@ -37,6 +38,7 @@ pub(super) async fn open(
.fs_open(FsOpenParams {
handle_id: registration.handle_id.clone(),
path,
mode: FsOpenMode::Read,
sandbox: sandbox.cloned(),
})
.await