Raxol.Agent.Sandbox.Async (Raxol Agent v2.6.0)

Copy Markdown View Source

Async-task isolation dimension for Raxol.Agent.Sandbox.

Gates Raxol.Agent.Directive.Async directives wholesale: the async function's body is opaque (a closure) so there's no payload-based matching. The sandbox is either allow (abstain) or deny.

Constructors

Sandbox.Async.allow()
  # abstain; any async task allowed

Sandbox.Async.deny()
  # block every async task

When an agent wants finer-grained async controls (rate limiting, per-task timeout, cancellation), it should use the Raxol.Agent.Policy structs around the operation that creates the async task, not the Sandbox dimension. The Sandbox is the binary "are async tasks permitted at all" check.

Summary

Functions

Construct an allow-all async sandbox (abstain).

Whether async tasks are permitted by this sandbox.

Construct a deny-all async sandbox.

Types

mode()

@type mode() :: :allow | :deny

t()

@type t() :: %Raxol.Agent.Sandbox.Async{mode: mode()}

Functions

allow()

@spec allow() :: t()

Construct an allow-all async sandbox (abstain).

allowed?(async)

@spec allowed?(t()) :: boolean()

Whether async tasks are permitted by this sandbox.

deny()

@spec deny() :: t()

Construct a deny-all async sandbox.