This module checks an artifact against a consumer support posture.
Use it when checking revision, required core fields, and registered extensions.
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"))
)
support = %AgentBlueprintProtocol.Negotiation.Support{revisions: MapSet.new([1]), core_fields: MapSet.new([])}
match?(
{:ok, %AgentBlueprintProtocol.Negotiation.Outcome{}},
AgentBlueprintProtocol.Negotiation.negotiate(blueprint, support)
)
Summary
Functions
Checks an artifact against a consumer support posture.
Functions
@spec negotiate( AgentBlueprintProtocol.Blueprint.t() | AgentBlueprintProtocol.Deployment.t() | AgentBlueprintProtocol.Json.value(), AgentBlueprintProtocol.Negotiation.Support.t() ) :: {:ok, AgentBlueprintProtocol.Negotiation.Outcome.t()} | {:error, AgentBlueprintProtocol.Error.t()}
Checks an artifact against a consumer support posture.
Example
iex> with {:ok, blueprint} <- AgentBlueprintProtocol.Blueprint.decode(File.read!(Application.app_dir(:agent_blueprint_protocol, "priv/examples/echo-blueprint.json"))), support = %AgentBlueprintProtocol.Negotiation.Support{revisions: MapSet.new([1]), core_fields: MapSet.new([])}, do: match?({:ok, %AgentBlueprintProtocol.Negotiation.Outcome{}}, AgentBlueprintProtocol.Negotiation.negotiate(blueprint, support))
true