solid-objects 0.13.2 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/CHANGELOG.md +126 -0
  2. package/README.md +188 -68
  3. package/dist/actor.d.ts +1 -0
  4. package/dist/actor.d.ts.map +1 -1
  5. package/dist/actor.js +9 -0
  6. package/dist/actor.js.map +1 -1
  7. package/dist/broadcast-worker.d.ts +1 -1
  8. package/dist/broadcast-worker.d.ts.map +1 -1
  9. package/dist/broadcast-worker.js +1 -1
  10. package/dist/broadcast-worker.js.map +1 -1
  11. package/dist/broken-pipe.d.ts +5 -0
  12. package/dist/broken-pipe.d.ts.map +1 -0
  13. package/dist/broken-pipe.js +8 -0
  14. package/dist/broken-pipe.js.map +1 -0
  15. package/dist/browser/host.d.ts +8 -0
  16. package/dist/browser/host.d.ts.map +1 -0
  17. package/dist/browser/host.js +22 -0
  18. package/dist/browser/host.js.map +1 -0
  19. package/dist/browser/tab-host.d.ts +43 -0
  20. package/dist/browser/tab-host.d.ts.map +1 -0
  21. package/dist/browser/tab-host.js +196 -0
  22. package/dist/browser/tab-host.js.map +1 -0
  23. package/dist/cli.d.ts +1 -0
  24. package/dist/cli.d.ts.map +1 -1
  25. package/dist/cli.js +6 -3
  26. package/dist/cli.js.map +1 -1
  27. package/dist/context.js +2 -2
  28. package/dist/context.js.map +1 -1
  29. package/dist/database/deadline.js +2 -2
  30. package/dist/database/deadline.js.map +1 -1
  31. package/dist/database/mysql.d.ts +1 -0
  32. package/dist/database/mysql.d.ts.map +1 -1
  33. package/dist/database/mysql.js +1 -0
  34. package/dist/database/mysql.js.map +1 -1
  35. package/dist/database/postgresql.d.ts +1 -0
  36. package/dist/database/postgresql.d.ts.map +1 -1
  37. package/dist/database/postgresql.js +1 -0
  38. package/dist/database/postgresql.js.map +1 -1
  39. package/dist/database/shared-sqlite-wasm.d.ts +74 -0
  40. package/dist/database/shared-sqlite-wasm.d.ts.map +1 -0
  41. package/dist/database/shared-sqlite-wasm.js +542 -0
  42. package/dist/database/shared-sqlite-wasm.js.map +1 -0
  43. package/dist/database/sqlite-wasm.d.ts +30 -0
  44. package/dist/database/sqlite-wasm.d.ts.map +1 -0
  45. package/dist/database/sqlite-wasm.js +185 -0
  46. package/dist/database/sqlite-wasm.js.map +1 -0
  47. package/dist/database/sqlite.d.ts +1 -0
  48. package/dist/database/sqlite.d.ts.map +1 -1
  49. package/dist/database/sqlite.js +1 -0
  50. package/dist/database/sqlite.js.map +1 -1
  51. package/dist/database/transaction-context.js +2 -2
  52. package/dist/database/transaction-context.js.map +1 -1
  53. package/dist/doctor.js +1 -1
  54. package/dist/doctor.js.map +1 -1
  55. package/dist/effect-worker.d.ts +1 -1
  56. package/dist/effect-worker.d.ts.map +1 -1
  57. package/dist/effect-worker.js +1 -1
  58. package/dist/effect-worker.js.map +1 -1
  59. package/dist/examples/quickstart-report.js +127 -0
  60. package/dist/examples/quickstart-report.js.map +1 -0
  61. package/dist/examples/sqlite-quickstart.js +59 -7
  62. package/dist/examples/sqlite-quickstart.js.map +1 -1
  63. package/dist/executable.js +4 -0
  64. package/dist/executable.js.map +1 -1
  65. package/dist/index.d.ts +3 -1
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/index.js +3 -1
  68. package/dist/index.js.map +1 -1
  69. package/dist/platform/context-store.d.ts +11 -0
  70. package/dist/platform/context-store.d.ts.map +1 -0
  71. package/dist/platform/context-store.js +28 -0
  72. package/dist/platform/context-store.js.map +1 -0
  73. package/dist/platform/host-identity.d.ts +11 -0
  74. package/dist/platform/host-identity.d.ts.map +1 -0
  75. package/dist/platform/host-identity.js +17 -0
  76. package/dist/platform/host-identity.js.map +1 -0
  77. package/dist/platform/node.d.ts +2 -0
  78. package/dist/platform/node.d.ts.map +1 -0
  79. package/dist/platform/node.js +11 -0
  80. package/dist/platform/node.js.map +1 -0
  81. package/dist/platform/turn-context-store.d.ts +7 -0
  82. package/dist/platform/turn-context-store.d.ts.map +1 -0
  83. package/dist/platform/turn-context-store.js +17 -0
  84. package/dist/platform/turn-context-store.js.map +1 -0
  85. package/dist/platform/uuid.d.ts +2 -0
  86. package/dist/platform/uuid.d.ts.map +1 -0
  87. package/dist/platform/uuid.js +4 -0
  88. package/dist/platform/uuid.js.map +1 -0
  89. package/dist/platform/web-locks.d.ts +2 -0
  90. package/dist/platform/web-locks.d.ts.map +1 -0
  91. package/dist/platform/web-locks.js +8 -0
  92. package/dist/platform/web-locks.js.map +1 -0
  93. package/dist/reminder-scheduler.d.ts +1 -1
  94. package/dist/reminder-scheduler.d.ts.map +1 -1
  95. package/dist/reminder-scheduler.js +1 -1
  96. package/dist/reminder-scheduler.js.map +1 -1
  97. package/dist/repository.d.ts.map +1 -1
  98. package/dist/repository.js +13 -6
  99. package/dist/repository.js.map +1 -1
  100. package/dist/runtime.d.ts +25 -1
  101. package/dist/runtime.d.ts.map +1 -1
  102. package/dist/runtime.js +62 -1
  103. package/dist/runtime.js.map +1 -1
  104. package/dist/serialization.d.ts.map +1 -1
  105. package/dist/serialization.js +2 -1
  106. package/dist/serialization.js.map +1 -1
  107. package/dist/transmit-effect.d.ts +2 -0
  108. package/dist/transmit-effect.d.ts.map +1 -0
  109. package/dist/transmit-effect.js +2 -0
  110. package/dist/transmit-effect.js.map +1 -0
  111. package/dist/transmit.d.ts +27 -0
  112. package/dist/transmit.d.ts.map +1 -0
  113. package/dist/transmit.js +105 -0
  114. package/dist/transmit.js.map +1 -0
  115. package/dist/version.d.ts +1 -1
  116. package/dist/version.js +1 -1
  117. package/dist/web/index.d.ts +1 -0
  118. package/dist/web/index.d.ts.map +1 -1
  119. package/dist/web/index.js +1 -0
  120. package/dist/web/index.js.map +1 -1
  121. package/dist/worker.d.ts +1 -1
  122. package/dist/worker.d.ts.map +1 -1
  123. package/dist/worker.js +1 -1
  124. package/dist/worker.js.map +1 -1
  125. package/docs/api.md +199 -20
  126. package/docs/architecture.md +50 -23
  127. package/docs/authorization.md +6 -5
  128. package/docs/benchmarks.md +87 -65
  129. package/docs/browser-protocol.md +62 -3
  130. package/docs/comparisons.md +14 -9
  131. package/docs/configuration.md +2 -2
  132. package/docs/correctness.md +30 -17
  133. package/docs/dashboard.md +6 -6
  134. package/docs/errors-and-recovery.md +12 -12
  135. package/docs/fit.md +3 -0
  136. package/docs/operations.md +33 -19
  137. package/docs/parity.md +126 -47
  138. package/docs/releasing.md +11 -5
  139. package/docs/state-and-lifecycle.md +12 -8
  140. package/docs/support.md +56 -20
  141. package/examples/failure-recovery/actor.ts +6 -8
  142. package/examples/failure-recovery/demo.ts +8 -26
  143. package/examples/failure-recovery/serialization.ts +133 -0
  144. package/examples/quickstart-report.ts +151 -0
  145. package/examples/sqlite-quickstart.ts +76 -16
  146. package/package.json +29 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,131 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.14.0 - 2026-08-23
