AgentBlueprintProtocol.Error (Agent Blueprint Protocol v0.1.0)

Copy Markdown View Source

The typed failure record: code + subject + optional detail. This is the failure shape of the bounds-algebra surface; the decode surfaces still return bare reason atoms and migrate here with the composed import (a recorded contract delta).

subject is a schema-derived path built from the protocol's own member names and array indices — never from input values — so an error is not an echo channel. detail is populated only for :protected_bound_clamp_denied, the one code base §Evolution (:155-156) requires to carry values; every other code carries a code and a subject and nothing else. An error is a typed failure fact, not a decision. An error is a typed failure fact, not a decision.

Summary

Functions

The declared {:ceiling, key} family keys (the decoder limit names).

The declared implemented vocabulary (hand-maintained; see @codes).

Whether code is a declared member of the implemented vocabulary.

Types

code()

@type code() :: atom() | {:ceiling, atom()}

subject()

@type subject() :: [binary() | non_neg_integer()]

t()

@type t() :: %AgentBlueprintProtocol.Error{
  code: code(),
  detail: nil | AgentBlueprintProtocol.BoundsAlgebra.ClampEvidence.t(),
  subject: subject()
}

Functions

ceiling_keys()

@spec ceiling_keys() :: [atom()]

The declared {:ceiling, key} family keys (the decoder limit names).

codes()

@spec codes() :: [code()]

The declared implemented vocabulary (hand-maintained; see @codes).

declared?(code)

@spec declared?(term()) :: boolean()

Whether code is a declared member of the implemented vocabulary.