native
Method
This is a method of the SandboxConfig class in the config module.Create an OS-native sandbox configuration. Uses platform-specific sandboxing:
- macOS: Seatbelt (sandbox-exec)
- Linux: Landlock + bubblewrap
- Fallback: subprocess with restricted security policy
Signature
Parameters
List[str]
Directories the agent may write to. Defaults to current directory only.
bool
default:"False"
Whether to allow network access. Defaults to False.
Returns
'SandboxConfig'
:sandbox = SandboxConfig.native(
writable_paths=[”./src”, ”./tests”],
network=False,
)
Uses
os.getcwdabspathclsSecurityPolicy
Source
View on GitHub
praisonaiagents/sandbox/config.py at line 177
