Skip to main content

Module models

Module models 

Source
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§

ExecutionNode
A single execution node in the Claude Code session tree
FileInfo
File information from toolUseResult
Message
Message content (user or assistant)
Progress
Progress update information
ProgressData
Progress data (nested in progress nodes)
Session
Complete session parsed from JSONL transcript
TokenUsage
Token usage statistics
ToolResult
Tool result (tool output) details
ToolUse
Tool use (tool call) details
ToolUseResult
Tool use result from user nodes (file operations)

Enums§

ContentBlock
A typed content block matching the 4 real Anthropic content block types.
MessageContent
Message content — handles both legacy string and modern block array.
NodeType
Typed node classification — replaces raw String comparisons with compile-time checked variants. Serializes to kebab-case for JSON compat.