Expand description
Data models for Claude Code JSONL transcript parsing
Follows Rust best practices:
- Borrowing over cloning (uses &str where possible)
- Derives for common traits (Debug, Clone, Serialize, Deserialize)
- Clear documentation for all types
Structs§
- Execution
Node - A single execution node in the Claude Code session tree
- File
Info - File information from toolUseResult
- Message
- Message content (user or assistant)
- Progress
- Progress update information
- Progress
Data - Progress data (nested in progress nodes)
- Session
- Complete session parsed from JSONL transcript
- Token
Usage - Token usage statistics
- Tool
Result - Tool result (tool output) details
- ToolUse
- Tool use (tool call) details
- Tool
UseResult - Tool use result from user nodes (file operations)
Enums§
- Content
Block - A typed content block matching the 4 real Anthropic content block types.
- Message
Content - Message content — handles both legacy string and modern block array.
- Node
Type - Typed node classification — replaces raw
Stringcomparisons with compile-time checked variants. Serializes to kebab-case for JSON compat.