npm / @earendil-works/chord
@earendil-works/chord
What changed in @earendil-works/chord 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-01.
41 breaking40 new APIs and options1 performance3 behavior and defaults3 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@earendil-works/chord 188 changes
Breaking changes 41
Custom Context implementations must provide a non-optional telemetry parent; use NOOP_TELEMETRY_CONTEXT when telemetry is disabled.
Accepts spans instead of adapters and derives a context without changing values or cancellation.
Epoch fields are renamed codeVersion across contexts, root options, hosts, frames, and reload reports.
Host creation is generic over the application's principal type and now requires self as the host's own principal.
ctx.get is asynchronous and resolves when the reference is live and its variant state has its first snapshot.
Roots running on a retired code version are aborted with reason superseded and given up to one second to stop before resources used only by that version close.
Callers no longer select a remote host with GetOptions.at; placement is declared by the remote contract.
Setting state to false creates a method-only reference that does not subscribe to state unless another reference wants it.
host.get is asynchronous and resolves when the reference is live and its variant state has its first snapshot.
upstream is now an object containing link and principal plus LinkOptions, replacing a bare link and upstreamOptions.
Factory return values are now named ImplementationOf<C> instead of BehaviorOf<C>.
Calls through remote references now reject contexts from another host or objects not created by Chord.
Replaces awaitEager for waiting on host-lifetime objects.
MembersOf is removed; remote reference variants are discriminated by variant.
Cells can migrate their state from an older version; a raised version migrates only that cell.
The new @earendil-works/chord/output entry point exports OutputBuffer for retaining a head or tail window of a stream.
Chord no longer provides a Principal type or invents principals; applications supply their principal type and values.
The output entry point exports Progress to pace commits of a changing value by size.
The wire protocol changes incompatibly across this release; peers with different or absent protocol versions cannot communicate.
References returned by get are now typed Ref<C> instead of Handle<C>.
Reference status is now named RefStatus instead of HandleStatus.
Remote contracts must declare object placement with hostNamed or hostFamily; callers no longer specify a host with GetOptions.at.
Resource options are now named ResourceDeclaration instead of ResourceSpec.
Routes must now supply a principal instead of receiving a default host principal.
Derivations no longer take a name.
Listeners are declared by name using self.on.
Resources are declared by name with self.resource; the resource revision field is now version.
State declarations are now named calls and return the cell; cell options include version and migrate.
Tasks no longer take a name.
serve now uses lifetime instead of eager, with referenced as the default and host lifetime for one object per host.
State version configuration is removed from ServeOptions; versions and migrations now belong to individual cells.
serve now takes ServeOptionsFor<C>, with options typed according to the contract.
Remote object variants use variant in factory results, references, shapes, and shape frames; kind is no longer reserved.
Removes the
./bundlerexport.The old
defineFacetis replaced by the typed host runtime'sdefineFacet.Removes
defineServiceand the listed old runtime APIs, helpers, and types.Removes this package, which served only the old runtime; it is no longer released.
Removes this package, which served only the old runtime; it is no longer released.
Removes this package, which served only the old runtime; it is no longer released.
Removes facet bundle loaders and changes
./nodeto export the child host manager andnodeLoader.Replaces the facet and service runtime with typed hosts, runtime contracts described with TypeBox schemas, handles, JSON frames, and hot reload of plugins.
New APIs and options 40
Adds portable SQLite interfaces, an atomic migration runner, and schema-prefix validation.
Adds a Cloudflare Durable Object driver for the portable SQLite interfaces.
Adds a Node driver for the portable SQLite interfaces.
Adds portable SQLite telemetry recording with bounded settled-span queues, ten-second metric aggregates, periodic flushes, and retention cleanup.
Provides a no-op telemetry span for contexts when telemetry is disabled.
Accepts an optional ProgressClock to pace commits, defaulting to Date.now and setTimeout.
Starts a child span and passes its derived context to the callback.
Limits concurrent calls from a peer; additional calls receive unavailable with reason too_many_calls while the link remains open.
boundOutput is newly exported from the output entry point.
characterEnd is newly exported from the output entry point.
ConnectOptions is newly exported for principal-aware connections.
EventOf is newly exported.
FacetApi exposes a signal that aborts when that facet run is no longer installed; manually constructed FacetApi values must pass it through.
host.hold is the synchronous reference-acquisition form for UI runtimes and may return a loading reference.
HostFamily is newly exported for host-family placement typing.
HostNamed is newly exported for named-host placement typing.
linger keeps remote bindings held and hydrated after their last reference is released, allowing quick reacquisition.
Bounds how long a reload waits for aborted tasks before starting replacements; the default is 5000 ms.
inflateMessage converts a packed WebSocket message back into a text frame.
Lifetime is newly exported.
Reports protocol-version mismatches between peers.
Caps waiting flow-control operations per link; excess oldest streams become resets.
Sets the unacknowledged frame window for end-to-end flow control; state frames wait and coalesce while calls, results, and control frames are not held back.
Placement is exported as a type for remote contracts.
PlacementFor is newly exported for remote contract placement typing.
PrincipalPattern is newly exported.
sanitizeOutput is newly exported from the output entry point.
A cell may initialize its first value from an async source after resources open and references are live; failures prevent activation or reload.
StateInit is newly exported for cells initialized from a source.
StateOptions is newly exported.
utf8ByteLength is newly exported from the output entry point.
ValueOf is newly exported.
Large JSON payloads can be packed; WebSocketLinkOptions controls sending and accepting packed frames.
Introduces WebSocket acceptance for the typed host runtime.
Remains unchanged and also exports the
ContextandContextKeytypes.Introduces host creation for the typed host runtime.
Introduces registry definition for the typed host runtime.
Introduces a Node IPC link for exchanging JSON frames between hosts.
Introduces a memory link for exchanging JSON frames between hosts.
Introduces a WebSocket link for exchanging JSON frames between hosts.
Performance 1
Appending no longer requires walking the whole array;
applyImmutablebuilds an appended array in one copy instead of two.
Behavior and default changes 3
Link.send returns the encoded frame size when the transport knows it; flow control counts this size, while links returning nothing are not windowed.
Methods without arguments are called as ref.name(ctx?) and implemented with a context-only function; omitted result means the method is void.
A reload starts replacement tasks only after aborted tasks finish or the stop deadline is reached.
Fixes and other changes 3
Registers every facet directory before importing any facet, preventing duplicate module copies when facets import one another's files.
Avoids socket-path length failures on macOS and BSD by placing the lock socket in a private per-user directory.
Keeps its name on the root export, alongside the listed JSON, context, and replicated-state names.