AS AgentScopeAPI 手册 / API Reference

NoopSandboxSnapshot

@JsonIgnoreProperties(ignoreUnknown = true) public class NoopSandboxSnapshot implements SandboxSnapshot
源码Source io/agentscope/harness/agent/sandbox/snapshot/NoopSandboxSnapshot.java:29–91

Noop 沙箱快照,承载智能体的部署、调度与服务化运行。位于 io.agentscope.harness.agent.sandbox.snapshot 包,实现 SandboxSnapshot。核心成员包括 isPersistenceEnabled、persist、restore、isRestorable、getId、getType。

No-op snapshot that does not persist anything.

When using NoopSandboxSnapshot, workspace state is NOT preserved between session stops. Each time a session is started fresh, the full manifest is applied (Branch D of the start logic). Use this when workspace durability is not required.

构造器摘要Constructor Summary

构造器Constructor说明Description
public NoopSandboxSnapshot()
初始化 `NoopSandboxSnapshot` 实例。
Creates a noop snapshot.

方法摘要Method Summary

方法Method说明Description
public boolean isPersistenceEnabled()
判断是否持久化已启用。
{@inheritDoc}
public void persist(InputStream workspaceArchive) throws Exception
设置该参数。
{@inheritDoc}
public InputStream restore() throws Exception
返回 `restore` 结果。
{@inheritDoc}
public boolean isRestorable()
判断是否 `isRestorable`。
{@inheritDoc}
public String getId()
获取标识。
Returns the id.
public String getType()
获取类型。
Returns the type.

构造器详情Constructor Detail

NoopSandboxSnapshot

public NoopSandboxSnapshot()

初始化 NoopSandboxSnapshot 实例。

Creates a noop snapshot.

源码Source io/agentscope/harness/agent/sandbox/snapshot/NoopSandboxSnapshot.java:35

方法详情Method Detail

isPersistenceEnabled

public boolean isPersistenceEnabled()

判断是否持久化已启用。

{@inheritDoc} Returns false — workspace archiving is skipped entirely when this snapshot is in use, so this method is never called in normal operation.

返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/harness/agent/sandbox/snapshot/NoopSandboxSnapshot.java:43–46

persist

public void persist(InputStream workspaceArchive) throws Exception

设置该参数。

{@inheritDoc} This implementation discards the archive stream entirely.

参数Parameters
名称Name类型Type说明Description
workspaceArchiveInputStream工作区归档(类型 `InputStream`)。The workspace archive.
抛出Throws
  • Exception 可能抛出 `Exception`。Thrown when the operation cannot be completed.
源码Source io/agentscope/harness/agent/sandbox/snapshot/NoopSandboxSnapshot.java:53–59

restore

public InputStream restore() throws Exception

返回 restore 结果。

{@inheritDoc} Always throws io.agentscope.harness.agent.sandbox.SandboxException.SnapshotException since noop snapshots are never restorable.

返回Returns InputStream
返回InputStream。Returns input stream.
抛出Throws
  • Exception 可能抛出 `Exception`。Thrown when the operation cannot be completed.
源码Source io/agentscope/harness/agent/sandbox/snapshot/NoopSandboxSnapshot.java:67–70

isRestorable

public boolean isRestorable()

判断是否 isRestorable。

{@inheritDoc}

返回Returns boolean
返回布尔值,表示判断结果。always `false`
源码Source io/agentscope/harness/agent/sandbox/snapshot/NoopSandboxSnapshot.java:77–80

getId

public String getId()

获取标识。

Returns the id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/harness/agent/sandbox/snapshot/NoopSandboxSnapshot.java:82–85

getType

public String getType()

获取类型。

Returns the type.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/harness/agent/sandbox/snapshot/NoopSandboxSnapshot.java:87–90
基于官方固定版本源码静态生成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.