TestimoX

API Reference

Class

AgentJsonlBuffer

Namespace ComputerX.Agent
Assembly ComputerX
Modifiers sealed

Simple JSONL-based buffer for agent payloads.

Inheritance

  • Object
  • AgentJsonlBuffer

Constructors

public AgentJsonlBuffer(String directory, AgentBufferConfig config, JsonSerializerOptions jsonOptions) #

Creates a new JSONL buffer in the provided directory.

Parameters

directory System.String requiredposition: 0
config ComputerX.Agent.AgentBufferConfig requiredposition: 1
jsonOptions System.Text.Json.JsonSerializerOptions requiredposition: 2

Methods

public Void DeleteBatchFile(String filePath) #
Returns: Void

Removes a buffer file after successful send.

Parameters

filePath System.String requiredposition: 0
public async Task<ValueTuple<String, List<AgentMetricsEnvelope>, Boolean>> DequeueBatchAsync(Int32 maxItems, Int32 maxBytes, CancellationToken cancellationToken) #
Returns: Task<ValueTuple<String, List<AgentMetricsEnvelope>, Boolean>>

Returns the next buffered batch, or an empty list if none are pending.

Parameters

maxItems System.Int32 requiredposition: 0
maxBytes System.Int32 requiredposition: 1
cancellationToken System.Threading.CancellationToken requiredposition: 2
public async Task EnqueueAsync(AgentMetricsEnvelope payload, CancellationToken cancellationToken) #
Returns: Task

Appends a payload to the buffer.

Parameters

payload ComputerX.Agent.AgentMetricsEnvelope requiredposition: 0
cancellationToken System.Threading.CancellationToken requiredposition: 1
public async Task<AgentBufferStats> GetStatsAsync(CancellationToken cancellationToken) #
Returns: Task<AgentBufferStats>

Returns a snapshot of buffer size and pending file counts.

Parameters

cancellationToken System.Threading.CancellationToken requiredposition: 0
public List<String> ListPendingFiles() #
Returns: List<String>

Lists pending buffer files in chronological order.