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

@@ -105,7 +105,8 @@ export const todoItemSchema = z.object({
* deep-validating here would import every domain's schema into the carrier.
*/
export const sessionProjectionsBlockSchema = z.object({
asOfSeq: z.number().int().nonnegative(),
// -1 = empty log (the lastSeq convention of session/subscribed).
asOfSeq: z.number().int().min(-1),
values: z.record(z.string(), z.unknown()),
}) as unknown as z.ZodType<SessionProjectionsBlock>