Skip to content

MafDiagnosticIds

NexusLabs.Needlr.AgentFramework.Analyzers

MafDiagnosticIds Class

Contains diagnostic IDs for all Needlr Agent Framework analyzers.

public static class MafDiagnosticIds

Inheritance System.Object 🡒 MafDiagnosticIds

Remarks

Agent Framework analyzer codes use the NDLRMAF prefix.

Fields

MafDiagnosticIds.AgentFunctionMissingDescription Field

NDLRMAF012: A method decorated with [AgentFunction] has no [System.ComponentModel.Description] attribute.

public const string AgentFunctionMissingDescription = "NDLRMAF012";

Field Value

System.String

MafDiagnosticIds.AgentFunctionParameterMissingDescription Field

NDLRMAF013: A parameter of an [AgentFunction] method (other than CancellationToken) has no [System.ComponentModel.Description] attribute.

public const string AgentFunctionParameterMissingDescription = "NDLRMAF013";

Field Value

System.String

MafDiagnosticIds.AgentFunctionTypesMiswired Field

NDLRMAF014: A type listed in FunctionTypes on a [NeedlrAiAgent] has no methods decorated with [AgentFunction], so the agent silently receives zero tools from that type.

public const string AgentFunctionTypesMiswired = "NDLRMAF014";

Field Value

System.String

MafDiagnosticIds.CyclicHandoffChain Field

NDLRMAF004: A cyclic handoff chain was detected (e.g. A → B → A).

public const string CyclicHandoffChain = "NDLRMAF004";

Field Value

System.String

MafDiagnosticIds.DuplicateSequenceOrder Field

NDLRMAF006: Two or more agents in the same [AgentSequenceMember] pipeline declare the same Order value.

public const string DuplicateSequenceOrder = "NDLRMAF006";

Field Value

System.String

MafDiagnosticIds.GapInSequenceOrder Field

NDLRMAF007: The Order values within a named [AgentSequenceMember] pipeline are not contiguous (a gap exists).

public const string GapInSequenceOrder = "NDLRMAF007";

Field Value

System.String

MafDiagnosticIds.GraphAllEdgesOptional Field

NDLRMAF024: All outgoing edges from a fan-out node have IsRequired = false, meaning the graph could produce empty results if all optional branches fail.

public const string GraphAllEdgesOptional = "NDLRMAF024";

Field Value

System.String

MafDiagnosticIds.GraphConditionMethodInvalid Field

NDLRMAF028: The Condition property on [AgentGraphEdge] references a method that does not exist on the source agent, is not static, or has the wrong signature. The method must be static bool MethodName(object?).

public const string GraphConditionMethodInvalid = "NDLRMAF028";

Field Value

System.String

MafDiagnosticIds.GraphCycleDetected Field

NDLRMAF016: A cycle was detected in a named agent graph declared via [AgentGraphEdge] attributes.

public const string GraphCycleDetected = "NDLRMAF016";

Field Value

System.String

MafDiagnosticIds.GraphEdgeSourceNotAgent Field

NDLRMAF020: A class has [AgentGraphEdge] but is not itself decorated with [NeedlrAiAgent].

public const string GraphEdgeSourceNotAgent = "NDLRMAF020";

Field Value

System.String

MafDiagnosticIds.GraphEdgeTargetNotAgent Field

NDLRMAF019: An [AgentGraphEdge] references a target type that is not decorated with [NeedlrAiAgent].

public const string GraphEdgeTargetNotAgent = "NDLRMAF019";

Field Value

System.String

MafDiagnosticIds.GraphEntryPointNotAgent Field

NDLRMAF021: A class has [AgentGraphEntry] but is not itself decorated with [NeedlrAiAgent].

public const string GraphEntryPointNotAgent = "NDLRMAF021";

Field Value

System.String

MafDiagnosticIds.GraphMultipleEntryPoints Field

NDLRMAF018: A named agent graph has multiple [AgentGraphEntry] declarations.

public const string GraphMultipleEntryPoints = "NDLRMAF018";

Field Value

System.String

MafDiagnosticIds.GraphNoEntryPoint Field

NDLRMAF017: A named agent graph has no [AgentGraphEntry] declaration.

public const string GraphNoEntryPoint = "NDLRMAF017";

Field Value

System.String

