This module runs the composed verification pass for a Blueprint and Deployment pair.
Use it when an application needs one Evidence result for a pair and host inputs.
Signature creation time, lifecycle state, and signing-key and signature time
validity remain host-owned and appear in Evidence.not_verified.
This module does not authorize operations.
Example
{:ok, blueprint} =
AgentBlueprintProtocol.Blueprint.decode(
File.read!(Application.app_dir(:agent_blueprint_protocol, "priv/examples/echo-blueprint.json"))
)
{:ok, deployment} =
AgentBlueprintProtocol.Deployment.decode(
File.read!(Application.app_dir(:agent_blueprint_protocol, "priv/examples/echo-deployment.json"))
)
{:ok, host_bounds} = AgentBlueprintProtocol.BoundsAlgebra.from_deployment(deployment)
support = %AgentBlueprintProtocol.Negotiation.Support{revisions: MapSet.new([1]), core_fields: MapSet.new([])}
inputs = %AgentBlueprintProtocol.Reconcile.Inputs{
host_bounds: host_bounds,
support: support,
keys: [],
protected_clamp: :acknowledge,
observations: %AgentBlueprintProtocol.Deployment.Observations{}
}
match?(
{:ok, %AgentBlueprintProtocol.Evidence{}},
AgentBlueprintProtocol.reconcile(blueprint, deployment, inputs)
)
Summary
Functions
Runs the composed verification pass for a Blueprint and Deployment pair.
Functions
@spec reconcile( AgentBlueprintProtocol.Blueprint.t(), AgentBlueprintProtocol.Deployment.t(), AgentBlueprintProtocol.Reconcile.Inputs.t() ) :: {:ok, AgentBlueprintProtocol.Evidence.t()} | {:error, AgentBlueprintProtocol.Error.t()}
Runs the composed verification pass for a Blueprint and Deployment pair.
Example
match?(
{:error, %AgentBlueprintProtocol.Error{}},
AgentBlueprintProtocol.Reconcile.reconcile(nil, nil, nil)
)