Expand description
Driver-facing API shapes (JSON-able), mirroring the conformance
ClientInstance contract: sync reports, conflicts, rejections, row
states, subscription states. Serialized as camelCase to cross the shim
boundary unchanged.
Structs§
- Authority
Read Declaration - Static read policy; never accepted as snapshot parameters.
- Client
Change Batch - JSON bindings carry the u64 revision as a decimal string (§7.5).
- Client
Diagnostics Host - Client
Diagnostics Lease - Client
Diagnostics Replica - Client
Diagnostics Request - Client
Diagnostics Schema - Client
Diagnostics Snapshot - Client
Diagnostics Storage - Client
Error - A structured failure from a local authoring API (
mutate/patch).codeis always a stableclient.*/sync.*identity,messageis static text with no table/row/column values,detailscarries SQLite classification evidence or the preserved legacy cause, andretryableis true only for transient storage contention. Callers read these fields instead of parsing a"<code>: "prefix. - Client
Limits - Client limits (§4.2 request knobs).
- Command
Effects - Commit
Operation - Schema-agnostic local operation retained with a failed final outcome.
- Commit
Outcome - Commit
Outcome Query - Conflict
Record - Coverage
Snapshot - Diagnostic
Last Change - Diagnostic
Last Round - Diagnostic
Query Failure - §7.6: the latest owned snapshot read of one query id failed.
- Diagnostic
Round Counters - Diagnostic
Subscription - Expected
Diagnostic Subscription - Fetched
Blob - An owned blob body returned by the Rust client without driver encoding.
- Lease
State - §7.3.5: the client’s opaque auth-lease state —
leaseId/expiresAtMsfrom the lastLEASEframe, anderrorCodeonce a round was rejected with a request-level lease code (stop-and-surface; no data purge). - Local
Data Purge Input - Durable local idempotency key plus exact routing targets. The host owns directive authenticity and subscription gating; the client owns SQLite.
- Local
Data Purge Result - Privacy-safe local purge acknowledgement; row ids never cross the bridge.
- Local
Data Purge Target - One AND-combined application-authorized local purge target. Targets in one input are OR-combined. Selector columns must compile to plaintext strings; values are bounded code-like routing identifiers.
- Local
Data Rebootstrap Input - Durable application repair id. Reusing the id is an exact no-op.
- Local
Data Rebootstrap Result - Privacy-safe acknowledgement for a replicated-projection recovery.
- Presence
Peer - §8.6 a peer’s ephemeral presence document on a scope key.
- Previous
Version Status - RFC 0005 A2: presence of the previous-version container file.
- Query
Owner - §7.5: the query that owns a snapshot read. The id is application-owned,
stable, and PHI-free; generated named queries pass their
IDandTABLES. - Query
Read Failure - §7.5: a failed snapshot read or a failed local authoring write.
codeisclient.storage_corrupt,client.storage_io,client.storage_full, orclient.storage_busywhen SQLite reported that condition, andNonefor every other failure, which keeps its existing message. - Query
Snapshot - Rejection
Details - Bounded code-like metadata explicitly declared safe for authorized client
recovery UI. Diagnostic prose remains in
RejectionRecord.message. - Rejection
Record - Resolve
Commit Outcome Input - Retained
Commit Row - Retained
Unique Conflict - RowState
- Schema
Floor - Snapshot
Read - §7.5: the result of one atomic snapshot read over a single SQLite read transaction: one revision, every requested read-only statement’s rows, requested window coverage, requested subscription catch-up states, and requested commit deliveries.
- Subscription
Request - One registration of
SyncClient::subscribe_many: the arguments ofSyncClient::subscribe. - Subscription
State View - Sync
Report - Sync
Status Snapshot - Table
Change - Window
Base - §4.8 window base: one table, the scope variable whose values are the
window units, any fixed scopes shared by every unit, and host-opaque
paramscarried onto each unit’s subscription. - Window
Change - Window
Coverage - Window
State - §4.8 completeness oracle (I3): the windowed-in units for a base, plus
the subset whose bootstrap has not yet completed. Registration alone is
not completeness — a
pendingunit’s local replica may be empty or partial (its subscription still hascursor: -1or holds a resume token), and MUST NOT be rendered as complete. A unit with zero server rows still completes once its bootstrap round finishes. - Window
Unit Ref
Enums§
- Commit
Delivery - §7.5: delivery status for one client commit id. A commit still in the
outbox is
pending; a drained commit carries its persisted retained outcome; an id the client never held, or whose outcome was pruned by retention, isunknown. The outcome preserves every operation result, rejection code, and conflict. This is the persisted-journal view in both cores: it omits the owner-derivedretained_rowsimages thatSyncClient::commit_outcomeattaches from its in-memory failed-commit cache. - Commit
Operation Outcome - Commit
Outcome Resolution - Commit
Outcome Status - Mutation
- One local mutation (§6.1 shapes, schema-agnostic local form per §0).
- Realtime
Policy - §8.8: how this client treats the realtime binding for sync rounds.
- Realtime
State - §8.8: the explicit availability state of the realtime binding. The
TypeScript host adds
unsupported(no connector configured) andunknown(a wrapper without evidence); the Rust core reaches neither because a transport always carries a connect path. - Subscription
Catchup - §7.5: the catch-up state of one subscription, read from the persisted
subscription record inside the snapshot transaction (never the mutable
owner cache).
Unknownmeans the client does not currently hold the subscription (it was never registered, or it was forgotten or removed); it carries no fabricated table or cursor. A known state carries the persistedstatus(active,revoked, orfailed), the cursor, and whether a resume token is held. A reset subscription staysactivewithcursor < 0; it is not a fourth status. - Sync
Intent - Sync
Outcome sync()never panics or errors out-of-band: transport and protocol failures come back asFailed(the driver’s{ ok: false }).- Time
Bucket Unit
Constants§
- CLIENT_
DIAGNOSTICS_ VERSION - MAX_
DIAGNOSTIC_ EXPECTED_ SUBSCRIPTIONS - MAX_
DIAGNOSTIC_ QUERY_ FAILURES - REALTIME_
LOST_ CODE - §8.8 client-local code: a connected socket ended without a deliberate disconnect and the round reported no transport code. Never a wire code.
- REALTIME_
UNAVAILABLE_ CODE - §8.8 client-local code: the
requiredpolicy refused a sync round because the realtime socket is not connected. Never a wire code (§10.3).
Functions§
- creation_
time_ bucket - Derive the immutable UTC scope value stored when a row is created.
- last
- Return a rolling UTC month window ordered from oldest to newest.
Type Aliases§
- Query
Row - One dynamic query result row, keyed by QueryIR runtime projection name.
- Query
Value - Stable dynamic value boundary used by generated named queries.