adk_memory_policy behaviour (erlang_adk v0.10.0)

View Source

Fail-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

action/0

-type action() :: ingest | search | delete | erase | retain | prune.

obligations/0

-type obligations() ::
          #{expires_at => non_neg_integer(),
            retain_until => non_neg_integer(),
            legal_hold => boolean(),
            consent_id => binary()}.

Callbacks

evaluate/5

-callback evaluate(Handle :: term(),
                   Action :: action(),
                   Scope :: adk_memory_service:scope(),
                   Resource :: map(),
                   Context :: map()) ->
                      allow | {allow, obligations()} | {deny, atom() | binary()}.

Functions

check(_, Action, Scope0, Resource0, Context0, Timeout)

Execute a policy callback outside the caller with a hard deadline. Inputs are redacted and normalized before crossing the hook boundary.