.NET API
IWorkflowCheckpointStore
Tracon.Abstractions.dllThe store for workflow checkpoints.
public interface IWorkflowCheckpointStoreRemarks
Section titled “Remarks”The contract deliberately carries no Microsoft Agent
Framework type: the state is expressed as a JsonElement.
This way, Tracon.PostgreSql stores checkpoints without binding
to the workflow engine’s 130-type API surface. Adapting to MAF’s
ICheckpointStore<JsonElement> interface happens inside
Tracon.Workflows.
Every read is scoped by the tenant filter. A checkpoint carries the entire execution state; another tenant’s checkpoint returns not found — not even “unauthorized” is said, its existence is not leaked.
Delivery guarantee — AT-LEAST-ONCE. IWorkflowCheckpointStore.CreateAsync
can be called more than once for what is logically the SAME super-step: when
IWorkflowRunner.ResumeStreamingAsync resumes from an EARLIER checkpoint
(a real crash-recovery resume, not the “already completed” case), every
super-step from that point forward is replayed and each one writes a new
checkpoint record again. This store does not deduplicate those writes — each
call to IWorkflowCheckpointStore.CreateAsync is a plain append, and a caller reading the
list back via IWorkflowCheckpointStore.ListAsync/IWorkflowCheckpointStore.ListByRunAsync sees every
one of them, including ones written by a step that has now run twice.
Methods
Section titled “Methods”CreateAsync(WorkflowCheckpointRecord, CancellationToken)
Section titled “ CreateAsync(WorkflowCheckpointRecord, CancellationToken)”Writes a new checkpoint.
ValueTask<WorkflowCheckpointRecord> CreateAsync(WorkflowCheckpointRecord record, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”record WorkflowCheckpointRecord
The record to write.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<WorkflowCheckpointRecord>
The written record.
DeleteAsync(string, string, CancellationToken)
Section titled “ DeleteAsync(string, string, CancellationToken)”Deletes all of a session’s checkpoints.
ValueTask<int> DeleteAsync(string tenantId, string sessionId, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant identifier.
sessionId string
The execution session identifier.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”The number of records deleted.
ListAsync(string, string, CancellationToken)
Section titled “ ListAsync(string, string, CancellationToken)”Lists a session’s checkpoints, oldest to newest. The state payload is not read; only metadata is returned.
ValueTask<IReadOnlyList<WorkflowCheckpointRecord>> ListAsync(string tenantId, string sessionId, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant identifier.
sessionId string
The execution session identifier.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<IReadOnlyList<WorkflowCheckpointRecord>>
The records.
ListByRunAsync(string, Guid, CancellationToken)
Section titled “ ListByRunAsync(string, Guid, CancellationToken)”Lists the checkpoints a single run produced, oldest to newest. The state payload is not read.
ValueTask<IReadOnlyList<WorkflowCheckpointRecord>> ListByRunAsync(string tenantId, Guid runId, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant identifier.
runId Guid
The run identifier.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<IReadOnlyList<WorkflowCheckpointRecord>>
The records.
Remarks
Section titled “Remarks”Separate from the session-based list: a session can carry multiple runs (resuming opens a new run each time), and the UI asks “where can this run be resumed from.”
ReadAsync(string, string, string, CancellationToken)
Section titled “ ReadAsync(string, string, string, CancellationToken)”Reads a single checkpoint’s state.
ValueTask<JsonElement?> ReadAsync(string tenantId, string sessionId, string checkpointId, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant identifier.
sessionId string
The execution session identifier.
checkpointId string
The checkpoint identifier.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”The opaque state; null if the record does not exist or belongs to another tenant.