PendingApproval
AgentPrism.Abstractions.dllThe pending tool approval request of a run that executes from the queue.
public sealed record PendingApproval : IEquatable<PendingApproval>Inheritance
Section titled “Inheritance”Implements
Section titled “Implements”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 record is a projection, not the owner: the single source of
truth is the session state of MAF (ToolApprovalRequestContent, which lives in
the session history). While the decision is applied the session is read, not this table.
The run that owns the pending request closes with
RunStatus.AwaitingApproval and never changes again. Once the
decision is made the SAME run does not continue; a new run is put on
the queue (the same PendingApproval.SessionId, a new RunId).
Constructors
Section titled “Constructors”PendingApproval()
Section titled “ PendingApproval()”public PendingApproval()Properties
Section titled “Properties”Arguments
Section titled “ Arguments”Gets the arguments of the tool call as key=value pairs (reflection-based
JSON serialization is not USED, to stay AOT compatible). It stays
null when RecordToolPayloads is turned off in the
recording settings.
public string? Arguments { get; init; }Property Value
Section titled “Property Value”CreatedAt
Section titled “ CreatedAt”Gets the creation time.
public required DateTimeOffset CreatedAt { get; init; }Property Value
Section titled “Property Value”DecidedAt
Section titled “ DecidedAt”Gets the time of the decision, or null when no decision was made.
public DateTimeOffset? DecidedAt { get; init; }Property Value
Section titled “Property Value”DecidedBy
Section titled “ DecidedBy”Gets the actor that made the decision, or null when no decision was made.
public string? DecidedBy { get; init; }Property Value
Section titled “Property Value”ExpiresAt
Section titled “ ExpiresAt”Gets the time after which the request counts as ApprovalStatus.Expired.
public required DateTimeOffset ExpiresAt { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”It is required: an approval request that waits forever is a leak.
Gets the record id.
public required Guid Id { get; init; }Property Value
Section titled “Property Value”RequestId
Section titled “ RequestId”Gets the ToolApprovalRequestContent.RequestId value produced by MAF.
public required string RequestId { get; init; }Property Value
Section titled “Property Value”Gets the run that produced this request and closed with RunStatus.AwaitingApproval.
public required Guid RunId { get; init; }Property Value
Section titled “Property Value”SessionId
Section titled “ SessionId”Gets the session of the run. While the decision is applied, the continuing run is put on the queue with this session.
public required string SessionId { get; init; }Property Value
Section titled “Property Value”Status
Section titled “ Status”Gets the status of the request.
public required ApprovalStatus Status { get; init; }Property Value
Section titled “Property Value”TenantId
Section titled “ TenantId”Gets the tenant id.
public required string TenantId { get; init; }Property Value
Section titled “Property Value”ToolName
Section titled “ ToolName”Gets the name of the tool that asks for approval.
public required string ToolName { get; init; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”Equals(object?)
Section titled “ Equals(object?)”public override bool Equals(object? obj)Parameters
Section titled “Parameters”obj object?
Returns
Section titled “Returns”Equals(PendingApproval?)
Section titled “ Equals(PendingApproval?)”public bool Equals(PendingApproval? other)Parameters
Section titled “Parameters”other PendingApproval?
Returns
Section titled “Returns”GetHashCode()
Section titled “ GetHashCode()”public override int GetHashCode()Returns
Section titled “Returns”ToString()
Section titled “ ToString()”public override string ToString()Returns
Section titled “Returns”Operators
Section titled “Operators”operator ==(PendingApproval?, PendingApproval?)
Section titled “ operator ==(PendingApproval?, PendingApproval?)”public static bool operator ==(PendingApproval? left, PendingApproval? right)Parameters
Section titled “Parameters”left PendingApproval?
right PendingApproval?
Returns
Section titled “Returns”operator !=(PendingApproval?, PendingApproval?)
Section titled “ operator !=(PendingApproval?, PendingApproval?)”public static bool operator !=(PendingApproval? left, PendingApproval? right)Parameters
Section titled “Parameters”left PendingApproval?
right PendingApproval?