cayu.snapshots.AgentSnapshotComponentProvider
Part of cayu.snapshots.base. Read the Python API overview and install the required extra.
from cayu.snapshots import AgentSnapshotComponentProviderApplication/component-owned capture and materialization adapter.
Bases: ABC.
Fields and attributes
Section titled “Fields and attributes”Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.
| Name | Type | Default |
|---|---|---|
kind |
AgentSnapshotComponentKind |
required |
provider_id |
str |
required |
capture (method)
Section titled “capture (method)”async AgentSnapshotComponentProvider.capture(request: AgentSnapshotCaptureRequest, selector: AgentSnapshotComponentSelector) -> AgentSnapshotComponentCaptureCapture one exact, bounded logical component reference.
verify (method)
Section titled “verify (method)”async AgentSnapshotComponentProvider.verify(snapshot: AgentSnapshot, component: AgentSnapshotComponentRef) -> boolReturn whether the exact component remains valid and authorized.
materialize (method)
Section titled “materialize (method)”async AgentSnapshotComponentProvider.materialize(snapshot: AgentSnapshot, component: AgentSnapshotComponentRef, request: AgentSnapshotMaterializationRequest, operation: AgentSnapshotMaterializationOperation) -> AgentSnapshotMaterializedComponentMaterialize the exact, durably announced operation once.
The provider must bind all effects to operation.operation_id in its
own durable authority so concurrent or recovered calls cannot create a
second logical materialization.
recover_materialization_operation (method)
Section titled “recover_materialization_operation (method)”async AgentSnapshotComponentProvider.recover_materialization_operation(snapshot: AgentSnapshot, component: AgentSnapshotComponentRef, request: AgentSnapshotMaterializationRequest, operation: AgentSnapshotMaterializationOperation) -> AgentSnapshotMaterializedComponentSafely finish or recover one outcome-unknown announced operation.
Implementations must use operation.operation_id as durable
idempotency authority. They must fail closed when they cannot prove
whether an earlier invocation took effect; the coordinator never calls
materialize again for an operation already recorded as active.
recover (method)
Section titled “recover (method)”async AgentSnapshotComponentProvider.recover(snapshot: AgentSnapshot, component: AgentSnapshotComponentRef, materialized: AgentSnapshotMaterializedComponent, materialization: AgentSnapshotMaterialization) -> AgentSnapshotMaterializedComponentRecover an existing materialization without repeating candidate effects.