mnemo-engine 0.17.2__tar.gz → 0.18.1__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 (93) hide show
  1. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/PKG-INFO +3 -2
  2. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/README.md +2 -1
  3. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/Cargo.lock +3 -3
  4. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/Cargo.toml +1 -1
  5. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/README.md +16 -5
  6. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/guide/guide.md +33 -3
  7. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/bin/mnemo/export.rs +169 -20
  8. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/bin/mnemo/hook.rs +35 -0
  9. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/bin/mnemo/inspect.html +111 -2
  10. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/bin/mnemo/inspect.rs +155 -0
  11. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/bin/mnemo.rs +252 -5
  12. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/lib.rs +9 -0
  13. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/mcp.rs +121 -3
  14. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/memory.rs +61 -4
  15. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/store/coordination.rs +80 -2
  16. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/store/crud.rs +16 -2
  17. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/store/essence.rs +5 -3
  18. mnemo_engine-0.18.1/mnemo/src/store/findings.rs +480 -0
  19. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/store/keyed.rs +4 -0
  20. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/store/mod.rs +2 -0
  21. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo-python/Cargo.lock +2 -2
  22. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo-python/Cargo.toml +1 -1
  23. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo-python/README.md +2 -1
  24. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo-python/src/lib.rs +105 -1
  25. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo-python/test_mnemo.py +54 -0
  26. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/pyproject.toml +1 -1
  27. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/.gitignore +0 -0
  28. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/benches/corpus.rs +0 -0
  29. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/build.rs +0 -0
  30. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/deny.toml +0 -0
  31. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/examples/ann_defaults_v0_6_0.rs +0 -0
  32. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/examples/ann_diagnose.rs +0 -0
  33. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/examples/ann_recall_grid.rs +0 -0
  34. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/examples/ann_recall_grid_v2.rs +0 -0
  35. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/examples/candle_hard.rs +0 -0
  36. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/examples/embedder_server.py +0 -0
  37. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/examples/file_size_breakdown.rs +0 -0
  38. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/examples/open_rss.rs +0 -0
  39. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/examples/quickstart.rs +0 -0
  40. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/examples/ranking_v2.rs +0 -0
  41. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/examples/session.rs +0 -0
  42. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/examples/shared_bench.rs +0 -0
  43. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/examples/thread_profile.rs +0 -0
  44. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/bin/mnemo/mcp_install.rs +0 -0
  45. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/bin/mnemo/onboard.rs +0 -0
  46. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/bin/mnemo/project.rs +0 -0
  47. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/builtin.rs +0 -0
  48. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/cache.rs +0 -0
  49. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/crypto.rs +0 -0
  50. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/embed.rs +0 -0
  51. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/embed_cmd.rs +0 -0
  52. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/error.rs +0 -0
  53. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/format.rs +0 -0
  54. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/freelist.rs +0 -0
  55. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/guide.rs +0 -0
  56. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/ident.rs +0 -0
  57. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/index.rs +0 -0
  58. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/keys/display.rs +0 -0
  59. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/keys/mod.rs +0 -0
  60. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/keys/os_store.rs +0 -0
  61. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/keys/recovery.rs +0 -0
  62. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/keyslot.rs +0 -0
  63. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/mcp/context.rs +0 -0
  64. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/pager.rs +0 -0
  65. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/redact.rs +0 -0
  66. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/result_cache.rs +0 -0
  67. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/session.rs +0 -0
  68. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/shared/call.rs +0 -0
  69. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/shared/fscheck.rs +0 -0
  70. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/shared/lock.rs +0 -0
  71. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/shared/mod.rs +0 -0
  72. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/shared/presence.rs +0 -0
  73. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/shared/sidecar.rs +0 -0
  74. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/store/ann.rs +0 -0
  75. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/store/cache_api.rs +0 -0
  76. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/store/continuation.rs +0 -0
  77. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/store/flush.rs +0 -0
  78. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/store/header_graft_tests.rs +0 -0
  79. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/store/hooks.rs +0 -0
  80. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/store/load.rs +0 -0
  81. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/store/maintenance.rs +0 -0
  82. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/store/open.rs +0 -0
  83. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/store/recall.rs +0 -0
  84. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/store/records.rs +0 -0
  85. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/store/shared.rs +0 -0
  86. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/store/snapshots.rs +0 -0
  87. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/store/threads.rs +0 -0
  88. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/text.rs +0 -0
  89. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/transcript.rs +0 -0
  90. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/veccol.rs +0 -0
  91. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo/src/wal.rs +0 -0
  92. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/mnemo-python/.gitignore +0 -0
  93. {mnemo_engine-0.17.2 → mnemo_engine-0.18.1}/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.17.2
