Skip to main content

Documentation Index

Fetch the complete documentation index at: https://hexxladb.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

LoadContextPack

Budgeted context assembly with supersession filtering.
pack, err := tx.LoadContextPack(ctx,
    2,     // max ring radius
    4096,  // budget
    hexxladb.ByteLenBudgeter{},
    hexxladb.LoadContextBudgetConfig{
        FilterSuperseded: true,
        IncludeSeams:     true,
    },
    centerCoord,
)

LoadContextPackFrom

Unified variadic entry point: one coord → zero-overhead LoadContextPack; multiple coords → LoadMultiContextPack with deduplication.
// Single seed (zero overhead)
pack, err := tx.LoadContextPackFrom(ctx, 2, 4096, hexxladb.ByteLenBudgeter{}, config, centerCoord)

// Multiple seeds (with deduplication)
pack, err := tx.LoadContextPackFrom(ctx, 2, 4096, hexxladb.ByteLenBudgeter{}, config, seed1, seed2, seed3)

LoadContextBudgetConfig

type LoadContextBudgetConfig struct {
    FilterSuperseded bool   // Replace superseded cells with successors
    IncludeSeams     bool   // Include contradiction markers
    SeamRadius       int    // Radius for seam discovery
    MaxSeams         int    // Maximum seams to include
    Explain          bool   // Return per-cell inclusion reasons
}

Budgeters

ByteLenBudgeter

Budget by byte length of content.
budgeter := hexxladb.ByteLenBudgeter{}

TokenBudgeter

Custom budgeter interface for token counting.
type TokenBudgeter interface {
    Budget(cell CellView) int
}

ContextPack

type ContextPack struct {
    Cells       []CellView
    TotalTokens int
    Seams       []Seam
    Stats       ContextPackStats
}
Ordering rule: concentric rings from center outward, then axial spiral order within each ring. If budget is exceeded, the system drops the lowest-confidence items from outer rings first.

AssembleCellView

One coord → CellView with options.
view, err := tx.AssembleCellView(ctx, pk, hexxladb.DefaultAssembleCellViewOpts)

FilterCellViews

Post-process assembled views with predicate.
filtered := hexxladb.FilterCellViews(views, func(view CellView) bool {
    return view.Confidence > 0.5
})

TruncateCellViewsToTokenBudget

Truncate views to fit budget.
truncated := hexxladb.TruncateCellViewsToTokenBudget(views, 4096, hexxladb.ByteLenBudgeter{})

ContextPackStats

Assembly statistics:
type ContextPackStats struct {
    Candidates     int
    Evicted        int
    MaxRing        int
    Superseded     int
}

CellExplanation

Per-cell inclusion/eviction reason (Explain mode):
type CellExplanation struct {
    Reason        string // "included", "evicted_low_confidence", "superseded"
    SupersededBy  Coord  // Set on superseded exclusions
}

See also

  • Cells — Core data units
  • Seams — Contradiction markers