Class DirectoryCheckpointStrategy
- Namespace
- JD.AI.Core.Agents.Checkpointing
- Assembly
- JD.AI.Core.dll
Checkpoint strategy for non-git directories. Copies tracked files to .jdai/checkpoints/{id}/ for snapshotting.
public sealed class DirectoryCheckpointStrategy : ICheckpointStrategy
- Inheritance
-
DirectoryCheckpointStrategy
- Implements
- Inherited Members
Constructors
DirectoryCheckpointStrategy(string?)
public DirectoryCheckpointStrategy(string? workingDir = null)
Parameters
workingDirstring
Methods
ClearAsync(CancellationToken)
Remove all checkpoints.
public Task ClearAsync(CancellationToken ct = default)
Parameters
Returns
CreateAsync(string, CancellationToken)
Create a checkpoint with the given label. Returns the checkpoint ID.
public Task<string?> CreateAsync(string label, CancellationToken ct = default)
Parameters
labelstringctCancellationToken
Returns
ListAsync(CancellationToken)
List all checkpoints for the current project.
public Task<IReadOnlyList<CheckpointInfo>> ListAsync(CancellationToken ct = default)
Parameters
Returns
RestoreAsync(string, CancellationToken)
Restore to a specific checkpoint.
public Task<bool> RestoreAsync(string checkpointId, CancellationToken ct = default)
Parameters
checkpointIdstringctCancellationToken