Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .changeset/versioned-filesystem-storage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
"@cloudflare/shell": minor
---

Add a new versioned durable filesystem for `@cloudflare/shell`.

New exports:

- `FileSystemStorage`
- `VersionedFileSystem`
- `FileSystemStorageOptions`
- `VersionedFileSystemChangeEvent`
- `VersionedFileSystemChangeType`

`FileSystemStorage` manages named filesystem versions backed by SQLite plus optional R2 spillover. Each `VersionedFileSystem` instance is bound to one existing version, supports the standard `FileSystem` interface directly, and stores deduplicated content blobs by SHA-256 across the whole database.
2 changes: 1 addition & 1 deletion packages/shell/src/filesystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ export class Workspace {
const resolved = r.target.startsWith("/")
? normalizePath(r.target)
: normalizePath(getParent(path) + "/" + r.target);
return this.resolveSymlink(resolved, depth + 1);
return await this.resolveSymlink(resolved, depth + 1);
}

// ── Symlink API ───────────────────────────────────────────────
Expand Down
7 changes: 7 additions & 0 deletions packages/shell/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ export {
type FileSystemStateBackendOptions
} from "./memory";
export { createWorkspaceStateBackend, WorkspaceFileSystem } from "./workspace";
export {
FileSystemStorage,
VersionedFileSystem,
type FileSystemStorageOptions,
type VersionedFileSystemChangeEvent,
type VersionedFileSystemChangeType
} from "./versioned-filesystem";

// ── LLM prompt helpers ────────────────────────────────────────────────
export { STATE_TYPES, STATE_SYSTEM_PROMPT } from "./prompt";
Loading
Loading