framework
Version:
The (AI) Framework: turnkey, zero-config AI orchestration that wraps a coding-agent CLI (Claude Code) as a black box and takes you from an idea to a running app. Vite for AI.
31 lines • 1.24 kB
TypeScript
import type { DriverUsage } from './driver/index.js';
/**
* Cumulative token + cost usage for an agent (#322). Extends {@link DriverUsage}
* with a turn count so a surface can show both the spend and how many agent
* turns produced it.
*/
export interface UsageTotals extends DriverUsage {
/** Number of turns that reported usage. */
turns: number;
}
/**
* Accumulates per-turn {@link DriverUsage} into a running total for the whole
* run and lets a budget cap gate on it (#322).
*
* This tracks what *this agent* spent, not where the account's subscription quota
* stands — the agent reports that separately, per turn, as `DriverRateLimit`
* (#517). An earlier version of this note claimed the account limit was
* unreachable under subscription auth; it isn't.
*/
export declare class UsageMeter {
private totalsState;
/**
* Fold one turn's usage into the running total. A turn that reports no price
* still counts its tokens; it just leaves the cost total where it was, so an
* unpriced run totals `undefined` rather than `$0` (#540).
*/
add(usage: DriverUsage): void;
/** A snapshot of the cumulative totals. */
totals(): UsageTotals;
}
//# sourceMappingURL=usage.d.ts.map