Versions in this module Expand all Collapse all v0 v0.3.0 May 26, 2026 v0.2.1 May 26, 2026 Changes in this version + const FieldCost + const FieldDuration + const FieldError + const FieldFile + const FieldModel + const FieldProvider + const FieldTokens + const FieldTool + type AgentLogger struct + Logger *StructuredLogger + Model string + Turn int + func (a *AgentLogger) LogAPICall(model string, tokens int, cost float64, duration time.Duration) + func (a *AgentLogger) LogCompaction(before, after int) + func (a *AgentLogger) LogPermission(tool string, granted bool) + func (a *AgentLogger) LogToolCall(tool, file string, duration time.Duration, err error) + type Counter struct + Name string + Value int64 + type DebugRecorder struct + ActiveSession *DebugSession + Dir string + Sessions []*DebugSession + func NewDebugRecorder(dir string) *DebugRecorder + func (dr *DebugRecorder) AddHypothesis(description string) + func (dr *DebugRecorder) BuildDebugContext(symptom string) string + func (dr *DebugRecorder) ConfirmHypothesis(index int, evidence string) + func (dr *DebugRecorder) EndSession(successful bool) + func (dr *DebugRecorder) FormatSession(session *DebugSession) string + func (dr *DebugRecorder) Load() error + func (dr *DebugRecorder) RecordStep(action, target, result, insight string) + func (dr *DebugRecorder) RejectHypothesis(index int, evidence string) + func (dr *DebugRecorder) Save() error + func (dr *DebugRecorder) SearchSessions(symptom string) []*DebugSession + func (dr *DebugRecorder) SetResolution(resolution string) + func (dr *DebugRecorder) SetRootCause(cause string) + func (dr *DebugRecorder) StartSession(symptom string) *DebugSession + type DebugSession struct + EndTime *time.Time + FilesInvestigated []string + HypothesesTested []Hypothesis + ID string + Resolution string + RootCause string + StartTime time.Time + Steps []DebugStep + Successful bool + Symptom string + type DebugStep struct + Action string + Index int + InsightGained string + Result string + Target string + Timestamp time.Time + type Feedback struct + Category string + Comment string + Context string + ID string + Rating int + SessionID string + TaskType string + Timestamp time.Time + type FeedbackCollector struct + Dir string + Entries []Feedback + ImplicitSignals []ImplicitSignal + func NewFeedbackCollector(dir string) *FeedbackCollector + func (fc *FeedbackCollector) FormatReport() string + func (fc *FeedbackCollector) GetByCategory(category string) []Feedback + func (fc *FeedbackCollector) GetSatisfactionScore() float64 + func (fc *FeedbackCollector) GetTrends() string + func (fc *FeedbackCollector) IdentifyIssues() []string + func (fc *FeedbackCollector) Load() error + func (fc *FeedbackCollector) RecordExplicit(rating int, comment, category, sessionID, taskType string) error + func (fc *FeedbackCollector) RecordImplicit(signal ImplicitSignal) error + func (fc *FeedbackCollector) Save() error + type Hypothesis struct + Confirmed bool + Description string + Evidence string + Tested bool + type ImplicitSignal struct + SessionID string + Timestamp time.Time + ToolName string + Type string + type LogEntry struct + Caller string + Fields map[string]interface{} + Level string + Message string + SessionID string + Timestamp time.Time + type LogLevel int + const LevelDebug + const LevelError + const LevelFatal + const LevelInfo + const LevelWarn + func ParseLevel(s string) LogLevel + type ProfileSpan struct + Children []ProfileSpan + Duration time.Duration + End time.Time + Metadata map[string]string + Name string + Start time.Time + type Profiler struct + Counters map[string]*Counter + Enabled bool + Spans []ProfileSpan + Timers map[string]*Timer + func NewProfiler() *Profiler + func (p *Profiler) EndSpan(span *ProfileSpan) + func (p *Profiler) ExportJSON() string + func (p *Profiler) GetP50(timer string) time.Duration + func (p *Profiler) GetP95(timer string) time.Duration + func (p *Profiler) GetP99(timer string) time.Duration + func (p *Profiler) HotPaths() [][]string + func (p *Profiler) Increment(counter string, delta int64) + func (p *Profiler) Recommendations() []string + func (p *Profiler) RecordDuration(timer string, d time.Duration) + func (p *Profiler) Report() string + func (p *Profiler) Reset() + func (p *Profiler) StartSpan(name string) *ProfileSpan + type RotatingWriter struct + Dir string + MaxFiles int + MaxSize int64 + Prefix string + func NewRotatingWriter(dir, prefix string) (*RotatingWriter, error) + func (rw *RotatingWriter) Close() error + func (rw *RotatingWriter) Write(p []byte) (n int, err error) + type StructuredLogger struct + Fields map[string]interface{} + Format string + Level LogLevel + Output io.Writer + SessionID string + func NewStructuredLogger(level LogLevel, output io.Writer) *StructuredLogger + func (l *StructuredLogger) Debug(msg string, fields ...map[string]interface{}) + func (l *StructuredLogger) Error(msg string, fields ...map[string]interface{}) + func (l *StructuredLogger) Info(msg string, fields ...map[string]interface{}) + func (l *StructuredLogger) Warn(msg string, fields ...map[string]interface{}) + func (l *StructuredLogger) WithFields(fields map[string]interface{}) *StructuredLogger + func (l *StructuredLogger) WithSession(sessionID string) *StructuredLogger + type Timer struct + Name string + Samples []time.Duration