dedup

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package dedup implements rolling-window deduplication. Skips near-duplicate memories within a configurable time window. Based on Engram's SHA-256 dedup with 15-minute rolling window and agentmemory's 5-minute dedup window.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Window

type Window struct {
	// contains filtered or unexported fields
}

Window tracks recent content hashes to skip near-duplicates.

func New

func New(duration time.Duration) *Window

New creates a dedup window. Default: 5 minutes.

func (*Window) IsDuplicate

func (w *Window) IsDuplicate(content string) bool

IsDuplicate returns true if content was seen within the rolling window. If not a duplicate, records it for future checks.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL