ShellAdapter
autogen.beta.tools.sandbox.adapter.shell.ShellAdapter #
ShellAdapter(sandbox, *, allowed=None, blocked=None, ignore=None, readonly=False, env=None, timeout=None)
Shell surface (run) over any :class:Sandbox.
Implements the command policy once and works on every backend — local subprocess, Docker container, Daytona sandbox, or any custom one.
Filtering (allowed / blocked / ignore / readonly) lives here once. Execution delegates to the wrapped :class:Sandbox or :class:SandboxFactory; the adapter never duplicates backend logic.
| PARAMETER | DESCRIPTION |
|---|---|
sandbox | Either a long-lived :class: TYPE: |
allowed / blocked / ignore / readonly | command filter set.
|
env | Extra environment variables passed into each command. |
timeout | Per-command timeout in seconds. TYPE: |
Source code in autogen/beta/tools/sandbox/adapter/shell.py
workdir property #
Working directory exposed to callers.
For a host-backed sandbox (local subprocess, incl. a :class:~autogen.beta.tools.sandbox.LocalEnvironment / :class:SingletonFactory wrapping one) this is the real host :class:~pathlib.Path (so .exists() etc. work); for a remote / container backend it is the sandbox-side :class:PurePosixPath. A not-yet-opened remote :class:SandboxFactory reports the conventional /workspace since no sandbox is bound yet.