Public API map
This page is a navigation aid rather than generated API documentation.
Declaration
Statesman.Declare(id, version)creates a single-useStatesmanDeclarationBuilder.Defaultsdeclares inherited store, freshness, retention, refresh, fault, and equivalent-write behavior.Containerdeclares attached or isolated path scopes with nested defaults and states.State<T>declares a singleton or partitioned typed state.Initial,Load,Freshness,Refresh,Retain,Interact,Invariant,MigrateFrom,CompareWith,Describe, andTagcomplete a state definition.Buildfreezes runtime definitions, normalizes unordered values, emits a manifest, and computes its fingerprint.
Runtime
IStatesman.State<T>returns a typed state handle.IStatesman.Containerreturns a path-scoped view.GetAsync,SetAsync,InvalidateAsync,ClearAsync,HistoryAsync,ObserveAsync, andCaptureAsyncsupport dynamic tooling and orchestration.InitializeAsync,SignalAsync, andMaintainAsyncdrive startup and proactive acquisition.IStatesmanRegistryresolves multiple named roots.IStatesmanDiagnostics, discovered withStatesmanDiagnosticsExtensions.TryGetDiagnostics, reads and clears the runtime's retained maintenance failures as aMaintenanceFailureDiagnosticssnapshot ofMaintenanceFailurerecords, and its retained load reports as aLoadDiagnosticssnapshot ofStateLoadReportvalues each carrying oneStateSourceLoadReportper declared source;StatesmanDiagnosticsnames the retention bounds and the per-store rate limit those two families are subject to.
State handle
Currentis a non-blocking local observation.GetAsyncapplies an explicit read mode.SetAsyncrecords a supplied authoritative value.UpdateAsynccomputes a new value and may re-run after a conflict.DispatchAsyncexecutes a declared typed interaction.RefreshAsyncruns declared acquisition.InvalidateAsyncretains a payload while marking it suspect.ClearAsyncappends a tombstone.HistoryAsyncreads retained revisions.ObserveAsyncpublishes accepted process-local changes.
Snapshots
IStateSnapshot includes address, value type, stream revision, provider global position, observation and occurrence times, operation, status, value availability, freshness boundaries, error, and metadata. IStateSnapshot<T> adds the typed optional value and RequiredValue.
Ledger
IStateLedgerStore has four responsibilities: read the head, read retained history, conditionally append, and prune. IStateLedgerReplica optionally imports exact authoritative records. IStateStoreResolver maps declaration store names to providers. RedisStateLedgerStoreOptions.KeyLayout selects the Redis key shape: RedisKeyLayout.Legacy, the default, is byte-identical to every key previously written, and RedisKeyLayout.SingleSlot adds a per-store hash tag so one store's keys share a hash slot, which is what Redis Cluster requires.
StateRecord.Envelope and StateCommit.Envelope carry a StateEnvelope: the payload's media type,
the id of the serializer that produced it, the declaration fingerprint it was serialized under, and the
envelope's own format version. It is nullable everywhere, and a record written before this release
reads back with it null. IStateSerializer.SerializerId and IStateSerializer.ContentType are default
interface members, so an existing serializer keeps compiling; JsonStateSerializer overrides them with
JsonStateSerializer.Id (statesman.json/v1) and JsonStateSerializer.MediaType
(application/json), both of which are a persisted contract from this release onward. Nothing
validates an envelope on read.
Integration packages
Dependency injection registers named stores and roots. Hosting initializes and maintains roots. ASP.NET Core maps secured inspection endpoints. HTTP supplies JSON source helpers and a remote client. Testing supplies manual time, an isolated runtime harness, fluent scenario seeding, and portable snapshot fixtures for integration/E2E orchestration. Tooling exports one root's retained ledger history to a portable file and restores it exactly, refusing any export whose declaration fingerprint does not match the target's manifest. Outbox delivers ledger changes from the durable change feed to a message broker at least once, under a lease that keeps one dispatcher at a time advancing a persisted, monotonic cursor. Analyzers enforce managed-state mutation boundaries and deterministic keys.