minnimemory 1.2.0 → 1.2.1

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,44 @@
3
3
  All notable changes to the `minnimemory` package. Dates are publish dates; an entry that has not
4
4
  been published yet says `unreleased` and gets its date on the day it goes out.
5
5
 
6
+ ## 1.2.1 - 2026-10-09
7
+
8
+ - New: `init` and `doctor` name any loaded `CLAUDE.md` saved as UTF-16. Claude Code reads such a
9
+ file as plain text and does not follow its `@` imports, so the files it imports never load.
10
+ Save it as UTF-8.
11
+ - Fixed: a small dated or status section merged with the small sections around it, and the
12
+ merged file took the "volatile" reason, so rules and how-tos were filed under the `__history`
13
+ piece, where an agent looking for a rule does not open. Volatile text now never shares a file
14
+ with anything else. On the example `CLAUDE.md` the rules get their own `__detail` piece: one
15
+ more list line, so the always-loaded part is 389 tokens, not 363 (Memory Size Test).
16
+ - Fixed: for a memory folder whose path holds `$`, `` ` ``, `"`, `%` or `!`, the apply and undo
17
+ commands from Claude Code name the folder `.`, but the reply did not say to run them from inside
18
+ it, and run from there they found no `init` record. The reply now says where to run, and the
19
+ record is found by its memory folder.
20
+ - Fixed: a re-apply dropped OnDemandMemory list lines whose file had been deleted, and the whole
21
+ list when none was left, without a word. It now names each dropped line.
22
+ - Fixed: a `manifest.json` that is there but was refused (a path it may not hold, a hand edit)
23
+ was reported as "missing or unreadable". Messages now say which: missing, not valid JSON, or
24
+ refused.
25
+ - Fixed: `npm publish` warned that the `bin` entry was cleaned; it is now written the way npm
26
+ wants it.
27
+ - New: `minnimemory uninstall` (the same as `install --remove`) removes the MCP registration and
28
+ both hooks, lists the folders still compiled with the `undo` command for each, and says what it
29
+ keeps. Documented in the README and the guide.
30
+ - Fixed: `install --remove` and `install` treated any `node "<path>" drift` or `loaded` hook as
31
+ ours, so they could remove or repoint another tool's hook. A hook is ours only when its path
32
+ names minnimemory (or its package.json does).
33
+ - Fixed: a second `install --remove` exited 1 on "No MCP server named minnimemory"; it now says
34
+ nothing is registered and exits 0.
35
+ - Fix: pointing `apply` at a memory index (`MEMORY.md`) now suggests `init` on the folder, not
36
+ `doctor`, which refuses before `init` has run.
37
+ - New: `apply` on a project keeps the record it ran with in the repo, in
38
+ `.minnimemory/discovery.json` beside `manifest.json`, committed with it. A fresh clone (a CI
39
+ runner, a teammate) has no `init` record of its own, so `doctor` and a re-apply now read this
40
+ one and say so. It lists the always-loaded files inside the project, relative to it: nothing
41
+ from your home folder or your Claude config, and not `CLAUDE.local.md`. This machine's own
42
+ record still wins. `undo` removes it.
43
+
6
44
  ## 1.2.0 - 2026-10-08
7
45
 
8
46
  - Fixed: undoing a sorted memory folder with 1.1.0 restored the files but left your user
package/README.md CHANGED
@@ -31,24 +31,25 @@ $ npx -y minnimemory init .
31
31
  the prompt cache every time
32
32
  ...2 more findings...
33
33
 
34
- always-loaded, files this plan rewrites: 897 -> 363 tokens (-59.5%)
34
+ always-loaded, files this plan rewrites: 897 -> 389 tokens (-56.6%)
35
35
  best case: kept only on turns that open none of the moved files. Measured on another memory with an agent that can read and search, whole sessions cost 24.0% less and answers held (judge 76 of 81 vs 74 for the original; ledger 2026-10-06).
36
- verdict: compile. Every turn with no routed file open saves 534 tokens; a turn with every
37
- routed file open (615 tokens) costs 81 more than today. It pays unless routed text is open
36
+ verdict: compile. Every turn with no routed file open saves 508 tokens; a turn with every
37
+ routed file open (613 tokens) costs 105 more than today. It pays unless routed text is open
38
38
  on nearly every turn.
39
39
 
40
40
  operations:
