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 + func ExtractKeyFacts(messages []CompressMessage) []string + func FormatCompressed(result *CompressionResult) string + func ScoreImportance(msg CompressMessage, position int, total int) float64 + type CompressMessage struct + Content string + Importance float64 + IsToolResult bool + Role string + Tokens int + ToolName string + func SelectiveCompress(messages []CompressMessage, budget int) []CompressMessage + func SemanticCompress(messages []CompressMessage, budget int) []CompressMessage + func TieredCompress(messages []CompressMessage, budget int) []CompressMessage + type CompressStrategy string + const StrategySelective + const StrategySemantic + const StrategySummarize + const StrategyTiered + type CompressedBlock struct + FilesDiscussed []string + KeyFacts []string + OriginalCount int + Summary string + TokensSaved int + ToolCallSummary string + func SummarizeBlock(messages []CompressMessage) *CompressedBlock + type CompressionResult struct + Blocks []CompressedBlock + Compressed int + Original int + PreservedMessages int + TokensSaved int + type Compressor = SessionCompressor + func NewCompressor(strategy CompressStrategy) *Compressor + type CrossSessionLearner struct + Conventions []SessionConvention + Dir string + FailurePatterns []FailurePattern + Insights []Insight + func NewCrossSessionLearner(dir string) *CrossSessionLearner + func (c *CrossSessionLearner) BuildSessionPrimer(task string) string + func (c *CrossSessionLearner) Decay(factor float64) + func (c *CrossSessionLearner) GetConventions() []SessionConvention + func (c *CrossSessionLearner) GetFailureResolutions(errorMsg string) []FailurePattern + func (c *CrossSessionLearner) GetRelevantInsights(task string, limit int) []Insight + func (c *CrossSessionLearner) LearnConvention(rule string, examples []string, source string) + func (c *CrossSessionLearner) LearnFromOutcome(task, approach string, success bool, toolsUsed []string, ...) + func (c *CrossSessionLearner) Load() error + func (c *CrossSessionLearner) RecordFailure(pattern, context, resolution string) + func (c *CrossSessionLearner) Save() error + func (c *CrossSessionLearner) Stats() LearnerStats + type FailurePattern struct + Context string + ID string + Language string + LastSeen time.Time + Occurrences int + Pattern string + Resolution string + type Insight struct + Category string + Confidence float64 + Content string + CreatedAt time.Time + ID string + Language string + LastUsed time.Time + SuccessCount int + type LearnerStats struct + AvgConfidence float64 + ConventionCount int + FailureCount int + InsightCount int + type SessionCompressor struct + MinMessages int + PreservePatterns []string + Strategy CompressStrategy + func NewSessionCompressor(strategy CompressStrategy) *SessionCompressor + func (sc *SessionCompressor) Compress(messages []CompressMessage, budget int) (*CompressionResult, []CompressMessage, error) + type SessionConvention struct + AppliedCount int + Confidence float64 + Examples []string + ID string + Rule string + Source string + type Timeline struct + Events []TimelineEvent + SessionID string + StartTime time.Time + func NewTimeline(sessionID string) *Timeline + func (t *Timeline) AddAction(tool, target string, duration time.Duration) + func (t *Timeline) AddDecision(decision, reason string) + func (t *Timeline) AddError(err string) + func (t *Timeline) AddEvent(eventType, content string, metadata map[string]string) + func (t *Timeline) AddFileChange(path, action string) + func (t *Timeline) AddMilestone(description string) + func (t *Timeline) Duration() time.Duration + func (t *Timeline) GetBetween(start, end time.Time) []TimelineEvent + func (t *Timeline) GetByType(eventType string) []TimelineEvent + func (t *Timeline) GetMilestones() []TimelineEvent + func (t *Timeline) RenderTimeline(maxWidth int) string + func (t *Timeline) Summarize() string + type TimelineEvent struct + Content string + Duration time.Duration + ID string + Metadata map[string]string + Timestamp time.Time + Type string