You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
claudbg/.beans/claudbg-uls1--define-rust-t...

1.1 KiB

title status type priority created_at updated_at parent
Define Rust types for JSONL schema completed task normal 2026-03-27T19:39:15Z 2026-03-28T05:43:10Z claudbg-mztt

Model the full JSONL schema as serde-deserializable Rust types: SessionEntry enum (user/assistant/system/progress/file-history-snapshot/queue-operation), AssistantContent enum (text/thinking/tool_use), UserContent enum (text/tool_result/image), Usage struct, ToolUseInput, SystemMessage subtypes, ProgressData. All fields should match the on-disk schema discovered from ~/.claude/projects/.

Summary of Changes\n\nCreated src/models/session.rs with permissive RawEntry (uses flatten for unknown fields), Message, MessageContent (untagged enum with Blocks first, Text second), ContentBlock (tagged enum with snake_case, includes Unknown catch-all), Usage, and SystemMessage types. Created src/models/stats.rs with SessionStats struct and compute_stats() function. Created src/models/mod.rs declaring both submodules. Updated src/lib.rs to expose pub mod models. All 4 required unit tests pass.