/**
 * Per-user token usage tracking for the multi-tenant gateway.
 *
 * Tracks API call token consumption (input/output) per user and model.
 * Data is stored as an append-only JSON file in each user's usage directory.
 *
 * This is the tracking foundation. The actual hook into the API call pipeline
 * (recording tokens from Anthropic API responses) will be wired when the
 * agent message pipeline passes through user context.
 */
/** Per-model usage breakdown. */
export type ModelUsage = {
    input: number;
    output: number;
};
/** Aggregated usage summary for a user. */
export type UsageSummary = {
    totalInputTokens: number;
    totalOutputTokens: number;
    byModel: Record<string, ModelUsage>;
    lastUpdated: number;
};
/** Usage tracker interface. */
export type UsageTracker = {
    /** Record token usage for a user. */
    recordUsage(userId: string, tokens: {
        input: number;
        output: number;
    }, model: string): Promise<void>;
    /** Get aggregated usage for a user. */
    getUsage(userId: string): Promise<UsageSummary>;
};
/**
 * Creates a per-user token usage tracker.
 *
 * Usage data is stored at {stateDir}/users/{userId}/usage/usage.json.
 * The tracker reads the current file, increments counters, and writes back
 * using atomic file replacement to prevent corruption.
 */
export declare function createUsageTracker(opts: {
    stateDir: string;
}): UsageTracker;
