Skip to content

MafDiagnosticIds

NexusLabs.Foundry.MicrosoftAgentFramework.Analyzers

MafDiagnosticIds Class

Contains diagnostic IDs for all Foundry Agent Framework analyzers.

public static class MafDiagnosticIds

Inheritance System.Object 🡒 MafDiagnosticIds

Remarks

Agent Framework analyzer codes use the FDRYMAF prefix.

Fields

MafDiagnosticIds.AgentFunctionJsonStringParameter Field

FDRYMAF030: An [AgentFunction] parameter typed as string whose name ends with Json/_json or whose [Description] mentions "JSON array" or "JSON object" could be typed as System.Text.Json.JsonElement for direct, typed access. Informational only — the kind-tolerant generator coercion makes the string-typed shape work via JsonElement.GetRawText().

public const string AgentFunctionJsonStringParameter = "FDRYMAF030";

Field Value

System.String

MafDiagnosticIds.AgentFunctionMissingDescription Field

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

public const string AgentFunctionMissingDescription = "FDRYMAF012";

Field Value

System.String

MafDiagnosticIds.AgentFunctionParameterMissingDescription Field

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

public const string AgentFunctionParameterMissingDescription = "FDRYMAF013";

Field Value

System.String

MafDiagnosticIds.AgentFunctionTypesMiswired Field

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

public const string AgentFunctionTypesMiswired = "FDRYMAF014";

Field Value

System.String

MafDiagnosticIds.CyclicHandoffChain Field

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

public const string CyclicHandoffChain = "FDRYMAF004";

Field Value

System.String

MafDiagnosticIds.DuplicateSequenceOrder Field

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

public const string DuplicateSequenceOrder = "FDRYMAF006";

Field Value

System.String

MafDiagnosticIds.GapInSequenceOrder Field

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

public const string GapInSequenceOrder = "FDRYMAF007";

Field Value

System.String

MafDiagnosticIds.GraphAllEdgesOptional Field

FDRYMAF024: 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 = "FDRYMAF024";

Field Value

System.String

MafDiagnosticIds.GraphConditionMethodInvalid Field

FDRYMAF028: 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 = "FDRYMAF028";

Field Value

System.String

MafDiagnosticIds.GraphCycleDetected Field

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

public const string GraphCycleDetected = "FDRYMAF016";

Field Value

System.String

MafDiagnosticIds.GraphEdgeSourceNotAgent Field

FDRYMAF020: A class has [AgentGraphEdge] but is not itself decorated with [FoundryAgent].

public const string GraphEdgeSourceNotAgent = "FDRYMAF020";

Field Value

System.String

MafDiagnosticIds.GraphEdgeTargetNotAgent Field

FDRYMAF019: An [AgentGraphEdge] references a target type that is not decorated with [FoundryAgent].

public const string GraphEdgeTargetNotAgent = "FDRYMAF019";

Field Value

System.String

MafDiagnosticIds.GraphEntryPointNotAgent Field

FDRYMAF021: A class has [AgentGraphEntry] but is not itself decorated with [FoundryAgent].

public const string GraphEntryPointNotAgent = "FDRYMAF021";

Field Value

System.String

MafDiagnosticIds.GraphMultipleEntryPoints Field

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

public const string GraphMultipleEntryPoints = "FDRYMAF018";

Field Value

System.String

MafDiagnosticIds.GraphNoEntryPoint Field

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

public const string GraphNoEntryPoint = "FDRYMAF017";

Field Value

System.String

MafDiagnosticIds.GraphReducerMethodInvalid Field

FDRYMAF029: 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 = "FDRYMAF029";

Field Value

System.String

MafDiagnosticIds.GraphTerminalNodeHasOutgoingEdges Field

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

public const string GraphTerminalNodeHasOutgoingEdges = "FDRYMAF027";

Field Value

System.String

MafDiagnosticIds.GraphUnreachableAgent Field

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

public const string GraphUnreachableAgent = "FDRYMAF022";

Field Value

System.String

MafDiagnosticIds.GroupChatTooFewMembers Field

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

public const string GroupChatTooFewMembers = "FDRYMAF002";

Field Value

System.String

MafDiagnosticIds.HandoffsToSourceNotFoundryAgent Field

FDRYMAF003: A class has [AgentHandoffsTo] but is not itself decorated with [FoundryAgent].

public const string HandoffsToSourceNotFoundryAgent = "FDRYMAF003";

Field Value

System.String

MafDiagnosticIds.HandoffsToTargetNotFoundryAgent Field

FDRYMAF001: [AgentHandoffsTo(typeof(X))] target type X is not decorated with [FoundryAgent].

public const string HandoffsToTargetNotFoundryAgent = "FDRYMAF001";

Field Value

System.String

MafDiagnosticIds.OrphanAgent Field

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

public const string OrphanAgent = "FDRYMAF008";

Field Value

System.String

MafDiagnosticIds.PreferAgentTerminationConditionForGroupChat Field

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

public const string PreferAgentTerminationConditionForGroupChat = "FDRYMAF011";

Field Value

System.String

MafDiagnosticIds.TerminationConditionTypeInvalid Field

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

public const string TerminationConditionTypeInvalid = "FDRYMAF010";

Field Value

System.String

MafDiagnosticIds.ToolResultToStringCall Field

FDRYMAF015: .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 = "FDRYMAF015";

Field Value

System.String

MafDiagnosticIds.UnresolvedFunctionGroupReference Field

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

public const string UnresolvedFunctionGroupReference = "FDRYMAF005";

Field Value

System.String

MafDiagnosticIds.WaitAnyIncompatibleWithCreateGraphWorkflow Field

FDRYMAF025: 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 = "FDRYMAF025";

Field Value

System.String

MafDiagnosticIds.WorkflowRunTerminationConditionOnNonAgent Field

FDRYMAF009: [WorkflowRunTerminationCondition] is declared on a class that is not decorated with [FoundryAgent].

public const string WorkflowRunTerminationConditionOnNonAgent = "FDRYMAF009";

Field Value

System.String