transcript

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	TypeMessage  = "message"
	TypeBoundary = "boundary"
)

Variables

This section is empty.

Functions

func LastUUID

func LastUUID(recs []Record) string

func Messages

func Messages(recs []Record) ([]llm.Message, llm.Usage)

func NewAgentID

func NewAgentID() string

func NewSessionID

func NewSessionID() string

func SessionIDFrom

func SessionIDFrom(ctx context.Context) string

func WithSessionID

func WithSessionID(ctx context.Context, sessionID string) context.Context

Types

type Record

type Record struct {
	UUID        string            `json:"uuid"`
	ParentUUID  string            `json:"parent_uuid,omitempty"`
	SessionID   string            `json:"session_id"`
	AgentID     string            `json:"agent_id,omitempty"`
	IsSidechain bool              `json:"is_sidechain,omitempty"`
	Timestamp   string            `json:"timestamp"`
	Type        string            `json:"type"`
	Message     *llm.Message      `json:"message,omitempty"`
	Usage       *llm.Usage        `json:"usage,omitempty"`
	Boundary    *llm.BoundaryMeta `json:"boundary,omitempty"`
}

type Store

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

func NewStore

func NewStore(dir string) *Store

func (*Store) AgentPath

func (s *Store) AgentPath(sessionID, agentID string) string

func (*Store) Append

func (s *Store) Append(path string, recs ...Record) error

func (*Store) Load

func (s *Store) Load(path string) ([]Record, error)

func (*Store) MainPath

func (s *Store) MainPath(sessionID string) string

func (*Store) NewWriter

func (s *Store) NewWriter(sessionID, agentID string) *Writer

func (*Store) ResumeWriter

func (s *Store) ResumeWriter(sessionID, lastUUID string) *Writer

type Writer

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

func (*Writer) Err

func (w *Writer) Err() error

func (*Writer) RecordBoundary

func (w *Writer) RecordBoundary(meta llm.BoundaryMeta)

func (*Writer) RecordMessage

func (w *Writer) RecordMessage(m llm.Message, usage llm.Usage)

Jump to

Keyboard shortcuts

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