adk_memory_policy behaviour (erlang_adk v0.10.0)
View SourceFail-closed, bounded policy hook for memory governance.
Summary
Functions
Execute a policy callback outside the caller with a hard deadline. Inputs are redacted and normalized before crossing the hook boundary.
Types
-type action() :: ingest | search | delete | erase | retain | prune.
-type obligations() :: #{expires_at => non_neg_integer(), retain_until => non_neg_integer(), legal_hold => boolean(), consent_id => binary()}.
Callbacks
-callback evaluate(Handle :: term(), Action :: action(), Scope :: adk_memory_service:scope(), Resource :: map(), Context :: map()) -> allow | {allow, obligations()} | {deny, atom() | binary()}.