hashbrown

Hashbrown.AspNetCore · C# API reference

Hashbrown.AspNetCore.PostgresInterruptStore

Upcoming 0.1.0-preview.2 · Unreleased

public sealed class PostgresInterruptStore : Hashbrown.AspNetCore.IInterruptStore

PostgreSQL-backed checkpoints with short transactions, fenced leases, and committed dispatch markers.

Members

PostgresInterruptStore

public PostgresInterruptStore(Npgsql.NpgsqlDataSource source, Hashbrown.AspNetCore.WorkflowOperationRegistry registry, string schema = "hashbrown", Hashbrown.AspNetCore.InterruptStoreOptions? options = null);

Uses an application-owned pooled data source. Initialize before accepting requests; use a dedicated schema.

CleanupAsync

public System.Threading.Tasks.ValueTask<Hashbrown.AspNetCore.InterruptCleanupResult> CleanupAsync(System.Threading.CancellationToken cancellationToken = default);

Commits one bounded maintenance pass independently of checkpoint admission, preserving unresolved effects.

CompleteCaptureAsync

public System.Threading.Tasks.ValueTask<bool> CompleteCaptureAsync(Hashbrown.AspNetCore.CheckpointCaptureHandle handle, string outcome, string? snapshot, System.Threading.CancellationToken cancellationToken = default);

Persists terminal metadata under current claim and capture authority. Cleanup only updates Running outcomes.

CreateAsync

public System.Threading.Tasks.ValueTask<Hashbrown.AspNetCore.PendingInterrupt> CreateAsync(string scope, AGUI.Abstractions.RunAgentInput input, Hashbrown.AspNetCore.WorkflowCheckpoint checkpoint, System.Threading.CancellationToken cancellationToken = default);

Persists a descriptor before emitting its complete interrupt batch.

FinishAsync

public System.Threading.Tasks.ValueTask FinishAsync(Hashbrown.AspNetCore.InterruptClaim claim, Hashbrown.AspNetCore.InterruptFinish finish, System.Threading.CancellationToken cancellationToken = default);

Finalizes or releases only the matching token and generation; stale handles are harmless.

InitializeAsync

public System.Threading.Tasks.ValueTask InitializeAsync(System.Threading.CancellationToken cancellationToken = default);

Serializes schema creation across instances and rejects unknown schema versions.

InspectAsync

public System.Threading.Tasks.ValueTask<Hashbrown.AspNetCore.CheckpointInspection?> InspectAsync(System.Collections.Generic.IReadOnlySet<string> scopes, string batchId, int limit = 50, string? cursor = null, System.Threading.CancellationToken cancellationToken = default);

Inspects safe metadata and bounded retained audit solely within permitted scopes.

ListAsync

public System.Threading.Tasks.ValueTask<Hashbrown.AspNetCore.CheckpointPage> ListAsync(System.Collections.Generic.IReadOnlySet<string> scopes, int limit = 50, string? cursor = null, string? state = null, System.Threading.CancellationToken cancellationToken = default);

Lists a bounded page solely within authenticated permitted scopes.

ReconcileAsync

public System.Threading.Tasks.ValueTask<int> ReconcileAsync(System.Collections.Generic.IReadOnlySet<string> scopes, string batchId, string actor, Hashbrown.AspNetCore.CheckpointReconciliation request, System.Threading.CancellationToken cancellationToken = default);

Atomically records authenticated evidence and retires claim/capture authority; never dispatches.

RecoverAsync

public System.Threading.Tasks.ValueTask<Hashbrown.AspNetCore.CheckpointRecoveryResult> RecoverAsync(string scope, string threadId, Hashbrown.AspNetCore.ConversationRecoveryConfiguration configuration, System.Threading.CancellationToken cancellationToken = default);

Reads the latest retained scoped checkpoint without claiming or executing it.

StartCaptureAsync

public System.Threading.Tasks.ValueTask<Hashbrown.AspNetCore.CheckpointCaptureHandle?> StartCaptureAsync(Hashbrown.AspNetCore.InterruptClaim claim, System.Threading.CancellationToken cancellationToken = default);

Starts response observation only for the current accepted claim.

TryClaimAsync

public System.Threading.Tasks.ValueTask<Hashbrown.AspNetCore.InterruptClaimResult> TryClaimAsync(string scope, AGUI.Abstractions.RunAgentInput input, System.Threading.CancellationToken cancellationToken = default);

Validates the complete batch and atomically creates a fresh server token and generation.

TryStartEffectAsync

public System.Threading.Tasks.ValueTask<bool> TryStartEffectAsync(Hashbrown.AspNetCore.InterruptClaim claim, System.Threading.CancellationToken cancellationToken = default);

Commits the irreversible dispatch marker only for the current, unexpired preparation claim.