counterparts 0.3.54 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/CHANGELOG.md +215 -0
  2. package/LICENSE +114 -21
  3. package/README.md +15 -4
  4. package/docs/QUICKSTART.md +23 -0
  5. package/docs/manual.md +31 -3
  6. package/docs/module-map.md +2 -0
  7. package/package.json +3 -3
  8. package/src/adapters/claude-code/CONTRACT.md +18 -0
  9. package/src/adapters/claude-code/INTERFACE-GAPS.md +5 -0
  10. package/src/adapters/claude-code/NOTES.md +123 -0
  11. package/src/adapters/claude-code/bin/hook.ts +5 -0
  12. package/src/adapters/claude-code/bin/runner.ts +21 -1
  13. package/src/adapters/claude-code/doctor.ts +38 -0
  14. package/src/adapters/claude-code/envelope.ts +5 -1
  15. package/src/adapters/claude-code/hooks.ts +99 -3
  16. package/src/adapters/claude-code/night-run.ts +2 -1
  17. package/src/adapters/claude-code/noticing.ts +339 -0
  18. package/src/adapters/claude-code/transcript.ts +141 -7
  19. package/src/adapters/cli/NOTES.md +9 -0
  20. package/src/adapters/cli/codex.ts +223 -0
  21. package/src/adapters/cli/commands-install.ts +55 -8
  22. package/src/adapters/cli/commands-readings.ts +32 -7
  23. package/src/adapters/cli/commands.ts +12 -9
  24. package/src/adapters/cli/index.ts +1 -0
  25. package/src/adapters/cli/mechanisms.ts +3 -1
  26. package/src/adapters/codex/CONTRACT.md +69 -0
  27. package/src/adapters/codex/INTERFACE-GAPS.md +78 -0
  28. package/src/adapters/codex/NOTES.md +37 -0
  29. package/src/adapters/codex/adapter.ts +248 -0
  30. package/src/adapters/codex/bin/hook.ts +210 -0
  31. package/src/adapters/codex/doctor.ts +171 -0
  32. package/src/adapters/codex/envelope.ts +41 -0
  33. package/src/adapters/codex/index.ts +58 -0
  34. package/src/adapters/codex/transcript.ts +216 -0
  35. package/src/adapters/codex/wire.ts +468 -0
  36. package/src/adapters/codex/words.ts +104 -0
  37. package/src/adapters/config.ts +120 -0
  38. package/src/adapters/dashboard/registries.ts +3 -0
  39. package/src/adapters/dashboard/web/flow.ts +2 -0
  40. package/src/adapters/dashboard/web/lanes.ts +1 -0
  41. package/src/adapters/dashboard/web/narrate.ts +17 -0
  42. package/src/adapters/dashboard/web/pages/memories/sections/search.js +6 -3
  43. package/src/adapters/fired.ts +11 -0
  44. package/src/adapters/hosts.ts +46 -0
  45. package/src/adapters/lifecycle.ts +71 -7
  46. package/src/adapters/mcp/CONTRACT.md +162 -11
  47. package/src/adapters/mcp/NOTES.md +346 -0
  48. package/src/adapters/mcp/bin/serve.ts +13 -2
  49. package/src/adapters/mcp/facts.ts +455 -53
  50. package/src/adapters/mcp/index.ts +7 -0
  51. package/src/adapters/mcp/meaning.ts +10 -3
  52. package/src/adapters/mcp/server-args.ts +1281 -7
  53. package/src/adapters/mcp/server-options.ts +13 -0
  54. package/src/adapters/mcp/server-session-end.ts +129 -52
  55. package/src/adapters/mcp/server-words.ts +4 -2
  56. package/src/adapters/mcp/server.ts +446 -71
  57. package/src/adapters/mcp/tools.ts +558 -1091
  58. package/src/adapters/mcp/write-up.ts +21 -4
  59. package/src/adapters/remote/bin/serve-http.ts +2 -0
  60. package/src/adapters/remote/http.ts +9 -1
  61. package/src/adapters/runtime.ts +4 -1
  62. package/src/adapters/spawn.ts +12 -0
  63. package/src/adapters/update-check.ts +1 -1
  64. package/src/core/briefing.ts +20 -7
  65. package/src/core/counterpart-boundary.ts +13 -0
  66. package/src/core/counterpart-deposit.ts +141 -14
  67. package/src/core/counterpart-events.ts +23 -0
  68. package/src/core/counterpart-types.ts +80 -1
  69. package/src/core/counterpart-wake-news.ts +23 -8
  70. package/src/core/counterpart-wake-shape.ts +134 -36
  71. package/src/core/counterpart.ts +99 -27
  72. package/src/core/dream/CONTRACT.md +15 -1
  73. package/src/core/dream/NOTES.md +64 -0
  74. package/src/core/dream/index.ts +33 -11
  75. package/src/core/dream/reflect.ts +149 -14
  76. package/src/core/dream/slices.ts +17 -2
  77. package/src/core/feelings-wheel.ts +154 -0
  78. package/src/core/handoff/last-exchange.ts +27 -7
  79. package/src/core/mint.ts +27 -0
  80. package/src/core/owner-waits.ts +135 -12
  81. package/src/core/prospective/NOTES.md +113 -1
  82. package/src/core/prospective/index.ts +70 -15
  83. package/src/core/reader-note.ts +235 -0
  84. package/src/core/recall/CONTRACT.md +25 -4
  85. package/src/core/recall/NOTES.md +178 -0
  86. package/src/core/recall/cues.ts +110 -3
  87. package/src/core/recall/gate.ts +14 -0
  88. package/src/core/recall/index.ts +197 -2
  89. package/src/core/recall/render.ts +7 -1
  90. package/src/core/recall/standing.ts +87 -10
  91. package/src/core/recall/time-ask.ts +276 -4
  92. package/src/core/recall/tunables.ts +16 -0
  93. package/src/core/reconsolidation.ts +59 -14
  94. package/src/core/remember/proposals.ts +8 -1
  95. package/src/core/schemas/NOTES.md +6 -0
  96. package/src/core/schemas/index.ts +25 -2
  97. package/src/core/schemas/tags.ts +7 -1
  98. package/src/core/schemas/types.ts +2 -0
  99. package/src/core/self/CONTRACT.md +46 -5
  100. package/src/core/self/NOTES.md +158 -0
  101. package/src/core/self/briefing-delivery.ts +11 -4
  102. package/src/core/self/briefing-room.ts +4 -2
  103. package/src/core/self/briefing.ts +14 -5
  104. package/src/core/self/episodes.ts +24 -1
  105. package/src/core/self/identity.ts +4 -0
  106. package/src/core/self/index.ts +75 -16
  107. package/src/core/self/set-down.ts +33 -0
  108. package/src/core/self/tunables.ts +18 -3
  109. package/src/core/self/writer.ts +107 -16
  110. package/src/core/sleep/CONTRACT.md +2 -1
  111. package/src/core/sleep/NOTES.md +13 -0
  112. package/src/core/sleep/consolidate.ts +8 -1
  113. package/src/core/sleep/cycle.ts +12 -2
  114. package/src/core/sleep/dedup.ts +8 -0
  115. package/src/core/sleep/types.ts +26 -0
  116. package/src/core/store/NOTES.md +7 -0
  117. package/src/core/store/errors.ts +5 -0
  118. package/src/core/store/index.ts +18 -3
  119. package/src/core/store/reads-memories.ts +29 -1
  120. package/src/core/store/shapes.ts +6 -0
  121. package/src/core/store/wave2.ts +34 -15
  122. package/src/core/time.ts +721 -0
  123. package/src/core/types.ts +9 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,220 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.1 — 2026-11-30
