@cloudflare/shell@0.3.4

cloudflare/agents@cloudflare/shell@0.3.4Apr 27, 2026by github-actions[bot]

AI Summary

This patch release introduces `WorkspaceFsLike` — a minimal interface type representing the 16 filesystem methods required by `WorkspaceFileSystem` and `createWorkspaceStateBackend`. The change enables wrapping a real `Workspace` behind custom layers (like cross-DO proxies) while remaining fully backward compatible since `Workspace` still satisfies the new interface.

Key Highlights

  • Introduced `WorkspaceFsLike` type as a minimal `Workspace` interface with 16 filesystem methods
  • Updated `WorkspaceFileSystem` constructor to accept any `WorkspaceFsLike` instead of concrete `Workspace`
  • Updated `createWorkspaceStateBackend` parameter to accept `WorkspaceFsLike`
  • Enables cross-DO proxy patterns for forwarding workspace calls over RPC
  • Fully backward compatible — all existing call sites work without changes

New Features

  • New `WorkspaceFsLike` type for flexible workspace wrapping
  • Support for creating custom workspace proxy layers
  • Integration with codemode's `state.*` sandbox API via `createWorkspaceStateBackend`
  • End-to-end pattern available in `examples/assistant` with `SharedWorkspace`

Full Release Notes

### Patch Changes

-   [#1384](https://github.com/cloudflare/agents/pull/1384) [`a7059d4`](https://github.com/cloudflare/agents/commit/a7059d4a5a1071a10c60be0e777968fc7ff5d36c) Thanks [@threepointone](https://github.com/threepointone)! - Introduce `WorkspaceFsLike` — the minimum `Workspace` surface required by `WorkspaceFileSystem` and `createWorkspaceStateBackend`.

    `WorkspaceFileSystem`'s constructor and `createWorkspaceStateBackend`'s parameter both now accept any `WorkspaceFsLike` (a `Pick<Workspace, …>` of the 16 filesystem methods the adapter reaches for) rather than a concrete `Workspace`. Non-breaking — `Workspace` still satisfies `WorkspaceFsLike` so every existing call site keeps working without changes.

    This unlocks wrapping a real `Workspace` behind your own layer — most commonly a cross-DO proxy that forwards each call to a parent agent's workspace over RPC — and still using it as the storage for codemode's `state.*` sandbox API via `createWorkspaceStateBackend`. See `examples/assistant` for the end-to-end pattern with `SharedWorkspace`.