/**
 * cost/transcript.ts — pure parser for Claude Code JSONL session transcripts (C11).
 *
 * Claude Code writes one JSON object per line. Assistant turns carry a
 * `message.usage` block of the shape:
 *
 *   {
 *     "type": "assistant",
 *     "session_id": "abc123",                  // optional on some lines
 *     "message": {
 *       "model": "claude-opus-4-6",
 *       "usage": {
 *         "input_tokens": 1234,
 *         "output_tokens": 567,
 *         "cache_read_input_tokens": 0,
 *         "cache_creation_input_tokens": 0
 *       }
 *     },
 *     "timestamp": "2026-04-15T..."
 *   }
 *
 * `parseClaudeCodeTranscript` aggregates per `session_id` and returns one
 * partial CostEntry per session. The caller (CLI / CostTracker) is expected
 * to fill in `taskId`, `costUsd`, `providerId`, and any `--model` overrides
 * before persisting — keeping this module pricing-agnostic and side-effect
 * free (single readFileSync) so it can be exercised by fixture tests with
 * zero environmental noise.
 *
 * Robustness contract:
 *   - Missing file → `[]` (caller decides whether to fail).
 *   - Malformed line → silently skipped (transcripts can be tail-truncated).
 *   - Lines without `message.usage` → ignored (user/system turns).
 *   - Sessions without a `session_id` are bucketed under the sentinel
 *     `"unknown-session"` so they still surface in the aggregate.
 */
import type { CostEntry } from './types.js';
/**
 * A partial CostEntry as emitted by the transcript parser. `taskId`,
 * `costUsd`, and `providerId` are filled in by the caller (the `tokens`
 * command knows the task context; pricing is applied via `calculateCost`).
 */
export type ParsedTranscriptEntry = Omit<CostEntry, 'taskId' | 'costUsd' | 'providerId'>;
/**
 * Parse a Claude Code JSONL transcript file and aggregate token usage per
 * session_id. Returns one `ParsedTranscriptEntry` per session.
 *
 * Pure: only reads `path` once via readFileSync; no env reads, no cwd.
 */
export declare function parseClaudeCodeTranscript(path: string): ParsedTranscriptEntry[];
//# sourceMappingURL=transcript.d.ts.map