Type Alias: StateCommitChange

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.

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). See the writer key guide for patterns and pitfalls.

Properties

commit_id

commit_id: string


created_at

created_at: string


entity_id

entity_id: string


file_id

file_id: string


id

id: string


metadata?

optional metadata: Record<string, any> | null

Arbitrary metadata attached to the originating change, if any.


plugin_key

plugin_key: string


schema_key

schema_key: string


schema_version

schema_version: string


snapshot_content

snapshot_content: Record<string, any> | null


untracked?

optional untracked: number

0 for tracked, 1 for untracked


version_id

version_id: string


writer_key

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