Documentation
¶
Overview ¶
Package pipeline orchestrates one offload request end to end: trivial-check -> context-budget trim -> cache -> build -> generate(grammar) -> parse -> verify -> validate -> (retry|defer|accept) -> cache + ledger.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnswersAgree ¶
AnswersAgree is a thin exported wrapper around answersAgree for use by the shadow-labeling flywheel (which lives in a separate package and cannot call the unexported function directly). task is a task-type string (e.g. "classify"). Behavior is identical to answersAgree.
Types ¶
type Pipeline ¶
type Pipeline struct {
// contains filtered or unexported fields
}
func (*Pipeline) Run ¶
Run executes req through the Gemma-4 family cascade and always returns a Result (success or structured defer). Fast tasks (triage/classify) enter at the small tier; on a quality failure the request climbs to the next-larger local model before ever deferring to Opus. Infra errors do not escalate.
func (*Pipeline) RunTier ¶
RunTier runs req through exactly the named tier (bypassing modelChain), with the full quality gate (grammar/verify/validate/ground/confidence) that attempt applies. It records NOTHING to the savings ledger — used by the offline shadow-labeling flywheel to evaluate a counterfactual tier without polluting the savings stats. Returns the tier's result and whether it was accepted.
func (*Pipeline) StartReloader ¶ added in v0.5.0
StartReloader launches a background goroutine that polls the watched artifacts every interval and hot-swaps any that changed (via reloadOnce). It returns a stop func that halts the goroutine and blocks until it has exited. It is started ONLY from runMCP (never from New()), so CLI one-shots never leak a goroutine and stay byte-identical. The tick body recovers from any loader panic so a corrupt artifact can never kill the long-running server (P5).