summarize

package
v0.10.9 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package summarize turns a session transcript into a timeline summary entry.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claude

type Claude struct {
	Model   string        // optional --model override
	Timeout time.Duration // bounds the CLI call; zero means 60s
}

Claude summarizes via the `claude -p` headless CLI, piping the transcript on stdin.

func (Claude) Summarize

func (c Claude) Summarize(transcript string) (Summary, error)

type Command added in v0.6.9

type Command struct {
	Command string        // shell command line
	Timeout time.Duration // bounds the call; zero means 60s
}

Command summarizes via a user-configured shell command (run with `sh -c`), piping the transcript on stdin and parsing stdout like Claude's output: first non-empty line is the title, the rest is the body.

func (Command) Summarize added in v0.6.9

func (c Command) Summarize(transcript string) (Summary, error)

type Summarizer

type Summarizer interface {
	Summarize(transcript string) (Summary, error)
}

Summarizer produces a Summary from a transcript. Implementations may call an LLM, a heuristic, or (in tests) return a canned result.

type Summary

type Summary struct {
	Title string
	Body  string
}

Summary is a distilled session entry: a headline and supporting detail.

func Parse

func Parse(s string) Summary

Parse splits a summarizer's output into title (first non-empty line) and body.

Jump to

Keyboard shortcuts

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