MafDiagnosticIds.GraphReducerMethodInvalid Field

NDLRMAF029: The ReducerMethod property on [AgentGraphReducer] references a method that does not exist on the decorated type, is not static, or has the wrong signature. The method must be static string MethodName(IReadOnlyList<string>).

public const string GraphReducerMethodInvalid = "NDLRMAF029";

Field Value

System.String

MafDiagnosticIds.GraphTerminalNodeHasOutgoingEdges Field

NDLRMAF027: A terminal node (a node that should have no outgoing edges) has outgoing [AgentGraphEdge] declarations.

public const string GraphTerminalNodeHasOutgoingEdges = "NDLRMAF027";

Field Value

System.String

MafDiagnosticIds.GraphUnreachableAgent Field

NDLRMAF022: A named agent graph contains agents that are not reachable from the entry point.

public const string GraphUnreachableAgent = "NDLRMAF022";

Field Value

System.String

MafDiagnosticIds.GroupChatTooFewMembers Field

NDLRMAF002: [AgentGroupChatMember("g")] group "g" has fewer than two members in this compilation.

public const string GroupChatTooFewMembers = "NDLRMAF002";

Field Value

System.String

MafDiagnosticIds.HandoffsToSourceNotNeedlrAgent Field

NDLRMAF003: A class has [AgentHandoffsTo] but is not itself decorated with [NeedlrAiAgent].

public const string HandoffsToSourceNotNeedlrAgent = "NDLRMAF003";

Field Value

System.String

MafDiagnosticIds.HandoffsToTargetNotNeedlrAgent Field

NDLRMAF001: [AgentHandoffsTo(typeof(X))] target type X is not decorated with [NeedlrAiAgent].

public const string HandoffsToTargetNotNeedlrAgent = "NDLRMAF001";

Field Value

System.String

MafDiagnosticIds.OrphanAgent Field

NDLRMAF008: A class decorated with [NeedlrAiAgent] participates in no topology declaration ([AgentHandoffsTo], [AgentGroupChatMember], or [AgentSequenceMember]).

public const string OrphanAgent = "NDLRMAF008";

Field Value

System.String

MafDiagnosticIds.PreferAgentTerminationConditionForGroupChat Field

NDLRMAF011: [WorkflowRunTerminationCondition] is declared on a [AgentGroupChatMember] class; prefer [AgentTerminationCondition] for group chat members.

public const string PreferAgentTerminationConditionForGroupChat = "NDLRMAF011";

Field Value

System.String

MafDiagnosticIds.TerminationConditionTypeInvalid Field

NDLRMAF010: The conditionType passed to [WorkflowRunTerminationCondition] or [AgentTerminationCondition] does not implement IWorkflowTerminationCondition.

public const string TerminationConditionTypeInvalid = "NDLRMAF010";

Field Value

System.String

MafDiagnosticIds.ToolResultToStringCall Field

NDLRMAF015: .ToString() is called on ToolCallResult.Result or FunctionResultContent.Result, which are object? and may contain a JsonElement. Use ToolResultSerializer.Serialize() instead.

public const string ToolResultToStringCall = "NDLRMAF015";

Field Value

System.String

MafDiagnosticIds.UnresolvedFunctionGroupReference Field

NDLRMAF005: An agent declares a FunctionGroups entry whose name has no matching [AgentFunctionGroup("name")] class in this compilation.

public const string UnresolvedFunctionGroupReference = "NDLRMAF005";

Field Value

System.String

MafDiagnosticIds.WaitAnyIncompatibleWithCreateGraphWorkflow Field

NDLRMAF025: CreateGraphWorkflow is called on a graph that contains a [AgentGraphNode(JoinMode = GraphJoinMode.WaitAny)] declaration. CreateGraphWorkflow returns a MAF Workflow that uses BSP execution, which does not support WaitAny. Use RunGraphAsync instead.

public const string WaitAnyIncompatibleWithCreateGraphWorkflow = "NDLRMAF025";

Field Value

System.String

MafDiagnosticIds.WorkflowRunTerminationConditionOnNonAgent Field

NDLRMAF009: [WorkflowRunTerminationCondition] is declared on a class that is not decorated with [NeedlrAiAgent].

public const string WorkflowRunTerminationConditionOnNonAgent = "NDLRMAF009";

Field Value

System.String