cayu.snapshots.AgentSnapshotNode
Part of cayu.snapshots.base. Read the Python API overview and install the required extra.
from cayu.snapshots import AgentSnapshotNodeOne strict content-addressed node in an AgentSnapshot Merkle DAG.
Bases: _SnapshotModel.
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 |
|---|---|---|
record_type |
Literal['cayu.agent-snapshot-node'] |
AGENT_SNAPSHOT_NODE_RECORD_TYPE |
schema_version |
Literal[1] |
AGENT_SNAPSHOT_NODE_SCHEMA_VERSION |
node_kind |
AgentSnapshotNodeKind |
required |
schema_id |
StrictStr |
Field(max_length=256) |
payload |
dict[str, object] |
required |
children |
tuple[AgentSnapshotNodeChild, ...] |
() |
digest |
StrictStr |
required |
validate_schema_id (method)
Section titled “validate_schema_id (method)”AgentSnapshotNode.validate_schema_id(value: str, info) -> strvalidate_payload (method)
Section titled “validate_payload (method)”AgentSnapshotNode.validate_payload(value: object) -> dict[str, object]validate_children_array (method)
Section titled “validate_children_array (method)”AgentSnapshotNode.validate_children_array(value: object) -> objectvalidate_digest (method)
Section titled “validate_digest (method)”AgentSnapshotNode.validate_digest(value: str, info) -> strvalidate_envelope (method)
Section titled “validate_envelope (method)”AgentSnapshotNode.validate_envelope() -> AgentSnapshotNodeidentity_material (method)
Section titled “identity_material (method)”AgentSnapshotNode.identity_material() -> dict[str, object]create (method)
Section titled “create (method)”AgentSnapshotNode.create(*, node_kind: AgentSnapshotNodeKind, schema_id: str, payload: dict[str, object], children: Iterable[AgentSnapshotNodeChild]=()) -> AgentSnapshotNode