StateCommitChange = {
commit_id:string;created_at:string;entity_id:string;file_id:string;id:string;metadata?:Record<string,any> |null;plugin_key:string;schema_key:string;schema_version:string;snapshot_content:Record<string,any> |null;untracked?:number;version_id:string;writer_key:string|null; }
State-committed row emitted to onStateCommit subscribers.
These are state-shaped (not low-level change rows) and include operational columns such as
version_id, commit_id, optional untracked, and writer_key.
Untracked rows (like derived change-set elements or log-style inserts) surface with
untracked: 1 and a sentinel commit_id: "untracked" because they do not belong to a
materialized commit yet. Observers should treat the pair (untracked === 1, commit_id === "untracked")
as “ephemeral” data and avoid dereferencing the commit.
The writer_key identifies the writer responsible for the materialized state row and enables
echo suppression in UIs (filter out your own writes while reacting to external ones). When no
explicit writer is provided (the default), the value is null.
See the writer key guide for patterns and pitfalls.
commit_id:
string
created_at:
string
entity_id:
string
file_id:
string
id:
string
optionalmetadata:Record<string,any> |null
Arbitrary metadata attached to the originating change, if any.
plugin_key:
string
schema_key:
string
schema_version:
string
snapshot_content:
Record<string,any> |null
optionaluntracked:number
0 for tracked, 1 for untracked
version_id:
string
writer_key:
string|null
Writer identity that produced this state row, if known.
Used for echo suppression (ignore my own writes; react to external ones). See docs: https://lix.dev/guide/writer-key