MingaAgent.Tool.Output.Revision (Minga v0.1.0)

Copy Markdown View Source

Content-based source freshness. A requested range is never a whole-file mutation revision.

Summary

Functions

True only when this revision covers the full source rather than a requested range or query page.

Builds a revision from the captured content digest and an atomic source generation, when available.

Returns an unambiguous token binding the identity, captured scope, generation, and bytes.

Types

source_kind()

@type source_kind() ::
  :disk | :buffer | :fork | :changeset | :project_view | :query_snapshot

t()

@type t() :: %MingaAgent.Tool.Output.Revision{
  generation: non_neg_integer() | nil,
  scope: MingaAgent.Tool.Output.Range.t(),
  sha256: String.t(),
  source_id: String.t(),
  source_kind: source_kind()
}

Functions

full_source?(revision)

@spec full_source?(t()) :: boolean()

True only when this revision covers the full source rather than a requested range or query page.

new(attrs)

@spec new(keyword()) :: {:ok, t()} | {:error, :invalid_revision}

Builds a revision from the captured content digest and an atomic source generation, when available.

token(revision)

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

Returns an unambiguous token binding the identity, captured scope, generation, and bytes.