3
+ Version: 0.18.1
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: License :: OSI Approved :: Apache Software License
@@ -242,13 +242,14 @@ 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` |
249
249
  | `claim(topic, ttl=None)` | v0.17: claim a topic for `set_author`'s agent for `ttl` seconds (900 by default, 30 to 86400): `{"status": "claimed", "token", "expires_at"}` or `{"status": "held_by", "agent", "expires_at"}`. Advisory: a record, not a lock |
250
250
  | `renew(topic, token, ttl=None)`, `release(topic, token)`, `check_claim(topic, token)` | v0.17: `{"status": "held", "expires_at"}`, `{"status": "released"}`, or `{"status": "lost"}` when the claim lapsed or another agent holds it (check before anything irreversible) |
251
251
  | `claims()`, `who()`, `touch_presence(role=None, tool=None)` | v0.17: the live claims (`topic`, `holder`, `expires_at`, `lease`); the agents (`agent`, `role`, `tool`, `last_active`, `alive`: `True`, `False` or `None` for unknown, `claims`); record this agent as active (at most once a minute; returns whether it wrote) |
252
+ | `finding_add(id, category, priority, title, body="", *, refs=None)`, `finding_triage(id, status, text)`, `finding_verify(id, ref)`, `findings(status=None, batch=None, category=None, priority=None)`, `finding_get(id)` | v0.18: review findings as dicts (`id`, `batch`, `category`, `priority`, `title`, `body`, `refs`, `author`, `status`, `triage`, `triaged_by`, `verified_ref`, `verified_by`, `created_at`, `history`); an id is unique, and only the allowed transitions are accepted |
252
253
  | `default_agent()`, `set_default_agent(agent)` | v0.17: the agent the manifest names for a write that names none (`_mnemo.default_agent`), or `None`; set it, or clear it with `None` (returns `"updated"` or `"unchanged"`) |
253
254
  | `set_turn_compress_after(secs)` | v9 files: compress thread turns once they're older than `secs` (default 7 days; `0` compresses at write). This handle only |
254
255
  | `memories()` | Enumerate every live (non-deleted, non-expired) memory as a list of dicts |
@@ -228,13 +228,14 @@ 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` |
235
235
  | `claim(topic, ttl=None)` | v0.17: claim a topic for `set_author`'s agent for `ttl` seconds (900 by default, 30 to 86400): `{"status": "claimed", "token", "expires_at"}` or `{"status": "held_by", "agent", "expires_at"}`. Advisory: a record, not a lock |
236
236
  | `renew(topic, token, ttl=None)`, `release(topic, token)`, `check_claim(topic, token)` | v0.17: `{"status": "held", "expires_at"}`, `{"status": "released"}`, or `{"status": "lost"}` when the claim lapsed or another agent holds it (check before anything irreversible) |
237
237
  | `claims()`, `who()`, `touch_presence(role=None, tool=None)` | v0.17: the live claims (`topic`, `holder`, `expires_at`, `lease`); the agents (`agent`, `role`, `tool`, `last_active`, `alive`: `True`, `False` or `None` for unknown, `claims`); record this agent as active (at most once a minute; returns whether it wrote) |
