Documentation
¶
Overview ¶
Package engine hosts the squoze optimization pipeline.
v2 pipeline: detect wire format → walk message structures with targeted JSON-path edits (gjson/sjson) → squeeze only provably-safe text (machine output classified by the router) → report savings. Untouched bytes stay byte-identical: sjson edits in place instead of re-marshalling maps, which is what keeps provider prompt caches stable.
Contracts: fail-open (unknown/invalid input passes through), never-elide (error lines survive), savings floor, idempotent markers.
Index ¶
Constants ¶
const DefaultMemoCapacity = 4096
DefaultMemoCapacity bounds pinned decisions per process (~4k blobs).
const Version = "0.1.0"
Version is reported by `squoze version` and stamped into response headers.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine is the pipeline with its cache-guard state attached.
func NewEngineWith ¶
NewEngineWith attaches an external originals store (e.g. persisted).
type Result ¶
type Result struct {
Format wire.Format
Family string // model family the request was optimized for
OriginalBytes int
SentBytes int
SavedBytes int
BlocksSqueezed int
MemoHits int // blocks served byte-identical from the decision memo
Transforms []string
}
Result describes one processed request body.