Documentation
¶
Overview ¶
Package store provides the content-addressed decision memo behind the cache-guard contract.
Why it exists: provider prompt caches give ~90% discounts for stable prefixes. The engine's transforms are deterministic today, but determinism is a property of CURRENT parameters — config reloads, preset changes or algorithm upgrades would silently rewrite previously-sent blocks and break caches mid-session. The memo pins decisions by content hash: the same original bytes always yield the exact same compressed bytes for the lifetime of the process, regardless of what parameters say now.
Package store — originals: the reversibility half of the quality contracts. Every squeezed blob's full original text is kept locally, content-addressed by SHA256, so any elision can be resolved back to exact bytes ("reversible" contract).
Persistence is an append-only JSONL file (one record per original) in a user-owned directory; nothing ever leaves the machine.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Memo ¶
type Memo struct {
// contains filtered or unexported fields
}
Memo is a bounded LRU map from SHA256(original) to compressed bytes. Safe for concurrent use.
type Originals ¶
type Originals struct {
// contains filtered or unexported fields
}
Originals keeps full source texts keyed by content hash.
func OpenOriginals ¶
OpenOriginals returns a store persisted to <dir>/originals.jsonl, loading existing records. Directory is created if missing.