4
+
5
+ A fixes release. The main one: recent Claude Code versions (from about 2.1.308) also write a copy of every message they send the model into the transcript, and Counterparts read those copies as conversation, so your words and replies were captured twice, the host's own lines ("Tool loaded.", system reminders) could reach memory and the start of a session's "Last said" line, and the end-of-session ask came early. Capture now skips them; a session already under way keeps its place, and what was captured before stays as it is. If Claude Code ever writes a kind of transcript line Counterparts doesn't know, doctor shows an amber "Transcript lines" with its name and count. Recall also stops reading the host's framing around another session's message or a subagent's report as your words, facts answers stop repeating a short memory's words under its own title, and settling two memories says to send the settle alone. No store-format change (store v15, cache v7), no migration, and no `counterparts connect`: after upgrading, restart the dashboard and every open Claude Code session. Going back to 0.4.0 is a reinstall with no store restore: `counterparts disconnect`, 0.4.0's install, then `counterparts connect`.
6
+
7
+ - **Settling two memories says to send the settle alone.** The `settle` field and the hint
8
+ that comes back with a write's neighbours now say: send settle by itself, the reason in
9
+ `why`; a `text` sent beside it is stored as a separate new memory. A writer had been
10
+ sending the new value as text too, and it was kept as a duplicate.
11
+ - **A facts answer no longer says a short memory twice.** When a memory with no title (or
12
+ a title that is its words) fits whole on its numbered head line, its words aren't
13
+ repeated beneath it. A longer memory, or one whose title is only the start of its words,
14
+ still ends with its words.
15
+ - Asking for facts no longer repeats a short memory's words under a title that says the same, apart from a leading "the", the case of its first letter, or a closing period.
16
+ - `counterparts dream --help` no longer calls `ask` the default: a new install starts on `auto`; a memory started with `start-fresh`, or one with no setting, reads `ask`.
17
+ - Recall no longer reads the host's framing around another session's message or a subagent's report as the person's words: the lead-in line, the sender's tag, the hand-back note and the fixed footer are dropped, and the message itself is kept. A message another session sends in the middle of a turn no longer shows up in the wake's "Last said" line as yours.
18
+ - **Capture no longer reads the host's copies of what it sent the model as conversation.**
19
+ Recent Claude Code versions (seen from 2.1.308) also write into the transcript a copy of
20
+ every request message. These were taken for turns, so the person's words and replies were
21
+ captured twice, the host's own lines ("Tool loaded.", system reminders) reached memory and
22
+ the wake's "Last said" line, tool calls and recall lookups were counted twice, and the
23
+ end-of-session ask counted the copies as typed turns and came early. A session already
24
+ part-way through keeps its place: nothing is captured again and nothing new is skipped.
25
+ What was captured that way before stays as it is.
26
+ - **Doctor says so if a transcript line of an unrecognised kind was passed over.** Capture now
27
+ reads turns only from the transcript's ordinary user and assistant lines; any other line
28
+ that names a speaker is counted by its kind on each session-end record, and a kind not known
29
+ to be safe shows as an amber "Transcript lines" with its name and count (never its text).
30
+
31
+ ## 0.4.0 — 2026-11-26
32
+
33
+ **From 0.4.0, Counterparts is source-available under the Business Source License 1.1, not MIT; 0.3.54 and every earlier version stay MIT.** Using it stays free for everyone, personally or at work, at a company of any size; building it into a product or service you offer others, or offering it as a hosted or API service, needs a commercial license, and each version becomes Apache 2.0 four years after its release. What you'll notice: on hosted, the sign-in email also carries a 6-digit code, the emailed link works in any browser after one press, and the account page opens with your dashboard and the setup steps. The memory tools take far less of every session's context (their text went from about 90,700 characters to about 26,300), `recall` is loaded from the start in Claude Code, and `remember` keeps a memory even when one of its fields can't be read, saying what it left out. Asking for facts reads a range of days and can look ahead ("next week"), and lists what else is due then. The start of a session no longer puts the same open item in front of you every day, dates "Coming up" by the sentence that names the day, and now carries a letter or person you wrote down in one folder into the next session in another, naming that folder. OpenAI's Codex can now use the same memory (`counterparts connect --host codex`, reading it as itself, not as your counterpart). In Claude Code, when a turn reads documents, web pages or letters, or sends a letter, and nothing is kept with `remember`, the end of the turn adds one line saying how many (never what or from whom); turn it off with `"noticing": {"enabled": false}` in `claude-code.json`. No store-format change (store v15, cache v7), no migration, and no `counterparts connect`: after upgrading, restart the dashboard and every open Claude Code session. Going back to 0.3.54 is a reinstall with no store restore: `counterparts disconnect`, 0.3.54's install, then `counterparts connect`.
34
+
35
+ - **Codex can use the same memory.** `counterparts connect --host codex` adds four hooks to Codex's
36
+ `hooks.json` and a `counterparts` MCP server to its `config.toml` (both backed up first); then approve the hooks with
37
+ `/hooks` in Codex and restart it. Codex gets the wake, recall on each prompt, the end-of-session ask and turns kept
38
+ for write-up; it reads the memory as itself, not as your counterpart, and its memories are labelled with Codex and
39
+ the model. No dreams, reflection or self page run there, and Windows isn't wired yet. `counterparts disconnect
40
+ --host codex` takes out only what connect added. Details in QUICKSTART's "Codex (new)".
41
+ - **Hosted: an hourly cap on sign-up emails while spots are open.** While anyone can sign up by email, hosted counts
42
+ the sign-in asks each hour; once 100 are counted (the operator changes it with `spots emails M`), a new address
43
+ waits for the next hour and the page says "lots of people are signing up right now" to everyone alike. People
44
+ with an account, or a live invite code, still get their link. The count is kept in the control database, so a deploy doesn't
45
+ reset it.
46
+ - **Hosted (claude.ai): a lighter, plainer tool list, ready for Anthropic's connector directory.** The tools
47
+ claude.ai loads are about 40% smaller (67 KB to 40 KB) and say plainly what each does; Memory status and recall are
48
+ marked read-only (they save and delete nothing), and deleting a memory is its own tool, `delete_memory`, marked as
49
+ one that deletes (hidden at once, erased after 24 hours, undo before then, as before). Claude Code's and Claude
50
+ Desktop's tools are unchanged.
51
+ - **Hosted: Claude Code can sign in.** Adding `https://app.counterparts.ai/mcp` to Claude Code now completes the
52
+ sign-in (it was refused with "invalid_redirect_uri").
53
+ - **Hosted: clearer error messages.** A refused request says what happened and what to do, instead of a bare number.
54
+ - **Hosted: account events and a deleted account's record are kept 12 months, then erased.** The record of account
55
+ events (sign-ups, sign-ins, connections, exports, deletes: codes and ids, never content) used to be kept with no
56
+ end. Now a row is erased 365 days after it was written. When an account is deleted, what's left of it (the marker
57
+ that it existed and its event rows, with no email) is erased 365 days after the deletion. The account page's beta
58
+ note, the deletion pages and the deletion email say so.
59
+ - **From 0.4.0, Counterparts is source-available under the Business Source License 1.1, not MIT.** Using it
60
+ stays free for everyone, personally or at work, at a company of any size. Building it into a product
61
+ or service you offer others, or offering it as a hosted or API service, needs a commercial license.
62
+ Each version becomes Apache 2.0 four years after release. Versions released before this one stay MIT.
63
+ Nothing changes in how it runs, and there's nothing to do after upgrading.
64
+ - **`recall` loads up front in Claude Code.** Claude Code keeps most MCP tools behind its tool search
65
+ until they are needed; `recall` now asks to be loaded from the start, so a session can look
66
+ something up without first searching for the tool. Its description is tightened to fit Claude
67
+ Code's limit for tools loaded this way. Claude Desktop and claude.ai are unchanged.
68
+ - **Each turn's recall record says which check kept a memory's words from showing.** The
69
+ `recall.decision` row now names the check that kept a memory's words off the turn (the strong
70
+ floor, the cue fraction, the bar and so on), with up to five memories that did not show at all,
71
+ closest to the threshold each one missed first. It holds ids and numbers only. What recall shows
72
+ is unchanged.
73
+ - **Asking for facts reads a range of days as one stretch.** "Between 12 and 18 October", "from 12 October to 18
74
+ October", "Oct 12-18" and the like now cover every day from the first to the last; before, only one of the two days
75
+ was read (and "Oct 12-18" was read as December 18).
76
+ - **Asking for facts can look ahead.** "Tomorrow", "next week", "next month", "this weekend" and "the coming week" are
77
+ read. A question whose days run past today, or that asks about today, also finds what is due in them by its
78
+ reminder date, a repeating one by its next time. It leaves out a one-off marked done whose date is today or
79
+ earlier, one due today that a newer memory says has happened, a repeat's time already marked done, and the old date
80
+ of a reminder that was moved. Memories with no date of their own still come back for such a question, after the
81
+ ones in the window.
82
+ - **A memory with a reminder date says so.** Where facts answers said "no event date" for a memory that had a reminder
83
+ date, they now say "due" and the date.
84
+ - **Asking about the days ahead also lists what is due then.** A question about a topic with a window still to come
85
+ ("what about the vet next week") answers with its matches as before, then lists the other reminders due in that
86
+ window, by date and title, under "also due in this window", so a reminder the question's words didn't reach is still
87
+ in sight. A repeating reminder is one line. The list isn't counted as matches.
88
+ - **An open item is no longer put in front of you every day.** "Still open" at the start of a session lists an open
89
+ item the day it is new (in every session that day), then again 3 days later and 7 days after that, and then parks
90
+ it: counted as parked, not listed. This holds whichever way the session-start text is put together. It is the same
91
+ schedule a question waiting on you already followed when a conversation touched it, on one record for both, so an
92
+ item already raised that way counts. A session nobody is reading (an agent's, a routine's, the night's own) follows
93
+ the schedule without using it up. When everything open is waiting, "Still open" says how many and that none is due
94
+ today. After updating, an open item nobody has touched in two weeks starts out parked, not new. Nothing is closed or
95
+ deleted: `recall "still open"` still lists every item, the parked ones marked. Items with a date keep following
96
+ their date.
97
+ - **A memory is never lost to a field that couldn't be read.** `remember` and `session_end`
98
+ keep the memory and leave out only what they can't use: an unreadable date, a feeling word
99
+ they can't place, a malformed trait, a number out of range, an unknown kind. The answer
100
+ names each field it left out (`dropped`) and each value it read as something else
101
+ (`readAs`). Before, any of these refused the whole memory and its words were lost.
102
+ - **Dates can be written as words.** A reminder date or the date something happened can be
103
+ "next Friday", "Oct 15", "late October", "in two weeks" or "yesterday"; the answer shows the
104
+ date it was read as.
105
+ - **Feelings can be written as plain strings,** like "self: relieved — the test passed" or
106
+ "owner: frustrated". A feeling word that isn't on the wheel is placed on the nearest core
107
+ from a thesaurus of a few hundred everyday feeling words, or from an obvious misspelling,
108
+ and kept in your own words; one that can't be placed is left out alone, and said.
109
+ - **A write-up's memories are read like any other `session_end`'s.** Sent as one object, as
110
+ a JSON string of a list or as plain text, they're read as the list they are, where before
111
+ the write-up refused them. Text that starts like JSON but doesn't parse (a trailing comma,
112
+ a list cut off) is refused so it can be sent again, on any `session_end`, instead of being
113
+ kept as one memory of raw JSON.
114
+ - **A date and time written without a time zone keeps its day.** "2026-11-14T03:00" in a
115
+ reminder date or the date something happened is the 14th, whatever zone the server runs
116
+ in; before, a server in a different zone from yours could file it on the wrong day.
117
+ - **A host can turn the morning share off, or cap it.** A product built on Counterparts can set `shares: "off"`, or
118
+ `sharesPerWeek` to a number, in its configuration (or through hosted's `createApp`). The night still reflects and
119
+ writes its entry; it just doesn't offer a share. While shares are held, nothing that would change who it is goes
120
+ unsaid: a thread it would have closed is listed as "may be done", and a change to its core waits for a night that
121
+ can tell you. The cap counts the shares offered over the last 7 calendar days; 0 is the same as off, and with
122
+ shares off a share offered earlier isn't told either. Without the setting, nothing changes.
123
+ - **The memory tools take far less of every session's context.** Their descriptions and field
124
+ texts on Claude Code went from about 90,700 characters to about 26,300 (Claude Desktop's
125
+ similarly), mostly by saying each field in a line and dropping the long lists of guarantees
126
+ the tools printed (every guarantee is still enforced by the code). Old call shapes still
127
+ work: feelings and traits as objects, the 0-1 relevance, emotional and predictive scores,
128
+ and the rest are still read, though the schema no longer lists them.
129
+ - **"Still open" is for things that block something.** The `unresolved` flag now says it
130
+ is for a decision the counterpart needs from you, a promise, or a dated check, and never
131
+ for curiosity about how something went.
132
+ - **Day's end after skipped days writes about the last day you used it.** Day's end only ever looked at
133
+ yesterday, so after a day or more away the last day before the gap never reached your page's Lately section.
134
+ Now, when yesterday is empty, it looks back up to a week for the last day with memories that no night has
135
+ written about yet. It never writes about a day twice and never works through a backlog.
136
+ - **The page's "ahead" lines are told to catch up.** The nightly writers are now told that a line about
137
+ something ahead, once its day has come, should say what became of it where a memory tells, or be set down.
138
+ Before, a page could keep "the wedding is ahead" after the wedding.
139
+ - **A host that sets the page's room tells the writers that room.** With `selfTunables.PAGE_ROOM_BYTES` set,
140
+ day's end and the reflection were told the default 4,600 bytes and then sent back at the host's number. They
141
+ are now told the host's number.
142
+ - **"Coming up" no longer pins a date to a sentence about another day.** When a memory's title or first sentence names
143
+ a different day from the memory's own date (the CR-V listed "on 1 Oct" in a memory dated for Marisol's visit on the
144
+ 16th), the wake and recall "coming up" list it by the sentence that names its date, shortened to about a title's
145
+ length: "His daughter Marisol is coming home from Denver Friday 16 to Sunday 18 October,". A title or first sentence
146
+ with no date of its own still leads, and so does a repeating reminder. A number on its own ("3rd floor", "16GB",
147
+ "PR #16") doesn't count as a date.
148
+ - **A plain reminder is told by the sentence that names its day.** The "Today: …" line you and the model see when a
149
+ reminder you asked to be told comes due used the memory's title or first line, so a memory that opened with
150
+ something else ("On 1 Oct Tomás listed Elena's grey 2014 CR-V…") was told as that, on the day of the visit it was
151
+ dated for. It now uses the rule "Coming up" uses: "Today: His daughter Marisol is coming home from Denver Friday 16 to
152
+ Sunday 18 October,". A title, a first line with no date of its own, and a repeating reminder still lead, and the
153
+ same holds for a reminder told late and one crossing from another folder.
154
+ - **Hosted: each memory holds up to 100 MB.** Past it, Claude is told plainly that the memory is full, that nothing
155
+ in it was lost and recall still works, and to email support@counterparts.ai for more room. A memory already over
156
+ the limit keeps everything.
157
+ - **Hosted: the account page links the step-by-step setup** for adding Counterparts as a connector in Claude, beside
158
+ the connector address.
159
+ - **Hosted: where a sign-up came from is kept with the account**, when the link to the sign-in page carried it: a
160
+ short source tag, the origin of the site the person first came from, and the counterparts.ai page they landed on.
161
+ No full URL, query or IP. It's erased with the account.
162
+ - **The plugin directory's copy of Counterparts ships in far fewer files.** Its JavaScript
163
+ is now bundled into about 95 files instead of one per source file, so the whole plugin is
164
+ about 270 files where it was 510, against the directory's limit of 512. Nothing it does
165
+ changes, and the npm package and our own plugin are as they were.
166
+ - **Recall answers a turn faster on a big store.** Two of its reads had started walking every
167
+ memory once the store grew: the tag priming that looks for a memory's neighbours, and the
168
+ check for which subject is you. Both read their index again. The beliefs a prompt names
169
+ now check for new beliefs once a turn, not once for each subject named. What recall shows
170
+ is unchanged.
171
+ - **A plan the night closed no longer shows as overdue.** When the night closed an open, dated plan (an earlier
172
+ release step a later release showed done), it left "Still open" but "Coming up" and `recall "coming up"` kept
173
+ counting it as overdue once its day passed. Now a closed item reads "Was <date>" there, as anything nobody owes
174
+ does, and it's overdue again if you reopen it. Nothing to do after upgrading.
175
+ - **A practice moved off the page makes one skill memory, not two.** When the nightly page
176
+ write moved two lines to a skill with the same words (or words differing only in case and
177
+ spacing), it made a skill memory for each; the next night's merge archived one, and a
178
+ set-down went on naming the archived id. Now both set-downs name one skill memory, and
179
+ words that match a skill memory already in the store name that one instead of making a
180
+ copy.
181
+ - **Hosted: the sign-in link works in any browser, after one press.** Opening the emailed link now shows a page
182
+ with a Sign in button; pressing it signs that browser in. Opened in a different browser from the one that asked
183
+ (the link tapped in a phone's mail app, say), the page asks "Sign in on this browser as you@example.com?" first,
184
+ and says so if that browser is signed in as someone else. Opening the link alone never uses it up, so a mail
185
+ scanner can't spend it. The email says it works once, for 15 minutes, and signs in whichever device opens it.
186
+ Finishing a claude.ai connect on another device now says to go back to the browser where you started.
187
+ - **Hosted: a new account opens on the setup steps.** Until an AI is connected, the account page starts with the
188
+ steps that make it work in claude.ai: the connector address and the instructions, each with a Copy button, Always
189
+ allow, and say hi. The beta note follows them.
190
+ - **Hosted: the sign-in page says "Sign up or sign in"** for someone arriving without an account session.
191
+ - **Hosted: the sign-in email also has a 6-digit code.** Read the email on your phone and type the code on the
192
+ "check your email" page on your computer. The code works only in the browser where you asked for it, once, for
193
+ 15 minutes, and stops after five wrong tries (the link still works).
194
+ - **The hosted account page leads with what you came for.** Signed in, it opens with your
195
+ address and Sign out, then a button to your dashboard, then the setup steps (until an AI is
196
+ connected) or your connected AIs, your time zone, download and delete. What we keep and your
197
+ choices, the same words as before in a few short paragraphs, sits under its own heading at
198
+ the foot, with where to report a bug.
199
+ - **Signing in to hosted says plainly what to do.** The check-your-email page leads with one
200
+ suggestion: click the link, or type the 6-digit code if it opens somewhere else. The invite
201
+ code field says it's only for someone who was given one. The account page's setup steps
202
+ match the site's new wording.
203
+ - **A letter or a person you wrote down in one folder reaches the next wake in another.** "Since the
204
+ last night" now also carries a person memory that isn't marked work (a letter saved as the person who
205
+ wrote it, say), at most one such line among its three, by the same strength and folder rules as the
206
+ rest. A line written in another folder now names that folder: `- title (distribution, 11 min)`.
207
+ - **Still open's count is lighter.** Its last line reads `(N more of mine; recall "still open")`; the
208
+ parked count is no longer in the wake (recall "still open" still lists the parked ones). An item the
209
+ handoff above already names isn't listed or counted again under Still open.
210
+ - **Claude Code: a short nudge to keep what you read or sent.** When a session reads letters, web pages or documents
211
+ (a PDF or an EPUB), or sends a letter, and no `remember` follows, the end of that turn adds one line saying how many
212
+ (never what or from whom) and pointing at `remember`. It is off for sessions nobody attends, under observer and in
213
+ folders set off. Turn it off with `"noticing": {"enabled": false}` in the configuration; add your own shell
214
+ commands with `"bashPatterns"` (reads) and `"bashOutgoing"` (sends). `counterparts mechanisms` shows how often it
215
+ fired and how often a memory followed. The `remember` tool now says to keep a struck line word for word with who
216
+ wrote it, and that a letter is about the person who wrote it.
217
+
3
218
  ## 0.3.54 — 2026-11-10
