[FEAT] back SpaceDO filesystem with Cloudflare Artifacts#405
Conversation
|
Model not found: cloudflare-ai-gateway/google-ai-studio/gemini-3-pro-preview. Did you mean: openai/o3-pro, workers-ai/@cf/google/gemma-3-12b-it, anthropic/claude-3-5-haiku? |
|
@karishnu Bonk workflow failed. Check the logs for details. View workflow run · To retry, trigger Bonk again. |
a596bbc to
1a5823f
Compare
|
Model not found: cloudflare-ai-gateway/google-ai-studio/gemini-3-pro-preview. Did you mean: openai/o3-pro, workers-ai/@cf/google/gemma-3-12b-it, anthropic/claude-3-5-haiku? |
|
Model not found: cloudflare-ai-gateway/google-ai-studio/gemini-3-pro-preview. Did you mean: openai/o3-pro, workers-ai/@cf/google/gemma-3-12b-it, anthropic/claude-3-5-haiku? |
Add ArtifactsFileSystem, an overlay FileSystem over WorkspaceFileSystem with an Artifacts branch as read-only base. Hybrid hydration: instant index, on-demand + eager blob materialization, whiteout tombstones. Route all SpaceDO file reads/writes/deletes/mkdir/patch through this.fs; gate commit/deploy/rollback on full materialization; exclude /.git and /.afs from deploy bundles and rollback trees. Add git-objects.ts (iso-git object plumbing) and artifacts-sync.ts (push/fetch); remove superseded git-pack.ts and git-smart-http.ts. Add a shared FileSystem + git-on-FS contract suite run against WorkspaceFileSystem and ArtifactsFileSystem via an FsHarnessDO test binding.
- Make ARTIFACTS mandatory in SpaceDO; drop the local-only overlay fallback and require a base source in ArtifactsFileSystem (empty base still supported). - Mirror think file writes under slash-stripped paths so content shows on click in the editor pane. - Add end-to-end file_deleted websocket message and stop treating delete as a write tool, so deleted files are removed from the file list live.
82c72e3 to
f7e3123
Compare
|
Model not found: cloudflare-ai-gateway/google-ai-studio/gemini-3-pro-preview. Did you mean: openai/o3-pro, workers-ai/@cf/google/gemma-3-12b-it, anthropic/claude-3-5-haiku? |
SpaceDO gives each app an isolated, git-backed workspace running entirely on the Workers runtime. Previously, the workspace depended on Durable Object-local filesystem state, with no durable remote source of truth for an app’s committed history.
This PR makes Cloudflare Artifacts the durable, git-compatible source of truth for each app while preserving SpaceDO’s existing filesystem API.
How it works
The Artifacts-backed filesystem implements the same
FileSysteminterface used by the rest of SpaceDO. It combines:Reads and hydration
Point reads first check the writable overlay. If a file exists only in the base snapshot, its blob is read from the local git object store and hydrated into the overlay.
Deleted base files remain hidden through whiteouts.
The filesystem provides two readiness levels:
Full materialization happens before whole-tree operations such as commits, deploys, rollbacks, recursive listings, searches, and workspace statistics.
Writes and deletes
Cold-start recovery
The live filesystem and local git repository are in memory. When a SpaceDO instance starts:
An Artifacts repository with no commits is valid and represents an empty base. Until the first commit, the filesystem behaves as a normal writable in-memory workspace.
Artifacts synchronization
Artifacts synchronization manages repository provisioning, authentication, fetches, and pushes.
This PR improves synchronization reliability through:
ARTIFACTSis a required binding. There is no local-only git fallback.Commit, deploy, preview, and rollback
/.gitand/.afsare excluded from user-visible listings, deployment bundles, and rollback trees.Editor synchronization fixes
This PR also fixes live editor updates emitted by the Think agent:
src/App.tsx.file_deletedWebSocket message instead of an empty file write.