Questa pagina non è ancora tradotta in italiano: qui la trovi in inglese.
MentorActionDecision record
The MentorActionDecision record of Novior.MentorAgent.Abstractions.Models: One decision of MentorAgent's tool gate, as IMentorActionObserver receives it…
On this page
One decision of MentorAgent's tool gate, as IMentorActionObserver receives it. MentorActionDecision.ToolName and MentorActionDecision.DisplayName mean what they mean on MentorActionStarted. The call's arguments are never part of it. More properties may be added.
Definition
Section titled “Definition”Namespace: Novior.MentorAgent.Abstractions.Models. Package: Novior.MentorAgent.Abstractions.
public sealed record MentorActionDecision : IEquatable<MentorActionDecision>
dotnet add package Novior.MentorAgent.AbstractionsConstructors
Section titled “Constructors”public MentorActionDecision()
Properties
Section titled “Properties”AgentKind
Section titled “AgentKind”public MentorAgentKind? AgentKind { get; init; }
Which kind of agent asked for the action, or null on the MCP server, where the caller names the tool itself.
AgentName
Section titled “AgentName”public string? AgentName { get; init; }
The name of the agent that asked for the action, when it has one.
CallId
Section titled “CallId”public string? CallId { get; init; }
The model's id for the call; on the MCP server, the id of the JSON-RPC request.
ConfirmationId
Section titled “ConfirmationId”public Guid? ConfirmationId { get; init; }
The ConfirmationRequest.ActionId of the confirmation, on the decisions that belong to one: it links MentorActionOutcome.ConfirmationRequested to the answer.
ConfirmedBy
Section titled “ConfirmedBy”public ClaimsPrincipal? ConfirmedBy { get; init; }
On MentorActionOutcome.Confirmed, who confirmed: the caller of POST /mentor/approve; in a circuit, in the MAUI app and through the hub's RespondToApproval, the session's signed-in user.
Detail
Section titled “Detail”public string? Detail { get; init; }
The application's own words for the decision: the reason an IMentorActionPolicy gave for stopping the call or asking for a confirmation, on MentorActionOutcome.Blocked, MentorActionOutcome.ConfirmationRequested and MentorActionOutcome.Denied (MentorActionReasons.NobodyToConfirm). null otherwise.
DisplayName
Section titled “DisplayName”public required string DisplayName { get; init; }
The text shown to the user for the tool: the one IMentorStateService.OnActionExecuting carries.
ExceptionType
Section titled “ExceptionType”public string? ExceptionType { get; init; }
On MentorActionOutcome.Failed and MentorActionOutcome.PolicyFailed, the full name of the exception's type. Never its message.
Outcome
Section titled “Outcome”public required MentorActionOutcome Outcome { get; init; }
What the gate decided.
ReasonCode
Section titled “ReasonCode”public required string ReasonCode { get; init; }
Why, as a code that stays the same from one version to the next: one of the constants of MentorActionReasons.
RequiredRoles
Section titled “RequiredRoles”public IReadOnlyList<string> RequiredRoles { get; init; }
The roles the action requires, any one of which is enough; empty when it requires none.
SessionId
Section titled “SessionId”public string? SessionId { get; init; }
An opaque id of the session the turn runs in — the circuit, the MAUI app's scope, the hub connection, the /mentor/chat request, the A2A task — the same for every decision taken in it. On the MCP server, a fingerprint of the MCP session id, never the id itself; null when the call has no session.
Surface
Section titled “Surface”public required MentorActionSurface Surface { get; init; }
Where the call came from.
Timestamp
Section titled “Timestamp”public required DateTimeOffset Timestamp { get; init; }
When the gate decided, in UTC.
ToolName
Section titled “ToolName”public required string ToolName { get; init; }
The tool's technical name, as the model or the MCP client called it (for example cancel_order).
TurnId
Section titled “TurnId”public string? TurnId { get; init; }
An opaque id of the user turn, new for every message: every call the model makes while answering it has the same one. null on the MCP server, where there is no turn.
public ClaimsPrincipal? User { get; init; }
Who asked for the action, or null when nobody is signed in.
