AbstractSandboxFilesystem
public interface AbstractSandboxFilesystem extends AbstractFilesystem
源码Source
io/agentscope/harness/agent/filesystem/sandbox/AbstractSandboxFilesystem.java:27–49定义抽象沙箱文件系统契约的接口。位于 io.agentscope.harness.agent.filesystem.sandbox 包,实现 AbstractFilesystem。核心成员包括 id、execute。
Filesystem abstraction that adds shell command execution (sandbox or remote host).
Extends AbstractFilesystem with #execute and #id().
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String id() | 返回标识。 Unique identifier for this filesystem/sandbox instance. |
public ExecuteResponse execute(RuntimeContext runtimeContext, String command, Integer timeoutSeconds) | 执行执行相关操作。 Execute a shell command in the environment backing this filesystem. |
方法详情Method Detail
id
public String id()
返回标识。
Unique identifier for this filesystem/sandbox instance.
String返回字符串结果。id string
源码Source
io/agentscope/harness/agent/filesystem/sandbox/AbstractSandboxFilesystem.java:34execute
public ExecuteResponse execute(RuntimeContext runtimeContext, String command, Integer timeoutSeconds)
执行执行相关操作。
Execute a shell command in the environment backing this filesystem.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
runtimeContext | RuntimeContext | 运行时上下文(类型 `RuntimeContext`)。per-call agent context; may be `null` when unavailable |
command | String | 命令(类型 `String`)。full shell command string to execute |
timeoutSeconds | Integer | 超时秒(类型 `Integer`)。maximum time in seconds to wait for the command to complete; `null` uses the filesystem's default timeout |
ExecuteResponse返回ExecuteResponse。ExecuteResponse with combined output, exit code, and truncation flag; a non-successful response (see `ExecuteResponse#isSuccess()`) means the command did not complete successfully, so `output` must not be parsed as normal command output
源码Source
io/agentscope/harness/agent/filesystem/sandbox/AbstractSandboxFilesystem.java:48