CharterAgreementProtocol.ExtensionRegistry (Charter Agreement Protocol v0.1.0)

Copy Markdown View Source

CAP never authorizes.

Compiled extension-profile registry. Registry changes are code releases; entries carry exactly the seven protocol fields and never read runtime files. promoted_at_revision records registry-release governance; artifact validators enforce the protocol revision declared by each artifact schema rather than reinterpreting that historical record as a runtime feature gate.

Summary

Functions

Return the domain-separated digest of all seven fields of every compiled entry.

Return the compiled registry in its stable publication order.

Resolve one compiled namespace.

Resolve the sole artifact surface assigned to one compiled namespace.

Return whether an active optional registry entry is a selectable receipt profile.

Return the compiled schema definitions keyed by the namespace their digest binds.

Types

criticality()

@type criticality() :: :critical | :optional

state()

@type state() :: :reserved | :active | :deprecated | :retired

t()

@type t() :: %CharterAgreementProtocol.ExtensionRegistry{
  a2a_uri: binary(),
  criticality: criticality(),
  namespace: binary(),
  owner: binary(),
  promoted_at_revision: nil | pos_integer(),
  schema_digest: nil | binary(),
  state: state()
}

Functions

digest()

@spec digest() :: CharterAgreementProtocol.Digest.t()

Return the domain-separated digest of all seven fields of every compiled entry.

entries()

@spec entries() :: [t()]

Return the compiled registry in its stable publication order.

entry(namespace)

@spec entry(binary()) :: {:ok, t()} | :error

Resolve one compiled namespace.

placement(namespace)

@spec placement(binary()) ::
  {:ok, :party_descriptor | :charter_revision | :receipt} | :error

Resolve the sole artifact surface assigned to one compiled namespace.

receipt_profile?(namespace)

@spec receipt_profile?(binary()) :: boolean()

Return whether an active optional registry entry is a selectable receipt profile.

schemas()

@spec schemas() :: %{
  required(binary()) => CharterAgreementProtocol.Schema.Definition.t()
}

Return the compiled schema definitions keyed by the namespace their digest binds.