counterparts 0.3.23 → 0.3.25

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 (104) hide show
  1. package/CHANGELOG.md +151 -0
  2. package/package.json +1 -1
  3. package/src/adapters/claude-code/CONTRACT.md +8 -1
  4. package/src/adapters/claude-code/NOTES.md +30 -0
  5. package/src/adapters/claude-code/bin/hook.ts +18 -3
  6. package/src/adapters/claude-code/bin/runner.ts +1 -1
  7. package/src/adapters/claude-code/doctor-host.ts +26 -10
  8. package/src/adapters/claude-code/doctor-open.ts +41 -0
  9. package/src/adapters/claude-code/doctor.ts +29 -9
  10. package/src/adapters/claude-code/hooks.ts +25 -10
  11. package/src/adapters/cli/CONTRACT.md +4 -1
  12. package/src/adapters/cli/NOTES.md +8 -0
  13. package/src/adapters/cli/commands-readings.ts +15 -2
  14. package/src/adapters/cli/help.ts +3 -0
  15. package/src/adapters/cli/mechanisms.ts +9 -2
  16. package/src/adapters/cli/uninstall.ts +75 -8
  17. package/src/adapters/cli/wire.ts +239 -18
  18. package/src/adapters/dashboard/registries.ts +4 -0
  19. package/src/adapters/dashboard/web/flow.ts +2 -0
  20. package/src/adapters/dashboard/web/lanes.ts +1 -0
  21. package/src/adapters/dashboard/web/mechanisms/emotional/index.js +8 -5
  22. package/src/adapters/dashboard/web/narrate.ts +72 -13
  23. package/src/adapters/dashboard/web/pages/memories/sections/search.js +2 -2
  24. package/src/adapters/dashboard/web/views/archive-words.ts +2 -0
  25. package/src/adapters/dashboard/web/views/health.ts +7 -3
  26. package/src/adapters/dashboard/web/views/mechanism-panel.ts +39 -5
  27. package/src/adapters/dashboard/web/views/mechanisms.ts +6 -1
  28. package/src/adapters/dashboard/web/views/memories.ts +15 -5
  29. package/src/adapters/dashboard/web/views/memory-words.ts +12 -4
  30. package/src/adapters/dashboard/web/views/memory.ts +17 -8
  31. package/src/adapters/dashboard/web/views/mind.ts +2 -1
  32. package/src/adapters/dashboard/web/views/search.ts +1 -0
  33. package/src/adapters/fired.ts +30 -1
  34. package/src/adapters/host-wiring.ts +26 -5
  35. package/src/adapters/lifecycle.ts +27 -0
  36. package/src/adapters/mcp/CONTRACT.md +7 -3
  37. package/src/adapters/mcp/NOTES.md +7 -0
  38. package/src/adapters/mcp/bin/serve.ts +30 -10
  39. package/src/adapters/mcp/facts.ts +32 -6
  40. package/src/adapters/mcp/server-args.ts +13 -1
  41. package/src/adapters/mcp/server-self-tools.ts +18 -1
  42. package/src/adapters/mcp/server-session-end.ts +93 -6
  43. package/src/adapters/mcp/server-words.ts +20 -2
  44. package/src/adapters/mcp/server.ts +76 -6
  45. package/src/adapters/mcp/tools.ts +65 -15
  46. package/src/adapters/mechanism-evidence.ts +136 -8
  47. package/src/adapters/npm-live.ts +333 -0
  48. package/src/adapters/plugin.ts +42 -14
  49. package/src/adapters/runtime.ts +8 -5
  50. package/src/adapters/sidebar-status.ts +203 -18
  51. package/src/adapters/store-id.ts +35 -3
  52. package/src/core/briefing.ts +31 -8
  53. package/src/core/counterpart-deposit.ts +134 -3
  54. package/src/core/counterpart-events.ts +15 -0
  55. package/src/core/counterpart-types.ts +33 -0
  56. package/src/core/counterpart.ts +220 -12
  57. package/src/core/dream/CONTRACT.md +7 -0
  58. package/src/core/dream/NOTES.md +52 -0
  59. package/src/core/dream/index.ts +19 -6
  60. package/src/core/dream/reflect.ts +262 -13
  61. package/src/core/dream/slices.ts +195 -3
  62. package/src/core/fit/CONTRACT.md +8 -3
  63. package/src/core/fit/index.ts +12 -2
  64. package/src/core/handoff/last-here.ts +18 -6
  65. package/src/core/leaving.ts +3 -0
  66. package/src/core/physics/CONTRACT.md +33 -5
  67. package/src/core/physics/NOTES.md +49 -0
  68. package/src/core/physics/index.ts +93 -19
  69. package/src/core/prospective/NOTES.md +19 -0
  70. package/src/core/recall/CONTRACT.md +12 -1
  71. package/src/core/recall/NOTES.md +63 -0
  72. package/src/core/recall/activate.ts +57 -0
  73. package/src/core/recall/index.ts +43 -4
  74. package/src/core/recall/probe.ts +284 -0
  75. package/src/core/recall/rated.ts +196 -0
  76. package/src/core/recall/session.ts +22 -2
  77. package/src/core/recall/time-ask.ts +22 -0
  78. package/src/core/remember/NOTES.md +10 -0
  79. package/src/core/self/CONTRACT.md +92 -22
  80. package/src/core/self/NOTES.md +139 -0
  81. package/src/core/self/briefing-delivery.ts +47 -10
  82. package/src/core/self/briefing-page.ts +23 -2
  83. package/src/core/self/briefing-room.ts +20 -11
  84. package/src/core/self/briefing.ts +185 -30
  85. package/src/core/self/episodes.ts +44 -45
  86. package/src/core/self/identity.ts +22 -2
  87. package/src/core/self/index.ts +458 -209
  88. package/src/core/self/summaries.ts +177 -0
  89. package/src/core/self/tunables.ts +47 -10
  90. package/src/core/self/work.ts +6 -2
  91. package/src/core/self/writer.ts +98 -2
  92. package/src/core/sleep/CONTRACT.md +4 -1
  93. package/src/core/sleep/decay.ts +54 -3
  94. package/src/core/sleep/index.ts +1 -1
  95. package/src/core/sleep/prune.ts +6 -0
  96. package/src/core/sleep/types.ts +8 -3
  97. package/src/core/sleep/upgrade.ts +3 -2
  98. package/src/core/store/CONTRACT.md +14 -1
  99. package/src/core/store/NOTES.md +15 -0
  100. package/src/core/store/errors.ts +8 -0
  101. package/src/core/store/index.ts +55 -0
  102. package/src/core/store/operational.ts +63 -8
  103. package/src/core/time.ts +38 -0
  104. package/src/core/types.ts +6 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,156 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.25 — 2026-10-16
