Opt-in persistence boundary for redacted Experience evidence.
Unlike the Definition Store, this Store is not canonical Agent state and is never consulted for authorization or continuation ownership. Core verifies every content-addressed entry before exposing it to Reflection.
Summary
Functions
Returns the Experience Store artifact schema version.
Decodes and verifies canonical snapshot bytes.
Returns the Store's declared durability.
Builds an explicitly empty snapshot when Experience is not configured.
Encodes a snapshot with the production canonical codec.
Fetches and revalidates evidence by content Ref.
Returns the Store identity after validating its adapter callbacks.
Lists verified evidence for one Definition under an explicit time snapshot.
Normalizes an Experience Store configuration.
Publishes immutable, content-addressed evidence and reads it back.
Deletes only expired, non-retained Experience evidence after explicit confirmation.
Builds the exact redacted evidence snapshot bound by Reflection and Forge.
Restores and fully verifies a snapshot from portable data.
Returns portable JSON-shaped snapshot data.
Revalidates a snapshot and every embedded evidence item.
Types
@type durability() :: :volatile | :durable
@type snapshot() :: %{ definition_ref: Spectre.Definition.Ref.t(), as_of: non_neg_integer(), evidence: [Spectre.Experience.Evidence.t()], evidence_refs: [String.t()], digest: String.t() }
Callbacks
Functions
@spec artifact_schema_version() :: pos_integer()
Returns the Experience Store artifact schema version.
Decodes and verifies canonical snapshot bytes.
@spec durability(config()) :: {:ok, durability()} | {:error, term()}
Returns the Store's declared durability.
@spec empty_snapshot(Spectre.Definition.Ref.t() | String.t(), non_neg_integer()) :: {:ok, snapshot()} | {:error, term()}
Builds an explicitly empty snapshot when Experience is not configured.
Encodes a snapshot with the production canonical codec.
@spec fetch(config(), Spectre.Experience.Evidence.Ref.t() | String.t()) :: :not_found | {:ok, Spectre.Experience.Evidence.t()} | {:error, term()}
Fetches and revalidates evidence by content Ref.
Returns the Store identity after validating its adapter callbacks.
@spec list_evidence(config(), Spectre.Definition.Ref.t() | String.t(), keyword()) :: {:ok, [Spectre.Experience.Evidence.t()]} | {:error, term()}
Lists verified evidence for one Definition under an explicit time snapshot.
Normalizes an Experience Store configuration.
@spec publish(config(), Spectre.Experience.Evidence.t()) :: {:ok, Spectre.Experience.Evidence.Ref.t()} | {:error, term()}
Publishes immutable, content-addressed evidence and reads it back.
@spec purge_expired(config(), non_neg_integer(), keyword()) :: {:ok, [String.t()]} | {:error, term()}
Deletes only expired, non-retained Experience evidence after explicit confirmation.
@spec snapshot(config(), Spectre.Definition.Ref.t() | String.t(), keyword()) :: {:ok, snapshot()} | {:error, term()}
Builds the exact redacted evidence snapshot bound by Reflection and Forge.
Restores and fully verifies a snapshot from portable data.
Returns portable JSON-shaped snapshot data.
Revalidates a snapshot and every embedded evidence item.