counterparts 0.3.29 → 0.3.30

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 (119) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/docs/module-map.md +1 -1
  3. package/package.json +1 -1
  4. package/src/adapters/claude-code/CONTRACT.md +6 -2
  5. package/src/adapters/claude-code/NOTES.md +27 -0
  6. package/src/adapters/claude-code/bin/runner.ts +0 -1
  7. package/src/adapters/claude-code/child.ts +3 -2
  8. package/src/adapters/claude-code/doctor-self-page.ts +1 -1
  9. package/src/adapters/claude-code/doctor-upgrades.ts +50 -1
  10. package/src/adapters/claude-code/doctor.ts +7 -18
  11. package/src/adapters/claude-code/index.ts +0 -1
  12. package/src/adapters/claude-code/night-run.ts +23 -14
  13. package/src/adapters/cli/CONTRACT.md +8 -11
  14. package/src/adapters/cli/NOTES.md +12 -0
  15. package/src/adapters/cli/commands-note.ts +10 -7
  16. package/src/adapters/cli/commands-remove.ts +9 -22
  17. package/src/adapters/cli/commands.ts +1 -1
  18. package/src/adapters/cli/dream-core.ts +2 -7
  19. package/src/adapters/cli/export.ts +49 -215
  20. package/src/adapters/cli/install.ts +0 -1
  21. package/src/adapters/config.ts +5 -5
  22. package/src/adapters/dashboard/NOTES.md +27 -3
  23. package/src/adapters/dashboard/registries.ts +1 -1
  24. package/src/adapters/dashboard/web/README.md +2 -3
  25. package/src/adapters/dashboard/web/actions.ts +3 -0
  26. package/src/adapters/dashboard/web/mechanisms/picture.js +2 -3
  27. package/src/adapters/dashboard/web/narrate.ts +9 -14
  28. package/src/adapters/dashboard/web/pages/home/sections/today.js +1 -1
  29. package/src/adapters/dashboard/web/pages/memories/row.js +4 -4
  30. package/src/adapters/dashboard/web/pages/memories/sections/search.js +1 -1
  31. package/src/adapters/dashboard/web/pages/self/sections/dreams.js +2 -2
  32. package/src/adapters/dashboard/web/pages/self/sections/journal.js +1 -1
  33. package/src/adapters/dashboard/web/pages/self/sections/map.js +3 -3
  34. package/src/adapters/dashboard/web/pages/self/sections/settling.js +3 -3
  35. package/src/adapters/dashboard/web/pages/self/sections/traits.js +2 -2
  36. package/src/adapters/dashboard/web/pages/self/sections/wake.js +1 -1
  37. package/src/adapters/dashboard/web/pages/self/self.css +0 -1
  38. package/src/adapters/dashboard/web/reveal.ts +24 -85
  39. package/src/adapters/dashboard/web/shared/format.js +2 -3
  40. package/src/adapters/dashboard/web/shared/memory-card-words.js +2 -2
  41. package/src/adapters/dashboard/web/shared/memory-modal.js +8 -8
  42. package/src/adapters/dashboard/web/shared/widgets/rows.css +0 -1
  43. package/src/adapters/dashboard/web/views/dreams.ts +2 -6
  44. package/src/adapters/dashboard/web/views/mechanism-panel.ts +4 -5
  45. package/src/adapters/dashboard/web/views/memories.ts +9 -12
  46. package/src/adapters/dashboard/web/views/memory-words.ts +6 -4
  47. package/src/adapters/dashboard/web/views/memory.ts +17 -30
  48. package/src/adapters/dashboard/web/views/mind.ts +14 -24
  49. package/src/adapters/dashboard/web/views/overview.ts +3 -5
  50. package/src/adapters/dashboard/web/views/search.ts +5 -8
  51. package/src/adapters/dashboard/web/views/self-map.ts +2 -4
  52. package/src/adapters/dashboard/web/views/shared.ts +0 -3
  53. package/src/adapters/dashboard/web/views/today.ts +8 -13
  54. package/src/adapters/dashboard/web/views/traits.ts +8 -17
  55. package/src/adapters/dashboard/web/views.ts +2 -4
  56. package/src/adapters/expansions.ts +15 -14
  57. package/src/adapters/fired.ts +2 -16
  58. package/src/adapters/lifecycle.ts +3 -5
  59. package/src/adapters/mcp/CONTRACT.md +16 -17
  60. package/src/adapters/mcp/INTERFACE-GAPS.md +7 -1
  61. package/src/adapters/mcp/NOTES.md +26 -0
  62. package/src/adapters/mcp/bin/serve.ts +11 -72
  63. package/src/adapters/mcp/deliberate.ts +8 -25
  64. package/src/adapters/mcp/facts.ts +4 -19
  65. package/src/adapters/mcp/index.ts +0 -8
  66. package/src/adapters/mcp/meaning.ts +7 -16
  67. package/src/adapters/mcp/nights.ts +10 -54
  68. package/src/adapters/mcp/server-args.ts +0 -1
  69. package/src/adapters/mcp/server-options.ts +0 -19
  70. package/src/adapters/mcp/server-session-end.ts +0 -1
  71. package/src/adapters/mcp/server-words.ts +1 -8
  72. package/src/adapters/mcp/server.ts +29 -100
  73. package/src/adapters/mcp/tools.ts +3 -8
  74. package/src/adapters/sidebar-status.ts +2 -3
  75. package/src/adapters/stance-env.ts +5 -28
  76. package/src/core/counterpart-deposit.ts +13 -29
  77. package/src/core/counterpart-events.ts +3 -2
  78. package/src/core/counterpart-sweep.ts +8 -11
  79. package/src/core/counterpart-types.ts +7 -25
  80. package/src/core/counterpart.ts +42 -77
  81. package/src/core/dream/CONTRACT.md +15 -16
  82. package/src/core/dream/NOTES.md +22 -0
  83. package/src/core/dream/feeling-weeks.ts +2 -2
  84. package/src/core/dream/index.ts +18 -65
  85. package/src/core/dream/mind.ts +1 -3
  86. package/src/core/dream/reflect.ts +35 -160
  87. package/src/core/dream/slices.ts +4 -18
  88. package/src/core/dream/tunables.ts +0 -11
  89. package/src/core/handoff/CONTRACT.md +11 -9
  90. package/src/core/handoff/NOTES.md +14 -0
  91. package/src/core/handoff/index.ts +1 -10
  92. package/src/core/handoff/last-here.ts +6 -16
  93. package/src/core/recall/CONTRACT.md +9 -9
  94. package/src/core/recall/NOTES.md +15 -0
  95. package/src/core/recall/activate.ts +5 -25
  96. package/src/core/recall/feeling-ask.ts +0 -3
  97. package/src/core/recall/gate.ts +5 -18
  98. package/src/core/recall/index.ts +3 -19
  99. package/src/core/reconsolidation.ts +8 -10
  100. package/src/core/remember/CONTRACT.md +5 -4
  101. package/src/core/remember/NOTES.md +18 -0
  102. package/src/core/remember/tunables.ts +1 -1
  103. package/src/core/self/CONTRACT.md +5 -5
  104. package/src/core/self/NOTES.md +8 -0
  105. package/src/core/self/briefing.ts +1 -1
  106. package/src/core/self/identity.ts +2 -3
  107. package/src/core/self/index.ts +13 -13
  108. package/src/core/self/summaries.ts +1 -1
  109. package/src/core/self/work.ts +2 -2
  110. package/src/core/self/writer.ts +14 -21
  111. package/src/core/store/CONTRACT.md +8 -9
  112. package/src/core/store/NOTES.md +22 -0
  113. package/src/core/store/index.ts +59 -46
  114. package/src/core/store/marks.ts +0 -18
  115. package/src/core/store/operational.ts +12 -6
  116. package/src/core/store/reads-marks.ts +12 -12
  117. package/src/core/store/reads-memories.ts +9 -13
  118. package/src/core/store/shapes.ts +0 -5
  119. package/src/core/store/traits.ts +1 -12