4
+
5
+ A chapter of the journal is now stood for by one short summary memory instead of a full copy: the `chapter` tool takes a `summary`, the engine writes a short one from the chapter's opening lines when the session gives none, and summaries fade like any other memory while the chapter itself keeps every word. The nightly reflection can propose closing items that have sat in "Still open" for days, and nothing closes until you say yes. The wake is shorter and lists more: long items as one line each, the tags on one line, today's date said once, "Coming up" only what is due today, and the self page written to about 4,600 bytes. Recall reads "in the last month" and "the past 3 months" as rolling windows, and facts' event dates carry their weekday. The plugin's sidebar says where you left off, can be clicked again in a few small ways, and the build from Anthropic's directory stands down beside the npm install. No store-format change (store v13, cache v6) and no wiring change: nothing to run after upgrading from 0.3.24, and `counterparts connect` is not needed.
6
+
7
+ - **The sidebar's fox tries a picture first, everywhere.** Instead of guessing from your
8
+ terminal's name whether it can show pictures, it tries one and lets Claude Code say: where
9
+ the picture can't show, it draws the finer sextant fox in terminals whose fonts have them
10
+ (iTerm2, WezTerm, VS Code, Ghostty, kitty) and the half-block fox elsewhere. It reads four
11
+ environment variables for that, down from seven.
12
+ - **The sidebar keeps its numbers beside an npm install when the plugin is loaded from a
13
+ folder.** A plugin started with `claude --plugin-dir` stands its own server down there, and
14
+ until now nothing told the npm install's processes the sidebar was present, so they deleted
15
+ its status file. The stood-down server now leaves a small marker beside the configuration
16
+ while its session runs (`sidebar-plugin-here`, refreshed every ten minutes, counted for
17
+ thirty, or for up to a day while that server is still running, so a laptop waking from sleep
18
+ keeps the file), and the memory server asks again at each write instead of once at its start.
19
+ - **After a rollback or a snapshot restore the sidebar catches up straight away.** A status
20
+ file written before the store was put back named a later point in the log than the log now
21
+ has, and both the writers and the sidebar kept it until the log caught up. A writer now
22
+ replaces a file that is ahead of the log, and the sidebar accepts an older point in the log
23
+ from the same store when the file is more than five seconds newer.
24
+ - **The store's note of where the sidebar file lives no longer disappears every week.** It is
25
+ touched on every write, so the session-start cleanup keeps it.
26
+ - **The plugin from Anthropic's directory stands down beside the npm install.** It reads none
27
+ of Claude Code's files, so it couldn't tell the npm install was there, and Claude was
28
+ offered every memory tool twice. The npm install now leaves a small note beside its
29
+ configuration, `~/.counterparts/npm-live.json`, when it connects and as its sessions
30
+ start; the plugin's hooks and server stand down while the note is recent and the program
31
+ it names is still installed. `counterparts disconnect` and
32
+ `uninstall` remove it.
33
+ - **Installed twice now recommends keeping one.** The session-start line, the stood-down
34
+ server's note and `counterparts doctor` no longer say "nothing needs to change": both use
35
+ the same memory, so nothing is lost either way, and they name both ways out, `counterparts
36
+ disconnect` (keep the plugin) or `/plugin uninstall counterparts@…` (keep the npm install).
37
+ - **The sidebar says where you left off.** Under the last dream, the sidebar shows the first
38
+ of these that has something: where you left off in this folder ("Last here"), what's
39
+ coming up next (with its date as "Today", "Tomorrow" or "Oct 20"), or what happened
40
+ yesterday. Click it to read all of it, as with the dream. It's the first thing to make room when the session fills the sidebar.
41
+ - **The sidebar's footer stops offering the intro once you've had it,** and while the fox
42
+ shows it says how to hide it: `/counterparts avatar off`.
43
+ - **The "Mechanisms today" bars are on a log scale,** so a mechanism that fired once and one
44
+ that fired a dozen times look different even beside one that fired a hundred times. The
45
+ count beside each bar is unchanged.
46
+ - **The plugin's README says what the sidebar can reach.** A "What it can reach" section
47
+ lists what it reads (the nine environment variables among them), runs, sends and keeps,
48
+ how it treats text other hooks add, and the `claude plugin validate` lines that show it.
49
+ - **A chapter is stood for by a summary, not a full copy.** The `chapter` tool takes a
50
+ `summary`: the memory that stands for the chapter, while the chapter keeps every word. When
51
+ a session gives none, the engine writes a short one from the chapter's opening lines, and a
52
+ summary the session writes later replaces it. Summaries are ordinary memories and fade like
53
+ one; the full copies made before this release stay as they are. Dreams and reflections see a
54
+ busy day's chapters as their summaries, so more of the day fits. Doctor has a `Chapter
55
+ summaries` line: written vs automatic over the week. No store-format change.
56
+ - **The nightly reflection proposes closing stale open items.** It is shown up to five
57
+ memories still open after four lived days untouched, and may propose closing the ones that
58
+ look done; the proposal comes as one question in what it shares. Nothing closes until you
59
+ say yes, and then the reflect tool's new `close` phase closes only what it proposed.
60
+ - **The wake lists more of what's open, coming up and relevant.** A long memory in "How I
61
+ work", "Still open", "Might be relevant" or "Coming up" now shows as one line, its date,
62
+ its title and its id, instead of its whole first paragraph, so many more fit beside the
63
+ self page. The first item of "Still open" and of "Coming up" is still shown in full when
64
+ there's room, and so is a reminder due today. Recall reads any of them in full by its id.
65
+ - **Doctor's Lookups line counts the wake too:** how many of the items it listed as a line a
66
+ session then read in full.
67
+ - **The plugin's sidebar can be clicked again, in a few small ways.** In the terminal,
68
+ "Meet your counterpart" sits at the top while the first meeting is waiting: a click puts `/counterparts:meet` in your
69
+ prompt box, and you press Enter (a draft you are writing is left alone, and the row says so).
70
+ The footer's Dashboard line does the same with `/counterparts:dashboard`. On the terminal,
71
+ COUNTERPARTS ↗ links to the dashboard again; Counterparts now writes the dashboard's address
72
+ into the sidebar's status file for it. The footer's view and avatar switches are back: one
73
+ click closes the pane to quiet, or turns the fox on or off. The plugin directory's build of
74
+ the sidebar is unchanged.
75
+ - **Recall reads "in the last month" as a rolling month.** "In the last month", "the past
76
+ month" and "the past 3 months" (digits or words) now mean back from today, like "the past
77
+ week"; plain "last month" is still the calendar month. Facts' event dates carry their
78
+ weekday ("happened Mon 05-15").
79
+ - **A shorter, roomier wake.** The three tags at the top of a session's memory share one line;
80
+ today's date is said once, on the `Now:` line (the header, "Yesterday" and the page's
81
+ "Last revised" no longer repeat it, and item dates read "Oct 15 (due Oct 18)"); the header
82
+ and the line under it are shorter. "How I work" no longer lists craft memories (they still
83
+ come up when a conversation reaches them), and "Coming up" lists what is due today,
84
+ with one line counting the rest by id (the overdue said so). The self page is now written to about
85
+ 4,600 bytes, with "How I work" as a few short lessons. The room goes to the lists.
86
+
87
+ ## 0.3.24 — 2026-10-14
88
+
89
+ Forgetting now waits: a memory is put away only after 14 lived days under the floor, not 14 days after it was last used, and a release that changes how strength is read starts that wait fresh for everything it lowered. So nothing is archived for the first 14 lived days after you upgrade to this release; archived memories keep their words and stay readable by id. Old claims the claims era lowers now read at today's default all the way down. At the end-of-session ask Claude now also rates the memories it was shown, 0 to 3; the ratings are only recorded and change nothing yet. The `salience` field tells Claude to leave routine work at the default, a faded match is labelled "faded: weak, below reach", closing a reminder closes every memory it moved through, a revision with no title keeps the old one's, and `recall` takes `query` as another name for `question`. With both the plugin and the npm install, uninstalling the plugin and keeping the memories leaves the npm install's memory server and hooks working. The sidebar counts feelings under Emotion. If `/plugin update counterparts@counterparts` does nothing, run `/plugin marketplace update counterparts`, then `/plugin uninstall counterparts@counterparts` and `/plugin install counterparts@counterparts`. These are Claude Code's own plugin commands, not `/counterparts:uninstall`, and your memories in `~/.counterparts` are untouched. No store-format change (store v13, cache v6) and no wiring change: nothing to run after upgrading from 0.3.23, and `counterparts connect` is not needed. Going back to 0.3.23 gives up the wait: it counts 14 days from last use again.
90
+
91
+ - **A memory leaves only after 14 lived days under the floor.** The floor prune used to count
92
+ its 14 days from a memory's last use, so a memory unused for weeks was archived the first
93
+ night it faded under the floor. Now it waits 14 lived days under the floor first, and a
94
+ build that changes how strength is read never archives anything the night it arrives: the
95
+ wait for everything it lowered starts that night, so a store archives nothing for its
96
+ first 14 lived days on this release, whichever release it upgraded from. Archived memories
97
+ still keep their words and stay readable by id.
98
+ - **Old claims now read at today's default all the way down.** A memory written before the
99
+ claims era whose claim the era lowers now reads at that default as a whole, instead of being
100
+ held up by the relevance and predictive scores written alongside the old claim; a quarter
101
+ of the lowered memories were not lowered at all before. Memories the era raises, and the
102
+ ones it leaves alone (the core, the owner's own, protected, a pending or repeating date),
103
+ read as before. No store-format change.
104
+ - **Claude now scores the memories it was shown.** At the end-of-session ask, Claude rates
105
+ each footnote it was shown since it last wrote, and every memory it says it drew on, from
106
+ 0 (noise) to 3 (changed what it did or said). The scores are only recorded: they change
107
+ nothing about any memory yet. `counterparts probe-oq4` prints them by day and by kind of
108
+ showing, beside what the replies actually used.
109
+ - **Routine work is left at the default salience.** The `salience` field on `remember` and
110
+ `session_end` now tells Claude to leave it unset for a routine work event or an ordinary
111
+ work fact unless it changed something, and to claim 0.4 or more only for what struck it
112
+ or changed how it will work, so weak work memories fade on their own. The owner's
113
+ rulings and corrections still stay high.
114
+ - **A faded match is labelled "faded: weak, below reach".** Asking for facts used to label
115
+ it "not used for a long while", which was false for a memory two days old that simply
116
+ started weak. The dashboard's search says the same. Ranking is unchanged.
117
+ - **Closing a reminder closes all of it.** When a memory says a dated thing is done (its
118
+ date dropped, or `status: done`), every earlier or later memory the same reminder moved
119
+ through loses its date too, so one "done" stops it coming back. Other memories nearby
120
+ that still hold a date are listed in the reply, by id and title, so Claude can close
121
+ them in the same step if they are the same thing; they are never closed for it.
122
+ - **A revision keeps its title.** A memory that revises another (`updates`) and has no title
123
+ of its own now takes the old one's, as it already took what it was about, who said it,
124
+ its status and its date. When it closes something (a dated thing done, or any
125
+ `status: done`), the old title would read as still open, so none is carried and the
126
+ reply asks for a title. A confidential memory's title is never carried.
127
+ - **`recall` takes `query` as another name for `question`.** A recall sent with `query`
128
+ used to be refused for having no question; it is now answered as one. A mode is still
129
+ required.
130
+ - **Uninstalling the plugin no longer takes the npm install's memory server with it.** With
131
+ both installed, the plugin's uninstall (keeping the memories) ran `claude mcp remove
132
+ counterparts -s user`, which removed the server the npm install registered. The plugin
133
+ never registers one there, so it now leaves it alone and says so; `counterparts
134
+ uninstall` still removes its own.
135
+ - **Uninstalling the plugin leaves a working npm install's hooks alone too, and cleans up
136
+ after one that is gone.** With both installed, the plugin's uninstall (keeping the
137
+ memories) took the npm install's wake and recall hooks out of `~/.claude/settings.json`.
138
+ It now removes a Counterparts hook or memory server only when the program it runs is no
139
+ longer there, which is what an npm install removed without `counterparts uninstall`
140
+ leaves behind. Run at a terminal, the plugin's uninstall now asks whether to delete the
141
+ memories before it removes anything of the npm install's, so answering no leaves that
142
+ install working. A hook line written as `~/…counterparts-hook`
143
+ or `$HOME/…` now reads as live, here and in doctor and the plugin's stand-down, as the
144
+ shell that runs it would read it.
145
+ - **The sidebar counts feelings under Emotion.** "Mechanisms today" showed Emotion at 0
146
+ every day, because its only proof was a mood match, and mood matching is off. It now
147
+ counts a memory saved with a feeling and a memory carrying a feeling that came to mind,
148
+ and opening Emotion lists those memories with their feeling words. The dashboard's
149
+ Emotion light reads the same proofs. `sidebar.json` gains a `felt` detail on those rows
150
+ (its version stays 1).
151
+ - The sidebar's footer says "Dash · /counterparts:dashboard", which fits the docked pane
152
+ on one line.
153
+
3
154
  ## 0.3.23 — 2026-10-14
4
155
 
5
156
  The plugin's sidebar now shows your memory and does nothing else: it has no buttons and no links, runs no command, calls no tool and makes no network request. Its footer says how to do the rest yourself (`/counterparts:meet`, `/counterparts:dashboard`, say "pause memory here", `/counterparts quiet`). What it shows comes from a small file Counterparts writes for it, `~/.counterparts/sidebar.json`, only while the plugin is installed, so the dashboard no longer has to be running for the sidebar to show anything. The sidebar's brain is gone and the fox stays. The plugin directory's build of the plugin no longer reads Claude Code's user configuration file and leaves out the dashboard's 3D brain; beside an npm install it does not stand down, so keep one or the other. No store-format change (store v13, cache v6) and no wiring change: nothing to run after upgrading from 0.3.22, and `counterparts connect` is not needed.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "counterparts",
3
- "version": "0.3.23",
3
+ "version": "0.3.25",
4
4
  "license": "MIT",
5
5
  "description": "Memory that turns AI tools into counterparts - a local-first, human-memory-modeled memory layer for AI.",
6
6
  "repository": {
@@ -669,7 +669,14 @@ row, saying which source answered, existed until the keys were removed — §1a.
669
669
  or its `.mjs` shim, `counterparts-hook`, or `<binary> hook`, whatever one-token
670
670
  flags come before or after `run`, and nothing with a shell operator in it.
671
671
  So a plugin reads what a newer `connect` writes. (The plugin's server stands
672
- down the same way, by the registration's NAME.) `connect`'s own rewrite keeps
672
+ down the same way, by the registration's NAME.) The plugin directory's
673
+ flavor reads none of Claude Code's files, so it stands down by the npm
674
+ install's marker instead (`adapters/npm-live.ts`, since 2026-10-15): a
675
+ reading of the user-level wiring that the npm side writes beside the
676
+ configuration (`connect` at once, the npm server at its start, the npm
677
+ hook at each session start and otherwise at most daily, past the
678
+ configuration refusals and an off or paused folder), believed for a week
679
+ (the hooks half: two days) and only while the program it names is on disk. `connect`'s own rewrite keeps
673
680
  the strict reading (`isOurHookCommand`): it rewrites only what it can fully
674
681
  parse. A writer that adds a flag writes it as ONE token, or older readers
675
682
  take its value for the script.
@@ -2589,3 +2589,33 @@ outside the disclosed files. The hooks no longer ask who delivers, `loadConfig`
2589
2589
  resolver moved to `tools/parallel/primacy.ts` for the instrument that still reads old run directories.
2590
2590
  The `adapter.primacy.*` event names stay in core and the dashboard so a store's old rows still read.
2591
2591
  Earlier entries above that mention primacy describe the code as it was then.
2592
+
2593
+ ## 2026-10-15 — the directory flavor stands down by a marker
2594
+
2595
+ The directory flavor reads none of Claude Code's files (2026-10-14), so beside a live npm install it stood
2596
+ nothing down: the claim kept one wake per event, but every memory tool was offered twice, which the owner,
2597
+ running both, found confusing. The npm install now leaves `npm-live.json` beside the configuration
2598
+ (`adapters/npm-live.ts`); the directory flavor's gates read it and nothing else. What the build settled:
2599
+
2600
+ - **A reading, not a heartbeat.** The first sketch had the npm hook and the npm server each stamp "I ran".
2601
+ Two holes: the nightly run's server is a non-plugin server under the plugin too (the run strips
2602
+ `CLAUDE_PLUGIN_ROOT`), and an npm install whose `claude mcp add` never happened would have stood the
2603
+ plugin's server down with no server left at all. So the marker records what the npm side READS of the
2604
+ user-level wiring — the live hook's command and file, the live `-s user` server — written by `connect`, by
2605
+ the npm server at its start, and by the npm hook at each session start (other events: once a day, or when
2606
+ missing or another build's). Any npm-side writer is then truthful, the nightly server included; a race
2607
+ between two only leaves one of two true readings. One file per Claude Code directory (`CLAUDE_CONFIG_DIR`
2608
+ hashed into the name), so two configurations sharing a memory never rewrite each other's (review).
2609
+ - **User level only.** A hook in one project's settings must not stand the plugin down in every other.
2610
+ - **Program-exists, and a week (hooks: two days).** Liveness is re-checked by stat. An age bound is kept as
2611
+ well, for npm wiring removed by hand while the package stays: nobody refreshes the marker then, and without
2612
+ the bound the plugin would stay down, memoryless, with its once-only line long said. The hooks half's bound
2613
+ is shorter because a plugin hook not standing down costs nothing (the claim) and an npm hook beside it
2614
+ would have refreshed the file at its session start. The bounds' cost is one session of doubled tools after
2615
+ a week away.
2616
+ - **Not in a paused folder.** The write sits after the folder checks in `runHook`, so an off or paused folder
2617
+ still writes nothing under the install (`a paused folder with two wirings` holds it).
2618
+ - **The line.** "Nothing needs to change" became "keeping one install is simpler", with both ways out
2619
+ (`plugin.ts#keepOne`), the plugin's id read off its install path, phrased for the person and asking nothing
2620
+ of the model. The folder-origin wording is unchanged.
2621
+
@@ -39,7 +39,7 @@ import {
39
39
  stanceOfMode,
40
40
  } from "../../scopes.js";
