counterparts 0.3.9 → 0.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +124 -0
- package/docs/module-map.md +1 -1
- package/package.json +1 -1
- package/src/adapters/claude-code/doctor.ts +74 -0
- package/src/adapters/cli/export.ts +4 -2
- package/src/adapters/dashboard/registries.ts +4 -4
- package/src/adapters/dashboard/web/README.md +2 -2
- package/src/adapters/dashboard/web/mechanisms/emotional/index.js +4 -3
- package/src/adapters/dashboard/web/narrate.ts +8 -5
- package/src/adapters/dashboard/web/pages/memories/sections/list.js +1 -1
- package/src/adapters/dashboard/web/shared/memory-marks.js +13 -7
- package/src/adapters/dashboard/web/shared/widgets/feel-radar.js +2 -2
- package/src/adapters/dashboard/web/views/core-road.ts +2 -1
- package/src/adapters/dashboard/web/views/memories.ts +3 -3
- package/src/adapters/dashboard/web/views/mind.ts +1 -1
- package/src/adapters/feelings-line.ts +9 -5
- package/src/adapters/fired.ts +1 -1
- package/src/adapters/mcp/deliberate.ts +349 -3
- package/src/adapters/mcp/server.ts +118 -13
- package/src/adapters/mcp/tools.ts +51 -12
- package/src/adapters/mcp/write-up.ts +7 -3
- package/src/core/counterpart.ts +223 -38
- package/src/core/coverage/CONTRACT.md +2 -1
- package/src/core/coverage/NOTES.md +11 -0
- package/src/core/coverage/index.ts +146 -4
- package/src/core/dream/index.ts +13 -6
- package/src/core/dream/reflect.ts +10 -4
- package/src/core/feelings-wheel.ts +395 -241
- package/src/core/handoff/CONTRACT.md +123 -28
- package/src/core/handoff/NOTES.md +145 -1
- package/src/core/handoff/index.ts +590 -115
- package/src/core/handoff/last-here.ts +230 -0
- package/src/core/physics/CONTRACT.md +20 -2
- package/src/core/physics/NOTES.md +25 -0
- package/src/core/physics/index.ts +43 -11
- package/src/core/recall/CONTRACT.md +43 -4
- package/src/core/recall/NOTES.md +128 -1
- package/src/core/recall/activate.ts +2 -2
- package/src/core/recall/feeling-ask.ts +47 -5
- package/src/core/recall/index.ts +1 -0
- package/src/core/recall/mood.ts +52 -24
- package/src/core/recall/recency-ask.ts +164 -0
- package/src/core/recall/tunables.ts +20 -2
- package/src/core/self/episodes.ts +5 -2
- package/src/core/self/index.ts +4 -1
- package/src/core/sleep/consolidate.ts +56 -12
- package/src/core/sleep/index.ts +1 -0
- package/src/core/sleep/types.ts +10 -0
- package/src/core/store/CONTRACT.md +12 -7
- package/src/core/store/NOTES.md +88 -0
- package/src/core/store/feelings.ts +120 -43
- package/src/core/store/index.ts +26 -2
- package/src/core/store/operational.ts +152 -3
- package/src/core/types.ts +17 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,129 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.10 — 2026-09-30
|
|
4
|
+
|
|
5
|
+
Feelings now sit on a new wheel of seven cores — happy, warm, calm, curious, sad,
|
|
6
|
+
uneasy, angry — and every feeling already recorded is re-filed onto it. A feeling
|
|
7
|
+
written under a core is kept under that core, and every word carries default numbers,
|
|
8
|
+
so a note can name just the word. Several sessions working in one directory each keep
|
|
9
|
+
their own handoff now, and the wake says who left each one. A new session's wake has a
|
|
10
|
+
"Last here" line naming the latest chapter written in this directory, and asking "what
|
|
11
|
+
do you remember from our most recent session?" leads with that session. Every recall
|
|
12
|
+
result says which session it came from. **The store's format changes, v10 → v11, and a
|
|
13
|
+
pre-migration copy is taken.**
|
|
14
|
+
|
|
15
|
+
**The format change, and why every session must be closed.** The first Counterparts
|
|
16
|
+
process to open the store for writing after installing copies it (as every upgrade since
|
|
17
|
+
0.3.1 has) and upgrades it. Usually that is a Claude Code hook, even the next prompt in a
|
|
18
|
+
session left open. With only Claude Desktop, it is Desktop's memory server as it starts,
|
|
19
|
+
or, if Desktop was left running, the background worker its next chat starts. The upgrade
|
|
20
|
+
adds three
|
|
21
|
+
columns to `feelings` (`valence`, and `core_v10` / `emotion_v10`) and re-files every
|
|
22
|
+
recorded feeling onto the seven cores. A re-filed row keeps its old core and word beside
|
|
23
|
+
it, and nothing else in the store changes. Until the upgrade, `counterparts doctor` and
|
|
24
|
+
the dashboard can't read the store (a v10 store is older than they read) and say so.
|
|
25
|
+
**Close every Claude Code session before installing, and if you have connected Claude
|
|
26
|
+
Desktop, quit it.** A v11 store can't be opened by 0.3.9: anything of 0.3.9's that opens
|
|
27
|
+
it afterwards refuses at once (`SCHEMA_AHEAD`), and its hooks stand down. A memory server
|
|
28
|
+
that was already running keeps 0.3.9's code with the store already open. Its tools
|
|
29
|
+
re-read the format on every call and refuse ("Counterparts was updated and this server
|
|
30
|
+
is still running the old version, so this tool did nothing."), ending with `/mcp` →
|
|
31
|
+
Reconnect in Claude Code and "Quit and reopen Claude Desktop" in Desktop. The hooks are
|
|
32
|
+
fresh processes at every event, so they run the new code at once. To go back to 0.3.9
|
|
33
|
+
you reinstall it and put back the copy the upgrade took; anything remembered since is
|
|
34
|
+
lost.
|
|
35
|
+
|
|
36
|
+
The feelings wheel, v2 (#301).
|
|
37
|
+
|
|
38
|
+
- **Seven cores: happy, warm, calm, curious, sad, uneasy, angry**, in 37 groups,
|
|
39
|
+
180 words in all (a group's name is a word too). Every word from the first wheel, its additions and aliases, and
|
|
40
|
+
every word a counterpart has recorded in its own words has a home. Recognition is a
|
|
41
|
+
group under curious (also warm). Guilt sits under uneasy, disgust is a word under
|
|
42
|
+
angry, and hopeful is under happy.
|
|
43
|
+
- **Every word carries default numbers**: a valence (−1 to +1) and an intensity (0 to
|
|
44
|
+
1). On `note` and `session_end`, `core` and `strength` may be left out: a feeling with
|
|
45
|
+
no core takes its word's home core, and a feeling with no strength takes the word's
|
|
46
|
+
intensity, capped at 0.55. A `valence` may be given to override the word's. A strength
|
|
47
|
+
you give is never changed.
|
|
48
|
+
- **The writer's core is kept.** A word named under a core it doesn't sit under is
|
|
49
|
+
stored under the core the writer chose, with nothing reported as moved. (0.3.9 moved
|
|
50
|
+
it to the word's home and said so.) A first-wheel core name (`fear`, `anger`,
|
|
51
|
+
`surprise`, `disgust`) sent by a session or dream still running is filed the way the
|
|
52
|
+
upgrade files it, and comes back as a `core` repair.
|
|
53
|
+
- **The upgrade re-files every feeling.** fear → uneasy; anger and disgust → angry; sad
|
|
54
|
+
stays sad, except guilty, remorseful and ashamed → uneasy. Rows under happy and
|
|
55
|
+
surprise, and `other` words under them, go by the word: to its home core, unless the
|
|
56
|
+
word can also be written under the old core (bittersweet under happy stays happy). A
|
|
57
|
+
word off the wheel stays happy under happy and goes to curious under surprise. Each
|
|
58
|
+
re-filed row keeps its old pair. It runs once. Doctor prints what moved ("Upgrade to
|
|
59
|
+
v11: feelings use seven cores now … N of M recorded feelings re-filed (…), each keeping
|
|
60
|
+
its old core beside it").
|
|
61
|
+
- **What a feeling does, by its valence.** How high a feeling holds a memory is
|
|
62
|
+
unchanged. How fast that hold softens now depends on valence: a negative feeling's hold
|
|
63
|
+
softens fastest (angry about 16 days), a positive one's slowest (happy and warm about
|
|
64
|
+
26). Mood matching compares valence instead of core, and a low mood meeting a low
|
|
65
|
+
feeling counts a quarter as much, so a low mood can't feed itself.
|
|
66
|
+
- **Recognition reaches the core's fast lane.** An unmarked memory carrying the
|
|
67
|
+
counterpart's own recognition feeling (at least 0.6, felt in a session) counts as about
|
|
68
|
+
itself for the fast lane only; a mark still wins, and the slow lane still needs one.
|
|
69
|
+
Doctor counts it ("Recognition").
|
|
70
|
+
- **Readers.** The dashboard's radar, chips and dots show the seven cores in seven
|
|
71
|
+
colours, warm pink and angry red ("dislike" for "disgust" is gone; disgust is a word
|
|
72
|
+
under angry). In recall, a
|
|
73
|
+
stamp also answers to its group's word, so "when was I afraid" still reaches scared.
|
|
74
|
+
The dream and reflection prompts name the seven cores.
|
|
75
|
+
|
|
76
|
+
Handoffs, one per session (#295).
|
|
77
|
+
|
|
78
|
+
- **Each session in a directory keeps its own live handoff.** Writing again revises your
|
|
79
|
+
own; another session's write makes a new one beside it. Until now the last session to
|
|
80
|
+
end wrote over the others.
|
|
81
|
+
- **The wake shows every live handoff here, newest first, and who wrote each** (the
|
|
82
|
+
session's short id and model, "this session" for your own). With several, a count line,
|
|
83
|
+
up to three one-line entries, the older ones by id, and how to retire one.
|
|
84
|
+
- **Retiring.** `handoff: ""` retires only your own. `session_end` takes
|
|
85
|
+
`retireHandoff: [ids]` to retire any handoff in this directory, whoever wrote it. A
|
|
86
|
+
`handoff` write returns `others`, the other sessions' live handoffs here, so finished
|
|
87
|
+
ones can go in the same call.
|
|
88
|
+
- **Claude Desktop:** a `session_end` with no session named can't leave or retire a
|
|
89
|
+
handoff (`session-unnamed`); the rest of the call goes through.
|
|
90
|
+
|
|
91
|
+
Continuity (#300, #302).
|
|
92
|
+
|
|
93
|
+
- **"Last here" on the wake.** In a directory where a session wrote a chapter within the
|
|
94
|
+
fortnight, the wake says which session it was, its model, when it ran and the
|
|
95
|
+
chapter's title and first sentence. It is read from what is already stored, so chapters
|
|
96
|
+
written before this release show at once. A finished session needs no handoff for it.
|
|
97
|
+
- **The handoff pointer says how far the work since is written up**: "written up to
|
|
98
|
+
17:50 (chapter), 3 pieces after" instead of "not yet written up" when a chapter or a
|
|
99
|
+
memory covers part of it.
|
|
100
|
+
- **A question about time leads with this directory's last session.** "What do you
|
|
101
|
+
remember from our most recent session?", "where did we leave off", "this evening" and
|
|
102
|
+
the like bring that session's latest chapter first, then the memories it wrote, newest
|
|
103
|
+
first, each marked `recent`. The rest of the answer is ranked as before.
|
|
104
|
+
- **Every recall result says where it came from**: `from: "session a1b2c3d4, ~/garden,
|
|
105
|
+
09-30 17:41"`, or "this session". Older rows say less (nothing is backfilled).
|
|
106
|
+
- **A note from before the session was known (#305).** In Claude Code the memory server
|
|
107
|
+
learns which session it serves only at the first `chapter` or `session_end`; a `note`
|
|
108
|
+
before that is filed under no session. Such a note now reads "a session that hadn't
|
|
109
|
+
been identified yet" with its directory and time, never "this session". A question
|
|
110
|
+
about time still brings a finished session's earlier notes back with it when they were
|
|
111
|
+
written here, while that session was at work, and no other session was working here at
|
|
112
|
+
the same moment.
|
|
113
|
+
|
|
114
|
+
Tests only (#303): child processes in the suite get the test's time zone, and two
|
|
115
|
+
fixtures moved, so the suite passes at every hour in any zone. No product change.
|
|
116
|
+
|
|
117
|
+
Not proven here.
|
|
118
|
+
|
|
119
|
+
- Nothing ran on a real store. The re-filing of your own recorded feelings, the writer's
|
|
120
|
+
core on real notes, the softening and mood by valence, and the recognition lane were
|
|
121
|
+
checked on a seeded store and in tests only.
|
|
122
|
+
- The upgrade from Claude Desktop's memory server (a Desktop-only user) was checked over
|
|
123
|
+
stdio with a client that calls itself `claude-ai`, not against the real app.
|
|
124
|
+
- "Last here", the recency lead and handoffs from several sessions were checked with
|
|
125
|
+
driven sessions in one throwaway directory, not across a real day's parallel sessions.
|
|
126
|
+
|
|
3
127
|
## 0.3.9 — 2026-09-30
|
|
4
128
|
|
|
5
129
|
Counterparts now reaches Claude Desktop's chat: one command connects it, a chat wakes
|
package/docs/module-map.md
CHANGED
|
@@ -28,7 +28,7 @@ code and the `NOTES.md` / `INTERFACE-GAPS.md` next to it.*
|
|
|
28
28
|
| `fit/` | working memory's pointers | Fitting what a mechanism has into the room it has: a line for everything, the whole text for the most important, ids and a named lookup for the rest, a count of what waits. Plus `lineOf`, `derivedFrom`, parts, and the lookup ledger that measures whether receivers use the lookup. First users: the dream and the reflection. **Added 2026-09-28 (build B).** |
|
|
29
29
|
| *(`contradictions.ts`)* | reconsolidation + interference | Two memories that disagree: flagged (a dream, today), noticed at write time (the nearest few live memories come back with a stored one), and SETTLED — `changed` (both true at their time: one strength cut, labelled earlier), `corrected` (archived, readable by id), or `open` (both kept, shown together) — by a new memory's `updates` + `how`, a `note` settle, a dream or reflection with a plain reason, or the owner's `counterparts settle`. Every settle is on a trail (who, how, why, when) and can be undone. A file beside `revision.ts`, whose ordinary-memory arm it is; its tables are the store's (schema v10), its labels recall's (`recall/standing.ts`). **Added 2026-09-29.** |
|
|
30
30
|
| *(`time.ts`)* | — (a clock, not a memory) | The one module that converts: a moment (UTC ms from `store.now()`) to a person's local date or clock line, "today" in a zone, and calendar dates as said (day, month, year, range). A file, not a module; a test keeps hand-built dates out of `src/`. **Added 2026-09-25 (`docs/time.md`).** |
|
|
31
|
-
| *(`feelings-wheel.ts`)* | — (a vocabulary) | The feelings wheel as a typed list:
|
|
31
|
+
| *(`feelings-wheel.ts`)* | — (a vocabulary) | The feelings wheel as a typed list: seven cores (happy, warm, calm, curious, sad, uneasy, angry), the groups and their words, default valence and intensity on every entry, blends, aliases, and the rule that re-filed the first wheel's feelings (v11). Read by `store/` to validate the `feelings` table. **Added 2026-09-25; v2 2026-09-30.** |
|
|
32
32
|
| *(`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.** |
|
|
33
33
|
| *(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`. |
|
|
34
34
|
|
package/package.json
CHANGED
|
@@ -58,12 +58,14 @@ import {
|
|
|
58
58
|
STORE_CREATED_KEY,
|
|
59
59
|
Store,
|
|
60
60
|
assertPreMigrationTarget,
|
|
61
|
+
isSelfRelevantFeeling,
|
|
61
62
|
isStoreError,
|
|
62
63
|
paths,
|
|
63
64
|
pendingMigration,
|
|
64
65
|
preMigrationDir,
|
|
65
66
|
} from "../../core/store/index.js";
|
|
66
67
|
import { BUSY_TIMEOUT_MS, journalModeOf } from "../../core/store/db.js";
|
|
68
|
+
import { acceptsReflectedFeeling, selfRelevantFeeling } from "../../core/sleep/index.js";
|
|
67
69
|
import { TUNABLES as ASSOCIATE_TUNABLES, isDead, pairKey } from "../../core/associate/index.js";
|
|
68
70
|
import type { EventRow } from "../../core/store/index.js";
|
|
69
71
|
// The ask allowance the amber hint names, read rather than retyped: a number in
|
|
@@ -2558,6 +2560,76 @@ export function upgradeV10Findings(store: Store): Finding[] {
|
|
|
2558
2560
|
];
|
|
2559
2561
|
}
|
|
2560
2562
|
|
|
2563
|
+
/** The meta row the v11 upgrade writes (`store/operational.ts#V11_UPGRADE_KEY`). */
|
|
2564
|
+
const V11_UPGRADE_META = "feelings.v11.upgrade";
|
|
2565
|
+
|
|
2566
|
+
/**
|
|
2567
|
+
* WHAT THE v11 UPGRADE RE-FILED (2026-09-30, the feelings wheel v2),
|
|
2568
|
+
* informational: how many recorded feelings it read, how many it moved onto
|
|
2569
|
+
* the seven cores and from where to where. Each moved row keeps its old core
|
|
2570
|
+
* beside it. Silent on a store born at v11.
|
|
2571
|
+
*/
|
|
2572
|
+
export function upgradeV11Findings(store: Store): Finding[] {
|
|
2573
|
+
const upgrade = metaJson(store, V11_UPGRADE_META);
|
|
2574
|
+
if (upgrade === null) return [];
|
|
2575
|
+
const feelings = metaNum(upgrade["feelings"]);
|
|
2576
|
+
const refiled = metaNum(upgrade["refiled"]);
|
|
2577
|
+
const raw = upgrade["moves"];
|
|
2578
|
+
const moves: Record<string, number> = {};
|
|
2579
|
+
if (raw !== null && typeof raw === "object" && !Array.isArray(raw)) {
|
|
2580
|
+
for (const [k, v] of Object.entries(raw as Record<string, unknown>)) moves[k] = metaNum(v);
|
|
2581
|
+
}
|
|
2582
|
+
const listed = Object.entries(moves)
|
|
2583
|
+
.sort((a, b) => b[1] - a[1] || (a[0] < b[0] ? -1 : 1))
|
|
2584
|
+
.map(([k, n]) => `${k} ${String(n)}`)
|
|
2585
|
+
.join(", ");
|
|
2586
|
+
return [
|
|
2587
|
+
finding(
|
|
2588
|
+
"upgrade-v11",
|
|
2589
|
+
"green",
|
|
2590
|
+
"Upgrade",
|
|
2591
|
+
`Upgrade to v11: feelings use seven cores now (happy, warm, calm, curious, sad, uneasy, angry) — ${String(refiled)} of ${String(feelings)} recorded ${feelings === 1 ? "feeling" : "feelings"} re-filed${listed.length > 0 ? ` (${listed})` : ""}, each keeping its old core beside it`,
|
|
2592
|
+
"",
|
|
2593
|
+
{ feelings, refiled, moves: listed },
|
|
2594
|
+
),
|
|
2595
|
+
];
|
|
2596
|
+
}
|
|
2597
|
+
|
|
2598
|
+
/**
|
|
2599
|
+
* THE RECOGNITION LANE, informational (wheel v2, the review of #301): how
|
|
2600
|
+
* many memories nobody marked are on the core's fast lane only because I
|
|
2601
|
+
* recognised myself in them — a recognition feeling of mine, strong enough on
|
|
2602
|
+
* its own, felt in a session (`sleep/consolidate.ts#selfRelevantFeeling`).
|
|
2603
|
+
* Ids stay out; a count only. Silent at zero.
|
|
2604
|
+
*/
|
|
2605
|
+
export function recognitionLaneFindings(store: Store): Finding[] {
|
|
2606
|
+
let count = 0;
|
|
2607
|
+
try {
|
|
2608
|
+
const door = acceptsReflectedFeeling(store);
|
|
2609
|
+
const seen = new Set<string>();
|
|
2610
|
+
for (const f of store.feelingsLive()) {
|
|
2611
|
+
if (seen.has(f.memory_id) || !isSelfRelevantFeeling(f.emotion, f.other_word)) continue;
|
|
2612
|
+
seen.add(f.memory_id);
|
|
2613
|
+
const row = store.row(f.memory_id);
|
|
2614
|
+
if (row === undefined || row.promoted_identity === 1) continue;
|
|
2615
|
+
if (selfRelevantFeeling(store, row, door)) count += 1;
|
|
2616
|
+
}
|
|
2617
|
+
} catch {
|
|
2618
|
+
return [];
|
|
2619
|
+
}
|
|
2620
|
+
if (count === 0) return [];
|
|
2621
|
+
return [
|
|
2622
|
+
finding(
|
|
2623
|
+
"recognition-lane",
|
|
2624
|
+
"green",
|
|
2625
|
+
"Recognition",
|
|
2626
|
+
`${String(count)} unmarked ${count === 1 ? "memory is" : "memories are"} on the core's fast lane because I recognised myself in ${count === 1 ? "it" : "them"} (a mark would decide instead)`,
|
|
2627
|
+
"",
|
|
2628
|
+
{ candidates: count },
|
|
2629
|
+
),
|
|
2630
|
+
];
|
|
2631
|
+
}
|
|
2632
|
+
|
|
2561
2633
|
/** The lived days the Contradictions line covers. */
|
|
2562
2634
|
export const CONTRADICTION_WINDOW_DAYS = 7;
|
|
2563
2635
|
|
|
@@ -3943,6 +4015,8 @@ export function doctorFindings(input: DoctorInput): Finding[] {
|
|
|
3943
4015
|
["reflection", () => reflectionFindings(input, store)],
|
|
3944
4016
|
// v10 (2026-09-29): what the upgrade carried, and the week's contradictions.
|
|
3945
4017
|
["upgrade-v10", () => upgradeV10Findings(store)],
|
|
4018
|
+
["upgrade-v11", () => upgradeV11Findings(store)],
|
|
4019
|
+
["recognition-lane", () => recognitionLaneFindings(store)],
|
|
3946
4020
|
["contradictions", () => contradictionFindings(store)],
|
|
3947
4021
|
// Build B (2026-09-28): does anyone read what an index offers in part?
|
|
3948
4022
|
["lookups", () => lookupFindings(store)],
|
|
@@ -299,7 +299,8 @@ function collectMarkdown(store: Store, opts: ExportOptions): { bundle: Bundle; c
|
|
|
299
299
|
}
|
|
300
300
|
|
|
301
301
|
/** Where one row's markdown goes in the tree. Ids only; never a title. */
|
|
302
|
-
/** `\n## Feelings\n\
|
|
302
|
+
/** `\n## Feelings\n\n1. owner · uneasy · worried · 0.6 — carried by …`, or "" when none. A
|
|
303
|
+
* valence the writer gave (v11) follows the strength; the word's default is not written. */
|
|
303
304
|
function feelingsSection(store: Store, id: string): string {
|
|
304
305
|
let rows;
|
|
305
306
|
try {
|
|
@@ -313,7 +314,8 @@ function feelingsSection(store: Store, id: string): string {
|
|
|
313
314
|
const word = r.emotion === "other" ? `other: ${r.other_word ?? ""}` : r.emotion;
|
|
314
315
|
const under = r.beneath_id === null ? "" : ` · over #${String(index.get(r.beneath_id) ?? "?")}`;
|
|
315
316
|
const by = r.carried_by.length === 0 ? "" : ` — carried by: ${r.carried_by.replace(/\r?\n/g, " ")}`;
|
|
316
|
-
|
|
317
|
+
const valence = r.valence === null || r.valence === undefined ? "" : ` · valence ${String(r.valence)}`;
|
|
318
|
+
return `${String(i + 1)}. ${r.whose} · ${r.core} · ${word} · ${String(r.strength)}${valence}${under}${by}`;
|
|
317
319
|
});
|
|
318
320
|
return `\n\n## Feelings\n\n${lines.join("\n")}\n`;
|
|
319
321
|
}
|
|
@@ -289,10 +289,10 @@ export const DURABLE_EVENTS = {
|
|
|
289
289
|
// for scar §2.3's reason, one lane along: "we wrote one" is not "a session
|
|
290
290
|
// was handed one", and a pointer that stops being delivered is exactly the
|
|
291
291
|
// failure a single row would hide.
|
|
292
|
-
"handoff.written": "a session left a handoff for the next one in that directory (how big, which version, and how long it will show)",
|
|
293
|
-
"handoff.shown": "a session opening in that directory was handed the pointer to
|
|
294
|
-
"handoff.cleared": "a session finished the work in a directory and retired its
|
|
295
|
-
"handoff.refused": "a handoff was turned away (past the hard limit, stopped by the gate battery, carrying the wake's own markers, written where no directory was named, sent as something other than text, or — with `no-room` — composed before the wake had room reserved for its pointer)",
|
|
292
|
+
"handoff.written": "a session left a handoff for the next one in that directory — one per session there (how big, which version, and how long it will show)",
|
|
293
|
+
"handoff.shown": "a session opening in that directory was handed the pointer to a handoff there (how old it was, what it cost the wake, and how many were live beside it)",
|
|
294
|
+
"handoff.cleared": "a session finished the work in a directory and retired a handoff there — its own, or another's by id — while any others stand (how big the retired one was, and which version)",
|
|
295
|
+
"handoff.refused": "a handoff was turned away (past the hard limit, stopped by the gate battery, carrying the wake's own markers, written where no directory was named, sent as something other than text, sent from a Claude Desktop call that named no session, retiring an id that is not a handoff here, or — with `no-room` — composed before the wake had room reserved for its pointer)",
|
|
296
296
|
"recall.credit": "a boundary decided which memories the replies actually used, and credited them",
|
|
297
297
|
// Learned association had no line in the log at all: an edge is its own
|
|
298
298
|
// record, so a flush that never happened read exactly like a credit pass with
|
|
@@ -57,8 +57,8 @@ shared/
|
|
|
57
57
|
tip.js modal.js showTip/hideTip; openModal/closeModal/section
|
|
58
58
|
memory-modal.js openMemory, copyId, removeMemory (window globals: rows use inline onclick)
|
|
59
59
|
memory-marks.js .css a memory's kind icon/colour, feeling dots, strength meter, badges;
|
|
60
|
-
feelingName (what the page CALLS a stored core:
|
|
61
|
-
|
|
60
|
+
feelingName (what the page CALLS a stored core: its own name
|
|
61
|
+
since the wheel v2, 2026-09-30) and feelingWord (a
|
|
62
62
|
memory's own feeling word, else its core's name)
|
|
63
63
|
event-modal.js openEvent (window global)
|
|
64
64
|
doctor.js one `doctor --json` run shared by Health's checklist and Home's health dot
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* Emotional modulation. `explainer` is what Counterparts actually does, checked against
|
|
2
|
-
docs/research/mechanism-audit-2026-09-24.md
|
|
2
|
+
docs/research/mechanism-audit-2026-09-24.md, emotion part A (2026-09-26) and
|
|
3
|
+
the feelings wheel v2 (2026-09-30);
|
|
3
4
|
`built` / `inDevelopment` are in plain words; `tagline` is the
|
|
4
5
|
site's (regions.ts). Its light comes from `/api/mechanisms`. */
|
|
5
6
|
export default {
|
|
@@ -12,8 +13,8 @@ export default {
|
|
|
12
13
|
explainer: "The strongest feeling on a memory, yours or Claude’s, holds it higher and makes it fade more slowly. Memories that felt the way one of you feels now come to mind a little more easily.",
|
|
13
14
|
built: [
|
|
14
15
|
"A memory’s strongest recorded feeling, or its emotional score, lifts it and slows its fading.",
|
|
15
|
-
"A recorded feeling softens faster than the memory itself.",
|
|
16
|
-
"Memories that carried
|
|
16
|
+
"A recorded feeling softens faster than the memory itself, and an unpleasant one faster than a pleasant one.",
|
|
17
|
+
"Memories that carried a feeling close to how someone feels now come up more easily — more for the same person, a little for the other.",
|
|
17
18
|
],
|
|
18
19
|
inDevelopment: ["Nothing reads feeling from the words themselves: the feeling classifier stays off, so only recorded feelings count."],
|
|
19
20
|
};
|
|
@@ -661,20 +661,23 @@ export const NARRATORS = {
|
|
|
661
661
|
const days = n(t, "lifeDays") ?? 0;
|
|
662
662
|
return calm(
|
|
663
663
|
`I left a handoff for the next session in this directory: ${num(bytes, 0)} bytes, ` +
|
|
664
|
-
`${created ? "
|
|
664
|
+
`${created ? "a new one from this session" : "replacing this session's earlier one"}, showing for ${num(days, 0)} ${days === 1 ? "day" : "days"} of use.`,
|
|
665
665
|
);
|
|
666
666
|
},
|
|
667
667
|
"handoff.shown": (t) => {
|
|
668
668
|
const age = n(t, "ageDays");
|
|
669
669
|
const bytes = n(t, "bytes") ?? 0;
|
|
670
670
|
const when = age === null ? "" : age === 0 ? ", written today" : `, written ${num(age, 0)} ${age === 1 ? "day" : "days"} of use ago`;
|
|
671
|
-
|
|
671
|
+
const among = n(t, "among");
|
|
672
|
+
const beside = among === null || among <= 1 ? "" : ` — one of ${num(among, 0)} left here by different sessions`;
|
|
673
|
+
return calm(`I woke here and was handed the pointer to a handoff in this directory${when}${beside} (${num(bytes, 0)} bytes of the wake).`);
|
|
672
674
|
},
|
|
673
675
|
"handoff.cleared": (t) => {
|
|
674
676
|
const bytes = n(t, "bytes") ?? 0;
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
677
|
+
// Since 2026-09-30 a session retires its own handoff with a blank field,
|
|
678
|
+
// or another session's by id; either way others' handoffs here stand.
|
|
679
|
+
const whose = t.p["byId"] === true ? "a handoff in this directory by its id" : "my handoff for this directory";
|
|
680
|
+
return calm(`I finished the work and retired ${whose} (${num(bytes, 0)} bytes). Any others left here still stand.`);
|
|
678
681
|
},
|
|
679
682
|
"handoff.refused": (t) => {
|
|
680
683
|
const why = s(t, "reason") ?? "refused";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* Every memory, with its words — newest first (or oldest), twenty at a time.
|
|
2
2
|
The server filters, sorts and pages (`/api/memories/list`), so a store of
|
|
3
3
|
twenty thousand rows sends twenty. Two rows of chips (round 4, 2026-09-28):
|
|
4
|
-
the kinds (with the journal and ★ core), then the
|
|
4
|
+
the kinds (with the journal and ★ core), then the seven feelings, each with its
|
|
5
5
|
count and a few words on hover; "showing: kept · put away · both" sits on
|
|
6
6
|
the right. Click a row to open the memory. While the find box holds words,
|
|
7
7
|
its answers stand here instead (`search.js`). */
|
|
@@ -35,18 +35,24 @@ export function kindMark(kind, withLabel) {
|
|
|
35
35
|
(withLabel ? '<span class="klabel">' + esc(k.label) + "</span>" : "");
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* The seven cores of the feelings wheel (`core/feelings-wheel.ts`, v2,
|
|
40
|
+
* 2026-09-30), each a colour: the pleasant four warm-to-cool around the top
|
|
41
|
+
* (happy yellow, warm pink, calm green, curious violet), the unpleasant
|
|
42
|
+
* three below (sad blue, uneasy amber, angry red). Warm was coral (#ff8a80)
|
|
43
|
+
* until the 0.3.10 release check: its dot read as angry's red on the radar,
|
|
44
|
+
* so it is pink now, apart from both angry's red and curious's violet.
|
|
45
|
+
*/
|
|
39
46
|
export const FEELING_COLOURS = {
|
|
40
|
-
happy: "#ffd740",
|
|
47
|
+
happy: "#ffd740", warm: "#ff79c6", calm: "#8bd17c", curious: "#d59cf0",
|
|
48
|
+
sad: "#64b5f6", uneasy: "#ffa45c", angry: "#ff6b6b",
|
|
41
49
|
};
|
|
42
50
|
|
|
43
51
|
/**
|
|
44
|
-
* What the dashboard CALLS each core (
|
|
45
|
-
*
|
|
46
|
-
* still carries the stored one; only the words on the page change.
|
|
52
|
+
* What the dashboard CALLS each core: the stored name. (2026-09-30 to the
|
|
53
|
+
* wheel v2, "disgust" read "dislike"; disgust is a word under angry now.)
|
|
47
54
|
*/
|
|
48
|
-
const
|
|
49
|
-
export const feelingName = (core) => FEELING_NAMES[core] || String(core || "");
|
|
55
|
+
export const feelingName = (core) => String(core || "");
|
|
50
56
|
|
|
51
57
|
/** A memory's feeling in one word: its own ("disappointed"), else its core's name. */
|
|
52
58
|
export function feelingWord(f) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* "How it feels": the one feelings chart, drawn the same on Home and on
|
|
2
2
|
Memories (round 4, 2026-09-28 — Mike's deliberate exception to "no repeats":
|
|
3
|
-
one component, two callers). A radar of the feelings wheel's
|
|
3
|
+
one component, two callers). A radar of the feelings wheel's seven cores, in
|
|
4
4
|
wheel order, with two shapes laid over each other — the owner's (the feelings
|
|
5
5
|
recorded as his) and mine. Each axis sums the recorded strengths under that
|
|
6
6
|
core across the live memories; both shapes share one scale (square root, so
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
Memories it filters the list. Hover shows the counts in words. Plain SVG.
|
|
12
12
|
|
|
13
13
|
The axes carry the stored cores (`data-core`); what they are CALLED is
|
|
14
|
-
`memory-marks.js#feelingName` (
|
|
14
|
+
`memory-marks.js#feelingName` (the stored name, since the wheel v2).
|
|
15
15
|
|
|
16
16
|
Data: `/api/overview`'s or `/api/memories`'s `feelings`
|
|
17
17
|
(`views/memories.ts#feelingsView`) — the same numbers on both. */
|
|
@@ -43,7 +43,8 @@ export function coreRoad(
|
|
|
43
43
|
// the about-mark, the owner's demotion, the reflected-feeling door and,
|
|
44
44
|
// when it is closed, the last ordinary return.
|
|
45
45
|
const ctx = coreContextFor(store, row, day);
|
|
46
|
-
|
|
46
|
+
// An unmarked memory carrying recognition is on the fast lane's road too (wheel v2).
|
|
47
|
+
if (!ctx.aboutMe && ctx.selfRelevantFeeling !== true) return null;
|
|
47
48
|
let verdict: PromotionVerdict;
|
|
48
49
|
try {
|
|
49
50
|
const physics = store.physicsOf(row.id);
|
|
@@ -64,7 +64,7 @@ export interface MemoriesView {
|
|
|
64
64
|
readonly nearLetGoDays: number;
|
|
65
65
|
/** How many lived days ahead "firm" looks (`FIRM_AHEAD_DAYS`). */
|
|
66
66
|
readonly firmAheadDays: number;
|
|
67
|
-
/** How it feels: the feelings on live memories, by the wheel's
|
|
67
|
+
/** How it feels: the feelings on live memories, by the wheel's seven cores. */
|
|
68
68
|
readonly feelings: FeelingsView;
|
|
69
69
|
/** The census, strongest first. Nothing on the page draws it now; kept for the
|
|
70
70
|
* callers and tests that read it. */
|
|
@@ -241,7 +241,7 @@ export function ownerOf(src: DashboardSource): string | null {
|
|
|
241
241
|
|
|
242
242
|
/**
|
|
243
243
|
* How it feels: the feelings recorded on `rows` (the live census), by the
|
|
244
|
-
* wheel's
|
|
244
|
+
* wheel's seven cores, yours and mine. The memories tab's radar draws it, and
|
|
245
245
|
* the home tab draws the same radar from the same numbers.
|
|
246
246
|
*/
|
|
247
247
|
export function feelingsView(src: DashboardSource, rows: readonly { readonly id: string }[] = census(src)): FeelingsView {
|
|
@@ -363,7 +363,7 @@ export interface MemoryListView {
|
|
|
363
363
|
readonly journal: number;
|
|
364
364
|
/** Firm / settling / fading — live rows only, journal chapters left out. */
|
|
365
365
|
readonly hold: Record<Hold, number>;
|
|
366
|
-
/** Memories carrying a feeling under each of the wheel's
|
|
366
|
+
/** Memories carrying a feeling under each of the wheel's seven cores (either
|
|
367
367
|
* side), within the live/archived choice. */
|
|
368
368
|
readonly feelings: Record<string, number>;
|
|
369
369
|
};
|
|
@@ -962,7 +962,7 @@ export function coreCandidates(src: DashboardSource, pageId: string | null): { r
|
|
|
962
962
|
if (p.promotedIdentity) continue;
|
|
963
963
|
// Exactly the context sleep's consolidate builds (`coreContextFor`, #262).
|
|
964
964
|
const ctx = coreContextFor(store, row, day);
|
|
965
|
-
if (!ctx.aboutMe) {
|
|
965
|
+
if (!ctx.aboutMe && ctx.selfRelevantFeeling !== true) {
|
|
966
966
|
outOfReach += 1;
|
|
967
967
|
continue;
|
|
968
968
|
}
|
|
@@ -6,14 +6,18 @@
|
|
|
6
6
|
*
|
|
7
7
|
* "you" is the owner — the person reading — and "me" is the counterpart
|
|
8
8
|
* (emotion part A, owner decision 6). The number is the strength as recorded;
|
|
9
|
-
* "now" is the same feeling softened by the lived days since (physics §5.10
|
|
10
|
-
* shown only when it has moved. The word is the wheel word, or the writer's own
|
|
9
|
+
* "now" is the same feeling softened by the lived days since (physics §5.10;
|
|
10
|
+
* an unpleasant one softens faster), shown only when it has moved. The word is the wheel word, or the writer's own
|
|
11
11
|
* for an `other`. `carried_by` is not shown: it is a pointer at the moment,
|
|
12
12
|
* and it stays with the export.
|
|
13
13
|
*/
|
|
14
14
|
import { softenedFeeling } from "../core/physics/index.js";
|
|
15
|
+
import { feelingValence } from "../core/store/index.js";
|
|
15
16
|
import type { FeelingRow } from "../core/store/index.js";
|
|
16
17
|
|
|
18
|
+
/** What a feeling line reads off a row: the word, the strength, and what its valence comes from. */
|
|
19
|
+
type LineRow = Pick<FeelingRow, "whose" | "core" | "emotion" | "other_word" | "strength"> & { valence?: number | null };
|
|
20
|
+
|
|
17
21
|
/** What each `whose` is called on a surface the owner reads. */
|
|
18
22
|
export function whoseLabel(whose: string): string {
|
|
19
23
|
return whose === "owner" ? "you" : whose === "self" ? "me" : whose;
|
|
@@ -34,14 +38,14 @@ export interface ShownFeeling {
|
|
|
34
38
|
}
|
|
35
39
|
|
|
36
40
|
export function shownFeelings(
|
|
37
|
-
rows: readonly
|
|
41
|
+
rows: readonly LineRow[],
|
|
38
42
|
ageDays: number,
|
|
39
43
|
): ShownFeeling[] {
|
|
40
44
|
return rows.map((r) => ({
|
|
41
45
|
who: whoseLabel(r.whose),
|
|
42
46
|
word: feelingWord(r),
|
|
43
47
|
strength: r.strength,
|
|
44
|
-
now: softenedFeeling(r.strength, ageDays),
|
|
48
|
+
now: softenedFeeling(r.strength, ageDays, feelingValence(r)),
|
|
45
49
|
}));
|
|
46
50
|
}
|
|
47
51
|
|
|
@@ -52,7 +56,7 @@ const n1 = (x: number): string => x.toFixed(1);
|
|
|
52
56
|
* anyone else — or "" when there are no feelings.
|
|
53
57
|
*/
|
|
54
58
|
export function feelingsLine(
|
|
55
|
-
rows: readonly
|
|
59
|
+
rows: readonly LineRow[],
|
|
56
60
|
ageDays: number,
|
|
57
61
|
): string {
|
|
58
62
|
const shown = shownFeelings(rows, ageDays);
|
package/src/adapters/fired.ts
CHANGED
|
@@ -801,7 +801,7 @@ export const MECHANISMS: readonly Mechanism[] = [
|
|
|
801
801
|
},
|
|
802
802
|
{
|
|
803
803
|
id: "handoff-shown",
|
|
804
|
-
label: "a session waking in that directory was handed the pointer to
|
|
804
|
+
label: "a session waking in that directory was handed the pointer to a handoff",
|
|
805
805
|
module: "handoff/index.ts",
|
|
806
806
|
evidence: { kind: "event", names: ["handoff.shown"] },
|
|
807
807
|
since: "2026-09-20",
|