Projection-backed inspection for the journal-backed runtime.
The current public Squidie.inspect_run/2 API reads the durable Jido
journal through the configured Jido.Storage. This module is the read-model
boundary for the journal-backed runtime: it rebuilds workflow and dispatch
agents from journal entries, combines their projections, and returns a
factual snapshot of one run.
The snapshot is intentionally read-only. It does not recover missing dispatch
entries, apply completed results, or mutate checkpoints. Recovery remains
owned by Squidie.Runtime.AgentRecovery; inspection reports what the
durable journals currently prove.
Summary
Functions
Builds a projection-backed inspection snapshot for one workflow run.
Types
@type snapshot_option() :: {:queue, atom() | String.t()} | {:now, DateTime.t()}
@type storage_config() :: Squidie.Runtime.Journal.storage_config()
Functions
@spec snapshot(storage_config(), Squidie.Runtime.WorkflowAgent.run_id(), [ snapshot_option() ]) :: {:ok, Squidie.ReadModel.Inspection.Snapshot.t()} | {:error, snapshot_error()}
Builds a projection-backed inspection snapshot for one workflow run.
Options:
:queueselects the dispatch queue projection to join with the run projection. It defaults to"default".:nowcontrols visibility and lease-expiry calculations. It defaults toDateTime.utc_now/0.
Missing run threads return {:error, :not_found}. A missing dispatch thread is
treated as an empty queue projection because a run can be planned before its
dispatch intents have been recovered.