238
+ | `finding_add(id, category, priority, title, body="", *, refs=None)`, `finding_triage(id, status, text)`, `finding_verify(id, ref)`, `findings(status=None, batch=None, category=None, priority=None)`, `finding_get(id)` | v0.18: review findings as dicts (`id`, `batch`, `category`, `priority`, `title`, `body`, `refs`, `author`, `status`, `triage`, `triaged_by`, `verified_ref`, `verified_by`, `created_at`, `history`); an id is unique, and only the allowed transitions are accepted |
238
239
  | `default_agent()`, `set_default_agent(agent)` | v0.17: the agent the manifest names for a write that names none (`_mnemo.default_agent`), or `None`; set it, or clear it with `None` (returns `"updated"` or `"unchanged"`) |
239
240
  | `set_turn_compress_after(secs)` | v9 files: compress thread turns once they're older than `secs` (default 7 days; `0` compresses at write). This handle only |
240
241
  | `memories()` | Enumerate every live (non-deleted, non-expired) memory as a list of dicts |
@@ -1520,7 +1520,7 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
1520
1520
 
1521
1521
  [[package]]
1522
1522
  name = "mnemo-engine"
1523
- version = "0.17.2"
1523
+ version = "0.18.1"
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.17.2"
1564
+ version = "0.18.1"
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.17.2"
1574
+ version = "0.18.1"
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.17.2"
13
+ version = "0.18.1"
14
14
  edition = "2021"
15
15
  rust-version = "1.94"
16
16
  # `benches/corpus.rs` is a shared helper module pulled into real benches
@@ -105,7 +105,9 @@ which would leak into shell history and process listings). Tools exposed:
105
105
  `cache_get_semantic`, and since v0.17 `inbox` (messages between agents:
106
106
  `list`, `read`, `post`, `ack`, as the server's `MNEMO_AGENT` and
107
107
  `MNEMO_ROLE`; `visibility` for private ones), `task` (the shared work queue: `next`, `update`, `add`,
108
- `list`, `get`) and `claim` (`take`, `renew`, `release`, `check`, `who`). A
108
+ `list`, `get`), `claim` (`take`, `renew`, `release`, `check`, `who`) and,
109
+ since v0.18, `finding` (review findings: `add`, `triage`, `verify`, `list`,
110
+ `get`). A
109
111
  `serve --mcp --shared` with `MNEMO_AGENT` holds that agent's presence lock
110
112
  in the sidecar directory for its life, and since v0.17.2 writes its
111
113
  presence record at start, so `who` sees it alive before its first call; it
@@ -980,19 +982,20 @@ cargo run --bin mnemo -- <command>
980
982
  | `import` | Bulk-load memories from a JSON Lines file |
981
983
  | `index` | Build, rebuild, or drop the IVF+PQ index |
982
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 |
983
- | `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 |
984
- | `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) |
985
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) |
986
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) |
987
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) |
988
990
  | `ack [PATH] <ID>` | Ack a message (`unread` to `acked`), with `--note`; `--as` (v0.17) |
989
- | `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) |
990
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) |
991
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) |
992
- | `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) |
993
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) |
994
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) |
995
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) |
998
+ | `finding add <ID> --category C --priority P --title T`, `finding triage <ID> --status S --text T`, `finding verify <ID> --ref R`, `finding list`, `finding get <ID>` | v0.18: review findings as records. A Reviewer adds one under an id (`RB-014.1`: capital letters, `-`, a number, `.`, a number; unique) with a category (SECURITY, CORRECTNESS, PERF, PLAN-REFINEMENT, PRODUCT, DX/DOCS), a priority (HIGH, MEDIUM, LOW, IDEA), a title, `--body` and `--ref`s; the Planner triages it (accepted, deferred, rejected, needs-user); a Reviewer verifies it against a commit or tag (a `SECURITY` finding, only a release tag, and it stays `private` until then). A finding changes only by triage and verification: `update`, `forget` and `essence remove` refuse it, and adding one needs an agent. JSON output has its `record_id`. `list` filters by `--status`, `--batch`, `--category` and `--priority`, ordered by id; `--format table\|json\|jsonl`. Kept out of recall, like tasks |
996
999
  | `default-agent` | Show, set (`--set <id>`) or clear (`--clear`) the agent a write that names none is made for, kept on the manifest (`_mnemo.default_agent`); the CLI and the MCP server use it in place of `default` (v0.17) |
