Skip to main content

Module dedup

Module dedup 

Source
Expand description

Session-scoped cache for deduplicating compressed tool results.

Structs§

ContentAddressedDedup
Session-scoped content-addressed history deduplicator.
DedupEntry
Metadata retained for an immutable conversation chunk.
DedupGroup
A canonical chunk and the later chunks that can reference it.
DedupHit
A prior tool result that can be represented by a compact stub.
DedupStats
Savings produced while normalizing one request’s conversation history.
SemanticDedup
Word-trigram semantic deduplicator for non-identical tool output.
ToolResultCache
Thread-safe cache of compressed tool results for one proxy session.

Constants§

DEFAULT_SEMANTIC_THRESHOLD
Default Jaccard similarity threshold for near-duplicate tool output.

Functions§

brief_diff
Summarize line-level changes without embedding a full diff.
compute_similarity
Calculate word-trigram Jaccard similarity from 0.0 to 1.0.
find_near_duplicates
Find disjoint groups of later chunks similar to their first occurrence.

Type Aliases§

Blake3Hash
BLAKE3 address for one immutable tool-output chunk.