/**
 * Runtime Token Parser Service
 *
 * Parses token usage data from terminal output of different AI CLI runtimes.
 * Each runtime (Claude Code, Gemini CLI, Codex CLI) has a distinct output
 * format for reporting token consumption. This service extracts structured
 * token data from those formats.
 *
 * @module services/monitoring/runtime-token-parser.service
 */
/** Parsed token usage data from runtime output */
export interface ParsedTokenUsage {
    /** Number of input/prompt tokens consumed */
    inputTokens: number;
    /** Number of output/completion tokens generated */
    outputTokens: number;
    /** Total cost in USD (if reported by the runtime) */
    cost?: number;
    /** Model identifier (if reported by the runtime) */
    model?: string;
    /** Which runtime produced this data */
    runtime: 'claude-code' | 'gemini-cli' | 'codex-cli';
}
/**
 * Parse Claude Code terminal output for token usage data.
 *
 * Claude Code reports token usage in several formats:
 * - Status line: "↑ 15234 ↓ 3456" or "15234↑ 3456↓"
 * - Summary: "Total: 15,234 input / 3,456 output tokens"
 * - Cost line: "Total cost: $0.05" or "Cost: $0.0523"
 * - Compact: "tokens: 15234 in, 3456 out"
 *
 * @param output - Raw terminal output from Claude Code session
 * @returns Parsed token usage or null if no token data found
 */
export declare function parseClaudeCodeTokens(output: string): ParsedTokenUsage | null;
/**
 * Parse Gemini CLI terminal output for token usage data.
 *
 * Gemini CLI reports token usage in formats like:
 * - "Input tokens: 1234, Output tokens: 456"
 * - "Cost for this turn: $0.0012 (Input: 1234 tokens, Output: 456 tokens)"
 * - "Tokens used: 1234 input, 456 output"
 * - "prompt_tokens: 1234, completion_tokens: 456"
 *
 * @param output - Raw terminal output from Gemini CLI session
 * @returns Parsed token usage or null if no token data found
 */
export declare function parseGeminiCliTokens(output: string): ParsedTokenUsage | null;
/**
 * Parse Codex CLI terminal output for token usage data.
 *
 * Codex CLI reports token usage in formats like:
 * - "Tokens: 1234 prompt + 456 completion = 1690 total"
 * - "prompt_tokens=1234 completion_tokens=456"
 * - "Usage: 1234 input, 456 output"
 *
 * @param output - Raw terminal output from Codex CLI session
 * @returns Parsed token usage or null if no token data found
 */
export declare function parseCodexCliTokens(output: string): ParsedTokenUsage | null;
/**
 * Parse terminal output for token usage data from any supported runtime.
 *
 * Tries all runtime parsers in order and returns the first match.
 * The runtime type hint narrows the search for efficiency.
 *
 * @param output - Raw terminal output
 * @param runtimeType - Runtime type hint to try first
 * @returns Parsed token usage or null if no token data found
 */
export declare function parseRuntimeTokens(output: string, runtimeType?: 'claude-code' | 'gemini-cli' | 'codex-cli'): ParsedTokenUsage | null;
//# sourceMappingURL=runtime-token-parser.service.d.ts.map