You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The route read sync revisions through rpc.sync.watermarks() but sat at
/__computerd/watermarks, alongside runtime info and process memory. Those
report on the daemon; this reports the workspace, and it returns exactly
what a session would.
It is now /api/watermarks, which draws the line where it belongs: /api is
the workspace surface, including anything that reads through it, and
/__computerd is daemon introspection.
Only the exact /api path upgrades, so a handshake aimed at the subpath
still answers 404, and the shared secret covers the new path the same way
it covered the old one.
|`/api`|`GET` (upgrade)|WebSocket capnweb transport — the bootstrap stub is `WorkspaceRPC`. A request without an `Upgrade` header gets `400`; an unsupported `Sec-WebSocket-Version` gets `426` and the versions the server speaks. |
54
+
|`/api`|`GET`(upgrade) | WebSocket capnweb transport — the bootstrap stub is `WorkspaceRPC`. Only the exact path upgrades. A request without an `Upgrade` header gets `400`; an unsupported `Sec-WebSocket-Version` gets `426` and the versions the server speaks. |
55
+
|`/api/watermarks`|`GET`, `HEAD`|Sync revisions: `currentRev`, `pushRev`, `fetchCursor`. The same values `sync.watermarks()` returns, for callers that want a few numbers without holding a session. |
56
56
|`/connect`|`POST`| Tells `computerd` to dial *out* to a caller-supplied endpoint and serve a `WorkspaceRPC` session over that outbound WebSocket. Used by the Cloudflare backend (see below). |
57
57
|`/`|`GET`| Banner/info page. |
58
58
59
+
`/api` is the workspace surface: the session itself, plus anything that
60
+
reads through it. `/__computerd` is daemon introspection, which is why
61
+
runtime info sits there and revisions do not.
62
+
59
63
The capnweb bootstrap interface is **`WorkspaceRPC`** (defined in
60
64
`packages/rpc/`), split into `sync` and `shell` sub-stubs.
Copy file name to clipboardExpand all lines: packages/computerd/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,8 +28,8 @@ Current endpoints:
28
28
-`GET /__computerd/info` returns JSON with the selected FUSE backend, mount point, and bound port.
29
29
-`GET /__computerd/stats` returns JSON with DOFS table row counts, total inline and blob byte sizes, the orphan-blob subset, and process resident memory. Useful for watching how the store grows under load.
30
30
-`GET /` returns `200 OK` with an empty JSON object: `{}`.
31
-
-`GET /__computerd/watermarks` returns JSON with `currentRev`, `pushRev`, and `fetchCursor`, read through the same `watermarks()` the wire serves. For samplers that want a few numbers without opening a session.
32
31
-`GET /api` upgrades to a WebSocket carrying the capnweb RPC surface backed by `@cloudflare/computer-rpc`. This is the container's only RPC carrier. A request without an `Upgrade` header returns `400`; a handshake naming an unsupported `Sec-WebSocket-Version` returns `426` along with the versions the server speaks.
32
+
-`GET /api/watermarks` returns JSON with `currentRev`, `pushRev`, and `fetchCursor`, read through the same `watermarks()` the wire serves. For samplers that want a few numbers without opening a session. It sits under `/api` because it reads the workspace surface; `/__computerd` is for daemon introspection.
33
33
34
34
All other paths and methods return `404`/`405` with a `text/plain` body.
0 commit comments