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
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Guidance for agents working in this repository. Prefer the checked-in code and t
## 1. Project

- Published on npm as one package, `serverless-objects` (0.13.x, pre-alpha). It contains the `sobjects` CLI, the native engine, and the `serverless-objects/hotcell` and `serverless-objects/autopilot` modules. There is no `@serverless-objects` npm scope; ship new modules as subpath exports of this package.
- Two engines: celld (external, pinned 0.6.2) and the native engine (`sobjects dev --engine native`: in-process, trusted code, node:sqlite per object). Conformance: Cloudflare 17/17 (`test:cloudflare`, deploys to the logged-in account and deletes afterwards), Wrangler 4.150.0 21/21, celld 0.6.2 24/24, native 23/23 (hibernation runs everywhere but Wrangler; facets pass on Wrangler and celld but not the native engine; a schedule across restart runs on celld and native; the PartyServer suite runs on Wrangler, celld and native but not Cloudflare). The Agents app also passes 6/6 through `sobjects deploy`/`up` (`test:product`, not in CI).
- Two engines: celld (external, pinned 0.6.2) and the native engine (`sobjects dev --engine native`: in-process, trusted code, node:sqlite per object). Conformance: Cloudflare 17/17 (`test:cloudflare`, deploys to the logged-in account and deletes afterwards), Wrangler 4.150.0 21/21, celld 0.6.2 24/24, native 23/23 (hibernation runs everywhere but Wrangler; facets pass on Wrangler and celld but not the native engine; a schedule across restart runs on celld and native; the PartyServer suite runs on Wrangler, celld and native but not Cloudflare). The Agents app also passes 6/6 through `sobjects deploy`/`up` (`test:product`, not in CI). A separate celld-only containers suite (`test:containers`, 8/8 on Linux arm64 in Docker Desktop's Linux VM) covers `ctx.container` start/exec/HTTP, `enableInternet: false`, sleep and restart; `S3Mount` and `DirectoryBackup` are unsupported because celld rejects `interceptOutboundHttp`.
- ACME HTTP-01 is verified only against a local Pebble server. Point-in-time restore is not available on celld 0.6. The native engine has bucket backups (`--backup-bucket`; `--backup-mode durable` holds each result until its writes are in the bucket and adds Cloudflare's point-in-time recovery API, back `--backup-retention-days`), several nodes per bucket (`--node-name`, `--peer-listen`), and optional worker threads (`--threads`; fault and CPU isolation, not a security boundary). A `[native]` table in `sobjects.toml` (instead of `[celld]`) makes `sobjects up` run it as `sobjects dev --engine native` in a child process; `[admin]` isn't supported with it yet. Roadmap targets are not guarantees.

Serverless Objects is a self-hostable operating layer for Cloudflare Workers and Durable Objects applications, aimed at coding-agent infrastructure. It is JavaScript (ES modules) on Node.js >=22, managed with npm workspaces; the product is the `sobjects` CLI (workspace package `serverless-objects`). The CLI supervises the external celld runtime (pinned v0.6.2) for production nodes and also ships a Node-native engine for trusted code. Cloudflare Workers/Wrangler APIs are the compatibility contract. The dashboard is plain HTML/CSS/JS; there is no application framework or TypeScript codebase. Status: pre-alpha.
Expand Down Expand Up @@ -55,7 +55,7 @@ CI: `.github/workflows/ci.yml` runs `npm ci`, `npm test`, and the Wrangler and n
| `packages/cli/autopilot/` | `serverless-objects/autopilot` (and `/autopilot/cell`): `RunObject`/`RunRegistry`/`AutopilotCellRun`. Runtime-independent logic in `run-store.js`, `run-host.js`, `registry-store.js` and `cell-executor.js` over an `{exec, transaction}` SQL adapter; tests (`test/autopilot-*.test.js`) use `node:sqlite`. |
| `deploy/compose/` | Dockerfile and Compose bundle for a single node; pins the npm CLI version via `SOBJECTS_VERSION`. |
| `examples/` | Runnable Wrangler projects (not workspaces) that import the packages through the root `node_modules`. |
| `packages/conformance/` | Private workspace: conformance apps (`app/` core, `agents-app/` Agents SDK, `party-app/` PartyServer), runners (`src/run.js` for Wrangler, celld and native; `src/product.js` for `sobjects deploy`/`up`), and runner tests. |
| `packages/conformance/` | Private workspace: conformance apps (`app/` core, `agents-app/` Agents SDK, `party-app/` PartyServer, `containers-app/` celld containers), runners (`src/run.js` for Wrangler, celld and native; `src/product.js` for `sobjects deploy`/`up`), and runner tests. |
| `sobjects.example.toml` | Safe starter configuration; copy to the ignored, machine-specific `sobjects.toml`. |
| `docs/conformance/` | Recorded Workers/celld compatibility findings (`m0-celld.md`) and conformance results (`results.md`); consult before changing runtime assumptions. |
| `docs/install.md`, `docs/porting-from-cloudflare.md`, `docs/compatibility.md` | User guides and the supported/unsupported table; keep them in step with conformance results. |
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,17 @@ State survives `down` and `up` because it lives in the bucket. The [install guid

## Compatibility

Cloudflare's APIs are the contract. The current [conformance results](docs/conformance/results.md) pass every check on real Cloudflare (17/17), Wrangler 4.150.0 (21/21), celld 0.6.2 (24/24) and the native engine (23/23): the same apps, unchanged. They cover Durable Object IDs, KV and SQL storage, transactions, input gates, RPC, alarms (including across a restart), WebSockets with hibernation on celld, facets on Wrangler and celld, an Agents SDK suite (state, SQL, schedules including one across a restart, addressing and `@callable()` RPC), and a PartyServer suite (storage, alarms, room routing, broadcast and hibernation). The Cloudflare run predates the PartyServer suite. The Agents app also passes 6/6 through `sobjects deploy` and `sobjects up` behind TLS ingress (`test:product`).
Cloudflare's APIs are the contract. The current [conformance results](docs/conformance/results.md) pass every check on real Cloudflare (17/17), Wrangler 4.150.0 (21/21), celld 0.6.2 (24/24) and the native engine (23/23): the same apps, unchanged. They cover Durable Object IDs, KV and SQL storage, transactions, input gates, RPC, alarms (including across a restart), WebSockets with hibernation on celld, facets on Wrangler and celld, an Agents SDK suite (state, SQL, schedules including one across a restart, addressing and `@callable()` RPC), and a PartyServer suite (storage, alarms, room routing, broadcast and hibernation). The Cloudflare run predates the PartyServer suite. The Agents app also passes 6/6 through `sobjects deploy` and `sobjects up` behind TLS ingress (`test:product`). A separate celld-only containers suite (8/8 on Linux arm64 in Docker Desktop's Linux VM) covers `ctx.container`: start, exec, HTTP over a container port, `enableInternet: false`, sleep and restart; `S3Mount` and `DirectoryBackup` are unsupported because celld rejects `interceptOutboundHttp`.

Not covered yet: sockets across a cell move between nodes, PartyServer on Cloudflare or through `sobjects deploy`, Agents SDK chat, MCP and Workflows, and Cloudflare-hosted production behavior. Facets pass on Wrangler and celld but are not implemented by the native engine. Point-in-time restore isn't available on celld 0.6; the native engine has Cloudflare's point-in-time recovery API in durable mode. The [compatibility table](docs/compatibility.md) has the details, including Containers and `@cloudflare/sandbox` 1.0 on celld. The [porting guide](docs/porting-from-cloudflare.md) covers moving an existing project.
Not covered yet: sockets across a cell move between nodes, PartyServer on Cloudflare or through `sobjects deploy`, Agents SDK chat, MCP and Workflows, containers on a bare-metal Linux host or Linux x64, and Cloudflare-hosted production behavior. Facets pass on Wrangler and celld but are not implemented by the native engine. Point-in-time restore isn't available on celld 0.6; the native engine has Cloudflare's point-in-time recovery API in durable mode. The [compatibility table](docs/compatibility.md) has the details, including Containers and `@cloudflare/sandbox` 1.0 on celld. The [porting guide](docs/porting-from-cloudflare.md) covers moving an existing project.

## Repository layout

| Path | What |
|---|---|
| [`packages/cli`](packages/cli) | The `serverless-objects` npm package: the `sobjects` CLI (`src/`), the Hotcell Sandbox binding (`hotcell/`, imported as `serverless-objects/hotcell`) and Autopilot run objects (`autopilot/`, imported as `serverless-objects/autopilot`). Its README is the CLI reference. |
| [`examples/autopilot-runs`](examples/autopilot-runs) | An HTTP demo of run objects: wake after restart, event streams, reconcile. |
| [`packages/conformance`](packages/conformance) | Conformance apps and the Wrangler, celld, native and product-path runners. |
| [`packages/conformance`](packages/conformance) | Conformance apps and the Wrangler, celld, native and product-path runners, including the celld-only containers suite. |
| [`deploy/compose`](deploy/compose) | Dockerfile and Compose bundle for a single node, with an optional local SeaweedFS bucket. |
| [`docs/`](docs) | Install, porting and compatibility guides, and recorded conformance results. |

Expand Down
4 changes: 2 additions & 2 deletions docs/compatibility.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Compatibility and support status

This table distinguishes behavior exercised by the project from functionality described by celld upstream. A celld capability is not automatically a Serverless Objects product guarantee. The conformance results are one local run on macOS arm64 using Wrangler 4.150.0, celld 0.6.2 and the native engine, plus one deployment to Cloudflare; they are not a cross-platform or Cloudflare production certification. CI runs the Wrangler and native suites on Ubuntu x64 but records no results, so the table is macOS arm64 evidence plus unrecorded Ubuntu x64 CI coverage.
This table distinguishes behavior exercised by the project from functionality described by celld upstream. A celld capability is not automatically a Serverless Objects product guarantee. The conformance results are one local run on macOS arm64 using Wrangler 4.150.0, celld 0.6.2 and the native engine, plus one deployment to Cloudflare, and a celld-only containers run on Linux arm64 in Docker Desktop's Linux VM; they are not a cross-platform or Cloudflare production certification. CI runs the Wrangler and native suites on Ubuntu x64 but records no results, so the table is macOS arm64 evidence plus unrecorded Ubuntu x64 CI coverage, with the Containers row from the Linux arm64 run.

## Product and runtime behavior

Expand All @@ -27,7 +27,7 @@ This table distinguishes behavior exercised by the project from functionality de
| Capability | Status | Notes |
|---|---|---|
| celld Durable Objects, KV, D1, R2, Queues, Workflows | Upstream-reported | Listed by celld 0.6.2; this conformance suite does not exercise every binding. Check celld's release documentation for exact feature limits. |
| Containers (`ctx.container`) and `@cloudflare/sandbox` 1.0 | Partial, one manual run on celld with Docker | celld 0.6.2 runs Wrangler `containers` classes on a local Docker or Podman engine. A DO using stock `@cloudflare/sandbox` 1.0.1 (`Files.writeFile`/`readFile`, `ctx.container.exec`) worked with an image built `FROM alpine` plus `sandbox-shim` copied from `cloudflare/sandbox:1.0.1`, which is a tools-only image with no command. That was a manual run on macOS through Docker Desktop, not an automated conformance case, and it exercises Docker's Linux VM rather than a Linux host. Gaps seen there: `exec()` straight after `start()` fails with "No such container" while the container is still being created, where Cloudflare's own example calls them back to back; `enableInternet: false` is not enforced (celld logs a warning); `container.images` is undefined. Not tested: a Linux host, `S3Mount`, `DirectoryBackup`, sleep and restart. |
| Containers (`ctx.container`) and `@cloudflare/sandbox` 1.0 | Partial, automated on Linux arm64 in Docker Desktop's Linux VM | celld 0.6.2 runs Wrangler `containers` classes on a local Docker or Podman engine. `npm run test:containers` (8/8) verified on Linux arm64 in Docker Desktop 4.75.0's Linux VM, with celld in a privileged container using the host Docker socket: `start()`, `exec()`, `getTcpPort().fetch()`, `enableInternet: false` (egress refused), idle eviction with the container kept alive and reattached, and a node restart destroying the container. `@cloudflare/sandbox` 1.0.1's `S3Mount.mount()` and `DirectoryBackup` are unsupported: both need `interceptOutboundHttp`, which celld rejects with "not implemented in celld"; `inspect()`, `snapshotDirectory()`, `snapshotContainer()` and `container.images` are also unavailable. `exec()` immediately after `start()` fails with "No such container" because celld's `start()` is fire-and-forget, while Cloudflare's `exec()` waits for a starting container; that is celld's behavior, not the CLI's, and the conformance app polls `exec()` for readiness. Not tested: a bare-metal Linux host, Linux x64, `@cloudflare/sandbox`'s `Files` API, and containers on Wrangler or Cloudflare. See [the containers record](conformance/containers.md). |
| Workers AI, Vectorize, Hyperdrive, Browser Rendering, Email Workers | Not provided by celld 0.6.2 | Serverless Objects does not implement replacements. |
| Single-host `sobjects up` | Implemented and smoke-tested | The current product is a single-host operating layer by default. Keep operator/admin listeners on loopback. |
| Multi-node object placement | Native engine only | `--node-name` shares one bucket prefix between nodes, with leases, takeover, drain and call forwarding ([details](native-engine.md#several-nodes)). celld runs one node per bucket prefix. |
Expand Down
66 changes: 66 additions & 0 deletions docs/conformance/containers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Containers conformance — celld 0.6.2

Recorded 2 Nov 2026 on Linux arm64 in Docker Desktop 4.75.0's Linux VM, with
celld 0.6.2 and `@cloudflare/sandbox` 1.0.1. celld ran in a privileged
`node:22-bookworm` container with the host Docker socket and host network, so
the containers it created ran on the Docker Desktop Linux VM. That is a Linux
kernel and userspace, not a bare-metal Linux host; a bare-metal Linux host and
Linux x64 were not tested.

Command:

```sh
npm run test:containers --workspace=sobjects-conformance
```

The runner starts `celld dev` with `CELLD_IDLE_EVICT_S=2`, copies
`containers-app/` into a disposable `.runs/` directory, and drives the app over
HTTP. The image is `python:3.12-alpine` plus `fuse3`, `s3fs-fuse` and the
`sandbox-shim` copied from `cloudflare/sandbox:1.0.1` (a tools-only image with
no command). The shim is an x86-64 static binary; it ran under the host's
binfmt emulation.

| Check | Result | Notes |
|---|---|---|
| `start()`, `exec()`, `getTcpPort().fetch()` | Pass | `exec()` ran `uname -s` (`Linux`) and read a marker file; `getTcpPort(8080).fetch()` returned the container's HTTP response. |
| `enableInternet: false` | Pass | A container started with `enableInternet: false` could not connect to `1.1.1.1:443` (`OSError: [Errno 101] Network unreachable`); a container started with `enableInternet: true` connected. |
| `exec()` immediately after `start()` | Divergence recorded | `exec()` failed with `create exec failed with [404] No such container: ...` while the container was still being created. See below. |
| `container.images` | Undefined | `ctx.container.images` is `undefined`. |
| `interceptOutboundHttp`, `interceptAllOutboundHttp` | Rejected | Both reject with `... is not implemented in celld`. |
| `inspect`, `snapshotDirectory`, `snapshotContainer` | Rejected | All three reject with `... is not implemented in celld`. |
| `S3Mount.mount()` | Unsupported | `@cloudflare/sandbox` 1.0.1's `S3Mount.mount()` failed with `interceptOutboundHttp() is not implemented in celld`. |
| `DirectoryBackup.intercept()` / `backup()` | Unsupported | `intercept()` failed with `interceptOutboundHttp() is not implemented in celld`; `backup()` then failed with `env.BACKUPS is not an R2 bucket binding` because the app has no R2 binding. |
| Sleep (idle eviction) | Pass | With `CELLD_IDLE_EVICT_S=2`, the object was evicted while idle. The next request reached a new object instance, and the same running container answered with its marker file and hostname intact. |
| Restart | Pass | Stopping and starting celld destroyed the container: the next request found `running` false and no marker file, and a new `start()` created a container with a different hostname. |

## The `exec()`-after-`start()` race

Cloudflare's `exec()` documentation says it "waits for a container that is
still starting". celld's `start()` is fire-and-forget: it returns before the
engine has created the container, and `exec()` rejects with
`create exec failed with [404] No such container: ...` until the container
exists. `container.running` is not a readiness signal either: celld sets it
when the run begins, before the engine has created the container, and the
value observed immediately after `start()` differed between the macOS and
Linux runs.

This is celld's behavior, not the CLI's: the CLI does not wrap `ctx.container`.
The conformance app polls `exec()` for readiness, which is the workaround an
application needs on celld 0.6.2. Upstream celld would need to make `exec()`
wait for a starting container, as Cloudflare documents; the CLI cannot fix it
without replacing the runtime's `ctx.container`.

## What remains unsupported

- `S3Mount` and `DirectoryBackup` need `interceptOutboundHttp`, which celld
0.6.2 rejects. `S3Mount` also needs FUSE and `s3fs` in the image; celld's
default runtime drops all Linux capabilities and does not pass `/dev/fuse`,
so a mount would not work even if the intercept existed.
- `inspect()`, `snapshotDirectory()`, `snapshotContainer()` and
`container.images` are not implemented.
- `enableInternet: false` is enforced on Linux; celld documents that it has no
effect on macOS, where the node reaches a container through a published port.
- A bare-metal Linux host, Linux x64, and containers on Wrangler or Cloudflare
were not tested.
- The earlier manual macOS run exercised `@cloudflare/sandbox`'s
`Files.writeFile`/`readFile`; this suite does not repeat that check.
Loading
Loading