Insider.Incident.Capsule (Insider v0.1.0)

Copy Markdown View Source

A bounded, redacted, content-addressed incident artifact that validates offline.

Assembly accepts only a sealed recorder snapshot, a supported normalized finding, validated provenance, trusted export policy, audit identifiers, and digest-only artifact references. It invokes redaction itself for every root and rejects preexisting Event redaction claims.

Summary

Types

t()

@type t() :: %Insider.Incident.Capsule{
  artifacts: [map()],
  authority: map(),
  finding: map(),
  id: String.t(),
  integrity: map(),
  provenance: map(),
  redaction: map(),
  schema: String.t(),
  snapshot: map()
}

Functions

assemble(snapshot, finding, provenance, options)

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

canonical_binary(capsule)

@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()}

to_wire_map(capsule)

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

validate(capsule)

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