Documentation / @etherfold/browser / PortPushes
Type Alias: PortPushes ​
PortPushes =
object
Defined in: packages/browser/src/host/envelope.ts:708
EVERY MESSAGE THE HOST SENDS THAT NOBODY ASKED FOR, as a map from push name to what it carries.
The third message kind, and the reason it exists is ADR-0082's "status is PUSHED, and the control surface NARROWS": reproducing the main thread's reactive triple across a port would mean either polling on a timer somebody invented or duplicating state in every tab. So the host says when something CHANGED, and an app builds whatever reactive wrapper its framework wants over that signal (createProgressReadable is the one for the common case).
A push is SUBSCRIBED TO, never broadcast: nothing is posted until a tab asks, and unsubscribeFromProgress stops it. A later push adds a key here and its own subscribe/unsubscribe pair of cases.
Deliberately NOT a cross-tab mechanism. This is a host telling ITS OWN tab how it is doing; how a READER tab in another window learns that state moved is a-reader-learns-when-the-state-moved's decision.
Properties ​
progress ​
readonlyprogress:HostProgress
Defined in: packages/browser/src/host/envelope.ts:717
WHERE THE FOLD HAS GOT TO, pushed when it CHANGED.
The cadence is APPLIED WORK and never a timer: the container publishes a cursor per applied batch, and that is what moves this. A value identical to the last one pushed is not sent at all, so a host resting at the tip is silent rather than emitting a heartbeat an app would have to ignore.
stateMoved ​
readonlystateMoved:StateMoved
Defined in: packages/browser/src/host/envelope.ts:738
THE STATE MOVED: the state-moved signal ADR-0083 decides, carried across this port UNCHANGED.
@etherfold/core's own StateMoved and deliberately not a browser-flavoured variant of it: the same notion crosses a MessagePort, a BroadcastChannel and a server's stream, so an app that later points at a remote indexer writes ONE handler. The transports are adapters over the shape; the shape is not the transport's to widen or to narrow, and it is plain data, so it crosses a structured clone as itself.
ONE per block the CANONICAL fold applied, plus one per retraction, and nothing else -- so a host resting at the tip is silent, because nothing moved. It is deliberately NOT merged with progress: both are "the host telling the tab something", and they answer different questions at different cadences. Progress is how far the fold has got (a state, re-reported when the phase or the cursor moved, including at a load or a refusal, where no block was applied); this says WHAT MOVED so a reader can invalidate narrowly, and a reader's whole rule is the token comparison ADR-0083 states.