@rotorsoft/act-sse
v1.2.7
Published
Incremental state broadcast over SSE for act apps
Maintainers
Readme
@rotorsoft/act-sse
Incremental state broadcast over Server-Sent Events for @rotorsoft/act event-sourced apps.
[!WARNING] This package is being deprecated. Its surface lives on as the
@rotorsoft/act-http/ssesubpath of the @rotorsoft/act-http umbrella package, which consolidates webhook and SSE integrations under one install.New projects: install
@rotorsoft/act-httpand import from the/ssesubpath. Existing projects: migration is a one-import change (see below). This package will receive bug fixes only and be removed in a future release.
Migration to @rotorsoft/act-http/sse
@rotorsoft/act-http/sse is a verbatim copy of this package's surface — same classes, same functions, same wire format, same semantics. Migration is one import change per file:
- import { BroadcastChannel, applyPatchMessage } from "@rotorsoft/act-sse";
+ import { BroadcastChannel, applyPatchMessage } from "@rotorsoft/act-http/sse";Then:
pnpm remove @rotorsoft/act-sse
pnpm add @rotorsoft/act-httpThe umbrella package keeps SSE and webhook as independent subpath exports (@rotorsoft/act-http/sse and @rotorsoft/act-http/webhook) — nothing in one depends on the other, so the bundle cost is the same. Future HTTP-adjacent integrations (OAuth refresh, signed-webhook senders, gRPC-web) will land as additional subpaths rather than separate packages.
What this package does (legacy)
Instead of sending full aggregate state after each action, act-sse forwards the domain patches that event handlers already compute — sending only what changed as version-keyed partials. The wire format, server surface (BroadcastChannel, PresenceTracker, StateCache, publishOverlay), and client patch applicator (applyPatchMessage) are all preserved unchanged in @rotorsoft/act-http/sse.
For the full reference (architecture diagram, wire format, server + client usage, version contract, bandwidth savings), see the @rotorsoft/act-http README.
Installation (legacy)
Still works. New projects should use @rotorsoft/act-http instead.
pnpm add @rotorsoft/act-sseStability
Public API governed by the Act Stability Charter — but this package is on the deprecation track. New work goes to @rotorsoft/act-http/sse.
Related packages
- @rotorsoft/act-http ← migrate here. The umbrella package that now owns SSE + webhook integrations.
- @rotorsoft/act — core framework.
- @rotorsoft/act-patch — immutable patch utility this package uses for state merging.
Documentation
- Real-time with SSE — the concept guide; same content applies to
@rotorsoft/act-http/sse. - @rotorsoft/act-http README — full SSE reference at its new home.
License
MIT
