Session parsing, timeline generation, and HTML/video rendering
- Go 100%
Wires the session package's free-function surface (list, fetch, parse, prune, search, analyse, render-html, render-mp4) into Core's service-registration plumbing behind a *core.ServiceRuntime[ SessionConfig]. SessionConfig.ProjectsDir is the default base directory; each action also accepts opts.projects_dir for per-call override. Action handlers exposed via OnStartup: session.list — list every transcript under projects_dir session.fetch — opts.id → *Session session.parse — opts.path → *ParsedSession session.prune — opts.max_age_seconds → deleted count session.search — opts.query → []SearchResult session.analyse — opts.id → *SessionAnalytics session.render_html — opts.id + opts.output_path → HTML on disk session.render_mp4 — opts.id + opts.output_path → MP4 via vhs Triplets + examples included; audit verdict COMPLIANT. Co-authored-by: Hephaestus <hephaestus@lthn.ai> |
||
|---|---|---|
| .core | ||
| .forgejo/workflows | ||
| docs | ||
| external | ||
| go | ||
| kb | ||
| specs | ||
| .editorconfig | ||
| .gitignore | ||
| .golangci.yml | ||
| .woodpecker.yml | ||
| AGENTS.md | ||
| CLAUDE.md | ||
| CODEX.md | ||
| CONTEXT.md | ||
| CONTRIBUTING.md | ||
| GEMINI.md | ||
| go.work | ||
| LICENCE | ||
| PROMPT.md | ||
| README.md | ||
| RECENT.md | ||
| sonar-project.properties | ||
| threats.md | ||
| TODO.md | ||
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.