Module transcript

Module transcript 

Source
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_sidechain field: 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§

CacheCreationDetails
Detailed cache creation statistics.
FilePosition
Tracks file read position for incremental parsing.
ScanResult
Result of scanning a transcript file.
TokenUsage
Token usage statistics from API response.
ToolInfo
Information about a tool use, tracked for enriching PostToolUse events.
TranscriptEntry
A single entry in a Claude Code transcript JSONL file.
TranscriptMessage
Message content within a transcript entry.
TranscriptParser
Parser for Claude Code transcript JSONL files.
TranscriptScanner
Orchestrates transcript file scanning with storage integration.

Enums§

ContentBlock
Content block types in messages.
MessageContent
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§

ToolInfoMap
Map from tool_use_id to tool info.