Skip to content

IArchiveSink

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

The cold-storage extension point rows are written to before deletion.

public interface IArchiveSink

There is no default implementation (no cloud SDK dependency is taken). The consumer writes their own sink, based on the file-system example under samples/, and registers it as IArchiveSink.

If none is registered, a policy with archive = true deletes no row — data that cannot be archived is never dropped. This prevents silent data loss.

WriteAsync(string, DateTimeOffset, IReadOnlyList<ArchiveRow>, CancellationToken)

Section titled “ WriteAsync(string, DateTimeOffset, IReadOnlyList<ArchiveRow>, CancellationToken)”

Writes a batch of rows to the archive.

ValueTask WriteAsync(string target, DateTimeOffset partitionDate, IReadOnlyList<ArchiveRow> rows, CancellationToken cancellationToken = default)

target string

The target name.

partitionDate DateTimeOffset

The date the batch belongs to (UTC, day precision). The sink may use this to partition the file/object path (for example, run_events/2026-08-05.jsonl.gz).

rows IReadOnlyList<ArchiveRow>

The rows to write.

cancellationToken CancellationToken

The cancellation token.

ValueTask

The completion task.