# `Agentic.Sandbox.Runner`

Cross-platform sandbox wrapper for agent subprocesses.

Provides a single entry point that selects the correct OS-level
isolation mechanism based on `Agentic.Sandbox.Platform.backend/0`.

Supports two invocation styles:
- `wrap_shell/2` — for arbitrary shell commands (e.g. the `bash` tool)
- `wrap_executable/3` — for executable + argument list (e.g. coding agents)

# `wrap_executable`

```elixir
@spec wrap_executable(String.t(), [String.t()], keyword()) ::
  {String.t(), [String.t()], keyword()}
```

Wraps an executable path and argument list in the platform-appropriate sandbox.

Returns `{executable, args, extra_env}` suitable for
`Port.open({:spawn_executable, executable}, [:binary, :exit_status, {:args, args} | extra_env])`.

# `wrap_shell`

```elixir
@spec wrap_shell(
  String.t(),
  keyword()
) :: String.t()
```

Wraps a shell command string in the platform-appropriate sandbox.

Returns a string that can be passed to `Port.open({:spawn, command}, ...)`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
