GroundPlane.BoundaryProtocol.CommandEnvelope (GroundPlane Contracts v0.1.0)

Copy Markdown View Source

Canonical governed-operation command envelope for cross-plane dispatch.

The internal field names intentionally use the stack's _ref vocabulary. to_gaop_map/1 exposes the GAOP RFC-0002 boundary names at external protocol edges.

Summary

Types

t()

@type t() :: %GroundPlane.BoundaryProtocol.CommandEnvelope{
  actor_ref: String.t(),
  authority_ref: String.t() | nil,
  command_ref: String.t(),
  created_at: String.t(),
  effect_class: String.t(),
  expected_version: pos_integer() | nil,
  idempotency_key: String.t(),
  installation_ref: String.t() | nil,
  intent: map(),
  operation_type: String.t(),
  payload: GroundPlane.Boundary.Codec.canonical_value(),
  protocol_version: String.t(),
  resource_scopes: [map()],
  schema_ref: String.t(),
  tenant_ref: String.t(),
  trace_ref: String.t()
}

Functions

digest(envelope)

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

encode!(envelope)

@spec encode!(t()) :: String.t()

error_taxonomy()

@spec error_taxonomy() :: map()

new(attrs)

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

new!(attrs)

@spec new!(map() | keyword()) :: t()

to_gaop_map(envelope)

@spec to_gaop_map(t()) :: map()

to_map(envelope)

@spec to_map(t()) :: map()