// `sync.status` — DESCRIPTOR (browser-safe). // // Read-only view of the durable sync state: where the cursor sits and how many // idempotency markers are still live. The executor is written in Effect mode // (`yield* Kv`) to show the Effect-native surface alongside the async `ctx.kv`. import { defineAction } from '@voltro/protocol' import { Schema } from 'effect' export const syncStatus = defineAction({ name: 'sync.status', // Open: returns two integers about the request tenant's OWN sync state — a // watermark and a marker count read from `sync::` keys. No row // contents, no other tenant's keys, no writes. No auth strategy or rbac ships // in this template, so a scope guard would deny every caller. openAccess: 'returns two integers describing the request tenant\'s own sync state (watermark + live ' + 'marker count) from its own KV namespace; no row contents, no writes.', input: Schema.Struct({}), output: Schema.Struct({ cursor: Schema.Int, // the durable watermark activeMarkers: Schema.Int, // idempotency markers not yet expired }), })