solid-objects 0.12.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.
- package/CHANGELOG.md +110 -0
- package/MIT-LICENSE +19 -0
- package/README.md +958 -0
- package/dist/actor.d.ts +81 -0
- package/dist/actor.d.ts.map +1 -0
- package/dist/actor.js +141 -0
- package/dist/actor.js.map +1 -0
- package/dist/application-database.d.ts +3 -0
- package/dist/application-database.d.ts.map +1 -0
- package/dist/application-database.js +59 -0
- package/dist/application-database.js.map +1 -0
- package/dist/broadcast-worker.d.ts +18 -0
- package/dist/broadcast-worker.d.ts.map +1 -0
- package/dist/broadcast-worker.js +74 -0
- package/dist/broadcast-worker.js.map +1 -0
- package/dist/browser/components.d.ts +64 -0
- package/dist/browser/components.d.ts.map +1 -0
- package/dist/browser/components.js +294 -0
- package/dist/browser/components.js.map +1 -0
- package/dist/browser/index.d.ts +46 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +207 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/cli.d.ts +9 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +216 -0
- package/dist/cli.js.map +1 -0
- package/dist/configuration.d.ts +96 -0
- package/dist/configuration.d.ts.map +1 -0
- package/dist/configuration.js +169 -0
- package/dist/configuration.js.map +1 -0
- package/dist/context.d.ts +20 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +24 -0
- package/dist/context.js.map +1 -0
- package/dist/database/deadline.d.ts +9 -0
- package/dist/database/deadline.d.ts.map +1 -0
- package/dist/database/deadline.js +49 -0
- package/dist/database/deadline.js.map +1 -0
- package/dist/database/mysql.d.ts +21 -0
- package/dist/database/mysql.d.ts.map +1 -0
- package/dist/database/mysql.js +192 -0
- package/dist/database/mysql.js.map +1 -0
- package/dist/database/postgresql-sql.d.ts +2 -0
- package/dist/database/postgresql-sql.d.ts.map +1 -0
- package/dist/database/postgresql-sql.js +102 -0
- package/dist/database/postgresql-sql.js.map +1 -0
- package/dist/database/postgresql.d.ts +31 -0
- package/dist/database/postgresql.d.ts.map +1 -0
- package/dist/database/postgresql.js +172 -0
- package/dist/database/postgresql.js.map +1 -0
- package/dist/database/sqlite.d.ts +27 -0
- package/dist/database/sqlite.d.ts.map +1 -0
- package/dist/database/sqlite.js +190 -0
- package/dist/database/sqlite.js.map +1 -0
- package/dist/database/transaction-context.d.ts +3 -0
- package/dist/database/transaction-context.d.ts.map +1 -0
- package/dist/database/transaction-context.js +19 -0
- package/dist/database/transaction-context.js.map +1 -0
- package/dist/database/types.d.ts +20 -0
- package/dist/database/types.d.ts.map +1 -0
- package/dist/database/types.js +2 -0
- package/dist/database/types.js.map +1 -0
- package/dist/dead-letters.d.ts +23 -0
- package/dist/dead-letters.d.ts.map +1 -0
- package/dist/dead-letters.js +13 -0
- package/dist/dead-letters.js.map +1 -0
- package/dist/default-runtime.d.ts +5 -0
- package/dist/default-runtime.d.ts.map +1 -0
- package/dist/default-runtime.js +14 -0
- package/dist/default-runtime.js.map +1 -0
- package/dist/definition.d.ts +32 -0
- package/dist/definition.d.ts.map +1 -0
- package/dist/definition.js +173 -0
- package/dist/definition.js.map +1 -0
- package/dist/doctor.d.ts +32 -0
- package/dist/doctor.d.ts.map +1 -0
- package/dist/doctor.js +500 -0
- package/dist/doctor.js.map +1 -0
- package/dist/effect-worker.d.ts +18 -0
- package/dist/effect-worker.d.ts.map +1 -0
- package/dist/effect-worker.js +74 -0
- package/dist/effect-worker.js.map +1 -0
- package/dist/errors.d.ts +145 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +120 -0
- package/dist/errors.js.map +1 -0
- package/dist/executable.d.ts +3 -0
- package/dist/executable.d.ts.map +1 -0
- package/dist/executable.js +12 -0
- package/dist/executable.js.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/maintenance-scheduler.d.ts +17 -0
- package/dist/maintenance-scheduler.d.ts.map +1 -0
- package/dist/maintenance-scheduler.js +41 -0
- package/dist/maintenance-scheduler.js.map +1 -0
- package/dist/process-administration.d.ts +30 -0
- package/dist/process-administration.d.ts.map +1 -0
- package/dist/process-administration.js +13 -0
- package/dist/process-administration.js.map +1 -0
- package/dist/realtime.d.ts +33 -0
- package/dist/realtime.d.ts.map +1 -0
- package/dist/realtime.js +238 -0
- package/dist/realtime.js.map +1 -0
- package/dist/reconciliation.d.ts +41 -0
- package/dist/reconciliation.d.ts.map +1 -0
- package/dist/reconciliation.js +19 -0
- package/dist/reconciliation.js.map +1 -0
- package/dist/records.d.ts +137 -0
- package/dist/records.d.ts.map +1 -0
- package/dist/records.js +2 -0
- package/dist/records.js.map +1 -0
- package/dist/reference.d.ts +97 -0
- package/dist/reference.d.ts.map +1 -0
- package/dist/reference.js +157 -0
- package/dist/reference.js.map +1 -0
- package/dist/reminder-administration.d.ts +35 -0
- package/dist/reminder-administration.d.ts.map +1 -0
- package/dist/reminder-administration.js +13 -0
- package/dist/reminder-administration.js.map +1 -0
- package/dist/reminder-scheduler.d.ts +18 -0
- package/dist/reminder-scheduler.d.ts.map +1 -0
- package/dist/reminder-scheduler.js +88 -0
- package/dist/reminder-scheduler.js.map +1 -0
- package/dist/repository.d.ts +142 -0
- package/dist/repository.d.ts.map +1 -0
- package/dist/repository.js +1237 -0
- package/dist/repository.js.map +1 -0
- package/dist/retention.d.ts +17 -0
- package/dist/retention.d.ts.map +1 -0
- package/dist/retention.js +13 -0
- package/dist/retention.js.map +1 -0
- package/dist/runtime.d.ts +140 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +1737 -0
- package/dist/runtime.js.map +1 -0
- package/dist/schema.d.ts +8 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +260 -0
- package/dist/schema.js.map +1 -0
- package/dist/serialization.d.ts +11 -0
- package/dist/serialization.d.ts.map +1 -0
- package/dist/serialization.js +82 -0
- package/dist/serialization.js.map +1 -0
- package/dist/test-helper.d.ts +15 -0
- package/dist/test-helper.d.ts.map +1 -0
- package/dist/test-helper.js +69 -0
- package/dist/test-helper.js.map +1 -0
- package/dist/types.d.ts +71 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +2 -0
- package/dist/version.js.map +1 -0
- package/dist/wake-up/postgresql.d.ts +42 -0
- package/dist/wake-up/postgresql.d.ts.map +1 -0
- package/dist/wake-up/postgresql.js +234 -0
- package/dist/wake-up/postgresql.js.map +1 -0
- package/dist/wake-up/redis.d.ts +35 -0
- package/dist/wake-up/redis.d.ts.map +1 -0
- package/dist/wake-up/redis.js +151 -0
- package/dist/wake-up/redis.js.map +1 -0
- package/dist/wake-up.d.ts +24 -0
- package/dist/wake-up.d.ts.map +1 -0
- package/dist/wake-up.js +66 -0
- package/dist/wake-up.js.map +1 -0
- package/dist/worker.d.ts +36 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.js +281 -0
- package/dist/worker.js.map +1 -0
- package/docs/api.md +197 -0
- package/docs/architecture.md +113 -0
- package/docs/authorization.md +31 -0
- package/docs/browser-protocol.md +93 -0
- package/docs/configuration.md +168 -0
- package/docs/correctness.md +53 -0
- package/docs/errors-and-recovery.md +89 -0
- package/docs/operations.md +170 -0
- package/docs/parity.md +94 -0
- package/docs/releasing.md +45 -0
- package/docs/state-and-lifecycle.md +162 -0
- package/package.json +100 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
## 0.12.0 - 2026-08-13
|
|
6
|
+
|
|
7
|
+
- Document the complete public API, runtime and adapter configuration,
|
|
8
|
+
state-evolution lifecycle, and error-recovery contracts.
|
|
9
|
+
- Complete the Ruby 0.12.0 spiritual-parity pass with Node-native runtime,
|
|
10
|
+
administration, realtime, browser, and multi-adapter equivalents.
|
|
11
|
+
- Return claimed messages to ready membership without consuming an attempt when
|
|
12
|
+
actor hydration, state migration, or activation fails before execution begins.
|
|
13
|
+
- Keep guarded application databases read-only during commit actions so the
|
|
14
|
+
supplied fenced transaction connection is the only atomic write path.
|
|
15
|
+
- Persist the start of graceful runtime-role shutdown and expose its timestamp
|
|
16
|
+
so operators can distinguish actively draining processes from dead owners.
|
|
17
|
+
- Release actor, message, effect, reminder, and broadcast ownership atomically
|
|
18
|
+
during graceful shutdown and recover stale draining processes as well.
|
|
19
|
+
- Persist hostname, host PID, Node version, and Solid Objects version for every
|
|
20
|
+
runtime role and expose them through immutable process administration reads.
|
|
21
|
+
- Make typed snapshots return persisted fields and getter values from one
|
|
22
|
+
committed state image, rejecting getters that mutate state or stage work.
|
|
23
|
+
- Probe configured authorization policies with a neutral context in the doctor
|
|
24
|
+
and warn when sensitive access is open or a policy cannot evaluate safely.
|
|
25
|
+
- Align effect and commit-action context with their durable source message and
|
|
26
|
+
activation fence, using immutable TypeScript contracts.
|
|
27
|
+
- Bound runtime shutdown with a configurable deadline and report components
|
|
28
|
+
that do not cooperate with cancellation or stop before it expires.
|
|
29
|
+
- Separate generated request identity from caller-supplied idempotency keys and
|
|
30
|
+
expose both with enqueue time through immutable actor message context.
|
|
31
|
+
- Preserve isolated runtime ownership across operation, lifecycle, observable,
|
|
32
|
+
and payload callbacks while keeping lifecycle callbacks message-free.
|
|
33
|
+
- Retry transient SQLite writer acquisition with bounded capped backoff without
|
|
34
|
+
replaying transaction callbacks or extending synchronous deadlines.
|
|
35
|
+
- Expose concise `configure()` and isolated `createRuntime()` entry points;
|
|
36
|
+
isolated actor turns resolve references from their executing runtime.
|
|
37
|
+
- Raise structured `MessageFailed` errors for terminal operations and
|
|
38
|
+
`ActorDestroyed` when an authorized incarnation disappears during a wait.
|
|
39
|
+
- Add deny-by-default dead-letter inspection and idempotent durable retry.
|
|
40
|
+
- Add sequential schema migrations and upgrade version-one SQLite databases.
|
|
41
|
+
- Add bounded, authorization-gated reconciliation reads for actor lifecycle
|
|
42
|
+
repair.
|
|
43
|
+
- Add previewable bounded retention for messages, stopped processes, and
|
|
44
|
+
opt-in actor instances.
|
|
45
|
+
- Add structured installation diagnostics and a targeted durable round trip.
|
|
46
|
+
- Add deterministic runtime draining and explicit database reset helpers for
|
|
47
|
+
tests.
|
|
48
|
+
- Add isolated structured lifecycle instrumentation with metadata-only events.
|
|
49
|
+
- Add reminder replacement events and authorized inspection and resume APIs.
|
|
50
|
+
- Add deny-by-default transport-neutral realtime subscriptions with committed
|
|
51
|
+
replay and revision fencing.
|
|
52
|
+
- Add injectable generation-based wake-up signals with a process-local default.
|
|
53
|
+
- Add supervised role replacement through original factories with capped
|
|
54
|
+
restart backoff.
|
|
55
|
+
- Add authorized process inspection and atomic stale-owner cleanup.
|
|
56
|
+
- Add a JSON CLI for runtime startup, diagnostics, administration, and explicit
|
|
57
|
+
retention pruning.
|
|
58
|
+
- Add bounded multi-turn activation passes with database-ordered hot-actor
|
|
59
|
+
fairness.
|
|
60
|
+
- Add an opt-in application-database facade that rejects direct writes during
|
|
61
|
+
actor execution while keeping registered commit actions writable.
|
|
62
|
+
- Add typed subscriber-specific realtime payloads with query authorization,
|
|
63
|
+
committed-state projection, failure isolation, and independent revision
|
|
64
|
+
fencing.
|
|
65
|
+
- Add PostgreSQL 14+ through the optional `pg` driver with pooled transactions,
|
|
66
|
+
row-locked sequence allocation, portable schema and set queries, diagnostics,
|
|
67
|
+
and real-server integration coverage.
|
|
68
|
+
- Add opt-in role-specific PostgreSQL wake-ups with one event-driven listener
|
|
69
|
+
per runtime and polling as the correctness fallback.
|
|
70
|
+
- Add a typed browser component registry with keyed dependencies, replace/morph
|
|
71
|
+
strategies, batch coalescing, cancellation, and per-target revision fencing.
|
|
72
|
+
- Add Chromium QA for native WebSocket subscription replay, realtime fences,
|
|
73
|
+
personalized payloads, component batching, and request cancellation.
|
|
74
|
+
- Add optional Redis Pub/Sub wake-ups with role-specific channels, separate
|
|
75
|
+
lazy connections, bounded failure handling, and real-server integration QA.
|
|
76
|
+
- Add MySQL 8.0+ through the optional `mysql2` driver with pooled transactions,
|
|
77
|
+
an InnoDB schema, scoped enqueue deadlock recovery, diagnostics, and
|
|
78
|
+
real-server coverage across MySQL 8.0 and 8.4.
|
|
79
|
+
- Add hydrated idle activation reuse with renewable fenced leases, protected
|
|
80
|
+
async lifecycle hooks, state restoration after failed turns, and release on
|
|
81
|
+
timeout, fairness yield, lease loss, and shutdown.
|
|
82
|
+
- Bound activation passes by configurable elapsed time as well as message
|
|
83
|
+
count so slow hot actors yield workers fairly.
|
|
84
|
+
- Add independent supervised schedulers for expired message and process
|
|
85
|
+
retention and stale process recovery, with disable switches and bounded
|
|
86
|
+
failure backoff.
|
|
87
|
+
- Bound synchronous database pool, query, and lock waits across SQLite,
|
|
88
|
+
PostgreSQL, and MySQL; distinguish an uncommitted enqueue timeout from a
|
|
89
|
+
recoverable durable wait timeout; and report structured database, activation,
|
|
90
|
+
and mailbox blockers.
|
|
91
|
+
- Reject committed calls and message waits inside an ambient Solid Objects
|
|
92
|
+
database transaction before they can self-deadlock.
|
|
93
|
+
- Scan a bounded set of ready actor candidates so a lost lease race does not
|
|
94
|
+
make a worker report idle while other actors are ready.
|
|
95
|
+
|
|
96
|
+
- Add ordinary TypeScript actor classes with inferred, typed references.
|
|
97
|
+
- Add committed calls, asynchronous sends, actor-to-actor delivery, reminders,
|
|
98
|
+
effects, commit actions, snapshots, destruction, and explicit observables.
|
|
99
|
+
- Add a SQLite durable mailbox with ordered turns, idempotency, retries, leases,
|
|
100
|
+
fencing, dead letters, process heartbeats, and stale-claim recovery.
|
|
101
|
+
- Add supervised workers for actor turns, effects, reminders, and broadcasts.
|
|
102
|
+
- Add a Node-free browser client for versioned observable invalidations.
|
|
103
|
+
- Deny public actor operations and destruction by default, and reauthorize
|
|
104
|
+
durable message status, result, and wait reads.
|
|
105
|
+
- Use options objects for library APIs with more than two inputs and enforce the
|
|
106
|
+
convention during type checking.
|
|
107
|
+
- Name invoked actor methods `operation` throughout the API and persistence,
|
|
108
|
+
and name message submission semantics `delivery_mode`.
|
|
109
|
+
- Support SQLite, PostgreSQL, and MySQL database adapters in the initial
|
|
110
|
+
release.
|
package/MIT-LICENSE
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright 2026 Lucas Carlson
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
in the Software without restriction, including without limitation the rights
|
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
+
SOFTWARE.
|