Skip to content

Commit f46125d

Browse files
committed
Rename @cloudflare/workspace to @cloudflare/computer
1 parent 45a5719 commit f46125d

281 files changed

Lines changed: 1476 additions & 1454 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/capnweb/SKILL.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ name: capnweb
33
description: |
44
capnweb RPC patterns for this repo, with a heavy focus on stub lifecycle
55
and disposal. Load when touching anything that crosses the Durable Object
6-
wsd boundary: packages/rpc, packages/workspace, the wsd client, or the
6+
computerd boundary: packages/rpc, packages/computer, the computerd client, or the
77
Durable Object server. Triggers include "capnweb", "RpcTarget", "stub",
88
"RPC wire", "promise pipelining", "stub disposal", "RpcPromise".
99
---
1010

1111
# capnweb in this repo
1212

1313
[capnweb](https://github.com/cloudflare/capnweb) is the RPC framing
14-
between the Durable Object and `wsd`. It's an object-capability RPC
14+
between the Durable Object and `computerd`. It's an object-capability RPC
1515
system with promise pipelining, structured-clone-style transfer of
1616
stubs, and bidirectional calls. The wire format used here is text
1717
JSON over a long-lived WebSocket, with an HTTP batch alternative.
@@ -50,7 +50,7 @@ side of the connection.
5050
This matters more here than in many capnweb deployments because the
5151
connection is **long-lived**. HTTP batch sessions auto-dispose
5252
everything when the batch ends, but our WebSocket between the
53-
Durable Object and `wsd` stays up for the lifetime of the workspace.
53+
Durable Object and `computerd` stays up for the lifetime of the workspace.
5454
Every undisposed stub stays alive until that connection drops.
5555

5656
## The caller-disposes rule
@@ -163,7 +163,7 @@ dispose call per stub. To collapse them into one, wrap the target in
163163
`stub.onRpcBroken(cb)` fires when the stub becomes unusable —
164164
typically because the underlying connection dropped or, for a
165165
promise, because the promise rejected. After the callback runs every
166-
method call on that stub will throw. `packages/workspace` already
166+
method call on that stub will throw. `packages/computer` already
167167
folds `onRpcBroken` into the workspace's closed promise; reuse that
168168
plumbing rather than wiring up a parallel listener.
169169

@@ -232,7 +232,7 @@ envelope to release every stub it contains.
232232
contain stubs — futureproofing is cheap.
233233
- **Do** call `.dup()` rather than awaiting twice when you need a
234234
stub copy to outlive a callee's auto-dispose.
235-
- **Do** run the leak harness (`script/wsd-stub-soak`) when you
235+
- **Do** run the leak harness (`script/computerd-stub-soak`) when you
236236
change anything around RPC lifecycle, and check
237237
`session.getStats()` for drift.
238238
- **Don't** send binary WebSocket frames. The wire is text JSON.
@@ -249,11 +249,11 @@ envelope to release every stub it contains.
249249

250250
- Use `enableStubTracking()` + `stubSnapshot()` in a test to assert
251251
no stub survives a round trip you expected to clean up.
252-
- Soak the boundary with `script/wsd-stub-soak` for
252+
- Soak the boundary with `script/computerd-stub-soak` for
253253
disposal-sensitive changes; it reads `session.getStats()` to
254254
detect drift.
255255
- Server-side RPC behavior is tested against the real `Database`
256-
and real driver helpers in `packages/rpc` and `packages/workspace`.
256+
and real driver helpers in `packages/rpc` and `packages/computer`.
257257

258258
## Further reading
259259

.agents/skills/cloudflare/SKILL.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ These three cover almost every change in this repo:
2727

2828
| Skill | Load when |
2929
|---|---|
30-
| [`durable-objects`](https://github.com/cloudflare/skills/tree/main/skills/durable-objects) | Writing or reviewing Durable Object code: RPC methods, SQLite storage, alarms, WebSockets, hibernation. Most work in `packages/dofs` and `packages/workspace` qualifies. |
30+
| [`durable-objects`](https://github.com/cloudflare/skills/tree/main/skills/durable-objects) | Writing or reviewing Durable Object code: RPC methods, SQLite storage, alarms, WebSockets, hibernation. Most work in `packages/dofs` and `packages/computer` qualifies. |
3131
| [`workers-best-practices`](https://github.com/cloudflare/skills/tree/main/skills/workers-best-practices) | Writing or reviewing Worker code: streaming, floating promises, global state, bindings, secrets, observability, `wrangler.jsonc` configuration. |
3232
| [`agents-sdk`](https://github.com/cloudflare/skills/tree/main/skills/agents-sdk) | Building on the Cloudflare Agents SDK: stateful agents, Workflows integration, scheduled tasks, MCP servers. Relevant to [`examples/think`](../../../examples/think). |
3333

@@ -39,7 +39,7 @@ Load these when their trigger applies:
3939
|---|---|
4040
| [`wrangler`](https://github.com/cloudflare/skills/tree/main/skills/wrangler) | Running `wrangler` commands: deploy, dev, secrets, bindings for KV, R2, D1, Vectorize, Hyperdrive, Queues, Workflows, Containers. |
4141
| [`cloudflare`](https://github.com/cloudflare/skills/tree/main/skills/cloudflare) | General Cloudflare platform questions outside the more specific skills above — KV, R2, D1, Vectorize, networking, security, infrastructure-as-code. |
42-
| [`sandbox-sdk`](https://github.com/cloudflare/skills/tree/main/skills/sandbox-sdk) | Building or reviewing sandboxed-execution code paths. Relevant to [`examples/container`](../../../examples/container) and to the `wsd` container model in general. |
42+
| [`sandbox-sdk`](https://github.com/cloudflare/skills/tree/main/skills/sandbox-sdk) | Building or reviewing sandboxed-execution code paths. Relevant to [`examples/container`](../../../examples/container) and to the `computerd` container model in general. |
4343
| [`web-perf`](https://github.com/cloudflare/skills/tree/main/skills/web-perf) | Profiling page load, Core Web Vitals, or render-blocking issues. Rarely relevant in this repo, but listed for completeness. |
4444
| [`cloudflare-email-service`](https://github.com/cloudflare/skills/tree/main/skills/cloudflare-email-service) | Working with Cloudflare Email Routing or the Email Workers binding. Not currently used in this repo. |
4545

@@ -50,12 +50,12 @@ Load these when their trigger applies:
5050
before changing storage shape, RPC methods, or alarm handling.
5151
Load [`workers-best-practices`](https://github.com/cloudflare/skills/tree/main/skills/workers-best-practices)
5252
for the surrounding Worker glue.
53-
- **`packages/workspace`** runs inside the Durable Object and
54-
exposes the capnweb `WorkspaceRPC` to `wsd`. Load
53+
- **`packages/computer`** runs inside the Durable Object and
54+
exposes the capnweb `WorkspaceRPC` to `computerd`. Load
5555
[`durable-objects`](https://github.com/cloudflare/skills/tree/main/skills/durable-objects)
5656
for the hosting model and the [`capnweb`](../capnweb/SKILL.md)
5757
skill for the RPC surface itself.
58-
- **`packages/wsd`** runs in a sandbox container, not in a Worker.
58+
- **`packages/computerd`** runs in a sandbox container, not in a Worker.
5959
Load [`sandbox-sdk`](https://github.com/cloudflare/skills/tree/main/skills/sandbox-sdk)
6060
if you're working on the container boundary; the FUSE and
6161
HTTP/WebSocket internals are local to the package.

0 commit comments

Comments
 (0)