AS AgentScopeAPI 手册 / API Reference

SandboxFilesystemSpec

public abstract class SandboxFilesystemSpec
源码Source 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说明Description
protected abstract SandboxClient<?> createClient()
abstract
创建客户端。
Creates the client.
protected abstract SandboxClientOptions clientOptions()
abstract
返回客户端选项。
Returns the client options.
protected abstract SandboxSnapshotSpec snapshotSpec()
abstract
返回快照规格。
Returns the snapshot spec.
protected abstract WorkspaceSpec workspaceSpec()
abstract
返回工作区规格。
Returns the workspace spec.
public SandboxFilesystemSpec isolationScope(IsolationScope scope)
执行隔离范围相关操作。
Performs the isolation scope operation.
public IsolationScope getIsolationScope()
获取隔离范围。
Returns the isolation scope.
public SandboxFilesystemSpec snapshotSpec(SandboxSnapshotSpec snapshotSpec)
设置快照规格。
Performs the snapshot spec operation.
public SandboxSnapshotSpec getSnapshotSpecOverride()
获取 `getSnapshotSpecOverride`。
Returns the snapshot spec override.
public SandboxFilesystemSpec executionGuard(SandboxExecutionGuard executionGuard)
设置执行守卫。
Sets a `SandboxExecutionGuard` that serialises concurrent executions on the same isolation slot.
public SandboxExecutionGuard getExecutionGuard()
获取执行守卫。
Returns the execution guard.
public SandboxFilesystemSpec workspaceProjectionEnabled(boolean enabled)
设置该参数。
Performs the workspace projection enabled operation.
public SandboxFilesystemSpec workspaceProjectionRoots(List<String> includeRoots)
设置该参数。
Performs the workspace projection roots operation.
public final SandboxContext toSandboxContext(Path hostWorkspaceRoot)
final
设置到沙箱上下文。
Performs the to sandbox context operation.
public final SandboxContext toSandboxContext()
final
返回到沙箱上下文。
Returns the to sandbox context.

方法详情Method Detail

createClient

protected abstract SandboxClient<?> createClient()
abstract

创建客户端。

Creates the client.

返回Returns SandboxClient<?>
返回SandboxClient。Returns sandbox client.
源码Source io/agentscope/harness/agent/filesystem/spec/SandboxFilesystemSpec.java:50

clientOptions

protected abstract SandboxClientOptions clientOptions()
abstract

返回客户端选项。

Returns the client options.

返回Returns SandboxClientOptions
返回SandboxClientOptions。Returns sandbox client options.
源码Source io/agentscope/harness/agent/filesystem/spec/SandboxFilesystemSpec.java:52

snapshotSpec

protected abstract SandboxSnapshotSpec snapshotSpec()
abstract

返回快照规格。

Returns the snapshot spec.

返回Returns SandboxSnapshotSpec
返回SandboxSnapshotSpec。Returns sandbox snapshot spec.
源码Source io/agentscope/harness/agent/filesystem/spec/SandboxFilesystemSpec.java:54

workspaceSpec

protected abstract WorkspaceSpec workspaceSpec()
abstract

返回工作区规格。

Returns the workspace spec.

返回Returns WorkspaceSpec
返回WorkspaceSpec。Returns workspace spec.
源码Source io/agentscope/harness/agent/filesystem/spec/SandboxFilesystemSpec.java:56

isolationScope

public SandboxFilesystemSpec isolationScope(IsolationScope scope)

执行隔离范围相关操作。

Performs the isolation scope operation.

参数Parameters
名称Name类型Type说明Description
scopeIsolationScope范围(类型 `IsolationScope`)。The scope.
返回Returns SandboxFilesystemSpec
返回SandboxFilesystemSpec。Returns sandbox filesystem spec.
源码Source io/agentscope/harness/agent/filesystem/spec/SandboxFilesystemSpec.java:58–61

getIsolationScope

public IsolationScope getIsolationScope()

获取隔离范围。

Returns the isolation scope.

