Insider.Sentinel.Manifest (Insider Lab v0.1.0)

Copy Markdown View Source

A closed, content-addressed handoff from an incident capsule to Sentinel.

The manifest contains no executable recipe and embeds no capsule bytes. It binds the exact canonical capsule bytes, summarizes the six prerequisites needed for confirmation, and fixes the permitted execution posture.

Summary

Functions

Derives confirmation readiness without changing the serialized manifest.

Validates a manifest and its exact canonical capsule as one offline unit.

Types

t()

@type t() :: %Insider.Sentinel.Manifest{
  capsule: map(),
  execution_policy: map(),
  id: String.t(),
  integrity: map(),
  prerequisites: map(),
  schema: String.t()
}

Functions

canonical_binary(manifest)

@spec canonical_binary(term()) ::
  {:ok, binary()} | {:error, Insider.Protocol.Error.t()}

decode(binary)

@spec decode(binary()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}

decode_map(payload)

@spec decode_map(term()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}

new(capsule_or_binary, scenario)

@spec new(Insider.Incident.Capsule.t() | binary(), map()) ::
  {:ok, t()} | {:error, Insider.Protocol.Error.t()}

readiness(manifest, capsule_or_binary)

@spec readiness(term(), Insider.Incident.Capsule.t() | binary()) ::
  {:ok, map()} | {:error, Insider.Protocol.Error.t()}

Derives confirmation readiness without changing the serialized manifest.

Blocked prerequisites retain their unavailable reason or redaction policy and are returned in stable prerequisite order.

to_wire_map(manifest)

@spec to_wire_map(t()) :: map()

validate(manifest)

@spec validate(term()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}

validate_with_capsule(manifest, capsule_or_binary)

@spec validate_with_capsule(term(), Insider.Incident.Capsule.t() | binary()) ::
  {:ok, t()} | {:error, Insider.Protocol.Error.t()}

Validates a manifest and its exact canonical capsule as one offline unit.