Documentation
¶
Index ¶
Constants ¶
View Source
const ( KindSummary = "summary" KindPrune = "prune" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CutPointResult ¶ added in v0.1.9
CutPointResult is the compaction cut point in an indexed message list.
type EventData ¶
type EventData struct {
// BeforeSeq is legacy: highest summarized seq when FirstKeptSeq is unset.
BeforeSeq agentkit.EventSeq `json:"beforeSeq,omitempty"`
// FirstKeptSeq is the first retained event after compaction (Pi firstKeptEntryId).
FirstKeptSeq agentkit.EventSeq `json:"firstKeptSeq,omitempty"`
// RetainedTail is verbatim recent history kept for the model after compaction.
RetainedTail []agentkit.ModelMessage `json:"retainedTail,omitempty"`
TokensBefore int `json:"tokensBefore,omitempty"`
Summary agentkit.ModelMessage `json:"summary"`
Kind string `json:"kind"`
}
func (EventData) MemoryCutoffSeq ¶ added in v0.1.9
MemoryCutoffSeq returns the highest event seq dropped from hot memory.
func (EventData) PreviousSummaryText ¶ added in v0.2.1
PreviousSummaryText extracts prior summary body from a compaction event.
type IndexedMessage ¶ added in v0.1.9
type IndexedMessage struct {
Message agentkit.ModelMessage
Seq agentkit.EventSeq
IsTurnStart bool
}
IndexedMessage is a model-visible message with its primary source event seq.
type Preparation ¶ added in v0.1.9
type Preparation struct {
FirstKeptSeq agentkit.EventSeq
FirstKeptIndex int
MessagesToSummarize []agentkit.ModelMessage
TurnPrefixMessages []agentkit.ModelMessage
RetainedTail []agentkit.ModelMessage
PreviousSummary string
TokensBefore int
IsSplitTurn bool
}
Preparation is the Pi-style compaction plan for one pass.
type Result ¶
type Result struct {
Applied bool
Event agentkit.SessionEvent
Messages []agentkit.ModelMessage
}
type RetryConfig ¶
type RetryConfig struct {
Enabled *bool `json:"enabled"`
MaxRetries int `json:"maxRetries"`
BaseDelayMs int `json:"baseDelayMs"`
}
RetryConfig controls bounded retries with exponential backoff for compaction LLM calls.
type RetryPolicy ¶
RetryPolicy is the resolved retry configuration.
Click to show internal directories.
Click to hide internal directories.