返回Returns IsolationScope
返回IsolationScope。Returns isolation scope.
源码Source io/agentscope/harness/agent/filesystem/spec/SandboxFilesystemSpec.java:63–65

snapshotSpec

public SandboxFilesystemSpec snapshotSpec(SandboxSnapshotSpec snapshotSpec)

设置快照规格。

Performs the snapshot spec operation.

参数Parameters
名称Name类型Type说明Description
snapshotSpecSandboxSnapshotSpec快照规格(类型 `SandboxSnapshotSpec`)。The snapshot spec.
返回Returns SandboxFilesystemSpec
返回SandboxFilesystemSpec。Returns sandbox filesystem spec.
源码Source io/agentscope/harness/agent/filesystem/spec/SandboxFilesystemSpec.java:67–70

getSnapshotSpecOverride

public SandboxSnapshotSpec getSnapshotSpecOverride()

获取 getSnapshotSpecOverride。

Returns the snapshot spec override.

返回Returns SandboxSnapshotSpec
返回SandboxSnapshotSpec。Returns sandbox snapshot spec.
源码Source io/agentscope/harness/agent/filesystem/spec/SandboxFilesystemSpec.java:72–74

executionGuard

public SandboxFilesystemSpec executionGuard(SandboxExecutionGuard executionGuard)

设置执行守卫。

Sets a SandboxExecutionGuard that serialises concurrent executions on the same isolation slot.

参数Parameters
名称Name类型Type说明Description
executionGuardSandboxExecutionGuard执行守卫(类型 `SandboxExecutionGuard`)。the guard to apply, or `null` for no guard
返回Returns SandboxFilesystemSpec
返回SandboxFilesystemSpec。this spec
源码Source io/agentscope/harness/agent/filesystem/spec/SandboxFilesystemSpec.java:88–91

getExecutionGuard

public SandboxExecutionGuard getExecutionGuard()

获取执行守卫。

Returns the execution guard.

返回Returns SandboxExecutionGuard
返回SandboxExecutionGuard。Returns sandbox execution guard.
源码Source io/agentscope/harness/agent/filesystem/spec/SandboxFilesystemSpec.java:93–95

workspaceProjectionEnabled

public SandboxFilesystemSpec workspaceProjectionEnabled(boolean enabled)

设置该参数。

Performs the workspace projection enabled operation.

参数Parameters
名称Name类型Type说明Description
enabledboolean已启用(类型 `boolean`)。The enabled.
返回Returns SandboxFilesystemSpec
返回SandboxFilesystemSpec。Returns sandbox filesystem spec.
源码Source io/agentscope/harness/agent/filesystem/spec/SandboxFilesystemSpec.java:97–100

workspaceProjectionRoots

public SandboxFilesystemSpec workspaceProjectionRoots(List<String> includeRoots)

设置该参数。

Performs the workspace projection roots operation.

参数Parameters
名称Name类型Type说明Description
includeRootsList<String>include Roots(类型 `List`)。The include roots.
返回Returns SandboxFilesystemSpec
返回SandboxFilesystemSpec。Returns sandbox filesystem spec.
源码Source io/agentscope/harness/agent/filesystem/spec/SandboxFilesystemSpec.java:102–108

toSandboxContext

public final SandboxContext toSandboxContext(Path hostWorkspaceRoot)
final

设置到沙箱上下文。

Performs the to sandbox context operation.

参数Parameters
名称Name类型Type说明Description
hostWorkspaceRootPathhost 工作区根(类型 `Path`)。The host workspace root.
返回Returns SandboxContext
返回SandboxContext。Returns sandbox context.
源码Source io/agentscope/harness/agent/filesystem/spec/SandboxFilesystemSpec.java:110–121

toSandboxContext

public final SandboxContext toSandboxContext()
final

返回到沙箱上下文。

Returns the to sandbox context.

返回Returns SandboxContext
返回SandboxContext。Returns sandbox context.
源码Source io/agentscope/harness/agent/filesystem/spec/SandboxFilesystemSpec.java:123–125
基于官方固定版本源码静态生成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.