.NET API
ToolApprovalPresenterRunner
Tracon.Core.dllCalls the registered IToolApprovalPresenter for every pending approval request and turns its fail-open contract into an actual guarantee.
public sealed class ToolApprovalPresenterRunnerInheritance
Section titled “Inheritance”object ← ToolApprovalPresenterRunner
Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”This is decoration, not a gate. Unlike
IToolAuthorizationHandler and IToolArgumentsValidator, a
presenter never blocks a call: a thrown exception, a call that overruns
TraconToolOptions.ApprovalPresentationTimeout, or no presenter
registered at all all resolve to null — the approval request is
published either way, with its raw arguments intact.
Called once per request from both the queue path (AgentRunJobHandler, to
populate PendingApproval.Presentation) and the recording path
(RunRecordingAgent, to build the closing run event’s payload) —
through the SAME resolution, not two separate calls: RunRecordingAgent
resolves once and hands the result to
TraconRunOptions.BeforePendingApprovalIsPublished.
Constructors
Section titled “Constructors”ToolApprovalPresenterRunner(IToolApprovalPresenter, IOptionsMonitor<TraconOptions>, ILogger<ToolApprovalPresenterRunner>)
Section titled “ ToolApprovalPresenterRunner(IToolApprovalPresenter, IOptionsMonitor<TraconOptions>, ILogger<ToolApprovalPresenterRunner>)”Calls the registered IToolApprovalPresenter for every pending approval request and turns its fail-open contract into an actual guarantee.
public ToolApprovalPresenterRunner(IToolApprovalPresenter presenter, IOptionsMonitor<TraconOptions> options, ILogger<ToolApprovalPresenterRunner> logger)Parameters
Section titled “Parameters”presenter IToolApprovalPresenter
options IOptionsMonitor<TraconOptions>
logger ILogger<ToolApprovalPresenterRunner>
Remarks
Section titled “Remarks”This is decoration, not a gate. Unlike
IToolAuthorizationHandler and IToolArgumentsValidator, a
presenter never blocks a call: a thrown exception, a call that overruns
TraconToolOptions.ApprovalPresentationTimeout, or no presenter
registered at all all resolve to null — the approval request is
published either way, with its raw arguments intact.
Called once per request from both the queue path (AgentRunJobHandler, to
populate PendingApproval.Presentation) and the recording path
(RunRecordingAgent, to build the closing run event’s payload) —
through the SAME resolution, not two separate calls: RunRecordingAgent
resolves once and hands the result to
TraconRunOptions.BeforePendingApprovalIsPublished.
Methods
Section titled “Methods”ResolveAllAsync(IReadOnlyList<ToolApprovalRequestContent>, string, string?, CancellationToken)
Section titled “ ResolveAllAsync(IReadOnlyList<ToolApprovalRequestContent>, string, string?, CancellationToken)”Resolves a presentation for every request, keyed by RequestId.
public ValueTask<IReadOnlyDictionary<string, ToolApprovalPresentation?>> ResolveAllAsync(IReadOnlyList<ToolApprovalRequestContent> requests, string tenantId, string? agentName, CancellationToken cancellationToken)Parameters
Section titled “Parameters”requests IReadOnlyList<ToolApprovalRequestContent>
The pending requests found in the run’s response.
tenantId string
The calling tenant.
agentName string?
The agent that made the calls, when known.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<IReadOnlyDictionary<string, ToolApprovalPresentation?>>