Session parsing, timeline generation, and HTML/video rendering
Find a file
Snider 36ca98652b
Some checks failed
Security Scan / security (push) Has been cancelled
Test / test (push) Has been cancelled
fix(session): r3 — coreerr.E error wrapping in parser scanner + ListSessionsSeq logging on PR #5
Round 3 follow-up to 92ecdda.

Code:
- parser.go: scanTranscriptLines uses coreerr.E for line-size errors;
  read failures now wrapped with coreerr.E (was returning raw)
- parser.go: FetchSession preserves openTranscriptNoFollow cause
- parser.go: ListSessionsSeq logs skipped open/scan/close failures
  (was silently discarding)

Verification: gofmt clean, golangci-lint v2 0 issues, GOWORK=off
go vet + go test -count=1 ./... pass with explicit cache paths.

Closes residual r3 findings on https://github.com/dAppCore/go-session/pull/5

Co-authored-by: Codex <noreply@openai.com>
2026-04-27 19:10:34 +01:00
.core chore: add .core/ build and release configs 2026-03-06 18:52:37 +00:00
.forgejo/workflows ci: add Forgejo Actions test and security scan workflows 2026-02-23 03:28:08 +00:00
docs fix(session): address all CodeRabbit findings on PR #5 2026-04-27 18:17:50 +01:00
kb fix(session): r2 — platform-split no-follow + recursive convention scan + doc fixes on PR #5 2026-04-27 18:48:40 +01:00
specs fix(coderabbit): address markdown linting findings 2026-03-17 13:55:52 +00:00
tests/cli/session fix(session): r2 — platform-split no-follow + recursive convention scan + doc fixes on PR #5 2026-04-27 18:48:40 +01:00
.editorconfig chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:48 +00:00
.gitignore refactor(module): migrate module paths from forge.lthn.ai to dappco.re 2026-03-22 01:37:11 +00:00
.golangci.yml fix(session): address all CodeRabbit findings on PR #5 2026-04-27 18:17:50 +01:00
analytics.go fix(go-session): annotate intrinsic banned imports per AX-6 2026-04-24 19:26:24 +01:00
analytics_test.go fix(session): address all CodeRabbit findings on PR #5 2026-04-27 18:17:50 +01:00
bench_test.go chore(session): align with core v0.8.0-alpha.1 2026-03-26 15:50:44 +00:00
CLAUDE.md fix(session): address all CodeRabbit findings on PR #5 2026-04-27 18:17:50 +01:00
CODEX.md fix(session): address all CodeRabbit findings on PR #5 2026-04-27 18:17:50 +01:00
CONTEXT.md fix(session): address all CodeRabbit findings on PR #5 2026-04-27 18:17:50 +01:00
CONTRIBUTING.md chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:48 +00:00
conventions_test.go fix(session): r2 — platform-split no-follow + recursive convention scan + doc fixes on PR #5 2026-04-27 18:48:40 +01:00
core_helpers.go fix(session): address all CodeRabbit findings on PR #5 2026-04-27 18:17:50 +01:00
GEMINI.md refactor(error-handling): replace fmt.Errorf and errors.New with coreerr.E() 2026-03-16 20:38:07 +00:00
go.mod fix(session): r2 — platform-split no-follow + recursive convention scan + doc fixes on PR #5 2026-04-27 18:48:40 +01:00
go.sum fix(session): r2 — platform-split no-follow + recursive convention scan + doc fixes on PR #5 2026-04-27 18:48:40 +01:00
html.go fix(session): address all CodeRabbit findings on PR #5 2026-04-27 18:17:50 +01:00
html_test.go fix(session): address all CodeRabbit findings on PR #5 2026-04-27 18:17:50 +01:00
parser.go fix(session): r3 — coreerr.E error wrapping in parser scanner + ListSessionsSeq logging on PR #5 2026-04-27 19:10:34 +01:00
parser_other.go fix(session): r2 — platform-split no-follow + recursive convention scan + doc fixes on PR #5 2026-04-27 18:48:40 +01:00
parser_test.go fix(session): address all CodeRabbit findings on PR #5 2026-04-27 18:17:50 +01:00
parser_unix.go fix(session): r2 — platform-split no-follow + recursive convention scan + doc fixes on PR #5 2026-04-27 18:48:40 +01:00
PROMPT.md refactor(module): migrate module paths from forge.lthn.ai to dappco.re 2026-03-22 01:37:11 +00:00
README.md fix(session): r2 — platform-split no-follow + recursive convention scan + doc fixes on PR #5 2026-04-27 18:48:40 +01:00
RECENT.md refactor(module): migrate module paths from forge.lthn.ai to dappco.re 2026-03-22 01:37:11 +00:00
search.go fix(go-session): annotate intrinsic banned imports per AX-6 2026-04-24 19:26:24 +01:00
search_test.go fix(session): address all CodeRabbit findings on PR #5 2026-04-27 18:17:50 +01:00
test_helpers_test.go fix(session): address all CodeRabbit findings on PR #5 2026-04-27 18:17:50 +01:00
threats.md docs(session): confirm ParseStats matches RFC §3 (#669, audit NOTABUG) 2026-04-25 07:28:26 +01:00
TODO.md fix(session): address all CodeRabbit findings on PR #5 2026-04-27 18:17:50 +01:00
video.go fix(session): address all CodeRabbit findings on PR #5 2026-04-27 18:17:50 +01:00
video_test.go fix(session): address all CodeRabbit findings on PR #5 2026-04-27 18:17:50 +01:00

Go Reference License: EUPL-1.2 Go Version

go-session

Claude Code JSONL transcript parser, analytics engine, and HTML timeline renderer. Parses Claude Code session files into structured event arrays (tool calls with round-trip durations, user and assistant messages), computes per-tool analytics (call counts, error rates, average and peak latency, estimated token usage), renders self-contained HTML timelines with collapsible panels and client-side search, and generates VHS tape scripts for MP4 video output. No external runtime dependencies — stdlib only.

Module: dappco.re/go/session Licence: EUPL-1.2 Language: Go 1.26

Quick Start

import (
	"fmt"

	"dappco.re/go/session"
)

sess, _, err := session.ParseTranscript("/path/to/session.jsonl")
analytics := session.Analyse(sess)
fmt.Println(session.FormatAnalytics(analytics))

// Render interactive HTML timeline
err = session.RenderHTML(sess, "timeline.html")

// Search across all sessions in a directory
results, err := session.Search("~/.claude/projects/my-project", "git commit")

Documentation

  • Architecture — JSONL format, parsing pipeline, event types, analytics, HTML rendering, XSS protection
  • Development Guide — prerequisites, build, test patterns, coding standards
  • Project History — completed phases, known limitations, future considerations

Build & Test

go test ./...
go vet ./...
go build ./...

Licence

European Union Public Licence 1.2 — see LICENCE for details.