41
- write .minnimemory/.gitignore +4 -0
42
- copy 1 file(s) -> .minnimemory/original/ (CLAUDE.md)
43
- write .claude/OnDemandMemory/CLAUDE__history.md +53 -0
44
- write CLAUDE.md +6 -47
41
+ write .minnimemory/.gitignore +5 -0
42
+ copy 1 file(s) -> .minnimemory/original/ (CLAUDE.md -> CLAUDE.md.bak)
43
+ write .claude/OnDemandMemory/CLAUDE__history.md +28 -0
44
+ write .claude/OnDemandMemory/CLAUDE__detail.md +28 -0
45
+ write CLAUDE.md +7 -47
45
46
  ...
46
47
 
47
- plan: e36132de24a037c0
48
+ plan: 7eb0e22e815143d0
48
49
  dry run, nothing written. To write these files, run:
49
- npx -y minnimemory apply --plan e36132de24a037c0 --budget 2000 .
50
+ npx -y minnimemory apply --plan 7eb0e22e815143d0 --budget 2000 .
50
51
 
51
- $ npx -y minnimemory apply --plan e36132de24a037c0 --budget 2000 .
52
+ $ npx -y minnimemory apply --plan 7eb0e22e815143d0 --budget 2000 .
52
53
  5 file(s) written; originals are under .minnimemory/. Undo any time: npx -y minnimemory undo .
53
54
 
54
55
  $ npx -y minnimemory doctor
@@ -421,13 +422,30 @@ add` line above, turns on the drift notice hook, and prints the next step.
421
422
  | `--dry-run` | print the command without running it, exit 0 |
422
423
  | `--force` | remove an existing registration first, then re-add |
423
424
  | `--no-hook` | skip the drift notice hook (on by default) |
424
- | `--remove` | remove the MCP registration and the drift hook `install` added |
425
+ | `--remove` | remove the MCP registration and both hooks `install` added; the same as `minnimemory uninstall` |
425
426
  | `--host <name>` | `cursor`, `windsurf` or `json`: print the `mcpServers` snippet to paste (and the config file for Cursor and Windsurf) instead of registering with Claude Code; no hook |
426
427
 
427
428
  Idempotent: an existing registration is reported, with the command to change it, not duplicated.
428
429
  Without the `claude` CLI on `PATH` it prints the manual line and a JSON snippet instead, exit 2;
429
430
  if `claude` itself errors, its stderr is printed, exit 1.
430
431
 
432
+ ### `minnimemory uninstall`
433
+
434
+ Takes out what `install` added: the MCP registration (`claude mcp remove minnimemory`) and the two
435
+ hooks in your Claude `settings.json`. Every other hook and setting stays, including another tool's
436
+ hook that happens to look like ours. `--dry-run` shows the removals first; `--scope` matches the
437
+ one you installed with. Running it twice is harmless.
438
+
439
+ ```
440
+ npx -y minnimemory uninstall
441
+ ```
442
+
443
+ It does not undo your memory. A compiled folder keeps working as plain markdown without the tool,
444
+ and `uninstall` lists each one still compiled with its `undo` command, so run those first if you
445
+ want the originals back. It also leaves `~/.claude/minnimemory/` (the `init` records, the load log
446
+ and any undo backups); delete that yourself once you have checked `undo-backups/`. Restart Claude
447
+ Code afterwards.
448
+
431
449
  ### `minnimemory recall <path> <query...>`
432
450
 
433
451
  Ranks a compiled workspace's OnDemandMemory sections, or a manifest-less memory directory,
@@ -4,7 +4,7 @@ This folder holds fixtures shipped in the npm package. `CLAUDE.md` here is a fic
4
4
  project's memory file, used by the README walkthrough, the test suite, and the npm smoke test.
5
5
 
6
6
  **Try this first:** copy `CLAUDE.md` into an empty directory and run
7
- `npx -y minnimemory doctor` against it, then `apply`, then `undo`. That is the whole loop, on a
7
+ `npx -y minnimemory init .` against it, then `apply`, then `undo`. That is the whole loop, on a
8
8
  file you cannot break, before you point the tool at your own memory.
9
9
 
10
10
  It is not instructions for this repo. Do not edit it without updating the tests that assert
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "minnimemory",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "MinniMemoryMCP: an MCP server that gives an AI coding agent curated memory. Tools audit the agent's memory file, compile it into a small AlwaysOnMemory body plus OnDemandMemory files, serve it back on demand and keep it maintained. Deterministic, lossless, offline. Built by MinniAI.",
5
5
  "type": "module",
6
6
  "mcpName": "io.github.MinniAI-com/minnimemory",
@@ -14,7 +14,7 @@
14
14
  "node": ">=18.3"
15
15
  },
16
16
  "bin": {
17
- "minnimemory": "./pkg/cli.js"
17
+ "minnimemory": "pkg/cli.js"
18
18
  },
19
19
  "main": "./pkg/index.js",
20
20
  "types": "./pkg/index.d.ts",