AS AgentScopeAPI 手册 / API Reference

WorkspaceMountSupport

public final class WorkspaceMountSupport
源码Source io/agentscope/harness/agent/sandbox/WorkspaceMountSupport.java:28–119

工作区 Mount Support,承载智能体的部署、调度与服务化运行。位于 io.agentscope.harness.agent.sandbox 包。核心成员包括 bindMountRelativePaths、hasBindMounts、containerMountPath、tarExcludeArgsForBindMounts、topLevelBindMounts、normalizedHostPath。

Helpers for io.agentscope.harness.agent.sandbox.layout.BindMountEntry handling.

方法摘要Method Summary

方法Method说明Description
public static List<String> bindMountRelativePaths(WorkspaceSpec spec)
static
设置该参数。
Returns relative workspace paths (POSIX-style, no leading slash) for every bind mount in the spec tree, in stable iteration order.
public static boolean hasBindMounts(WorkspaceSpec spec)
static
判断是否具有 `hasBindMounts`。
Returns whether this has the bind mounts.
public static String containerMountPath(String workspaceRoot, String entryKey)
static
执行 `containerMountPath` 方法。
Absolute mount path inside the sandbox for a top-level entry key (slashes normalized).
public static List<String> tarExcludeArgsForBindMounts(WorkspaceSpec spec)
static
设置该参数。
`tar` CLI `--exclude` arguments (`./relative`) for each bind mount path, excluding snapshot tar from traversing mount content.
public static Map<String, BindMountEntry> topLevelBindMounts(WorkspaceSpec spec)
static
设置该参数。
Top-level `BindMountEntry` instances keyed by entry key, for stores that only apply flat manifest entries (Docker `-v`, Kubernetes HostPath).
public static String normalizedHostPath(String hostPath)
static
设置该参数。
Normalized absolute host path for Docker / Kubernetes HostPath.

方法详情Method Detail

bindMountRelativePaths

public static List<String> bindMountRelativePaths(WorkspaceSpec spec)
static

设置该参数。

Returns relative workspace paths (POSIX-style, no leading slash) for every bind mount in the spec tree, in stable iteration order.

参数Parameters
名称Name类型Type说明Description
specWorkspaceSpec规格(类型 `WorkspaceSpec`)。The spec.
返回Returns List<String>
返回列出。Returns list.
源码Source io/agentscope/harness/agent/sandbox/WorkspaceMountSupport.java:36–43

hasBindMounts

public static boolean hasBindMounts(WorkspaceSpec spec)
static

判断是否具有 hasBindMounts。

Returns whether this has the bind mounts.

参数Parameters
名称Name类型Type说明Description
specWorkspaceSpec规格(类型 `WorkspaceSpec`)。The spec.
返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/harness/agent/sandbox/WorkspaceMountSupport.java:45–47

containerMountPath

public static String containerMountPath(String workspaceRoot, String entryKey)
static

执行 containerMountPath 方法。

Absolute mount path inside the sandbox for a top-level entry key (slashes normalized).

参数Parameters
名称Name类型Type说明Description
workspaceRootString工作区根(类型 `String`)。The workspace root.
entryKeyString条目键(类型 `String`)。The entry key.
返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/harness/agent/sandbox/WorkspaceMountSupport.java:52–60

tarExcludeArgsForBindMounts

public static List<String> tarExcludeArgsForBindMounts(WorkspaceSpec spec)
static

设置该参数。

tar CLI --exclude arguments (./relative) for each bind mount path, excluding snapshot tar from traversing mount content.

参数Parameters
名称Name类型Type说明Description
specWorkspaceSpec规格(类型 `WorkspaceSpec`)。The spec.
返回Returns List<String>
返回列出。Returns list.
源码Source io/agentscope/harness/agent/sandbox/WorkspaceMountSupport.java:66–76

topLevelBindMounts

public static Map<String, BindMountEntry> topLevelBindMounts(WorkspaceSpec spec)
static

设置该参数。

Top-level BindMountEntry instances keyed by entry key, for stores that only apply flat manifest entries (Docker -v, Kubernetes HostPath).

参数Parameters
名称Name类型Type说明Description
specWorkspaceSpec规格(类型 `WorkspaceSpec`)。The spec.
返回Returns Map<String, BindMountEntry>
返回映射。Returns map.
源码Source io/agentscope/harness/agent/sandbox/WorkspaceMountSupport.java:99–110

normalizedHostPath

public static String normalizedHostPath(String hostPath)
static

设置该参数。

Normalized absolute host path for Docker / Kubernetes HostPath.

参数Parameters
名称Name类型Type说明Description
hostPathStringhost 路径(类型 `String`)。The host path.
返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/harness/agent/sandbox/WorkspaceMountSupport.java:113–118
基于官方固定版本源码静态生成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.