Versions in this module Expand all Collapse all v0 v0.1.0 Jun 14, 2026 Changes in this version + func Apply(msgs []model.Message, plan Plan) []model.Message + func ApplyPlanJSON(planJSON []byte, msgs []model.Message) []model.Message + type ArtifactOffload struct + Threshold int + func (a ArtifactOffload) Plan(ledger *Ledger, msgs []model.Message, limit int) (Plan, bool) + type Ledger struct + BySource map[TurnSource]int + TotalTokens int + Turns []TurnCount + func NewLedger() *Ledger + func (l *Ledger) Record(source TurnSource, tokens int) + type OffloadSpec struct + ArtifactKey string + MessageIndex int + Threshold int + type Plan struct + Drop []Range + Offloads []OffloadSpec + Summaries []SummarySpec + func (p *Plan) UnmarshalJSON(data []byte) error + func (p Plan) MarshalJSON() ([]byte, error) + type Range struct + From int + To int + type RuntimePlan struct + Drop []Range + Offloads []OffloadSpec + Strategy string + Summaries []SummarySpec + type SlidingWindow struct + KeepLast int + PinSystem bool + func (w SlidingWindow) Plan(ledger *Ledger, msgs []model.Message, limit int) (Plan, bool) + type Strategy interface + Plan func(ledger *Ledger, msgs []model.Message, limit int) (Plan, bool) + type StrategyAdapter struct + func NewStrategyAdapter(name string, limit int, s Strategy) *StrategyAdapter + func (a *StrategyAdapter) ApplyPlanJSON(planJSON []byte, msgs []model.Message) []model.Message + func (a *StrategyAdapter) Plan(ledger *Ledger, msgs []model.Message) ([]byte, bool) + func (a *StrategyAdapter) StrategyName() string + type SummarizeOlder struct + Budget budget.Budget + ChunkTurns int + KeepRecent int + Model string + Provider string + func (s SummarizeOlder) Plan(ledger *Ledger, msgs []model.Message, limit int) (Plan, bool) + type SummarySpec struct + Content string + InsertAfter int + type TurnCount struct + Source TurnSource + Tokens int + type TurnSource string + const SourceHuman + const SourceModel + const SourceSystem + const SourceTool