/**
 * Transcript parser abstraction.
 *
 * The transcript indexer is fed JSONL files produced by different agent
 * engines (Claude SDK and Pi Coding Agent today, with more on the horizon).
 * Each engine writes a different schema, so we delegate format-specific
 * parsing to a `TranscriptParser` and keep the indexer (which handles DB
 * writes, summary generation, and embeddings) generic.
 *
 * A parser converts a slice of raw JSONL lines into a human-readable
 * condensed representation for LLM summarization, and answers a few small
 * questions used to filter trivial wake cycles before paying for inference.
 */
import type { ToolCallFact } from "../usage/usage-report-types.js";
/**
 * Identifies which engine produced a transcript. New engines should add a
 * variant here, register a `TranscriptParser`, and update the engine session's
 * `getTranscriptInfo()` so the indexer can pick the right parser.
 */
export type TranscriptParserKind = "claude" | "pi-coding-agent";
/**
 * Parser contract — everything the indexer needs from a transcript format.
 *
 * Parsers must be pure (no I/O, no global state) and resilient to malformed
 * lines: a corrupt line should be skipped, never throw, so a single bad record
 * cannot derail the indexing of an otherwise valid wake cycle.
 */
export interface ToolCallExtractionResult {
    toolCalls: ToolCallFact[];
    toolCallCount: number;
    truncated: boolean;
    reportedToolCallCount: number | null;
}
export interface TranscriptParser {
    /** Identifier for logs and debugging. */
    readonly kind: TranscriptParserKind;
    /**
     * Convert raw JSONL lines into the condensed text representation fed to
     * the summarization LLM. Should strip base64, oversized tool outputs,
     * binary payloads, etc.
     */
    parseForSummary(lines: string[]): string;
    /**
     * Return true if the wake cycle only contains trivial / housekeeping tool
     * calls (memory reads, transcript search, finish, wait, switch_session).
     * The indexer uses this to skip cycles that aren't worth summarizing.
     */
    isOnlyTrivialToolCalls(lines: string[]): boolean;
    /**
     * Extract tool call facts from raw JSONL lines for usage metering.
     * Each parser handles its own transcript format (Claude SDK vs Pi Coding).
     */
    extractToolCalls(lines: string[], context: {
        cycleStartedAt: string;
        cycleEndedAt: string;
    }): ToolCallExtractionResult;
}
//# sourceMappingURL=types.d.ts.map