|
|
@@ -1627,10 +1627,10 @@ export const SERVICE_API: readonly ServiceApiEntry[] = [
|
|
|
returns: 'a title-only checkpoint view with `asOfSeq: -1`, or `undefined` when the record is current, newer, unrelated, missing, or incompatible with the title unit. The sentinel avoids reusing a sequence that a cardinality-changing Session migration may have remapped.',
|
|
|
},
|
|
|
{
|
|
|
- signature: 'hydratePrepared( session: Session, events: readonly SessionEvent[], keys?: readonly Extract<keyof SessionProjectionMap, string>[], ): ProjectionSnapshot',
|
|
|
+ signature: 'hydratePrepared( session: Session, events: readonly SessionEvent[], projectionMode: \'all\' | \'none\' = \'all\', ): ProjectionSnapshot',
|
|
|
description: 'Hydrate projection cells for an already-prepared Session without another persistence read. The cache seeds matching rows; the supplied exact log advances every unit to the observation cut. No checkpoint is written because the logical observation may contain recovery events not yet durable.',
|
|
|
- parameters: [{ name: 'session', description: 'exact unpublished Session retained by persistence.' }, { name: 'events', description: 'exact logical event prefix represented by the observation.' }, { name: 'keys', description: 'optional client-visible outputs; an empty list hydrates states without computing or validating views.' }],
|
|
|
- returns: 'selected projection values at the event cut, defaulting to all views.',
|
|
|
+ parameters: [{ name: 'session', description: 'exact unpublished Session retained by persistence.' }, { name: 'events', description: 'exact logical event prefix represented by the observation.' }, { name: 'projectionMode', description: '`none` hydrates every state without computing or validating client views; defaults to `all`.' }],
|
|
|
+ returns: 'the event cut with all client views, or empty values in `none` mode.',
|
|
|
},
|
|
|
{
|
|
|
signature: 'async write(session: Session): Promise<void>',
|
|
|
@@ -1706,16 +1706,16 @@ export const SERVICE_API: readonly ServiceApiEntry[] = [
|
|
|
returns: 'whole values per key with a usable row; empty when none.',
|
|
|
},
|
|
|
{
|
|
|
- signature: 'restore( checkpoint: ProjectionCheckpoint, events: readonly SessionEvent[], baseSeq: SessionLogOffset, header: SessionHeader, inheritedEventCount: SessionLogOffset, keys?: readonly Extract<keyof SessionProjectionMap, string>[], ): { snapshot: ProjectionSnapshot; checkpoint: ProjectionCheckpoint }',
|
|
|
+ signature: 'restore( checkpoint: ProjectionCheckpoint, events: readonly SessionEvent[], baseSeq: SessionLogOffset, header: SessionHeader, inheritedEventCount: SessionLogOffset, projectionMode: \'all\' | \'none\' = \'all\', ): { snapshot: ProjectionSnapshot; checkpoint: ProjectionCheckpoint }',
|
|
|
description: 'Cold read: fold every persisted unit over a stored log suffix, seeding each from its checkpoint row when usable — the one read recipe (cached state + forward tail replay + `view`) applied without a live `Session`. Call with the stored events at or past `restoreFloor(checkpoint)` (a `SessionHandle.read` slice) and that same floor as `baseSeq`; the floor\'s one-below anchor makes the supplied end honest, so a shrunk log is detected here. A row is usable iff its `ver` matches the live unit\'s `stateVersion`, it does not predate `baseSeq` (`seq >= baseSeq - 1`), and it does not claim events past the supplied end (`seq <= endSeq`); an unusable row is discarded and its key refolds from `init` — which is only sound over the full log, so a discarded row with `baseSeq > 0` throws (the caller re-reads from seq 0, e.g. after a crash-repair truncation shrank the log below a row\'s watermark).',
|
|
|
- parameters: [{ name: 'checkpoint', description: 'persisted rows for one session (possibly stale or empty).' }, { name: 'events', description: 'the stored events with `seq >= baseSeq`, in seq order.' }, { name: 'baseSeq', description: 'the seq `events` starts at (its first event\'s seq when non-empty).' }, { name: 'header', description: 'immutable metadata for the Session being restored.' }, { name: 'inheritedEventCount', description: 'exact fork-inherited prefix length supplied to unit initialization.' }, { name: 'keys', description: 'optional client-visible outputs; an empty list restores every state without computing or validating views.' }],
|
|
|
+ parameters: [{ name: 'checkpoint', description: 'persisted rows for one session (possibly stale or empty).' }, { name: 'events', description: 'the stored events with `seq >= baseSeq`, in seq order.' }, { name: 'baseSeq', description: 'the seq `events` starts at (its first event\'s seq when non-empty).' }, { name: 'header', description: 'immutable metadata for the Session being restored.' }, { name: 'inheritedEventCount', description: 'exact fork-inherited prefix length supplied to unit initialization.' }, { name: 'projectionMode', description: '`none` restores every state without computing or validating client views; defaults to `all`.' }],
|
|
|
returns: 'the snapshot cut at the supplied log end (`asOfSeq` is the last supplied event\'s seq, `baseSeq - 1` for an empty tail) plus the refreshed checkpoint rows at that cut, ready for a durable write-back.',
|
|
|
},
|
|
|
{
|
|
|
- signature: 'hydrate( session: Session, checkpoint: ProjectionCheckpoint, events: readonly SessionEvent[], baseSeq: SessionLogOffset, keys?: readonly Extract<keyof SessionProjectionMap, string>[], ): ProjectionSnapshot',
|
|
|
+ signature: 'hydrate( session: Session, checkpoint: ProjectionCheckpoint, events: readonly SessionEvent[], baseSeq: SessionLogOffset, projectionMode: \'all\' | \'none\' = \'all\', ): ProjectionSnapshot',
|
|
|
description: 'Restore an exact cut and install its states on the supplied prepared Session. A later publication reuses these cells; ordinary live reads and event drive advance any constructor-owned suffix exactly once.',
|
|
|
- parameters: [{ name: 'session', description: 'exact prepared Session that owns the restored log prefix.' }, { name: 'checkpoint', description: 'persisted rows for this Session lifecycle.' }, { name: 'events', description: 'exact events at the observation cut.' }, { name: 'baseSeq', description: 'first supplied event sequence.' }, { name: 'keys', description: 'optional client-visible outputs; an empty list installs every state without computing or validating views.' }],
|
|
|
- returns: 'selected projection values at the supplied cut, defaulting to all views.',
|
|
|
+ parameters: [{ name: 'session', description: 'exact prepared Session that owns the restored log prefix.' }, { name: 'checkpoint', description: 'persisted rows for this Session lifecycle.' }, { name: 'events', description: 'exact events at the observation cut.' }, { name: 'baseSeq', description: 'first supplied event sequence.' }, { name: 'projectionMode', description: '`none` installs every state without computing or validating client views; defaults to `all`.' }],
|
|
|
+ returns: 'the supplied cut with all client views, or empty values in `none` mode.',
|
|
|
},
|
|
|
],
|
|
|
},
|