Expand description
Oxidized-State: SurrealDB Backend for AIVCS
This crate provides the persistence layer for the Agent Version Control System. It handles all I/O with SurrealDB, providing a clean persistence layer for graph states, runs, and memory.
§Layer 0 - Data/Persistence
Focus: Data integrity, transactionality, and graph traversal.
§Key Components
SurrealHandle: Manages connection and transactionsSnapshotRecord: Schema mapping to the Document Layer (State + Memory)GraphEdge: Schema mapping to the Graph Layer (Commit -> Parent)RunRecord,RunEventRecord: Schema for execution run ledgerReleaseRecordSchema: Schema for release managementinit_schema: Initialize all tables with constraints and indexes
Re-exports§
pub use migrations::init_schema;pub use storage_traits::CasStore;pub use storage_traits::ContentDigest;pub use storage_traits::ReleaseMetadata;pub use storage_traits::ReleaseRecord;pub use storage_traits::ReleaseRegistry;pub use storage_traits::RunEvent;pub use storage_traits::RunId;pub use storage_traits::RunLedger;pub use storage_traits::RunMetadata;pub use storage_traits::RunRecord;pub use storage_traits::RunStatus;pub use storage_traits::RunSummary;pub use storage_traits::StorageResult;pub use surreal_ledger::SurrealRunLedger;pub use surreal_release_registry::SurrealDbReleaseRegistry;
Modules§
- fakes
- In-memory fakes for storage traits (testing only)
- migrations
- SurrealDB schema migrations and initialization
- storage_
traits - Storage trait definitions for AIVCS
- surreal_
ledger - SurrealDB-backed RunLedger implementation
- surreal_
release_ registry
Structs§
- Agent
Record - Agent record - registered agent metadata
- Branch
Record - Branch record - pointer to a commit
- CiArtifact
- Metadata for a produced artifact.
- CiCommand
- A single command to execute inside CI.
- CiPipeline
Spec - A CI pipeline specification (ordered step list).
- CiRun
Record - Durable CI run object (content-linked to snapshot and pipeline).
- CiSnapshot
- Input snapshot metadata used to identify a CI run context.
- CiStep
Result - Immutable result for an executed step.
- CiStep
Spec - Declarative definition for one CI step.
- Cloud
Config - Configuration for SurrealDB Cloud connection
- Commit
Id - Composite Commit ID - hash of (Logic + State + Environment)
- Commit
Record - Commit record stored in SurrealDB
- DbRun
Event Record - Run event record - single event in execution
- DbRun
Record - Run record - execution run metadata and state
- Decision
Record - Decision record - captures agent decisions with rationale and outcomes
- Graph
Edge - Graph edge - represents commit relationships (parent -> child)
- Memory
Provenance Record - Memory provenance record - tracks lineage of memories
- Memory
Record - Memory record - agent memory/context for RAG
- Release
Record Schema - Release record - agent release and version management
- Snapshot
Record - Snapshot record - the actual agent state data
- Surreal
Handle - SurrealDB connection handle for AIVCS
Enums§
- CiRun
Status - Runtime status for a step/run.
- Provenance
Source Type - Provenance source for memory records
- State
Error - Errors that can occur in the state persistence layer
- Storage
Error - Errors for the storage trait abstractions (CasStore, RunLedger, ReleaseRegistry)
Type Aliases§
- Result
- Result type for oxidized-state operations