Expand description
Schema migration registry for AgentStateGraph databases.
See spec/UPGRADE-PATH.md for the design.
flow:
consumer startup → check(repo, target) → CheckResult
UpToDate → continue
Unversioned / → run migrations
UpgradeAvailable
Downgrade → refuse (exit 64)
Corrupt → refuse (exit 65)Builtin migrations live in migrations/. External siblings may
register their own via Registry::register.
Modules§
- exit
- Exit codes for consumer CLIs that surface
check()/run()results. - migrations
- Shipped migrations. Each lives in its own submodule and is
registered by
Registry::builtin().
Structs§
- Migration
Outcome - Summary of what a migration accomplished on a single ref.
- Registry
- Registry of migrations, ordered by
to_versionthen registration order. - Report
- Step
Report
Enums§
- Check
Result - Result of
check()— what a consumer should do at startup. - Migrate
Error - RunMode
- Step
Status
Constants§
- IMPLICIT_
VERSION - Version stamped into a
.dbwhen the meta sentinel is absent. This is the pre-/_metaera — everything written before 0.4.0. - META_
PATH_ PREFIX - Public re-export — migration authors need this.
Reserved state path prefix for schema metadata. Writes under this
prefix are only permitted on commits tagged
IntentCategory::Migrate.
Traits§
- Migration
- A single named, idempotent migration step.
Functions§
- binary_
version - Current schema version of this binary, as a parsed
semver::Version. - check
- Inspect a repository and tell a consumer what to do.
- migrate_
commit_ options - Helper for migration authors: build a
CommitOptionstaggedIntentCategory::Migratewith the conventional agent_id. - version_
object - Helper: produce an Object holding a schema_version string.