Sandbox¶
The single public entrypoint and the outcome it returns.
resoluto.sandbox.Sandbox
¶
Run a program in a sandbox. Holds a Backend (selected by name or injected).
Source code in src/resoluto/sandbox/client.py
run
¶
run(
argv,
*,
workspace=None,
stdin=None,
env=None,
env_file=None,
secrets=None,
output_paths=None,
stream=None,
egress=None,
)
Run argv in the sandbox with workspace cwd, env overlay, output_paths globs
collected into RunResult.artifacts, and live output to stream; returns a RunResult.
env_file parses a dotenv-format file host-side and merges it under env (env wins
on conflict) — a convenience for literal config, NOT a security mechanism: values still land
as literal env entries, same as env.
secrets maps an env var name to either a SecretKeyRef (k8s-native — references an
existing Kubernetes Secret's key via valueFrom.secretKeyRef, zero guest-side code; ignored
on the local backend) or a plain str (a provider-specific ref resolved GUEST-SIDE by
the configured SecretProvider — see secrets.py — so the plaintext value never touches
the host, the pod spec, or any log).
egress is THIS run's allowed-domain list (e.g. ["api.anthropic.com"]) — per-step
networking set up on the fly and torn down after, with no re-provisioning. None/[] =
deny all outbound (secure default). Currently applied by the local backend's SNI proxy.
Source code in src/resoluto/sandbox/client.py
resoluto.sandbox.RunResult
¶
Bases: BaseModel
Outcome of one run(): exit code, output/errors, collected artifacts paths, parsed result, and a substrate reason.