Option C Tools
Loading...
Searching...
No Matches
oct.mcp.sandbox.BubblewrapBackend Class Reference

Public Member Functions

tuple[int, str, str] run (self, list[str] cmd, dict[str, str] env, Path cwd, int timeout, int|None memory_limit_bytes)

Protected Member Functions

list[str] _bwrap_cmd (self, list[str] cmd, Path cwd)

Detailed Description

Linux bubblewrap backend — network-isolated, die-with-parent.

Wraps every command in ``bwrap --unshare-net --die-with-parent``.
Requires ``bwrap`` to be available in PATH.

Network isolation is provided by ``--unshare-net``.  The project
root is bind-mounted read-write; system paths are read-only.

Definition at line 304 of file sandbox.py.

Member Function Documentation

◆ _bwrap_cmd()

list[str] oct.mcp.sandbox.BubblewrapBackend._bwrap_cmd ( self,
list[str] cmd,
Path cwd )
protected
Build the full ``bwrap ... -- cmd`` invocation.

Definition at line 314 of file sandbox.py.

Here is the caller graph for this function:

◆ run()

tuple[int, str, str] oct.mcp.sandbox.BubblewrapBackend.run ( self,
list[str] cmd,
dict[str, str] env,
Path cwd,
int timeout,
int | None memory_limit_bytes )

Definition at line 339 of file sandbox.py.

Here is the call graph for this function:

The documentation for this class was generated from the following file: