< Summary

Information
Class: NexusLabs.Needlr.AgentFramework.TerminationContext
Assembly: NexusLabs.Needlr.AgentFramework
File(s): /home/runner/work/needlr/needlr/src/NexusLabs.Needlr.AgentFramework/TerminationContext.cs
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 31
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_AgentId()100%11100%
get_ResponseText()100%11100%
get_TurnCount()100%11100%
get_ConversationHistory()100%11100%
get_Usage()100%11100%

File(s)

/home/runner/work/needlr/needlr/src/NexusLabs.Needlr.AgentFramework/TerminationContext.cs

#LineLine coverage
 1using Microsoft.Extensions.AI;
 2
 3namespace NexusLabs.Needlr.AgentFramework;
 4
 5/// <summary>
 6/// Provides context to an <see cref="IWorkflowTerminationCondition"/> when evaluating whether a
 7/// workflow should stop after an agent's response.
 8/// </summary>
 9public sealed class TerminationContext
 10{
 11    /// <summary>Gets the executor ID of the agent that produced this response.</summary>
 5212    public required string AgentId { get; init; }
 13
 14    /// <summary>Gets the complete response text emitted by the agent for this turn.</summary>
 6315    public required string ResponseText { get; init; }
 16
 17    /// <summary>Gets the number of agent turns completed so far (1-based).</summary>
 3618    public required int TurnCount { get; init; }
 19
 20    /// <summary>
 21    /// Gets the accumulated conversation history up to and including this turn.
 22    /// Each entry corresponds to one completed agent response.
 23    /// </summary>
 3624    public required IReadOnlyList<ChatMessage> ConversationHistory { get; init; }
 25
 26    /// <summary>
 27    /// Gets token usage for this turn, if reported by the model. May be <see langword="null"/>
 28    /// when the model does not return usage metadata.
 29    /// </summary>
 430    public UsageDetails? Usage { get; init; }
 31}