Versions in this module Expand all Collapse all v1 v1.1.6 Dec 23, 2025 Changes in this version + type Annotation struct + CreatedAt time.Time + CreatedBy string + ID string + Key string + Metadata map[string]interface{} + PreviousID string + SessionID string + Target Target + Type AnnotationType + Value AnnotationValue + Version int + type AnnotationType string + const TypeAssertion + const TypeComment + const TypeFlag + const TypeGroundTruth + const TypeLabel + const TypeMetric + const TypeScore + type AnnotationValue struct + Flag *bool + Label string + Labels []string + Message string + Passed *bool + Score *float64 + Text string + Unit string + func NewAssertionValue(passed bool, message string) AnnotationValue + func NewCommentValue(text string) AnnotationValue + func NewFlagValue(flag bool) AnnotationValue + func NewLabelValue(label string) AnnotationValue + func NewLabelsValue(labels ...string) AnnotationValue + func NewMetricValue(value float64, unit string) AnnotationValue + func NewScoreValue(score float64) AnnotationValue + type FileStore struct + func NewFileStore(dir string) (*FileStore, error) + func (s *FileStore) Add(ctx context.Context, ann *Annotation) error + func (s *FileStore) Close() error + func (s *FileStore) Delete(ctx context.Context, id string) error + func (s *FileStore) Get(ctx context.Context, id string) (*Annotation, error) + func (s *FileStore) Query(ctx context.Context, filter *Filter) ([]*Annotation, error) + func (s *FileStore) Update(ctx context.Context, previousID string, ann *Annotation) error + type Filter struct + CreatedBy string + EventID string + IncludeDeleted bool + Keys []string + LatestVersionOnly bool + Limit int + SessionID string + Since time.Time + TargetTypes []TargetType + TurnIndex *int + Types []AnnotationType + Until time.Time + type Store interface + Add func(ctx context.Context, ann *Annotation) error + Close func() error + Delete func(ctx context.Context, id string) error + Get func(ctx context.Context, id string) (*Annotation, error) + Query func(ctx context.Context, filter *Filter) ([]*Annotation, error) + Update func(ctx context.Context, previousID string, ann *Annotation) error + type Target struct + EndTime time.Time + EventID string + EventSequence int64 + MessageIndex int + StartTime time.Time + TurnIndex int + Type TargetType + func AtEvent(eventID string) Target + func AtEventSequence(seq int64) Target + func AtMessage(messageIndex int) Target + func AtTurn(turnIndex int) Target + func ForSession() Target + func InTimeRange(start, end time.Time) Target + type TargetType string + const TargetEvent + const TargetMessage + const TargetSession + const TargetTimeRange + const TargetTurn