Expand description
Driver-facing API shapes (JSON-able), mirroring the conformance
ClientInstance contract: sync reports, conflicts, rejections, row
states, unit states. Serialized as camelCase to cross the shim
boundary unchanged.
Structs§
- Applied
Server Commit - JSON bindings carry the u64 revision as a decimal string (§7.5).
- Authority
Read Declaration - Static read policy; never accepted as snapshot parameters.
- Client
Change Batch - Client
Diagnostics Host - Client
Diagnostics Lease - Client
Diagnostics Replica - 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 - Current
Base Proof - Result of proving every retained base after a completed pull (§7.2.1).
- 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
Units - §7.6: registered units per state; a unit id never enters diagnostics.
- Echo
Record - §4.4 one fenced record of a persisted echo: the effective lists the wildcard fence added for a covered table, or its revocation.
- 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 unit catch-up states, and requested commit deliveries.
- Sync
Report - Sync
Status Snapshot - Table
Change - Unit
Record - §4.1 one registered unit as the client persists it.
- Window
Base - §4.8 window base: the selected scope variable plus the fixed scope values every unit of its family shares. A base names no table: each unit covers every table declaring its variables (§4.1).
- 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 (it 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§
- Applied
Server Commit Source - 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 - Current
Base Proof Reason - 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. - 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 - Transport
Cause Kind - Bounded transport classification for progress and diagnostics (§1.8).
- Unit
Catchup - §7.5: the catch-up state of one unit as persisted in the snapshot, never
the mutable owner cache.
Unknownmeans the client does not currently hold the unit (never registered, released, or removed). - Unit
Status - §4.1 persisted unit status.
Constants§
- CLIENT_
DIAGNOSTICS_ VERSION - LOCAL_
AUTHORITY_ UNCONFIGURED_ CODE - §12 client-local code: a local-authority call or config on a host that
has no local authority (the build lacks the
local-authorityfeature, the config names nolocalAuthorityPath, or attach has no remote server). - 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.
- Unit
Scopes - §4.1: a unit’s scope map, one value per requested scope variable.