package/CHANGELOG.md CHANGED
@@ -1,5 +1,67 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.30 — 2026-10-21
4
+
5
+ Nothing is held back from your sessions any more. Confidential memories are gone: nothing in Counterparts could set that mark, so on most stores nothing changes on screen; a memory marked that way through the store directly now reads like any other everywhere, and doctor shows one amber line with how many remain only if your store had any. The split between your sessions and guest ones is gone too: any session, a Claude Desktop chat and the nightly run included, can close a thread or a reminder by its id from any folder (a protected memory still never closes), and every session gets its folder's "Last said here"; observer stays read-only. The nightly run no longer leaves a Claude Code transcript under `~/.claude/projects/`; transcripts from earlier nights are left to Claude Code's own cleanup, or you can delete the folder named after your memory store. The `owner` line in your configuration is now ignored and doctor names it under "Old settings" (you may delete it); `export --include-confidential`, the memory server's `--owner` and `COUNTERPARTS_OWNER` are accepted and ignored for this release. Code that embeds Counterparts loses the confidential fields and options listed below. No store-format change (store v13, cache v7) and no wiring change: nothing to run after upgrading from 0.3.29, and `counterparts connect` is not needed.
6
+
7
+ - **Confidential memories are gone: nothing is held back as confidential any more.** No
8
+ part of Counterparts could mark a memory confidential; only code calling the store
9
+ directly with a `confidential` meta key could. A memory marked that way is now recalled,
10
+ named, dreamed on, reflected on and written up like any other, in every session: the
11
+ owner's, a Claude Desktop chat, the night run and an observer. If your store had any,
12
+ they are counted once, at the first open after the upgrade, and `counterparts doctor`
13
+ shows one amber line with how many are still there (the ids are in `doctor --json`)
14
+ for as long as any remain, so you can remove any you don't want with
15
+ `counterparts remove <id>`. A store with none shows nothing.
16
+ - **A night may count a few more memories as new** on a store that had confidential
17
+ memories, since the dream's queue no longer leaves them out. The recall tool's
18
+ description no longer mentions confidentiality.
19
+ - **The dashboard, the sidebar and the console show every memory's words.** A memory
20
+ that carried the old confidential key reads like any other on every page (the card,
21
+ the list, search, Today, traits, the journal and the dreams), in the sidebar, in the
22
+ `remove` list and in `dream`, `night` and `core --list`, where the `[confidential]`
23
+ marker is gone.
24
+ - **`export --markdown` carries everything.** Every live memory, earlier wording,
25
+ dream and reflection is in the tree, and the manifest no longer has an "omitted"
26
+ line. `--include-confidential` is still accepted for one release, does nothing, and
27
+ says so in one line; it goes in the release after. Without `--markdown` it is still
28
+ refused by name, as before.
29
+ - **Doctor's mechanism census has one row fewer**: the "confidentiality" row is gone,
30
+ with the gate it counted.
31
+ - **Every session can close what it finds, from any folder.** A thread or a reminder
32
+ is closed by its id from whichever folder you are in, from any session: Claude Code,
33
+ a Claude Desktop chat, the nightly run's write-ups, and the reflection's `close`. A
34
+ protected memory is still never closed. Until now a session that was not "yours"
35
+ (a Desktop chat, the night run) could not close something written in another folder.
36
+ - **"Last said here" in every session.** Any session that opens in a folder gets the
37
+ wake's "Last said here" line and can recall "last exchange", a Desktop chat and the
38
+ night run included. Under observer it is still not given.
39
+ - **No more "owner".** `status` no longer reports `owner`, `ownerFrom` or `ownerMeans`;
40
+ doctor's Mode line just says "remembering" (or the observer line). `install` no
41
+ longer writes `"owner": true`; an existing configuration's `owner` is ignored and
42
+ named under doctor's "Old settings" (you may delete it). `COUNTERPARTS_OWNER` does
43
+ nothing now, and the memory server's `--owner` flag is accepted and ignored for one
44
+ release.
45
+ - **For code that embeds Counterparts: the confidential leftovers are gone from the
46
+ API.** `confidentialByMeta`, `isConfidential`, `StoredMemory.confidential`,
47
+ `TraitRead.confidential` / `withheld`, the `includeConfidential` option on the trait
48
+ reads and `{ confidential }` on `memoryCountsByScopeSince` / `planCandidates`, the
49
+ `confidential` member of `copiesOf` and `coreList()`, `MemoryRow.confidential` and
50
+ `RecallRow.confidential`, `WriterJournal.omitted`, the `confidential` member of the
51
+ page writer's `omit` predicate, and the verdict and refusal
52
+ names `confidential-withheld`, `handle-confidential-withheld`, `confidential` and
53
+ `other-directory` no longer exist; the dashboard's JSON rows no longer carry a
54
+ `confidential` field (nor the traits view a `withheld` one). Nothing changes on screen. `export --include-confidential` is
55
+ still accepted, and ignored, this release. With the yours/guest split, `OWNER_FALSE_NOTE` is
56
+ gone from `counterparts/mcp` (written at release from #568's diff).
57
+ - **The nightly run no longer leaves a Claude Code transcript behind.** Each night child
58
+ (the dream, the reflection, a write-up owed) used to be saved by Claude Code under
59
+ `~/.claude/projects/`, with the memories it read and the conversation it wrote up,
60
+ kept there until Claude Code's own cleanup (30 days by default) and out of reach of
61
+ Counterparts' own retention. It now runs with `--no-session-persistence`, so nothing is
62
+ saved there. Transcripts from earlier nights are not touched; Claude Code's cleanup
63
+ removes them in time, or you can delete the folder named after your memory store.
64
+
3
65
  ## 0.3.29 — 2026-10-21
4
66
 
5
67
  Personal news now travels between your folders: each night the reflection looks at up to 24 memories nobody marked (it was 5), the personal-looking ones first, and marks the ones about you or the two of you so every folder's wake can show them, while work notes stay in the folder they came from; the morning share names what it re-marked and how to have one marked back, and nothing written in a folder you set off or paused is offered or carried out. In the plugin's sidebar the fox goes to work while Claude's turn runs and sits back down when it ends. The self page now keeps which memories each sentence rests on, doctor gains two reading-only lines ("Self page claims" and "Core"), and the dashboard's Self page shows the page in layers across its kept versions. The mechanism counts now include a dream's folds and band rises, so Consolidation and Interference read higher and Reconsolidation lower than before. Most of these are experiments, to be checked in a few days. Update the plugin with this release for the working fox and for sidebar mechanism counts that match the dashboard's; a 0.3.28 plugin keeps working beside this core, with the older counts. No store-format change (store v13, cache v7) and no wiring change: nothing to run after upgrading from 0.3.28, and `counterparts connect` is not needed.
@@ -56,7 +56,7 @@ input — does `encode` shrink to gates-and-tagging inside `remember`'s pipeline
56
56
  | `fired.ts` | Which mechanisms have fired and which have gone quiet, read only from the store's rows — `counterparts mechanisms`, the dashboard's panel. Each entry names the module that does the work. |
57
57
  | `snapshots.ts` | The daily rotating snapshot and its rotation — the one place this package deletes a copy of the memory, and only what it can prove is a snapshot. |
58
58
  | `sidebar-status.ts` | The Claude Code sidebar's status file (`sidebar.json` beside the configuration): what the sidebar shows, built by the dashboard's view functions over an observer handle and written whole, by the worker after each boundary and by the memory server off its tool calls' path, so the sidebar makes no network request. |
59
- | `stance-env.ts` | `COUNTERPARTS_OBSERVER` / `COUNTERPARTS_OWNER`, read the way the explicit-dir guard is, each failing toward less power. Unset, the configuration's `owner: true` decides for a server Claude Code starts (`mcp/bin/serve.ts#ownerStance`, 2026-10-02). |
59
+ | `stance-env.ts` | `COUNTERPARTS_OBSERVER`, read the way the explicit-dir guard is, failing toward observer. (`COUNTERPARTS_OWNER` and the yours/guest split were removed 2026-10-21.) |
60
60
  | `log/` | A shared leaf with its own CONTRACT: the process log — one line per allowlisted event (failures, stand-downs, turn ends, write-ups, the night, the wake) from the hook, the worker, the nightly run and the MCP server, to `<dataDir>/sessions/log/<date>.log`, ids and codes only, kept 7 days. Read by `counterparts log` and one doctor line. **Added 2026-09-30**: none of the four processes wired its `onEvent`, so ~270 event names died with their process. |
61
61
 
62
62
  **The five largest files, split by concern (2026-10-11)** — moves only, for the plugin
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "counterparts",
3
- "version": "0.3.29",
3
+ "version": "0.3.30",
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": {
@@ -8,7 +8,7 @@ The launch adapter: wake injection at session start, the end-of-session write, a
8
8
  detection — everything host-specific, so the core stays host-agnostic. Session start is
9
9
  where this adapter delivers a wake; it is no longer the only place one is read, because
10
10
  since 2026-09-17 the core composes a read-only one into the crash fallback's prompt — the
11
- same composer, minus the prospective lane and minus anything protected or confidential —
11
+ same composer, minus the prospective lane and minus anything protected —
12
12
  and this adapter's interpret client put that prompt on the wire until 2026-09-24 (see
13
13
  §1a: the sweep no longer interprets here).
