import { Middleware, MiddlewareContext, RequestDirective } from "../types/Middleware.js";
import { ChatResponseString } from "../chat/ChatResponse.js";
export interface CostGuardOptions {
    /**
     * Maximum allowed cost (in USD) for a single request sequence.
     */
    maxCost: number;
    /**
     * Callback when the limit is exceeded.
     */
    onLimitExceeded?: (ctx: MiddlewareContext, currentCost: number) => void;
}
/**
 * Middleware that monitors accumulated cost during a session (especially multi-turn tool calls)
 * and throws an error if a defined limit is exceeded.
 */
export declare class CostGuardMiddleware implements Middleware {
    private options;
    readonly name = "CostGuard";
    private accumulatedCost;
    constructor(options: CostGuardOptions);
    onResponse(ctx: MiddlewareContext, result: ChatResponseString): Promise<RequestDirective>;
}
/**
 * Factory function for creating the cost guard middleware.
 */
export declare function CostGuard(options: CostGuardOptions): CostGuardMiddleware;
//# sourceMappingURL=CostGuardMiddleware.d.ts.map