Skip to content
Merged
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
5 changes: 5 additions & 0 deletions .changeset/optional-just-bash-acorn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cloudflare/computer": minor
---

`just-bash` is now an optional peer dependency and should be installed manually when using `@cloudflare/computer/backends/worker-shell`.
7 changes: 7 additions & 0 deletions docs/12_worker_backend.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ the host workspace over Workers RPC, so there is no second store
and no sync round trip; the host Durable Object's SQLite is the
only authoritative state.

just-bash is an optional peer dependency of `@cloudflare/computer`.
Install it alongside the package when you use this backend:

```sh
npm install @cloudflare/computer just-bash
```

Import via the sub-path so the bundled just-bash payload tree-shakes
out of consumers that don't use it:

Expand Down
3 changes: 2 additions & 1 deletion examples/artifacts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"build:types": "wrangler types"
},
"dependencies": {
"@cloudflare/computer": "*"
"@cloudflare/computer": "*",
"just-bash": "^3.0.1"
},
"devDependencies": {
"typescript": "^6.0.3",
Expand Down
3 changes: 2 additions & 1 deletion examples/egress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"build:types": "wrangler types"
},
"dependencies": {
"@cloudflare/computer": "*"
"@cloudflare/computer": "*",
"just-bash": "^3.0.1"
},
"devDependencies": {
"typescript": "^6.0.3",
Expand Down
1 change: 1 addition & 0 deletions examples/mcp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"@modelcontextprotocol/sdk": "1.31.0",
"@platformatic/vfs": "^0.4.0",
"ai": "^7.0.0",
"just-bash": "^3.0.1",
"zod": "^4.4.3"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions examples/pi-ai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"dependencies": {
"@cloudflare/computer": "*",
"@earendil-works/pi-ai": "^0.99.2",
"just-bash": "^3.0.1",
"zod": "^4.4.3"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions examples/tanstack-ai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@cloudflare/computer": "*",
"@tanstack/ai": "^0.63.0",
"@tanstack/ai-cloudflare": "^0.2.1",
"just-bash": "^3.0.1",
"zod": "^4.4.3"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions examples/think-compare-runtimes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"@shikijs/themes": "^4.2.0",
"agents": "^0.20.0",
"ai": "^7.0.0",
"just-bash": "^3.0.1",
"partyserver": "^0.5.6",
"partysocket": "^1.1.19",
"react": "^19.2.7",
Expand Down
1 change: 1 addition & 0 deletions examples/think/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"agents": "^0.20.0",
"ai": "^7.0.0",
"isomorphic-git": "^1.38.3",
"just-bash": "^3.0.1",
"workers-ai-provider": "^4.0.0",
"zod": "^4.4.3"
},
Expand Down
3 changes: 2 additions & 1 deletion examples/vite-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"build:types": "wrangler types"
},
"dependencies": {
"@cloudflare/computer": "*"
"@cloudflare/computer": "*",
"just-bash": "^3.0.1"
},
"devDependencies": {
"@cloudflare/vite-plugin": "^1.63.0",
Expand Down
3 changes: 2 additions & 1 deletion examples/worker-shell/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"build:types": "wrangler types"
},
"dependencies": {
"@cloudflare/computer": "*"
"@cloudflare/computer": "*",
"just-bash": "^3.0.1"
},
"devDependencies": {
"typescript": "^6.0.3",
Expand Down
27 changes: 20 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions packages/computer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ binding, and the worker-shell backend needs the `experimental` flag. Each backen
own binding requirements — see [Choosing a backend](#choosing-a-backend).

Optional peer dependencies, installed only if you use the matching
feature: `zod` for every tools entry point, `ai` for
feature: `just-bash` for `@cloudflare/computer/backends/worker-shell`,
`zod` for every tools entry point, `ai` for
`@cloudflare/computer/tools` and `@cloudflare/computer/tools/ai-sdk`, and
`@platformatic/vfs` for the Node-side VFS provider. The pi and TanStack
AI entry points need nothing beyond `zod`; your agent brings its own
Expand Down Expand Up @@ -314,7 +315,7 @@ Alongside `exec`, the runtime exposes `getExec`, `killExec`, and
| --- | --- | --- | --- | --- |
| **Container** | Experimental | `@cloudflare/computer/backends/container` | Shell commands in full Linux userland (real binaries, `npm`, `node`, network) | A Cloudflare Container running `computerd`, scheduled by the durable object (`scheduling_policy: "durable_object"`) |
| **Container (legacy)** | Deprecated | `@cloudflare/computer/backends/container-legacy` | The same | A Cloudflare Container the platform schedules and sizes from the `containers` block |
| **Worker shell** | Experimental | `@cloudflare/computer/backends/worker-shell` | Shell commands via [just-bash](https://github.com/vercel-labs/just-bash) in a Dynamic Worker | A Worker Loader binding; `experimental` flag |
| **Worker shell** | Experimental | `@cloudflare/computer/backends/worker-shell` | Shell commands via [just-bash](https://github.com/vercel-labs/just-bash) in a Dynamic Worker | A Worker Loader binding; `experimental` flag; the `just-bash` package |
| **Worker JavaScript** | Stable | `@cloudflare/computer/backends/worker-javascript` | ECMAScript modules in a fresh Dynamic Worker | A Worker Loader binding |

- **Container** cold-starts more slowly but gives you a real Linux
Expand Down
12 changes: 8 additions & 4 deletions packages/computer/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@cloudflare/computer",
"version": "0.5.1",
"description": "Cloudflare Computer — a SQLite-backed virtual filesystem with sync to a container-side daemon (computerd).",
"description": "Cloudflare Computer \u2014 a SQLite-backed virtual filesystem with sync to a container-side daemon (computerd).",
"license": "MIT",
"repository": {
"directory": "packages/computer",
Expand Down Expand Up @@ -164,14 +164,13 @@
"prepublishOnly": "npm run build && npm test"
},
"dependencies": {
"acorn": "^8.17.0",
"capnweb": "^0.10.0",
"just-bash": "^3.0.1"
"capnweb": "^0.10.0"
},
"peerDependencies": {
"@cloudflare/workers-types": "^4.20260616.1 || ^5.20260921.1",
"@platformatic/vfs": "*",
"ai": "^6.0.196 || ^7.0.0",
"just-bash": "^3.0.1",
"vite": "^6.0.0 || ^7.0.0 || ^8.0.0",
"zod": "^4.4.3"
},
Expand All @@ -185,6 +184,9 @@
"ai": {
"optional": true
},
"just-bash": {
"optional": true
},
"vite": {
"optional": true
},
Expand All @@ -201,10 +203,12 @@
"@earendil-works/pi-ai": "^0.99.2",
"@platformatic/vfs": "^0.4.0",
"@tanstack/ai": "^0.63.0",
"acorn": "^8.17.0",
"ai": "^7.0.0",
"diff": "^9.0.0",
"esbuild": "^0.28.1",
"isomorphic-git": "^1.38.3",
"just-bash": "^3.0.1",
"memfs": "^4.57.6",
"rolldown": "^1.0.2",
"rolldown-plugin-dts": "^0.25.2",
Expand Down
Loading