Canonical snapshot artifact helpers.
Snapshots are the immutable unit of metadata publication and runtime loading.
They are stored as a single snapshot.json file, addressed by snapshot_id,
and optionally mirrored to GitHub Releases.
Summary
Functions
Returns the local build output directory for snapshots.
Returns the default build artifact path for snapshot-meta.json.
Returns the default build artifact path for snapshot.json.
Returns provider/model counts for a snapshot document.
Decodes and verifies a snapshot document from JSON.
Encodes a snapshot or metadata document as pretty JSON.
Builds a canonical snapshot document from an engine snapshot.
Builds snapshot metadata suitable for snapshot-index.json and latest.json.
Returns the packaged snapshot file path.
Reads and verifies a snapshot document from disk.
Returns the canonical snapshot schema version.
Computes the content-addressed snapshot ID for a snapshot document.
Returns the source-tree packaged snapshot path used for release packaging.
Verifies snapshot integrity and provider ID safety.
Writes a snapshot or metadata document to disk.
Functions
@spec build_dir() :: String.t()
Returns the local build output directory for snapshots.
@spec build_meta_path() :: String.t()
Returns the default build artifact path for snapshot-meta.json.
@spec build_path() :: String.t()
Returns the default build artifact path for snapshot.json.
@spec counts(map()) :: %{ provider_count: non_neg_integer(), model_count: non_neg_integer() }
Returns provider/model counts for a snapshot document.
Decodes and verifies a snapshot document from JSON.
Encodes a snapshot or metadata document as pretty JSON.
Builds a canonical snapshot document from an engine snapshot.
@spec history_archive_filename() :: String.t()
@spec history_meta_filename() :: String.t()
@spec latest_filename() :: String.t()
Builds snapshot metadata suitable for snapshot-index.json and latest.json.
@spec packaged_path() :: String.t()
Returns the packaged snapshot file path.
Reads and verifies a snapshot document from disk.
@spec schema_version() :: pos_integer()
Returns the canonical snapshot schema version.
@spec snapshot_filename() :: String.t()
Computes the content-addressed snapshot ID for a snapshot document.
@spec snapshot_index_filename() :: String.t()
@spec snapshot_meta_filename() :: String.t()
@spec source_packaged_path() :: String.t()
Returns the source-tree packaged snapshot path used for release packaging.
Verifies snapshot integrity and provider ID safety.
Writes a snapshot or metadata document to disk.