Skip to main content

Crate agent_effects_store

Crate agent_effects_store 

Source
Expand description

Storage contract for agent-effects.

This crate holds what a store persists and enforces: effect identity (id), classification (kind, failure), the state machine (state), records, leases and audit events, and the EffectStore trait. Store backends depend on this crate only, never on the runtime.

The rules (lease fencing, version checks, the transition table, attempt bookkeeping) live in EffectRecord’s pure methods. A store’s job is only to run “load, apply, save the record and its audit event” atomically, so every backend behaves the same. The testkit feature’s testkit::conformance suite checks that.

Re-exports§

pub use failure::Disposition;
pub use failure::FailureClass;
pub use id::EffectId;
pub use id::EffectKey;
pub use id::EffectName;
pub use id::IdempotencyKey;
pub use id::IdentityError;
pub use id::LogicalKey;
pub use id::WorkerId;
pub use kind::EffectKind;
pub use state::EffectStatus;
pub use state::InvalidTransition;
pub use state::Transition;

Modules§

failure
Classification of execution failures.
id
Effect identity: record ids, logical keys and remote idempotency keys.
kind
Behavioral classification of effects.
state
The effect state machine.
testkit
Conformance suite for EffectStore implementations.

Structs§

EffectEvent
One entry of an effect’s audit trail.
EffectRecord
The durable state of one effect.
ErrorRecord
A recorded failure.
InsertOutcome
The result of EffectStore::insert_or_get.
Lease
Proof of holding an effect’s execution lease.
ListQuery
A filter for EffectStore::list.
NewEffect
A new effect to record.
PruneQuery
Which records EffectStore::prune deletes: those in a settled status that last changed at least older_than before now and hold no live lease at now.
TransitionRequest
A request to move an effect through one Transition.

Enums§

StoreError
Why a store operation failed.

Traits§

EffectStore
Persistence for effect records, leases and audit events.