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.
String返回字符串结果。type string (e.g. "docker")
源码Source
io/agentscope/harness/agent/sandbox/SandboxClientOptions.java:41createClient
public abstract SandboxClient<? extends SandboxClientOptions> createClient()
abstract
创建客户端。
Creates the SandboxClient implementation that corresponds to these options.
SandboxClient<? extends SandboxClientOptions>一种新的客户端实例就绪用于使用。a new client instance ready for use
源码Source
io/agentscope/harness/agent/sandbox/SandboxClientOptions.java:51getWorkspaceRoot
public String getWorkspaceRoot()
获取工作区根。
Returns the absolute workspace root path inside the sandbox container.
String返回字符串结果。workspace root path string
源码Source
io/agentscope/harness/agent/sandbox/SandboxClientOptions.java:61–63