Inter-agent messaging isolation dimension for
Raxol.Agent.Sandbox.
Gates Raxol.Agent.Directive.SendAgent directives by matching the
target agent's id.
Constructors
Sandbox.SendAgent.none()
# abstain; any target allowed
Sandbox.SendAgent.deny_all()
# block every inter-agent message
Sandbox.SendAgent.allow_only([:worker_a, :worker_b])
# allow only those target ids
Sandbox.SendAgent.allow_only(fn id -> is_atom(id) end)
# arbitrary predicate
Sandbox.SendAgent.deny([:dangerous_agent])
# block those target ids; allow othersTarget ids are arbitrary terms (atoms in practice, but the
framework does not constrain). List matching uses in/2;
predicate matching uses fun.(id) and coerces with !!.
Summary
Functions
Construct an allow-only sandbox. Accepts a list of target ids or a 1-arity predicate.
Whether the target id is permitted by this sandbox.
Construct a deny sandbox. Accepts a list of target ids or a 1-arity predicate.
Construct a deny-all send-agent sandbox.
Construct a no-op send-agent sandbox (abstain).
Types
Functions
Construct an allow-only sandbox. Accepts a list of target ids or a 1-arity predicate.
Whether the target id is permitted by this sandbox.
Construct a deny sandbox. Accepts a list of target ids or a 1-arity predicate.
@spec deny_all() :: t()
Construct a deny-all send-agent sandbox.
@spec none() :: t()
Construct a no-op send-agent sandbox (abstain).