997
1000
  | `search` | Exact nearest-neighbour search (similarity only); no path needed in a git repository (v0.16.1). Since v0.17 it leaves out coordination records, and private ones unless `--visibility` asks |
998
1001
  | `recall` | Multi-signal ranked retrieval (sim + recency + …). Since v0.17 private records only with `--visibility private` (or `all`) |
@@ -1399,6 +1402,14 @@ page, so copy the printed link instead.
1399
1402
  threads (the essence render, and the turn archive on demand), snapshots
1400
1403
  (the restore points `stats` reports) and about (format, recall mode,
1401
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.
1402
1413
  - **It never holds the file.** It reads it once, read-only, and closes it,
1403
1414
  so an agent writing to the file is never blocked. **Reload** in the page
1404
1415
  reads it again (one passphrase derivation). If a writer has the file
@@ -240,7 +240,8 @@ 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.
244
245
  - `mnemo export` writes the brain as readable text (it isn't encrypted;
245
246
  keep it private).
246
247
  - `mnemo mcp install --client cursor` adds the MCP server to one client by
@@ -374,12 +375,41 @@ of one.
374
375
  {"name": "claim", "arguments": {"op": "who"}}
375
376
  ```
376
377
 
378
+ ### Review findings
379
+
380
+ A review's findings are records too. A Reviewer adds each one under an id
381
+ (`RB-014.1`) with a category, a priority and a one-line title: `mnemo
382
+ finding add RB-014.1 --category CORRECTNESS --priority HIGH --title "…"
383
+ --as reviewer-b`. The Planner triages it (`finding triage RB-014.1 --status
384
+ accepted --text "…"`: accepted, deferred, rejected or needs-user), and a
385
+ Reviewer verifies it against a commit or a tag (`finding verify RB-014.1
386
+ --ref abc1234`). `finding list` filters by status, batch, category and
387
+ priority. A Planner's turn says when findings wait for its triage.
388
+
389
+ A finding changes only by triage and verification: `update` and `forget`
390
+ refuse it, and a wrong one is rejected, with why. Adding one needs your
391
+ agent's name (`MNEMO_AGENT` or `--as`). The engine doesn't check who
392
+ triages or verifies; the Planner triages and a Reviewer verifies.
393
+
394
+ A `SECURITY` finding stays private until it's verified, and it's verified
395
+ only against a published release tag (`--ref v0.18.0`), so verified means
396
+ shipped. `mnemo export --git` leaves it out until then, so an unfixed one
397
+ never reaches a backup you commit. Anything else that refers to an
398
+ unverified one (a task, a fact, an essence item, a commit, a PR) names it
399
+ by its id only. Dispatch a fix as a task with `--ref <id>` (`task add "Fix
400
+ RB-014.1" --ref RB-014.1`): the backup leaves that task out too until the
401
+ finding is verified.
402
+
403
+ ```json mcp
404
+ {"name": "finding", "arguments": {"op": "list", "status": "open"}}
405
+ ```
406
+
377
407
  ### How work reaches a session
378
408
 
379
409
  - **Every turn:** the `user-prompt` hook adds a short line when something
380
410
  is new for you (a message, a task ready for your role, a claim of yours
381
- about to lapse, a task you added that's `ready` for your `done`), and
382
- nothing otherwise. Cursor runs it after a tool call, at most once a
411
+ about to lapse, a task you added that's `ready` for your `done`, and for
412
+ a Planner, findings that wait for triage), and nothing otherwise. Cursor runs it after a tool call, at most once a
383
413
  minute.
384
414
  - **When a turn ends,** with `onboard --wake stop`: the Stop hook keeps
385
415
  you going for a pre-approved task for your role or a message to you by
@@ -14,11 +14,24 @@
14
14
  //! - the result cache (and so the embedder-identity record) is never part
15
15
  //! of an export.
16
16
  //!
17
+ //! - v0.18.0 (the backup): review findings come after the tasks, every
18
+ //! status, in their id's order; then the project essence, its open items
19
+ //! by section, then its resolved ones by section, from the last 30 days
20
+ //! only.
21
+ //! - v0.18.0: a thread's essence (one session's working state) is left
22
+ //! out, and so is a `SECURITY` finding until it's `verified`: the backup
23
+ //! may be public, and an unfixed security finding never is. The Markdown
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.
28
+ //!
17
29
  //! The same unchanged file exports to the same bytes, and one new memory
18
30
  //! adds only its own lines. A new version of a keyed fact also changes the
19
31
  //! line of the version it supersedes (its `_mnemo.superseded_by` and
20
32
  //! `_mnemo.invalid_at`).
21
33
 
34
+ use std::collections::BTreeSet;
22
35
  use std::io::Write;
23
36
 
24
37
  use mnemo_engine::{
@@ -42,6 +55,47 @@ pub struct ExportOptions {
42
55
  pub git: bool,
43
56
  pub types: Option<Vec<MemoryType>>,
44
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
+ })
45
99
  }
