Constructors

Methods

  • Whether an operation estimated at estimatedCostUsd fits the caps that apply to agentId. A refusal names the cap that refused it in capType, says why in reason, and carries that cap's numbers: currentCostUsd, the id's total under the cap before the operation (for the single-operation cap, the estimate itself), and limitUsd, the cap.

    Parameters

    • agentId: string
    • estimatedCostUsd: number

    Returns {
        allowed: boolean;
        reason?: string;
        capType?: CostCapType;
        currentCostUsd?: number;
        limitUsd?: number;
    }

    • allowed: boolean
    • Optional reason?: string
    • Optional capType?: CostCapType
    • Optional currentCostUsd?: number
    • Optional limitUsd?: number