14
14
 
@@ -845,7 +845,11 @@ UUID the waiting process chose (2026-10-09), which keeps the children apart; and
845
845
  `--output-format stream-json --verbose` (2026-10-12; `-p` refuses `stream-json` without
846
846
  `--verbose`, measured on 2.1.296), its STDOUT kept in memory to 64 MiB
847
847
  (`child.ts#OUTPUT_MAX_BYTES`) and read once for the host's cut. The catch-up child's
848
- output is ignored. It
848
+ output is ignored. Every child, the plain retry included, also passes
849
+ `--no-session-persistence` (2026-10-21; checked on 2.1.306 with `--session-id` and
850
+ `stream-json`), so the host keeps no transcript of it under `~/.claude/projects`: its
851
+ words — memories it read, the conversation it wrote up — do not outlive this package's own
852
+ retention there. On a host too old to know the flag the night does not run. It
849
853
  starts in a NEUTRAL directory — the store's own — so no project's CLAUDE.md, hooks or MCP
850
854
  servers load. The parent's stance, `CLAUDE_PROJECT_DIR` and `CLAUDECODE` variables are
851
855
  removed; this package's values are written last.
@@ -2619,3 +2619,30 @@ running both, found confusing. The npm install now leaves `npm-live.json` beside
2619
2619
  (`plugin.ts#keepOne`), the plugin's id read off its install path, phrased for the person and asking nothing
