feat: session/projection push frame; tail block reads the watermark snapshot

This commit is contained in:
imccyu
2026-07-27 21:34:14 +08:00
parent 708d3132cf
commit 6f47df0913
7 changed files with 138 additions and 75 deletions

View File

@@ -37,13 +37,16 @@ export interface HistoryEntry {
/**
* The projection baseline riding the history tail page: one synchronous cut
* over every registered projection provider. `asOfSeq` equals the window tail
* seq (the session's next-event seq at slice time) because the handler reads
* it and every value with no await in between. A key absent from `values`
* means the capability is absent (its domain plugin is unmounted).
* over every registered projection unit, read from the registry's watermark
* cache. `asOfSeq` is the seq of the last committed event every value
* reflects — the window tail event seq (`-1` for an empty log, mirroring
* `session/subscribed.lastSeq`), directly comparable with
* `session/projection` frame seqs under the client's higher-seq-wins rule. A
* key absent from `values` means the capability is absent (its domain plugin
* is unmounted).
*/
export interface SessionProjectionsBlock {
/** The session seq the values are consistent with (window tail seq). */
/** Seq of the last event the values reflect; -1 for an empty log. */
asOfSeq: number
/** Whole current value per registered projection key. */
values: Partial<SessionProjectionMap>