4
219
 
5
220
  **Hosted gets your dashboard (read-only: home, memories, your page and dreams), and hosted sign-up can open by spots instead of invite codes (closed until we open it).** What you'll notice on hosted: the account page links "Open your dashboard", which shows Home, Memories and Self; Subjects, Flow and Health say they're not on hosted yet. The sign-in page reads "Email me a link", with an optional "Have an invite code?". For local users: the dashboard's buttons work as before (their click handling moved, nothing new). No store-format change (store v15, cache v7), no migration. Nothing to run after upgrading beyond the usual restart of the dashboard and every Claude Code session. Going back to 0.3.53 is a reinstall with no store restore: `counterparts disconnect`, 0.3.53's install, then `counterparts connect`.
package/LICENSE CHANGED
@@ -1,21 +1,114 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Mike LaPeter
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ Business Source License 1.1
2
+
3
+ Parameters
4
+
5
+ Licensor: Mike LaPeter
6
+ Licensed Work: Counterparts version 0.4.0 or later. The Licensed Work is
7
+ (c) 2026 Mike LaPeter.
8
+ Additional Use Grant: You may make production use of the Licensed Work, including
9
+ commercial use and use within an organization of any size,
10
+ provided that your use does not include a Commercial
11
+ Offering.
12
+
13
+ A "Commercial Offering" is:
14
+ (a) a product, application or service that you make
15
+ available to third parties and that includes the
16
+ Licensed Work, in whole or in part, in source or
17
+ executable form, or that downloads or installs it on
18
+ its users' behalf in order to operate;
19
+ (b) a product, application or service that you make
20
+ available to third parties for a fee, or with a paid
21
+ tier, and that requires the Licensed Work in order to
22
+ operate; or
23
+ (c) offering the Licensed Work, or its functionality, to
24
+ third parties as a hosted, managed or application
25
+ programming interface (API) service.
26
+
27
+ None of the following is a Commercial Offering:
28
+ 1. An individual's use of the Licensed Work, including in
29
+ the course of their work for any employer or client,
30
+ provided the individual does not make a Commercial
31
+ Offering.
32
+ 2. An organization's use of the Licensed Work for its own
33
+ internal purposes, including making it available to its
34
+ own employees and contractors, where it is not made
35
+ available to anyone outside the organization. An
36
+ organization includes the entities it controls, that
37
+ control it, or that are under common control with it.
38
+ 3. Redistributing unmodified copies of the Licensed Work
39
+ free of charge, together with this License, for example
40
+ through a package registry or a plugin directory or
41
+ marketplace.
42
+ 4. Plugins, extensions, connectors and other software,
43
+ offered free of charge, that work with a copy of the
44
+ Licensed Work which their users install themselves.
45
+ 5. A product, application or service made available
46
+ entirely free of charge, with no paid tier, fees or
47
+ advertising, such as a free open-source project.
48
+ 6. Installing, configuring or administering the Licensed
49
+ Work, on infrastructure the client controls, for a
50
+ client's use under 1 or 2.
51
+
52
+ Uses 1 and 2 do not cover a copy of the Licensed Work
53
+ obtained as part of a Commercial Offering; that copy's
54
+ use is licensed by whoever made the offering, under a
55
+ commercial license from the Licensor.
56
+ Change Date: Four years from the date the Licensed Work is published.
57
+ Change License: Apache License, Version 2.0
58
+
59
+ For information about alternative licensing arrangements for the Licensed Work,
60
+ please contact hello@counterparts.ai.
61
+
62
+ Notice
63
+
64
+ The Business Source License (this document, or the "License") is not an Open
65
+ Source license. However, the Licensed Work will eventually be made available
66
+ under an Open Source License, as stated in this License.
67
+
68
+ License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
69
+ "Business Source License" is a trademark of MariaDB Corporation Ab.
70
+
71
+ -----------------------------------------------------------------------------
72
+
73
+ Business Source License 1.1
74
+
75
+ Terms
76
+
77
+ The Licensor hereby grants you the right to copy, modify, create derivative
78
+ works, redistribute, and make non-production use of the Licensed Work. The
79
+ Licensor may make an Additional Use Grant, above, permitting limited production use.
80
+
81
+ Effective on the Change Date, or the fourth anniversary of the first publicly
82
+ available distribution of a specific version of the Licensed Work under this
83
+ License, whichever comes first, the Licensor hereby grants you rights under
84
+ the terms of the Change License, and the rights granted in the paragraph
85
+ above terminate.
86
+
87
+ If your use of the Licensed Work does not comply with the requirements
88
+ currently in effect as described in this License, you must purchase a
89
+ commercial license from the Licensor, its affiliated entities, or authorized
90
+ resellers, or you must refrain from using the Licensed Work.
91
+
92
+ All copies of the original and modified Licensed Work, and derivative works
93
+ of the Licensed Work, are subject to this License. This License applies
94
+ separately for each version of the Licensed Work and the Change Date may vary
95
+ for each version of the Licensed Work released by Licensor.
96
+
97
+ You must conspicuously display this License on each original or modified copy
98
+ of the Licensed Work. If you receive the Licensed Work in original or
99
+ modified form from a third party, the terms and conditions set forth in this
100
+ License apply to your use of that work.
101
+
102
+ Any use of the Licensed Work in violation of this License will automatically
103
+ terminate your rights under this License for the current and all other
104
+ versions of the Licensed Work.
105
+
106
+ This License does not grant you any right in any trademark or logo of
107
+ Licensor or its affiliates (provided that you may use a trademark or logo of
108
+ Licensor as expressly required by this License).
109
+
110
+ TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
111
+ AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
112
+ EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
113
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
114
+ TITLE.
package/README.md CHANGED
@@ -80,9 +80,8 @@ walkthrough is in [`docs/QUICKSTART.md`](docs/QUICKSTART.md).
80
80
 