41
41
  import type { ScopeCommandContext, ScopeRead, ScopeVerdict } from "../../scopes.js";
42
- import { canonicalScope, isEntrypoint, readSession } from "../../sessions.js";
42
+ import { canonicalScope, installedVersion, isEntrypoint, readSession } from "../../sessions.js";
43
43
  import { openLog } from "../../log/index.js";
44
44
  import type { LogEvent, ProcessLog } from "../../log/index.js";
45
45
  import { resolveZone, todayIn } from "../../../core/time.js";
@@ -63,7 +63,7 @@ import type { SaysSoHook, StandDownFault } from "../standdown.js";
63
63
  import { readTranscript } from "../transcript.js";
64
64
  import { BINARY, entryScript, scriptArgs } from "../../runtime.js";
65
65
  import type { Binary } from "../../runtime.js";
66
- import { npmWiring } from "../../host-wiring.js";
66
+ import { noteNpmLive, npmWiringForGate } from "../../npm-live.js";
67
67
  import {
68
68
  PLUGIN_ROOT_ENV,
69
69
  ensureFirstRun,
@@ -698,7 +698,8 @@ async function main(): Promise<void> {
698
698
  const home = homedir();
699
699
  const projectDir = process.env["CLAUDE_PROJECT_DIR"] ?? eventDirectory(payload);
700
700
  const gate = hookGate(
701
- npmWiring({ home, env: process.env, cwd: projectDir, read: { mcp: false } }),
701
+ // The directory flavor reads the npm install's marker instead (`npm-live.ts`).
702
+ npmWiringForGate({ home, env: process.env, cwd: projectDir, configPath: choice.path, read: { mcp: false } }),
702
703
  home,
703
704
  // Where the plugin was loaded from changes only the session-start line.
704
705
  name === "session-start" ? pluginOrigin({ home, env: process.env, cwd: projectDir }) : undefined,
@@ -917,6 +918,20 @@ async function runHook(
917
918
  sayPaused(name, verdict, scope, "session", payload, said, choice.path);
918
919
  return;
919
920
  }
921
+ // THE NPM INSTALL SAYS IT IS WIRED (`npm-live.ts`), for a plugin of the
922
+ // directory flavor beside it, which reads none of Claude Code's files. Here,
923
+ // past the configuration refusals (the explicit-dir guard among them) and a
924
+ // folder that is off or paused, which write nothing. At a session start, one
925
+ // reading of the user-level wiring (so wiring removed by hand is known by the
926
+ // next session); at any other event, usually one small read that finds the
927
+ // file fresh. Written in an observer folder too: it is host state beside the
928
+ // configuration, not memory. Never from the plugin's own hook.
929
+ if (!runningAsPlugin(process.env)) {
930
+ const force = name === "session-start";
931
+ if (noteNpmLive({ configPath: choice.path, home: homedir(), env: process.env, build: installedVersion(), force }) === "failed") {
932
+ process.stderr.write("[counterparts] could not write the npm-live marker beside the configuration\n");
933
+ }
934
+ }
920
935
  // THE COMBINATION: the most restrictive of what the configuration said and
921
936
  // what the registry says (`adapters/scopes.ts#effectiveStance`, applied here
922
937
  // by folding the registry's `observer` into the config the adapter opens on).
@@ -675,7 +675,7 @@ async function main(): Promise<void> {
675
675
  observer: config.observer === true,
676
676
  });
677
677
  log.start();
678
- const sidebarWanted = sidebarInstalled(process.env, homedir());
678
+ const sidebarWanted = sidebarInstalled(process.env, homedir(), choice.path);
679
679
  if (!sidebarWanted && removeSidebarStatus(choice.path)) log.event({ name: "runner.sidebar", data: { removed: true } });
680
680
  try {
681
681
  const report = await runOnce({
@@ -53,7 +53,8 @@ export interface HostReading {
53
53
  readonly mcpUnreadable: boolean;
54
54
  /** False: this build does not open the MCP file at all (the plugin
55
55
  * directory's, `runtime.ts#readsHostUserConfig`), so there is no MCP clause,
56
- * and its plugin does not stand down beside the npm install. Absent: read. */
56
+ * and its plugin stands down beside the npm install only by the npm
57
+ * install's marker (`npmMarker`, `npm-live.ts`). Absent: read. */
57
58
  readonly mcpRead?: boolean;
58
59
  /**
59
60
  * Whether a `claude` executable is on the PATH the caller would run
@@ -82,6 +83,10 @@ export interface HostReading {
82
83
  /** The Counterparts Claude Code plugin, when Claude Code records it
83
84
  * installed (`host-wiring.ts#pluginInstall`); absent or null when not. */
84
85
  readonly plugin?: PluginInstallRead | null;
86
+ /** The npm install's marker (`npm-live.ts`) as a directory-flavor plugin
87
+ * would read it: which halves it would stand down for. Null when there is
88
+ * none it would believe; absent when not read. */
89
+ readonly npmMarker?: { readonly hooks: boolean; readonly server: boolean } | null;
85
90
  }
86
91
 
87
92
  /** How a Runtime row names where a command was wired: `desktop` is Claude
@@ -311,23 +316,34 @@ export function hostFindings(reading: HostReading): Finding[] {
311
316
  ),
312
317
  ];
313
318
  }
314
- // THE PLUGIN DIRECTORY'S BUILD DOES NOT STAND DOWN (2026-10-14): it never
315
- // reads `~/.claude.json`, so it cannot tell this wiring is there, and both
316
- // run, on the same memory, until a marker-based check lands (docs/plugin.md).
317
- // Known two ways: this doctor IS that build (`mcpRead` false), or the
318
- // installed plugin is (`standsDown` false, read from its `installPath`, the
319
- // case of an npm doctor beside it). Unknown (null) keeps the launcher's word.
320
- const bothRun = plugin !== null && (reading.mcpRead === false || plugin.standsDown === false);
319
+ // THE PLUGIN DIRECTORY'S BUILD (2026-10-14): it never reads Claude Code's
320
+ // files, so it cannot see this wiring. Known two ways: this doctor IS that
321
+ // build (`mcpRead` false), or the installed plugin is (`standsDown` false,
322
+ // read from its `installPath`, the case of an npm doctor beside it). Unknown
323
+ // (null) keeps the launcher's word. Since 2026-10-15 it stands down by the
324
+ // npm install's marker (`npm-live.ts`) when it carries the reader
325
+ // (`readsMarker`; this doctor, when it is that build) and the marker holds
326
+ // for the hooks, and for the server when one is registered. A build without
327
+ // the reader, or a marker the hooks have not written yet, runs beside it.
328
+ const directory = plugin !== null && (reading.mcpRead === false || plugin.standsDown === false);
329
+ const readsMarker = reading.mcpRead === false || plugin?.readsMarker === true;
330
+ const marker = reading.npmMarker ?? null;
331
+ const markerHolds = marker !== null && marker.hooks && (marker.server || !reading.mcp);
332
+ const bothRun = directory && !(readsMarker && markerHolds);
321
333
  const twiceClause =
322
334
  plugin === null
323
335
  ? ""
324
336
  : bothRun
325
- ? `ALSO installed as the Claude Code plugin (${plugin.id}), whose build does not check for the other install, so both are running, on the same memory: every hook and memory tool is wired twice until a later version checks`
337
+ ? readsMarker
338
+ ? `ALSO installed as the Claude Code plugin (${plugin.id}), which reads none of Claude Code's files and has no word from this install yet, so both are running, on the same memory, until this install's hooks have run in a session`
339
+ : `ALSO installed as the Claude Code plugin (${plugin.id}), whose build does not check for the other install, so both are running, on the same memory: every hook and memory tool is wired twice until a later version checks`
326
340
  : `ALSO installed as the Claude Code plugin (${plugin.id}), which stands down while this wiring is live`;
341
+ // KEEP ONE (2026-10-15, as the plugin's own session-start line says it,
342
+ // `plugin.ts#keepOne`): both ways out, the same memory either way.
327
343
  const twiceFix =
328
344
  plugin === null
329
345
  ? ""
330
- : `Installed twice${bothRun ? "; remove one" : ""}: to keep only the plugin, run \`counterparts disconnect\` and restart Claude Code; to keep only this install, run \`claude plugin uninstall ${plugin.id}\`. Same memory either way.`;
346
+ : `Installed twice; keeping one is simpler, and nothing is lost either way: to keep only the plugin, run \`counterparts disconnect\` and restart Claude Code; to keep only this install, run \`claude plugin uninstall ${plugin.id}\` (or \`/plugin uninstall ${plugin.id}\` inside Claude Code).`;
331
347
  const mcpClause = reading.mcpRead === false
332
348
  ? ""
333
349
  : reading.mcp
@@ -5,6 +5,7 @@ import { Counterpart } from "../../core/counterpart.js";
5
5
  import {
6
6
  Store,
7
7
  assertPreMigrationTarget,
8
+ chapterSummaryKind,
8
9
  isStoreError,
9
10
  paths,
10
11
  pendingMigration,
@@ -335,3 +336,43 @@ export function journalCopyFindings(store: Store): Finding[] {
335
336
  ),
336
337
  ];
337
338
  }
339
+
340
+ /** The window the summaries line counts over, in days. */
341
+ const SUMMARY_WINDOW_DAYS = 7;
342
+
343
+ /**
344
+ * CHAPTER SUMMARIES (2026-10-15): how many of the last week's chapters got a
345
+ * summary their session WROTE, and how many stand on an AUTOMATIC one the
346
+ * boundary wrote from the chapter's opening lines because the session gave
347
+ * none. Green and informational — a run of automatic ones says sessions are
348
+ * skipping the `summary` field, which is worth seeing, not a fault. Silent
349
+ * when the week holds no summary at all (a store before the change, or a
350
+ * quiet week). One read of the journal's memories; meta only.
351
+ */
352
+ export function chapterSummaryFindings(store: Store): Finding[] {
353
+ const since = store.now() - SUMMARY_WINDOW_DAYS * 86_400_000;
354
+ let written = 0;
355
+ let automatic = 0;
356
+ try {
357
+ for (const id of store.list({ type: "memory", source: "episode" })) {
358
+ const row = store.row(id);
359
+ if (row === undefined || (row.created_at ?? 0) < since) continue;
360
+ const kind = chapterSummaryKind(row.meta);
361
+ if (kind === "written") written += 1;
362
+ else if (kind === "automatic") automatic += 1;
363
+ }
364
+ } catch {
365
+ return [];
366
+ }
367
+ if (written + automatic === 0) return [];
368
+ return [
369
+ finding(
370
+ "chapter-summaries",
371
+ "green",
372
+ "Chapter summaries",
373
+ `${String(written)} written by the session, ${String(automatic)} automatic (its opening lines, because the session gave none), over the last ${String(SUMMARY_WINDOW_DAYS)} days`,
374
+ "",
375
+ { written, automatic, days: SUMMARY_WINDOW_DAYS },
376
+ ),
377
+ ];
378
+ }
@@ -63,6 +63,7 @@ import {
63
63
  SPAWN_STARTED_EVENT,
64
64
  SWEEP_GATE_EVENT,
65
65
  WAKE_DELIVERED_EVENT,
66
+ WAKE_INJECTED_EVENT,
66
67
  } from "../../core/counterpart.js";
67
68
  import { Counterpart } from "../../core/counterpart.js";
68
69
  import {
@@ -120,7 +121,7 @@ import { finding, tilde, payloadOf, str, num, off, newestRows, undetermined } fr
120
121
  import type { Finding } from "./doctor-finding.js";
121
122
  import { checkoutFindings } from "./doctor-checkout.js";
122
123
  import type { CheckoutReading } from "./doctor-checkout.js";
123
- import { openFindings, journalFindings, journalCopyFindings } from "./doctor-open.js";
124
+ import { openFindings, journalFindings, journalCopyFindings, chapterSummaryFindings } from "./doctor-open.js";
124
125
  import type { OpenReading, MigrationReading } from "./doctor-open.js";
125
126
  import {
126
127
  metaJson,
@@ -2347,14 +2348,25 @@ const LOOKUP_WINDOW_DAYS = 14;
2347
2348
  */
2348
2349
  export function lookupFindings(store: Store): Finding[] {
2349
2350
  const since = Math.max(0, store.livedDay() - LOOKUP_WINDOW_DAYS);
2350
- const offered = { dream: 0, reflection: 0 };
2351
- const runs = { dream: 0, reflection: 0 };
2352
- const looked = { dream: 0, reflection: 0 };
2351
+ const offered = { dream: 0, reflection: 0, wake: 0 };
2352
+ const runs = { dream: 0, reflection: 0, wake: 0 };
2353
+ const looked = { dream: 0, reflection: 0, wake: 0 };
2353
2354
  let unread = false;
2354
2355
  try {
2355
2356
  const begun = store.eventLog({ name: "dream.begun", sinceDay: since, order: "desc", limit: LOOKUP_ROWS });
2356
2357
  const recalls = store.eventLog({ name: "mcp.recall", sinceDay: since, order: "desc", limit: LOOKUP_ROWS });
2357
- unread = begun.length >= LOOKUP_ROWS || recalls.length >= LOOKUP_ROWS;
2358
+ // The wake's list items as lines (#489 C): each session start's row says
2359
+ // how many it listed that way; a start before that build says nothing.
2360
+ const woke = store.eventLog({ name: WAKE_INJECTED_EVENT, sinceDay: since, order: "desc", limit: LOOKUP_ROWS });
2361
+ unread = begun.length >= LOOKUP_ROWS || recalls.length >= LOOKUP_ROWS || woke.length >= LOOKUP_ROWS;
2362
+ for (const row of woke) {
2363
+ const p = payloadOf(row);
2364
+ const n = num(p, "lined");
2365
+ // A resume composes no wake: not a session start that offered nothing.
2366
+ if (n === null || p["resumed"] === true) continue;
2367
+ runs.wake += 1;
2368
+ offered.wake += n;
2369
+ }
2358
2370
  for (const row of begun) {
2359
2371
  const n = num(payloadOf(row), "offered");
2360
2372
  if (n === null) continue;
@@ -2375,7 +2387,7 @@ export function lookupFindings(store: Store): Finding[] {
2375
2387
  for (const row of recalls) {
2376
2388
  const from = payloadOf(row)["fromIndex"];
2377
2389
  if (from === null || typeof from !== "object") continue;
2378
- for (const m of ["dream", "reflection"] as const) {
2390
+ for (const m of ["dream", "reflection", "wake"] as const) {
2379
2391
  const v = (from as Record<string, unknown>)[m];
2380
2392
  if (typeof v === "number") looked[m] += v;
2381
2393
  }
@@ -2383,17 +2395,20 @@ export function lookupFindings(store: Store): Finding[] {
2383
2395
  } catch {
2384
2396
  return [];
2385
2397
  }
2386
- const say = (m: "dream" | "reflection", runWord: string): string =>
2398
+ const say = (m: "dream" | "reflection" | "wake", runWord: string): string =>
2387
2399
  runs[m] === 0
2388
2400
  ? `${m}: no ${runWord} measured yet`
2389
2401
  : `${m}: ${String(looked[m])} looked up of ${String(offered[m])} offered in part, over ${String(runs[m])} ${runWord}${runs[m] === 1 ? "" : "s"}`;
2390
- const none = runs.dream + runs.reflection > 0 && offered.dream + offered.reflection > 0 && looked.dream + looked.reflection === 0;
2402
+ const none =
2403
+ runs.dream + runs.reflection + runs.wake > 0 &&
2404
+ offered.dream + offered.reflection + offered.wake > 0 &&
2405
+ looked.dream + looked.reflection + looked.wake === 0;
2391
2406
  return [
2392
2407
  finding(
2393
2408
  "lookups",
2394
2409
  "green",
2395
2410
  "Lookups",
2396
- `last ${String(LOOKUP_WINDOW_DAYS)} lived days — ${say("dream", "night")}; ${say("reflection", "reflection")}` +
2411
+ `last ${String(LOOKUP_WINDOW_DAYS)} lived days — ${say("dream", "night")}; ${say("reflection", "reflection")}; ${say("wake", "session start")}` +
2397
2412
  (none ? ". None looked up yet: if that holds, the lines may be too thin or the lookup unclear" : "") +
2398
2413
  (unread ? ". More rows than were read: the counts are a floor" : ""),
2399
2414
  "",
@@ -2404,6 +2419,9 @@ export function lookupFindings(store: Store): Finding[] {
2404
2419
  reflectionOffered: offered.reflection,
2405
2420
  reflectionLooked: looked.reflection,
2406
2421
  reflections: runs.reflection,
2422
+ wakeOffered: offered.wake,
2423
+ wakeLooked: looked.wake,
2424
+ wakes: runs.wake,
2407
2425
  floor: unread,
2408
2426
  },
2409
2427
  ),
@@ -3336,6 +3354,8 @@ export function doctorFindings(input: DoctorInput): Finding[] {
3336
3354
  : [["crash-write-up", (): Finding[] => crashWriteUpFindings(input, store, owedReading)] as const]),
3337
3355
  // F6: silent unless a copy failure is standing. Two bounded event reads.
3338
3356
  ["journal-copy", () => journalCopyFindings(store)],
3357
+ // 2026-10-15: written vs automatic chapter summaries this week. Silent without any.
3358
+ ["chapter-summaries", () => chapterSummaryFindings(store)],
3339
3359
  // The process log (2026-09-30): one directory listing and today's file.
3340
3360
  // Not in the session-start reading: it is never red, and it reads a file.
3341
3361
  ...(input.budgetMs !== undefined ? [] : [["log", (): Finding[] => logFindings(input)] as const]),
@@ -82,6 +82,7 @@ import { nightRowTimeoutMs, planNightRunner } from "./night-run.js";
82
82
  import { NOTHING_OWED_BEFORE_KEY, catchUpOf, catchUpWords, owedBefore } from "./night-catch-up.js";
83
83
  import type { NightKind } from "./night-run.js";
84
84
  import { spawnDetached } from "../spawn.js";
85
+ import { ONE_TAG_LINE, wakeTagLead } from "../store-id.js";
85
86
  import type { SpawnOutcome } from "../spawn.js";
86
87
  import { NO_ARRIVAL, STOP_ASK_OPENER, readWakeArrival, startedByHost } from "./transcript.js";
87
88
  import type { WakeArrival } from "./transcript.js";
@@ -511,10 +512,17 @@ export const PAGE_WRITER_TOOL = "counterparts self_page";
511
512
  * capture (`ritual`, CONTRACT §5 G11) whichever emission shape carried it —
512
513
  * today's `additionalContext`, or the stderr and `reason` shapes older
513
514
  * transcripts hold.
515
+ *
516
+ * RATINGS (2026-10-14; Mike's call, tracking only): one clause asks the
517
+ * session to score the footnotes shown since it last wrote, and every `drewOn`
518
+ * id — `session_end`'s `rated` field says the anchors and the rest. The ids
519
+ * are not listed here: every Stop's injection is noise someone pays for.
514
520
  */
521
+ export const RATE_CLAUSE = "`rated` 0–3 each footnote shown since you last wrote, and each `drewOn` id";
522
+
515
523
  export function stopAsk(sessionId: string, chapter: number): string {
516
524
  return [
517
- `${STOP_ASK_OPENER} 1) hand back what caught your attention since you last wrote, one idea each — what you read, what they said, what happened — with the counterparts session_end tool, session: ${sessionId}. \`handoff\` only if work here is unfinished; \`retireHandoff\` any now done; \`updates\` anything dated or open now done. ${PRONOUN_RULE}`,
525
+ `${STOP_ASK_OPENER} 1) hand back what caught your attention since you last wrote, one idea each — what you read, what they said, what happened — with the counterparts session_end tool, session: ${sessionId}. \`handoff\` only if work here is unfinished; \`retireHandoff\` any now done; \`updates\` anything dated or open now done; ${RATE_CLAUSE}. ${PRONOUN_RULE}`,
518
526
  `2) Write chapter ${String(chapter)} with the counterparts chapter tool, session: ${sessionId}.`,
519
527
  ].join("\n");
520
528
  }
@@ -529,7 +537,7 @@ export const RESUME_WAKE_LINE =
529
537
  "Counterparts: this session was resumed; the wake it was handed when it started (above) still holds.";
530
538
 
531
539
  /** What `sessionStart` hands the host: a composed wake, or a resume's line. */
532
- type WokeHere = Pick<ReturnType<Lifecycle["composeWake"]>, "text" | "ok" | "bytes" | "sentinel" | "preface"> & {
540
+ type WokeHere = Pick<ReturnType<Lifecycle["composeWake"]>, "text" | "ok" | "bytes" | "sentinel" | "preface" | "lined"> & {
533
541
  readonly reason: string;
534
542
  };
535
543
 
@@ -686,14 +694,15 @@ export class ClaudeCodeAdapter extends Lifecycle {
686
694
  // are Claude Desktop's server, which serves a call as this session only
687
695
  // when the call names it. A terminal session's wake is unchanged.
688
696
  const codeTab = codeTabSessionLine(input);
689
- // THE FIRST MEETING'S MARKER (2026-10-11), on its own line under the
690
- // clock, on every session-start wake: the state word only, for the mod,
691
- // which cannot reach the dashboard before somebody starts it. The store
692
- // marker on the line under it (2026-10-12) says which store this session
693
- // opened, so the mod can tell this store's dashboard from another's.
694
- const storeLine = this.storeMarker();
695
- const marker = `${this.onboardingMarker(input)}\n${storeLine.length === 0 ? "" : `${storeLine}\n`}`;
696
- const lead = `${woke.text.length === 0 && plain.context.length === 0 && codeTab === null ? "" : `${this.nowLine()}\n`}${marker}${codeTab === null ? "" : `${codeTab}\n`}${plain.context}`;
697
+ // THE FIRST MEETING'S MARKER (2026-10-11), on every session-start wake:
698
+ // the state word only, for the mod, which cannot reach the dashboard
699
+ // before somebody starts it. The store marker beside it (2026-10-12)
700
+ // says which store this session opened, so the mod can tell this
701
+ // store's dashboard from another's. Since 2026-10-16 both ride on the
702
+ // wake's own head line, just above its body (`wakeTagLead`, lightly
703
+ // held); `ONE_TAG_LINE` off puts them back under the clock.
704
+ const tags = wakeTagLead([this.onboardingMarker(input), this.storeMarker()], woke.text);
705
+ const lead = `${woke.text.length === 0 && plain.context.length === 0 && codeTab === null ? "" : `${this.nowLine()}\n`}${ONE_TAG_LINE ? "" : tags}${codeTab === null ? "" : `${codeTab}\n`}${plain.context}${ONE_TAG_LINE ? tags : ""}`;
697
706
  const sent = woke.bytes + Buffer.byteLength(lead, "utf8");
698
707
  const rides =
699
708
  plain.due.length > 0 &&
@@ -734,6 +743,12 @@ export class ClaudeCodeAdapter extends Lifecycle {
734
743
  interactive: isInteractive(input) && input.nightRun !== true,
735
744
  // A resume's short wake (2026-10-11): `bytes` is the line, not a bundle.
736
745
  resumed,
746
+ // How many items it listed as a line (#489 C): doctor's Lookups line
747
+ // reads what was offered from here, and what was expanded from
748
+ // `mcp.recall`'s `fromIndex.wake`. Not on the nightly run's row: its
749
+ // wake writes no ledger (`Lifecycle#noteWakeIndex`), so its lines
750
+ // could never count as looked up (review of #508).
751
+ ...(input.nightRun === true ? {} : { lined: woke.lined?.length ?? 0 }),
737
752
  });
738
753
  // THE QUESTION RIDES BESIDE THE WAKE, NEVER INSIDE IT, and only if it
739
754
  // FITS.
@@ -351,7 +351,10 @@ The standalone verb does not ask either: typing it is the yes.*
351
351
  through `claude mcp add` / `claude mcp remove` as an argument vector, never a shell
352
352
  string. That file is READ to decide whether to call them, and a read that sees nothing
353
353
  does not stop the removal being attempted — the host owns that file and may move it,
354
- so our read is evidence, not authority. `claude` missing is a printed line and exit 0,
354
+ so our read is evidence, not authority (except on the plugin's uninstall that keeps
355
+ the memory, which removes a hook or the registration only when what it runs is gone:
356
+ a blind removal there could take a running npm install's server, 2026-10-14).
357
+ `claude` missing is a printed line and exit 0,
355
358
  never a failed install. *`unwire` is also the one of the three that runs with NO
356
359
  configuration at all: it needs nothing out of the file, and the person most likely to
357
360
  be running it is somebody who deleted `~/.counterparts` by hand and now has five hooks
@@ -1207,6 +1207,14 @@ disk and can hold anything a shell would interpret). One consequence found by th
1207
1207
  loop: `unwire` must attempt `claude mcp remove` **even when our read saw no
1208
1208
  registration**, because that file may move and our read is evidence rather than authority.
1209
1209
  "Tolerate not found" is cheaper than a server left pointed at a store nobody is wiring.
1210
+ The plugin's uninstall on the arms that keep the memory is the exception (`onlyDead`,
1211
+ 2026-10-14): it removes a hook or the registration only when what it runs is gone, so it
1212
+ runs `claude mcp remove` only for a registration read as dead — or, in the directory flavor
1213
+ that never reads the file, when no npm install's `counterparts` is on PATH and no hook of ours there still runs. A blind removal
1214
+ there could take a running npm install's server, which the plugin never registered. A hook or
1215
+ registration that runs the plugin's own files (its root, its data directory, Claude Code's
1216
+ plugins directory: the plugin's console can run `connect`) counts as gone on that route,
1217
+ since it is dead once the plugin is (review of #491).
1210
1218
 
1211
1219
  **`--delete-memories` counts before it warns, and the fallback matters more than the
1212
1220
  count.** A store that will not open on this build — the old-floor `STORE_PRE_ROWS` case,