SandboxResult#
Run commands and agent-written programs inside an operating-system boundary. See the guide.
- class zett_agent.sandbox.base.SandboxResult(exit_code, stdout, stderr, timed_out=False, stdout_truncated=False, stderr_truncated=False, duration=0.0, sandbox='', isolated=False, warnings=(), resources=ResourceReport(memory='none', cpu_seconds='none', cpu_percent='none', processes='none', file_size_bytes='none', open_files='none', core_dumps='none', peak_memory_bytes=None, limits_hit=(), warnings=()))[源代码]#
What one sandboxed run produced.
- 参数:
exit_code (int | None)
stdout (str)
stderr (str)
timed_out (bool)
stdout_truncated (bool)
stderr_truncated (bool)
duration (float)
sandbox (str)
isolated (bool)
warnings (tuple[str, ...])
resources (ResourceReport)
- exit_code#
The process's exit status. A negative number is the signal that ended it, which is what a timeout produces. Bubblewrap runs the command under its own init, which reports a signal as
128plus its number (137 forSIGKILL), as a shell does.- Type:
int | None
- stdout#
Standard output, decoded as UTF-8 with undecodable bytes replaced.
- Type:
str
- stderr#
Standard error, decoded the same way.
- Type:
str
- timed_out#
Whether the run exceeded its time limit and was killed.
- Type:
bool
- stdout_truncated#
Whether standard output exceeded the byte limit.
- Type:
bool
- stderr_truncated#
Whether standard error exceeded the byte limit.
- Type:
bool
- duration#
Seconds the run took.
- Type:
float
- sandbox#
Name of the backend that ran it.
- Type:
str
- isolated#
Whether that backend enforces a boundary at all.
- Type:
bool
- warnings#
Parts of the policy the backend could not enforce. Resource warnings are on
resourcesinstead.- Type:
tuple[str, ...]
- resources#
How each limit was enforced, what the run measured, and the limits it could not enforce here.
- property succeeded: bool#
Whether the process exited with status 0 within its time limit.