Documentation
¶
Overview ¶
Package continuation builds bounded, immutable session carry and resolves its lineage.
Index ¶
- Constants
- func Cap(settings compaction.Settings, minB int) int
- func Match(visible, incoming []runstore.Hash) bool
- func VisibleHash(message *model.Message) (runstore.Hash, error)
- type Chain
- func (c *Chain) Citations(ctx context.Context, source index.Source, entries []index.MessageEntry, ...) checkpoint.CitationResolver
- func (c *Chain) Head(ctx context.Context, run, scope string) (runstore.Hash, error)
- func (c *Chain) Resolve(ctx context.Context, current, label string) (index.RunCheckpoint, error)
- type Entry
- type Plan
Constants ¶
const ( // Full identifies content carried without truncation. Full = "full" // Preview identifies bounded text or arguments. Preview = "preview" // Placeholder identifies permanently cleared results. Placeholder = "placeholder" )
Variables ¶
This section is empty.
Functions ¶
func Cap ¶
func Cap(settings compaction.Settings, minB int) int
Cap returns the carry ceiling in bytes at two bytes per token. Unknown model budgets use the 60k-token ceiling; explicit recent/protection settings persist.
Types ¶
type Chain ¶
type Chain struct {
RunID, SessionID string
Prev *string
Pos int
Sessions session.Store
Continuations session.ContinuationStore
Content runstore.Store
HeadOf func(context.Context, string, string) (runstore.Hash, error)
Authorize func(context.Context, recall.Access) error
// contains filtered or unexported fields
}
Chain is anchored to the current run's recorded predecessor, never the live session head. Scope IDs of published roots equal their run IDs.
func (*Chain) Citations ¶
func (c *Chain) Citations(ctx context.Context, source index.Source, entries []index.MessageEntry, through index.MessageID, lines []index.IndexLine) checkpoint.CitationResolver
Citations adapts Chain's label resolution to checkpoint.CitationResolver. Carried content is preferred over an authorized read of an earlier index.
type Entry ¶
type Entry struct {
Entry index.MessageEntry
Messages []*model.Message
Form string
}
Entry pairs canonical provenance with the final rendered messages. Callers must apply the final view's clearing/preview rules before invoking Carry.
type Plan ¶
type Plan struct {
Tail []Entry
Evicted []index.MessageEntry
TailFrom index.MessageID
Bytes int
Minimal bool
}
Plan accounts for every non-reasoning entry in either Tail or Evicted.