46
100
 
47
101
  /// What the file says about itself, for the Markdown header.
@@ -84,6 +138,73 @@ fn done_long_ago(m: &Memory, now: i64) -> bool {
84
138
  now - at > mnemo_engine::TASK_DONE_EXPORT_KEEP_SECS
85
139
  }
86
140
 
141
+ /// v0.18.0: a finding's place in the order: its id's prefix and numbers.
142
+ fn finding_order(m: &Memory) -> Option<(String, u64, u64)> {
143
+ mnemo_engine::Finding::from_memory(m).map(|f| f.sort_key())
144
+ }
145
+
146
+ /// v0.18.0: left out of a `--git` export: a thread's essence item, and a
147
+ /// `SECURITY` finding at any status but `verified`.
148
+ fn kept_out_of_git(m: &Memory) -> bool {
149
+ if kind_of(m) == Some(mnemo_engine::MNEMO_META_KIND_ESSENCE)
150
+ && m.metadata.contains_key(mnemo_engine::MNEMO_META_THREAD)
151
+ {
152
+ return true;
153
+ }
154
+ mnemo_engine::Finding::from_memory(m).is_some_and(|f| {
155
+ f.category == "SECURITY" && f.status != mnemo_engine::finding_status::VERIFIED
156
+ })
157
+ }
158
+
159
+ /// v0.18.0: a project essence item (no thread)'s place in the order: the
160
+ /// open items by section, then the resolved ones by section, each by id.
161
+ fn project_essence_order(m: &Memory) -> Option<(bool, usize)> {
162
+ if kind_of(m) != Some(mnemo_engine::MNEMO_META_KIND_ESSENCE)
163
+ || m.metadata.contains_key(mnemo_engine::MNEMO_META_THREAD)
164
+ {
165
+ return None;
166
+ }
167
+ const SECTIONS: [&str; 8] = [
168
+ "intent",
169
+ "conventions",
170
+ "decisions",
171
+ "state",
172
+ "open",
173
+ "next",
174
+ "lessons",
175
+ "timeline",
176
+ ];
177
+ let section = m
178
+ .metadata
179
+ .get(mnemo_engine::MNEMO_META_SECTION)
180
+ .and_then(Value::as_str)
181
+ .and_then(|s| SECTIONS.iter().position(|x| *x == s))
182
+ .unwrap_or(SECTIONS.len());
183
+ Some((is_resolved(m), section))
184
+ }
185
+
186
+ fn is_resolved(m: &Memory) -> bool {
187
+ m.metadata.get("_mnemo.status").and_then(Value::as_str) == Some("resolved")
188
+ }
189
+
190
+ /// v0.18.0: a project essence item resolved more than 30 days ago (by its
191
+ /// last history entry, else when it was last changed).
192
+ fn resolved_long_ago(m: &Memory, now: i64) -> bool {
193
+ if project_essence_order(m).is_none() || !is_resolved(m) {
194
+ return false;
195
+ }
196
+ let at = m
197
+ .metadata
198
+ .get("_mnemo.status_history")
199
+ .and_then(Value::as_array)
200
+ .and_then(|h| h.last())
201
+ .and_then(|e| e.get("at"))
202
+ .and_then(Value::as_i64)
203
+ .or_else(|| m.metadata.get("_mnemo.updated_at").and_then(Value::as_i64))
204
+ .unwrap_or(m.created_at);
205
+ now - at > mnemo_engine::TASK_DONE_EXPORT_KEEP_SECS
206
+ }
207
+
87
208
  fn is_turn(m: &Memory) -> bool {
88
209
  m.metadata.get(MNEMO_META_KIND).and_then(Value::as_str) == Some(MNEMO_META_KIND_TURN)
89
210
  }
