Class LocalSnapshotSpec
java.lang.Object
io.agentscope.harness.agent.sandbox.snapshot.LocalSnapshotSpec
- All Implemented Interfaces:
SandboxSnapshotSpec
Snapshot spec that creates
LocalSandboxSnapshot instances stored in a local directory.
Each session gets its own snapshot file at {basePath}/{sessionId}.tar.
-
Constructor Summary
ConstructorsConstructorDescriptionLocalSnapshotSpec(String basePath) Creates a local snapshot spec.LocalSnapshotSpec(Path basePath) Creates a local snapshot spec. -
Method Summary
Modifier and TypeMethodDescriptionCreates aSandboxSnapshotfor the given session ID.Returns the base directory used for snapshot files.
-
Constructor Details
-
LocalSnapshotSpec
Creates a local snapshot spec.- Parameters:
basePath- directory where snapshot tar files will be stored
-
LocalSnapshotSpec
Creates a local snapshot spec.- Parameters:
basePath- directory path string where snapshot tar files will be stored
-
-
Method Details
-
build
Creates aSandboxSnapshotfor the given session ID.- Specified by:
buildin interfaceSandboxSnapshotSpec- Parameters:
snapshotId- unique identifier for the snapshot (typically the session UUID)- Returns:
- a new
LocalSandboxSnapshotstoring at{basePath}/{snapshotId}.tar
-
getBasePath
Returns the base directory used for snapshot files.- Returns:
- base path string
-