mnemo-engine 0.17.1__tar.gz → 0.18.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 (93) hide show
  1. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/PKG-INFO +2 -1
  2. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/README.md +1 -0
  3. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/Cargo.lock +3 -3
  4. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/Cargo.toml +1 -1
  5. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/README.md +12 -5
  6. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/guide/guide.md +31 -3
  7. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/bin/mnemo/export.rs +123 -20
  8. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/bin/mnemo/hook.rs +74 -0
  9. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/bin/mnemo/onboard.rs +3 -2
  10. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/bin/mnemo.rs +257 -9
  11. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/builtin.rs +222 -17
  12. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/lib.rs +9 -0
  13. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/mcp/context.rs +12 -4
  14. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/mcp.rs +126 -3
  15. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/memory.rs +65 -4
  16. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/store/coordination.rs +144 -6
  17. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/store/crud.rs +16 -2
  18. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/store/essence.rs +5 -3
  19. mnemo_engine-0.18.0/mnemo/src/store/findings.rs +480 -0
  20. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/store/keyed.rs +4 -0
  21. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/store/mod.rs +2 -0
  22. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/store/records.rs +7 -0
  23. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo-python/Cargo.lock +2 -2
  24. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo-python/Cargo.toml +1 -1
  25. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo-python/README.md +1 -0
  26. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo-python/src/lib.rs +101 -0
  27. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo-python/test_mnemo.py +50 -0
  28. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/pyproject.toml +1 -1
  29. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/.gitignore +0 -0
  30. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/benches/corpus.rs +0 -0
  31. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/build.rs +0 -0
  32. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/deny.toml +0 -0
  33. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/examples/ann_defaults_v0_6_0.rs +0 -0
  34. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/examples/ann_diagnose.rs +0 -0
  35. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/examples/ann_recall_grid.rs +0 -0
  36. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/examples/ann_recall_grid_v2.rs +0 -0
  37. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/examples/candle_hard.rs +0 -0
  38. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/examples/embedder_server.py +0 -0
  39. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/examples/file_size_breakdown.rs +0 -0
  40. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/examples/open_rss.rs +0 -0
  41. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/examples/quickstart.rs +0 -0
  42. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/examples/ranking_v2.rs +0 -0
  43. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/examples/session.rs +0 -0
  44. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/examples/shared_bench.rs +0 -0
  45. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/examples/thread_profile.rs +0 -0
  46. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/bin/mnemo/inspect.html +0 -0
  47. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/bin/mnemo/inspect.rs +0 -0
  48. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/bin/mnemo/mcp_install.rs +0 -0
  49. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/bin/mnemo/project.rs +0 -0
  50. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/cache.rs +0 -0
  51. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/crypto.rs +0 -0
  52. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/embed.rs +0 -0
  53. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/embed_cmd.rs +0 -0
  54. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/error.rs +0 -0
  55. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/format.rs +0 -0
  56. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/freelist.rs +0 -0
  57. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/guide.rs +0 -0
  58. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/ident.rs +0 -0
  59. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/index.rs +0 -0
  60. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/keys/display.rs +0 -0
  61. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/keys/mod.rs +0 -0
  62. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/keys/os_store.rs +0 -0
  63. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/keys/recovery.rs +0 -0
  64. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/keyslot.rs +0 -0
  65. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/pager.rs +0 -0
  66. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/redact.rs +0 -0
  67. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/result_cache.rs +0 -0
  68. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/session.rs +0 -0
  69. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/shared/call.rs +0 -0
  70. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/shared/fscheck.rs +0 -0
  71. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/shared/lock.rs +0 -0
  72. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/shared/mod.rs +0 -0
  73. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/shared/presence.rs +0 -0
  74. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/shared/sidecar.rs +0 -0
  75. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/store/ann.rs +0 -0
  76. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/store/cache_api.rs +0 -0
  77. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/store/continuation.rs +0 -0
  78. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/store/flush.rs +0 -0
  79. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/store/header_graft_tests.rs +0 -0
  80. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/store/hooks.rs +0 -0
  81. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/store/load.rs +0 -0
  82. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/store/maintenance.rs +0 -0
  83. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/store/open.rs +0 -0
  84. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/store/recall.rs +0 -0
  85. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/store/shared.rs +0 -0
  86. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/store/snapshots.rs +0 -0
  87. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/store/threads.rs +0 -0
  88. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/text.rs +0 -0
  89. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/transcript.rs +0 -0
  90. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/veccol.rs +0 -0
  91. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo/src/wal.rs +0 -0
  92. {mnemo_engine-0.17.1 → mnemo_engine-0.18.0}/mnemo-python/.gitignore +0 -0
  93. {mnemo_engine-0.17.1 → mnemo_engine-0.18.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.17.1
3
+ Version: 0.18.0
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: License :: OSI Approved :: Apache Software License
@@ -249,6 +249,7 @@ db.notices() # what the handle warns about (also raised as UserWarning at open)
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 |
@@ -235,6 +235,7 @@ db.notices() # what the handle warns about (also raised as UserWarning at open)
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.1"
1523
+ version = "0.18.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.17.1"
1564
+ version = "0.18.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.17.1"
1574
+ version = "0.18.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.17.1"
13
+ version = "0.18.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
@@ -105,10 +105,13 @@ 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
- in the sidecar directory for its life, so `who` sees it alive; it never
111
- holds the brain's lock between calls. Since v0.17, `recall` and `about` take `visibility` (private records only when asked), and `about` with `stale: true` lists the stale records. Every mutation flushes before
112
+ in the sidecar directory for its life, and since v0.17.2 writes its
113
+ presence record at start, so `who` sees it alive before its first call; it
114
+ never holds the brain's lock between calls. Since v0.17, `recall` and `about` take `visibility` (private records only when asked), and `about` with `stale: true` lists the stale records. Every mutation flushes before
112
115
  returning.
113
116
 
114
117
  With no `--embed-cmd`, the server embeds `text` with the built-in embedder
@@ -139,7 +142,7 @@ On `initialize`, the server sends the guide's card as its `instructions`
139
142
 
140
143
  | Resource | What it holds | Limit |
141
144
  |---|---|---|
142
- | `mnemo://about` | The card, then the brain's briefing (the manifest and onboarding memories) and the project essence | 8,000 bytes |
145
+ | `mnemo://about` | The card, then the counts (as `mnemo about`'s header, since v0.17.2), the brain's briefing (the manifest and onboarding memories) and the project essence | 8,000 bytes |
143
146
  | `mnemo://recent` | The 20 most recently written memories, newest first, a line each | 6,000 bytes |
144
147
  | `mnemo://guide` | The whole guide | Its size |
145
148
  | `mnemo://key/{key}` (a template) | A key's live value, then its earlier versions | 4,000 bytes |
@@ -391,6 +394,9 @@ mnemo cache purge agent.mnemo --ns llm --expired
391
394
  mnemo cache delete agent.mnemo --ns llm --key prompt-42
392
395
  ```
393
396
 
397
+ Since v0.17.2 the path may be left out in a git repository, as with `get`:
398
+ `mnemo cache get --ns llm --key prompt-42` uses this project's brain.
399
+
394
400
  **MCP:** `mnemo serve --mcp` exposes `cache_put`, `cache_get`,
395
401
  `cache_stats`, `cache_put_semantic`, and `cache_get_semantic` as
396
402
  tools (Phase 10.4) — any MCP-compatible agent can drive the cache
@@ -976,7 +982,7 @@ cargo run --bin mnemo -- <command>
976
982
  | `import` | Bulk-load memories from a JSON Lines file |
977
983
  | `index` | Build, rebuild, or drop the IVF+PQ index |
978
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 |
979
- | `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 |
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 |
980
986
  | `inspect` | Browse the file in a local, read-only web view (memories, keyed history, threads and essence, snapshots, about) |
981
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) |
982
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,6 +995,7 @@ cargo run --bin mnemo -- <command>
989
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) |
990
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) |
991
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 |
992
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) |
993
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 |
994
1001
  | `recall` | Multi-signal ranked retrieval (sim + recency + …). Since v0.17 private records only with `--visibility private` (or `all`) |
