Skip to content

Commit be2d313

Browse files
ndbroadbentclaude
andcommitted
Add fingerprint module for monthly chunk deduplication
New module: src/fingerprint/ - types.ts: MonthlyChunk, DeduplicationPlan, FingerprintConfig - chunker.ts: generateMonthlyChunks(), createDeduplicationPlan() - index.ts: Module exports Key features: - Groups messages by calendar month for deduplication - Uses first 10 messages + message count per month for fingerprinting - Truncates timestamps to minute (floor, not round) to handle WhatsApp ±1s drift - Per-user isolation (fingerprints not shared across users) - Includes comprehensive tests for edge cases including real-world drift scenario See project_docs/CHAT_FINGERPRINTING.md for algorithm details. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 71a70fb commit be2d313

File tree

6 files changed

+830
-1
lines changed

6 files changed

+830
-1
lines changed

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@
3737
"types": "./dist/index.d.ts",
3838
"import": "./dist/index.js",
3939
"default": "./dist/index.js"
40+
},
41+
"./costs": {
42+
"types": "./dist/costs/index.d.ts",
43+
"import": "./dist/costs/index.js",
44+
"default": "./dist/costs/index.js"
4045
}
4146
},
4247
"files": [
@@ -47,7 +52,7 @@
4752
"scripts": {
4853
"cli": "bun run src/cli.ts",
4954
"dev": "bun run --watch src/cli.ts",
50-
"build": "bun build src/index.ts --outdir dist --target node && bun build src/cli.ts --outdir dist --target node && tsc -p tsconfig.types.json",
55+
"build": "bun build src/index.ts --outdir dist --target node && bun build src/costs/index.ts --outdir dist/costs --target node && bun build src/cli.ts --outdir dist --target node && tsc -p tsconfig.types.json",
5156
"build:types": "tsc -p tsconfig.types.json",
5257
"build:types:watch": "tsc -p tsconfig.types.json --watch",
5358
"build:binary": "bun build src/cli.ts --compile --outfile chat-to-map",

0 commit comments

Comments
 (0)