LLMDB.Snapshot.ReleaseStore (LLM DB v2026.4.4)

Copy Markdown View Source

GitHub Releases-backed snapshot artifact store.

Runtime fetching resolves immutable snapshot and history releases via the GitHub Releases API and downloads public assets via Req. Publishing is handled with the gh CLI, intended for local maintainer workflows and GitHub Actions.

Summary

Types

config()

@type config() :: %{repo: String.t(), index_tag: String.t(), cache_dir: String.t()}

Functions

asset_url(tag, filename, overrides \\ %{})

@spec asset_url(String.t(), String.t(), keyword() | map()) :: String.t()

config(overrides \\ [])

@spec config(keyword() | map()) :: config()

download_history_archive(destination, overrides \\ %{})

@spec download_history_archive(String.t(), keyword() | map()) ::
  :ok | {:error, term()}

ensure_snapshot_release(snapshot_path, meta_path, snapshot_id, overrides \\ %{})

@spec ensure_snapshot_release(String.t(), String.t(), String.t(), keyword() | map()) ::
  {:ok, String.t()} | {:error, term()}

fetch_history_meta(overrides \\ %{})

@spec fetch_history_meta(keyword() | map()) :: {:ok, map()} | {:error, term()}

fetch_latest(overrides \\ %{})

@spec fetch_latest(keyword() | map()) :: {:ok, map()} | {:error, term()}

fetch_snapshot(ref, overrides \\ %{})

@spec fetch_snapshot(:latest | String.t(), keyword() | map()) ::
  {:ok, %{snapshot: map(), snapshot_id: String.t(), path: String.t()}}
  | {:error, term()}

fetch_snapshot_index(overrides \\ %{})

@spec fetch_snapshot_index(keyword() | map()) :: {:ok, [map()]} | {:error, term()}

history_archive_asset_url(snapshot_id, overrides \\ %{})

@spec history_archive_asset_url(String.t(), keyword() | map()) :: String.t() | nil

history_meta_asset_url(snapshot_id, overrides \\ %{})

@spec history_meta_asset_url(String.t(), keyword() | map()) :: String.t() | nil

history_tag(snapshot_id)

@spec history_tag(String.t()) :: String.t()

publish_history_release(asset_paths, snapshot_id, overrides \\ %{})

@spec publish_history_release([String.t()], String.t(), keyword() | map()) ::
  {:ok, String.t()} | {:error, term()}

snapshot_asset_url(snapshot_id, overrides \\ %{})

@spec snapshot_asset_url(String.t(), keyword() | map()) :: String.t() | nil

snapshot_meta_asset_url(snapshot_id, overrides \\ %{})

@spec snapshot_meta_asset_url(String.t(), keyword() | map()) :: String.t() | nil

snapshot_tag(snapshot_id)

@spec snapshot_tag(String.t()) :: String.t()