Jido.Storage boundary for Squid Mesh durable runtime facts.
The dispatch protocol owns the runtime fact schema. This module adapts those facts into Jido thread entries and checkpoints so storage-backed runtime slices can rebuild projections without reading the legacy runtime tables.
Summary
Types
@type append_error() :: :empty_entries | {:mixed_threads, [SquidMesh.Runtime.DispatchProtocol.Entry.thread()]} | term()
@type loaded_thread() :: %{ thread: SquidMesh.Runtime.DispatchProtocol.Entry.thread(), thread_id: String.t(), rev: non_neg_integer(), entries: [SquidMesh.Runtime.DispatchProtocol.Entry.t()] }
Functions
@spec append_entries( storage_config(), [SquidMesh.Runtime.DispatchProtocol.Entry.t()], keyword() ) :: {:ok, Jido.Thread.t()} | {:error, append_error()}
@spec fetch_checkpoint( storage_config(), SquidMesh.Runtime.DispatchProtocol.Entry.thread() ) :: {:ok, SquidMesh.Runtime.Journal.Checkpoint.t()} | {:error, term()}
@spec load_entries( storage_config(), SquidMesh.Runtime.DispatchProtocol.Entry.thread() ) :: {:ok, [SquidMesh.Runtime.DispatchProtocol.Entry.t()]} | {:error, term()}
@spec load_thread(storage_config(), SquidMesh.Runtime.DispatchProtocol.Entry.thread()) :: {:ok, loaded_thread()} | {:error, term()}
@spec put_checkpoint( storage_config(), SquidMesh.Runtime.DispatchProtocol.Entry.thread(), term(), non_neg_integer(), keyword() ) :: :ok | {:error, term()}
@spec rebuild_dispatch_projection(storage_config(), String.t()) :: {:ok, SquidMesh.Runtime.DispatchProtocol.Projection.t()} | {:error, term()}
@spec thread_id(SquidMesh.Runtime.DispatchProtocol.Entry.thread()) :: String.t()