Expand description
Transcript file parsing for Claude Code JSONL files.
This module parses Claude Code transcript files (JSONL format) to extract events as a third data source alongside hooks and OTEL.
Key advantages over OTEL:
is_sidechainfield: distinguishes main chain from subagent requests- Full content: prompt text, response text, tool I/O
parent_uuid: enables conversation tree reconstruction
Re-exports§
pub use crate::model::error::ScanError;pub use crate::model::error::TranscriptError;
Structs§
- Cache
Creation Details - Detailed cache creation statistics.
- File
Position - Tracks file read position for incremental parsing.
- Scan
Result - Result of scanning a transcript file.
- Token
Usage - Token usage statistics from API response.
- Tool
Info - Information about a tool use, tracked for enriching PostToolUse events.
- Transcript
Entry - A single entry in a Claude Code transcript JSONL file.
- Transcript
Message - Message content within a transcript entry.
- Transcript
Parser - Parser for Claude Code transcript JSONL files.
- Transcript
Scanner - Orchestrates transcript file scanning with storage integration.
Enums§
- Content
Block - Content block types in messages.
- Message
Content - Message content that can be either a plain string or an array of content blocks.
Functions§
- extract_
first_ prompt - Extract the first user prompt from a transcript file.
Type Aliases§
- Tool
Info Map - Map from tool_use_id to tool info.