budget

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AgentBudgets = map[string]int{
	"codex": 5440,
}

AgentBudgets is the configurable per-agent description-byte budget table.

Functions

func EstimateDescriptionBytes

func EstimateDescriptionBytes(skill Skill) int

func FormatOverflow

func FormatOverflow(result Result) string

func FormatResult

func FormatResult(result Result) string

Types

type Overflow

type Overflow struct {
	Skill string
	Bytes int
}

type Result

type Result struct {
	Agent     string
	Limit     int
	Used      int
	Status    Status
	Overflow  []Overflow
	Missing   []string
	WarnRatio float64
}

func CheckBudget

func CheckBudget(skills []Skill, agent string) Result

func CheckProjectionBudget

func CheckProjectionBudget(skills []Skill, agent string) Result

func (Result) Percent

func (r Result) Percent() int

type Skill

type Skill struct {
	Name    string
	Content []byte
}

type Status

type Status string
const (
	StatusSilent Status = "silent"
	StatusWarn   Status = "warn"
	StatusRefuse Status = "refuse"
)

Jump to

Keyboard shortcuts

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