@@ -374,15 +374,43 @@ of one.
374
374
  {"name": "claim", "arguments": {"op": "who"}}
375
375
  ```
376
376
 
377
+ ### Review findings
378
+
379
+ A review's findings are records too. A Reviewer adds each one under an id
380
+ (`RB-014.1`) with a category, a priority and a one-line title: `mnemo
381
+ finding add RB-014.1 --category CORRECTNESS --priority HIGH --title "…"
382
+ --as reviewer-b`. The Planner triages it (`finding triage RB-014.1 --status
383
+ accepted --text "…"`: accepted, deferred, rejected or needs-user), and a
384
+ Reviewer verifies it against a commit or a tag (`finding verify RB-014.1
385
+ --ref abc1234`). `finding list` filters by status, batch, category and
386
+ priority. A Planner's turn says when findings wait for its triage.
387
+
388
+ A finding changes only by triage and verification: `update` and `forget`
389
+ refuse it, and a wrong one is rejected, with why. Adding one needs your
390
+ agent's name (`MNEMO_AGENT` or `--as`). The engine doesn't check who
391
+ triages or verifies; the Planner triages and a Reviewer verifies.
392
+
393
+ A `SECURITY` finding stays private until it's verified, and it's verified
394
+ only against a published release tag (`--ref v0.18.0`), so verified means
395
+ shipped. `mnemo export --git` leaves it out until then, so an unfixed one
396
+ never reaches a backup you commit. Anything else that refers to an
397
+ unverified one (a task, a fact, an essence item, a commit, a PR) names it
398
+ by its id only.
399
+
400
+ ```json mcp
401
+ {"name": "finding", "arguments": {"op": "list", "status": "open"}}
402
+ ```
403
+
377
404
  ### How work reaches a session
378
405
 
379
406
  - **Every turn:** the `user-prompt` hook adds a short line when something
380
407
  is new for you (a message, a task ready for your role, a claim of yours
381
- about to lapse), and nothing otherwise. Cursor runs it after a tool
382
- call, at most once a minute.
408
+ about to lapse, a task you added that's `ready` for your `done`, and for
409
+ a Planner, findings that wait for triage), and nothing otherwise. Cursor runs it after a tool call, at most once a
410
+ minute.
383
411
  - **When a turn ends,** with `onboard --wake stop`: the Stop hook keeps
384
412
  you going for a pre-approved task for your role or a message to you by
385
- name. It's off by default.
413
+ name, never for a task that waits for your `done`. It's off by default.
386
414
  - **In Claude Code, wake a peer yourself:** after you post or add a task,
387
415
  send the session a short pointer with Claude Code's `SendMessage` ("new
388
416
  work in your inbox"). The inbox is the record, and the message is only
@@ -14,6 +14,15 @@
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
+ //!
17
26
  //! The same unchanged file exports to the same bytes, and one new memory
18
27
  //! adds only its own lines. A new version of a keyed fact also changes the
19
28
  //! line of the version it supersedes (its `_mnemo.superseded_by` and
@@ -84,6 +93,73 @@ fn done_long_ago(m: &Memory, now: i64) -> bool {
84
93
  now - at > mnemo_engine::TASK_DONE_EXPORT_KEEP_SECS
85
94
  }
86
95
 
96
+ /// v0.18.0: a finding's place in the order: its id's prefix and numbers.
97
+ fn finding_order(m: &Memory) -> Option<(String, u64, u64)> {
98
+ mnemo_engine::Finding::from_memory(m).map(|f| f.sort_key())
99
+ }
100
+
101
+ /// v0.18.0: left out of a `--git` export: a thread's essence item, and a
102
+ /// `SECURITY` finding at any status but `verified`.
103
+ fn kept_out_of_git(m: &Memory) -> bool {
104
+ if kind_of(m) == Some(mnemo_engine::MNEMO_META_KIND_ESSENCE)
105
+ && m.metadata.contains_key(mnemo_engine::MNEMO_META_THREAD)
106
+ {
107
+ return true;
108
+ }
109
+ mnemo_engine::Finding::from_memory(m).is_some_and(|f| {
110
+ f.category == "SECURITY" && f.status != mnemo_engine::finding_status::VERIFIED
111
+ })
112
+ }
113
+
114
+ /// v0.18.0: a project essence item (no thread)'s place in the order: the
115
+ /// open items by section, then the resolved ones by section, each by id.
116
+ fn project_essence_order(m: &Memory) -> Option<(bool, usize)> {
117
+ if kind_of(m) != Some(mnemo_engine::MNEMO_META_KIND_ESSENCE)
118
+ || m.metadata.contains_key(mnemo_engine::MNEMO_META_THREAD)
119
+ {
120
+ return None;
121
+ }
122
+ const SECTIONS: [&str; 8] = [
123
+ "intent",
124
+ "conventions",
125
+ "decisions",
126
+ "state",
127
+ "open",
128
+ "next",
129
+ "lessons",
130
+ "timeline",
131
+ ];
132
+ let section = m
133
+ .metadata
134
+ .get(mnemo_engine::MNEMO_META_SECTION)
135
+ .and_then(Value::as_str)
136
+ .and_then(|s| SECTIONS.iter().position(|x| *x == s))
137
+ .unwrap_or(SECTIONS.len());
138
+ Some((is_resolved(m), section))
139
+ }
140
+
141
+ fn is_resolved(m: &Memory) -> bool {
142
+ m.metadata.get("_mnemo.status").and_then(Value::as_str) == Some("resolved")
143
+ }
144
+
145
+ /// v0.18.0: a project essence item resolved more than 30 days ago (by its
146
+ /// last history entry, else when it was last changed).
147
+ fn resolved_long_ago(m: &Memory, now: i64) -> bool {
148
+ if project_essence_order(m).is_none() || !is_resolved(m) {
149
+ return false;
150
+ }
151
+ let at = m
152
+ .metadata
153
+ .get("_mnemo.status_history")
154
+ .and_then(Value::as_array)
155
+ .and_then(|h| h.last())
156
+ .and_then(|e| e.get("at"))
157
+ .and_then(Value::as_i64)
158
+ .or_else(|| m.metadata.get("_mnemo.updated_at").and_then(Value::as_i64))
159
+ .unwrap_or(m.created_at);
160
+ now - at > mnemo_engine::TASK_DONE_EXPORT_KEEP_SECS
161
+ }
162
+
87
163
  fn is_turn(m: &Memory) -> bool {
88
164
  m.metadata.get(MNEMO_META_KIND).and_then(Value::as_str) == Some(MNEMO_META_KIND_TURN)
89
165
  }
@@ -99,10 +175,19 @@ pub fn select(mut all: Vec<Memory>, o: &ExportOptions) -> Vec<Memory> {
99
175
  let now = std::time::SystemTime::now()
100
176
  .duration_since(std::time::UNIX_EPOCH)
101
177
  .map_or(0, |d| d.as_secs() as i64);
178
+ // Tests shift the clock (dev-hooks builds only), as for coordination.
179
+ #[cfg(feature = "dev-hooks")]
180
+ let now = now
181
+ + std::env::var("MNEMO_DEV_CLOCK_OFFSET")
182
+ .ok()
183
+ .and_then(|v| v.parse::<i64>().ok())
184
+ .unwrap_or(0);
102
185
  all.retain(|m| !matches!(kind_of(m), Some("claim" | "presence")));
103
186
  if o.git {
104
187
  all.retain(|m| kind_of(m) != Some("message"));
105
188
  all.retain(|m| !done_long_ago(m, now));
189
+ all.retain(|m| !resolved_long_ago(m, now));
190
+ all.retain(|m| !kept_out_of_git(m));
106
191
  }
107
192
  if let Some(ts) = &o.types {
108
193
  all.retain(|m| ts.contains(&m.memory_type));
@@ -112,19 +197,25 @@ pub fn select(mut all: Vec<Memory>, o: &ExportOptions) -> Vec<Memory> {
112
197
  }
113
198
  if o.git {
114
199
  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
- ))
200
+ // Keyed memories in key order, then tasks in slug order, then
201
+ // findings in id order, then the project essence by section (open
202
+ // before resolved), then the rest, each by id.
203
+ all.sort_by_cached_key(|m| {
204
+ let key = key_of(m).map(str::to_string);
205
+ let task = task_slug(m).map(str::to_string);
206
+ let finding = finding_order(m);
207
+ let essence = project_essence_order(m);
208
+ (
209
+ key.is_none(),
210
+ key,
211
+ task.is_none(),
212
+ task,
213
+ finding.is_none(),
214
+ finding,
215
+ essence.is_none(),
216
+ essence,
217
+ m.id,
218
+ )
128
219
  });
129
220
  } else {
130
221
  all.sort_by_key(|m| m.id);
@@ -257,17 +348,29 @@ fn record(m: &Memory, git: bool) -> Map<String, Value> {
257
348
  fn markdown(memories: &[Memory], o: &ExportOptions, facts: &FileFacts) -> String {
258
349
  let mut out = String::new();
259
350
  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
351
  if o.git {
352
+ // RB-014: what the file is, which build wrote it, and what's left
353
+ // out, so a review of the commit can check all three.
354
+ out.push_str(&format!(
355
+ "The brain's backup, written by mnemo {} with `--git` to be committed \
356
+ beside the project, from a `.mnemo` file (format v{}, {} dimensions). \
357
+ It's plaintext: read the diff before committing.\n\n",
358
+ env!("CARGO_PKG_VERSION"),
359
+ facts.format_version,
360
+ facts.dimensions
361
+ ));
266
362
  out.push_str(
267
- "Written with `--git`: ordered by key, then id; vectors, thread turns \
268
- and access stats are left out.\n",
363
+ "Keyed memories by key, then tasks, findings and the project essence, \
364
+ then the rest by id. Left out: vectors, thread turns, thread essence, \
365
+ messages, claims, presence, private records, access stats, and \
366
+ security findings until they're verified against a release.\n",
269
367
  );
270
368
  } else {
369
+ out.push_str(&format!(
370
+ "Plaintext export of a `.mnemo` file (format v{}, {} dimensions). \
371
+ Keep it as safe as the file's passphrase.\n\n",
372
+ facts.format_version, facts.dimensions
373
+ ));
271
374
  out.push_str(&format!(
272
375
  "{} {}. Vectors are left out.\n",
273
376
  memories.len(),
@@ -692,6 +692,48 @@ fn your_work(db: &mut Mnemo) -> String {
692
692
  }
693
693
  }
694
694
  }
695
+ // READY-NOTICE: tasks it created that wait for its `done`.
696
+ if let Some(a) = &agent {
697
+ if let Ok(ts) = db.tasks(Some(mnemo_engine::task_status::READY), None) {
698
+ let mine: Vec<String> = ts
699
+ .iter()
700
+ .filter(|t| &t.creator == a)
701
+ .map(|t| format!("- {}: {}", esc(&t.slug), esc(&t.title)))
702
+ .collect();
703
+ if !mine.is_empty() {
704
+ sections.push((
705
+ format!(
706
+ "{} of your tasks {} for your done (call `task` with `list`, then \
707
+ `update --status done`):",
708
+ mine.len(),
709
+ plural(mine.len(), "waits", "wait")
710
+ ),
711
+ mine,
712
+ ));
713
+ }
714
+ }
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
+ }
695
737
  // Its own tasks' claims about to lapse.
696
738
  if let Some(a) = &agent {
697
739
  if let Ok(claims) = db.claims() {
@@ -1002,6 +1044,20 @@ pub fn turn_text(work: &mnemo_engine::NewWork, now: i64) -> String {
1002
1044
  "claims lapsing soon",
1003
1045
  ));
1004
1046
  }
1047
+ if !work.ready_for_done.is_empty() {
1048
+ counts.push(n(
1049
+ work.ready_for_done.len(),
1050
+ "task ready for your `done`",
1051
+ "tasks ready for your `done`",
1052
+ ));
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
+ }
1005
1061
  // What to call, for only what the counts hold (ONBOARD-UX).
1006
1062
  let mut calls = Vec::new();
1007
1063
  let it = |k: usize, one: &'static str, many: &'static str| if k == 1 { one } else { many };
@@ -1023,6 +1079,14 @@ pub fn turn_text(work: &mnemo_engine::NewWork, now: i64) -> String {
1023
1079
  it(work.lapsing.len(), "its claim", "their claims")
1024
1080
  ));
1025
1081
  }
1082
+ // READY-NOTICE: fixed text; the slugs are items, after the framing.
1083
+ if !work.ready_for_done.is_empty() {
1084
+ calls.push("Call `task` with `list`, then `update --status done`.".to_string());
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
+ }
1026
1090
  let head = format!(
1027
1091
  "mnemo: new for you: {}. {}\n{}",
1028
1092
  counts.join(", "),
@@ -1033,6 +1097,16 @@ pub fn turn_text(work: &mnemo_engine::NewWork, now: i64) -> String {
1033
1097
  for t in &work.tasks {
1034
1098
  items.push(format!("- task {}: {}", esc(&t.slug), esc(&t.title)));
1035
1099
  }
1100
+ for t in &work.ready_for_done {
1101
+ items.push(format!(
1102
+ "- ready for your done: {}: {}",
1103
+ esc(&t.slug),
1104
+ esc(&t.title)
1105
+ ));
1106
+ }
1107
+ for f in &work.findings {
1108
+ items.push(format!("- finding {}: {}", esc(&f.id), esc(&f.title)));
1109
+ }
1036
1110
  for c in &work.lapsing {
1037
1111
  items.push(format!(
1038
1112
  "- your claim {} lapses in {} min",
@@ -1780,7 +1780,8 @@ fn summary_tty(
1780
1780
  }
1781
1781
  }
1782
1782
  println!();
1783
- println!("The guide for agents: `mnemo onboard --guide`");
1783
+ // TTY-BACKTICKS: plain text on a terminal, no Markdown.
1784
+ println!("The guide for agents: mnemo onboard --guide");
1784
1785
  }
1785
1786
 
1786
1787
  /// A step as a sentence: a capital first, a full stop last.
@@ -2109,7 +2110,7 @@ fn run_person(v: &View, o: &Opts, changes: usize) -> Result<(), String> {
2109
2110
  println!();
2110
2111
  if o.print || !interactive() {
2111
2112
  println!(
2112
- "Nothing was written; run `mnemo onboard{} --yes` to write it.",
2113
+ "Nothing was written; run mnemo onboard{} --yes to write it.",
2113
2114
  if o.undo { " --undo" } else { "" }
2114
2115
  );
2115
2116
  if o.print {