< Summary

Information
Class: NexusLabs.Needlr.AgentFramework.AgentGraphNodeAttribute
Assembly: NexusLabs.Needlr.AgentFramework
File(s): /home/runner/work/needlr/needlr/src/NexusLabs.Needlr.AgentFramework/AgentGraphNodeAttribute.cs
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 41
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
.ctor(...)100%11100%
get_GraphName()100%11100%
get_JoinMode()100%11100%

File(s)

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

#LineLine coverage
 1namespace NexusLabs.Needlr.AgentFramework;
 2
 3/// <summary>
 4/// Declares per-node configuration for a graph workflow participant. Apply to
 5/// agents that receive multiple incoming edges to control join semantics.
 6/// </summary>
 7/// <remarks>
 8/// <para>
 9/// This attribute is optional. Agents that do not carry it use the default
 10/// <see cref="GraphJoinMode.WaitAll"/> join mode.
 11/// </para>
 12/// </remarks>
 13/// <example>
 14/// <code>
 15/// [NeedlrAiAgent(Instructions = "Synthesize all research findings.")]
 16/// [AgentGraphNode("Research", JoinMode = GraphJoinMode.WaitAll)]
 17/// public class SummarizerAgent { }
 18/// </code>
 19/// </example>
 20[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
 21public sealed class AgentGraphNodeAttribute : Attribute
 22{
 23    /// <summary>
 24    /// Initializes a new <see cref="AgentGraphNodeAttribute"/>.
 25    /// </summary>
 26    /// <param name="graphName">The graph this node configuration applies to.</param>
 1408427    public AgentGraphNodeAttribute(string graphName)
 28    {
 1408429        ArgumentException.ThrowIfNullOrWhiteSpace(graphName);
 1408330        GraphName = graphName;
 1408331    }
 32
 33    /// <summary>Gets the graph name this node belongs to.</summary>
 66334    public string GraphName { get; }
 35
 36    /// <summary>
 37    /// Gets or sets how this node handles multiple incoming edges.
 38    /// Defaults to <see cref="GraphJoinMode.WaitAll"/> (barrier).
 39    /// </summary>
 1412140    public GraphJoinMode JoinMode { get; set; } = GraphJoinMode.WaitAll;
 41}