Agentic.Sandbox.Platform
(agentic v0.2.2)
Copy Markdown
OS-level sandbox capability detection.
Decisions are based on the operating system (:os.type/0), not on the
presence of specific binaries in $PATH. This prevents silent failures
where a sandbox tool is installed but does not provide meaningful
isolation on the host platform (e.g. bwrap on macOS).
Summary
Functions
Returns the effective sandbox backend for the current operating system.
Returns a human-readable description of the current sandbox backend.
Logs the platform backend at application startup.
Returns true if the current platform provides strong filesystem isolation. Windows without WSL2 is considered weak and will return false.
Returns a warning string if the current platform has weak sandboxing.
Returns nil when isolation is strong.
Types
Functions
@spec backend() :: backend()
Returns the effective sandbox backend for the current operating system.
@spec backend_name() :: String.t()
Returns a human-readable description of the current sandbox backend.
@spec log_status() :: :ok
Logs the platform backend at application startup.
@spec strong_isolation?() :: boolean()
Returns true if the current platform provides strong filesystem isolation. Windows without WSL2 is considered weak and will return false.
@spec warning() :: String.t() | nil
Returns a warning string if the current platform has weak sandboxing.
Returns nil when isolation is strong.