4
+
5
+ - Add `solid-objects/database/shared-sqlite-wasm`, the transparent
6
+ multi-tab database. Every tab runs an ordinary
7
+ `configure -> install -> ref` flow against the same shared database; the
8
+ adapter elects one holder per origin with the Web Locks API, sends every
9
+ other tab's SQL over a `BroadcastChannel` session to the holder, and
10
+ fails over onto the same OPFS state when the holder's tab dies. The
11
+ runtime's leases and fencing arbitrate the tabs' workers exactly as they
12
+ arbitrate Node processes. A Playwright test proves plain actor references
13
+ incrementing one durable counter from two tabs with failover.
14
+ - Add `solid-objects/browser/tab-host`, the multi-tab host that completes
15
+ milestone M3 of the in-browser runtime plan
16
+ ([#17](https://github.com/cardmagic/solid-objects-js/issues/17)). Every
17
+ tab starts a candidate host; the Web Locks API elects one leader per
18
+ origin, and only the leader opens the database and runs the runtime.
19
+ Tabs invoke actors through a `BroadcastChannel` client that retries with
20
+ idempotent request ids. When the leader's tab dies, the lock releases,
21
+ the next host promotes, and the runtime continues from the same OPFS
22
+ state. A Playwright test proves shared state across two tabs and
23
+ failover after the leader closes.
24
+ - Share the transmit wire contract with the Ruby gem. The golden fixture
25
+ file `compatibility/transmit-envelopes.json` is committed to both
26
+ repositories with a consuming test on each side; `receiveTransmitEnvelope`
27
+ now defaults a missing `arguments` to an empty object, matching the Ruby
28
+ ingest and the staging side.
29
+ - Add `solid-objects/transmit`, milestone M4 of the plan. An actor
30
+ stages a transmit intent with `this.transmit().operation(arguments)` (or with
31
+ `emit(TRANSMIT_EFFECT, ...)` for a different target) in the same
32
+ transaction as its state change. `registerTransmit` drains the outbox
33
+ with at-least-once delivery and per-actor order (an ordered drain up to
34
+ the claimed effect's mailbox sequence), and `receiveTransmitEnvelope` gives
35
+ the server an idempotent ingest keyed on the effect id. Vitest covers
36
+ order under transmit failures, replay deduplication, and recovery after
37
+ an offline period; a Playwright test drains a browser outbox into the
38
+ Node server runtime.
39
+ - Change `TurnContextStore` to synchronous scoping. The store no longer
40
+ stays set across `await` boundaries, so an open transaction scope cannot
41
+ leak into interleaved tasks and trip the inside-transaction guards. In
42
+ the browser those guards are best-effort; Node keeps full
43
+ `AsyncLocalStorage` semantics.
44
+ - Retry OPFS SAH pool acquisition. The upstream module caches a failed
45
+ initialization; the adapter now passes `forceReinitIfPreviouslyFailed`,
46
+ so a new leader can claim the pool after the old tab dies.
47
+
48
+ - Add a platform seam for async context propagation
49
+ (`src/platform/context-store.ts`). Shared modules no longer import
50
+ `node:async_hooks` directly. Node entry points register an
51
+ `AsyncLocalStorage` factory. A `TurnContextStore` gives a browser host a
52
+ turn-scoped store for serialized actor turns. This is milestone M1 of the
53
+ in-browser runtime plan
54
+ ([#17](https://github.com/cardmagic/solid-objects-js/issues/17)).
55
+ - Route UUID generation through `src/platform/uuid.ts`, which uses the
56
+ standard `crypto.randomUUID()`. Shared modules no longer import
57
+ `node:crypto`.
58
+ - Add `check:browser-imports` to `pnpm run check`. The script walks the
59
+ import graph of the browser-safe modules and fails when a `node:` module
60
+ or a server-only driver reaches that graph.
61
+ - Add `solid-objects/browser/host`, the entry point for a runtime host
62
+ inside a browser worker. An import registers the browser platform: a
63
+ turn-scoped context store and a browser host identity. The module
64
+ re-exports the core runtime API and the WASM adapter. A Playwright test
65
+ runs the full runtime in a Chromium module worker and proves durable
66
+ actor state across a page reload. This is the first stage of milestone M3
67
+ ([#17](https://github.com/cardmagic/solid-objects-js/issues/17)).
68
+ - Replace the `Buffer.byteLength` payload size check with `TextEncoder`, so
69
+ serialization works without the Node `Buffer` global.
70
+ - Route the process identity (hostname, process id, runtime version)
71
+ through `src/platform/host-identity.ts`. The repository no longer imports
72
+ `node:os` or reads `process.pid` directly.
73
+ - Add `solid-objects/database/sqlite-wasm`, a browser-safe `Database`
74
+ adapter on `@sqlite.org/sqlite-wasm` (an optional peer dependency). The
75
+ full runtime passes its round-trip test against this adapter in Node, and
76
+ a Playwright test proves transactions, rollback, and OPFS persistence
77
+ across a page reload in Chromium. This is milestone M2 of the in-browser
78
+ runtime plan
79
+ ([#17](https://github.com/cardmagic/solid-objects-js/issues/17)).
80
+
81
+ - Add `runtime.enqueueInternalMessage()` and
82
+ `runtime.enqueueInternalMessageInTransaction(connection, options)`, public
83
+ entry points for a host package to enqueue an `internal`-delivery-mode
84
+ actor message without going through user authorization. The
85
+ transaction-scoped variant accepts a caller-supplied `DatabaseConnection`
86
+ so the enqueue can commit atomically alongside other writes in the same
87
+ transaction; call the new `runtime.announceInternalMessage(message)` after
88
+ that transaction commits to wake worker roles the same way a normal
89
+ enqueue does.
90
+ - Add `runtime.snapshotWithIncarnation(reference)`, returning the same
91
+ authorized fields as `snapshot()` alongside the read instance's
92
+ `instanceId`, `revision`, and `createdAtMs`, computed from one shared read.
93
+ `instanceId` is a random UUID, not a monotonically increasing value, so a
94
+ caller that needs to detect actor recreation (a new incarnation
95
+ superseding an old one, regardless of revision) should fence on
96
+ `createdAtMs` rather than comparing `instanceId` values directly.
97
+ `createdAtMs` orders incarnations at millisecond granularity; destroying
98
+ and recreating the same actor identity within the same millisecond
99
+ produces two incarnations a caller cannot order by `createdAtMs` alone —
100
+ see `docs/correctness.md`.
101
+
102
+ ## 0.13.3 - 2026-08-18
103
+
104
+ - Lower the supported Node.js floor from 24.15.0 to 24.4.0. Node.js 24.4.0 is
105
+ the first release that accepts `readBigInts` on the `DatabaseSync`
106
+ constructor, which the SQLite adapter needs to read 64-bit integers without
107
+ losing precision. Node.js 24.0.0 through 24.3.x ignore the option, and the
108
+ effect recovery and transaction retry tests fail there. A new CI job runs the
109
+ default suite, the build, the packaged artifact smoke test, and the recovery
110
+ demo on the floor.
111
+ - Record that `node:sqlite` stays experimental until Node.js 24.15.0 and prints
112
+ a warning on stderr before it.
113
+ - Make the failure-recovery demo's serialization proof count messages rather
114
+ than executions. A worker that loses its lease mid-operation leaves the
115
+ replacement to execute the same message again, which is the at-least-once
116
+ contract, so the proof failed on slower machines for behaviour it documents
117
+ elsewhere. Each serialization event now carries its attempt and process, so a
118
+ start pairs with its own finish instead of with whichever finish came next.
119
+ The proof asserts that every start has its own finish, that exactly the two
120
+ sent messages ran, and that the surviving attempt of each message never
121
+ overlaps another message's surviving attempt; a superseded attempt may
122
+ overlap anything, because it keeps running until it notices the lost lease and
123
+ its write is fenced out. The committed state check is unchanged, and the demo
124
+ reports the executions it saw. `assertSerializedExecution` moved into its own
125
+ module with unit coverage for the clean, retried, superseded-overlap,
126
+ still-running-replacement, unexplained-overlap, boundary, unfinished,
127
+ unmatched-finish, double-start, restart-after-finish, and lost-message cases.
128
+
3
129
  ## 0.13.2 - 2026-08-17
4
130
 
5
131
  - Accept a `key` on `schedule`, naming a reminder for the item it is waiting
package/README.md CHANGED
@@ -3,23 +3,37 @@
3
3
  [![CI](https://github.com/cardmagic/solid-objects-js/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/cardmagic/solid-objects-js/actions/workflows/ci.yml)
4
4
  [![npm](https://img.shields.io/npm/v/solid-objects)](https://www.npmjs.com/package/solid-objects)
5
5
 
6
- Self-hosted, distributed Durable Objects in Node without a daemon using your
7
- existing SQL database.
6
+ Open Source Durable Objects for JavaScript, in the SQL database you already run.
7
+ No daemon, no broker, and no new datastore.
8
8
 
9
- Build addressable TypeScript objects with serialized calls and durable state
10
- using SQLite, PostgreSQL, or MySQL, without deploying to Cloudflare.
9
+ Build addressable TypeScript objects with serialized calls and durable state on
10
+ SQLite, PostgreSQL, or MySQL. You don't need Cloudflare for this.
11
11
 
12
12
  Concurrent calls for one identity cannot overwrite each other. Calls for
13
13
  different identities can run at the same time.
14
14
 
15
15
  Define ordinary TypeScript classes and run them in ordinary Node.js processes.
16
- State, queued operations, retries, reminders, effects, and realtime
17
- invalidations are stored in the database the application already operates.
18
-
19
- > **Early release:** the correctness core has automated coverage across the
20
- > supported databases, the Chromium browser client, process recovery, and
21
- > packaged artifacts, but the TypeScript implementation is new. Read the
22
- > [delivery boundaries](#delivery-boundaries) before using it for important data.
16
+ Solid Objects keeps the state, the queued operations, the retries, the
17
+ reminders, the effects, and the realtime invalidations in the database the
18
+ application already operates.
19
+
20
+ The same runtime also runs inside a browser worker on SQLite WASM, with
21
+ durable actor state in the origin's private file system. See
22
+ [Solid Objects in the browser](#solid-objects-in-the-browser).
23
+
24
+ > **Early release:** the correctness core has automated coverage. That coverage
25
+ > includes the supported databases, the Chromium browser client, the browser
26
+ > runtime, process recovery, and the packaged artifacts. The TypeScript
27
+ > implementation is still new. There is one deployed first-party reference
28
+ > application. There is no measured scale and no third-party production use
29
+ > yet. Read the
30
+ > [delivery boundaries](#delivery-boundaries) before you use it for important
31
+ > data.
32
+
33
+ > **Not a replacement for SQL transactions:** when one row update inside one
34
+ > transaction solves the problem, use that. Solid Objects earns its cost when an
35
+ > entity needs ordered calls across requests, retries, reminders, effects, and
36
+ > realtime state. See [Good and poor fits](#good-and-poor-fits).
23
37
 
24
38
  ## The programming model
25
39
 
@@ -60,29 +74,32 @@ processes submit them concurrently.
60
74
 
61
75
  ## Run it now with SQLite
62
76
 
63
- Node.js 24.15 or newer is required. The `0.13.2` release includes a
64
- packaged quickstart:
77
+ Node.js 24.4.0 or newer is required. Node.js 24.15 or newer is preferred,
78
+ because `node:sqlite` prints an experimental warning before it. The published
79
+ package includes a quickstart:
65
80
 
66
81
  ```bash
67
- npm exec --yes --package=solid-objects@0.13.2 -- solid-objects quickstart
82
+ npm exec --yes --package=solid-objects@latest -- solid-objects quickstart
68
83
  ```
69
84
 
70
85
  The command needs no repository checkout, database server, Redis, container, or
71
86
  application configuration. It uses Node's built-in SQLite module and removes
72
87
  its scoped temporary database before exiting.
73
88
 
74
- The executable asserts rather than merely printing a plausible result. In one
75
- local run, it verifies that:
89
+ It states its plan first, prints the `Counter` class it runs, and asks for
90
+ permission. It executes the work only after you answer, and then it explains
91
+ what each result proves. It asks nothing when stdin is not a terminal, so CI
92
+ never waits. Add `--yes` to skip the question in a terminal, or `--json` for a
93
+ machine-readable summary.
76
94
 
77
- - 25 concurrent calls to one identity produce the exact committed state `25`;
78
- - their return values are the complete sequence from `1` through `25`;
79
- - operations for two different identities overlap in time; and
80
- - the runtime closes and temporary state is removed.
95
+ The executable asserts rather than merely printing a plausible result. It exits
96
+ with a non-zero code when one of those checks fails.
81
97
 
82
98
  ## What Solid Objects is for
83
99
 
84
100
  Use Solid Objects when more than one request, job, or process can act on the
85
- same logical thing and the next action must use its latest committed state.
101
+ same logical thing. The next action must then use the latest committed state of
102
+ that thing.
86
103
  These are the stateful coordination patterns for which people often reach for
87
104
  Durable Objects:
88
105
 
@@ -101,11 +118,46 @@ limiter or another very hot identity is a poor fit because it becomes an
101
118
  intentional bottleneck. If one ordinary row transaction solves the problem,
102
119
  prefer that. See [Choosing Solid Objects](docs/fit.md) for the longer guide.
103
120
 
121
+ ## Measured behavior
122
+
123
+ One developer machine, not a capacity promise. Apple M5, Node.js 24.18.0, 250
124
+ measured operations at client concurrency 16, on August 22, 2026. PostgreSQL
125
+ 17.11 and MySQL 9.7.1 run natively, not in a container.
126
+
127
+ | Measurement | Result |
128
+ | ------------------------------------------------------------- | ---------------: |
129
+ | Committed operations per second, one hot identity, SQLite | 286 to 323 ops/s |
130
+ | The same identity across four processes, SQLite | 507 to 519 ops/s |
131
+ | The same identity across four processes, PostgreSQL | 266 to 331 ops/s |
132
+ | The same identity across four processes, MySQL | 214 to 228 ops/s |
133
+ | Idle wake-up to committed result, one process | 2.66 ms p50 |
134
+ | Idle wake-up to committed result, two processes, polling only | 1,006 ms p50 |
135
+ | Idle CPU per process, 100 ms fast interval | 0.121% |
136
+ | Idle database passes per second, after backoff | 4.0 |
137
+
138
+ The four idle rows come from a separate harness on August 16, 2026.
139
+
140
+ Each range spans the synchronous and the asynchronous handler shape. Calls to
141
+ one identity are serialized on purpose, so the per-call latency in these runs
142
+ includes the wait behind the other fifteen concurrent callers. Throughput is
143
+ the honest number for that case.
144
+
145
+ The same PostgreSQL and MySQL versions in Docker Desktop reached 1.8x to 4.9x
146
+ less throughput on those rows. Measure your own deployment shape before you
147
+ plan capacity.
148
+
149
+ The polling-only row is the tradeoff to know before you deploy: use PostgreSQL
150
+ notifications or the optional Redis Pub/Sub when separate processes need
151
+ low-latency delivery.
152
+
153
+ Conditions, sources of bias, and the complete matrix for all three databases
154
+ are in [Benchmarks](docs/benchmarks.md).
155
+
104
156
  ## Running in a deployed application
105
157
 
106
158
  [Shuffle Up and Play](https://shuffleupandplay.com/) is a deployed reference
107
- application where two players create a table, load decks, and move cards while
108
- realtime updates reach both browsers. Its
159
+ application. Two players create a table, load decks, and move cards. Realtime
160
+ updates reach both browsers. Its
109
161
  [source](https://github.com/cardmagic/shuffleupandplay) uses Node 24,
110
162
  TypeScript, SQLite, `node:http`, and `ws`. Each table code addresses one
111
163
  `GameRoom` actor that owns both seats, so mutations share one durable mailbox
@@ -124,23 +176,23 @@ The application and its tests exercise more than a counter-shaped happy path:
124
176
  | Time and schema changes | The actor defines [versioned state migrations](https://github.com/cardmagic/shuffleupandplay/blob/519a343e8db0bb6eed961a2ffd374dba80d67cd6/src/actors/game-room.ts#L47-L91) and a [durable reminder](https://github.com/cardmagic/shuffleupandplay/blob/519a343e8db0bb6eed961a2ffd374dba80d67cd6/src/actors/game-room.ts#L276-L310). Tests load [stored version-one state](https://github.com/cardmagic/shuffleupandplay/blob/519a343e8db0bb6eed961a2ffd374dba80d67cd6/test/operations.test.ts#L135-L201) and [run the reminder scheduler](https://github.com/cardmagic/shuffleupandplay/blob/519a343e8db0bb6eed961a2ffd374dba80d67cd6/test/durability.test.ts#L236-L257). |
125
177
  | Operations and CI | The [operations tests](https://github.com/cardmagic/shuffleupandplay/blob/519a343e8db0bb6eed961a2ffd374dba80d67cd6/test/operations.test.ts#L39-L202) exercise doctor, process, retention, and reconciliation APIs; server suites cover the [dashboard](https://github.com/cardmagic/shuffleupandplay/blob/519a343e8db0bb6eed961a2ffd374dba80d67cd6/test/server.test.ts#L297-L326), [rate limits](https://github.com/cardmagic/shuffleupandplay/blob/519a343e8db0bb6eed961a2ffd374dba80d67cd6/test/rate-limit.test.ts), and [shutdown](https://github.com/cardmagic/shuffleupandplay/blob/519a343e8db0bb6eed961a2ffd374dba80d67cd6/test/shutdown.test.ts). The [current main CI run](https://github.com/cardmagic/shuffleupandplay/actions/runs/31963000789) passed typechecking, 171 tests, the build, the doctor, and a Docker image build. |
126
178
 
127
- **Scope:** the checked-in deployment configuration runs one Node process using
128
- SQLite on one Docker host. It demonstrates a real deployed workload, not a
129
- measured traffic level or every supported topology. Its deck-import effect
130
- reads an external API; effects that write to an external system still need a
131
- stable idempotency key because delivery is at least once. The application
132
- restart tests close the runtime cleanly; abrupt termination, PostgreSQL, MySQL,
133
- and multi-process lease fencing are verified separately by the library's
179
+ **Scope:** the checked-in deployment configuration runs one Node process with
180
+ SQLite on one Docker host. It shows a real deployed workload. It does not show a
181
+ measured traffic level or every supported topology. Its deck-import effect reads
182
+ an external API. An effect that writes to an external system still needs a
183
+ stable idempotency key, because delivery is at least once. The restart tests
184
+ close the runtime cleanly. The library verifies abrupt termination, PostgreSQL,
185
+ MySQL, and multi-process lease fencing separately in its
134
186
  [test matrix](docs/support.md),
135
187
  [failure-recovery demonstration](examples/failure-recovery/demo.ts), and
136
- [correctness contract](docs/correctness.md). Evaluate those guarantees and
137
- limits against your own workload.
188
+ [correctness contract](docs/correctness.md). Compare those guarantees and limits
189
+ with your own workload.
138
190
 
139
191
  ## How it works
140
192
 
141
- An object is addressed by its TypeScript class and application-defined ID.
142
- Public fields are JSON state, public methods are durable operations, and public
143
- getters are ordered queries.
193
+ Solid Objects addresses an object by its TypeScript class and its
194
+ application-defined ID. Public fields are JSON state, public methods are durable
195
+ operations, and public getters are ordered queries.
144
196
 
145
197
  For each identity, Solid Objects:
146
198
 
@@ -156,9 +208,9 @@ claimed message. A worker that finishes JavaScript after losing its lease
156
208
  cannot commit. See the executable [failure-recovery demonstration](examples/failure-recovery/demo.ts)
157
209
  and the full [architecture](docs/architecture.md).
158
210
 
159
- Redis is optional wake-up infrastructure. It can reduce notification latency
160
- for a multi-process MySQL deployment, but the relational database remains the
161
- durable source of truth and polling remains the recovery path.
211
+ Redis is optional wake-up infrastructure. It can reduce notification latency in
212
+ a multi-process MySQL deployment. The relational database stays the durable
213
+ source of truth, and polling stays the recovery path.
162
214
 
163
215
  Idle roles back off from the configured 100 ms fast polling interval to one
164
216
  second. Processed work and wake-up notifications reset that interval
@@ -229,7 +281,7 @@ class Room extends Actor {
229
281
  ```
230
282
 
231
283
  `version` crosses the shared invalidation channel. `hands` contributes only its
232
- name when its real value changes, allowing a reauthorized component endpoint to
284
+ name when its real value changes. A reauthorized component endpoint can then
233
285
  render subscriber-specific state without a manual revision counter.
234
286
 
235
287
  The browser package handles replay, reconnection, incarnation/revision fences,
@@ -237,36 +289,104 @@ personalized payloads, and framework-neutral component refresh. Applications
237
289
  provide authentication, WebSocket transport, and rendering. See the
238
290
  [browser protocol](docs/browser-protocol.md) and [authorization guide](docs/authorization.md).
239
291
 
292
+ ## Solid Objects in the browser
293
+
294
+ The full runtime runs inside a browser module worker. Actors look exactly
295
+ like they do in Node; the database is SQLite WASM, and persistent storage
296
+ lives in the origin's private file system (OPFS), so actor state survives
297
+ page reloads.
298
+
299
+ ```javascript
300
+ import { Actor, configure, sharedSqliteWasm } from "solid-objects/browser/host"
301
+
302
+ class Counter extends Actor {
303
+ static actorType = "Counter"
304
+
305
+ count = 0
306
+
307
+ increment({ amount = 1 } = {}) {
308
+ this.count += amount
309
+ return this.count
310
+ }
311
+ }
312
+
313
+ const runtime = configure({
314
+ database: sharedSqliteWasm({ path: "app.db" }),
315
+ authorizeMessage: () => true,
316
+ authorizeQuery: () => true,
317
+ })
318
+ await runtime.install()
319
+
320
+ await Counter.ref("page-hits").increment()
321
+ ```
322
+
323
+ That code runs identically in every tab. `sharedSqliteWasm` elects one
324
+ database holder per origin through the Web Locks API, carries the other
325
+ tabs' SQL to it over a `BroadcastChannel`, and fails over onto the same
326
+ durable state when the holder's tab dies. Use `sqliteWasm` directly for a
327
+ single dedicated worker.
328
+
329
+ Two companions complete the local-first story:
330
+
331
+ - `solid-objects/browser/tab-host` runs one runtime for all tabs when the
332
+ application prefers request-level routing: the leader's worker executes
333
+ every operation, and other tabs invoke through a `BroadcastChannel` client
334
+ by name.
335
+ - `solid-objects/transmit` drains the transactional effects outbox to a
336
+ server runtime with at-least-once delivery, per-actor order, and an
337
+ idempotent server ingest, so offline writes reconcile when the network
338
+ returns.
339
+
340
+ The wire shapes are documented in the
341
+ [browser protocol](docs/browser-protocol.md), the API in the
342
+ [public API reference](docs/api.md), and the platform boundaries in
343
+ [supported versions](docs/support.md).
344
+
240
345
  ## Comparison
241
346
 
242
347
  These systems solve different coordination problems. The table describes their
243
348
  default unit and deployment model, not a quality ranking.
244
349
 
245
- | Approach | Serialization and state unit | Durable substrate | Additional runtime | Recovery model | Placement |
246
- | --------------------------- | ----------------------------------------------------- | ------------------------------------- | ------------------------------------------------------- | ---------------------------------------------- | ---------------------------- |
247
- | SQL transaction or row lock | Selected rows in one transaction | Application database | None | Application retries the transaction | Application deployment |
248
- | Traditional job queue | Job or queue; ordering depends on queue configuration | Broker or queue database | Queue workers and usually a broker | Retry the job | Application deployment |
249
- | Solid Objects | TypeScript class plus object ID | Existing SQLite, PostgreSQL, or MySQL | Library in application processes | Retry the per-ID operation from durable state | Application deployment |
250
- | Cloudflare Durable Objects | Object class plus globally unique ID | Per-object managed storage | Cloudflare Workers platform | Managed object activation | Cloudflare-selected location |
251
- | Rivet Actors | Addressable actor | Actor state, KV, or per-actor SQLite | Rivet Engine or managed compute | Actor sleep, wake, and persistence | Configured Rivet deployment |
252
- | DBOS | Workflow ID and checkpointed steps | PostgreSQL system database | Library; Conductor recommended for distributed recovery | Deterministic workflow replay from checkpoints | Application deployment |
253
- | Restate | Service handler or keyed virtual object | Restate log and state store | Restate server or cloud service | Durable handler execution and journal replay | Restate deployment |
254
-
255
- The sourced, dimension-by-dimension comparison—including realtime projections,
256
- edge placement, cross-identity transactions, and operational data access—is in
257
- [docs/comparisons.md](docs/comparisons.md).
350
+ | Approach | Serialization and state unit | Durable substrate | Additional runtime | Recovery model | Placement |
351
+ | --------------------------- | ----------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------- | -------------------------------------------------------- | --------------------------------------------------------- |
352
+ | SQL transaction or row lock | Selected rows in one transaction | Application database | None | Application retries the transaction | Application deployment |
353
+ | Traditional job queue | Job or queue; ordering depends on queue configuration | Broker or queue database | Queue workers and usually a broker | Retry the job | Application deployment |
354
+ | Solid Objects | TypeScript class plus object ID | Existing SQLite, PostgreSQL, or MySQL | Library in application processes | Retry the per-ID operation from durable state | Application deployment |
355
+ | Cloudflare Durable Objects | Object class plus globally unique ID | Per-object managed storage | Cloudflare Workers platform | Managed object activation | Cloudflare-selected location |
356
+ | celld | Object class plus object name | Per-object SQLite replicated to a bucket you own | celld daemon that embeds V8 and runs Wrangler bundles | A new owner restores the object database from the bucket | Any node in your fleet, chosen by bucket compare-and-swap |
357
+ | Rivet Actors | Addressable actor | Actor state, KV, or per-actor SQLite | Rivet Engine or managed compute | Actor sleep, wake, and persistence | Configured Rivet deployment |
358
+ | DBOS | Workflow ID and checkpointed steps | PostgreSQL system database | Library; Conductor recommended for distributed recovery | Deterministic workflow replay from checkpoints | Application deployment |
359
+ | Restate | Service handler or keyed virtual object | Restate log and state store | Restate server or cloud service | Durable handler execution and journal replay | Restate deployment |
360
+
361
+ celld and Solid Objects both self-host the Durable Objects model. The difference
362
+ is where the state lives and what you run. celld runs a daemon that embeds V8
363
+ and executes Wrangler bundles. It gives each object its own SQLite database,
364
+ and it replicates that database to an object-storage bucket you own. Object
365
+ ownership moves between nodes through compare-and-swap on that bucket. Solid
366
+ Objects runs plain TypeScript classes inside your Node processes, adds no
367
+ daemon, and keeps object state in the SQL database the application already
368
+ operates. Choose celld to run Workers-format code across a fleet with
369
+ bucket-based placement. Choose Solid Objects to keep one database, no extra
370
+ process, and an ordinary Node deployment.
371
+
372
+ [docs/comparisons.md](docs/comparisons.md) holds the sourced comparison for each
373
+ dimension: realtime projections, edge placement, cross-identity transactions,
374
+ and operational data access.
258
375
 
259
376
  ## Requirements and supported systems
260
377
 
261
- - Node.js 24.15 or newer
378
+ - Node.js 24.4.0 or newer; 24.15 or newer to avoid the `node:sqlite`
379
+ experimental warning
262
380
  - TypeScript 5.9 or newer for TypeScript applications
263
381
  - SQLite through `node:sqlite`, PostgreSQL 14 or newer, or MySQL 8.0 or newer
264
382
  with InnoDB
265
- - optional `pg`, `mysql2`, or `redis` peer dependency only for the selected
266
- adapter
383
+ - optional `pg`, `mysql2`, `redis`, or `@sqlite.org/sqlite-wasm` peer
384
+ dependency only for the selected adapter
385
+ - for the browser runtime: a browser with OPFS for persistent storage and the
386
+ Web Locks API for the multi-tab host
267
387
 
268
- The exact CI matrix and boundaries are documented in
269
- [Supported versions](docs/support.md).
388
+ [Supported versions](docs/support.md) records the exact CI matrix and the
389
+ boundaries.
270
390
 
271
391
  ## Operations
272
392
 
@@ -275,10 +395,10 @@ and stale-process recovery roles. The database-backed operator dashboard is an
275
395
  optional `solid-objects/web` export with deny-by-default administration policy,
276
396
  session-backed CSRF protection, and Fetch or Node/Connect mounting.
277
397
 
278
- The dashboard defaults to authorized read/write access. An authorized
279
- read-only mode removes mutations, while an explicitly public read-only mode is
280
- appropriate only for synthetic demo data because it exposes stored arguments,
281
- results, errors, identifiers, and operational metadata.
398
+ The dashboard defaults to authorized read/write access. An authorized read-only
399
+ mode removes the mutations. Use the explicitly public read-only mode only for
400
+ synthetic demo data, because it exposes stored arguments, results, errors,
401
+ identifiers, and operational metadata.
282
402
 
283
403
  Administration remains available through the JSON CLI and typed runtime
284
404
  managers. See [Operations](docs/operations.md), the [dashboard guide](docs/dashboard.md),
@@ -286,11 +406,11 @@ and [Configuration](docs/configuration.md).
286
406
 
287
407
  ## Design provenance
288
408
 
289
- Solid Objects JS is a Node.js and TypeScript implementation informed by the
290
- Ruby [`solid_objects`](https://github.com/cardmagic/solid_objects) design. It
291
- began at the `0.12` capability generation because the initial implementation
292
- targeted the Ruby `0.12` contract; the number does not represent twelve earlier
293
- JavaScript release generations.
409
+ Solid Objects JS is a Node.js and TypeScript implementation. The Ruby
410
+ [`solid_objects`](https://github.com/cardmagic/solid-objects-ruby) design informed
411
+ it. It began at the `0.12` capability generation, because the first
412
+ implementation targeted the Ruby `0.12` contract. That number does not represent
413
+ twelve earlier JavaScript release generations.
294
414
 
295
415
  The TypeScript implementation is not a source translation. It redesigned the
296
416
  API around inferred TypeScript references, Node runtime supervision,
@@ -302,9 +422,9 @@ runtime differences.
302
422
  The Ruby project first appeared publicly on August 6, 2026, and this TypeScript
303
423
  repository on August 13, 2026. Both remain early releases. The
304
424
  [`mtg-playmat`](https://github.com/cardmagic/mtg-playmat) application uses the
305
- Ruby actor and realtime design, while
425
+ Ruby actor and realtime design.
306
426
  [Shuffle Up and Play](https://github.com/cardmagic/shuffleupandplay) uses the
307
- TypeScript package in the deployed Node and SQLite topology documented above.
427
+ TypeScript package in the deployed Node and SQLite topology above.
308
428
 
309
429
  ## Documentation
310
430
 
package/dist/actor.d.ts CHANGED
@@ -89,6 +89,7 @@ export declare abstract class Actor {
89
89
  onSuccess?: string;
90
90
  onFailure?: string;
91
91
  }): void;
92
+ transmit(): ScheduledOperations;
92
93
  commitAction(name: string, argumentsValue?: Record<string, unknown>): void;
93
94
  /** See docs/api.md for when to give a reminder a key. */
94
95
  schedule(options: ReminderOptions): ScheduledOperations;
@@ -1 +1 @@
1
- {"version":3,"file":"actor.d.ts","sourceRoot":"","sources":["../src/actor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAErD,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACtB,MAAM,gBAAgB,CAAA;AAEvB,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAExF,QAAA,MAAM,uBAAuB,eAAoD,CAAA;AAEjF,MAAM,MAAM,mBAAmB,CAAC,KAAK,IAAI,QAAQ,CAAC;IAChD,KAAK,EAAE,KAAK,CAAA;IACZ,CAAC,uBAAuB,CAAC,EAAE,cAAc,GAAG,OAAO,CAAA;CACpD,CAAC,CAAA;AAEF,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,UAAU,CAAA;IAClB,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,CAAC,CAAA;CAC1D;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAErF;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAE9E;AAED,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,SAAS,EAAE,CAAA;AAE5D,MAAM,MAAM,iBAAiB,CAAC,SAAS,SAAS,KAAK,EAAE,oBAAoB,IAAI,QAAQ,CACrF,MAAM,CACJ,MAAM,EACN,CACE,KAAK,EAAE,SAAS,EAChB,oBAAoB,EA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AAyD;IACzD,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,mBAAmB;IAsBvD,MAAM,CAAC,WAAW,SAAS,KAAK,EAC9B,SAAS,EAAE,cAAc,CAAC,WAAW,CAAC,EACtC,OAAO,GAAE,sBAA2B,GACnC,gBAAgB,CAAC,WAAW,CAAC;CA2EjC"}
package/dist/actor.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { currentMessage, currentRuntime } from "./context.js";
2
2
  import { getDefaultRuntime } from "./default-runtime.js";
3
3
  import { InvalidRejectionCode, Rejected, UnknownOperation } from "./errors.js";
4
+ import { TRANSMIT_EFFECT } from "./transmit-effect.js";
4
5
  import { createStagedOperationMap, createStagedOperations, } from "./reference.js";
5
6
  import { jsonObject, normalizeJson } from "./serialization.js";
6
7
  const observableBroadcastMode = Symbol("solid-objects.observable-broadcast-mode");
@@ -98,6 +99,14 @@ export class Actor {
98
99
  ...(options.onFailure === undefined ? {} : { failureOperation: String(options.onFailure) }),
99
100
  });
100
101
  }
102
+ transmit() {
103
+ return createStagedOperationMap(this.#operations, (operation, argumentsValue) => {
104
+ this.#intents.effects.push({
105
+ name: TRANSMIT_EFFECT,
106
+ arguments: jsonObject({ operation, arguments: argumentsValue }),
107
+ });
108
+ });
109
+ }
101
110
  commitAction(name, argumentsValue = {}) {
102
111
  this.#intents.commitActions.push({ name, arguments: jsonObject(argumentsValue) });
103
112
  }
package/dist/actor.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"actor.js","sourceRoot":"","sources":["../src/actor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAExD,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9E,OAAO,EACL,wBAAwB,EACxB,sBAAsB,GAIvB,MAAM,gBAAgB,CAAA;AACvB,O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,gBAAgB;IAChB,YAAY;QACV,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;YACxC,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;YACpD,SAAS,EAAE,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;YAC5C,gBAAgB,EAAE,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC;SAC3D,CAAA;IACH,CAAC;IAED,gBAAgB;IAChB,cAAc;QACZ,IAAI,CAAC,YAAY,EAAE,CAAA;IACrB,CAAC;IAED,gBAAgB;IAChB,UAAU;QACR,OAAO,IAAI,CAAC,WAAW,EAAE,GAAG,CAAC,CAAA;IAC/B,CAAC;IAED,gBAAgB;IAChB,WAAW;QACT,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,KAAK,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;IAC3F,CAAC;;AAGH,SAAS,qBAAqB,CAAC,KAAa;IAC1C,OAAO,uBAAuB,IAAI,KAAK,CAAA;AACzC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type { SolidObjectsRuntime } from "./runtime.js";
2
2
  export declare class BroadcastWorker {
3
3
  private readonly runtime;
4
- readonly processId: `${string}-${string}-${string}-${string}-${string}`;
4
+ readonly processId: string;
5
5
  private registered;
6
6
  private stopping;
7
7
  private readonly pollingBackoff;
@@ -1 +1 @@
1
- {"version":3,"file":"broadcast-worker.d.ts","sourceRoot":"","sources":["../src/broadcast-worker.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAIvD,qBAAa,eAAe;IAMd,OAAO,CAAC,QAAQ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AI,IAAI,OAAO,CAAC,IAAI,CAAC;YASb,gBAAgB;CAK/B"}
@@ -1,4 +1,4 @@
1
- import { randomUUID } from "node:crypto";
1
+ import { randomUUID } from "./platform/uuid.js";
2
2
  import { withProcessHeartbeat } from "./worker.js";
3
3
  import { PollingBackoff } from "./polling-backoff.js";
4
4
  export class BroadcastWorker {