Documentation
¶
Index ¶
- Constants
- func CheckBudget(manifest Manifest, maxTokens int) error
- func EstimateNoLLM(text string) int
- func EstimateText(text string) int
- func ManifestBudget(manifest Manifest) int
- func ModeForTask(task core.TaskRow) string
- func RenderHUD(m Manifest) string
- func ValidateManifest(raw []byte) error
- type Item
- type Manifest
Constants ¶
const ManifestVersion = "1"
Variables ¶
This section is empty.
Functions ¶
func CheckBudget ¶ added in v0.3.0
func EstimateNoLLM ¶ added in v0.3.0
func EstimateText ¶ added in v0.3.0
func ManifestBudget ¶ added in v0.3.0
func ModeForTask ¶ added in v0.3.0
func RenderHUD ¶ added in v0.3.0
RenderHUD formats an already-built Manifest as a human-readable operator view: a table of load items with byte size and estimated token cost, a total row, and the spec's mode/tier line. It is a pure projection of the Manifest — no new estimation, no LLM, no I/O (ADR-8). The token total equals the value the --json surface serializes (manifest.EstimatedTokens), so the two renders never diverge numerically (RH.3).
func ValidateManifest ¶ added in v0.3.0
Types ¶
type Manifest ¶ added in v0.3.0
type Manifest struct {
Version string `json:"version"`
Mode string `json:"mode"`
Slug string `json:"slug"`
TaskID string `json:"task_id"`
Items []Item `json:"items"`
Notes []string `json:"notes,omitempty"`
EstimatedTokens int `json:"estimated_tokens"`
}
func BuildManifest ¶ added in v0.3.0
func BuildManifest(root, slug string, tasks []core.TaskRow, taskID string, maxTokens int) (Manifest, error)
BuildManifest assembles the context references for one task. The steering constitution and memory (R4.3) enter as references + modes, never inlined content, bounded against maxTokens: when over budget, memory drops before steering (constitution wins), deterministically, with a note. maxTokens <= 0 disables budget enforcement.