This module compares manifest build identities with identities observed by a host.
Use it when checking whether a Deployment matches an environment report.
This module does not authorize operations.
Example
{:ok, deployment} =
AgentBlueprintProtocol.Deployment.decode(
File.read!(Application.app_dir(:agent_blueprint_protocol, "priv/examples/echo-deployment.json"))
)
observed = %AgentBlueprintProtocol.Compatibility.Observed{identities: []}
match?({:error, %AgentBlueprintProtocol.Error{}}, AgentBlueprintProtocol.Compatibility.verify(deployment, observed))
Summary
Functions
Reports whether a version spelling identifies one exact version.
Compares a Deployment’s build identities with those reported by a host.
Functions
Reports whether a version spelling identifies one exact version.
Example
AgentBlueprintProtocol.Compatibility.exact?(%{
kind: "package",
name: "example.package",
version: "1.2.3",
digest: "sha-256:example"
})
@spec verify( AgentBlueprintProtocol.Deployment.t(), AgentBlueprintProtocol.Compatibility.Observed.t() ) :: {:ok, AgentBlueprintProtocol.Evidence.t()} | {:error, AgentBlueprintProtocol.Error.t()}
Compares a Deployment’s build identities with those reported by a host.
Example
{:ok, deployment} =
AgentBlueprintProtocol.Deployment.decode(
File.read!(Application.app_dir(:agent_blueprint_protocol, "priv/examples/echo-deployment.json"))
)
observed = %AgentBlueprintProtocol.Compatibility.Observed{identities: []}
match?({:error, %AgentBlueprintProtocol.Error{}}, AgentBlueprintProtocol.Compatibility.verify(deployment, observed))