EveSession
NexusLabs.Eve¶
EveSession Class¶
Tracks one eve conversation's continuation token, session identifier, and stream cursor.
Inheritance System.Object 🡒 EveSession
Properties¶
EveSession.State Property¶
Gets the current serializable session cursor. Consume a response stream before persisting a fully advanced cursor.
Property Value¶
Methods¶
EveSession.CancelAsync(string, CancellationToken) Method¶
Requests cooperative cancellation of the active turn with an optional turn guard. Continue consuming the turn stream to observe its terminal boundary.
public System.Threading.Tasks.Task<NexusLabs.Eve.EveCancellationOutcome> CancelAsync(string? turnId, System.Threading.CancellationToken cancellationToken);
Parameters¶
turnId System.String
An optional guard that limits cancellation to the observed turn identifier.
cancellationToken System.Threading.CancellationToken
Cancels the cancellation request.
Returns¶
System.Threading.Tasks.Task<EveCancellationOutcome>
The successful cancellation disposition.
EveSession.CancelAsync(CancellationToken) Method¶
Requests cooperative cancellation of the active turn. Continue consuming the turn stream to observe its terminal boundary.
public System.Threading.Tasks.Task<NexusLabs.Eve.EveCancellationOutcome> CancelAsync(System.Threading.CancellationToken cancellationToken);
Parameters¶
cancellationToken System.Threading.CancellationToken
Cancels the cancellation request.
Returns¶
System.Threading.Tasks.Task<EveCancellationOutcome>
The successful cancellation disposition.
EveSession.SendAsync(EveSendTurnRequest, CancellationToken) Method¶
Sends a full user turn, including attachments, input responses, context, or output schema.
public System.Threading.Tasks.Task<NexusLabs.Eve.EveMessageResponse> SendAsync(NexusLabs.Eve.EveSendTurnRequest request, System.Threading.CancellationToken cancellationToken);
Parameters¶
request EveSendTurnRequest
The turn payload.
cancellationToken System.Threading.CancellationToken
Cancels the POST and subsequent response stream.
Returns¶
System.Threading.Tasks.Task<EveMessageResponse>
Accepted turn metadata and its single-use event stream.
EveSession.SendAsync(string, CancellationToken) Method¶
Sends a plain-text user turn.
public System.Threading.Tasks.Task<NexusLabs.Eve.EveMessageResponse> SendAsync(string message, System.Threading.CancellationToken cancellationToken);
Parameters¶
message System.String
The user message.
cancellationToken System.Threading.CancellationToken
Cancels the POST and subsequent response stream.
Returns¶
System.Threading.Tasks.Task<EveMessageResponse>
Accepted turn metadata and its single-use event stream.
EveSession.StreamAsync(EveStreamOptions, CancellationToken) Method¶
Attaches to the existing session stream from the stored or overridden cursor. Unlike a sent-turn response, this stream remains boundary-blind.
public System.Collections.Generic.IAsyncEnumerable<NexusLabs.Eve.EveStreamEvent> StreamAsync(NexusLabs.Eve.EveStreamOptions? options, System.Threading.CancellationToken cancellationToken);
Parameters¶
options EveStreamOptions
Optional cursor and reconnect overrides.
cancellationToken System.Threading.CancellationToken
Stops local stream consumption.
Returns¶
System.Collections.Generic.IAsyncEnumerable<EveStreamEvent>
The durable session event stream.
EveSession.StreamAsync(CancellationToken) Method¶
Attaches to the existing session stream from the stored or overridden cursor. Unlike a sent-turn response, this stream remains boundary-blind.
public System.Collections.Generic.IAsyncEnumerable<NexusLabs.Eve.EveStreamEvent> StreamAsync(System.Threading.CancellationToken cancellationToken);
Parameters¶
cancellationToken System.Threading.CancellationToken
Stops local stream consumption.
Returns¶
System.Collections.Generic.IAsyncEnumerable<EveStreamEvent>
The durable session event stream.