Skip to content

examples, docs: move off @cloudflare/shell - #2563

Open
mattzcarey wants to merge 1 commit into
deprecate-shell/4-think-drop-shellfrom
deprecate-shell/5-examples-docs
Open

mattzcarey wants to merge 1 commit into
deprecate-shell/4-think-drop-shellfrom
deprecate-shell/5-examples-docs

Conversation

@mattzcarey

@mattzcarey mattzcarey commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Moves the remaining examples and docs off @cloudflare/shell.

  • Examples: workspace-chat, worker-bundler-playground, the playground demo (now "Think + Computer"), and the codex and self-modifying harnesses use a Computer Workspace. The codex harness no longer needs its R2 bucket.
  • Docs: the Think docs and the codemode and worker-bundler READMEs describe Computer workspaces and workspaceTools, and so does design/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):

  1. examples(pi): move to @cloudflare/computer 0.5 #2559 examples(pi): move to @cloudflare/computer 0.5
  2. think, agents: work in a @cloudflare/computer Workspace #2560 think, agents: work in a @cloudflare/computer Workspace
  3. think: use the @cloudflare/computer workspace tools #2561 think: use the @cloudflare/computer workspace tools
  4. think: drop @cloudflare/shell #2562 think: drop @cloudflare/shell
  5. examples, docs: move off @cloudflare/shell #2563 (this PR) examples, docs: move off @cloudflare/shell
  6. shell: deprecate in favour of @cloudflare/computer #2564 shell: deprecate in favour of @cloudflare/computer
  7. think: deprecate createExecuteTool in favour of the Workspace exec tool #2565 think: deprecate createExecuteTool in favour of the Workspace exec tool

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 7 potential issues.

Devin Review

sql: this.ctx.storage.sql,
name: () => this.name
});
workspace = new Workspace({ storage: this.ctx.storage });

@devin-ai-integration devin-ai-integration Bot Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 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.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread examples/worker-bundler-playground/src/server.ts Outdated
Comment thread examples/workspace-chat/src/server.ts Outdated
Comment thread packages/worker-bundler/README.md
Comment thread examples/workspace-chat/src/server.ts
Comment thread docs/index.md
Comment on lines +85 to +89
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);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟥 Harness source writes can escape via symlinks

When /harness contains a symlink to another workspace directory, #writeFile follows it despite the lexical path check. A model editing harness source can overwrite files outside /harness.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@agent-think

agent-think Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

✅ agents import sizes: no significant changes (d2d8a42e → 11aac37c, workflow run)

@mattzcarey
mattzcarey added this pull request to stack #2566 October 12, 2026 11:52
@pkg-pr-new

pkg-pr-new Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

agents

npm i https://pkg.pr.new/agents@2563

@cloudflare/ai-chat

npm i https://pkg.pr.new/@cloudflare/ai-chat@2563

@cloudflare/codemode

npm i https://pkg.pr.new/@cloudflare/codemode@2563

hono-agents

npm i https://pkg.pr.new/hono-agents@2563

@cloudflare/shell

npm i https://pkg.pr.new/@cloudflare/shell@2563

@cloudflare/think

npm i https://pkg.pr.new/@cloudflare/think@2563

@cloudflare/voice

npm i https://pkg.pr.new/@cloudflare/voice@2563

@cloudflare/worker-bundler

npm i https://pkg.pr.new/@cloudflare/worker-bundler@2563

commit: 11aac37

@mattzcarey
mattzcarey force-pushed the deprecate-shell/5-examples-docs branch from 04dac1a to 3c91ce7 Compare October 12, 2026 12:32
@changeset-bot

changeset-bot Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 454ebb7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mattzcarey
mattzcarey force-pushed the deprecate-shell/5-examples-docs branch from 3c91ce7 to 47aee1a Compare October 12, 2026 14:09
@mattzcarey
mattzcarey force-pushed the deprecate-shell/5-examples-docs branch from 47aee1a to 11aac37 Compare October 12, 2026 14:11
@mattzcarey
mattzcarey force-pushed the deprecate-shell/5-examples-docs branch from 11aac37 to 454ebb7 Compare October 12, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant