ExecResult
public record ExecResult(int exitCode, String stdout, String stderr, boolean truncated)
源码Source
io/agentscope/harness/agent/sandbox/ExecResult.java:26–49沙箱命令执行的结果。位于 io.agentscope.harness.agent.sandbox 包。核心成员包括 exitCode、stdout、stderr、truncated、ok、combinedOutput。
Result of a sandbox command execution.
记录组件摘要Record Component Summary
| 组件Component | 类型Type | 说明Description |
|---|---|---|
exitCode | int | 执行 `exitCode` 方法。 process exit code (0 indicates success) |
stdout | String | 执行 `stdout` 方法。 captured standard output |
stderr | String | 执行 `stderr` 方法。 captured standard error |
truncated | boolean | 执行 `truncated` 方法。 whether output was truncated due to exceeding the maximum capture size |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public boolean ok() | 返回ok。 Returns `true` if the command exited with code 0. |
public String combinedOutput() | 返回 `combinedOutput` 结果。 Returns combined stdout and stderr, with stderr prefixed with "[stderr]" if non-empty. |
记录组件详情Record Component Detail
exitCode
int exitCode执行 exitCode 方法。
process exit code (0 indicates success)
源码Source
io/agentscope/harness/agent/sandbox/ExecResult.java:26–49stdout
String stdout执行 stdout 方法。
captured standard output
源码Source
io/agentscope/harness/agent/sandbox/ExecResult.java:26–49stderr
String stderr执行 stderr 方法。
captured standard error
源码Source
io/agentscope/harness/agent/sandbox/ExecResult.java:26–49truncated
boolean truncated执行 truncated 方法。
whether output was truncated due to exceeding the maximum capture size
源码Source
io/agentscope/harness/agent/sandbox/ExecResult.java:26–49方法详情Method Detail
ok
public boolean ok()
返回ok。
Returns true if the command exited with code 0.
boolean返回布尔值,表示判断结果。true if exit code is 0
源码Source
io/agentscope/harness/agent/sandbox/ExecResult.java:33–35combinedOutput
public String combinedOutput()
返回 combinedOutput 结果。
Returns combined stdout and stderr, with stderr prefixed with "[stderr]" if non-empty.
String返回字符串结果。combined output string
源码Source
io/agentscope/harness/agent/sandbox/ExecResult.java:42–48