Versions in this module Expand all Collapse all v0 v0.2.0 Oct 7, 2026 Changes in this version + const MaxGaps + const MaxTies + func DedupTranscript(bodies []json.RawMessage) []json.RawMessage type RunPage + NextBeforeID string type RunQuery + BeforeID string type SessionPage + NextBeforeID string type SessionQuery + BeforeID string v0.1.1 Oct 1, 2026 v0.1.0 Oct 1, 2026 Changes in this version + const FrameRecord + const FrameRun + const InterruptedAfter + var ErrClosed = errors.New("obsdb: closed") + var ErrNotFound = errors.New("obsdb: not found") + func LimitOf(n int) int + func MetaOf(attrs map[string]any) map[string]string + type Batch struct + Records []Record + Spans []Span + type DB interface + Close func() error + Events func(ctx context.Context, runID string, after int64, limit int) (EventPage, error) + Experiment func(ctx context.Context, id string) (Experiment, error) + Experiments func(ctx context.Context) ([]Experiment, error) + ResolvePublicID func(ctx context.Context, publicID string) (sessionID string, err error) + Run func(ctx context.Context, id string) (RunDetail, error) + RunSpans func(ctx context.Context, runID string) ([]Span, error) + Runs func(ctx context.Context, q RunQuery) (RunPage, error) + SaveExperiment func(ctx context.Context, e Experiment) error + Session func(ctx context.Context, id string) (SessionDetail, error) + Sessions func(ctx context.Context, q SessionQuery) (SessionPage, error) + Trace func(ctx context.Context, traceID string) ([]Span, error) + Transcript func(ctx context.Context, runID string) ([]json.RawMessage, error) + Write func(ctx context.Context, b Batch) error + type EventPage struct + Done bool + Events []PosEvent + Gaps []int64 + NextAfter *int64 + type Experiment struct + Agent string + Created time.Time + ID string + Inputs []ExperimentInput + Name string + Updated time.Time + Variants []ExperimentVariant + type ExperimentInput struct + Key string + SourceRunID string + Text string + type ExperimentVariant struct + Key string + Overrides json.RawMessage + type Frame struct + Kind string + Record *Record + Run *RunRow + Seq uint64 + Weft Weft + func RecordFrame(r Record) Frame + func RunFrame(r RunRow) Frame + type Hub interface + Publish func(ctx context.Context, f Frame) + Subscribe func(ctx context.Context, sel Selector, after uint64) (<-chan Frame, error) + func NewHub(opts ...HubOption) Hub + type HubOption interface + func QueueSize(n int) HubOption + type PosEvent struct + Event json.RawMessage + Pos int64 + Time time.Time + type Record struct + Attrs map[string]any + Body string + EventName string + Observed time.Time + Resource map[string]any + Service string + Severity int + SpanID string + Time time.Time + TraceID string + func FromOTLPLogs(req *collogspb.ExportLogsServiceRequest) []Record + type RunDetail struct + Children []RunRow + type RunPage struct + NextBefore *time.Time + Runs []RunRow + Total int + type RunQuery struct + Agent string + Before time.Time + ExperimentID string + Limit int + Meta map[string]string + ParentRunID string + Playground *bool + PublicID string + SessionID string + Status Status + type RunRow struct + Agent string + DeltaCount int64 + Err string + EventCount int64 + ExperimentID string + Finished *time.Time + ForkedFrom string + ID string + LastSeen time.Time + ManifestHash string + MessageCount int64 + Meta map[string]string + Model string + ParentCallID string + ParentRunID string + Pending int + Playground bool + Provider string + PublicID string + Service string + SessionID string + Started time.Time + Status Status + Steps int + StopReason string + TraceID string + Turn int + Usage weft.Usage + WeftVersion string + type Selector struct + Agent string + PublicID string + RunID string + SessionID string + type SessionDetail struct + Runs []RunRow + type SessionPage struct + NextBefore *time.Time + Sessions []SessionRow + Total int + type SessionQuery struct + Agent string + Before time.Time + Limit int + PublicID string + type SessionRow struct + Agent string + FirstSeen time.Time + ID string + LastSeen time.Time + PublicID string + Status Status + Turns int + Usage weft.Usage + type Span struct + Attrs map[string]any + End time.Time + Events []SpanEvent + Kind int + Name string + ParentSpanID string + Resource map[string]any + Service string + SpanID string + Start time.Time + StatusCode int + StatusMessage string + TraceID string + func FromOTLPTraces(req *coltracepb.ExportTraceServiceRequest) []Span + type SpanEvent struct + Attrs map[string]any + Name string + Time time.Time + type Status string + const StatusFailed + const StatusInterrupted + const StatusRunning + const StatusSucceeded + func DeriveStatus(spanFailed, runFinished bool, lastSeen, now time.Time) Status + type Weft struct + Agent string + EventType string + ExperimentID string + ForkedFrom string + ParentCallID string + ParentRunID string + Playground bool + Pos int64 + PublicID string + Record string + RunID string + SessionID string + Step int + ToolSeq int64 + Turn int + func DeriveRecord(r Record) Weft + func DeriveSpan(s Span) Weft Other modules containing this package github.com/weftgo/weft