adk_config_registry (erlang_adk v0.10.0)

View Source

Immutable, operator-owned registry for trusted agent configuration.

Untrusted agent files carry only binary IDs. The corresponding provider, MCP, OpenAPI, tool-pack, credential-profile, runtime-policy, workflow, and agent-template descriptors live in this registry and may therefore contain opaque runtime handles which must never be decoded from model or user input.

replace/2 creates a new generation. A snapshot obtained before the replacement remains immutable and continues resolving the old generation, so one config compilation can never observe a mixed catalog.

Summary

Functions

Return content-free catalog metadata suitable for diagnostics.

Resolve a bounded list of trusted IDs after authenticating the immutable snapshot once. This is the bulk boundary used by declarative configuration so N references never trigger N full registry/HMAC scans.

Types

kind/0

-type kind() ::
          provider | mcp | openapi | tool_pack | credential | runtime_policy | workflow | agent_template.

registry/0

-type registry() :: {adk_config_registry, 1, pos_integer(), binary(), binary(), binary(), snapshot()}.

snapshot/0

-opaque snapshot()

Functions

describe(Registry)

-spec describe(registry() | snapshot()) -> {ok, map()} | {error, term()}.

Return content-free catalog metadata suitable for diagnostics.

generation(Registry)

-spec generation(registry() | snapshot()) -> {ok, pos_integer()} | {error, invalid_config_registry}.

instance_id(Registry)

-spec instance_id(registry() | snapshot()) -> {ok, binary()} | {error, invalid_config_registry}.

kinds()

-spec kinds() -> [kind()].

lookup(Registry, Kind, Id)

-spec lookup(registry() | snapshot(), kind(), binary()) -> {ok, term()} | {error, term()}.

lookup_many(Registry, References)

-spec lookup_many(registry() | snapshot(), [{kind(), binary()}]) -> {ok, [term()]} | {error, term()}.

Resolve a bounded list of trusted IDs after authenticating the immutable snapshot once. This is the bulk boundary used by declarative configuration so N references never trigger N full registry/HMAC scans.

new()

-spec new() -> {ok, registry()}.

new(Definitions)

-spec new(map()) -> {ok, registry()} | {error, term()}.

replace(Registry, Definitions)

-spec replace(registry(), map()) -> {ok, registry()} | {error, term()}.

snapshot(Snapshot)

-spec snapshot(registry() | snapshot()) -> {ok, snapshot()} | {error, invalid_config_registry}.

snapshot_revision_id(Registry)

-spec snapshot_revision_id(registry() | snapshot()) -> {ok, binary()} | {error, invalid_config_registry}.