parser

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ParserVersion = "3"

ParserVersion is bumped when parser logic changes to invalidate caches.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClaudeParser

type ClaudeParser struct{}

ClaudeParser reads Claude Code JSONL session logs.

func (*ClaudeParser) Detect

func (p *ClaudeParser) Detect(projectDir string) ([]string, error)

func (*ClaudeParser) Name

func (p *ClaudeParser) Name() string

func (*ClaudeParser) Parse

func (p *ClaudeParser) Parse(path string) ([]model.Session, error)

type CodexParser

type CodexParser struct{}

CodexParser reads Codex CLI session logs. Supports both the new JSONL format (v0.1+) and legacy JSON format.

func (*CodexParser) Detect

func (p *CodexParser) Detect(projectDir string) ([]string, error)

func (*CodexParser) Name

func (p *CodexParser) Name() string

func (*CodexParser) Parse

func (p *CodexParser) Parse(path string) ([]model.Session, error)

type GeminiParser

type GeminiParser struct{}

GeminiParser reads Gemini CLI session logs.

func (*GeminiParser) Detect

func (p *GeminiParser) Detect(projectDir string) ([]string, error)

func (*GeminiParser) Name

func (p *GeminiParser) Name() string

func (*GeminiParser) Parse

func (p *GeminiParser) Parse(path string) ([]model.Session, error)

type Parser

type Parser interface {
	// Name returns the agent name (e.g. "claude_code").
	Name() string
	// Detect finds log file paths for the current project directory.
	Detect(projectDir string) ([]string, error)
	// Parse reads a log file and returns sessions.
	Parse(path string) ([]model.Session, error)
}

Parser can detect and parse agent log files into unified sessions.

func AllParsers

func AllParsers() []Parser

AllParsers returns instances of every supported parser.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL