Repository navigation
examples, docs: move off @cloudflare/shell - #2563
mattzcarey wants to merge 1 commit into
Conversation
| sql: this.ctx.storage.sql, | ||
| name: () => this.name | ||
| }); | ||
| workspace = new Workspace({ storage: this.ctx.storage }); |
There was a problem hiding this comment.
🔴 Existing workspace files disappear on upgrade
When deployed over existing objects, Workspace reads a new store without migrating Shell files. Saved chats and apps appear empty; unactivated harness edits disappear when startup reseeds the active revision.
Learn more
Shell persists files in its own namespaced SQLite tables, while the new Computer Workspace reads its own storage. A Durable Object deployment retains the old SQLite data but does not translate it to the new filesystem. onStart now finds no saved source and ensureAppBuilt refuses to rebuild the existing app. The same switch affects WorkspaceChatAgent, Coder, and unactivated edits in SelfModifyingHarness.
Example: A user builds an app containing src/server.ts, deploys this update, then reloads its preview. The new workspace returns no source, so preview requests return "No app has been built yet" even though the prior files remain in Shell's tables.
Recommended fix: Add a one-time migration before reading or seeding each existing workspace. Read files from the old Shell namespace and R2 where applicable, write them to Computer, and record completion only after successful copying. Preserve unactivated working-tree edits in the self-modifying harness.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Intentional. These are examples, and Shell data isn't migrated automatically. The deprecation PR (#2564) adds a migration guide with a copy script for anyone who needs to keep files.
| async #writeFile(path: string, content: string): Promise<void> { | ||
| await this.#workspace.fs.mkdir(path.slice(0, path.lastIndexOf("/")), { | ||
| recursive: true | ||
| }); | ||
| await this.#workspace.fs.writeFile(path, content); |
There was a problem hiding this comment.
There was a problem hiding this comment.
Not reachable: the harness tools can only write, read and delete files under /harness. There's no way to create a symlink there, so a write can't follow one out.
|
✅ agents import sizes: no significant changes ( |
agents
@cloudflare/ai-chat
@cloudflare/codemode
hono-agents
@cloudflare/shell
@cloudflare/think
@cloudflare/voice
@cloudflare/worker-bundler
commit: |
04dac1a to
3c91ce7
Compare
|
3c91ce7 to
47aee1a
Compare
47aee1a to
11aac37
Compare
11aac37 to
454ebb7
Compare
Moves the remaining examples and docs off
@cloudflare/shell.Workspace. The codex harness no longer needs its R2 bucket.workspaceTools, and so doesdesign/think.md. RFCs are left as written.After this, nothing in the repo uses Shell.
Tests ran for the self-modifying harness. Repo typecheck is clean. workspace-chat and worker-bundler-playground have no tests, and I haven't run them in a browser.
Stacked on #2562.
Stack (merge in order, or merge the top to land them all together):