Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultDir ¶
DefaultDir returns the default history directory.
func DefaultRetention ¶
DefaultRetention returns the default prune window.
func EventsFileName ¶
func EventsFileName() string
EventsFileName returns the relative filename for transcript events.
Types ¶
type Event ¶
type Event struct {
SessionID string `json:"sessionId"`
Seq uint64 `json:"seq"`
TS time.Time `json:"ts"`
Stream string `json:"stream"`
RawBase64 string `json:"rawBase64"`
Text string `json:"text,omitempty"`
}
Event is a single transcript record.
func ReadEvents ¶
ReadEvents reads all events for a given session.
type Meta ¶
type Meta struct {
SessionID string `json:"sessionId"`
StartedAt time.Time `json:"startedAt"`
ClosedAt *time.Time `json:"closedAt,omitempty"`
}
Meta stores session metadata for discovery and pruning.
type Session ¶
Session describes one stored transcript session.
func ListSessions ¶
ListSessions returns transcript sessions sorted by newest start time first.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store writes transcript events to compressed and live JSONL files and keeps an in-memory ring.
func NewStore ¶
func NewStore(opts StoreOptions) (*Store, error)
NewStore creates a transcript store for one session.
func (*Store) SnapshotLines ¶
SnapshotLines returns the in-memory ring in chronological order.
type StoreOptions ¶
StoreOptions controls transcript behavior.