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 16/16, celld 0.6.2 17/17, native 17/17 (hibernation runs everywhere but Wrangler); facets are not covered.
- 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 17/17, celld 0.6.2 19/19, native 18/18 (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).
- 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 All @@ -20,7 +20,7 @@ Run from the repository root unless a command says otherwise. Node.js 22+ is req
| All automated tests | `npm test` | Runs each workspace's test script; CI uses this. |
| CLI workspace tests | `npm run test --workspace=serverless-objects` | Node built-in test runner over `packages/cli/test/*.test.js`. |
| Conformance (Wrangler) | `npm run test:wrangler --workspace=sobjects-conformance` | Runs the conformance app under pinned `wrangler dev`; CI runs this. |
| Conformance (celld) | `npm run test:celld --workspace=sobjects-conformance` | Runs the same cases against celld, including an alarm across a restart and hibernation; not run in CI. |
| Conformance (celld) | `npm run test:celld --workspace=sobjects-conformance` | Runs the same cases against celld, including an alarm across a restart, hibernation and facets; not run in CI. |
| Benchmark | `npm run bench --workspace=sobjects-conformance -- --target native` (or `celld`, `wrangler`, `--url URL`) | Runs `bench-app/` and prints latency/throughput; not run in CI. Results and durability caveats in `docs/benchmarks.md`. |
| Conformance (Cloudflare) | `npm run test:cloudflare --workspace=sobjects-conformance` | Deploys both apps with `wrangler deploy` to the account Wrangler is logged in to, runs every check, then deletes the Workers (`--keep-deployment` keeps them). Outward-facing: needs the account owner's OK; not run in CI. |
| Conformance (native) | `npm run test:native --workspace=sobjects-conformance` (add `-- --native-threads 3` for threads) | Runs them against the native engine from this checkout; CI runs both. |
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ 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 (16/16), celld 0.6.2 (17/17) and the native engine (17/17): 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, and an Agents SDK suite: state, SQL, schedules, addressing and `@callable()` RPC.
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 (17/17), celld 0.6.2 (19/19) and the native engine (18/18): 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, and an Agents SDK suite: state, SQL, schedules (including one across a restart), addressing and `@callable()` RPC.

Not covered yet: sockets across a cell move between nodes, facets, PartyServer, Agents SDK chat, MCP and Workflows, and Cloudflare-hosted production behavior. 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, 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.

## Repository layout

