AS AgentScopeAPI 手册 / API Reference

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.

返回Returns String
返回字符串结果。id string
源码Source io/agentscope/harness/agent/filesystem/sandbox/AbstractSandboxFilesystem.java:34

execute

public ExecuteResponse execute(RuntimeContext runtimeContext, String command, Integer timeoutSeconds)

执行执行相关操作。

Execute a shell command in the environment backing this filesystem.

参数Parameters
名称Name类型Type说明Description
runtimeContextRuntimeContext运行时上下文(类型 `RuntimeContext`)。per-call agent context; may be `null` when unavailable
commandString命令(类型 `String`)。full shell command string to execute
timeoutSecondsInteger超时秒(类型 `Integer`)。maximum time in seconds to wait for the command to complete; `null` uses the filesystem's default timeout
返回Returns 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

继承成员Inherited Members

基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.