@@ -99,10 +220,20 @@ pub fn select(mut all: Vec<Memory>, o: &ExportOptions) -> Vec<Memory> {
99
220
  let now = std::time::SystemTime::now()
100
221
  .duration_since(std::time::UNIX_EPOCH)
101
222
  .map_or(0, |d| d.as_secs() as i64);
223
+ // Tests shift the clock (dev-hooks builds only), as for coordination.
224
+ #[cfg(feature = "dev-hooks")]
225
+ let now = now
226
+ + std::env::var("MNEMO_DEV_CLOCK_OFFSET")
227
+ .ok()
228
+ .and_then(|v| v.parse::<i64>().ok())
229
+ .unwrap_or(0);
102
230
  all.retain(|m| !matches!(kind_of(m), Some("claim" | "presence")));
103
231
  if o.git {
104
232
  all.retain(|m| kind_of(m) != Some("message"));
105
233
  all.retain(|m| !done_long_ago(m, now));
234
+ all.retain(|m| !resolved_long_ago(m, now));
235
+ all.retain(|m| !kept_out_of_git(m));
236
+ all.retain(|m| !refs_held(m, &o.held));
106
237
  }
107
238
  if let Some(ts) = &o.types {
108
239
  all.retain(|m| ts.contains(&m.memory_type));
@@ -112,19 +243,25 @@ pub fn select(mut all: Vec<Memory>, o: &ExportOptions) -> Vec<Memory> {
112
243
  }
113
244
  if o.git {
114
245
  all.retain(|m| !is_turn(m));
115
- // Keyed memories in key order, then tasks in slug order, then the
116
- // rest, each by id.
117
- all.sort_by(|a, b| {
118
- let ka = key_of(a);
119
- let kb = key_of(b);
120
- let (ta, tb) = (task_slug(a), task_slug(b));
121
- (ka.is_none(), ka, ta.is_none(), ta, a.id).cmp(&(
122
- kb.is_none(),
123
- kb,
124
- tb.is_none(),
125
- tb,
126
- b.id,
127
- ))
246
+ // Keyed memories in key order, then tasks in slug order, then
247
+ // findings in id order, then the project essence by section (open
248
+ // before resolved), then the rest, each by id.
249
+ all.sort_by_cached_key(|m| {
250
+ let key = key_of(m).map(str::to_string);
251
+ let task = task_slug(m).map(str::to_string);
252
+ let finding = finding_order(m);
253
+ let essence = project_essence_order(m);
254
+ (
255
+ key.is_none(),
256
+ key,
257
+ task.is_none(),
258
+ task,
259
+ finding.is_none(),
260
+ finding,
261
+ essence.is_none(),
262
+ essence,
263
+ m.id,
264
+ )
128
265
  });
129
266
  } else {
130
267
  all.sort_by_key(|m| m.id);
@@ -257,17 +394,29 @@ fn record(m: &Memory, git: bool) -> Map<String, Value> {
257
394
  fn markdown(memories: &[Memory], o: &ExportOptions, facts: &FileFacts) -> String {
258
395
  let mut out = String::new();
259
396
  out.push_str("# mnemo export\n\n");
260
- out.push_str(&format!(
261
- "Plaintext export of a `.mnemo` file (format v{}, {} dimensions). \
262
- Keep it as safe as the file's passphrase.\n\n",
263
- facts.format_version, facts.dimensions
264
- ));
265
397
  if o.git {
398
+ // RB-014: what the file is, which build wrote it, and what's left
399
+ // out, so a review of the commit can check all three.
400
+ out.push_str(&format!(
401
+ "The brain's backup, written by mnemo {} with `--git` to be committed \
402
+ beside the project, from a `.mnemo` file (format v{}, {} dimensions). \
403
+ It's plaintext: read the diff before committing.\n\n",
404
+ env!("CARGO_PKG_VERSION"),
405
+ facts.format_version,
406
+ facts.dimensions
407
+ ));
266
408
  out.push_str(
267
- "Written with `--git`: ordered by key, then id; vectors, thread turns \
268
- and access stats are left out.\n",
409
+ "Keyed memories by key, then tasks, findings and the project essence, \
410
+ then the rest by id. Left out: vectors, thread turns, thread essence, \
411
+ messages, claims, presence, private records, access stats, and \
412
+ security findings until they're verified against a release.\n",
269
413
  );
270
414
  } else {
415
+ out.push_str(&format!(
416
+ "Plaintext export of a `.mnemo` file (format v{}, {} dimensions). \
417
+ Keep it as safe as the file's passphrase.\n\n",
418
+ facts.format_version, facts.dimensions
419
+ ));
271
420
  out.push_str(&format!(
272
421
  "{} {}. Vectors are left out.\n",
273
422
  memories.len(),
@@ -713,6 +713,27 @@ fn your_work(db: &mut Mnemo) -> String {
713
713
  }
714
714
  }
715
715
  }
716
+ // v0.18.0: for a Planner, the findings that wait for its triage.
717
+ if role.as_deref() == Some("planner") {
718
+ let open = mnemo_engine::FindingFilter {
719
+ status: Some(mnemo_engine::finding_status::OPEN.into()),
720
+ ..Default::default()
721
+ };
722
+ if let Ok(fs) = db.findings(&open) {
723
+ if !fs.is_empty() {
724
+ sections.push((
725
+ format!(
726
+ "{} {} for triage (call `finding` with `list`, then `triage`):",
727
+ fs.len(),
728
+ plural(fs.len(), "finding waits", "findings wait")
729
+ ),
730
+ fs.iter()
731
+ .map(|f| format!("- {}: {}", esc(&f.id), esc(&f.title)))
732
+ .collect(),
733
+ ));
734
+ }
735
+ }
736
+ }
716
737
  // Its own tasks' claims about to lapse.
717
738
  if let Some(a) = &agent {
718
739
  if let Ok(claims) = db.claims() {
@@ -1030,6 +1051,13 @@ pub fn turn_text(work: &mnemo_engine::NewWork, now: i64) -> String {
1030
1051
  "tasks ready for your `done`",
1031
1052
  ));
1032
1053
  }
1054
+ if !work.findings.is_empty() {
1055
+ counts.push(n(
1056
+ work.findings.len(),
1057
+ "finding waits for triage",
1058
+ "findings wait for triage",
1059
+ ));
1060
+ }
1033
1061
  // What to call, for only what the counts hold (ONBOARD-UX).
1034
1062
  let mut calls = Vec::new();
1035
1063
  let it = |k: usize, one: &'static str, many: &'static str| if k == 1 { one } else { many };
@@ -1055,6 +1083,10 @@ pub fn turn_text(work: &mnemo_engine::NewWork, now: i64) -> String {
1055
1083
  if !work.ready_for_done.is_empty() {
1056
1084
  calls.push("Call `task` with `list`, then `update --status done`.".to_string());
1057
1085
  }
1086
+ // v0.18.0: fixed text; the ids and titles are items, after the framing.
1087
+ if !work.findings.is_empty() {
1088
+ calls.push("Call `finding` with `list`, then `triage`.".to_string());
1089
+ }
1058
1090
  let head = format!(
1059
1091
  "mnemo: new for you: {}. {}\n{}",
1060
1092
  counts.join(", "),
@@ -1072,6 +1104,9 @@ pub fn turn_text(work: &mnemo_engine::NewWork, now: i64) -> String {
1072
1104
  esc(&t.title)
1073
1105
  ));
1074
1106
  }
1107
+ for f in &work.findings {
1108
+ items.push(format!("- finding {}: {}", esc(&f.id), esc(&f.title)));
1109
+ }
1075
1110
  for c in &work.lapsing {
1076
1111
  items.push(format!(
1077
1112
  "- your claim {} lapses in {} min",