AgentBlueprintProtocol (Agent Blueprint Protocol v0.1.1)

Copy Markdown View Source

Portable, non-authorizing contracts for agent blueprints and their environment-local deployment manifests.

The package is intentionally inert. Successful parsing, validation, canonicalization, digest verification, or signature verification will mean only that supplied bytes satisfy the supplied protocol inputs. Authorization, tenancy, live policy, effect ownership, and execution remain the consuming host's responsibility.

The facade delegates and never implements.

Summary

Functions

The artifact's canonical JCS bytes (the public contract's canonicalize row). Delegates to each artifact's own encoder; never re-canonicalizes non-canonical input (decode is the byte-verification surface).

Decode and fully verify a Blueprint artifact: canonical verify → registry validation → portability scan → content-digest comparison. See AgentBlueprintProtocol.Blueprint for the pipeline contract.

Decode and fully verify a Deployment Manifest: the same four-stage pipeline under the 19-member table and the :deployment_content digest domain. See AgentBlueprintProtocol.Deployment for the pipeline and binding-surface contracts.

Decode and fully verify a Federation TaskEnvelope: canonical verify → the 23-member registry walk → the federation portability pass. See AgentBlueprintProtocol.Federation for the envelope contract, the lossy-aware state codecs, and the carrier placement laws.

The 23-row field-by-field A2A/MCP Tasks mapping as data (the published table with the transport flags lives at docs/federation-mapping.md).

Intersect the three bound sources (Blueprint, Deployment host_bounds, host policy) under the protected-clamp posture — the narrowest intersection with deny-by-default protected clamps. See AgentBlueprintProtocol.BoundsAlgebra for the direction law, the marker-union rule, and the clamp evidence contract.

Negotiate an artifact against a consumer's support posture (the evolution gate): the revision SET, the required-core-field checks, and the extension state machine. In a STANDALONE pass this runs immediately after canonical verification, before any semantic read; in the composed import (reconcile/3) the digest stage runs between canonical and negotiation — see AgentBlueprintProtocol.Reconcile for the pinned stage order.

The one call per import: the composed non-authorizing pass — canonical → digest → negotiation → structure → portability → signatures → bind → bounds, each stage reject-or-annotate, never repair. The result is an %Evidence{} — never a decision. See AgentBlueprintProtocol.Reconcile for the stage machinery and the Reconcile.Inputs contract.

Verify the Deployment's manifest identities against the host's observed build identities: identity-exact or error — ranges deny on both sides, duplicates deny, unmatched manifest entries deny, extra observed identities are evidence-neutral. The result is an %Evidence{} naming the seven host-owned surfaces in not_verified. See AgentBlueprintProtocol.Compatibility.

Types

failure()

@type failure() :: {:error, term()}

Functions

canonical_bytes(blueprint)

The artifact's canonical JCS bytes (the public contract's canonicalize row). Delegates to each artifact's own encoder; never re-canonicalizes non-canonical input (decode is the byte-verification surface).

decode_blueprint(bytes, bounds \\ Bounds.maximum())

@spec decode_blueprint(binary(), AgentBlueprintProtocol.Bounds.t() | map()) ::
  {:ok, AgentBlueprintProtocol.Blueprint.t()} | failure()

Decode and fully verify a Blueprint artifact: canonical verify → registry validation → portability scan → content-digest comparison. See AgentBlueprintProtocol.Blueprint for the pipeline contract.

decode_deployment(bytes, bounds \\ Bounds.maximum())

@spec decode_deployment(binary(), AgentBlueprintProtocol.Bounds.t() | map()) ::
  {:ok, AgentBlueprintProtocol.Deployment.t()} | failure()

Decode and fully verify a Deployment Manifest: the same four-stage pipeline under the 19-member table and the :deployment_content digest domain. See AgentBlueprintProtocol.Deployment for the pipeline and binding-surface contracts.

decode_federation_envelope(bytes, bounds \\ Bounds.maximum())

@spec decode_federation_envelope(binary(), AgentBlueprintProtocol.Bounds.t() | map()) ::
  {:ok, AgentBlueprintProtocol.Federation.t()} | failure()

Decode and fully verify a Federation TaskEnvelope: canonical verify → the 23-member registry walk → the federation portability pass. See AgentBlueprintProtocol.Federation for the envelope contract, the lossy-aware state codecs, and the carrier placement laws.

federation_mapping()

@spec federation_mapping() :: [AgentBlueprintProtocol.Federation.Mapping.Row.t()]

The 23-row field-by-field A2A/MCP Tasks mapping as data (the published table with the transport flags lives at docs/federation-mapping.md).

intersect(sources)

Intersect the three bound sources (Blueprint, Deployment host_bounds, host policy) under the protected-clamp posture — the narrowest intersection with deny-by-default protected clamps. See AgentBlueprintProtocol.BoundsAlgebra for the direction law, the marker-union rule, and the clamp evidence contract.

negotiate(artifact, support)

Negotiate an artifact against a consumer's support posture (the evolution gate): the revision SET, the required-core-field checks, and the extension state machine. In a STANDALONE pass this runs immediately after canonical verification, before any semantic read; in the composed import (reconcile/3) the digest stage runs between canonical and negotiation — see AgentBlueprintProtocol.Reconcile for the pinned stage order.

reconcile(blueprint, deployment, inputs)

The one call per import: the composed non-authorizing pass — canonical → digest → negotiation → structure → portability → signatures → bind → bounds, each stage reject-or-annotate, never repair. The result is an %Evidence{} — never a decision. See AgentBlueprintProtocol.Reconcile for the stage machinery and the Reconcile.Inputs contract.

verify_compatibility(deployment, observed)

Verify the Deployment's manifest identities against the host's observed build identities: identity-exact or error — ranges deny on both sides, duplicates deny, unmatched manifest entries deny, extra observed identities are evidence-neutral. The result is an %Evidence{} naming the seven host-owned surfaces in not_verified. See AgentBlueprintProtocol.Compatibility.