Metadata-Version: 2.4
Name: tmdiff
Version: 0.2.0
Summary: git diff for chat exports and logs — 100% offline, zero LLMs, pure arithmetic.
Author-email: Abhishek Srivastava <bitsabhi@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/0x-auth/tmdiff
Project-URL: Repository, https://github.com/0x-auth/tmdiff
Keywords: diff,timeline,snowflake,causality,logs,archaeology
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Text Processing
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.24
Dynamic: license-file

# tmdiff

**`git diff` for your chat exports, server logs, and notes — 100% offline, zero LLMs.**

`tmdiff` filters out repetitive background noise, API secrets, and boilerplate from chat and log exports to isolate key turning points and causal links.

## Pipeline

1. **Streaming Harmonic Squeeze & Secret Scrub (`squeeze.py`)**: 4096-dim FNV-1a NLMS-Huber filter that collapses repetitive log lines in `O(1)` memory while redacting API keys (`sk-`, `ghp_`, `AKIA`, JWTs).
2. **True Timeline Anchoring (`timeline.py`)**: Extracts microsecond birth timestamps from platform IDs (Slack, Discord/X snowflakes, Gmail, UUIDv1/v7) and flags undecodable IDs as `UNANCHORED`.
3. **Structural Fingerprinting (`fingerprint.py`)**: Strips variable literals, URLs, and hex hashes while binding negations (`not converge` -> `¬converge`).
4. **Bidirectional Causal Turning Points (`causal.py`)**: Forward and retrocausal error learning (`√(F · Bᵀ)`) isolates high-surprise pivots and symmetric concept links.
5. **Lossless Transport & Local HTTP Proxy (`transport.py`, `server.py`)**: Packs verified `.utf8.json` envelopes or serves `/squeeze` and `/causal` over HTTP (`tmdiff serve 8787`).

## Quick Start

```bash
pip install tmdiff
cat app.log | tmdiff
tmdiff examples/sample_archive.jsonl --pack examples/out.utf8.json
tmdiff serve 8787
```

## Run Tests

```bash
python3 -m unittest discover -v tests
```

## License

MIT
