mnemo-engine 0.18.0__tar.gz → 0.19.0__tar.gz

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.
Files changed (95) hide show
  1. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/PKG-INFO +2 -2
  2. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/README.md +1 -1
  3. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/Cargo.lock +3 -3
  4. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/Cargo.toml +1 -1
  5. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/README.md +18 -4
  6. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/examples/ann_defaults_v0_6_0.rs +61 -27
  7. mnemo_engine-0.19.0/mnemo/examples/inspect_demo_brain.rs +150 -0
  8. mnemo_engine-0.19.0/mnemo/examples/perf2_split.rs +86 -0
  9. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/guide/guide.md +6 -2
  10. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/bin/mnemo/export.rs +46 -0
  11. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/bin/mnemo/hook.rs +20 -31
  12. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/bin/mnemo/inspect.html +154 -7
  13. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/bin/mnemo/inspect.rs +216 -6
  14. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/bin/mnemo.rs +37 -23
  15. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/crypto.rs +28 -1
  16. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/index.rs +292 -1
  17. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/mcp.rs +14 -3
  18. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/pager.rs +512 -0
  19. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/store/coordination.rs +69 -2
  20. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/store/findings.rs +23 -0
  21. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/store/flush.rs +15 -6
  22. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/store/hooks.rs +79 -0
  23. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/store/load.rs +97 -38
  24. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/store/mod.rs +11 -5
  25. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/store/recall.rs +9 -0
  26. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/store/records.rs +89 -25
  27. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo-python/Cargo.lock +2 -2
  28. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo-python/Cargo.toml +1 -1
  29. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo-python/README.md +1 -1
  30. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo-python/src/lib.rs +64 -36
  31. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo-python/test_mnemo.py +4 -0
  32. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/pyproject.toml +1 -1
  33. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/.gitignore +0 -0
  34. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/benches/corpus.rs +0 -0
  35. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/build.rs +0 -0
  36. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/deny.toml +0 -0
  37. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/examples/ann_diagnose.rs +0 -0
  38. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/examples/ann_recall_grid.rs +0 -0
  39. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/examples/ann_recall_grid_v2.rs +0 -0
  40. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/examples/candle_hard.rs +0 -0
  41. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/examples/embedder_server.py +0 -0
  42. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/examples/file_size_breakdown.rs +0 -0
  43. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/examples/open_rss.rs +0 -0
  44. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/examples/quickstart.rs +0 -0
  45. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/examples/ranking_v2.rs +0 -0
  46. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/examples/session.rs +0 -0
  47. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/examples/shared_bench.rs +0 -0
  48. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/examples/thread_profile.rs +0 -0
  49. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/bin/mnemo/mcp_install.rs +0 -0
  50. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/bin/mnemo/onboard.rs +0 -0
  51. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/bin/mnemo/project.rs +0 -0
  52. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/builtin.rs +0 -0
  53. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/cache.rs +0 -0
  54. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/embed.rs +0 -0
  55. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/embed_cmd.rs +0 -0
  56. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/error.rs +0 -0
  57. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/format.rs +0 -0
  58. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/freelist.rs +0 -0
  59. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/guide.rs +0 -0
  60. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/ident.rs +0 -0
  61. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/keys/display.rs +0 -0
  62. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/keys/mod.rs +0 -0
  63. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/keys/os_store.rs +0 -0
  64. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/keys/recovery.rs +0 -0
  65. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/keyslot.rs +0 -0
  66. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/lib.rs +0 -0
  67. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/mcp/context.rs +0 -0
  68. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/memory.rs +0 -0
  69. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/redact.rs +0 -0
  70. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/result_cache.rs +0 -0
  71. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/session.rs +0 -0
  72. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/shared/call.rs +0 -0
  73. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/shared/fscheck.rs +0 -0
  74. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/shared/lock.rs +0 -0
  75. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/shared/mod.rs +0 -0
  76. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/shared/presence.rs +0 -0
  77. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/shared/sidecar.rs +0 -0
  78. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/store/ann.rs +0 -0
  79. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/store/cache_api.rs +0 -0
  80. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/store/continuation.rs +0 -0
  81. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/store/crud.rs +0 -0
  82. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/store/essence.rs +0 -0
  83. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/store/header_graft_tests.rs +0 -0
  84. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/store/keyed.rs +0 -0
  85. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/store/maintenance.rs +0 -0
  86. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/store/open.rs +0 -0
  87. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/store/shared.rs +0 -0
  88. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/store/snapshots.rs +0 -0
  89. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/store/threads.rs +0 -0
  90. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/text.rs +0 -0
  91. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/transcript.rs +0 -0
  92. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/veccol.rs +0 -0
  93. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo/src/wal.rs +0 -0
  94. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/mnemo-python/.gitignore +0 -0
  95. {mnemo_engine-0.18.0 → mnemo_engine-0.19.0}/python/mnemo_engine/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mnemo-engine
