ctxpack

package
v0.7.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const WriterSummaryPrompt = `` /* 1161-byte string literal not displayed */
View Source
const WriterSummarySystemPrompt = `` /* 332-byte string literal not displayed */
View Source
const WriterTurnPrefixPrompt = `` /* 442-byte string literal not displayed */
View Source
const WriterUpdateSummaryPrompt = `` /* 671-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type StoreSummaryCompactConfig

type StoreSummaryCompactConfig struct {
	Store              *store.Store
	KeepRecentTokens   int
	SummaryTokenBudget int
}

type StoreSummaryCompactStrategy

type StoreSummaryCompactStrategy struct {
	// contains filtered or unexported fields
}

func (*StoreSummaryCompactStrategy) ForceApply

func (*StoreSummaryCompactStrategy) Name

type WriterRestorePack

type WriterRestorePack struct {
	// contains filtered or unexported fields
}

WriterRestorePack holds pre-assembled context that the Writer needs after compression. It is refreshed by the orchestrator at key lifecycle points (chapter start, commit, recovery) and consumed by the PostSummaryHook as a pure in-memory injection — no I/O in the hook path.

func (*WriterRestorePack) Clear

func (p *WriterRestorePack) Clear()

Clear drops cached data (e.g., when switching chapters).

func (*WriterRestorePack) Hook

Hook returns a PostSummaryHook that injects the cached restore pack. The hook performs no I/O — it only reads the in-memory pack under a read lock.

func (*WriterRestorePack) Refresh

func (p *WriterRestorePack) Refresh(s *store.Store)

Refresh loads the current chapter's context from store and caches it. Called by the orchestrator before each writing cycle or on recovery.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL