Skip to main content

Module claude_code_transcript

Module claude_code_transcript 

Source
Expand description

Claude Code transcript parsing.

Reads a JSONL session transcript and extracts ordered ToolInvocations (matching tool_result blocks back to their tool_use by id), plus a TranscriptSummary with deduped token totals, wall-clock duration, and the final assistant text. Also resolves subagent transcripts by their .meta.json description.

Structs§

SubagentEntry
A discovered subagent transcript and its metadata sidecar.
SubagentMeta
Metadata sidecar (<base>.meta.json) written alongside a subagent transcript.
TranscriptSummary
A transcript boiled down to the artifacts the pipeline needs.

Functions§

find_by_description
Find the subagent whose meta description matches. On duplicates (a retry within the same run), returns the most-recently-written transcript.
list_subagents
List subagent transcripts (each a <base>.meta.json with a sibling <base>.jsonl) under subagents_dir. Returns [] if the dir is missing.
parse_transcript
Parse the transcript at jsonl_path into ordered tool invocations.
parse_transcript_full
Parse the transcript into a full TranscriptSummary.