BindMountEntry
public class BindMountEntry extends WorkspaceEntry
io/agentscope/harness/agent/sandbox/layout/BindMountEntry.java:35–55Bind Mount 条目,承载智能体的部署、调度与服务化运行。位于 io.agentscope.harness.agent.sandbox.layout 包,继承自 WorkspaceEntry。核心成员包括 getHostPath、setHostPath、isReadOnly、setReadOnly。
Declares a host directory (or file on Kubernetes) bind-mounted into the sandbox workspace at
the map key path under io.agentscope.harness.agent.sandbox.WorkspaceSpec#getRoot().
The io.agentscope.harness.agent.sandbox.WorkspaceSpec entry key is
the relative path inside the workspace (for example key cache →
<workspaceRoot>/cache). The #hostPath is an absolute path on the host (Docker)
or on the Kubernetes node (HostPath volume).
Backends: io.agentscope.harness.agent.sandbox.impl.docker.DockerSandbox
passes -v host:container; kubernetes
uses a HostPath volume + volumeMount. Cloud sandboxes (Daytona, E2B) ignore this entry at
runtime (see logs); use projection or provider-specific mounts there instead.
Security: bind mounts expose host paths to sandbox workloads; only mount paths you trust the model and tools to read or modify.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getHostPath() | 获取 `getHostPath`。 Returns the host path. |
public void setHostPath(String hostPath) | 设置 `setHostPath`。 Sets the host path. |
public boolean isReadOnly() | 判断是否 `isReadOnly`。 Returns whether the read only. |
public void setReadOnly(boolean readOnly) | 设置 `setReadOnly`。 Sets the read only. |
方法详情Method Detail
getHostPath
public String getHostPath()
获取 getHostPath。
Returns the host path.
Stringio/agentscope/harness/agent/sandbox/layout/BindMountEntry.java:40–42setHostPath
public void setHostPath(String hostPath)
设置 setHostPath。
Sets the host path.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
hostPath | String | host 路径(类型 `String`)。The host path. |
io/agentscope/harness/agent/sandbox/layout/BindMountEntry.java:44–46isReadOnly
public boolean isReadOnly()
判断是否 isReadOnly。
Returns whether the read only.
booleanio/agentscope/harness/agent/sandbox/layout/BindMountEntry.java:48–50setReadOnly
public void setReadOnly(boolean readOnly)
设置 setReadOnly。
Sets the read only.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
readOnly | boolean | 读取 Only(类型 `boolean`)。The read only. |
io/agentscope/harness/agent/sandbox/layout/BindMountEntry.java:52–54