adk_context_envelope (erlang_adk v0.7.0)

View Source

Canonical safety and complete provider-envelope accounting.

This module does not call a provider. It measures the complete sanitized request inputs visible at the provider boundary: effective instructions and generation options, chronological model messages, tool declarations, and a conservative framing allowance. Provider credentials and runtime handles are deliberately excluded.

Summary

Functions

check(Config, History, Tools, Policy)

-spec check(map(), [map()], [map()], disabled | map()) -> {ok, map()} | {error, term()}.

measure(Config, History, Tools)

-spec measure(map(), [map()], [map()]) -> {ok, map()} | {error, term()}.

sanitize_history(History)

-spec sanitize_history([map()]) -> {ok, [map()]} | {error, term()}.