adk_agent_yaml (erlang_adk v0.10.0)

View Source

Strict, allocation-bounded YAML subset for Agent Config files.

This is intentionally not a general YAML implementation. It accepts the block mappings/sequences and JSON-schema scalars needed by Agent Config, plus empty flow collections. Anchors, aliases, tags, merge keys, directives, multiple documents, non-JSON scalar types, and non-empty flow collections are rejected before an Erlang configuration term is returned. Map keys are always UTF-8 binaries and duplicate keys fail closed.

Summary

Types

yaml_error/0

-type yaml_error() :: {invalid_yaml, atom(), pos_integer()} | {yaml_limit_exceeded, atom()}.

Functions

decode(Binary)

-spec decode(binary()) -> {ok, term()} | {error, yaml_error()}.