claudecode

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package claudecode collects developer-experience events from Claude Code's local session history (~/.claude/projects/<project>/<session>.jsonl).

The session files are an internal Claude Code format, not a stable public contract: parsing is defensive, unrecognized records are skipped, and all events carry history-mode provenance with reduced confidence.

Only metadata is extracted — models, token usage, tool names, timestamps, workspace and branch identifiers. Prompt text, assistant output, and tool results are never read into events.

Index

Constants

View Source
const DefaultConfidence = 0.9

DefaultConfidence is the provenance confidence for events reconstructed from local session history. Session files are complete transcripts, so confidence is high, but the format is internal and undocumented.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	// contains filtered or unexported fields
}

Collector reads Claude Code local session history.

func New

func New(opts Options) (*Collector, error)

New returns a Collector for the given options.

func (*Collector) Collect

Collect implements omnidevx.Collector. It scans every project's session files, emitting events within the requested period. Unparseable lines and files are reported as diagnostics, never silently dropped.

func (*Collector) Source

func (c *Collector) Source() omnidevx.Source

Source implements omnidevx.Collector.

type Options

type Options struct {
	// Dir is the Claude Code home directory. Defaults to ~/.claude.
	Dir string
}

Options configures the collector.

Jump to

Keyboard shortcuts

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