Expand description
Shared session-file parsing layer.
Every supported provider (Claude Code, Codex, Copilot CLI, Gemini CLI)
writes its session history to disk in a provider-specific JSONL shape.
This module owns the “turn raw bytes into a typed
crate::CodeAnalysis” boundary so both of the features that consume
session files — crate::analysis (aggregated tool-call metrics) and
crate::usage (aggregated token counts) — share the same parsers
and intermediate shape instead of one feature reaching into the other.
Re-exports§
pub use detector::classify_records;pub use detector::detect_extension_type;pub use opencode::read_opencode_analysis;pub use opencode::read_opencode_usage;pub use parser::parse_session_file;pub use parser::parse_session_file_as;pub use parser::parse_session_file_typed;pub use parser::parse_session_file_typed_with_mode;pub use state::ParseMode;pub use state::SessionParseState;
Modules§
- claude
- Parser for Claude Code session logs (
~/.claude/projects/**/*.jsonl). - codex
- Parser for OpenAI Codex rollout logs (
~/.codex/sessions/**/*.jsonl). - copilot
- Parser for GitHub Copilot CLI session events
(
~/.copilot/session-state/<sessionId>/events.jsonl). - detector
- Content-based provider classification for session JSONL records.
- gemini
- Parser for Gemini CLI session logs
(
~/.gemini/tmp/<project_hash>/chats/*.jsonl). - opencode
- OpenCode session reader (SQLite, not JSONL).
- parser
- state
- Mutable accumulator shared by every per-provider session parser.