Documentation
¶
Overview ¶
Package pulsebrief generates a short, structured status summary of a session from its conversation using a cheap same-vendor LLM call. It mirrors the pkg/autotitle pattern (cheap model on the session's own provider, transcript framed as data, timeout, robust parsing) so a voice/mobile client can tell the owner WHAT a session is attempting and HOW it's going without reading the whole transcript.
The summary is prose that can age; the actionable "does it need me / current state" is derived from live session state by the caller, never generated here.
Index ¶
Constants ¶
const DefaultModelSpec = "haiku"
DefaultModelSpec is the cheap, fast Anthropic model used for brief generation for Anthropic sessions.
const MaxFieldLen = 140
MaxFieldLen caps each generated field length (in runes).
Variables ¶
var ErrNoCheapSameVendorModel = errors.New("no cheap same-vendor model")
ErrNoCheapSameVendorModel means the session provider has no configured cheap model for briefs. It is deliberately non-fatal: callers should skip brief generation rather than send the transcript to another vendor.
Functions ¶
This section is empty.
Types ¶
type Brief ¶
Brief is the structured, LLM-generated status prose for a session. Both fields are empty when there is no concrete task yet (see IsEmpty).
func Generate ¶
func Generate(ctx context.Context, factory ProviderFactory, sessionModel core.Model, msgs []core.AgentMessage) (Brief, error)
Generate makes a one-shot LLM call to produce a status brief from the conversation messages, using a cheap same-vendor model. It returns an empty Brief (no error) when the conversation has no concrete task yet. It returns an error only when the model can't be resolved, the provider can't be built, or the call produces no usable text.