AS AgentScopeAPI 手册 / API Reference

PinnedSandboxFilesystem

public final class PinnedSandboxFilesystem extends SandboxBackedFilesystem
源码Source io/agentscope/harness/agent/filesystem/sandbox/PinnedSandboxFilesystem.java:34–45

Pinned 沙箱文件系统,承载智能体的部署、调度与服务化运行。位于 io.agentscope.harness.agent.filesystem.sandbox 包,继承自 SandboxBackedFilesystem。核心成员包括 clearSandboxIfCurrent、PinnedSandboxFilesystem。

SandboxBackedFilesystem that holds a fixed Sandbox reference for the lifetime of the instance.

Used by asynchronous session mirrors so uploads can complete after the agent call releases its per-call binding on the shared agent proxy. Unlike the agent-level SandboxBackedFilesystem, #clearSandboxIfCurrent is a no-op — clearing the call proxy must not unpin this mirror filesystem.

Safe for DataAgent-style user-managed sandboxes that stay alive across acquire/release. Self-managed sandboxes that stop on release may still fail if the async upload races past shutdown.

构造器摘要Constructor Summary

构造器Constructor说明Description
public PinnedSandboxFilesystem(Sandbox sandbox)
初始化 `PinnedSandboxFilesystem` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public synchronized void clearSandboxIfCurrent(Sandbox expected)
synchronized
清空沙箱 If 当前。
Clears the sandbox if current.

构造器详情Constructor Detail

PinnedSandboxFilesystem

public PinnedSandboxFilesystem(Sandbox sandbox)

初始化 PinnedSandboxFilesystem 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
sandboxSandbox沙箱(类型 `Sandbox`)。The sandbox.
源码Source io/agentscope/harness/agent/filesystem/sandbox/PinnedSandboxFilesystem.java:36–39

方法详情Method Detail

clearSandboxIfCurrent

public synchronized void clearSandboxIfCurrent(Sandbox expected)
synchronized

清空沙箱 If 当前。

Clears the sandbox if current.

参数Parameters
名称Name类型Type说明Description
expectedSandboxexpected(类型 `Sandbox`)。The expected.
源码Source io/agentscope/harness/agent/filesystem/sandbox/PinnedSandboxFilesystem.java:41–44

继承成员Inherited Members

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