Backplane.AgentRuntime.Codex.Contract (backplane_agent_runtime v1.10.17)

Copy Markdown

Provider-neutral representation of a Codex callable tool.

A contract is descriptive only. Execution authority remains in the existing registry and Conversation admission path; importing a contract never grants access to its backend.

Summary

Types

input_kind()

@type input_kind() :: :function | :custom

t()

@type t() :: %{
  namespace: String.t() | nil,
  name: String.t(),
  tool_name: String.t(),
  description: String.t(),
  input_kind: input_kind(),
  schema: map() | nil,
  output_schema: map() | nil,
  format: map() | nil,
  tool_revision: pos_integer(),
  exposure: :direct | :code_mode_only | :deferred | :hidden,
  backend: module() | nil,
  backend_context: map(),
  safety: map(),
  source: map(),
  metadata: map()
}

Functions

canonical_name(namespace, name)

@spec canonical_name(String.t() | nil, String.t()) :: String.t()

descriptor(contract)

@spec descriptor(t()) :: map()

new(attrs)

@spec new(map()) :: {:ok, t()} | {:error, Backplane.AgentRuntime.Error.t()}

provider_definition(contract)

@spec provider_definition(t()) :: map()

split_name(name)

@spec split_name(String.t()) ::
  {:ok, {String.t() | nil, String.t()}}
  | {:error, Backplane.AgentRuntime.Error.t()}