Skip to contents

Core

Primary API for secure code execution

SecureSession
SecureSession
SecureSessionPool
SecureSessionPool
execute_r()
Execute R code securely with tool support
with_secure_session()
Execute code with an auto-managed SecureSession
securer_tool_class() securer_tool()
securer_tool S7 class

Validation & Logging

Code validation and audit logging

validate_code()
Validate R code before execution
format_tool_result()
Format an R value as a tool result string

Integrations

LLM framework adapters

securer_as_ellmer_tool()
Create an ellmer tool for secure R code execution

Sandbox

OS-level sandboxing backends

build_sandbox_config()
Build sandbox configuration for the current platform
build_sandbox_macos()
Build macOS sandbox configuration
build_sandbox_linux()
Build Linux sandbox configuration
build_sandbox_windows()
Build Windows sandbox configuration
build_sandbox_fallback()
Build fallback sandbox configuration (no OS sandbox)
generate_seatbelt_profile()
Generate a macOS Seatbelt profile for the sandboxed R session
generate_bwrap_args()
Generate bubblewrap CLI arguments for the sandboxed R session

Resource Limits

Process resource restrictions

default_limits()
Default resource limits for sandboxed sessions
validate_limits()
Validate a limits list
generate_ulimit_commands()
Generate ulimit shell commands from a limits list
build_limits_only_wrapper()
Build a minimal wrapper script that only applies resource limits

Internals

Low-level IPC and child runtime

child_runtime_code()
Generate the R code to inject into the child process
ipc_create_server()
Create a Unix domain socket server
ipc_accept()
Accept a client connection on a Unix domain socket server
ipc_read_message()
Read a message from an IPC connection
ipc_write_message()
Write a message to an IPC connection
validate_tools()
Validate a list of tools
generate_tool_wrappers()
Generate wrapper code for tools in the child process
generate_type_checks()
Generate type validation code for tool arguments
type_check_map
Map of type annotation strings to R type-checking functions