report

package
v0.2.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package report renders a finished exploration session into a markdown summary and aggregates token spend across the session.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyst

type Analyst struct {
	// Manager writes the headline prose. Nil keeps the deterministic
	// headline without any model call.
	Manager explore.LLM
}

Analyst renders one exploration session into a markdown report. The aggregation, clustering, and section layout are deterministic; a single manager-model call adds a short prose headline. Any model failure other than a context error falls back to the deterministic headline so rendering always succeeds.

func (Analyst) Report

func (a Analyst) Report(ctx context.Context, session *explore.SessionReport) (string, error)

Report renders the session markdown.

type Stats

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

Stats accumulates token spend across one exploration session.

func (*Stats) Add

func (s *Stats) Add(usage explore.Usage)

Add folds one usage record into the running totals.

func (*Stats) Apply

func (s *Stats) Apply(session explore.SessionReport) explore.SessionReport

Apply returns a copy of the session with the accumulated usage set; the input session is left untouched.

func (*Stats) CostLine

func (s *Stats) CostLine() string

CostLine renders a one-line token summary, no currency.

func (*Stats) Total

func (s *Stats) Total() explore.Usage

Total returns the accumulated usage.

Jump to

Keyboard shortcuts

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