2620
2620
  of the model. The folder-origin wording is unchanged.
2621
2621
 
2622
+ ## 2026-10-21 — no owner in the configuration
2623
+
2624
+ - Mike, 2026-10-21 12:18: "for 1, i agree, lets remove it." `install` no longer writes `owner: true`; a configuration that carries it (every
2625
+ earlier install) reads it, ignores it, and names it under doctor's "Old settings" for
2626
+ one release. Doctor's Mode line says "remembering" or the observer line, nothing
2627
+ about an owner. The night run's MCP configuration no longer sets
2628
+ `COUNTERPARTS_OWNER=0`.
2629
+
2630
+ ## 2026-10-21 — night children keep no Claude Code transcript
2631
+
2632
+ - `planNightChild` passes `--no-session-persistence` to every child (dream, reflection,
2633
+ catch-up, and the plain retry). Without it Claude Code saved each child's transcript under
2634
+ `~/.claude/projects/<the store's folder slug>/` — the memories it read and the
2635
+ conversation it wrote up — outside the 3-day/14-day span retention, reached only by the
2636
+ host's own `cleanupPeriodDays` (30 by default).
2637
+ - Nothing read those transcripts: the host cut comes from the child's `stream-json`
2638
+ (`readNightSpills`, since 10-12); `--session-id` only keeps the children apart; the
2639
+ child's hooks are QUIET (`nightRun`: `captureBoundary` takes no turns, no ask, no recall
2640
+ — `toHookInput` still tries `transcript_path`, finds nothing, and marks the turns
2641
+ unread, which only stands the echo skip and the pacer's rebase down, both moot for the
2642
+ night); the model a night's rows record comes from the launching session's record, not
2643
+ the child's.
2644
+ - Checked on the installed `claude` 2.1.306: `-p --no-session-persistence --session-id
2645
+ <uuid> --output-format stream-json --verbose` runs, echoes the session id and leaves no
2646
+ folder under `~/.claude/projects` for its directory.
2647
+ - `tools/harness/week.ts` drops the flag for its scripted person's turns, which
2648
+ `--resume` the session and whose hooks read its transcript.
@@ -355,7 +355,6 @@ export async function runOnce(input: {
355
355
  ...(config.injectionBudgetBytes === undefined
356
356
  ? {}
357
357
  : { budgetBytes: config.injectionBudgetBytes }),
358
- ...(config.owner === undefined ? {} : { owner: config.owner }),
359
358
  ...(config.timeZone === undefined ? {} : { timeZone: config.timeZone }),
360
359
  // The build stamps the wake it publishes, and a wake another build
361
360
  // published is re-rendered at step 3a (`version`, 2026-10-02).
@@ -61,8 +61,9 @@ export interface ChildPlan {
61
61
  /** The child's working directory; absent, this process's. */
62
62
  readonly cwd?: string;
63
63
  /** Keep what the child writes to STDOUT (2026-10-12): the nightly run reads
64
- * its own child's `stream-json` output rather than looking for the host's
65
- * transcript under `~/.claude/projects`. Absent, STDOUT is ignored. */
64
+ * what the host cut from its own child's `stream-json` output, the only
65
+ * record of the child there is (it runs with `--no-session-persistence`).
66
+ * Absent, STDOUT is ignored. */
66
67
  readonly captureOutput?: boolean;
67
68
  }
68
69
 
@@ -172,7 +172,7 @@ export function nightRunFindings(input: DoctorInput, store: Store): Finding[] {
172
172
  run.reason === "no-claude"
173
173
  ? "The headless run starts claude -p: put the claude command on the PATH the hooks see, or set dreaming to ask (counterparts dream --setting ask)."
174
174
  : run.reason === "quick-exit"
175
- ? "Run claude -p once by hand in a terminal to see why it stops (a login, an update prompt). Meanwhile the session asks instead."
175
+ ? "Run claude -p once by hand in a terminal to see why it stops (a login, an update prompt, or a claude too old for the night's flags — update it). Meanwhile the session asks instead."
176
176
  : run.reason === "nothing-ran"
177
177
  ? "The headless run needs the counterparts MCP server registered for claude at user scope (claude mcp list shows it); the server's own mcp.session rows say whether it refused the session."
178
178
  : "A later session starts it again, or asks when it cannot. counterparts dream --setting ask stops the headless runs.";
@@ -1,5 +1,5 @@
1
1
  /** `doctor`'s findings on the store upgrades v8 to v11, read from what each upgrade recorded (moved out of `doctor.ts`, 2026-10-11). */
2
- import { Store } from "../../core/store/index.js";
2
+ import { CONFIDENTIAL_RETIRED_KEY, Store, rowTombstoned } from "../../core/store/index.js";
3
3
  import { finding } from "./doctor-finding.js";
4
4
  import type { Finding } from "./doctor-finding.js";
5
5
 
@@ -234,5 +234,54 @@ export function upgradeV11Findings(store: Store): Finding[] {
234
234
  ];
235
235
  }
236
236
 
237
+ /**
238
+ * THE CONFIDENTIAL MARK, RETIRED (2026-10-21): the memories that carried it
239
+ * when this build first opened the store (`CONFIDENTIAL_RETIRED_KEY`, counted
240
+ * once). Nothing is withheld any more, so they surface like any other memory.
241
+ * The record is frozen; what is still there is read at report time — a
242
+ * recorded id the owner has since removed (denied or emptied) no longer
243
+ * counts. The record keeps the first 50 ids only; past those, the rest are
244
+ * counted as still there, and the line says so. Amber only while any remain,
245
+ * with the ids in `--json`; silent otherwise and on a store this build has
246
+ * not opened writable yet.
247
+ */
248
+ export function confidentialRetiredFindings(store: Store): Finding[] {
249
+ const record = metaJson(store, CONFIDENTIAL_RETIRED_KEY);
250
+ if (record === null) return [];
251
+ const count = metaNum(record["count"]);
252
+ if (count <= 0) return [];
253
+ const ids = Array.isArray(record["ids"]) ? record["ids"].filter((x): x is string => typeof x === "string") : [];
254
+ let denied: ReadonlySet<string>;
255
+ try {
256
+ denied = new Set(store.deniedIds());
257
+ } catch {
258
+ denied = new Set();
259
+ }
260
+ const still = ids.filter((id) => {
261
+ if (denied.has(id)) return false;
262
+ try {
263
+ const row = store.row(id);
264
+ return row !== undefined && !rowTombstoned(row);
265
+ } catch {
266
+ return true;
267
+ }
268
+ });
269
+ const unlisted = Math.max(0, count - ids.length);
270
+ const remaining = still.length + unlisted;
271
+ if (remaining <= 0) return [];
272
+ const day = typeof record["day"] === "string" && record["day"].length > 0 ? record["day"] : null;
273
+ const one = remaining === 1;
274
+ return [
275
+ finding(
276
+ "confidential-retired",
277
+ "amber",
278
+ "Confidential",
279
+ `${String(remaining)} ${one ? "memory" : "memories"} marked confidential through the store API ${one ? "is" : "are"} still here (${String(count)} when counted); ${day === null ? "since this version" : `since ${day}`} nothing is withheld, so ${one ? "it surfaces" : "they surface"} like any other memory${unlisted > 0 ? `; only the first ${String(ids.length)} were recorded by id, so the other ${String(unlisted)} are counted as still here` : ""}`,
280
+ `${still.length === 1 && unlisted === 0 ? "It is" : "They are"} listed in counterparts doctor --json. Remove any you don't want: counterparts remove <id>.`,
281
+ { count, remaining, ids: still.join(", "), unlisted, day },
282
+ ),
283
+ ];
284
+ }
285
+
237
286
  /** Mark changes the Reflection line reads, newest first; a read that comes back full is a floor. */
238
287
  export const MARK_ROWS = 10_000;
@@ -131,6 +131,7 @@ import {
131
131
  upgradeV9Findings,
132
132
  upgradeV10Findings,
133
133
  upgradeV11Findings,
134
+ confidentialRetiredFindings,
134
135
  } from "./doctor-upgrades.js";
135
136
  import {
136
137
  selfPageFindings,
@@ -165,6 +166,7 @@ export {
165
166
  upgradeV9Findings,
166
167
  upgradeV10Findings,
167
168
  upgradeV11Findings,
169
+ confidentialRetiredFindings,
168
170
  } from "./doctor-upgrades.js";
169
171
  export {
170
172
  dreamingFindings,
@@ -543,8 +545,8 @@ function configFindings(input: DoctorInput): Finding[] {
543
545
 
544
546
  // THE STANCE IS CALLED `Mode` NOW, and it is said in the words a person can
545
547
  // act on rather than in the configuration's (finding #20: "owner: this host
546
- // encodes" was named as the line nobody could read). The key and the `data`
547
- // are untouched, so every reader of the JSON sees what it always saw.
548
+ // encodes" was named as the line nobody could read). Since 2026-10-21 there
549
+ // is no yours/guest split to report: the line says observer or not.
548
550
  if (input.config.observer === true) {
549
551
  out.push(
550
552
  finding("stance", "amber", "Mode", "observer — reads memory, writes nothing", "Remove \"observer\" from the config to remember again.", {
@@ -552,22 +554,7 @@ function configFindings(input: DoctorInput): Finding[] {
552
554
  }),
553
555
  );
554
556
  } else {
555
- // WHOSE SESSIONS ARE THE OWNER'S, said plainly (2026-10-02): with the
556
- // install's `owner: true`, the hooks, the worker and — since that day —
557
- // the memory server Claude Code starts (`mcp/bin/serve.ts#ownerStance`).
558
- const owner = input.config.owner === true;
559
- out.push(
560
- finding(
561
- "stance",
562
- "green",
563
- "Mode",
564
- owner
565
- ? "remembering; your Claude Code sessions are the owner's (confidential memories are said in them, and an open question can be closed from any directory); a Claude Desktop chat is not; COUNTERPARTS_OWNER=0 on the memory server's launch turns it off for the memory server, and the hooks follow this configuration"
566
- : "remembering; no session is the owner's (the configuration has no \"owner\": true), so confidential memories stay out of the tools' answers",
567
- "",
568
- { observer: false, owner },
569
- ),
570
- );
557
+ out.push(finding("stance", "green", "Mode", "remembering", "", { observer: false }));
571
558
  }
572
559
  return out;
573
560
  }
@@ -3397,6 +3384,8 @@ export function doctorFindings(input: DoctorInput): Finding[] {
3397
3384
  // v10 (2026-09-29): what the upgrade carried, and the week's contradictions.
3398
3385
  ["upgrade-v10", () => upgradeV10Findings(store)],
3399
3386
  ["upgrade-v11", () => upgradeV11Findings(store)],
3387
+ // 2026-10-21: memories that carried the retired confidential mark, counted once. Silent at 0.
3388
+ ["confidential-retired", () => confidentialRetiredFindings(store)],
3400
3389
  // v12 (2026-10-03): the writer's three fields, and the subject links. Two aggregates.
3401
3390
  ["write-fields", () => writeFieldFindings(store)],
3402
3391
  // 2026-10-10: the old-claims era — on or off, and how many it reads at today's default (lower, higher).
@@ -182,7 +182,6 @@ export function openAdapter(
182
182
  ? {}
183
183
  : { budgetBytes: config.injectionBudgetBytes }),
184
184
  ...(config.observer === undefined ? {} : { observer: config.observer }),
185
- ...(config.owner === undefined ? {} : { owner: config.owner }),
186
185
  ...(config.timeZone === undefined ? {} : { timeZone: config.timeZone }),
187
186
  // Owner ruling D3 on #256: `pageWriter.mode: off` stops the reflection's page write too.
188
187
  ...(config.pageWriter?.mode === undefined ? {} : { pageWriterMode: config.pageWriter.mode }),
@@ -48,7 +48,13 @@
48
48
  * directory reaches the MCP server as its pinned scope instead;
49
49
  * - `--max-turns` bounds it beside the watchdog;
50
50
  * - `--session-id` names its session with a UUID this process chose
51
- * (2026-10-09), so its transcript can be read once it exits.
51
+ * (2026-10-09), which keeps the children apart;
52
+ * - `--no-session-persistence` (2026-10-21): Claude Code keeps no
53
+ * transcript of the child under `~/.claude/projects`. Its words — the
54
+ * memories it read and the conversation it wrote up — would otherwise
55
+ * sit there outside this package's retention, for as long as the host
56
+ * keeps old sessions. Nothing reads one: what the host cut is read from
57
+ * the child's own `stream-json` output (`readNightSpills`).
52
58
  * What is left and not allowed stops at a prompt nobody can answer, which is
53
59
  * the direction this should fail in. The parent's stance variables are
54
60
  * removed from its environment; this package's own values are written last.
@@ -84,7 +90,7 @@ import { CONFIG_ENV as CONFIG_PATH_ENV } from "../config-path.js";
84
90
  import { entryScript, scriptArgs } from "../runtime.js";
85
91
  import { TOOL_RESULT_CEILING } from "../../core/fit/index.js";
86
92
  import { installedVersion } from "../sessions.js";
87
- import { OBSERVER_ENV, OWNER_ENV } from "../stance-env.js";
93
+ import { OBSERVER_ENV } from "../stance-env.js";
88
94
 
89
95
  import { TUNABLES } from "../config.js";
90
96
  import type { AdapterConfig } from "../config.js";
@@ -183,12 +189,11 @@ export const NIGHT_MCP_SCRIPT = entryScript(new URL("../mcp/bin/serve.ts", impor
183
189
  * a session id.
184
190
  */
185
191
  export function nightMcpConfig(input: { runtime: string; dataDir: string; configPath?: string; session: string; scope: string; child?: NightChild; run?: string }): string {
186
- // NOT THE OWNER'S, SAID (2026-10-02): a server Claude Code starts is the
187
- // owner's by default now, and `claude -p` is Claude Code. The headless run
188
- // keeps the stance it always had — confidential memories stay out of its
189
- // bundles and its write-ups close no thread opened elsewhere — until that
190
- // is decided on its own.
191
- const env: Record<string, string> = { [DATA_DIR_ENV]: input.dataDir, [OWNER_ENV]: "0" };
192
+ // No stance of its own (2026-10-21): the yours/guest split is gone, so the
193
+ // night run is answered like any session (until then it ran with
194
+ // `COUNTERPARTS_OWNER=0`, so its write-ups closed no thread opened
195
+ // elsewhere and its server gave out no last exchange).
196
+ const env: Record<string, string> = { [DATA_DIR_ENV]: input.dataDir };
192
197
  if (input.configPath !== undefined && input.configPath.length > 0) env[CONFIG_PATH_ENV] = input.configPath;
193
198
  if (input.session.length > 0) env[SESSION_ENV] = input.session;
194
199
  if (input.scope.length > 0) env[SCOPE_ENV] = input.scope;
@@ -373,15 +378,15 @@ export interface NightChildInput {
373
378
  readonly timeoutMs?: number;
374
379
  /**
375
380
  * The child's OWN session id, a fresh UUID (`--session-id`, 2026-10-09).
376
- * Absent, the host mints one (the catch-up child).
381
+ * Absent, the host mints one (the catch-up child and the plain retry).
377
382
  */
378
383
  readonly hostSession?: string;
379
384
  /**
380
385
  * Read the child's own output (2026-10-12): `--output-format stream-json
381
386
  * --verbose`, kept by the starter (`ChildPlan.captureOutput`), so what the
382
- * host cut is read from what the child said rather than from the host's
383
- * transcript under `~/.claude/projects`. Absent, its output is ignored (the
384
- * catch-up child).
387
+ * host cut is read from what the child said (the host keeps no transcript
388
+ * of a night child, `--no-session-persistence`). Absent, its output is
389
+ * ignored (the catch-up child and the plain retry).
385
390
  */
386
391
  readonly readOutput?: boolean;
387
392
  }
@@ -399,6 +404,10 @@ export function planNightChild(input: NightChildInput): NightChildPlan {
399
404
  const dataDir = input.config.dataDir ?? "";
400
405
  const args = [
401
406
  "-p",
407
+ // NO TRANSCRIPT ON DISK (2026-10-21): see the header. Every child, the
408
+ // plain retry below included: a host too old to know the flag refuses it,
409
+ // and the night is not run rather than run with a transcript left behind.
410
+ "--no-session-persistence",
402
411
  "--allowedTools",
403
412
  (input.tools ?? NIGHT_TOOLS).join(","),
404
413
  "--disallowedTools",
@@ -947,7 +956,8 @@ async function runNightChild(
947
956
  ): Promise<NightChildOutcome> {
948
957
  // THE CHILD'S OWN SESSION, CHOSEN HERE (2026-10-09). Its transcript was
949
958
  // once looked up by this name; since 2026-10-12 the cut is read from the
950
- // child's own output instead, and the name only keeps the children apart.
959
+ // child's own output instead, since 2026-10-21 the host keeps no transcript
960
+ // of it at all, and the name only keeps the children apart.
951
961
  const hostSession = randomUUID();
952
962
  const plan = planNightChild({ ...childInput, hostSession, readOutput: true });
953
963
  const childAt = now();
@@ -1095,7 +1105,6 @@ export function openNightCounterpart(config: AdapterConfig, onEvent?: (e: Counte
1095
1105
  ...(config.dataDir === undefined ? {} : { dir: config.dataDir }),
1096
1106
  ...(config.snapshots?.dir === undefined ? {} : { snapshotsDir: config.snapshots.dir }),
1097
1107
  ...(config.injectionBudgetBytes === undefined ? {} : { budgetBytes: config.injectionBudgetBytes }),
1098
- ...(config.owner === undefined ? {} : { owner: config.owner }),
1099
1108
  ...(config.timeZone === undefined ? {} : { timeZone: config.timeZone }),
1100
1109
  ...(config.pageWriter?.mode === undefined ? {} : { pageWriterMode: config.pageWriter.mode }),
1101
1110
  ...(config.identity === undefined ? {} : { identity: { name: config.identity.name, aliases: [...(config.identity.aliases ?? [])] } }),
@@ -180,10 +180,11 @@ snapshots and exports; the removal record; telemetry by reference.
180
180
  report names which ran: the whole store as one SQLite file through `VACUUM INTO`, or
181
181
  `--markdown`, a readable tree — one file per memory grouped by kind, the journal as is,
182
182
  the self page as its own file, `--with-versions` for every earlier wording. **Filenames
183
- are ids, never titles.** The markdown tree **omits confidential rows unless
184
- `--include-confidential`, and says how many it omitted** — in the terminal and in a
185
- manifest inside the tree, at zero as well, because a directory that does not say what
186
- is missing from it reads as complete. Removed rows are never exported; a row that will
183
+ are ids, never titles.** A manifest inside the tree says what is in it and what is
184
+ not, because a directory that does not say what is missing from it reads as complete.
185
+ (Until 2026-10-21 the tree also omitted confidential rows unless
186
+ `--include-confidential`, and counted them; nothing is omitted as confidential now,
187
+ and the flag is accepted and ignored, with a line on stderr, for one release.) Removed rows are never exported; a row that will
187
188
  not render is named by its id rather than silently absent. **`--markdown --passphrase`
188
189
  is supported properly** — the tree is rendered into memory, sealed, and only then
189
190
  written, so that path has no scratch anywhere. It refuses a non-empty target unless
@@ -195,9 +196,8 @@ snapshots and exports; the removal record; telemetry by reference.
195
196
  report says which.*
196
197
  *Extended 2026-10-09.* The tree also holds one file per dream (`dreams/`: its journal
197
198
  and its changes) and per reflection (`reflections/`: what it was asked, its entry, its
198
- morning share and what became of it), dated like the journal. A dream or reflection
199
- that was shown, changed or cites a memory that is confidential now is left out unless
200
- `--include-confidential`, and counted apart from memory rows, at zero as well.
199
+ morning share and what became of it), dated like the journal. Each night's file names
200
+ the other's; a night whose file cannot be written is named rather than absent.
201
201
  8. **[M] Backups never leave the machine and never throw** — a backup problem must not
202
202
  block a consolidation cycle.
203
203
  9. **[M] Reads are pure.** Inspecting the protected list or the census writes nothing and
@@ -613,15 +613,12 @@ The standalone verb does not ask either: typing it is the yes.*
613
613
  one back to ordinary fading through `Counterpart.demoteCore`, which requires the
614
614
  reason, records it, restarts fading from today and keeps the lanes from promoting it
615
615
  again. Neither command is on `OWNER_OPS`: like `self-page`, reading works from an
616
- instrument, and the write refuses at the core's own seam under observer. Confidential
617
- rows print as `[confidential]`.
616
+ instrument, and the write refuses at the core's own seam under observer.
618
617
  *Extended 2026-10-20.* `counterparts night` prints the same lines with no write at all:
619
618
  the recent dreams and reflections, `last` (the newest dream and the reflection after
620
619
  it), `last-reflection`, or one by id (`show <id>` means the same). It always opens the
621
620
  store as an observer, so a session can run it to review the night with the owner — a
622
621
  host's safety check refuses `dream`, which also undoes. `--undo` stays on `dream`.
623
- A reflection's entry whose memory is marked confidential prints as `[confidential]`,
624
- like any confidential row (review of #538), here and under `dream --show`.
625
622
 
626
623
  ## 6. Scars honored
627
624
 
@@ -2080,3 +2080,15 @@ door the plugin's `/counterparts:uninstall` drives.
2080
2080
  delete itself has to happen with Claude Code closed: the person runs the launcher in a
2081
2081
  terminal (`sh <plugin root>/src/adapters/plugin-run.sh cli uninstall`, the plan's
2082
2082
  `terminalArgs` after the launcher) and answers there.
2083
+
2084
+ ## 2026-10-21 — export, remove and dream lists: nothing is held back as confidential
2085
+
2086
+ - `export --markdown` carries every live row, every earlier wording and every night.
2087
+ `confidentialNote`, `restsOnConfidential` and the manifest's omitted lines are
2088
+ gone; `NightFate` is `{path} | {left: "unrenderable"}`. `--include-confidential`
2089
+ is accepted and ignored for one release, with one stderr line; it is still refused
2090
+ by name without `--markdown`, beside `--with-versions`. `ExportReport`'s
2091
+ `omittedConfidential`, `omittedDreams` and `omittedReflections` stay at 0, marked
2092
+ deprecated, for the same release; the `store.export` row no longer carries them.
2093
+ - The `remove` list and `dream` / `night` / `core --list` lost their `[confidential]`
2094
+ markers; `[journal]` and the body fallback stay.
@@ -318,7 +318,6 @@ export async function recallCommand(
318
318
  {
319
319
  counterpart,
320
320
  sessionId: "console",
321
- owner: true,
322
321
  vector: embedded.vector,
323
322
  semantic: embedded.semantic,
324
323
  asker: parsed.flags["voiced"] === true ? "self" : "owner",
@@ -330,7 +329,7 @@ export async function recallCommand(
330
329
  return EXIT.ok;
331
330
  }
332
331
  const facts = factsRecall(
333
- { counterpart, sessionId: "console", owner: true, vector: embedded.vector, semantic: embedded.semantic },
332
+ { counterpart, sessionId: "console", vector: embedded.vector, semantic: embedded.semantic },
334
333
  question,
335
334
  page,
336
335
  );
@@ -357,7 +356,7 @@ export async function recallCommand(
357
356
  );
358
357
  return EXIT.ok;
359
358
  }
360
- const result = deliberateRecall(counterpart, { handle: idFlag }, { sessionId: "console", owner: true });
359
+ const result = deliberateRecall(counterpart, { handle: idFlag }, { sessionId: "console" });
361
360
  if (parsed.flags["json"] === true) {
362
361
  io.out(JSON.stringify(result, null, 2));
363
362
  return EXIT.ok;
@@ -567,6 +566,12 @@ export function exportCommand(
567
566
  }
568
567
  try {
569
568
  const markdown = flags["markdown"] === true;
569
+ // IGNORED FOR ONE RELEASE (2026-10-21): nothing is held back as
570
+ // confidential any more. The flag is still accepted, so scripts keep
571
+ // working, and said once; it goes in the release after.
572
+ if (flags["include-confidential"] === true) {
573
+ io.err("--include-confidential: nothing is held back any more; the flag does nothing and will be removed.");
574
+ }
570
575
  const report = exportStore(store, {
571
576
  target: out,
572
577
  ...(typeof flags["passphrase"] === "string" ? { passphrase: flags["passphrase"] } : {}),
@@ -591,7 +596,8 @@ export function exportCommand(
591
596
  "Not included: spans/ — the raw captured conversation, deleted 3 days after a session is written up and ended, and never kept more than 14 days.",
592
597
  );
593
598
  // THE DURABLE ROW. Counts and flags only: which kind, how many rows went,
594
- // how many confidential ones were left out, whether it was sealed. NOT the
599
+ // whether it was sealed. (Until 2026-10-21 it also carried how many
600
+ // confidential ones were left out; readers stay tolerant of old rows.) NOT the
595
601
  // target — where the owner sent his memories is more than the row needs to
596
602
  // prove the door works (§5 G10), and the terminal has already said it.
597
603
  if (!observer) {
@@ -606,15 +612,12 @@ export function exportCommand(
606
612
  files: report.files,
607
613
  bytes: report.bytes,
608
614
  rows: report.rows,
609
- omittedConfidential: report.omittedConfidential,
610
615
  versions: flags["with-versions"] === true,
611
616
  notRendered: report.notRendered.length,
612
617
  // The nights, counted apart from `rows` (2026-10-09): the
613
618
  // dashboard reads `rows` as memories.
614
619
  dreams: report.dreams,
615
620
  reflections: report.reflections,
616
- omittedDreams: report.omittedDreams,
617
- omittedReflections: report.omittedReflections,
618
621
  },
619
622
  });
620
623
  } catch {
@@ -611,19 +611,13 @@ function inspectForRemoval(
611
611
  /**
612
612
  * `mem_xxx fact — what it is about (2026-09-22)`, and nothing wider.
613
613
  *
614
- * TWO MARKERS, both of them saying what a bare kind would not:
615
- *
616
- * - **`[journal]`** — the owner's ruling of 2026-09-04 (LAUNCH-STATUS §I14),
617
- * in the same place and the same word `recall` prints it: a chapter is
618
- * recallable and is never presented as a memory. The lexical index holds
619
- * episode rows, so without it a day's account comes up looking like a fact
620
- * under a question that says "delete this memory for good".
621
- * - **`[confidential]`** — review m1. `export` omits confidential memories by
622
- * default *even for the owner* and makes him pass `--include-confidential`;
623
- * this list may not be the one owner-facing surface that prints one of them
624
- * unmarked. With the marker on, `summaryOf` also stops falling back to the
625
- * body for it: a confidential memory's first line is exactly the string
626
- * that door exists to keep off a screen nobody asked to see it on.
614
+ * ONE MARKER, saying what a bare kind would not: **`[journal]`** — the
615
+ * owner's ruling of 2026-09-04 (LAUNCH-STATUS §I14), in the same place and the
616
+ * same word `recall` prints it: a chapter is recallable and is never presented
617
+ * as a memory. The lexical index holds episode rows, so without it a day's
618
+ * account comes up looking like a fact under a question that says "delete this
619
+ * memory for good". (A `[confidential]` marker stood beside it until that mark
620
+ * was retired, 2026-10-21.)
627
621
  */
628
622
  function candidateLine(row: {
629
623
  id: string;
@@ -631,10 +625,9 @@ function candidateLine(row: {
631
625
  kind: string;
632
626
  title: string | null;
633
627
  body: string;
634
- confidential: number;
635
628
  learned_on: string;
636
629
  }): string {
637
- const marks = `${row.type === "episode" ? "[journal] " : ""}${row.confidential === 1 ? "[confidential] " : ""}`;
630
+ const marks = row.type === "episode" ? "[journal] " : "";
638
631
  return `${row.id} ${marks}${row.kind} — ${summaryOf(row)} (${row.learned_on})`;
639
632
  }
640
633
 
@@ -643,15 +636,9 @@ function candidateLine(row: {
643
636
  * line and cut to fit, because a candidate list whose rows wrap is a list whose
644
637
  * numbers stop lining up. The cut is at a width, not at a word: this is a label
645
638
  * for choosing by, and the memory itself is one `counterparts ask --id` away.
646
- *
647
- * **A CONFIDENTIAL memory never falls back to its body** (review m1): it is
648
- * `(untitled)` and the marker beside it says which kind of untitled. The line
649
- * is then kind, date and two markers — enough to choose by, since the person
650
- * searched the words that found it, and none of the words themselves.
651
639
  */
652
- function summaryOf(row: { title: string | null; body: string; confidential: number }): string {
640
+ function summaryOf(row: { title: string | null; body: string }): string {
653
641
  const titled = row.title !== null && row.title.trim().length > 0;
654
- if (!titled && row.confidential === 1) return "(untitled)";
655
642
  const raw = titled ? row.title ?? "" : (row.body.split("\n").find((line) => line.trim().length > 0) ?? "");
656
643
  const one = raw.replace(/\s+/g, " ").trim();
657
644
  if (one.length === 0) return "(no words)";
@@ -762,7 +762,7 @@ const FLAG_HELP: Record<string, string> = {
762
762
  markdown:
763
763
  "export the readable markdown tree instead of the database file: memories, the journal, the self page, and a file per dream and per reflection (its README says what is where)",
764
764
  "include-confidential":
765
- "include confidential memories in the markdown tree, and the dreams and reflections that rest on one (they are omitted, and counted, by default)",
765
+ "ignored: nothing is held back as confidential any more (accepted for one release, then removed; still markdown only)",
766
766
  // NOT `--versions`: `self-page` takes both `--versions` and `--version`, and
767
767
  // the help-page totality test reads flags as substrings — an `export
768
768
  // --versions` puts the string `--version` on export's page, where it names a