Expand All @@ -115,7 +115,7 @@ celld is driven through a small contract: the Wrangler bundle, the Wrangler conf
| Engine | Status | Notes |
|---|---|---|
| [celld](https://github.com/denoland/celld) | Supported (0.6.2, pinned) | Runs Wrangler bundles with Durable Objects, KV, D1, R2, Queues, Workflows and Containers. |
| native | In progress: `sobjects dev --engine native` | Runs the Worker and Durable Objects in Node, with each object in its own SQLite file and full Node APIs inside objects. It passes the full conformance suite (17/17, hibernation and the Agents SDK included), with idle eviction. `sobjects build --strict` checks that an app stays portable to Cloudflare. `--backup-bucket` backs objects up to S3-compatible storage (with `--backup-mode durable`, every acknowledged write is in the bucket), `--threads N` spreads objects over worker threads, and `--node-name` lets several nodes share one bucket, taking over each other's objects and forwarding calls. A `[native]` table in `sobjects.toml` runs it under `sobjects up`. For trusted code. See [the native engine](docs/native-engine.md). |
| native | In progress: `sobjects dev --engine native` | Runs the Worker and Durable Objects in Node, with each object in its own SQLite file and full Node APIs inside objects. It passes the full conformance suite (18/18, hibernation and the Agents SDK included, with facets skipped), with idle eviction. `sobjects build --strict` checks that an app stays portable to Cloudflare. `--backup-bucket` backs objects up to S3-compatible storage (with `--backup-mode durable`, every acknowledged write is in the bucket), `--threads N` spreads objects over worker threads, and `--node-name` lets several nodes share one bucket, taking over each other's objects and forwarding calls. A `[native]` table in `sobjects.toml` runs it under `sobjects up`. For trusted code. See [the native engine](docs/native-engine.md). |

## Why

Expand Down
2 changes: 1 addition & 1 deletion deploy/compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ The dashboard and admin API stay on loopback inside the container; don't publish

## Notes

- **Pinned versions:** the image pins `serverless-objects` with the `SOBJECTS_VERSION` build argument (default `0.13.4`), and that CLI pins celld 0.6.2. To upgrade, change the argument and rebuild. The `local-s3` profile pins SeaweedFS (`chrislusf/seaweedfs:4.48`); change the tag in `compose.yaml` to move it.
- **Pinned versions:** the image pins `serverless-objects` with the `SOBJECTS_VERSION` build argument, whose default release-please keeps in step with the CLI release, and that CLI pins celld 0.6.2. To upgrade, change the argument and rebuild. The `local-s3` profile pins SeaweedFS (`chrislusf/seaweedfs:4.48`); change the tag in `compose.yaml` to move it.
- **Graceful stop:** on stop, celld drains and releases its lease. `stop_grace_period` is 60 s; a stop took about 17 s in testing.
- **Key permissions:** the private key must be readable by uid 999, the container's `sobjects` user, and by nobody else: `chmod 600 tls/privkey.pem && sudo chown 999 tls/privkey.pem`. Don't make it world-readable (`chmod 644`), which exposes it to every account on the host.
- **Platforms:** linux/arm64 and linux/amd64. The full stack has been tested on arm64 (Docker on macOS). CI builds the amd64 image and checks that `sobjects` and `celld` run in it.
Expand Down
8 changes: 4 additions & 4 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.
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.

## Product and runtime behavior

Expand All @@ -16,17 +16,17 @@ This table distinguishes behavior exercised by the project from functionality de
| `deleteAll()` clears alarm | Tested on Wrangler and celld | Passed with compatibility date `2026-02-24` or later. |
| Basic WebSockets | Tested on Wrangler and celld | Upgrade, echo, attachment, tags and auto-response passed. |
| WebSocket hibernation/eviction | Tested on celld | Same-node hibernation passed on celld 0.6.2: the object was evicted with a socket open, and the next message reached a new instance with tags and attachment intact. Not run on Wrangler (no eviction control). celld documents that sockets may close when a cell moves between nodes; that is not tested. |
| Facets | Not tested in conformance v0 | Not covered by the current app or results. |
| Facets | Tested on Wrangler and celld | `ctx.facets.get` with a class taken from `ctx.exports` passed on Wrangler 4.150.0 and celld 0.6.2: state by name, isolation between facets, storage separate from the parent, and alarms refused. The native engine does not implement `ctx.facets`, so the check is skipped there. |
| Durable Object migrations | Limited upstream support | celld 0.6.2 accepts `tag` and `new_sqlite_classes`; rename/delete/transfer migrations are rejected. |
| Agents SDK / PartyServer | Partial | A minimal `agents` 0.28.1 app was deployed through `sobjects deploy` and served by `sobjects up` behind TLS ingress (celld 0.6.2, SeaweedFS): routing, `setState`, `this.sql`, `schedule()` (including one pending across a node restart), and the WebSocket identity/state protocol matched `wrangler dev`. Callable RPC passes in the conformance suite on celld and the native engine (Agents SDK client protocol), but has not been exercised through `sobjects deploy`/`up`; chat agents, MCP, Workflows and the official samples have not been run through the CLI. PartyServer chat was tested only directly on celld in M0. See [M0 findings](conformance/m0-celld.md). |
| Agents SDK / PartyServer | Partial | A minimal `agents` 0.28.1 app was deployed through `sobjects deploy` and served by `sobjects up` behind TLS ingress (celld 0.6.2, SeaweedFS): routing, `setState`, `this.sql`, `schedule()` (including one pending across a node restart), and the WebSocket identity/state protocol matched `wrangler dev`. Callable RPC passes in the conformance suite on celld and the native engine (Agents SDK client protocol), and a delayed schedule now survives a process restart there, but neither has been exercised through `sobjects deploy`/`up`; chat agents, MCP, Workflows and the official samples have not been run through the CLI. PartyServer chat was tested only directly on celld in M0. See [M0 findings](conformance/m0-celld.md). |
| Cloudflare-hosted production behavior | Not tested | Local Wrangler and celld results do not certify production Cloudflare behavior. |

## Bindings and topology

| 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, tested once 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. Gaps seen on macOS: `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: Linux, `S3Mount`, `DirectoryBackup`, sleep and restart. |
| 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. |
| 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
Loading
Loading