class RubyLLM::Sandbox::MXC
The built-in sandbox, set with config.sandbox = :mxc. It runs each command with the mxc gem: Bubblewrap on Linux, Seatbelt on macOS, and process containers on Windows.
Public Instance Methods
Source
# File lib/ruby_llm/sandbox/mxc.rb, line 16 def reason availability = ::MXC.availability return if availability.supported? [availability.reason, availability.remediation].compact.join(' ') end
Returns why mxc cannot start a sandbox here and how to fix it, or nil when it can.
# File lib/ruby_llm/sandbox/mxc.rb, line 25 def run(*command, timeout:, readable: [], writable: [], denied: [], network: false, directory: nil, env: {}) ::MXC::Sandbox.new(readable:, writable:, denied:, network:, timeout:, directory:, env:).run(*command) end
Runs command in a new mxc sandbox and returns its MXC::Result. See Sandbox for the arguments.
Source
# File lib/ruby_llm/sandbox/mxc.rb, line 10 def supported? ::MXC.supported? end
Returns whether mxc can start a sandbox on this machine.