3
- Version: 0.18.0
3
+ Version: 0.19.0
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: License :: OSI Approved :: Apache Software License
@@ -242,7 +242,7 @@ db.notices() # what the handle warns about (also raised as UserWarning at open)
242
242
  | `post(to, subject, body="", *, refs=None, conversation=None, sender=None, role=None)` | v0.17: post a message to an agent id, `role:<role>` or `all`, from `sender` (else `set_author`'s). Returns a dict (`id`, `to`, `from`, `subject`, `body`, `refs`, `conversation`, `hops`, `status`, `delivery`, `created_at`, `acked_at`) |
243
243
  | `inbox(agent=None, role=None, *, unread_only=True, visibility=None)` | v0.17: the messages for `agent`, its `role` or everyone, oldest first, never its own; a list of the same dicts. It only reads: `mark_seen(ids)` records that they were shown |
244
244
  | `ack(id, note=None, *, by=None)`, `prune_messages(days=30)` | v0.17: ack a message (`"acked"` or `"unchanged"`); delete those acked more than `days` ago (returns how many) |
245
- | `task_add(title, body="", *, role=None, after=None, pre_approved=False, slug=None)` | v0.17: queue a task, created by `set_author`'s agent; a slug that exists updates it in place. Returns `{"slug", "status", "outcome"}` |
245
+ | `task_add(title, body="", *, role=None, after=None, pre_approved=False, slug=None, refs=None)` | v0.17: queue a task, created by `set_author`'s agent; a slug that exists updates it in place. `refs` (v0.18.1): what it's about, such as a finding's id. Returns `{"slug", "status", "outcome"}` |
246
246
  | `task_next(role=None)` | v0.17: take the oldest task for `role` whose `after` tasks are done, or one whose owner's claim lapsed: `{"task", "token", "expires_at", "reclaimed_from"}`, or `None` |
247
247
  | `task_update(slug, status=None, note=None, *, token=None)` | v0.17: move a task along or add a note: `{"outcome": "updated", "task"}`, with `token`, `expires_at` and `retaken` while the owner holds the claim; or `{"outcome": "lost", "reason": "taken_back" \| "other_token"}` |
248
248
  | `tasks(status=None, role=None)`, `task_get(slug)` | v0.17: the tasks as dicts (`slug`, `title`, `body`, `role`, `status`, `owner`, `creator`, `after`, `pre_approved`, `created_at`, `history`), oldest first; one, or `None` |
@@ -228,7 +228,7 @@ db.notices() # what the handle warns about (also raised as UserWarning at open)
228
228
  | `post(to, subject, body="", *, refs=None, conversation=None, sender=None, role=None)` | v0.17: post a message to an agent id, `role:<role>` or `all`, from `sender` (else `set_author`'s). Returns a dict (`id`, `to`, `from`, `subject`, `body`, `refs`, `conversation`, `hops`, `status`, `delivery`, `created_at`, `acked_at`) |
229
229
  | `inbox(agent=None, role=None, *, unread_only=True, visibility=None)` | v0.17: the messages for `agent`, its `role` or everyone, oldest first, never its own; a list of the same dicts. It only reads: `mark_seen(ids)` records that they were shown |
230
230
  | `ack(id, note=None, *, by=None)`, `prune_messages(days=30)` | v0.17: ack a message (`"acked"` or `"unchanged"`); delete those acked more than `days` ago (returns how many) |
231
- | `task_add(title, body="", *, role=None, after=None, pre_approved=False, slug=None)` | v0.17: queue a task, created by `set_author`'s agent; a slug that exists updates it in place. Returns `{"slug", "status", "outcome"}` |
231
+ | `task_add(title, body="", *, role=None, after=None, pre_approved=False, slug=None, refs=None)` | v0.17: queue a task, created by `set_author`'s agent; a slug that exists updates it in place. `refs` (v0.18.1): what it's about, such as a finding's id. Returns `{"slug", "status", "outcome"}` |
232
232
  | `task_next(role=None)` | v0.17: take the oldest task for `role` whose `after` tasks are done, or one whose owner's claim lapsed: `{"task", "token", "expires_at", "reclaimed_from"}`, or `None` |
233
233
  | `task_update(slug, status=None, note=None, *, token=None)` | v0.17: move a task along or add a note: `{"outcome": "updated", "task"}`, with `token`, `expires_at` and `retaken` while the owner holds the claim; or `{"outcome": "lost", "reason": "taken_back" \| "other_token"}` |
234
234
  | `tasks(status=None, role=None)`, `task_get(slug)` | v0.17: the tasks as dicts (`slug`, `title`, `body`, `role`, `status`, `owner`, `creator`, `after`, `pre_approved`, `created_at`, `history`), oldest first; one, or `None` |
@@ -1520,7 +1520,7 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
1520
1520
 
1521
1521
  [[package]]
1522
1522
  name = "mnemo-engine"
1523
- version = "0.18.0"
1523
+ version = "0.19.0"
1524
1524
  dependencies = [
1525
1525
  "aes-gcm",
1526
1526
  "apple-native-keyring-store",
@@ -1561,7 +1561,7 @@ dependencies = [
1561
1561
 
1562
1562
  [[package]]
1563
1563
  name = "mnemo-node"
1564
- version = "0.18.0"
1564
+ version = "0.19.0"
1565
1565
  dependencies = [
1566
1566
  "mnemo-engine",
1567
1567
  "napi",
@@ -1571,7 +1571,7 @@ dependencies = [
1571
1571
 
1572
1572
  [[package]]
1573
1573
  name = "mnemo-uniffi"
1574
- version = "0.18.0"
1574
+ version = "0.19.0"
1575
1575
  dependencies = [
1576
1576
  "mnemo-engine",
1577
1577
  "serde_json",
@@ -10,7 +10,7 @@
10
10
  # The CLI binary name stays `mnemo`, so users still invoke `mnemo` on
11
11
  # the command line after `cargo install mnemo-engine`.
12
12
  name = "mnemo-engine"
13
- version = "0.18.0"
13
+ version = "0.19.0"
14
14
  edition = "2021"
15
15
  rust-version = "1.94"
16
16
  # `benches/corpus.rs` is a shared helper module pulled into real benches
@@ -982,16 +982,16 @@ cargo run --bin mnemo -- <command>
982
982
  | `import` | Bulk-load memories from a JSON Lines file |
983
983
  | `index` | Build, rebuild, or drop the IVF+PQ index |
984
984
  | `list` | Browse live memories (table / json / jsonl, filters). Since v0.17 private records only with `--visibility private` (or `all`, which marks them `[private]`); `history` takes `--visibility` too |
985
- | `export` | Readable plaintext export (Markdown or JSON Lines, filters); `--git` for diff-clean output. Since v0.17 private records are left out (a stderr line says how many) unless `--visibility all`, which says it included them; `--git` never writes them, nor messages, claims or presence. Since v0.18, `--git` writes the findings (every status, in id order) after the tasks, then the project essence (its open items by section, then those resolved in the last 30 days); it leaves out thread essence, and a `SECURITY` finding until it's `verified`, and its Markdown header says it's the backup and names the build that wrote it |
986
- | `inspect` | Browse the file in a local, read-only web view (memories, keyed history, threads and essence, snapshots, about) |
985
+ | `export` | Readable plaintext export (Markdown or JSON Lines, filters); `--git` for diff-clean output. Since v0.17 private records are left out (a stderr line says how many) unless `--visibility all`, which says it included them; `--git` never writes them, nor messages, claims or presence. Since v0.18, `--git` writes the findings (every status, in id order) after the tasks, then the project essence (its open items by section, then those resolved in the last 30 days); it leaves out thread essence, and a `SECURITY` finding until it's `verified`, and its Markdown header says it's the backup and names the build that wrote it. Since v0.18.1 it also leaves out a task whose refs name such a finding |
986
+ | `inspect` | Browse the file in a local, read-only web view (memories, keyed history, threads and essence, review findings, tasks, snapshots, about) |
987
987
  | `get` | Fetch one memory by its ULID, with its whole content. `get <ID>` uses the project brain, and `get <PATH> <ID>` a file (v0.16.1) |
988
988
  | `post <TO> <SUBJECT>` | Post a message to an agent (`worker-a`), a role (`role:worker`) or `all`, with `--body`, `--refs`, `--conversation` (a reply). Prints its id and hop count. `--as <agent>` and `--role <role>` say who you are, else `MNEMO_AGENT` and `MNEMO_ROLE`; `--brain <PATH>` for a brain outside the repository (v0.17) |
989
989
  | `inbox [PATH]` | Your messages (to you, your role or `all`, never your own) not yet acked; `--all` for acked ones too, `--visibility` for private ones; listing marks them seen. `--prune [--days N]` deletes those acked more than 30 (or N) days ago. `--as`, `--role`, `--format` (v0.17) |
990
990
  | `ack [PATH] <ID>` | Ack a message (`unread` to `acked`), with `--note`; `--as` (v0.17) |
991
- | `task add <TITLE> [--for <role>]` | Queue a task for a role (`--for`; any role without it), with `--body`, `--after <slugs>`, `--pre-approved`, `--slug`. Prints its slug, `added`, `updated` (the slug existed) or `unchanged`, and its status. A re-add of a `done` slug is refused (with a free slug to use), and only the task's creator changes it. An `after` that closes a cycle is refused (v0.17) |
991
+ | `task add <TITLE> [--for <role>]` | Queue a task for a role (`--for`; any role without it), with `--body`, `--after <slugs>`, `--pre-approved`, `--slug`, and `--ref` (v0.18.1, repeatable: what it's about, such as a finding's id; `export --git` leaves out a task that refs a `SECURITY` finding until it's verified). Prints its slug, `added`, `updated` (the slug existed) or `unchanged`, and its status. A re-add of a `done` slug is refused (with a free slug to use), and only the task's creator changes it. An `after` that closes a cycle is refused (v0.17) |
992
992
  | `task next` | Take the oldest task for your role (`--role`, else `MNEMO_ROLE`) whose `--after` tasks are done, or one whose owner's 2 h claim lapsed (`active` or `blocked`). Your own task whose claim lapsed comes back to you first. Prints the slug, the claim token, the expiry and the title; exits 1 when there's nothing to take (v0.17) |
993
993
  | `task update <SLUG> [--status S] [--note N] [--token T]` | Move your task along: `ready` when finished (its creator sets `done`, unless it's `--pre-approved`), `blocked`, `queued` to hand it back, `active` again. Each renews your claim and prints it (the slug, the status, the token and the expiry); after a lapse nobody acted on, it takes the claim again with a new token. Exits 1 with `lost` when another agent took it back, or when the token isn't the claim's. Anyone may requeue a task (`active` or `blocked`) once its claim lapsed (v0.17) |
994
- | `task list [--status S] [--for <role>]`, `task get <SLUG>` | The tasks, oldest first; one with its history; `--format` (v0.17) |
994
+ | `task list [--status S] [--for <role>]`, `task get <SLUG>` | The tasks, oldest first; one with its history and refs; `--format` (v0.17; `refs` in the JSON since v0.18.1) |
995
995
  | `claim take <TOPIC> [--ttl 15m]` | Claim a topic so two agents don't do one thing (advisory: a record, not a lock). Prints `claimed`, a token and the expiry; exits 1 when another agent (or another session of yours) holds it. Leases are 30s to 24h, 15m by default. `--as`, `--role`, `--brain` (v0.17) |
996
996
  | `claim renew\|release\|check <TOPIC> <TOKEN>` | Renew (from now, `--ttl` or the lease), release, or check a claim; exits 1 with `lost` when it lapsed or another agent holds it. Check before anything irreversible (v0.17) |
997
997
  | `claim who` | The agents: role, tool, last active, whether the process is alive (`unknown` without a long-lived `serve --mcp --shared`), and the topics each holds; `--format` (v0.17) |
@@ -1402,6 +1402,19 @@ page, so copy the printed link instead.
1402
1402
  threads (the essence render, and the turn archive on demand), snapshots
1403
1403
  (the restore points `stats` reports) and about (format, recall mode,
1404
1404
  embedder identity, sizes).
1405
+ - **Findings and tasks** (since v0.18.1): the review findings in a table
1406
+ ordered by id, with a count by status, filters for status, category and
1407
+ priority, and a click for a finding's body, refs, triage, verification
1408
+ and status history. An unverified `SECURITY` finding is shown, marked
1409
+ "private until verified": the page is yours and stays on your machine.
1410
+ The tasks in a table (status, owner, the role it's for, what it waits
1411
+ for, its last change), filtered by status, with a click for the body and
1412
+ history. Everything from the file is shown as text, never as HTML.
1413
+ - **A date range** (since v0.19.0): From and To dates, inclusive, in your
1414
+ local time, on the memories, findings and tasks views (tasks by when
1415
+ they were added or last changed). It combines with the other filters,
1416
+ and the counts follow it. A link can open a view directly
1417
+ (`…/#findings`).
1405
1418
  - **It never holds the file.** It reads it once, read-only, and closes it,
1406
1419
  so an agent writing to the file is never blocked. **Reload** in the page
1407
1420
  reads it again (one passphrase derivation). If a writer has the file
@@ -1634,6 +1647,7 @@ rows stay as-is so improvements (or regressions) are visible.
1634
1647
  | v0.1.0 | 2026-05 | 31 mems, 384-dim, no index | 1.41 MB | ~330 ms | ~35 ms | Initial dogfood baseline |
1635
1648
  | v0.5.0 | 2026-10 | 10K mems, 384-dim, IVF+PQ | 82.9 MB | — (open 14.9 ms secure KDF) | 374 µs (IVF+PQ†) / 623 ms (exact‡) | Phase 6: criterion benches + ranking harness + ANN recall@10 grid + file-size breakdown. IVF+PQ ≈ 1,660× faster than exact at 10K; 10,400× at 100K. Default `IndexConfig` recovers only 40% of exact top-10 — **index-quality defect, fixed in ANN-1 below** (originally mis-filed as a scoring issue). Full numbers in `test/scripts/perf_v0.5.0.json`. |
1636
1649
  | v0.5.1 | 2026-10 | same corpus, hardware AES on ARM | — | — | 105 ms (exact 10K) / 1.05 s (exact 100K); IVF+PQ unchanged | PR 11.0: enable `--cfg aes_armv8 --cfg polyval_armv8` so aarch64 builds use hardware AES + PMULL instead of the constant-time software fallback. **6.0×** faster exact scan at 10K, **6.1×** at 100K; 1.3× on cache_put; IVF+PQ and Argon2id-bound open unchanged. See `test/scripts/perf_v0.5.0.json`'s `speed_hw_aes` block for the full set. No API or format change. If you build from crates.io see the "ARM users" section above. |
1650
+ | v0.19.0 | 2026-11 | 1K / 10K / 100K mems, 384-dim, ~300 B text, IVF+PQ at 100K (`device_budget`) | 1,417 / 1,330 / 1,447 B per memory | open 0.55 / 3.0 / 25.7 ms | first recall 0.6 / 4.2 / 11.5 ms (v0.18.1: 0.9 / 9.2 to 10.4 / 116 to 118 ms); warm 0.22 / 2.3 / 2.4 ms | PERF-2: index layout 2 (flat partition-major arrays, decode 70.8 ms to 0.7 ms at 100K), batched page reads with parallel in-place decrypt, a streamed column fill, the `id -> partition` map built only for writes. One decrypt thread: first recall 8.2 ms (10K), 17.7 ms (100K). Handle RSS 111 MB at 100K (112.5 before). ranking_v2 and recall@10 (0.978) unchanged. See `test/scripts/perf_v0.19.0.json` |
1637
1651
 
1638
1652
  > † IVF+PQ speed at the old defaults; recall@10 was ~0.40 at those
1639
1653
  > defaults, not 1.0. PR ANN-1 raises the default to ≥0.95 recall@10 at
@@ -14,14 +14,20 @@
14
14
  //! legacy sentinel `(8, 64)` triggers auto). Shows what a user
15
15
  //! gets *before* running `mnemo index --rebuild`.
16
16
  //!
17
- //! Writes `test/scripts/perf_v0.5.0.json["ann_defaults_v0_6_0"]`
18
- //! with per-tier `{fresh_install, upgrade_path}` cells carrying
19
- //! `recall_at_10` + `mean_query_ms` + the exact `n_probe` / `n_rerank`
20
- //! values the formulas picked.
17
+ //! Prints `{"ann_defaults_v0_6_0": …}` with per-tier `{fresh_install,
18
+ //! upgrade_path}` cells carrying `recall_at_10` + `mean_query_ms` + the
19
+ //! exact `n_probe` / `n_rerank` values the formulas picked. With `--out
20
+ //! <file>` it also writes that block into the JSON file (merged with what's
21
+ //! there); it never writes a tracked perf file unless asked to (PERF-2).
22
+ //!
23
+ //! On v9 a tier below `V9_ANN_MIN_FACTS` (20,000) has no index: recall is
24
+ //! an exact scan there. Such a tier is skipped and labelled, unless
25
+ //! `MNEMO_DEV_ANN_MIN_FACTS` lowers the threshold (a forced index).
21
26
  //!
22
27
  //! Run:
23
28
  //! ```sh
24
- //! cargo run --release --example ann_defaults_v0_6_0
29
+ //! cargo run --release --features benches --example ann_defaults_v0_6_0
30
+ //! cargo run --release --features benches --example ann_defaults_v0_6_0 -- --out test/scripts/perf_v0.19.0.json
25
31
  //! ```
26
32
 
27
33
  use std::collections::HashSet;
@@ -31,6 +37,7 @@ use std::time::Instant;
31
37
 
32
38
  use mnemo_engine::{
33
39
  IndexConfig, KdfParams, Memory, MemoryType, Metric, Mnemo, MnemoConfig, RecallRequest,
40
+ V9_ANN_MIN_FACTS,
34
41
  };
35
42
  use serde_json::{json, Value};
36
43
 
@@ -228,6 +235,19 @@ fn measure_scenario(
228
235
  }
229
236
 
230
237
  fn main() {
238
+ let args: Vec<String> = std::env::args().collect();
239
+ let out_path: Option<PathBuf> = args
240
+ .iter()
241
+ .position(|a| a == "--out")
242
+ .and_then(|i| args.get(i + 1))
243
+ .map(PathBuf::from);
244
+ // PERF-2: the threshold the engine uses (a forced one when the dev
245
+ // switch sets it), below which a v9 file has no index.
246
+ let ann_min: usize = std::env::var("MNEMO_DEV_ANN_MIN_FACTS")
247
+ .ok()
248
+ .and_then(|v| v.parse().ok())
249
+ .unwrap_or(V9_ANN_MIN_FACTS);
250
+ let mut skipped: Vec<Value> = Vec::new();
231
251
  // Tiers to measure. 1M is "if feasible" — the harness tries it if
232
252
  // the cached corpus is already on disk; otherwise it's skipped
233
253
  // with a note. Avoids the 20-minute first-build cost unless the
@@ -255,6 +275,14 @@ fn main() {
255
275
 
256
276
  let mut tiers_json: Vec<Value> = Vec::new();
257
277
  for n in tiers_to_measure {
278
+ if n < ann_min {
279
+ println!(
280
+ "\n[ann-defaults] tier={n}: skipped, below V9_ANN_MIN_FACTS ({ann_min}): \
281
+ v9 recalls exactly there, with no index"
282
+ );
283
+ skipped.push(json!({ "corpus_size": n, "skipped": "below V9_ANN_MIN_FACTS: exact recall, no index" }));
284
+ continue;
285
+ }
258
286
  println!("\n[ann-defaults] tier={n}");
259
287
  let cached = ensure_corpus(n);
260
288
  let cells = vec![
@@ -274,22 +302,7 @@ fn main() {
274
302
  }));
275
303
  }
276
304
 
277
- let perf_path = PathBuf::from(env!("CARGO_MANIFEST_DIR"))
278
- .parent()
279
- .unwrap()
280
- .join("test/scripts/perf_v0.5.0.json");
281
- let mut out: Value = if perf_path.exists() {
282
- let txt = fs::read_to_string(&perf_path).unwrap();
283
- let v: Value = serde_json::from_str(&txt).unwrap();
284
- if v.is_array() {
285
- json!({ "legacy_rows": v })
286
- } else {
287
- v
288
- }
289
- } else {
290
- json!({})
291
- };
292
- out["ann_defaults_v0_6_0"] = json!({
305
+ let block = json!({
293
306
  "methodology":
294
307
  "Per-tier (10K, 100K, 1M-if-cached): rebuild the ANN index in \
295
308
  memory under two scenarios — 'fresh_install' = IndexConfig::default() \
@@ -301,13 +314,34 @@ fn main() {
301
314
  Index is rebuilt in memory only — cached corpus on disk is \
302
315
  untouched. See CHANGELOG `## [Unreleased]` → ANN-1.1.",
303
316
  "tiers": tiers_json,
317
+ "skipped_tiers": skipped,
318
+ "v9_ann_min_facts": ann_min,
304
319
  });
305
- fs::write(
306
- &perf_path,
307
- serde_json::to_string_pretty(&out).unwrap() + "\n",
308
- )
309
- .unwrap();
310
- println!("\n[ann-defaults] wrote {}", perf_path.display());
320
+ println!(
321
+ "{}",
322
+ serde_json::to_string_pretty(&json!({ "ann_defaults_v0_6_0": block })).unwrap()
323
+ );
324
+ // Only with `--out`: never a tracked perf file by default.
325
+ if let Some(perf_path) = out_path {
326
+ let mut out: Value = if perf_path.exists() {
327
+ let txt = fs::read_to_string(&perf_path).unwrap();
328
+ let v: Value = serde_json::from_str(&txt).unwrap();
329
+ if v.is_array() {
330
+ json!({ "legacy_rows": v })
331
+ } else {
332
+ v
333
+ }
334
+ } else {
335
+ json!({})
336
+ };
337
+ out["ann_defaults_v0_6_0"] = block;
338
+ fs::write(
339
+ &perf_path,
340
+ serde_json::to_string_pretty(&out).unwrap() + "\n",
341
+ )
342
+ .unwrap();
343
+ println!("\n[ann-defaults] wrote {}", perf_path.display());
344
+ }
311
345
  }
312
346
 
313
347
  fn round4(x: f64) -> Value {
@@ -0,0 +1,150 @@
1
+ //! A small, synthetic brain for screenshots of `mnemo inspect` (v0.19.0):
2
+ //! review findings `DEMO-1.1` onward in every status, a few tasks, and a
3
+ //! handful of memories. Nothing here comes from a real brain: the names are
4
+ //! roles and the text is made up. `test/scripts/inspect_screenshot.sh`
5
+ //! builds it and photographs the Findings tab.
6
+ //!
7
+ //! ```text
8
+ //! cargo run --release --example inspect_demo_brain -- <out.mnemo> <passphrase>
9
+ //! ```
10
+
11
+ use mnemo_engine::{FindingSpec, KdfParams, Memory, MemoryType, Mnemo, MnemoConfig, TaskSpec};
12
+
13
+ fn main() {
14
+ let args: Vec<String> = std::env::args().collect();
15
+ let (path, pw) = match (args.get(1), args.get(2)) {
16
+ (Some(p), Some(w)) => (p.clone(), w.clone()),
17
+ _ => {
18
+ eprintln!("usage: inspect_demo_brain <out.mnemo> <passphrase>");
19
+ std::process::exit(2);
20
+ }
21
+ };
22
+ let _ = std::fs::remove_file(&path);
23
+ let cfg = MnemoConfig {
24
+ dimensions: 4,
25
+ kdf: KdfParams::fast(),
26
+ ..Default::default()
27
+ };
28
+ let mut db = Mnemo::create(&path, &pw, cfg).expect("create");
29
+ db.remember(Memory::scaffold_manifest(4)).expect("manifest");
30
+ for (i, text) in [
31
+ "Deploys go out on Tuesdays, after the staging check.",
32
+ "The cache key includes the model name and its version.",
33
+ "Release notes are drafted from the merged PR titles.",
34
+ ]
35
+ .iter()
36
+ .enumerate()
37
+ {
38
+ db.remember(Memory::new(
39
+ *text,
40
+ MemoryType::Semantic,
41
+ vec![1.0 + i as f32, 0.5, 0.25, 1.0],
42
+ ))
43
+ .expect("remember");
44
+ }
45
+
46
+ let add =
47
+ |db: &mut Mnemo, id: &str, category: &str, priority: &str, title: &str, body: &str| {
48
+ let mut f = FindingSpec::new(id, category, priority, title);
49
+ f.body = body.into();
50
+ f.refs = vec![format!(
51
+ "src/demo/{}.rs:42",
52
+ id.to_lowercase().replace(['-', '.'], "_")
53
+ )];
54
+ db.finding_add(&f).expect("finding");
55
+ };
56
+ db.set_author(Some("reviewer".into()));
57
+ add(
58
+ &mut db,
59
+ "DEMO-1.1",
60
+ "CORRECTNESS",
61
+ "HIGH",
62
+ "A retry can run twice after a timeout",
63
+ "The second attempt starts before the first one is cancelled.",
64
+ );
65
+ add(
66
+ &mut db,
67
+ "DEMO-1.2",
68
+ "PERF",
69
+ "MEDIUM",
70
+ "The export reads every page twice",
71
+ "One pass would do; the second re-reads what the first had.",
72
+ );
73
+ add(
74
+ &mut db,
75
+ "DEMO-1.3",
76
+ "SECURITY",
77
+ "MEDIUM",
78
+ "A debug log line includes a request header",
79
+ "Held until the fix ships.",
80
+ );
81
+ add(
82
+ &mut db,
83
+ "DEMO-1.4",
84
+ "DX/DOCS",
85
+ "LOW",
86
+ "The quick start skips the install check",
87
+ "A new user can't tell whether the install worked.",
88
+ );
89
+ add(
90
+ &mut db,
91
+ "DEMO-1.5",
92
+ "PRODUCT",
93
+ "IDEA",
94
+ "Show a finding's history as a timeline",
95
+ "The table has the data; a timeline would read faster.",
96
+ );
97
+ add(
98
+ &mut db,
99
+ "DEMO-2.1",
100
+ "CORRECTNESS",
101
+ "LOW",
102
+ "An empty filter matches nothing instead of everything",
103
+ "Leaving the field blank should mean no filter.",
104
+ );
105
+ add(
106
+ &mut db,
107
+ "DEMO-2.2",
108
+ "PLAN-REFINEMENT",
109
+ "MEDIUM",
110
+ "Split the import step from the index rebuild",
111
+ "They have different failure modes and owners.",
112
+ );
113
+
114
+ db.set_author(Some("planner".into()));
115
+ db.finding_triage("DEMO-1.1", "accepted", "Fix in the next release.")
116
+ .expect("triage");
117
+ db.finding_triage("DEMO-1.2", "accepted", "Worth it at 100K memories.")
118
+ .expect("triage");
119
+ db.finding_triage("DEMO-1.3", "accepted", "Fix before the tag.")
120
+ .expect("triage");
121
+ db.finding_triage("DEMO-1.4", "deferred", "With the docs pass.")
122
+ .expect("triage");
123
+ db.finding_triage("DEMO-1.5", "needs-user", "A product call.")
124
+ .expect("triage");
125
+ db.finding_triage("DEMO-2.2", "rejected", "One step keeps it atomic.")
126
+ .expect("triage");
127
+ db.set_author(Some("reviewer".into()));
128
+ db.finding_verify("DEMO-1.2", "a1b2c3d").expect("verify");
129
+
130
+ db.set_author(Some("planner".into()));
131
+ for (slug, title, refs) in [
132
+ ("fix-retry", "Fix the double retry", vec!["DEMO-1.1"]),
133
+ (
134
+ "faster-export",
135
+ "Read each page once in the export",
136
+ vec!["DEMO-1.2"],
137
+ ),
138
+ ("docs-pass", "The docs pass", vec!["DEMO-1.4"]),
139
+ ] {
140
+ let mut t = TaskSpec::new(title);
141
+ t.slug = Some(slug.into());
142
+ t.role = Some("worker".into());
143
+ t.refs = refs.into_iter().map(str::to_string).collect();
144
+ db.task_add(&t).expect("task");
145
+ }
146
+ db.set_author(Some("worker".into()));
147
+ let _ = db.task_next(Some("worker")).expect("next");
148
+ db.close().expect("close");
149
+ println!("{path}");
150
+ }
@@ -0,0 +1,86 @@
1
+ //! PERF-2 (v0.19.0): where a fresh handle's first recall goes on an indexed
2
+ //! file. For each of `--cycles` fresh handles it loads the index through the
3
+ //! dev hook `Mnemo::__index_load_split` (read and decrypt, decode, the `id
4
+ //! -> partition` map, the delta chain, the reconcile), then times the first
5
+ //! recall that follows. A second set of fresh handles times a plain first
6
+ //! recall for comparison. Medians are printed as JSON.
7
+ //!
8
+ //! ```text
9
+ //! cargo run --release --features benches --example device_budget -- --sizes 100000 # builds the corpus
10
+ //! cargo run --release --features benches --example perf2_split -- --corpus target/device_budget/corpus_100000_384d_300b_v9.mnemo
11
+ //! # the same index rewritten in this build's layout, measured on a copy:
12
+ //! cargo run --release --features benches --example perf2_split -- --corpus <file> --rewrite-to /tmp/copy.mnemo
13
+ //! ```
14
+
15
+ use std::collections::BTreeMap;
16
+ use std::time::Instant;
17
+
18
+ use mnemo_engine::{Mnemo, RecallRequest};
19
+
20
+ #[path = "../benches/corpus.rs"]
21
+ mod corpus;
22
+ use corpus::{gen_clustered_vectors, DIMENSIONS, PASSPHRASE};
23
+
24
+ fn median(mut v: Vec<f64>) -> f64 {
25
+ v.sort_by(|a, b| a.partial_cmp(b).unwrap());
26
+ v[v.len() / 2]
27
+ }
28
+
29
+ fn main() {
30
+ let args: Vec<String> = std::env::args().collect();
31
+ let arg = |name: &str| {
32
+ args.iter()
33
+ .position(|a| a == name)
34
+ .and_then(|i| args.get(i + 1).cloned())
35
+ };
36
+ let corpus = arg("--corpus").expect("--corpus <file>");
37
+ // `--rewrite-to <file>`: copy the corpus there and rewrite its index base
38
+ // in this build's layout (no retraining), then measure the copy.
39
+ let path = match arg("--rewrite-to") {
40
+ Some(dst) => {
41
+ std::fs::copy(&corpus, &dst).expect("copy the corpus");
42
+ let mut db = Mnemo::open(&dst, PASSPHRASE).expect("open the copy");
43
+ db.__rewrite_index_base_for_testing()
44
+ .expect("rewrite the index");
45
+ db.close().expect("close");
46
+ dst
47
+ }
48
+ None => corpus,
49
+ };
50
+ let cycles: usize = arg("--cycles").and_then(|v| v.parse().ok()).unwrap_or(20);
51
+ let queries = gen_clustered_vectors(cycles, DIMENSIONS, 100, 0xDE71_CE00);
52
+ let req = |q: &[f32]| RecallRequest::new(q.to_vec()).top_k(10).track_access(false);
53
+
54
+ let mut stages: BTreeMap<&'static str, Vec<f64>> = BTreeMap::new();
55
+ for q in &queries {
56
+ let mut db = Mnemo::open(&path, PASSPHRASE).expect("open");
57
+ let split = db.__index_load_split().expect("split");
58
+ assert!(!split.is_empty(), "the file has no unloaded v9 index");
59
+ for (k, v) in split {
60
+ stages.entry(k).or_default().push(v);
61
+ }
62
+ let t = Instant::now();
63
+ std::hint::black_box(db.recall(&req(q)).expect("recall"));
64
+ stages
65
+ .entry("recall_after_load_ms")
66
+ .or_default()
67
+ .push(t.elapsed().as_secs_f64() * 1e3);
68
+ }
69
+ let mut plain = Vec::new();
70
+ for q in &queries {
71
+ let mut db = Mnemo::open(&path, PASSPHRASE).expect("open");
72
+ let t = Instant::now();
73
+ std::hint::black_box(db.recall(&req(q)).expect("recall"));
74
+ plain.push(t.elapsed().as_secs_f64() * 1e3);
75
+ }
76
+ let mut out = serde_json::Map::new();
77
+ for (k, v) in stages {
78
+ out.insert(k.into(), serde_json::json!(median(v)));
79
+ }
80
+ out.insert(
81
+ "first_recall_plain_ms".into(),
82
+ serde_json::json!(median(plain)),
83
+ );
84
+ out.insert("cycles".into(), serde_json::json!(cycles));
85
+ println!("{}", serde_json::Value::Object(out));
86
+ }
@@ -240,7 +240,9 @@ mnemo list --format jsonl
240
240
  mnemo export --git
241
241
  ```
242
242
 
243
- - `mnemo inspect` opens a read-only view of the brain in your browser.
243
+ - `mnemo inspect` opens a read-only view of the brain in your browser,
244
+ with the review findings and tasks in tabs of their own, and a date
245
+ range on each.
244
246
  - `mnemo export` writes the brain as readable text (it isn't encrypted;
245
247
  keep it private).
246
248
  - `mnemo mcp install --client cursor` adds the MCP server to one client by
@@ -395,7 +397,9 @@ only against a published release tag (`--ref v0.18.0`), so verified means
395
397
  shipped. `mnemo export --git` leaves it out until then, so an unfixed one
396
398
  never reaches a backup you commit. Anything else that refers to an
397
399
  unverified one (a task, a fact, an essence item, a commit, a PR) names it
398
- by its id only.
400
+ by its id only. Dispatch a fix as a task with `--ref <id>` (`task add "Fix
401
+ RB-014.1" --ref RB-014.1`): the backup leaves that task out too until the
402
+ finding is verified.
399
403
 
400
404
  ```json mcp
401
405
  {"name": "finding", "arguments": {"op": "list", "status": "open"}}
@@ -22,12 +22,16 @@
22
22
  //! out, and so is a `SECURITY` finding until it's `verified`: the backup
23
23
  //! may be public, and an unfixed security finding never is. The Markdown
24
24
  //! header names the build that wrote it.
25
+ //! - v0.18.1: a task whose refs name a `SECURITY` finding that isn't
26
+ //! verified is left out too, until the finding is verified. A ref to an
27
+ //! id the brain doesn't have doesn't hide the task.
25
28
  //!
26
29
  //! The same unchanged file exports to the same bytes, and one new memory
27
30
  //! adds only its own lines. A new version of a keyed fact also changes the
28
31
  //! line of the version it supersedes (its `_mnemo.superseded_by` and
29
32
  //! `_mnemo.invalid_at`).
30
33
 
34
+ use std::collections::BTreeSet;
31
35
  use std::io::Write;
32
36
 
33
37
  use mnemo_engine::{
@@ -51,6 +55,47 @@ pub struct ExportOptions {
51
55
  pub git: bool,
52
56
  pub types: Option<Vec<MemoryType>>,
53
57
  pub agent: Option<String>,
58
+ /// v0.18.1: the `SECURITY` findings that aren't verified, by
59
+ /// [`finding_id_key`], from every record (they're private, so they've
60
+ /// left the list before [`select`] sees it). With `--git`, a task whose
61
+ /// refs name one is left out.
62
+ pub held: BTreeSet<(String, u64, u64)>,
63
+ }
64
+
65
+ /// A finding's id as its prefix and numbers (`RB-014.1` and `RB-14.1` are
66
+ /// the same finding), or `None` for a string that isn't one.
67
+ pub fn finding_id_key(id: &str) -> Option<(String, u64, u64)> {
68
+ let (prefix, rest) = id.trim().split_once('-')?;
69
+ let (a, b) = rest.split_once('.')?;
70
+ let digits = |s: &str| !s.is_empty() && s.bytes().all(|c| c.is_ascii_digit());
71
+ if prefix.is_empty()
72
+ || !prefix.bytes().all(|c| c.is_ascii_uppercase())
73
+ || !digits(a)
74
+ || !digits(b)
75
+ {
76
+ return None;
77
+ }
78
+ Some((prefix.to_string(), a.parse().ok()?, b.parse().ok()?))
79
+ }
80
+
81
+ /// v0.18.1: the `SECURITY` findings among `all` that aren't verified.
82
+ pub fn held_findings(all: &[Memory]) -> BTreeSet<(String, u64, u64)> {
83
+ all.iter()
84
+ .filter_map(mnemo_engine::Finding::from_memory)
85
+ .filter(|f| f.category == "SECURITY" && f.status != mnemo_engine::finding_status::VERIFIED)
86
+ .filter_map(|f| finding_id_key(&f.id))
87
+ .collect()
88
+ }
89
+
90
+ /// v0.18.1: whether a task's refs name a held finding.
91
+ fn refs_held(m: &Memory, held: &BTreeSet<(String, u64, u64)>) -> bool {
92
+ !held.is_empty()
93
+ && mnemo_engine::Task::from_memory(m).is_some_and(|t| {
94
+ t.refs
95
+ .iter()
96
+ .filter_map(|r| finding_id_key(r))
97
+ .any(|k| held.contains(&k))
98
+ })
54
99
  }
55
100
 
56
101
  /// What the file says about itself, for the Markdown header.
@@ -188,6 +233,7 @@ pub fn select(mut all: Vec<Memory>, o: &ExportOptions) -> Vec<Memory> {
188
233
  all.retain(|m| !done_long_ago(m, now));
189
234
  all.retain(|m| !resolved_long_ago(m, now));
190
235
  all.retain(|m| !kept_out_of_git(m));
236
+ all.retain(|m| !refs_held(m, &o.held));
191
237
  }
192
238
  if let Some(ts) = &o.types {
193
239
  all.retain(|m| ts.contains(&m.memory_type));