NoopSandboxSnapshot
@JsonIgnoreProperties(ignoreUnknown = true) public class NoopSandboxSnapshot implements SandboxSnapshot
io/agentscope/harness/agent/sandbox/snapshot/NoopSandboxSnapshot.java:29–91Noop 沙箱快照,承载智能体的部署、调度与服务化运行。位于 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.
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.
booleanio/agentscope/harness/agent/sandbox/snapshot/NoopSandboxSnapshot.java:43–46persist
public void persist(InputStream workspaceArchive) throws Exception
设置该参数。
{@inheritDoc} This implementation discards the archive stream entirely.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
workspaceArchive | InputStream | 工作区归档(类型 `InputStream`)。The workspace archive. |
Exception可能抛出 `Exception`。Thrown when the operation cannot be completed.
io/agentscope/harness/agent/sandbox/snapshot/NoopSandboxSnapshot.java:53–59restore
public InputStream restore() throws Exception
返回 restore 结果。
{@inheritDoc} Always throws io.agentscope.harness.agent.sandbox.SandboxException.SnapshotException since noop snapshots are never restorable.
InputStreamException可能抛出 `Exception`。Thrown when the operation cannot be completed.
io/agentscope/harness/agent/sandbox/snapshot/NoopSandboxSnapshot.java:67–70isRestorable
public boolean isRestorable()
判断是否 isRestorable。
{@inheritDoc}
booleanio/agentscope/harness/agent/sandbox/snapshot/NoopSandboxSnapshot.java:77–80getId
public String getId()
获取标识。
Returns the id.
Stringio/agentscope/harness/agent/sandbox/snapshot/NoopSandboxSnapshot.java:82–85getType
public String getType()
获取类型。
Returns the type.
Stringio/agentscope/harness/agent/sandbox/snapshot/NoopSandboxSnapshot.java:87–90