adk_context_policy (erlang_adk v0.7.0)

View Source

Versioned model-context selection, budgeting, and compression policy.

Inputs are converted to canonical ADK event maps and stripped of credential-bearing keys before filtering, measuring, compression, or cache hashing. Compression is opt-in and runs in a monitored process with timeout, heap, event-count, and serialized-output bounds.

Summary

Functions

Build a secret-free context from a session map or event list.

Functions

build(Input, Opts)

-spec build(map() | [adk_event:event() | map()], map()) -> {ok, map()} | {error, term()}.

Build a secret-free context from a session map or event list.

Important options: * max_bytes / max_tokens - positive integers or infinity * overflow - error (default), truncate, or compress * compressor - Module or {Module, CompressorOptions} * include/exclude options accepted by adk_event_filter

capabilities()

-spec capabilities() -> map().

version()

-spec version() -> pos_integer().