AS AgentScopeAPI 手册 / API Reference

BindMountEntry

public class BindMountEntry extends WorkspaceEntry
源码Source io/agentscope/harness/agent/sandbox/layout/BindMountEntry.java:35–55

Bind 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.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/harness/agent/sandbox/layout/BindMountEntry.java:40–42

setHostPath

public void setHostPath(String hostPath)

设置 setHostPath。

Sets the host path.

参数Parameters
名称Name类型Type说明Description
hostPathStringhost 路径(类型 `String`)。The host path.
源码Source io/agentscope/harness/agent/sandbox/layout/BindMountEntry.java:44–46

isReadOnly

public boolean isReadOnly()

判断是否 isReadOnly。

Returns whether the read only.

返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/harness/agent/sandbox/layout/BindMountEntry.java:48–50

setReadOnly

public void setReadOnly(boolean readOnly)

设置 setReadOnly。

Sets the read only.

参数Parameters
名称Name类型Type说明Description
readOnlyboolean读取 Only(类型 `boolean`)。The read only.
源码Source io/agentscope/harness/agent/sandbox/layout/BindMountEntry.java:52–54

继承成员Inherited Members

继承自Methods inherited from WorkspaceEntry
基于官方固定版本源码静态生成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.