AgentBlueprintProtocol. ExtensionRegistry
(Agent Blueprint Protocol v0.1.0)
Copy Markdown
View Source
The COMPILED-IN extension registry: entries are module-attribute data, so registry content is a code release — drift is unrepresentable and a beam-census architecture gate asserts nothing reads a registry file at runtime.
Entry fields: namespace, owner, criticality (:critical |
:optional), state (:reserved | :active | :deprecated |
:retired, advancing monotonically), schema_digest (Digest.to_tagged
string or nil when the owner has not authored a schema — nil denies
critical bodies at negotiation with :extension_schema_unavailable),
a2a_uri (an externally versioned declaration URI, never dereferenced by
this package), and promoted_at_revision (the promotion-governance field:
optional → critical moves only with a protocol revision increment, which
the registry author records here; demotion needs no bump).
Schema authoring contract: an owner digests
Digest.hash(:extension_schema, JCS(parsed_document)) — JCS of the
PARSED document, never raw file bytes — and the schema must lie inside
Schema's bounded 2020-12 dialect (the digest pins that too). This
package owns com.example/federation's schema and ships it authored
(federation_schema/0); the product-owned entries carry nil until
their owners author one.
Registry entries are published facts about namespaces; the registry carries no authority.
Registry entries are published facts about namespaces; the registry carries no authority.
Summary
Functions
The registry's content digest (the corpus-registry binding):
Digest.hash(:extension_registry, JCS(entries projected to their declared field set, keyed by namespace)). Object member order is JCS-canonical, so
the entry list's order cannot leak. The conformance corpus index carries
this value; a corpus built for one registry state must not silently verify
against another — extension verdicts (unknown-critical, criticality
conflicts, schema digests) depend on WHAT is registered.
Resolve a namespace; :error for the unregistered.
The compiled registry entries (the five first-release rows; no reserved rows).
Types
@type criticality() :: :critical | :optional
@type state() :: :reserved | :active | :deprecated | :retired
@type t() :: %AgentBlueprintProtocol.ExtensionRegistry{ a2a_uri: binary(), criticality: criticality(), namespace: binary(), owner: binary(), promoted_at_revision: pos_integer() | nil, schema_digest: binary() | nil, state: state() }
Functions
@spec digest() :: AgentBlueprintProtocol.Digest.t()
The registry's content digest (the corpus-registry binding):
Digest.hash(:extension_registry, JCS(entries projected to their declared field set, keyed by namespace)). Object member order is JCS-canonical, so
the entry list's order cannot leak. The conformance corpus index carries
this value; a corpus built for one registry state must not silently verify
against another — extension verdicts (unknown-critical, criticality
conflicts, schema digests) depend on WHAT is registered.
Resolve a namespace; :error for the unregistered.
@spec federation_schema() :: AgentBlueprintProtocol.Json.value()
@spec registered_extensions() :: [t()]
The compiled registry entries (the five first-release rows; no reserved rows).