WorkspaceMountSupport
public final class WorkspaceMountSupport
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)
设置该参数。
Returns relative workspace paths (POSIX-style, no leading slash) for every bind mount in the spec tree, in stable iteration order.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
spec | WorkspaceSpec | 规格(类型 `WorkspaceSpec`)。The spec. |
List<String>io/agentscope/harness/agent/sandbox/WorkspaceMountSupport.java:36–43hasBindMounts
public static boolean hasBindMounts(WorkspaceSpec spec)
判断是否具有 hasBindMounts。
Returns whether this has the bind mounts.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
spec | WorkspaceSpec | 规格(类型 `WorkspaceSpec`)。The spec. |
booleanio/agentscope/harness/agent/sandbox/WorkspaceMountSupport.java:45–47containerMountPath
public static String containerMountPath(String workspaceRoot, String entryKey)
执行 containerMountPath 方法。
Absolute mount path inside the sandbox for a top-level entry key (slashes normalized).
| 名称Name | 类型Type | 说明Description |
|---|---|---|
workspaceRoot | String | 工作区根(类型 `String`)。The workspace root. |
entryKey | String | 条目键(类型 `String`)。The entry key. |
Stringio/agentscope/harness/agent/sandbox/WorkspaceMountSupport.java:52–60tarExcludeArgsForBindMounts
public static List<String> tarExcludeArgsForBindMounts(WorkspaceSpec spec)
设置该参数。
tar CLI --exclude arguments (./relative) for each bind mount path, excluding snapshot tar from traversing mount content.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
spec | WorkspaceSpec | 规格(类型 `WorkspaceSpec`)。The spec. |
List<String>io/agentscope/harness/agent/sandbox/WorkspaceMountSupport.java:66–76topLevelBindMounts
public static Map<String, BindMountEntry> topLevelBindMounts(WorkspaceSpec spec)
设置该参数。
Top-level BindMountEntry instances keyed by entry key, for stores that only apply flat manifest entries (Docker -v, Kubernetes HostPath).
| 名称Name | 类型Type | 说明Description |
|---|---|---|
spec | WorkspaceSpec | 规格(类型 `WorkspaceSpec`)。The spec. |
Map<String, BindMountEntry>io/agentscope/harness/agent/sandbox/WorkspaceMountSupport.java:99–110normalizedHostPath
public static String normalizedHostPath(String hostPath)
设置该参数。
Normalized absolute host path for Docker / Kubernetes HostPath.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
hostPath | String | host 路径(类型 `String`)。The host path. |
Stringio/agentscope/harness/agent/sandbox/WorkspaceMountSupport.java:113–118