AS AgentScopeAPI 手册 / API Reference

SandboxClientOptions

@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonSubTypes({ @JsonSubTypes.Type(value = DockerSandboxClientOptions.class, name = "docker"), }) public abstract class SandboxClientOptions
源码Source io/agentscope/harness/agent/sandbox/SandboxClientOptions.java:30–64

沙箱客户端配置选项的基类。位于 io.agentscope.harness.agent.sandbox 包。核心成员包括 getType、createClient、getWorkspaceRoot。

Base class for sandbox client configuration options.

Each concrete subclass describes a specific sandbox backend (e.g. Docker) and can self-instantiate the corresponding SandboxClient via #createClient(). This allows callers to configure only the options object and rely on io.agentscope.harness.agent.HarnessAgent.Builder to derive the client automatically.

方法摘要Method Summary

方法Method说明Description
public abstract String getType()
abstract
获取类型。
Returns the type discriminator used in JSON serialization.
public abstract SandboxClient<? extends SandboxClientOptions> createClient()
abstract
创建客户端。
Creates the `SandboxClient` implementation that corresponds to these options.
public String getWorkspaceRoot()
获取工作区根。
Returns the absolute workspace root path inside the sandbox container.

方法详情Method Detail

getType

public abstract String getType()
abstract

获取类型。

Returns the type discriminator used in JSON serialization.

返回Returns String
返回字符串结果。type string (e.g. "docker")
源码Source io/agentscope/harness/agent/sandbox/SandboxClientOptions.java:41

createClient

public abstract SandboxClient<? extends SandboxClientOptions> createClient()
abstract

创建客户端。

Creates the SandboxClient implementation that corresponds to these options.

返回Returns SandboxClient<? extends SandboxClientOptions>
一种新的客户端实例就绪用于使用。a new client instance ready for use
源码Source io/agentscope/harness/agent/sandbox/SandboxClientOptions.java:51

getWorkspaceRoot

public String getWorkspaceRoot()

获取工作区根。

Returns the absolute workspace root path inside the sandbox container.

返回Returns String
返回字符串结果。workspace root path string
源码Source io/agentscope/harness/agent/sandbox/SandboxClientOptions.java:61–63
基于官方固定版本源码静态生成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.