81
81
  How Claude Code's own memory works, and where Counterparts fits:
82
82
  [counterparts.ai/guides/claude-code-memory](https://counterparts.ai/guides/claude-code-memory/).
83
- More at [counterparts.ai](https://counterparts.ai). A hosted version for claude.ai is coming
84
- soon, in beta; [sign up on the home page](https://counterparts.ai/#waitlist) to hear when it
85
- opens.
83
+ More at [counterparts.ai](https://counterparts.ai). Hosted Counterparts, for claude.ai, is
84
+ open as a free beta: [sign up at app.counterparts.ai](https://app.counterparts.ai/login).
86
85
 
87
86
  Found a bug? [Open an issue](https://github.com/mlapeter/counterparts/issues). For anything
88
87
  else, write to mike@resonantventures.com.
@@ -186,4 +185,16 @@ engram, and bansai) were each used daily before the next was written.
186
185
 
187
186
  ## License and contributing
188
187
 
189
- MIT. Contributions are welcome; see [`CONTRIBUTING.md`](CONTRIBUTING.md).
188
+ Counterparts is source-available under the Business Source License 1.1 from version 0.4.0
189
+ (see [`LICENSE`](LICENSE)). In short:
190
+
191
+ - **Free to use**, for anyone: personally or at work, at a company of any size, including
192
+ rolling it out inside your own organization.
193
+ - **Building it into a product or service you offer others**, selling one that needs it to
194
+ run, or offering it as a hosted or API service, needs a commercial license:
195
+ hello@counterparts.ai. Free, unmonetized projects and free plugins and connectors don't.
196
+ - **Each version becomes Apache 2.0** four years after it's released.
197
+ - Versions released before 0.4.0 were MIT-licensed, and copies of those stay MIT.
198
+
199
+ `LICENSE` is the binding text; this summary isn't. Contributions are welcome; see
200
+ [`CONTRIBUTING.md`](CONTRIBUTING.md).
@@ -125,6 +125,29 @@ counterparts scope --list # every directory you've set
125
125
 
126
126
  Settings apply to subdirectories too.
127
127
 
128
+ ## Codex (new)
129
+
130
+ OpenAI's Codex can use the same memory. Its model reads it as itself, not as your counterpart:
131
+ the memory is your counterpart's, and Codex writes in its own voice. To connect it:
132
+
133
+ ```
134
+ counterparts connect --host codex
135
+ ```
136
+
137
+ That appends four hooks to `~/.codex/hooks.json` (or `$CODEX_HOME`) after any other tool's, and
138
+ adds a `counterparts` MCP server to `~/.codex/config.toml`; both files are backed up first.
139
+ **Then one step is yours:** start Codex, type `/hooks`, approve the four Counterparts hooks, and
140
+ restart Codex. Codex skips a hook until you approve it, and asks again if an update changes its
141
+ command. `counterparts doctor` says which are approved.
142
+
143
+ What works in Codex: the wake at the start of a session, recall on each prompt, the end-of-session
144
+ ask, and each turn kept for write-up. Memories written there are labelled with Codex and the model.
145
+ What doesn't: no dreams or reflection run in Codex (they stay in Claude Code); Codex can't write
146
+ the self page; a "me" it writes is kept as its own note, not your counterpart's self; Windows isn't
147
+ wired for Codex yet. Keep Codex's own `memories` feature off, or two memories will disagree.
148
+
149
+ `counterparts disconnect --host codex` takes out only what connect added.
150
+
128
151
  ## Look at the memory
129
152
 
130
153
  ```
package/docs/manual.md CHANGED
@@ -49,12 +49,28 @@ Save with `remember` while it's fresh, put dates in `eventDate`, mark open thing
49
49
 
50
50
  - Save while it's fresh: when something matters, `remember` it then, one idea per call, in your own words. Keep the exact words when the words matter.
51
51
  - A date to come back to goes in `eventDate`, not just the text, or it never comes back. Four shapes: a day "2026-10-15", a month "2026-10", a range "2026-10-20..2026-10-31", or a year. Add `recurring` for a date that repeats.
52
- - Something open: `unresolved: true`, with `settlesWhen` naming what would settle it. It stays on the still-open list, and the night can close it once a memory shows it happened.
52
+ - Something open, meaning something is blocked on it (a decision needed from the person, a promise, a dated check; not curiosity about how something went): `unresolved: true`, with `settlesWhen` naming what would settle it. It stays on the still-open list, and the night can close it once a memory shows it happened.
53
53
  - When a memory turns out wrong: `updates` with its id and `how: "corrected"`. When it was true then and has changed: `how: "changed"` (the default), and the old one is shown as earlier. A real disagreement: `how: "open"`, and both stay.
54
54
  - Before saying "I don't remember", ask `recall` once, and try other words before saying it's gone.
55
55
  - [local] At the end of a session in Claude Code, the Stop ask asks for the write-up: memories through `session_end`, and the session's own account through `chapter`. Write it honestly, including what didn't go well.
56
56
  - [hosted] Nothing tells this memory when a chat ends, so `remember` as things come up, and write a `chapter` when the chat is wrapping up.
57
57
 
58
+ ## Fields
59
+
60
+ All `remember` and `session_end` fields: `salience`, date shapes, `about`, `feelings`, closing open things.
61
+
62
+ Both `remember` and each `session_end` entry take these. A field that can't be read is left out and named in the answer (dropped), and a value read as something else is said (readAs); the memory is always kept.
63
+
64
+ - `salience`, 0-1, is how much it caught your attention, not what category it is. Leave it unset for a routine work event (merged, deployed) or an ordinary work fact or step: a default by what it is about applies, and fading chooses what stays. 0.3 a reading you only skimmed; 0.4 or more for what struck you or changed how you'll work; 0.5 a lesson or decision; 0.7 something they told you about their life, or a moment that moved you; 0.9 rare. Their rulings, preferences and corrections stay high even about work. It is a floor: it can raise how strongly a memory is held, never lower it.
65
+ - `eventDate` is a future date the memory should come back on: a day "2026-10-15", a month "2026-10", a range "2026-10-20..2026-10-31", a year "2026" (a year alone never comes back on its own), or words like "next Friday" or "late October", read from the field alone and said back as the date. A date written only in the text is never read. Set it to null on a revision to drop it. When a dated thing moves or is cancelled, revise it: `updates` with the old memory's id and the new `eventDate` (null for a cancel), not a new memory beside it, or the old date still comes back.
66
+ - `remind: "plain"` says it plainly on the day: something to do, or something they asked to be told. Otherwise it is quiet, and may surface as a footnote around the date. `recurring` ("daily", "weekly", "monthly", "yearly") repeats a date that is one day, counted from that day: a birthday is its date, yearly.
67
+ - `occurredOn` is when it happened, in the same shapes, or in words like "yesterday" or "last Tuesday". A past date is this, never an `eventDate`.
68
+ - `about`: me (who I am), us (the two of you), owner (them as a person), work (this project's own), world (anything else). Mark anything personal owner or us. Only me and us can become part of who I am. [local] Marked owner or us, it reaches every folder; unmarked, a fact counts as this folder's work, and a skill left unmarked is craft and reaches every folder.
69
+ - `feelings`: one string per feeling, "self: relieved — the test passed" or "owner: frustrated — the build broke again": whose, one feeling word, then what carried it. Mixed feelings are several. A word off the wheel is placed on one of seven cores (happy, warm, calm, curious, sad, uneasy, angry) and kept as your word; one nothing can place is left out and said. The strongest feeling holds a memory higher and slows its fading.
70
+ - `traits`, rare: how you acted, as "bold — what showed it", one pole of careful/bold, agreeable/candid, guarded/open, focused/curious, following/initiating, inward/outward or serious/playful. Shown on the dashboard only.
71
+ - `unresolved: true` only when something is blocked on it: a decision you need from them, a promise, a dated check. Never curiosity about how something went. To close one: `updates` its id with `unresolved: false`. A dated one: `updates` its id with its `eventDate` set to null. A repeating reminder done just this once: `updates` its id with `status: "done"` and no date.
72
+ - `saidBy` is who said it: owner, self, or inferred (your own reading). `status` is done, planned (decided, not done), proposed (not decided) or asked (a question or request of yours still waiting on them, not one they asked you; while open, it is raised to them). A plan written as done is wrong: it is planned.
73
+
58
74
  ## Nights and dreams
59
75
 
60
76
  A night pass runs day's end, a dream and a reflection, set to `auto`, `ask` or `off`; `last dream` reads the newest.
@@ -70,7 +86,7 @@ A night pass runs day's end, a dream and a reflection, set to `auto`, `ask` or `
70
86
 
71
87
  ## Seeing and changing what's kept
72
88
 
73
- Look with `recall` or `self_page`, correct with `updates`; `remember`'s `remove` deletes one, with a day to undo.
89
+ Look with `recall` or `self_page`, correct with `updates`, and delete one memory with a day to undo.
74
90
 
75
91
  - Ask the memory: `recall` with a question and a mode, or a memory's id or exact title as `handle` to read it whole. [local] From a terminal: `counterparts ask "…"`.
76
92
  - The self page, the "Who I am" the wake opens with: the `self_page` tool reads it, and writes it whole when something about you will still be true next month. [local] `counterparts self-page` shows it, and `counterparts self-page --versions` lists earlier versions.
@@ -79,7 +95,9 @@ Look with `recall` or `self_page`, correct with `updates`; `remember`'s `remove`
79
95
  - [local] `counterparts remove <id>` shows what would go; with `--confirm` it asks them to type the id back, then deletes that memory for good. It needs a terminal, and it is the person's to run. `--confirm` also finishes a memory deleted in chat, at once.
80
96
  - [local] `counterparts delete conversation-text`, `counterparts delete backups` or `counterparts delete activity-log` deletes one kind of data and nothing else (since 0.3.21).
81
97
  - [local] `counterparts settle` lists memories that disagree and how each pair was settled; `counterparts core` lists what became part of who I am, and `counterparts core --demote <id>` sends one back.
82
- - Delete one memory: `remember` with `remove` and the memory's id, on a memory shown in this conversation, after saying which one. It's hidden at once and erased after 24 hours. `remove` with `undo: true` brings it back before then, and recall's handle `deleted` lists what's waiting.
98
+ - Delete one memory, on a memory shown in this conversation, after saying which one. It's hidden at once and erased after 24 hours, and recall's handle `deleted` lists what's waiting.
99
+ - [local] `remember` with `remove` and the memory's id deletes it; `remove` with `undo: true` brings it back before then.
100
+ - [hosted] The `delete_memory` tool with the memory's id deletes it; `undo: true` brings it back before then.
83
101
 
84
102
  ## Export, backup, uninstall
85
103
 
@@ -106,6 +124,16 @@ If something seems off (no wake, no night), check before guessing: `status`, and
106
124
  - [hosted] The account page lists the connected AIs, with when each was last used, and disconnects one.
107
125
  - A tool that refuses says why and what to do. Pass that on in plain words, don't retry blindly.
108
126
 
127
+ ## Codex (new)
128
+
129
+ [local] `counterparts connect --host codex` lets Codex read this memory as itself.
130
+
131
+ - [local] `counterparts connect --host codex` adds four hooks to Codex's hooks.json and the memory server to its config.toml (in ~/.codex, or CODEX_HOME). The person then approves the hooks once in Codex's /hooks and restarts Codex; until then the tools work and the hooks are skipped. `counterparts doctor` says which hooks are approved.
132
+ - What works there: a wake at the start of each session, recall on each prompt, the end-of-session ask, and each turn kept for write-up. Memories written there are labelled with Codex and the model.
133
+ - Codex's model reads this memory as itself, not as the counterpart whose memory it is: the self page is shown for history, and it writes in its own voice. A memory it marks "about: me" is kept as its own note, never the counterpart's self, and one it marks "about: us" as its own note about it and the person, never the counterpart's us. It can't write the self page, dream, reflect or hold the first meeting.
134
+ - No nights run in Codex: dreams and reflection stay in Claude Code. A Codex that Claude Code itself starts (the Codex plugin's rescue or review) does nothing, since Claude Code already records that work.
135
+ - [local] `counterparts disconnect --host codex` takes out only what connect put in. Windows isn't wired for Codex yet.
136
+
109
137
  ## Hosted
110
138
 
111
139
  [hosted] Counterparts Online is this memory on a server, used from claude.ai with the `wake` tool.
@@ -36,6 +36,7 @@ code and the `NOTES.md` / `INTERFACE-GAPS.md` next to it.*
36
36
  | *(`leaving.ts`)* | — (a table) | What counts as having left: every `archived_reason` the code writes, filed `replaced` (a live row carries it — a revision, a merge, a rebuilt journal copy), `let-go` or `removed`. The `status` census and the dashboard's archive words both read it, so they agree. **Added 2026-09-30.** |
37
37
  | *(`onboarding.ts`)* | — (getting to know someone) | The first meeting, for every install path: its state in `meta` (`not_started` only on a store `install` made; absent reads `done`), the script the `meet` tool returns, the fixed style bundles (preferences about the owner, each keeping honest pushback), the wake's offer line and marker, and the second session's one memory. A new install's dreaming `auto` is written here too. **Added 2026-10-11.** |
38
38
  | *(`told.ts`)* | — (what a newborn is told) | The starter memories (S1): eleven ordinary memories a NEW store begins with (`install`, `start-fresh`, hosted signup; never an upgrade), source `told`, in each surface's words, the set's version in `meta`. Weak at birth, lived-first in recall (`recall/gate.ts`, `mcp/facts.ts`), and kept out of the night, the wake, the core, beliefs and cards. **Added 2026-11-03.** |
39
+ | *(`reader-note.ts`)* | — (another model's notes) | A memory written by a READER HOST — one whose model reads this memory without being its counterpart (Codex) — carries `meta.host`; one it wrote `about: me` (or `kind: self`) carries `meta.readerSelf = {host, model}` and no `me` mark: kept and recallable, never identity material (`Store#setAbout`, `schemas#fileSupport`, the dream's and the reflection's cites, the core lane all refuse it). `us` from a reader host is unchanged and open. **Added 2026-11-09 (CX2).** |
39
40
  | *(observer)* | — (instrument stance) | **RESOLVED (owner, 2026-08-25): a MODE, not a module** — one predicate threaded through the core API, checked at the store seam. Spec moved to `docs/observer-mode.md`. |
40
41
 
41
42
  **Third open question (check-in): the `remember`/`encode` boundary.** With the
@@ -51,6 +52,7 @@ input — does `encode` shrink to gates-and-tagging inside `remember`'s pipeline
51
52
  | `cli/` | `counterparts` command — the full list is `COMMANDS` in `cli/commands.ts`: status, install, connect / disconnect (the host's two files), `install --host claude-desktop` (Desktop's config entry, **2026-09-30**), uninstall, start-fresh, init, owner operations (note, ask, export, backup, remove, verify, repairs, rebrief), the readings (doctor, mechanisms, log, coverage, version, help), scope, self-page, dream, core, settle, and dashboard. |
52
53
  | `dashboard/` | The owner's window (constitution line 16): brain-view, revision stories, band/protected lists. Observer-mode by construction; minimal version ships DURING the parallel run. **Added 2026-08-25 (owner elevation).** |
53
54
  | `remote/` | The memory server as a web connector (**2026-10-26**, the claude.ai trial): `http.ts` serves the same `McpServer` as MCP over HTTP (plain JSON, no SSE), bound to 127.0.0.1 and answering only under a per-run 192-bit secret path, one message at a time; `call-log.ts` keeps one id-only line per call; `bin/serve-http.ts` refuses a store or configuration nobody named and the owner's live stores. Its host is claude.ai's (`claude-ai:`), set at launch. No sign-in yet (its CONTRACT). |
55
+ | `codex/` | OpenAI's Codex as a hooked host of the same memory (**2026-11-09**, CX2): four of its hook events (SessionStart, UserPromptSubmit, Stop, SessionEnd) drive the lifecycle as Claude Code's do — the wake opens with a reader frame (its model reads the counterpart's memory, not as itself), recall per prompt, Stop captures every turn through the cursor and asks in the model's own voice, SessionEnd is a final boundary. A rollout reader (`transcript.ts`), Codex's envelope, `hooks.json`/`config.toml` editing for `connect --host codex` (`wire.ts`, via `cli/codex.ts`), doctor's Codex lines, and a stand-down for a Codex that Claude Code started. No night. The MCP server serves it launched `--host codex`. |
54
56
  | `sessions.ts` | Not an adapter — a leaf both may import: the live-session registry a host's hooks write (`<dataDir>/sessions/`) and its tools read, so a tool launched without a session can bind to one that is real, live and in its project. Adapters stay leaves; this is the sibling they share instead of importing each other. **Added 2026-09-04**, because this host's MCP servers are launched from a static config and cannot be told which session they serve. Since **2026-09-30** Claude Desktop's MCP server writes its own records here (its `wake`), refreshed per call, and a runner's record can list the ended sessions a launcher granted it to write up (`mayWriteUp`). |
55
57
  | `expansions.ts` | The same shape, for the other direction: the handle-resolution log the MCP `recall` tool writes (`<dataDir>/sessions/expansions.jsonl` — a per-store SALTED hash of the handle (G58), the id it reached or `null` for a refusal, a timestamp, the project) and the boundary's credit pass reads, so an expansion by TITLE credits the memory it actually reached, and a refusal shadows it. **Added 2026-09-15** (LAUNCH-STATUS G50): `recall/reference.ts` credits literal `mem_…` addresses and resolves nothing, so until this the most deliberate act a session had — naming a memory and reading it — earned no credit at all. |
56
58
  | `scopes.ts` | The third shared leaf: the per-directory scope registry (`scopes.json` BESIDE the config, never inside the store, because the hook decides `off` before anything opens) — `on` / `observer` / `off` / `paused`, longest prefix wins, absent-or-unreadable meaning `unset` meaning on. Written by the `counterparts scope` console and the MCP `scope` tool, read by every hook. **Added 2026-09-15** (PR #92, G19): the hooks are registered globally, so until this the only way to say *not here* was a second config file and two environment variables. |
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "counterparts",
3
- "version": "0.3.54",
4
- "license": "MIT",
3
+ "version": "0.4.1",
4
+ "license": "BUSL-1.1",
5
5
  "description": "Long-term memory for Claude Code, written by Claude itself. Local MCP server and hooks; remembers you across sessions.",
6
6
  "repository": {
7
7
  "type": "git",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "counterparts": {
40
40
  "updates": {
41
- "tellBelow": null,
41
+ "tellBelow": "0.4.1",
42
42
  "urgentBelow": null,
43
43
  "tellBehind": 3,
44
44
  "plugin": true
@@ -214,6 +214,13 @@ person types while the model is working is written as an `attachment` (`queued_c
214
214
  since 2026-09-24 (#213) this reader reads it as a typed turn where it stands
215
215
  (`INTERFACE-GAPS.md` §14, which keeps one ask open: a capture cursor that survives
216
216
  inserted turns).
217
+ **Only `user`, `assistant` and untyped lines are turns (2026-11-28,
218
+ `transcript.ts#isTurnEntry`, held lightly).** Any other line that carries a role —
219
+ `api-request-blob`, the host's copy of each message it sends the model (seen from 2.1.308) — is
220
+ read for nothing: no text, no tool call, no recall lookup, no model. It still HOLDS the
221
+ places the old reading gave it, as empty `plumbing` turns, because the capture cursor is an
222
+ index into this list and a session part-captured before the change must resume between the
223
+ same two real turns. The places go only with a cursor migration (a store change).
217
224
  **Outputs** — an injected context block or the empty string; appended spans; the
218
225
  end-of-session ask; a detached worker spawn; capability reports (injection ceiling,
219
226
  execution ceiling, socket lifetime); delivery and stand-down telemetry. (A `credential`
@@ -1144,6 +1151,17 @@ waited past a 3-day `WRITE_UP_WAIT_DAYS`. Counted with the pointer's own eligibi
1144
1151
  debt the pointer never offers (short, and headless or with no session record — counted by reason since S2c) is named apart, as left to lapse. Never red; not in the session-start reading. `Sweep`: `not-opted-in` —
1145
1152
  and an older build's `no-credential` — is green `next session`.
1146
1153
 
1154
+ ### Noticing at a Stop (2026-11-26 — an experiment, held lightly)
1155
+
1156
+ `noticing.ts`. At an attended Stop (not the night's child, not observer, not off, `"noticing": {"enabled": false}`
1157
+ not set), when perception tool calls (letters, pages, documents read; letters or posts sent) came after this
1158
+ session's watermark and no `remember` followed them, the Stop adds ONE line: counts and kind words only, opening with
1159
+ `NOTICE_OPENER` so the host's copy of it is `ritual`. Guarantees: nothing from a tool's input or output reaches the
1160
+ line (it is built from a record of numbers); the ask's pacer is never consulted or moved; beside a due ask it is
1161
+ appended to the ask's block, one output; the re-fire scans, moves the watermark and records `taken`, and never
1162
+ speaks; a failure is a silent Stop. State is one meta row per session (`adapter.noticing.<session>`). Calibration and
1163
+ what the build learned: NOTES, 2026-11-26.
1164
+
1147
1165
  ## 6. Scars honored
1148
1166
 
1149
1167
  **E3** (streaming, with the host's socket ceiling proven here rather than assumed by the
@@ -738,6 +738,11 @@ entry-uuid cursor rather than an index, which is `remember/`'s to offer); (2) th
738
738
  rule, measured; (3) a fixture with one queued prompt that is later duplicated and one that
739
739
  is not, pacing as one and two turns respectively.
740
740
 
741
+ **And for the cursor ask (2026-11-28):** the host's `api-request-blob` lines carry no uuid,
742
+ yet hold empty places in the turn list (CONTRACT §5, "Only `user`, `assistant` and untyped
743
+ lines are turns"; `transcript.ts#isTurnEntry`). A migration to an entry-uuid cursor must map
744
+ an index at or after an empty place to the uuid of the next REAL entry.
745
+
741
746
  ## 15. On a mature store there is no room at SessionStart for the write-up's words — or the page writer's (2026-09-23, C2)
742
747
 
743
748
  **Measured, not guessed.** Beside the wake, the words of an ended session must fit both