SandboxFilesystemSpec
public abstract class SandboxFilesystemSpec
io/agentscope/harness/agent/filesystem/spec/SandboxFilesystemSpec.java:39–142沙箱文件系统规格,承载智能体的部署、调度与服务化运行。位于 io.agentscope.harness.agent.filesystem.spec 包。核心成员包括 createClient、clientOptions、snapshotSpec、workspaceSpec、isolationScope、getIsolationScope。
Declarative sandbox filesystem configuration.
Unlike AbstractFilesystem, this type is not a runtime filesystem implementation.
It only describes how to create a sandbox-backed filesystem at build time.
方法摘要Method Summary
方法详情Method Detail
createClient
protected abstract SandboxClient<?> createClient()
创建客户端。
Creates the client.
SandboxClient<?>io/agentscope/harness/agent/filesystem/spec/SandboxFilesystemSpec.java:50clientOptions
protected abstract SandboxClientOptions clientOptions()
返回客户端选项。
Returns the client options.
SandboxClientOptionsio/agentscope/harness/agent/filesystem/spec/SandboxFilesystemSpec.java:52snapshotSpec
protected abstract SandboxSnapshotSpec snapshotSpec()
返回快照规格。
Returns the snapshot spec.
SandboxSnapshotSpecio/agentscope/harness/agent/filesystem/spec/SandboxFilesystemSpec.java:54workspaceSpec
protected abstract WorkspaceSpec workspaceSpec()
返回工作区规格。
Returns the workspace spec.
WorkspaceSpecio/agentscope/harness/agent/filesystem/spec/SandboxFilesystemSpec.java:56isolationScope
public SandboxFilesystemSpec isolationScope(IsolationScope scope)
执行隔离范围相关操作。
Performs the isolation scope operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
scope | IsolationScope | 范围(类型 `IsolationScope`)。The scope. |
SandboxFilesystemSpecio/agentscope/harness/agent/filesystem/spec/SandboxFilesystemSpec.java:58–61getIsolationScope
public IsolationScope getIsolationScope()
获取隔离范围。
Returns the isolation scope.
IsolationScopeio/agentscope/harness/agent/filesystem/spec/SandboxFilesystemSpec.java:63–65snapshotSpec
public SandboxFilesystemSpec snapshotSpec(SandboxSnapshotSpec snapshotSpec)
设置快照规格。
Performs the snapshot spec operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
snapshotSpec | SandboxSnapshotSpec | 快照规格(类型 `SandboxSnapshotSpec`)。The snapshot spec. |
SandboxFilesystemSpecio/agentscope/harness/agent/filesystem/spec/SandboxFilesystemSpec.java:67–70getSnapshotSpecOverride
public SandboxSnapshotSpec getSnapshotSpecOverride()
获取 getSnapshotSpecOverride。
Returns the snapshot spec override.
SandboxSnapshotSpecio/agentscope/harness/agent/filesystem/spec/SandboxFilesystemSpec.java:72–74executionGuard
public SandboxFilesystemSpec executionGuard(SandboxExecutionGuard executionGuard)
设置执行守卫。
Sets a SandboxExecutionGuard that serialises concurrent executions on the same isolation slot.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
executionGuard | SandboxExecutionGuard | 执行守卫(类型 `SandboxExecutionGuard`)。the guard to apply, or `null` for no guard |
SandboxFilesystemSpecio/agentscope/harness/agent/filesystem/spec/SandboxFilesystemSpec.java:88–91getExecutionGuard
public SandboxExecutionGuard getExecutionGuard()
获取执行守卫。
Returns the execution guard.
SandboxExecutionGuardio/agentscope/harness/agent/filesystem/spec/SandboxFilesystemSpec.java:93–95workspaceProjectionEnabled
public SandboxFilesystemSpec workspaceProjectionEnabled(boolean enabled)
设置该参数。
Performs the workspace projection enabled operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
enabled | boolean | 已启用(类型 `boolean`)。The enabled. |
SandboxFilesystemSpecio/agentscope/harness/agent/filesystem/spec/SandboxFilesystemSpec.java:97–100workspaceProjectionRoots
public SandboxFilesystemSpec workspaceProjectionRoots(List<String> includeRoots)
设置该参数。
Performs the workspace projection roots operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
includeRoots | List<String> | include Roots(类型 `List`)。The include roots. |
SandboxFilesystemSpecio/agentscope/harness/agent/filesystem/spec/SandboxFilesystemSpec.java:102–108toSandboxContext
public final SandboxContext toSandboxContext(Path hostWorkspaceRoot)
设置到沙箱上下文。
Performs the to sandbox context operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
hostWorkspaceRoot | Path | host 工作区根(类型 `Path`)。The host workspace root. |
SandboxContextio/agentscope/harness/agent/filesystem/spec/SandboxFilesystemSpec.java:110–121toSandboxContext
public final SandboxContext toSandboxContext()
返回到沙箱上下文。
Returns the to sandbox context.
SandboxContextio/agentscope/harness/agent/filesystem/spec/SandboxFilesystemSpec.java:123–125