adk_provider_capabilities (erlang_adk v0.8.0)
View SourceBounded, secret-free capability metadata shared by provider profiles.
Capability names and values remain ordinary Erlang terms because adapters use richer values than booleans (for example synchronous function calls or a list of input modalities). This module never creates atoms from input and rejects executable, opaque, secret-bearing, or excessively large terms.
Summary
Functions
Narrow model/profile metadata to the behavior implemented by an adapter. The first map is an implementation ceiling: an override may turn supported behavior off, select a subset of a list/map, or retain an exact scalar value, but it can never introduce a key or value the adapter did not advertise. Unknown profile keys are deliberately omitted.
Merge a profile-wide capability floor with model-specific metadata. The model map is authoritative for duplicate keys.
A capability is supported when it is present and does not carry an explicit negative/empty marker. This accommodates richer provider values such as synchronous, [audio], or a configuration map.
Types
-type capabilities() :: map().
Functions
-spec constrain(term(), term()) -> {ok, capabilities()} | {error, invalid_provider_capabilities}.
Narrow model/profile metadata to the behavior implemented by an adapter. The first map is an implementation ceiling: an override may turn supported behavior off, select a subset of a list/map, or retain an exact scalar value, but it can never introduce a key or value the adapter did not advertise. Unknown profile keys are deliberately omitted.
-spec merge(term(), term()) -> {ok, capabilities()} | {error, invalid_provider_capabilities}.
Merge a profile-wide capability floor with model-specific metadata. The model map is authoritative for duplicate keys.
-spec normalize(term()) -> {ok, capabilities()} | {error, invalid_provider_capabilities}.
A capability is supported when it is present and does not carry an explicit negative/empty marker. This accommodates richer provider values such as synchronous, [audio], or a configuration map.