forgetproof 0.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- forgetproof/__init__.py +3 -0
- forgetproof/__main__.py +5 -0
- forgetproof/_chroma_rebuild.py +197 -0
- forgetproof/agent.py +342 -0
- forgetproof/cli.py +582 -0
- forgetproof/copies.py +155 -0
- forgetproof/desktop/__init__.py +1 -0
- forgetproof/desktop/__main__.py +26 -0
- forgetproof/desktop/api.py +549 -0
- forgetproof/desktop/app.py +59 -0
- forgetproof/desktop/schedule.py +161 -0
- forgetproof/desktop/ui/index.html +298 -0
- forgetproof/discovery.py +357 -0
- forgetproof/erase_live.py +180 -0
- forgetproof/files_store.py +69 -0
- forgetproof/fixer.py +274 -0
- forgetproof/forget.py +264 -0
- forgetproof/forgetme.py +270 -0
- forgetproof/hnsw.py +132 -0
- forgetproof/integrations/__init__.py +9 -0
- forgetproof/integrations/mem0.py +283 -0
- forgetproof/keystore.py +58 -0
- forgetproof/lance_store.py +191 -0
- forgetproof/mcp_server.py +541 -0
- forgetproof/mem0_store.py +189 -0
- forgetproof/pii.py +160 -0
- forgetproof/postgres.py +334 -0
- forgetproof/py.typed +0 -0
- forgetproof/qdrant_store.py +69 -0
- forgetproof/receipt.py +135 -0
- forgetproof/remembered.py +257 -0
- forgetproof/report.py +59 -0
- forgetproof/safety.py +105 -0
- forgetproof/scanner.py +288 -0
- forgetproof/sqlite_pages.py +245 -0
- forgetproof/sqlite_residue.py +226 -0
- forgetproof/subject.py +81 -0
- forgetproof-0.2.0.dist-info/METADATA +397 -0
- forgetproof-0.2.0.dist-info/RECORD +42 -0
- forgetproof-0.2.0.dist-info/WHEEL +4 -0
- forgetproof-0.2.0.dist-info/entry_points.txt +3 -0
- forgetproof-0.2.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: forgetproof
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Detect and erase deleted records left on disk by the memory stores AI agents keep — Chroma, mem0, Qdrant local, LanceDB, SQLite, Postgres/pgvector, text files — with signed receipts, an MCP server, a desktop app and a provider SDK.
|
|
5
|
+
Keywords: ai-agents,agent-memory,vector-database,gdpr,right-to-erasure,chroma,pgvector,postgres,privacy
|
|
6
|
+
Author: StellarMinds
|
|
7
|
+
Author-email: StellarMinds <hello@stellarminds.ai>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
+
Classifier: Topic :: Database
|
|
20
|
+
Classifier: Topic :: Security
|
|
21
|
+
Requires-Dist: cryptography>=42
|
|
22
|
+
Requires-Dist: playwright>=1.47 ; extra == 'browser'
|
|
23
|
+
Requires-Dist: chromadb>=1.0 ; extra == 'chroma'
|
|
24
|
+
Requires-Dist: pywebview>=5.0 ; extra == 'desktop'
|
|
25
|
+
Requires-Dist: keyring>=25 ; extra == 'keyring'
|
|
26
|
+
Requires-Dist: lancedb>=0.20 ; extra == 'lancedb'
|
|
27
|
+
Requires-Dist: mcp>=2.3 ; extra == 'mcp'
|
|
28
|
+
Requires-Dist: mem0ai>=2.2.1 ; extra == 'mem0'
|
|
29
|
+
Requires-Dist: psycopg[binary]>=3.1 ; extra == 'postgres'
|
|
30
|
+
Requires-Dist: starlette>=0.40 ; extra == 'site'
|
|
31
|
+
Requires-Dist: uvicorn>=0.30 ; extra == 'site'
|
|
32
|
+
Requires-Dist: httpx>=0.27 ; extra == 'site'
|
|
33
|
+
Requires-Python: >=3.11
|
|
34
|
+
Project-URL: Homepage, https://forget.stellarminds.ai
|
|
35
|
+
Project-URL: Documentation, https://forget.stellarminds.ai/docs
|
|
36
|
+
Project-URL: Source, https://github.com/Sharathvc23/forgetproof
|
|
37
|
+
Project-URL: Issues, https://github.com/Sharathvc23/forgetproof/issues
|
|
38
|
+
Project-URL: Changelog, https://github.com/Sharathvc23/forgetproof/blob/main/CHANGELOG.md
|
|
39
|
+
Provides-Extra: browser
|
|
40
|
+
Provides-Extra: chroma
|
|
41
|
+
Provides-Extra: desktop
|
|
42
|
+
Provides-Extra: keyring
|
|
43
|
+
Provides-Extra: lancedb
|
|
44
|
+
Provides-Extra: mcp
|
|
45
|
+
Provides-Extra: mem0
|
|
46
|
+
Provides-Extra: postgres
|
|
47
|
+
Provides-Extra: site
|
|
48
|
+
Description-Content-Type: text/markdown
|
|
49
|
+
|
|
50
|
+
# forgetproof
|
|
51
|
+
<!-- mcp-name: io.github.Sharathvc23/forgetproof -->
|
|
52
|
+
|
|
53
|
+
Detects and erases deleted records that remain on disk in the memory stores AI agents keep — Chroma,
|
|
54
|
+
mem0, Qdrant local, LanceDB, SQLite, Postgres/pgvector, and the markdown and JSONL files personal
|
|
55
|
+
agents write — and issues an Ed25519-signed receipt of the result.
|
|
56
|
+
|
|
57
|
+
Deletes in these stores are logical. The bytes persist in write logs, index tombstones, page free space,
|
|
58
|
+
history tables, old versions and unzeroed buffers until something rewrites them. `forgetproof` reads the
|
|
59
|
+
store files directly, reports what is recoverable, and rewrites the store so it isn't.
|
|
60
|
+
|
|
61
|
+
It comes in four forms, all from this codebase:
|
|
62
|
+
|
|
63
|
+
| | For | Start here |
|
|
64
|
+
|---|---|---|
|
|
65
|
+
| **CLI and library** | anyone with a store on disk | `forgetproof scan`, `forget`, `verify` (below) |
|
|
66
|
+
| **MCP server** | the agent you run yourself (Claude Code, Cursor, any MCP client) | `forgetproof mcp --home --owner --allow-fix` |
|
|
67
|
+
| **Memory Hygiene** | the desktop app, macOS and Windows | `forgetproof desktop` |
|
|
68
|
+
| **ForgetMe** (the button and the wire contract) | hosted personal agents and the companies they share with (Instinct, Hello Haven, Wajo, Muse, any Poppy agent or company) | [`docs/extension.md`](docs/extension.md), [`packages/forgetme-button`](packages/forgetme-button/README.md), the reference Company [`company/`](company/README.md); served for logged-out developers at [forget.stellarminds.ai/docs](https://forget.stellarminds.ai/docs) (the spec, schemas, a sample receipt, the verifier at `/verify`, the embed snippet, two quickstarts); the audit hand-off in [`docs/AUDIT.md`](docs/AUDIT.md) |
|
|
69
|
+
| **The 0.2 provider surface and SDK** | a hosted provider that wants signed erasure receipts without the button | [`docs/provider-surface.md`](docs/provider-surface.md), `forgetproof.agent.Provider` |
|
|
70
|
+
|
|
71
|
+
Live demo, in the format of [act.stellarminds.ai](https://act.stellarminds.ai): [`demo/`](demo/README.md).
|
|
72
|
+
The scope this release was built against is in [`docs/GOAL.md`](docs/GOAL.md).
|
|
73
|
+
|
|
74
|
+
forgetproof comes out of stellarminds.ai's research on non-membership proofs and memory erasure for
|
|
75
|
+
AI agents.
|
|
76
|
+
|
|
77
|
+
## Install
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
pip install forgetproof # scan Chroma, mem0, Qdrant local, SQLite and text files
|
|
81
|
+
pip install 'forgetproof[chroma]' # + fix Chroma (chromadb >= 1.0)
|
|
82
|
+
pip install 'forgetproof[lancedb]' # + LanceDB (scan tells live from deleted; fix compacts)
|
|
83
|
+
pip install 'forgetproof[mem0]' # + a verified delete around a mem0 Memory (docs/mem0.md)
|
|
84
|
+
pip install 'forgetproof[postgres]' # + Postgres/pgvector
|
|
85
|
+
pip install 'forgetproof[mcp]' # + MCP server for agents
|
|
86
|
+
pip install 'forgetproof[desktop]' # + the Memory Hygiene desktop app
|
|
87
|
+
pip install 'forgetproof[keyring]' # + keep generated keys in the OS keychain
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Python 3.11+.
|
|
91
|
+
|
|
92
|
+
## For the agent you run yourself
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
forgetproof init --home # finds Claude Code memory and transcripts, mem0, Letta, the memory
|
|
96
|
+
# MCP server, Obsidian vaults, project folders; asks; pins them for you
|
|
97
|
+
forgetproof remembered mem0 --subject alice@example.com --subject "Alice Example" --show
|
|
98
|
+
forgetproof forget mem0 --subject alice@example.com --subject 415-555-0100 # erases what was deleted
|
|
99
|
+
forgetproof forget mem0 --subject alice@example.com --also-live # ...and the live lines/rows too
|
|
100
|
+
forgetproof copies mem0 # sync folders, git, backups: where erasing here doesn't reach
|
|
101
|
+
forgetproof sweep # fix every pinned store that isn't open; one receipt each
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
A *subject* is one exact value or several (a name, emails, phone numbers in any common spelling, a pasted
|
|
105
|
+
secret). `remembered` says, per value and per store, whether it is still live, only recoverable, or gone;
|
|
106
|
+
`--show` (owner mode) shows the text around each live match, because the store is yours. `forget` erases
|
|
107
|
+
what the agent deleted but the store kept; `--also-live` additionally deletes the live records that
|
|
108
|
+
contain a value — off by default, and never offered for Postgres. Every receipt carries the number of
|
|
109
|
+
values, never the values, and the copies report, so a clean verdict is read next to the places it
|
|
110
|
+
doesn't cover.
|
|
111
|
+
|
|
112
|
+
Add it to the agent: `claude mcp add forgetproof -- forgetproof mcp --home --owner --allow-fix`. In owner
|
|
113
|
+
mode the agent may pass the values the user named to `what_is_remembered` and `forget_value`; context
|
|
114
|
+
comes back only with `--show`. Or open the desktop app: `forgetproof desktop` (bundles for macOS on Apple
|
|
115
|
+
silicon and for Windows are built by `.github/workflows/desktop.yml`; on an Intel Mac, install the
|
|
116
|
+
`[desktop]` extra and run the same command).
|
|
117
|
+
|
|
118
|
+
## Find your stores once, then refer to them by name
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
cd your_project
|
|
122
|
+
forgetproof init # finds Chroma directories, SQLite files, and $DATABASE_URL etc.
|
|
123
|
+
# shows what it found, asks once, then writes .forgetproof.json
|
|
124
|
+
forgetproof scan memory # "memory" is whatever init named it; works from any subdirectory too
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
`init` never acts on what it finds — it only proposes a list and writes nothing without that one
|
|
128
|
+
confirmation (`--yes` skips it; useful in a setup script you already trust). From then on, every
|
|
129
|
+
command that takes a store accepts a pinned name in place of a path or URL, resolved by walking up
|
|
130
|
+
from the current directory the way `git` finds `.git`. A pinned Postgres store records only the
|
|
131
|
+
*name* of the environment variable that holds its URL, never the URL itself, so the config file
|
|
132
|
+
never contains a password and a rotated credential needs no re-pinning. If what's actually at a
|
|
133
|
+
pinned location no longer matches what was pinned — a file where the directory used to be, say —
|
|
134
|
+
every command refuses it rather than silently acting on whatever is there now.
|
|
135
|
+
|
|
136
|
+
Resolving a bare name only ever considers a config file this user owns, isn't a symlink, and isn't
|
|
137
|
+
writable by anyone else, and stops climbing the moment an ancestor directory itself isn't owned by
|
|
138
|
+
this user — so a config planted in a shared directory above where you happen to be running from
|
|
139
|
+
(a bare `/tmp`, say) is never trusted. Even a config this user does trust can't point outside its
|
|
140
|
+
own directory or at an unrecognized environment variable; either is refused the same way. The
|
|
141
|
+
ownership check is POSIX-only (Windows exposes no equivalent through Python's standard library);
|
|
142
|
+
the containment and environment-variable checks hold on every platform.
|
|
143
|
+
|
|
144
|
+
## Usage
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
forgetproof scan ./chroma_dir --canary user3@example.com
|
|
148
|
+
forgetproof fix ./chroma_dir --dry-run
|
|
149
|
+
forgetproof fix ./chroma_dir --canary user3@example.com # writes a signed receipt
|
|
150
|
+
forgetproof verify forgetproof-receipt-*.json --against ./chroma_dir
|
|
151
|
+
|
|
152
|
+
PGPASSWORD=... forgetproof scan postgresql://app@db:5432/agent
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
`--canary` / `--canary-file` name exact values that must be gone. Output and receipts refer to canaries
|
|
156
|
+
by index only; values and hashes are never written. `--format json|markdown` for machine output.
|
|
157
|
+
Exit codes: `0` clean, `1` residue found or scan incomplete, `2` error.
|
|
158
|
+
|
|
159
|
+
## Checks
|
|
160
|
+
|
|
161
|
+
| Store | Check | Residue |
|
|
162
|
+
|---|---|---|
|
|
163
|
+
| Chroma | `chroma.write_log` | Deleted records (text + embedding) in `embeddings_queue` |
|
|
164
|
+
| Chroma | `chroma.write_log_overwritten` | Pre-`update`/`upsert` versions in `embeddings_queue` |
|
|
165
|
+
| Chroma | `chroma.hnsw_tombstones` | Deleted vectors still in `data_level0.bin` (delete only sets a flag) |
|
|
166
|
+
| Chroma | `chroma.orphaned_index` | Index directories left by `delete_collection()` |
|
|
167
|
+
| Chroma | `chroma.uninitialized_index_memory` | Unzeroed `malloc` memory persisted in unused index capacity, and in all of `length.bin` for `l2`/`ip` spaces |
|
|
168
|
+
| SQLite | `sqlite.slack` | Deleted and replaced rows in free blocks, unallocated page space, freelist pages, the WAL and the journal |
|
|
169
|
+
| mem0 | `mem0.history_deleted` | Deleted memories' full text kept as rows in `history.db` (ADD, UPDATE and DELETE events) |
|
|
170
|
+
| mem0 | `mem0.history_versions` | The previous text of corrected memories, in UPDATE rows |
|
|
171
|
+
| Qdrant local | `sqlite.slack` | Deleted points (pickled vector + payload) in each collection's `storage.sqlite` |
|
|
172
|
+
| LanceDB | `lancedb.deleted_rows` | Rows hidden by deletion vectors, still in the fragment files |
|
|
173
|
+
| LanceDB | `lancedb.fragments` | Known-pattern values in fragments the table no longer returns |
|
|
174
|
+
| LanceDB | `lancedb.old_versions` | Earlier versions of the table, still readable with `checkout()` |
|
|
175
|
+
| Text files | — | Markdown and JSONL keep no deleted data; a value found is still live, and `forget --also-live` removes the lines that carry it |
|
|
176
|
+
| Postgres | `pg.table_residue` | Dead tuples in heap, TOAST and index files after `VACUUM` |
|
|
177
|
+
| Postgres | WAL (warning) | Canary values in WAL segments |
|
|
178
|
+
|
|
179
|
+
The SQLite check is structural. It parses the file into live cells and free space, and reports every
|
|
180
|
+
text fragment in free space that no live row explains, whatever the text says: a name and a street
|
|
181
|
+
address count as much as an email. The same check covers Chroma's `chroma.sqlite3`, mem0's `history.db`
|
|
182
|
+
and Qdrant local's `storage.sqlite`. Write-log, tombstone and orphan checks count records regardless of
|
|
183
|
+
content. Pattern matches (email, North American phone, US SSN, card numbers that pass Luhn, common API
|
|
184
|
+
key formats) annotate findings, and they are the only content check for Postgres table files, LanceDB
|
|
185
|
+
fragments and Chroma's leaked index memory. To check for a specific value, name it: `--canary` on `scan`
|
|
186
|
+
and `fix`, `--subject` on `forget` and `remembered`.
|
|
187
|
+
|
|
188
|
+
Postgres scans read relation files via `pg_read_binary_file` after a `CHECKPOINT`, which requires
|
|
189
|
+
superuser or `pg_read_server_files`. Without it, the scan falls back to `n_dead_tup` and is reported as
|
|
190
|
+
incomplete, never clean.
|
|
191
|
+
|
|
192
|
+
## Fix
|
|
193
|
+
|
|
194
|
+
`fix` rewrites the store in place with no undo, and keeps no backup (one would defeat the erasure; make your own first if you need it). It asks before proceeding unless you pass `--yes`; `--dry-run` prints the plan without changing anything.
|
|
195
|
+
|
|
196
|
+
**Chroma.** Preflight refuses to run if another process has the store open, if free disk is below
|
|
197
|
+
2× store size, or if the installed `chromadb` would migrate the store schema (override with
|
|
198
|
+
`--allow-upgrade`). Then:
|
|
199
|
+
|
|
200
|
+
1. Each collection is rebuilt from live records through the chromadb API in a child process: copy,
|
|
201
|
+
verify count, swap. The swap is journaled, so an interrupted run is completed or rolled back on
|
|
202
|
+
the next run. IDs, documents, metadata, embeddings and collection config are preserved; collection
|
|
203
|
+
UUIDs change.
|
|
204
|
+
2. Orphaned index directories are deleted. Unused capacity and `l2`/`ip` `length.bin` are zeroed in
|
|
205
|
+
place.
|
|
206
|
+
3. Write-log rows for dropped collections are deleted, then `VACUUM` runs with `secure_delete=ON`.
|
|
207
|
+
4. The store is rescanned and a receipt is issued.
|
|
208
|
+
|
|
209
|
+
Stop the application first: Chroma caches store state per process and may write it back.
|
|
210
|
+
|
|
211
|
+
**Postgres.** `VACUUM (FULL, ANALYZE)` on every table with a `vector`, `halfvec` or `sparsevec` column,
|
|
212
|
+
then `pg_switch_wal()` and `CHECKPOINT`. Requires table ownership. Takes an `ACCESS EXCLUSIVE` lock per
|
|
213
|
+
table, with `lock_timeout` set to 15 s.
|
|
214
|
+
|
|
215
|
+
**SQLite.** `VACUUM` with `secure_delete=ON`.
|
|
216
|
+
|
|
217
|
+
## Receipts
|
|
218
|
+
|
|
219
|
+
JSON with before/after findings, actions taken, canary results, warnings, an optional caller-supplied
|
|
220
|
+
`correlation_id` (`fix --correlation` / `forget --correlation`, below) and the SHA-256 of every store
|
|
221
|
+
file after the fix (relation files for Postgres). Signed with Ed25519. The key is generated on first use
|
|
222
|
+
at `~/.config/forgetproof/signing_key.pem` (override with `$FORGETPROOF_HOME`), or in the OS keychain
|
|
223
|
+
instead with `pip install 'forgetproof[keyring]'` and `FORGETPROOF_USE_KEYRING=1` — opt in explicitly;
|
|
224
|
+
forgetproof never auto-detects a keychain, since a backend needing an interactive unlock would otherwise
|
|
225
|
+
silently hang a non-interactive process the first time it ever runs. An existing file key is never moved
|
|
226
|
+
once that's turned on. The same applies to the key that encrypts a forget() request queued for Chroma.
|
|
227
|
+
`forgetproof key` prints the public key. `verify --key <fingerprint>` pins the signer, and
|
|
228
|
+
`verify --against <store>` rehashes and rescans the store.
|
|
229
|
+
|
|
230
|
+
A receipt is an operator attestation that anyone can recheck, not a third-party audit.
|
|
231
|
+
|
|
232
|
+
## MCP server
|
|
233
|
+
|
|
234
|
+
Exposes forgetproof to agents over MCP (stdio). The operator names the stores; the agent can only
|
|
235
|
+
refer to them by name, and can never name a value to look up or erase — it has no `canaries`
|
|
236
|
+
parameter anywhere. The one value a subject-scoped call acts on comes from `--subject-file`, a
|
|
237
|
+
file the operator's application keeps current with whoever is signed in; the agent cannot set it.
|
|
238
|
+
forgetproof refuses to read it unless it, and the directory it's in, are owned by root or by the
|
|
239
|
+
account the server itself runs as, aren't symlinks, and aren't writable by anyone else — so another
|
|
240
|
+
local user or process can't redirect who `forget_me` acts for, or use `check_if_forgotten` to probe
|
|
241
|
+
an arbitrary value. (The ownership and writability checks are POSIX-only; on Windows only the symlink
|
|
242
|
+
check applies.)
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
forgetproof mcp --store memory=./chroma_dir --store pg=postgresql://app@db:5432/agent \
|
|
246
|
+
--allow-fix --subject-file /run/forgetproof/current-user
|
|
247
|
+
claude mcp add forgetproof -- forgetproof mcp --store memory=/srv/agent/chroma_dir # Claude Code
|
|
248
|
+
|
|
249
|
+
forgetproof init --yes && forgetproof mcp --config .forgetproof.json --allow-fix # from the pinned list
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
| Tool | Needs | Effect |
|
|
253
|
+
|---|---|---|
|
|
254
|
+
| `list_stores` | – | Configured store names, and whether fix and a subject are configured |
|
|
255
|
+
| `scan_store(store_name)` | – | Findings as counts only: never whether a specific value is present |
|
|
256
|
+
| `plan_fix(store_name)` | – | Steps `fix` would take; changes nothing |
|
|
257
|
+
| `check_if_forgotten(store_name)` | `--subject-file` | Whether *the current subject* still has recoverable data |
|
|
258
|
+
| `forget_me(store_name)` | `--subject-file`, `--allow-fix` | Erases the current subject's data; may come back `queued` (below) |
|
|
259
|
+
| `fix_store(store_name)` | `--allow-fix` | Erases everything the scan found, with no value argument |
|
|
260
|
+
| `get_receipt` / `verify_receipt(receipt_id)` | – | Receipt JSON; signature, file-hash and rescan check |
|
|
261
|
+
|
|
262
|
+
Responses never contain values or samples, redacted or not. Calls on the same store are serialized,
|
|
263
|
+
and subject-scoped calls are rate-limited per store. On Chroma, `forget_me` and `fix_store` return an
|
|
264
|
+
error, and `forget_me` queues the erasure instead of failing, while the application has the store
|
|
265
|
+
open; call `forgetproof run-queued` (below) at the application's next start, before it reopens the
|
|
266
|
+
store, to finish it — the server also does this for its configured stores on its own startup.
|
|
267
|
+
Receipts go to `~/.config/forgetproof/receipts` (`--receipts DIR`). Pass the Postgres password
|
|
268
|
+
through `PGPASSWORD` in the server's environment.
|
|
269
|
+
|
|
270
|
+
## Embedding directly
|
|
271
|
+
|
|
272
|
+
For an application with its own delete flow, call `forget()` instead of running a server:
|
|
273
|
+
|
|
274
|
+
```python
|
|
275
|
+
from forgetproof import forget
|
|
276
|
+
|
|
277
|
+
receipt = forget.forget(store, subject=user.email, correlation_id=case.id) # erases now, or...
|
|
278
|
+
# forget.Queued(target=..., queued_at=..., correlation_id=...) on Chroma if the app still has the store open
|
|
279
|
+
|
|
280
|
+
# at the app's next start, before it reopens the store:
|
|
281
|
+
for receipt in forget.run_queued(store):
|
|
282
|
+
...
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
forgetproof forget ./chroma_dir --subject user3@example.com --correlation case-4471 # or "queued: …" if Chroma is open
|
|
287
|
+
forgetproof run-queued ./chroma_dir --receipts-dir ./receipts # call before reopening the store
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
`correlation_id` is an opaque label forgetproof never looks at — a case or ticket id, say — carried
|
|
291
|
+
through to the receipt's `correlation_id` field either way, including when the request queues and
|
|
292
|
+
only actually drains later, in a different process, through `run_queued`. Without it, a queued
|
|
293
|
+
request's own receipt (and which of possibly several queued requests it was) is otherwise only
|
|
294
|
+
identifiable by store and timestamp. Keep it non-sensitive: like `target`, and unlike `subject`,
|
|
295
|
+
it's stored in the queue and written into the receipt in plaintext, not encrypted.
|
|
296
|
+
|
|
297
|
+
A queued request is encrypted at rest under a local key (`~/.config/forgetproof/queue` by default)
|
|
298
|
+
and deleted once it drains *clean* — not merely once it's been tried. A subject can legitimately
|
|
299
|
+
still be found afterwards (the same value can be part of another, unrelated live record that must
|
|
300
|
+
not be erased); `run_queued`/`run-queued` reports that result rather than claiming success, retries
|
|
301
|
+
up to `forget.MAX_ATTEMPTS` times, then parks the entry (kept, not auto-retried) rather than either
|
|
302
|
+
looping forever or silently dropping it. `forget.stale_entries(store)` reports parked entries.
|
|
303
|
+
|
|
304
|
+
A parked entry still holds its (encrypted) subject so it can be retried once resolved, but a tool
|
|
305
|
+
built to help with erasure requests shouldn't itself become an unbounded record of who made one:
|
|
306
|
+
`run_queued` purges a parked entry on its own once it's older than `forget.PARK_RETENTION_DAYS`
|
|
307
|
+
(30), and `forgetproof purge-stale [PATH] [--older-than-days N]` does it sooner on demand.
|
|
308
|
+
|
|
309
|
+
## GitHub Action
|
|
310
|
+
|
|
311
|
+
```yaml
|
|
312
|
+
- uses: Sharathvc23/forgetproof@v0
|
|
313
|
+
with:
|
|
314
|
+
path: ./chroma_dir # or a postgresql:// URL from a secret
|
|
315
|
+
canaries: ${{ secrets.ERASED_VALUES }} # optional, newline-separated
|
|
316
|
+
fail-on-residue: "true"
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
Writes a counts-only job summary. Outputs: `clean`, `exit-code`.
|
|
320
|
+
|
|
321
|
+
## Defaults
|
|
322
|
+
|
|
323
|
+
Without any configuration — a test (`test_no_network.py`) checks the first one:
|
|
324
|
+
|
|
325
|
+
- **Nothing phones home.** forgetproof never imports a generic network client and makes no request
|
|
326
|
+
except to the database you pointed it at. There's no telemetry to turn off.
|
|
327
|
+
- **Erasure is opt-in at every layer.** `scan` only ever reads. The MCP server offers no destructive
|
|
328
|
+
tool at all unless started with `--allow-fix`, and `forget_me`/`check_if_forgotten` don't exist
|
|
329
|
+
unless `--subject-file` is set.
|
|
330
|
+
- **No secret goes in a config file.** A Postgres URL's password comes from `PGPASSWORD` or the URL
|
|
331
|
+
itself at call time, never from `init`'s pinned `.forgetproof.json`, which records only an
|
|
332
|
+
environment variable's *name* for a Postgres store.
|
|
333
|
+
- **Few dependencies.** The installable package needs only `cryptography`; chromadb, psycopg, the
|
|
334
|
+
`mcp` SDK and `keyring` are all optional extras, loaded only if you install them.
|
|
335
|
+
|
|
336
|
+
## For hosted personal agents and the companies they share with
|
|
337
|
+
|
|
338
|
+
**ForgetMe · powered by ForgetProof.** ForgetMe is the button beside a memory, and the same flow by
|
|
339
|
+
voice or chat, that makes "forget this" really happen and shows what happened; ForgetProof is the engine
|
|
340
|
+
behind it. A host puts [`<forget-me-button>`](packages/forgetme-button/README.md) beside each memory
|
|
341
|
+
and serves the ForgetMe v1 wire contract ([`docs/extension.md`](docs/extension.md): discovery through
|
|
342
|
+
`/.well-known/poppy.json`, preview, at-most-once submit, owner-scoped status, portable signed evidence)
|
|
343
|
+
over its own stores; a company the agent shared a record with serves the same contract on its own origin
|
|
344
|
+
and answers with its own evidence, which the person's browser verifies against the keys each issuer
|
|
345
|
+
publishes. Schemas and fixtures: [`schemas/forget-me/v1/`](schemas/forget-me/v1/). The reference Company,
|
|
346
|
+
in Python over SQLite with its own key: [`company/`](company/README.md). ForgetMe is a third-party
|
|
347
|
+
extension proposal targeting Poppy 1.0; it is not approved, adopted or reviewed by anyone.
|
|
348
|
+
|
|
349
|
+
A provider that wants signed erasure receipts for the signed-in user without the button embeds
|
|
350
|
+
[`forgetproof.agent.Provider`](src/forgetproof/agent.py): it wraps the provider's stores, erases the
|
|
351
|
+
user's values on request, signs receipts with the provider's key, and serves `/.well-known/forgetproof.json`,
|
|
352
|
+
`POST /forgetproof/forget`, `status` and `receipts` as a pure ASGI app. The subject always comes from the
|
|
353
|
+
provider's session, never the request; a store the provider can only delete through an API gets the
|
|
354
|
+
verdict `UNVERIFIABLE`, never `CLEAN`. That surface is [`docs/provider-surface.md`](docs/provider-surface.md);
|
|
355
|
+
a browser or Node verifies either kind of receipt with
|
|
356
|
+
[`packages/forgetproof-verify`](packages/forgetproof-verify) and no dependencies.
|
|
357
|
+
|
|
358
|
+
## Limitations
|
|
359
|
+
|
|
360
|
+
- Operates on store files only. Filesystem snapshots, copy-on-write blocks, SSD remapping, backups,
|
|
361
|
+
replicas and WAL archives are out of scope; the copies report names the ones it can see.
|
|
362
|
+
- On an SSD an in-place overwrite doesn't defeat wear levelling. forgetproof removes data from the logical
|
|
363
|
+
files, which is what copies, syncs, backups and other programs read; full-disk encryption covers the rest.
|
|
364
|
+
- A record that is *about* a person without any of their exact values isn't matched.
|
|
365
|
+
- A deleted SQLite row is not reported when every 16-byte stretch of its text also occurs in live rows, or
|
|
366
|
+
when it differs from a live row only in its last two characters. Name the value as a canary to check
|
|
367
|
+
for it.
|
|
368
|
+
- Postgres table files, LanceDB fragments and Chroma's leaked index memory are checked by pattern only,
|
|
369
|
+
so a name or an address there is found only when you name it as a canary.
|
|
370
|
+
- Compressed values (Postgres TOAST `pglz`/`lz4`) are not visible to byte scanning. `fix` still
|
|
371
|
+
removes them.
|
|
372
|
+
- Chroma can persist new uninitialized memory on its next index write. Run `scan` periodically or in CI.
|
|
373
|
+
- SQLite's `secure_delete` default is compiled into the library. Debian and Ubuntu build their system
|
|
374
|
+
SQLite with it on, so an application using that library zeroes rows as it deletes them and
|
|
375
|
+
`sqlite.slack` findings are rare there. Pythons from python.org, Homebrew, conda and uv bundle a
|
|
376
|
+
SQLite with the ordinary default, and so do most desktop apps.
|
|
377
|
+
- Cosine-space embeddings may differ in the last float32 ulp after a rebuild, because Chroma stores
|
|
378
|
+
them normalized.
|
|
379
|
+
|
|
380
|
+
Tested on Linux, macOS and Windows; Python 3.11 to 3.14; Chroma 0.6.3 to 1.5.9 (`fix` needs 1.x);
|
|
381
|
+
Postgres 16 to 18 with pgvector 0.8.
|
|
382
|
+
|
|
383
|
+
## References
|
|
384
|
+
|
|
385
|
+
Chakraborttii, García Alvarado, Abdulofizova, Dwivedi. *Ghost Vectors: Soft-Deleted Embeddings Remain
|
|
386
|
+
Reconstructible in HNSW Vector Databases.* 2026. [arXiv:2606.18497](https://arxiv.org/abs/2606.18497)
|
|
387
|
+
|
|
388
|
+
## Development
|
|
389
|
+
|
|
390
|
+
```bash
|
|
391
|
+
uv sync
|
|
392
|
+
uv run pytest # Postgres tests use pgserver, or FORGETPROOF_TEST_PG_URL
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
## License
|
|
396
|
+
|
|
397
|
+
MIT © 2026 stellarminds.ai
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
forgetproof/__init__.py,sha256=Hzihp5O3ESeiVcFyuPj9FFVgQkf1xaUx-iaX-fzmYag,184
|
|
2
|
+
forgetproof/__main__.py,sha256=E6Gls0DNz8GQK2K-kOUIx8cYhgANW_CH54VKrfCfs14,52
|
|
3
|
+
forgetproof/_chroma_rebuild.py,sha256=8vLfpSZ06M0XEEU4WpSuUkexTQM6lefhJvuPE2NAWcE,7900
|
|
4
|
+
forgetproof/agent.py,sha256=YuS0Jt4hprpf9PgvF-Y8v5KEs3NG-kNsezgT-X-X5nE,17158
|
|
5
|
+
forgetproof/cli.py,sha256=yMO-lW16z2jXQo6RS55Qql4f0y24JoAC-2UXKTMKXME,30466
|
|
6
|
+
forgetproof/copies.py,sha256=zJusTSiCFtXiYlY82Q6nBVhnVplDCZUswi_feeuzBP4,6314
|
|
7
|
+
forgetproof/desktop/__init__.py,sha256=bcn2BbkO3cOASeCF2l22yo2366b7Y6GFnNiJAWmsjeY,97
|
|
8
|
+
forgetproof/desktop/__main__.py,sha256=pQp6lGBozKCtKCYPQfDBIfmQbqjNp5SvrsESBI0_mUo,796
|
|
9
|
+
forgetproof/desktop/api.py,sha256=-cHn28RrLi1CiEan-BYjqr5XBMg1uxYONczeYjJ08tI,25439
|
|
10
|
+
forgetproof/desktop/app.py,sha256=KS8HBn74H-8MeFHlKl-CZz50ULEKI4ejENogE7URFvY,1886
|
|
11
|
+
forgetproof/desktop/schedule.py,sha256=qfJvCjYLVnZaB_E4-7AZ_LPEC1S5yID3jU8IEHB7j5c,5670
|
|
12
|
+
forgetproof/desktop/ui/index.html,sha256=eKj_LkbOCKBpnG9bP1fCwf6TkpFZ4QyaBgDWgffXDCs,32069
|
|
13
|
+
forgetproof/discovery.py,sha256=cvFipjiOzmZe2U5QZRfqaM52j5aiCnDJ_iOuS2CYw9Y,14766
|
|
14
|
+
forgetproof/erase_live.py,sha256=b0HfozveD_nSi9q3Q6uesrlQjPH7zU70Agr1YIHX3D4,7546
|
|
15
|
+
forgetproof/files_store.py,sha256=bqw1gIPBH0sErlmz0QJE95PaQPakGnxAFMKObVMjI1s,2394
|
|
16
|
+
forgetproof/fixer.py,sha256=u5rkTeVb3E188JBGolV-u6rr-Lr0l871x99WLP4zlys,11805
|
|
17
|
+
forgetproof/forget.py,sha256=VHimyIj-NvVgYNxu9qxf1Lo9wbtePaR-SeQwsdwupJA,12809
|
|
18
|
+
forgetproof/forgetme.py,sha256=Tkr8hioW8WKIHw8RVfGz2Cbwuphwo1SSIyycrFuw1kw,12906
|
|
19
|
+
forgetproof/hnsw.py,sha256=bEMGhTGOl792WzjFjMu8XXdc-m0ZwZGjRDK7EjoQljg,5603
|
|
20
|
+
forgetproof/integrations/__init__.py,sha256=W54RKoZNxnh3g1OD2jzQz5cbelnacXzCNC-tsR-voA0,652
|
|
21
|
+
forgetproof/integrations/mem0.py,sha256=94s735vHa93S8yQXtxp113G7AUcVJKodrpt7Tjz6l1w,14507
|
|
22
|
+
forgetproof/keystore.py,sha256=IkTfcl6NIK51qFwUdBjylTcW0xMOzSOCVVcXWXlUcB0,2550
|
|
23
|
+
forgetproof/lance_store.py,sha256=c00ABcOouw_CYeM-qcJ4k8RIfZUghSQe0dmJqnfCHqs,7932
|
|
24
|
+
forgetproof/mcp_server.py,sha256=HTheYlIWYTQXPIgrtqJSWWVLquxyzFx_NLZeMb23Smc,27739
|
|
25
|
+
forgetproof/mem0_store.py,sha256=rCk_jHZQwOdBIY-Fi2ffoo4SV7n5gqkSwo8t2nc13js,8060
|
|
26
|
+
forgetproof/pii.py,sha256=EySZIO1F2wncAWI6k2zsK0WdrX77cam2pMnLUsarGKQ,6767
|
|
27
|
+
forgetproof/postgres.py,sha256=B-6UITNW_EJEINm_pmYLmiD5cSgseDYaVQwNWt51NY4,13440
|
|
28
|
+
forgetproof/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
|
+
forgetproof/qdrant_store.py,sha256=ZqI0k3qgYwTZGRZ9pJJ8ufbbbpACFxlVJKsbdRgm2to,2766
|
|
30
|
+
forgetproof/receipt.py,sha256=nfjze8Mp2KyWeW_UNHfI3NXRd2E4EYUDaYXpWcJr71o,5894
|
|
31
|
+
forgetproof/remembered.py,sha256=xiZX498d6J9ppdevzUMxuFqUGXo7MBv2PTWLdKIJf3g,10776
|
|
32
|
+
forgetproof/report.py,sha256=UVbqahLaB3M69g8EyNjQqZm_nf9asv6Xz7pUipOKZ9I,2234
|
|
33
|
+
forgetproof/safety.py,sha256=xbK3eaX3St5QtK-EWs-pPUm8uXtIZHJBLNx-Ne_TqBU,4075
|
|
34
|
+
forgetproof/scanner.py,sha256=J9hK8qkUh0M5kQiBFdK--LO_2SlyfFvhCqS4DylsTlU,12900
|
|
35
|
+
forgetproof/sqlite_pages.py,sha256=kdXA-xxuBJ5ka5alpzKUbxknZYBWtEh-zeyLgDyLwFo,10520
|
|
36
|
+
forgetproof/sqlite_residue.py,sha256=SWr177ubc9hg1ocvqVxaT-0rzpPaJm24wCB0u_ywwkA,9834
|
|
37
|
+
forgetproof/subject.py,sha256=VkMRxew2ZFdHCBzQ4jYpitaVPru_rBDZeS6ECotfkT0,3271
|
|
38
|
+
forgetproof-0.2.0.dist-info/licenses/LICENSE,sha256=mo4bEHboox6Cvk1DuRHhTstvfo1NRFPs5QqRfvrufBc,1072
|
|
39
|
+
forgetproof-0.2.0.dist-info/WHEEL,sha256=-gI5GRFdiNNn2CFz-ptlExISMINC-k8bFxeojAlHbrM,81
|
|
40
|
+
forgetproof-0.2.0.dist-info/entry_points.txt,sha256=1qEvNltUF6Vsk5oEYo-CCLHdNilKP1PISNXcQiuF6sE,54
|
|
41
|
+
forgetproof-0.2.0.dist-info/METADATA,sha256=-pZR566KjTJkMzblzcW7VvlHXmb_fENUdxx4Ux5j7RE,24512
|
|
42
|
+
forgetproof-0.2.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 stellarminds.ai
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|