class LittleGhost::Sandboxes::Unrestricted

A convenient host-backed sandbox for trusted local work. It offers bounded text-file operations and command execution using only Ruby’s standard library.

workspace = LittleGhost::Workspace.new(root: Dir.pwd)
sandbox = LittleGhost::Sandboxes::Unrestricted.new(workspace:)
sandbox.read("README.md").lines.first # => "# LittleGhost\n"

Reads return valid UTF-8 text. Writes preserve the supplied String bytes. Paths may be relative to the workspace or absolute within a declared virtual mount. Traversal components are rejected, and every path is checked against its configured mount root.

Security and trust

This sandbox is not a security boundary. Commands run directly on the host with the Ruby process’s permissions, and filesystem containment cannot defend against concurrent adversarial mutation. Use an isolated Sandbox implementation for untrusted work.