counterparts 0.3.34 → 0.3.36
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 +71 -0
- package/package.json +1 -1
- package/src/adapters/cli/dream-core.ts +22 -6
- package/src/adapters/cli/removal.ts +20 -2
- package/src/adapters/dashboard/web/narrate.ts +11 -1
- package/src/adapters/dashboard/web/pages/self/sections/settling.js +1 -1
- package/src/adapters/dashboard/web/shared/memory-card-words.js +13 -0
- package/src/adapters/dashboard/web/views/memory.ts +7 -3
- package/src/adapters/dashboard/web/views/mind.ts +3 -3
- package/src/adapters/mcp/server-self-tools.ts +61 -10
- package/src/adapters/mcp/server-words.ts +1 -1
- package/src/adapters/mcp/server.ts +13 -4
- package/src/adapters/mechanism-evidence.ts +3 -3
- package/src/core/associate/CONTRACT.md +24 -3
- package/src/core/associate/NOTES.md +21 -1
- package/src/core/associate/buffer.ts +41 -1
- package/src/core/associate/edges.ts +103 -0
- package/src/core/associate/index.ts +198 -4
- package/src/core/associate/pending.ts +60 -4
- package/src/core/associate/tunables.ts +40 -4
- package/src/core/counterpart-events.ts +21 -0
- package/src/core/counterpart-types.ts +3 -1
- package/src/core/counterpart.ts +347 -20
- package/src/core/dream/CONTRACT.md +11 -3
- package/src/core/dream/NOTES.md +44 -0
- package/src/core/dream/index.ts +1 -1
- package/src/core/dream/reflect.ts +121 -11
- package/src/core/dream/tunables.ts +7 -0
- package/src/core/handoff/CONTRACT.md +24 -2
- package/src/core/handoff/last-here.ts +176 -18
- package/src/core/physics/CONTRACT.md +128 -16
- package/src/core/physics/NOTES.md +100 -0
- package/src/core/physics/index.ts +345 -14
- package/src/core/recall/CONTRACT.md +25 -2
- package/src/core/recall/NOTES.md +108 -0
- package/src/core/recall/activate.ts +87 -0
- package/src/core/recall/gate.ts +43 -3
- package/src/core/recall/index.ts +233 -12
- package/src/core/recall/session.ts +148 -4
- package/src/core/recall/standing.ts +82 -1
- package/src/core/recall/tunables.ts +98 -0
- package/src/core/retrieval.ts +9 -0
- package/src/core/schemas/CONTRACT.md +7 -2
- package/src/core/schemas/NOTES.md +21 -0
- package/src/core/schemas/index.ts +6 -1
- package/src/core/schemas/tunables.ts +11 -0
- package/src/core/schemas/types.ts +6 -0
- package/src/core/self/CONTRACT.md +14 -3
- package/src/core/self/NOTES.md +7 -0
- package/src/core/self/briefing-room.ts +21 -1
- package/src/core/self/briefing.ts +101 -4
- package/src/core/self/index.ts +6 -1
- package/src/core/self/tunables.ts +24 -0
- package/src/core/sleep/CONTRACT.md +34 -4
- package/src/core/sleep/NOTES.md +37 -0
- package/src/core/sleep/consolidate.ts +334 -47
- package/src/core/sleep/index.ts +5 -0
- package/src/core/sleep/tunables.ts +6 -5
- package/src/core/store/NOTES.md +10 -0
- package/src/core/store/index.ts +107 -6
- package/src/core/store/operational.ts +39 -3
- package/src/core/store/owner-op-seam.ts +12 -0
- package/src/core/store/wave2.ts +104 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,76 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.36 — 2026-10-25
|
|
4
|
+
|
|
5
|
+
A session opened mid-day now sees what this folder did earlier today (a "Today so far here" line), and the Yesterday line opens with day's end's own summary of yesterday when everything it rests on may be shown in this folder; on a tight day, "Still open" keeps its items before "Today so far" keeps its summaries. When you write the newer state of a recent memory without linking it, a turn that brings back both shows the newer one first and labels the older one "may be out of date". A word that brought a memory back, which the session then used, is wired to it, so next time the word alone can bring it back. The core is decided every night instead of every third (still at most three a night), and a belief you repeat awake counts as support for the one that already says it. A new way of deciding the core, by how much real use has backed a memory, runs **in shadow only**: it records each night what it would have let in or kept out, and nothing changes yet. **This release changes the store's format (v14 to v15, one new table), so after installing, quit the dashboard and every open Claude Code session, then start them again**: one left running from before the update keeps the old code against the upgraded store and stops working on it until it is restarted. The first open saves a copy of your store before upgrading it. **0.3.35 and older refuse the upgraded store**, so going back to 0.3.35 is `counterparts rollback` first, while 0.3.36 is still installed (it puts that pre-upgrade copy back; anything remembered since is set aside, not deleted), then 0.3.35's install and `counterparts connect` as it prints. Cache v7 unchanged; no wiring change, so `counterparts connect` is not needed after upgrading.
|
|
6
|
+
|
|
7
|
+
- **The core is decided every night, not every third night.** A memory that has earned its
|
|
8
|
+
place in who I am joins at the next sleep instead of waiting up to two more days. Still at
|
|
9
|
+
most three a night.
|
|
10
|
+
- **Practising a cue makes its answer come back faster.** When a word in what you typed brings a
|
|
11
|
+
memory back and the session then uses it (opens it, quotes it, draws on it, or rates it 2–3),
|
|
12
|
+
that word is wired to the memory, and next time the word alone can bring it back. A memory
|
|
13
|
+
rated 0 for a word drops for that word only. Only words some memory already holds are ever
|
|
14
|
+
kept, and a turn's words leave with the conversation after 14 days. Store format 15 (one new
|
|
15
|
+
table); the upgrade copies the store first, and an older build refuses the upgraded store.
|
|
16
|
+
Switch: `physics.CUE_LEARNING`.
|
|
17
|
+
- **A session opened mid-day sees what this folder did earlier today.** A "Today so far here"
|
|
18
|
+
line under the Yesterday line names today's earlier chapters in this folder, each with its
|
|
19
|
+
time, title, id and the first sentence of its summary. It gives up room before anything
|
|
20
|
+
else under the framing.
|
|
21
|
+
- **Yesterday reads as day's end told it.** When day's end left a summary of yesterday, the
|
|
22
|
+
Yesterday line opens with it, word for word, and lists the chapters after it. It does this
|
|
23
|
+
only when everything the summary rests on may be shown in this folder, and otherwise lists
|
|
24
|
+
the chapters as before.
|
|
25
|
+
- **A belief you repeat awake now counts for the one that already says it.** When a session
|
|
26
|
+
writes a belief that an existing belief already says, it is still turned away with that
|
|
27
|
+
belief's id, and the memory now counts as support for it, once per session, instead of
|
|
28
|
+
waiting for the night's reflection.
|
|
29
|
+
- **A change you didn't link wins a close race right away.** When you write something that reads
|
|
30
|
+
as the newer state of a recent memory without saying so ("the car is a Rivian now"), the two
|
|
31
|
+
are marked as a pair for the night to confirm. Until then, a turn that brings back both now
|
|
32
|
+
shows the newer one first; the older one still shows, labelled "may be out of date", whenever
|
|
33
|
+
there is room, and on its own it shows as before. Nothing is changed in the store. Switch:
|
|
34
|
+
`recall.UNSETTLED_COMPETES`.
|
|
35
|
+
- **The nightly reflection is offered its unmarked memories again, and says so.** On a busy night
|
|
36
|
+
the room was full before the offer of memories nobody had marked was fitted, so from 10-10 the
|
|
37
|
+
reflection was offered none and its record said nothing. Now it is offered up to 24 a night
|
|
38
|
+
whatever the room, and every reflection records how many it was offered and how many it marked,
|
|
39
|
+
0 included.
|
|
40
|
+
- **On a tight day, "Still open" keeps its items before "Today so far" keeps its summaries.**
|
|
41
|
+
The chapter summaries in the "Today so far here" line step down to titles before any "Still
|
|
42
|
+
open" item is dropped, since a summary can still be opened by its chapter's id. The titles
|
|
43
|
+
keep their place.
|
|
44
|
+
- **A memory joins the core when life has backed it enough, by one measure instead of two
|
|
45
|
+
lanes.** Real uses of a memory about me or us (opened, quoted, drawn on, rated useful)
|
|
46
|
+
from separate moments and lived days add up, the way a belief's support does; feeling
|
|
47
|
+
makes each count more, so a strongly felt memory that comes back once, a couple of days
|
|
48
|
+
or more after it was made, is in, and an ordinary one needs to come back on another day.
|
|
49
|
+
The day after a memory is made counts as the same occasion as its making. Being shown counts nothing, and a
|
|
50
|
+
reflection citing a memory counts only once a later use echoes it, never on its own.
|
|
51
|
+
Each new core memory's record lists what backed it. **For now it runs in shadow:** the two
|
|
52
|
+
lanes still decide what becomes core, and each night this measure records, beside them, which
|
|
53
|
+
memories it would have let in or kept out, so a week of real nights can decide.
|
|
54
|
+
Switch: `physics.CORE_DOOR_SUPPORT` (`"shadow"` by default, `"on"`, `"off"`).
|
|
55
|
+
|
|
56
|
+
## 0.3.35 — 2026-10-24
|
|
57
|
+
|
|
58
|
+
The morning reflection reads a shorter list of the memories that may become core: at most 30 a night, the 20 strongest and 10 taking turns through the rest, with the others counted in one line (on a copy of the author's store, 132 candidates → 30 shown and "+102 more", the reflection's reading 85k characters in 4 parts → 74k in 3; a tail of about 100 comes round in about 10 nights). Day's end's known misread from 0.3.34 is fixed: a night that tells the day and then writes the page reads as a page revised. A memory written in one session now counts as used the first time another session draws on it, the same day. No store-format change (store v14, cache v7), no wiring change: `counterparts connect` is not needed after upgrading. Restart the dashboard and every Claude Code session afterwards so the long-running memory server and dashboard load the new version.
|
|
59
|
+
|
|
60
|
+
- **The morning reflection is shown at most 30 core candidates a night, not every one.** The 20 strongest felt and
|
|
61
|
+
newest come every night, and 10 more take turns through the rest, the ones it saw longest ago first, so each still
|
|
62
|
+
comes round. The rest are counted in one line. On a store with about 130 candidates the reflection's bundle is
|
|
63
|
+
about 11k characters shorter and one part fewer. Switch: `dream.REFLECT_CANDIDATES_CAP`.
|
|
64
|
+
- **Day's end that tells the day first and then writes the page anyway is read as a page
|
|
65
|
+
written.** The night's row, doctor and the dashboard said "nothing to say" for that night
|
|
66
|
+
although the page had changed; now they say it was revised, and the day summary stays
|
|
67
|
+
with it.
|
|
68
|
+
- **A memory can be credited on the day it was written, by any session but the one that wrote
|
|
69
|
+
it.** Until now no use counted on a memory's first day, so a note another session opened or
|
|
70
|
+
drew on within minutes stayed at zero uses. The rule's real cause was the writing session
|
|
71
|
+
seeing its own words in its reply, so that session is now the one refused that day. Switch:
|
|
72
|
+
`physics.OWN_WRITE_GATE`.
|
|
73
|
+
|
|
3
74
|
## 0.3.34 — 2026-10-23
|
|
4
75
|
|
|
5
76
|
The night is lighter and better organised. Its helpers start slim, with only the memory tools they use and a short prompt of their own, and the dream's and the reflection's reading goes out as plain lines with short ids (on a copy of the author's store the dream's bundle fell by 43–45%, the reflection's by about 13%, with the same memories shown). The nightly page writer is now called **day's end**: it runs first, in its own child, reads the day by its chapters' summaries and its strongest memories, writes Lately and How I work, and leaves a short account of the day that the dream reads first; the reflection writes Core. The reflection sees the long view again: on busy nights it had been shown no core memories at all, and now it reads them first, with the last three weeks as a line a day. `counterparts night last` and doctor say what a night cost in tokens. No store-format change (store v14, cache v7), no wiring change: `counterparts connect` is not needed after upgrading. Restart the dashboard and every Claude Code session afterwards so the long-running memory server and dashboard load the new version.
|
package/package.json
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import type { Counterpart } from "../../core/counterpart.js";
|
|
12
12
|
import { dreamSkippedOf, nightPartsWords, nightRunWords, nightTokensWords } from "../../core/dream/index.js";
|
|
13
13
|
import type { DreamingSetting, NightRun } from "../../core/dream/index.js";
|
|
14
|
+
import { coreDoorMode } from "../../core/physics/index.js";
|
|
14
15
|
import { acceptsReflectedFeeling, reconsiderWords } from "../../core/sleep/index.js";
|
|
15
16
|
import { coreSupport } from "../../core/self/measures.js";
|
|
16
17
|
import { daySummaries } from "../../core/self/writer.js";
|
|
@@ -254,6 +255,8 @@ export function dreamShowLines(counterpart: Counterpart, id: string): string[] |
|
|
|
254
255
|
/** `counterparts core --list`: the core with lanes, then nominations and demotions. */
|
|
255
256
|
export function coreListLines(counterpart: Counterpart): string[] {
|
|
256
257
|
const { core, nominated, demoted, reconsidering } = counterpart.coreList();
|
|
258
|
+
// The support door decides only at "on" (2026-10-24, E2); "shadow" and "off" are the two lanes.
|
|
259
|
+
const supportDoor = coreDoorMode() === "on";
|
|
257
260
|
const out = [
|
|
258
261
|
core.length === 0
|
|
259
262
|
? "The core is empty: nothing has become part of who I am yet."
|
|
@@ -279,12 +282,25 @@ export function coreListLines(counterpart: Counterpart): string[] {
|
|
|
279
282
|
"",
|
|
280
283
|
"Only a memory about me or about us becomes core — what it is about is marked by meaning, by the",
|
|
281
284
|
"writer or by a reflection (owner, work and world are not candidates, nor a fact, a skill or a plan).",
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
285
|
+
...(supportDoor
|
|
286
|
+
? [
|
|
287
|
+
// The support door (2026-10-24, E2).
|
|
288
|
+
"Then: life has to back it enough — real uses of it (or its earlier and later states) from separate",
|
|
289
|
+
"moments and lived days, feeling making each count more; a glimpse counts nothing, and a reflection",
|
|
290
|
+
"that cites it counts a little until a later use echoes it, never alone. At most a few a night.",
|
|
291
|
+
]
|
|
292
|
+
: [
|
|
293
|
+
"Then: strongly felt and back after a gap (fast lane), or it and its earlier and later states kept",
|
|
294
|
+
"coming back — on several days, in several sessions, over a week or more inside a month (slow lane).",
|
|
295
|
+
"A reflection that cites a memory counts as it coming back. At most a few a night.",
|
|
296
|
+
]),
|
|
297
|
+
supportDoor
|
|
298
|
+
? acceptsReflectedFeeling(counterpart.store)
|
|
299
|
+
? "Open to later feelings: a feeling a reflection records later makes its memory's uses count more, and a reflection may re-label either way (counterparts core --reflected-feeling off to close it)."
|
|
300
|
+
: "Closed to later feelings: only a feeling felt at the time makes a memory's uses count more, and a reflection may only move a memory toward work or world (counterparts core --reflected-feeling on to open it)."
|
|
301
|
+
: acceptsReflectedFeeling(counterpart.store)
|
|
302
|
+
? "Open to reflection alone: a feeling a reflection records later and a reflection citing a memory count toward the fast lane, and a reflection may re-label either way (counterparts core --reflected-feeling off to close it)."
|
|
303
|
+
: "Closed to reflection alone: the fast lane needs a feeling felt at the time and an ordinary use after a gap, and a reflection may only move a memory toward work or world (counterparts core --reflected-feeling on to open it).",
|
|
288
304
|
);
|
|
289
305
|
if (nominated.length > 0) {
|
|
290
306
|
out.push("", "Nominated by a dream (a lane still has to promote it):");
|
|
@@ -66,7 +66,7 @@ import { strikeSpans } from "../../core/remember/owner-strike-seam.js";
|
|
|
66
66
|
// directory belongs to `self/`, and the invariant it keeps ("a file exists
|
|
67
67
|
// exactly when a live episode row does") is what makes the chase provable.
|
|
68
68
|
import { journalFilesFor, syncJournalCopy } from "../../core/self/journal-file.js";
|
|
69
|
-
import { paths, rowTombstoned } from "../../core/store/index.js";
|
|
69
|
+
import { indexTerms, paths, rowTombstoned } from "../../core/store/index.js";
|
|
70
70
|
import { isLocked, openDb } from "../../core/store/db.js";
|
|
71
71
|
import type {
|
|
72
72
|
OwnerRemovalOutcome,
|
|
@@ -905,8 +905,12 @@ export function ownerRemoval(
|
|
|
905
905
|
// there is nothing left to match on. It never enters the plan, the report or
|
|
906
906
|
// any record — the seam receives a FUNCTION, not a string (§16 G15).
|
|
907
907
|
let doomedBody = "";
|
|
908
|
+
/** Its title, for the cue words' chase after the cache rebuild (R3). Never recorded. */
|
|
909
|
+
let doomedTitle = "";
|
|
908
910
|
try {
|
|
909
|
-
|
|
911
|
+
const doomed = store.readProse(request.targetId);
|
|
912
|
+
doomedBody = doomed.body.trim();
|
|
913
|
+
doomedTitle = doomed.title ?? "";
|
|
910
914
|
} catch {
|
|
911
915
|
/* already gone; the hashes are the chase then, or nothing is */
|
|
912
916
|
}
|
|
@@ -1039,6 +1043,20 @@ export function ownerRemoval(
|
|
|
1039
1043
|
try {
|
|
1040
1044
|
store.rebuildCache();
|
|
1041
1045
|
chased.push("cache");
|
|
1046
|
+
// ITS WORDS AS LEARNED CUES (review of #613, R3 cue learning): a word of
|
|
1047
|
+
// this memory's that no memory holds any more must not live on as a cue
|
|
1048
|
+
// to another memory (`cue_edges` keeps index terms, and only ones the
|
|
1049
|
+
// index held: kept true after the removal). Asked after the rebuild,
|
|
1050
|
+
// which is what says the index no longer holds them.
|
|
1051
|
+
const terms = indexTerms(`${doomedTitle}\n${doomedBody}`);
|
|
1052
|
+
if (terms.length > 0) {
|
|
1053
|
+
try {
|
|
1054
|
+
const gone = store.sweepCueEdges({ staleOnOrBefore: -1, terms }, () => false);
|
|
1055
|
+
if (gone > 0) chased.push(`operational.cue_edges(${gone} more: words no memory holds now)`);
|
|
1056
|
+
} catch {
|
|
1057
|
+
unchased.push("operational.cue_edges (words no memory holds now may still be wired to other memories)");
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1042
1060
|
} catch {
|
|
1043
1061
|
unchased.push("cache");
|
|
1044
1062
|
}
|
|
@@ -115,6 +115,13 @@ function n(t: Told, key: string): number | null {
|
|
|
115
115
|
return typeof v === "number" && Number.isFinite(v) ? v : null;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
+
/** A support crossing's lived days (`payload.support.days`, 2026-10-24), else `fallback`. */
|
|
119
|
+
function supportDays(t: Told, fallback: number): number {
|
|
120
|
+
const sup = t.p["support"];
|
|
121
|
+
const v = typeof sup === "object" && sup !== null ? (sup as Record<string, unknown>)["days"] : undefined;
|
|
122
|
+
return typeof v === "number" && Number.isFinite(v) ? v : fallback;
|
|
123
|
+
}
|
|
124
|
+
|
|
118
125
|
function s(t: Told, key: string): string | null {
|
|
119
126
|
const v = t.p[key];
|
|
120
127
|
return typeof v === "string" && v.length > 0 ? v : null;
|
|
@@ -187,7 +194,10 @@ export const NARRATORS = {
|
|
|
187
194
|
? `${subject(t)} became core — it was strongly felt, and it came back after a gap.`
|
|
188
195
|
: lane === "slow"
|
|
189
196
|
? `${subject(t)} became core — it kept coming back, on ${days} separate days over weeks.`
|
|
190
|
-
:
|
|
197
|
+
: lane === "support"
|
|
198
|
+
? // The support door (2026-10-24, E2): one arc, its lived days on the record.
|
|
199
|
+
`${subject(t)} became core — it kept coming back, from separate moments, on ${supportDays(t, days)} lived ${supportDays(t, days) === 1 ? "day" : "days"}.`
|
|
200
|
+
: `${subject(t)} crossed into identity — it had been in real use on ${days} separate days.`,
|
|
191
201
|
);
|
|
192
202
|
},
|
|
193
203
|
"band.demoted": (t) =>
|
|
@@ -150,7 +150,7 @@ export function ruleWords(s) {
|
|
|
150
150
|
const r = s.rule;
|
|
151
151
|
const foot = ["Only a memory about me or about us joins the core, by one of two lanes: strongly felt (" + n2(r.needFeeling) +
|
|
152
152
|
" or more) and come back at least once, " + r.needGap + " or more days after it was made; or keep coming back — it, or the memories that are its earlier and later states — on " + r.days +
|
|
153
|
-
" different days" + (r.sessions ? ", in " + r.sessions + " sessions," : "") + " over " + r.span + (r.window ? ", within the last " + r.window : "") + ", once it has been used itself. That is checked every " + r.everyDays + " days of use, at most " + r.cap + " a night. " +
|
|
153
|
+
" different days" + (r.sessions ? ", in " + r.sessions + " sessions," : "") + " over " + r.span + (r.window ? ", within the last " + r.window : "") + ", once it has been used itself. That is checked " + (r.everyDays === 1 ? "every day of use" : "every " + r.everyDays + " days of use") + ", at most " + r.cap + " a night. " +
|
|
154
154
|
(r.quietDays ? "A core memory that stops coming back for " + r.quietDays + " days is reconsidered, never dropped without a decision. " : "") +
|
|
155
155
|
// The map's own words (round 4 of the map, 2026-09-28: three named rings,
|
|
156
156
|
// no legend) — this sentence described the legend before it.
|
|
@@ -18,6 +18,19 @@ export function coreRoadLine(p, promoted) {
|
|
|
18
18
|
if (promoted || !p) return "";
|
|
19
19
|
if (p.eligible && p.lane === "fast") return "Felt strongly and come back to — it has met the core's bar, and a sleep can make it core.";
|
|
20
20
|
if (p.eligible && p.lane === "slow") return "It has come back on enough separate days — it has met the core's bar, and a sleep can make it core.";
|
|
21
|
+
// The support door (2026-10-24, E2): one arc, so one sentence.
|
|
22
|
+
if (p.eligible && p.lane === "support") return "Life has backed it enough, from separate moments — it has met the core's bar, and a sleep can make it core.";
|
|
23
|
+
// With the support door on, the lanes' day counts are not its road: how far along the one arc it is.
|
|
24
|
+
if (p.support) {
|
|
25
|
+
if (p.blocked === "demoted-by-owner") return "You took it out of the core, so it stays out.";
|
|
26
|
+
if (!p.byUse) return "";
|
|
27
|
+
if (p.oneReturn) {
|
|
28
|
+
return "Felt strongly, so one real use " + p.needGap + (p.needGap === 1 ? " day of use" : " days of use") +
|
|
29
|
+
" or more after it was made makes it core.";
|
|
30
|
+
}
|
|
31
|
+
const pct = Math.max(0, Math.min(99, Math.round((100 * p.support.level) / p.support.need)));
|
|
32
|
+
return "Real uses from separate moments, on separate days, make it core — it is " + pct + "% of the way.";
|
|
33
|
+
}
|
|
21
34
|
if (p.oneReturn) {
|
|
22
35
|
return "Felt strongly, so one real return makes it core — coming back to it " + p.needGap +
|
|
23
36
|
(p.needGap === 1 ? " day of use" : " days of use") + " or more after it was made.";
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* the four rules in that file's header apply to every line below.
|
|
6
6
|
*/
|
|
7
7
|
import { TUNABLES, band, emotionalIntensity, promotionEligibility, rep, sal, strength } from "../../../../core/physics/index.js";
|
|
8
|
-
import type { PromotionVerdict } from "../../../../core/physics/index.js";
|
|
8
|
+
import type { CoreLane, PromotionVerdict } from "../../../../core/physics/index.js";
|
|
9
9
|
import { DREAM_MERGE_REASON } from "../../../../core/dream/index.js";
|
|
10
10
|
import { feelingsLine } from "../../../feelings-line.js";
|
|
11
11
|
import { coreContextFor, curveSinceDay, isJournal } from "../../../../core/sleep/index.js";
|
|
@@ -56,9 +56,11 @@ export interface CoreRoad {
|
|
|
56
56
|
readonly holdShort: boolean;
|
|
57
57
|
readonly oneReturn: boolean;
|
|
58
58
|
readonly needGap: number;
|
|
59
|
-
readonly lane:
|
|
59
|
+
readonly lane: CoreLane | null;
|
|
60
60
|
readonly eligible: boolean;
|
|
61
61
|
readonly blocked: "not-about-me" | "demoted-by-owner" | null;
|
|
62
|
+
/** The support door's level and line (2026-10-24, E2), only while `physics.CORE_DOOR_SUPPORT` is on. */
|
|
63
|
+
readonly support?: { readonly level: number; readonly need: number };
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
/**
|
|
@@ -82,10 +84,12 @@ export function coreRoad(verdict: PromotionVerdict): CoreRoad {
|
|
|
82
84
|
needSpan: verdict.slow.needSpan,
|
|
83
85
|
holdShort: verdict.slow.strength !== null && verdict.slow.strength < verdict.slow.needStrength,
|
|
84
86
|
oneReturn: onlyNoLane && !verdict.fast.met && verdict.fast.intensity >= verdict.fast.needIntensity,
|
|
85
|
-
|
|
87
|
+
// The support door's spacing from the making when it is on (E2 review), else the fast lane's gap.
|
|
88
|
+
needGap: verdict.support?.needGap ?? verdict.fast.needGap,
|
|
86
89
|
lane: verdict.lane,
|
|
87
90
|
eligible: verdict.eligible,
|
|
88
91
|
blocked,
|
|
92
|
+
...(verdict.support === undefined ? {} : { support: { level: verdict.support.level, need: verdict.support.needLevel } }),
|
|
89
93
|
};
|
|
90
94
|
}
|
|
91
95
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* the four rules in that file's header apply to every line below.
|
|
6
6
|
*/
|
|
7
7
|
import { TUNABLES as PHYSICS, promotionEligibility, sal } from "../../../../core/physics/index.js";
|
|
8
|
-
import type { PromotionVerdict } from "../../../../core/physics/index.js";
|
|
8
|
+
import type { CoreLane, PromotionVerdict } from "../../../../core/physics/index.js";
|
|
9
9
|
import {
|
|
10
10
|
FRAMING,
|
|
11
11
|
LEGACY_CONTEXT,
|
|
@@ -255,7 +255,7 @@ export interface Candidate {
|
|
|
255
255
|
readonly span: number;
|
|
256
256
|
readonly needSpan: number;
|
|
257
257
|
/** The lane that is met, when one is: the next consolidation crosses it (the nightly cap permitting). */
|
|
258
|
-
readonly lane:
|
|
258
|
+
readonly lane: CoreLane | null;
|
|
259
259
|
readonly eligible: boolean;
|
|
260
260
|
/**
|
|
261
261
|
* THE FAST LANE'S ROAD (round 3, S3): felt strongly enough, and nothing but
|
|
@@ -961,7 +961,7 @@ export interface CoreCandidate {
|
|
|
961
961
|
readonly days: number;
|
|
962
962
|
readonly span: number;
|
|
963
963
|
/** The lane that is met, when one is. */
|
|
964
|
-
readonly lane:
|
|
964
|
+
readonly lane: CoreLane | null;
|
|
965
965
|
readonly eligible: boolean;
|
|
966
966
|
/** The better of the two lanes' progress, 0..2. */
|
|
967
967
|
readonly closeness: number;
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
pageTooLargeDetail,
|
|
16
16
|
} from "../../core/self/index.js";
|
|
17
17
|
import type { TraceInput } from "../../core/self/page.js";
|
|
18
|
-
import type { PageWriterMode } from "../../core/self/index.js";
|
|
18
|
+
import type { PageWriterMode, PageWriterRun } from "../../core/self/index.js";
|
|
19
19
|
import type { ToolResult } from "./server-options.js";
|
|
20
20
|
import { dreamHow, PAGE_REFUSAL_DETAIL, pageLaneAnswer, pageRoomAnswer } from "./server-words.js";
|
|
21
21
|
import type { McpServer } from "./server.js";
|
|
@@ -704,7 +704,13 @@ export function selfPageTool(server: McpServer, args: Record<string, unknown>):
|
|
|
704
704
|
// over the page-writer ask, and it is a DATE: a session asked to write
|
|
705
705
|
// about 09-19 writes `writer` for that run and nothing else, and a stale
|
|
706
706
|
// mark cannot relabel a write made two days later (`adapters/sessions.ts`).
|
|
707
|
-
|
|
707
|
+
// DAY'S END TOLD THE DAY ALONE, THEN WROTE THE PAGE ANYWAY (the edge
|
|
708
|
+
// recorded at #606's merge): the alone call answered the night and closed
|
|
709
|
+
// the claim, so the mark is gone — but this is still day's end, and the
|
|
710
|
+
// night's row must say the page changed. Only a page, only the same
|
|
711
|
+
// session on the same day, only before the dream begins (`daysEndStood`).
|
|
712
|
+
const stood = typeof body === "string" ? daysEndStood(server, claimedSession) : null;
|
|
713
|
+
const writerFor = server["pageWriterMark"](claimedSession) ?? (stood === null ? null : { about: stood.about, mode: stood.mode });
|
|
708
714
|
// THE PAGE WRITER'S OWN CHILD (2026-10-23, `self.PAGE_SPLIT`; review of
|
|
709
715
|
// #603): every page write it makes is the writer's, held to the writer's
|
|
710
716
|
// lane — its first write closes the night's claim, and a resend after it
|
|
@@ -786,11 +792,22 @@ export function selfPageTool(server: McpServer, args: Record<string, unknown>):
|
|
|
786
792
|
? `past-room: ${String(written.bytes)} bytes, ${String(written.bytes - written.overRoom)} over the ${String(written.overRoom)}-byte room`
|
|
787
793
|
: written.reason,
|
|
788
794
|
bytesAfter: written.written ? written.bytes : 0,
|
|
795
|
+
// After a summary sent alone, the page it stood on and what the claim was handed.
|
|
796
|
+
...(stood === null ? {} : { bytesBefore: stood.bytesAfter, considered: stood.considered, omitted: stood.omitted }),
|
|
789
797
|
// THE DAY SUMMARY rides on the night's own row (2026-10-23, lane D2),
|
|
790
798
|
// with the session and run that told it, so the dream finds it.
|
|
791
799
|
// Only on a page written (review of D2): a refused page's summary is
|
|
792
800
|
// sent again with the page, and kept then.
|
|
793
|
-
|
|
801
|
+
// Sent alone earlier (`stood`), it is carried onto this row, so the
|
|
802
|
+
// night's answer and its summary stay one row; a summary sent again
|
|
803
|
+
// with this page is the later telling and stands instead.
|
|
804
|
+
...(!written.written
|
|
805
|
+
? {}
|
|
806
|
+
: keep !== null
|
|
807
|
+
? summaryRow(server, claimedSession, keep, stood?.run)
|
|
808
|
+
: stood !== null
|
|
809
|
+
? { summary: stood.summary, summaryCites: stood.summaryCites, session: stood.session, run: stood.run }
|
|
810
|
+
: {}),
|
|
794
811
|
});
|
|
795
812
|
} catch {
|
|
796
813
|
/* the page is written; the bookkeeping is not worth the answer */
|
|
@@ -800,9 +817,11 @@ export function selfPageTool(server: McpServer, args: Record<string, unknown>):
|
|
|
800
817
|
// Day's end's page written with no summary, while day summaries are on:
|
|
801
818
|
// said, since the night is answered now and its dream opens without one.
|
|
802
819
|
const notSent =
|
|
803
|
-
told === null &&
|
|
804
|
-
? {
|
|
805
|
-
:
|
|
820
|
+
told === null && stood !== null && written.written
|
|
821
|
+
? { summary: { kept: true, about: stood.about, chars: charCount(stood.summary), cites: stood.summaryCites.length, sentEarlier: true } }
|
|
822
|
+
: told === null && writerFor !== null && typeof body === "string" && written.written && SELF_TUNABLES.DAY_SUMMARY
|
|
823
|
+
? { summaryNotSent: "No day summary came with this write, so tonight's dream opens without one." }
|
|
824
|
+
: {};
|
|
806
825
|
const toldAnswer =
|
|
807
826
|
told === null
|
|
808
827
|
? notSent
|
|
@@ -970,17 +989,49 @@ function daySummaryArgs(server: McpServer, sent: string, rawCites: unknown, from
|
|
|
970
989
|
}
|
|
971
990
|
|
|
972
991
|
/** The day summary's fields on the night's row: its words, cites, and the session and run that told it. */
|
|
973
|
-
function summaryRow(server: McpServer, claimedSession: string | null, told: DaySummaryArgs): { summary: string; summaryCites: readonly string[]; session?: string; run?: string } {
|
|
992
|
+
function summaryRow(server: McpServer, claimedSession: string | null, told: DaySummaryArgs, knownRun?: string): { summary: string; summaryCites: readonly string[]; session?: string; run?: string } {
|
|
974
993
|
const session = claimedSession ?? server.session ?? "";
|
|
975
|
-
let run = "";
|
|
994
|
+
let run = knownRun ?? "";
|
|
976
995
|
try {
|
|
977
|
-
run = session === "" ? "" : (server.counterpart.nightClaimFor(session)?.run ?? "");
|
|
996
|
+
if (run === "") run = session === "" ? "" : (server.counterpart.nightClaimFor(session)?.run ?? "");
|
|
978
997
|
} catch {
|
|
979
998
|
run = "";
|
|
980
999
|
}
|
|
981
1000
|
return { summary: told.text, summaryCites: told.cites, ...(session === "" ? {} : { session }), ...(run === "" ? {} : { run }) };
|
|
982
1001
|
}
|
|
983
1002
|
|
|
1003
|
+
/** What `daysEndAlone` writes as the row's detail, and how `daysEndStood` knows its row. */
|
|
1004
|
+
const DAYS_END_STOOD = "day's end left the page as it stands";
|
|
1005
|
+
|
|
1006
|
+
/**
|
|
1007
|
+
* DAY'S END'S SUMMARY SENT ALONE, STILL OPEN TO ITS PAGE (the edge recorded
|
|
1008
|
+
* at #606's merge): the night's newest settled row is the one `daysEndAlone`
|
|
1009
|
+
* wrote, today, for this call's session, on the nightly run's server, and
|
|
1010
|
+
* no dream has begun since — so a page written now is the same day's end
|
|
1011
|
+
* changing its mind, and the night's answer becomes the page written. The
|
|
1012
|
+
* run moving on (the dream's `begin`) ends it, as the open claim's
|
|
1013
|
+
* `closeNightWriter` does. Null otherwise. Never throws.
|
|
1014
|
+
*/
|
|
1015
|
+
function daysEndStood(server: McpServer, claimedSession: string | null): PageWriterRun | null {
|
|
1016
|
+
try {
|
|
1017
|
+
if (claimedSession === null || !server["nightRun"]()) return null;
|
|
1018
|
+
const today = server.counterpart.self.calendarToday();
|
|
1019
|
+
const alone = server.counterpart
|
|
1020
|
+
.pageWriterRuns({})
|
|
1021
|
+
.find((r) => r.outcome === "nothing-to-say" && r.detail === DAYS_END_STOOD && r.session === claimedSession && r.on === today && r.summary.trim().length > 0);
|
|
1022
|
+
if (alone === undefined) return null;
|
|
1023
|
+
const settled = server.counterpart
|
|
1024
|
+
.pageWriterRuns({ about: alone.about })
|
|
1025
|
+
.find((r) => r.outcome === "revised" || r.outcome === "nothing-to-say" || r.outcome === "failed");
|
|
1026
|
+
if (settled === undefined || settled.at !== alone.at || settled.seq !== alone.seq) return null;
|
|
1027
|
+
const dream = server.counterpart.dreams.lastDream();
|
|
1028
|
+
if (dream !== null && dream.started_at >= alone.at) return null;
|
|
1029
|
+
return alone;
|
|
1030
|
+
} catch {
|
|
1031
|
+
return null;
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
|
|
984
1035
|
/**
|
|
985
1036
|
* DAY'S END, THE PAGE STANDING (2026-10-23, lane D2): a summary sent alone
|
|
986
1037
|
* answers the night as `nothing-to-say` — the page left as it stands, which
|
|
@@ -999,7 +1050,7 @@ function daysEndAlone(
|
|
|
999
1050
|
about: input.writerFor.about,
|
|
1000
1051
|
mode: input.writerFor.mode,
|
|
1001
1052
|
outcome: "nothing-to-say",
|
|
1002
|
-
detail:
|
|
1053
|
+
detail: DAYS_END_STOOD,
|
|
1003
1054
|
bytesBefore: bytes,
|
|
1004
1055
|
bytesAfter: bytes,
|
|
1005
1056
|
...(claim === null ? {} : { considered: claim.considered, omitted: claim.omitted }),
|
|
@@ -19,7 +19,7 @@ export const SERVER_NAME = "counterparts";
|
|
|
19
19
|
* host decides whether to trust what follows. Read from a constant rather than
|
|
20
20
|
* from disk so the server opens no file to answer its first message.
|
|
21
21
|
*/
|
|
22
|
-
export const SERVER_VERSION = "0.3.
|
|
22
|
+
export const SERVER_VERSION = "0.3.36";
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* THE ONE LINE EVERY TOOL ANSWERS WITH when the store on disk is a schema AHEAD
|
|
@@ -2425,7 +2425,7 @@ export class McpServer {
|
|
|
2425
2425
|
});
|
|
2426
2426
|
this.noteRecall(row, 0, question, false, payload, ids, key);
|
|
2427
2427
|
this.markSeen(ids, key);
|
|
2428
|
-
this.noteAsked(ids, key);
|
|
2428
|
+
this.noteAsked(ids, key, question);
|
|
2429
2429
|
return this.result(payload, false);
|
|
2430
2430
|
}
|
|
2431
2431
|
|
|
@@ -2439,12 +2439,12 @@ export class McpServer {
|
|
|
2439
2439
|
* like the seen set (`seenKey`); nothing for a session nobody identified.
|
|
2440
2440
|
* Never throws.
|
|
2441
2441
|
*/
|
|
2442
|
-
private noteAsked(ids: readonly string[], key?: string): void {
|
|
2442
|
+
private noteAsked(ids: readonly string[], key?: string, question?: string): void {
|
|
2443
2443
|
if (ids.length === 0) return;
|
|
2444
2444
|
const session = key ?? this.seenKey();
|
|
2445
2445
|
if (session === UNBOUND_SESSION) return;
|
|
2446
2446
|
this.telemetry(() => {
|
|
2447
|
-
this.counterpart.noteAsked(session, ids);
|
|
2447
|
+
this.counterpart.noteAsked(session, ids, question === undefined ? {} : { question });
|
|
2448
2448
|
});
|
|
2449
2449
|
}
|
|
2450
2450
|
|
|
@@ -3368,7 +3368,16 @@ export class McpServer {
|
|
|
3368
3368
|
statement: a["statement"] as string,
|
|
3369
3369
|
...(a["about"] === "us" || a["about"] === "me" ? { about: a["about"] } : {}),
|
|
3370
3370
|
});
|
|
3371
|
-
return {
|
|
3371
|
+
return {
|
|
3372
|
+
belief: {
|
|
3373
|
+
stored: out.ok && out.reason === "born",
|
|
3374
|
+
reason: out.reason,
|
|
3375
|
+
...(out.id === null ? {} : { id: out.id }),
|
|
3376
|
+
...(out.note === undefined ? {} : { note: out.note }),
|
|
3377
|
+
// B1: a near-duplicate's filing outcome, beside the refusal.
|
|
3378
|
+
...(out.support === undefined ? {} : { support: out.support }),
|
|
3379
|
+
},
|
|
3380
|
+
};
|
|
3372
3381
|
}
|
|
3373
3382
|
|
|
3374
3383
|
/**
|
|
@@ -131,8 +131,8 @@ export interface MechanismEvidence {
|
|
|
131
131
|
/** Also count how many firings landed TODAY (the window's `today`). */
|
|
132
132
|
readonly today?: boolean;
|
|
133
133
|
/**
|
|
134
|
-
* The sleep phase it runs in, when it runs on a SCHEDULE
|
|
135
|
-
*
|
|
134
|
+
* The sleep phase it runs in, when it runs on a SCHEDULE (consolidation:
|
|
135
|
+
* every `CADENCE.consolidate` lived days, 1 since 2026-10-24). A quiet week
|
|
136
136
|
* of a phase that ran on time is "next run in N days", not "quiet".
|
|
137
137
|
*/
|
|
138
138
|
readonly schedule?: Phase;
|
|
@@ -294,7 +294,7 @@ export const MECHANISM_EVIDENCE: readonly MechanismEvidence[] = [
|
|
|
294
294
|
// BUILT (2026-09-26, dreaming + consolidation): durability now comes from
|
|
295
295
|
// RETURNS — every spaced return makes a memory fade more slowly, credited
|
|
296
296
|
// the moment it happens (the census) — and the core from its two lanes,
|
|
297
|
-
// decided every
|
|
297
|
+
// decided every lived day (the schedule; every third until 2026-10-24). A dream's merges are
|
|
298
298
|
// consolidation too, and so are its FOLDS (2026-10-20: a fold gathers what
|
|
299
299
|
// belongs together into what it adds up to). The cycle row itself is not a
|
|
300
300
|
// proof (it lands every night).
|
|
@@ -12,8 +12,14 @@ valenced edge, and recall spreads activation across those edges.
|
|
|
12
12
|
Hebbian plasticity — "cells that fire together wire together" — plus spreading activation
|
|
13
13
|
through the resulting associative network. **Named deviations** (constitution line 12):
|
|
14
14
|
(a) credit is **retrospective and graded** — full only when the reply actually used the
|
|
15
|
-
memory, weak when it surfaced unused,
|
|
16
|
-
every retrieval trains
|
|
15
|
+
memory, weak when it surfaced unused, and the footnoted tier's own credit factor zero, where
|
|
16
|
+
in humans every retrieval trains. *Since 2026-10-19 (the feedback loop):* an unrated footnote
|
|
17
|
+
is a `shown` glimpse today (a use at `W_SHOWN`, credited at a `rated` boundary), and memories
|
|
18
|
+
shown on one turn there lay a faint edge (`SHOWN_TOGETHER_DEPOSIT`, G1 below); memory-to-memory
|
|
19
|
+
pairs train only on credited use. (Was: "zero for the merely footnoted".) *Since 2026-10-24
|
|
20
|
+
(R3 cue learning — an experiment):* a footnote SHOWN AND ACTED ON trains its cue pairs — the
|
|
21
|
+
words of the turn that showed it, wired to it — through a rating (1 a little, 2–3 fully, 0
|
|
22
|
+
depresses) or `drewOn`; one merely shown and passed by still trains no cue pair. (b) homeostasis is enforced structurally (a per-node edge cap and
|
|
17
23
|
a bounded outgoing weight with proportional renormalization) rather than emerging from
|
|
18
24
|
metabolic limits.
|
|
19
25
|
|
|
@@ -41,6 +47,18 @@ metabolic limits.
|
|
|
41
47
|
- **Spreading activation is bounded**: a hop limit with per-hop decay, and fan
|
|
42
48
|
normalization so a hub node does not flood. [v1] §9 TUNABLE (v1: 2 hops, hop decay 0.5,
|
|
43
49
|
fan normalization on).
|
|
50
|
+
- **Cue pairs, the same homeostasis** (2026-10-24, R3 cue learning — an experiment;
|
|
51
|
+
switch `physics.CUE_LEARNING`). The node Hebb was missing: the CUE WORD. A credited use
|
|
52
|
+
wires the words of the turn that showed the memory to it (`cue_edges`, index terms only),
|
|
53
|
+
split over the words by their weights. Bounded like edges and by the same machinery: a
|
|
54
|
+
saturating update per pair (`CUE_W_CAP`), synaptic scaling per word (`CUE_MAX_OUT`),
|
|
55
|
+
exponential fading with lived days (`S_CUE`) and a floor the flush sweeps; deltas
|
|
56
|
+
buffered (`buffer.ts#CueBuffer`, the declared exemption), drained to the pending file on
|
|
57
|
+
the hook path, applied by the worker in the same claim as the pairs and after them (at
|
|
58
|
+
most once for both), skipped on busy, refused for a pinned or no-longer-live memory, and
|
|
59
|
+
nothing at all under observer — written or read. Erasing a memory deletes its pairs (the
|
|
60
|
+
removal counts them), and every pair out of one of its words that no memory holds after it
|
|
61
|
+
(the privacy guard, df > 0, kept true after the fact — review of #613); a pruned or merged one's are swept at the next cue flush.
|
|
44
62
|
- **An erased or pruned id must stop conducting.** [v1] scar §2.2 — v1's erase deleted edge
|
|
45
63
|
rows from the index and then `rebuild()` reloaded the edge file wholesale and
|
|
46
64
|
**resurrected them**, so the erased id kept conducting activation between its former
|
|
@@ -73,7 +91,10 @@ for `recall/`; telemetry by reference.
|
|
|
73
91
|
|
|
74
92
|
**Guarantees** — **[M]** mechanized, **[A]** advisory:
|
|
75
93
|
|
|
76
|
-
1. **[M] Display
|
|
94
|
+
1. **[M] Display trains nothing outside a rating; engagement does — strength only.**
|
|
95
|
+
*(Heading reworded 2026-10-24: it read "Display never trains", which the 2026-10-19
|
|
96
|
+
amendment below contradicts — at a `rated` boundary display leaves a faint trail.)*
|
|
97
|
+
*Reworded 2026-10-11 by
|
|
77
98
|
the drewOn builder, from Mike's 10-10 direction, lightly held (wording from #371).* A
|
|
78
99
|
memory shown and passed by (footnoted, surfaced, on the wake) trains nothing, in either
|
|
79
100
|
direction. One the session NAMES in a `drewOn` field is credited at the `engaged` tier
|
|
@@ -12,7 +12,9 @@ ruling literally in both directions — **all** the edge arithmetic lives in
|
|
|
12
12
|
`edges.ts` (increment, cap, lived-day decay, count cap, renormalization), and
|
|
13
13
|
`physics/` gains nothing. The one import across that line is `decayCurve`: edges
|
|
14
14
|
decay on the same CURVE FAMILY as memories, with their own stability constant
|
|
15
|
-
(`S_EDGE = 30` against memory's `S_BASE = 60`
|
|
15
|
+
(`S_EDGE = 30` against memory's `S_BASE = 60` at the time; *2026-10-24: `S_BASE` is gone
|
|
16
|
+
since 2026-10-10, a memory's S follows its q, ~3 lived days for a default note, so the
|
|
17
|
+
comparison no longer holds for weak memories*). That is what "a physics-family
|
|
16
18
|
curve, own constants" means, and it is why there is no second `Math.exp` in this
|
|
17
19
|
directory.
|
|
18
20
|
|
|
@@ -568,3 +570,21 @@ evaporation can do it.
|
|
|
568
570
|
(42 through new trails); edges ≥ 0.4: none; the first flush swept ~2,040 inert rows. The
|
|
569
571
|
reasons and the v14 column's cost are in `docs/IMPROVEMENTS.md` (Group 4); what to look at
|
|
570
572
|
next is in `docs/CHECK-AFTER.md` (Group 4).
|
|
573
|
+
|
|
574
|
+
## R3 — cue pairs (2026-10-24, an experiment; switch `physics.CUE_LEARNING`)
|
|
575
|
+
|
|
576
|
+
- `cue_edges` (store v15): index term → memory, weight in [0, `CUE_W_CAP`], realized at
|
|
577
|
+
`last_day` with the edges' exponential curve at `S_CUE` (60 lived days), so writing the
|
|
578
|
+
decayed weight is exact. `planCueFlush` (edges.ts): per touched token, its pairs decayed,
|
|
579
|
+
deltas applied (`w + Δ·(1 − w/cap)`; a negative delta floors at 0 and never creates a pair),
|
|
580
|
+
then synaptic scaling to `CUE_MAX_OUT`, then ≤ `CUE_FLOOR` deleted.
|
|
581
|
+
- One buffer per kind, both declared in `buffer.ts`: `CueBuffer` is signed (a 0 rating
|
|
582
|
+
depresses), so it is not a `DeltaBuffer`, whose `add` drops ≤ 0.
|
|
583
|
+
- The pending file carries cue deltas as a `c` array per line (`appendPendingCues`); an older
|
|
584
|
+
reader ignores the key. `applyPendingAssociations` absorbs and flushes a claim's cue deltas
|
|
585
|
+
only AFTER its pairs landed; a cue write that fails is dropped and counted (`cueDropped` on
|
|
586
|
+
the `associate.flush` row) rather than keeping the claim, which would apply its pairs twice.
|
|
587
|
+
- `learnedCues` (the read) returns nothing for an observer — stricter than `spreadFrom`, by
|
|
588
|
+
the brief (an instrument neither writes nor reads cue pairs).
|
|
589
|
+
- The cue flush sweeps pairs into a memory no longer live (archived, superseded, gone, denied)
|
|
590
|
+
and faded ones; the owner's removal deletes a removed memory's pairs in the chase.
|