counterparts 0.3.19 → 0.3.21
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 +119 -0
- package/README.md +12 -4
- package/docs/module-map.md +6 -0
- package/package.json +1 -1
- package/src/adapters/claude-code/CONTRACT.md +14 -13
- package/src/adapters/claude-code/NOTES.md +29 -0
- package/src/adapters/claude-code/bin/hook.ts +12 -4
- package/src/adapters/claude-code/bin/runner.ts +41 -20
- package/src/adapters/claude-code/doctor.ts +123 -30
- package/src/adapters/claude-code/hooks.ts +70 -86
- package/src/adapters/claude-code/index.ts +0 -3
- package/src/adapters/cli/NOTES.md +8 -0
- package/src/adapters/cli/commands-delete.ts +273 -0
- package/src/adapters/cli/commands-install.ts +29 -10
- package/src/adapters/cli/commands-note.ts +1 -1
- package/src/adapters/cli/commands-readings.ts +4 -2
- package/src/adapters/cli/commands-scope.ts +25 -4
- package/src/adapters/cli/commands-self.ts +4 -1
- package/src/adapters/cli/commands-start-fresh.ts +1 -1
- package/src/adapters/cli/commands.ts +22 -3
- package/src/adapters/cli/help.ts +7 -7
- package/src/adapters/cli/install.ts +4 -2
- package/src/adapters/cli/mechanisms.ts +2 -2
- package/src/adapters/cli/removal.ts +1 -1
- package/src/adapters/config.ts +112 -30
- package/src/adapters/dashboard/CONTRACT.md +14 -0
- package/src/adapters/dashboard/NOTES.md +15 -0
- package/src/adapters/dashboard/activity.ts +1 -1
- package/src/adapters/dashboard/bin/dashboard.ts +3 -3
- package/src/adapters/dashboard/browse.ts +1 -1
- package/src/adapters/dashboard/identity.ts +1 -1
- package/src/adapters/dashboard/registries.ts +14 -14
- package/src/adapters/dashboard/resolve.ts +1 -1
- package/src/adapters/dashboard/status.ts +5 -2
- package/src/adapters/dashboard/web/actions.ts +21 -2
- package/src/adapters/dashboard/web/app.html +1 -1
- package/src/adapters/dashboard/web/flow.ts +1 -1
- package/src/adapters/dashboard/web/mechanisms/consolidation/index.js +2 -2
- package/src/adapters/dashboard/web/mechanisms/consolidation/panel.js +1 -1
- package/src/adapters/dashboard/web/mechanisms/decay/index.js +1 -1
- package/src/adapters/dashboard/web/mechanisms/reconsolidation/index.js +2 -2
- package/src/adapters/dashboard/web/mechanisms/retrieval/panel.js +3 -3
- package/src/adapters/dashboard/web/mechanisms/salience/panel.js +2 -2
- package/src/adapters/dashboard/web/narrate.ts +11 -11
- package/src/adapters/dashboard/web/pages/flow/sections/heatmap.js +1 -1
- package/src/adapters/dashboard/web/pages/health/sections/checks.js +3 -2
- package/src/adapters/dashboard/web/pages/health/sections/cycle.js +5 -5
- package/src/adapters/dashboard/web/pages/health/sections/mechanisms.js +1 -1
- package/src/adapters/dashboard/web/pages/health/sections/wake.js +2 -2
- package/src/adapters/dashboard/web/pages/memories/sections/tools.js +73 -3
- package/src/adapters/dashboard/web/pages/self/sections/dreams.js +2 -2
- package/src/adapters/dashboard/web/pages/self/sections/journal.js +5 -5
- package/src/adapters/dashboard/web/pages/self/sections/page.js +13 -13
- package/src/adapters/dashboard/web/pages/self/sections/settling.js +1 -1
- package/src/adapters/dashboard/web/pages/self/sections/wake.js +7 -7
- package/src/adapters/dashboard/web/server.ts +9 -1
- package/src/adapters/dashboard/web/shared/event-modal.js +1 -1
- package/src/adapters/dashboard/web/shared/memory-card-words.js +1 -1
- package/src/adapters/dashboard/web/shared/memory-modal.js +5 -5
- package/src/adapters/dashboard/web/views/activity.ts +1 -1
- package/src/adapters/dashboard/web/views/dreams.ts +1 -1
- package/src/adapters/dashboard/web/views/health.ts +1 -1
- package/src/adapters/dashboard/web/views/mechanisms.ts +6 -6
- package/src/adapters/dashboard/web/views/mind.ts +21 -9
- package/src/adapters/dashboard/web/views/overview.ts +3 -3
- package/src/adapters/expansions.ts +14 -1
- package/src/adapters/fired.ts +1 -1
- package/src/adapters/lifecycle.ts +25 -4
- package/src/adapters/log/index.ts +21 -0
- package/src/adapters/mcp/CONTRACT.md +1 -1
- package/src/adapters/mcp/server-self-tools.ts +25 -1
- package/src/adapters/mcp/server-words.ts +3 -2
- package/src/adapters/mcp/server.ts +45 -9
- package/src/adapters/mcp/tools.ts +4 -3
- package/src/adapters/plugin.ts +44 -8
- package/src/adapters/sessions.ts +5 -2
- package/src/adapters/snapshots.ts +90 -1
- package/src/adapters/store-id.ts +58 -0
- package/src/core/counterpart-boundary.ts +9 -0
- package/src/core/counterpart.ts +19 -6
- package/src/core/dream/CONTRACT.md +8 -0
- package/src/core/dream/index.ts +15 -2
- package/src/core/handoff/last-here.ts +24 -12
- package/src/core/onboarding.ts +231 -62
- package/src/core/prospective/CONTRACT.md +4 -1
- package/src/core/prospective/index.ts +23 -5
- package/src/core/recall/CONTRACT.md +3 -1
- package/src/core/recall/INTERFACE-GAPS.md +1 -1
- package/src/core/recall/NOTES.md +14 -0
- package/src/core/recall/session.ts +40 -1
- package/src/core/reconsolidation.ts +1 -1
- package/src/core/remember/CONTRACT.md +14 -8
- package/src/core/remember/owes.ts +68 -28
- package/src/core/remember/owner-strike-seam.ts +6 -3
- package/src/core/remember/spans.ts +3 -2
- package/src/core/remember/tunables.ts +18 -5
- package/src/core/remember/write-up-seam.ts +2 -1
- package/src/core/self/CONTRACT.md +25 -9
- package/src/core/self/NOTES.md +6 -0
- package/src/core/self/briefing-delivery.ts +349 -0
- package/src/core/self/briefing-page.ts +315 -0
- package/src/core/self/briefing-room.ts +563 -0
- package/src/core/self/briefing.ts +304 -1156
- package/src/core/self/index.ts +28 -6
- package/src/core/store/NOTES.md +6 -5
- package/src/core/store/index.ts +39 -0
- package/src/core/store/paths.ts +9 -2
- package/src/adapters/claude-code/primacy.ts +0 -162
|
@@ -292,7 +292,7 @@ export const MEMORY_MECHANISMS: readonly MemoryMechanism[] = [
|
|
|
292
292
|
}
|
|
293
293
|
const s = v.schedule;
|
|
294
294
|
if (s !== null && s.onTime && s.lastRanDay !== null) {
|
|
295
|
-
const next = s.nextInDays <= 0 ? "at the next session's end" : `in ${plural(s.nextInDays, "
|
|
295
|
+
const next = s.nextInDays <= 0 ? "at the next session's end" : `in ${plural(s.nextInDays, "day of use", "days of use")}`;
|
|
296
296
|
return { light: LIGHT.idle, says: `built, ran on schedule with nothing to change; next run ${next}` };
|
|
297
297
|
}
|
|
298
298
|
return { light: LIGHT.idle, says: "built, not firing yet: nothing consolidated this week" };
|
|
@@ -323,7 +323,7 @@ export const MEMORY_MECHANISMS: readonly MemoryMechanism[] = [
|
|
|
323
323
|
says:
|
|
324
324
|
v.lastFiredDay === null
|
|
325
325
|
? "built, not firing yet: no dream yet (a session asks, once a day, and you say yes or not today)"
|
|
326
|
-
: `built, not firing this week: the last dream was on
|
|
326
|
+
: `built, not firing this week: the last dream was on day ${String(v.lastFiredDay)} of use`,
|
|
327
327
|
};
|
|
328
328
|
},
|
|
329
329
|
},
|
|
@@ -535,7 +535,7 @@ export function spanResidue(
|
|
|
535
535
|
const echoNote =
|
|
536
536
|
echoes === 0
|
|
537
537
|
? ""
|
|
538
|
-
: ` ${echoes} line${echoes === 1 ? "" : "s"} of conversation under ${named} quote${echoes === 1 ? "s" : ""} these words — transcript, not this memory's own capture, and left alone here; retention deletes a session's captured text
|
|
538
|
+
: ` ${echoes} line${echoes === 1 ? "" : "s"} of conversation under ${named} quote${echoes === 1 ? "s" : ""} these words — transcript, not this memory's own capture, and left alone here; retention deletes a session's captured text 3 days after it is written up and ended, and never keeps it more than 14 days, so ${echoes === 1 ? "it goes" : "they go"} then (backups made since 2026-10-13 hold none of it).`;
|
|
539
539
|
|
|
540
540
|
if (first !== null) {
|
|
541
541
|
const where = count === 1 ? first : `${first} (and ${count - 1} more line${count === 2 ? "" : "s"})`;
|
package/src/adapters/config.ts
CHANGED
|
@@ -28,7 +28,8 @@ import { isAbsolute, join } from "node:path";
|
|
|
28
28
|
|
|
29
29
|
import { isZone } from "../core/time.js";
|
|
30
30
|
|
|
31
|
-
import {
|
|
31
|
+
import { TUNABLES as REMEMBER_TUNABLES } from "../core/remember/tunables.js";
|
|
32
|
+
import { PAGE_HOST_BUDGET_BYTES, PAGE_WRITER_MODES } from "../core/self/index.js";
|
|
32
33
|
import type { PageWriterMode } from "../core/self/index.js";
|
|
33
34
|
import { DEFAULT_KEEP as SNAPSHOT_DEFAULT_KEEP } from "./snapshots.js";
|
|
34
35
|
|
|
@@ -235,8 +236,13 @@ export const EMBEDDER_KINDS: readonly EmbedderKind[] = ["static"];
|
|
|
235
236
|
export interface AdapterConfig {
|
|
236
237
|
/** Where the memory lives. Pinned onto the child's environment LAST. */
|
|
237
238
|
readonly dataDir?: string;
|
|
238
|
-
/** The host's reported injection ceiling, in bytes.
|
|
239
|
+
/** The host's reported injection ceiling, in bytes. The core has no default
|
|
240
|
+
* (scar §2.18); Claude Code's loaders fill an absent one with that host's
|
|
241
|
+
* (`withBudgetDefault`, 2026-10-12). */
|
|
239
242
|
readonly injectionBudgetBytes?: number;
|
|
243
|
+
/** Set by `withBudgetDefault` alone, never read from a file: the ceiling above
|
|
244
|
+
* is Claude Code's default because the file named none. Runtime only. */
|
|
245
|
+
readonly injectionBudgetDefaulted?: true;
|
|
240
246
|
/** How long the host lets a foreground hook run, ms. Reported, not assumed. */
|
|
241
247
|
readonly executionCeilingMs?: number;
|
|
242
248
|
/** How long a socket survives in this host, ms. The reason E3 rescoped here. */
|
|
@@ -257,19 +263,6 @@ export interface AdapterConfig {
|
|
|
257
263
|
* unreadable rather than guessed at.
|
|
258
264
|
*/
|
|
259
265
|
readonly embedder?: { readonly enabled: boolean; readonly kind?: EmbedderKind };
|
|
260
|
-
/**
|
|
261
|
-
* THE PARALLEL-RUN KNOB, and it defaults to ABSENT.
|
|
262
|
-
*
|
|
263
|
-
* Absent ⇒ v2 delivers on every delivering hook, which is what it does in
|
|
264
|
-
* every other situation and what every test that does not name this flag
|
|
265
|
-
* asserts. Present and true ⇒ every delivering hook first asks
|
|
266
|
-
* `primacy.ts` whether the OTHER system is speaking today, and stands down if
|
|
267
|
-
* the answer is anything but a clean "engram" (parallel-run G3). It is a knob
|
|
268
|
-
* rather than an inference for the same reason the egress knob is: the
|
|
269
|
-
* presence of v1's file on the machine must not be the thing that decides
|
|
270
|
-
* whether v2 speaks. RETIRED at PROMOTE.
|
|
271
|
-
*/
|
|
272
|
-
readonly parallel?: { readonly enabled: boolean };
|
|
273
266
|
/**
|
|
274
267
|
* THE DAILY ROTATING SNAPSHOT (owner ruling 3, 2026-09-18).
|
|
275
268
|
*
|
|
@@ -341,6 +334,20 @@ export interface AdapterConfig {
|
|
|
341
334
|
* Whether the run is headless at all is the dreaming SETTING (`auto`), which
|
|
342
335
|
* lives in the store, not here.
|
|
343
336
|
*/
|
|
337
|
+
/**
|
|
338
|
+
* HOW LONG CONVERSATION TEXT IS KEPT (Mike, 2026-10-13). Both optional:
|
|
339
|
+
* `afterWriteUpDays` — days after a session was written up and ended
|
|
340
|
+
* (default 3); `maxDays` — the ceiling, days after its last activity, owed
|
|
341
|
+
* or not (default 14). Whichever comes first. Read leniently, like
|
|
342
|
+
* `snapshots`: a bad field costs that field, falls back to its default, and
|
|
343
|
+
* is named in `ignored`. `retentionClocks` turns it into what
|
|
344
|
+
* `remember/owes.ts` reads.
|
|
345
|
+
*/
|
|
346
|
+
readonly retention?: {
|
|
347
|
+
readonly afterWriteUpDays?: number;
|
|
348
|
+
readonly maxDays?: number;
|
|
349
|
+
readonly ignored?: readonly string[];
|
|
350
|
+
};
|
|
344
351
|
readonly dreaming?: {
|
|
345
352
|
readonly model?: string;
|
|
346
353
|
readonly timeoutMs?: number;
|
|
@@ -412,10 +419,10 @@ export function loadConfig(raw: unknown): LoadedConfig {
|
|
|
412
419
|
socketLifetimeMs?: number;
|
|
413
420
|
watchdogMs?: number;
|
|
414
421
|
embedder?: { enabled: boolean; kind?: EmbedderKind };
|
|
415
|
-
parallel?: { enabled: boolean };
|
|
416
422
|
snapshots?: { dir?: string; keep?: number; mirror?: string; ignored?: string[] };
|
|
417
423
|
pageWriter?: { mode: PageWriterMode; ignored?: string[] };
|
|
418
424
|
dreaming?: { model?: string; timeoutMs?: number; maxTurns?: number; ignored?: string[] };
|
|
425
|
+
retention?: { afterWriteUpDays?: number; maxDays?: number; ignored?: string[] };
|
|
419
426
|
retired?: string[];
|
|
420
427
|
owner?: boolean;
|
|
421
428
|
timeZone?: string;
|
|
@@ -530,19 +537,10 @@ export function loadConfig(raw: unknown): LoadedConfig {
|
|
|
530
537
|
out.embedder = { enabled: e["enabled"], ...(kind === undefined ? {} : { kind: kind as EmbedderKind }) };
|
|
531
538
|
}
|
|
532
539
|
}
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
// the mute switch, it must not resolve to "off" by accident either. An
|
|
538
|
-
// unreadable one takes the whole configuration to observer below.
|
|
539
|
-
const p = parallel as Record<string, unknown>;
|
|
540
|
-
if (typeof parallel !== "object" || parallel === null || Array.isArray(parallel) || typeof p["enabled"] !== "boolean") {
|
|
541
|
-
unreadable = true;
|
|
542
|
-
} else {
|
|
543
|
-
out.parallel = { enabled: p["enabled"] };
|
|
544
|
-
}
|
|
545
|
-
}
|
|
540
|
+
// `parallel` — the parallel run's knob — was removed 2026-10-12 (the run
|
|
541
|
+
// ended 2026-09-21). A configuration that still carries it, in any shape, is
|
|
542
|
+
// read as if it did not: never refused, never observer, nothing said. It
|
|
543
|
+
// switched on a stand-down only the run used, so ignoring it changes nothing.
|
|
546
544
|
// THE SECOND LENIENT BLOCK, and it became one under review (S2, 2026-09-20).
|
|
547
545
|
//
|
|
548
546
|
// It was written strict, beside the egress knob, on the argument that `host`
|
|
@@ -595,6 +593,11 @@ export function loadConfig(raw: unknown): LoadedConfig {
|
|
|
595
593
|
if (snapshots !== undefined) {
|
|
596
594
|
out.snapshots = readSnapshots(snapshots);
|
|
597
595
|
}
|
|
596
|
+
// THE FOURTH LENIENT BLOCK (2026-10-13): how long conversation text is kept.
|
|
597
|
+
const retention = rec["retention"];
|
|
598
|
+
if (retention !== undefined) {
|
|
599
|
+
out.retention = readRetention(retention);
|
|
600
|
+
}
|
|
598
601
|
const identity = rec["identity"];
|
|
599
602
|
if (identity !== undefined) {
|
|
600
603
|
const i = identity as Record<string, unknown>;
|
|
@@ -713,6 +716,59 @@ function readDreaming(raw: unknown): { model?: string; timeoutMs?: number; maxTu
|
|
|
713
716
|
return done();
|
|
714
717
|
}
|
|
715
718
|
|
|
719
|
+
/**
|
|
720
|
+
* The `retention` block, read leniently. Whole days, at least one: a value
|
|
721
|
+
* that is not one is named and its default used, so a typo never means
|
|
722
|
+
* "delete today" and never means "keep forever".
|
|
723
|
+
*/
|
|
724
|
+
function readRetention(raw: unknown): { afterWriteUpDays?: number; maxDays?: number; ignored?: string[] } {
|
|
725
|
+
const raws: string[] = [];
|
|
726
|
+
const out: { afterWriteUpDays?: number; maxDays?: number } = {};
|
|
727
|
+
const done = (): typeof out & { ignored?: string[] } => (raws.length === 0 ? out : { ...out, ignored: tidy(raws) });
|
|
728
|
+
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) {
|
|
729
|
+
raws.push(`"retention" was not an object; the defaults are used`);
|
|
730
|
+
return done();
|
|
731
|
+
}
|
|
732
|
+
const r = raw as Record<string, unknown>;
|
|
733
|
+
const defaults = retentionDefaults();
|
|
734
|
+
for (const key of ["afterWriteUpDays", "maxDays"] as const) {
|
|
735
|
+
const value = r[key];
|
|
736
|
+
if (value === undefined) continue;
|
|
737
|
+
if (typeof value === "number" && Number.isInteger(value) && value > 0) out[key] = value;
|
|
738
|
+
else raws.push(`"retention.${key}" was ${JSON.stringify(value)}; using ${String(defaults[key])}`);
|
|
739
|
+
}
|
|
740
|
+
for (const key of Object.keys(r)) {
|
|
741
|
+
if (key !== "afterWriteUpDays" && key !== "maxDays") raws.push(`"retention.${key}" is not a setting this reads; it was ignored`);
|
|
742
|
+
}
|
|
743
|
+
return done();
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
const DAY_MS = 86_400_000;
|
|
747
|
+
|
|
748
|
+
/** The two retention defaults, in days — `remember/tunables.ts`'s, never retyped. */
|
|
749
|
+
export function retentionDefaults(): { afterWriteUpDays: number; maxDays: number } {
|
|
750
|
+
return {
|
|
751
|
+
afterWriteUpDays: Math.round(REMEMBER_TUNABLES.RETENTION_MS / DAY_MS),
|
|
752
|
+
maxDays: Math.round(REMEMBER_TUNABLES.RETENTION_MAX_MS / DAY_MS),
|
|
753
|
+
};
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
/**
|
|
757
|
+
* THE TWO CLOCKS THIS CONFIGURATION SETS, in days and in the milliseconds
|
|
758
|
+
* `remember/owes.ts#RetentionSources` reads. Absent fields are the defaults.
|
|
759
|
+
*/
|
|
760
|
+
export function retentionClocks(config: AdapterConfig): {
|
|
761
|
+
afterWriteUpDays: number;
|
|
762
|
+
maxDays: number;
|
|
763
|
+
retentionMs: number;
|
|
764
|
+
maxMs: number;
|
|
765
|
+
} {
|
|
766
|
+
const d = retentionDefaults();
|
|
767
|
+
const afterWriteUpDays = config.retention?.afterWriteUpDays ?? d.afterWriteUpDays;
|
|
768
|
+
const maxDays = config.retention?.maxDays ?? d.maxDays;
|
|
769
|
+
return { afterWriteUpDays, maxDays, retentionMs: afterWriteUpDays * DAY_MS, maxMs: maxDays * DAY_MS };
|
|
770
|
+
}
|
|
771
|
+
|
|
716
772
|
/**
|
|
717
773
|
* The `snapshots` block, read leniently — the FIRST place in this file that
|
|
718
774
|
* never stands the configuration down.
|
|
@@ -834,7 +890,8 @@ export function capabilities(config: AdapterConfig): CapabilityReport[] {
|
|
|
834
890
|
return [
|
|
835
891
|
{
|
|
836
892
|
name: "injectionBudgetBytes",
|
|
837
|
-
|
|
893
|
+
// A defaulted ceiling is a value with no report behind it (§2.4).
|
|
894
|
+
reported: config.injectionBudgetBytes !== undefined && config.injectionBudgetDefaulted !== true,
|
|
838
895
|
value: config.injectionBudgetBytes ?? null,
|
|
839
896
|
why: "The host's injection cliff. v1 hardcoded 90% of one host's, as though it were physiology.",
|
|
840
897
|
},
|
|
@@ -901,6 +958,31 @@ export function withEmbedderDefault(config: AdapterConfig): AdapterConfig {
|
|
|
901
958
|
return source === "explicit" || block === undefined ? config : { ...config, embedder: block };
|
|
902
959
|
}
|
|
903
960
|
|
|
961
|
+
/**
|
|
962
|
+
* CLAUDE CODE'S WAKE CEILING WHEN ITS CONFIGURATION NAMES NONE (2026-10-12).
|
|
963
|
+
*
|
|
964
|
+
* Scar §2.18 keeps the CORE free of a ceiling: the renderer still refuses an
|
|
965
|
+
* undefined one. But this file is the Claude Code adapter's, and 9,000 bytes is
|
|
966
|
+
* that host's number, measured — the one the interactive install has always
|
|
967
|
+
* written and the self page's room is sized against (`PAGE_HOST_BUDGET_BYTES`).
|
|
968
|
+
* The plugin's first run and every scripted install wrote no key until 0.3.20,
|
|
969
|
+
* so their stores never had a wake composed at all: every session woke on the
|
|
970
|
+
* bootstrap line. So the hooks, the worker, the night run and the console fill
|
|
971
|
+
* an absent key with this, at load, and say so (`injectionBudgetDefaulted`;
|
|
972
|
+
* doctor's Config line, `capabilities()` still `reported: false`). Nothing is
|
|
973
|
+
* written back to the file. A key in the file always wins. Claude Desktop's MCP
|
|
974
|
+
* server does NOT apply it: that host has no measured ceiling. But the worker
|
|
975
|
+
* its `wake` starts is this adapter's runner, which does, so a keyless store a
|
|
976
|
+
* Desktop chat wakes from is rendered at 9,000 too (well inside a tool result's
|
|
977
|
+
* `TOOL_RESULT_CHARS`); Desktop's install writes the same file by default.
|
|
978
|
+
*/
|
|
979
|
+
export const CLAUDE_CODE_BUDGET_BYTES = PAGE_HOST_BUDGET_BYTES;
|
|
980
|
+
|
|
981
|
+
export function withBudgetDefault(config: AdapterConfig): AdapterConfig {
|
|
982
|
+
if (config.injectionBudgetBytes !== undefined) return config;
|
|
983
|
+
return { ...config, injectionBudgetBytes: CLAUDE_CODE_BUDGET_BYTES, injectionBudgetDefaulted: true };
|
|
984
|
+
}
|
|
985
|
+
|
|
904
986
|
/**
|
|
905
987
|
* `timeZone` from the host configuration at `path` (docs/time.md, 2026-09-25):
|
|
906
988
|
* the zone the hooks and the MCP server date the person's days in. Absent,
|
|
@@ -62,6 +62,20 @@ persisted into dashboard state. **[M]** Totality: every registered axis appears
|
|
|
62
62
|
marked absent. **[A]** Views stay readable by a non-engineer — the owner is the acceptance
|
|
63
63
|
test.
|
|
64
64
|
|
|
65
|
+
**Which store it serves (2026-10-12).** Two stores on one machine (a throwaway trial store
|
|
66
|
+
and the person's real one) can both try port 4747, so a reader must be able to tell whose
|
|
67
|
+
dashboard answered. **[M]** `GET /api/whoami` returns `{ store, version }`: `store` is the
|
|
68
|
+
store id (`adapters/store-id.ts#storeId`), `st_` and 16 lowercase hex of a sha256 over the
|
|
69
|
+
store's secret per-store salt (G58's `sessions/expansions.salt`) and its resolved,
|
|
70
|
+
symlink-free data dir (`/^st_[0-9a-f]{16}$/`), so a guessed path cannot be confirmed from
|
|
71
|
+
it; `version` is `package.json#version`, or null when unreadable. `/api/onboarding` carries
|
|
72
|
+
the same `store` field. The dashboard only reads the salt (E7): `store` is null until a
|
|
73
|
+
session-start wake has minted it. The id is stable across opens, differs between stores,
|
|
74
|
+
and never carries the path; a store moved to another path reads as another store.
|
|
75
|
+
**[M]** The session-start wake of a Claude Code hook carries the same id on the line under
|
|
76
|
+
the onboarding marker: `<!-- counterparts:store id=st_… -->`. The sidebar mod compares the
|
|
77
|
+
two and trusts a dashboard only when they match. Nothing about which port is chosen changed.
|
|
78
|
+
|
|
65
79
|
## 6. Scars honored
|
|
66
80
|
|
|
67
81
|
**E7** (observer read-only both directions) · **§2.4** (absence is displayed, not silent) ·
|
|
@@ -659,3 +659,18 @@ its id as a link that opens it; `+N more corrected (was wrong)` for the rest. "N
|
|
|
659
659
|
corrected versions hidden" stays only for an answer that names none (one a non-owner
|
|
660
660
|
may not be told of). "Ask reads the answers 0.3.12 gives" above says "corrected ones
|
|
661
661
|
counted": that was the answer then. Test: `test/dashboard-ask-answers.test.ts`.
|
|
662
|
+
|
|
663
|
+
## 2026-10-12 — The wake's words, and doctor's
|
|
664
|
+
|
|
665
|
+
#456 renamed the wake's lanes ("Coming up:", "Might be relevant:") and made doctor say
|
|
666
|
+
"day N of use"; the dashboard still said "Arriving", "memories nearby" and "lived day
|
|
667
|
+
N". What a person reads now matches: the self tab's wake list and the health tab's wake
|
|
668
|
+
bar (`mind.ts#PART_LABEL`) use the lanes' new words; "lived day N" is "day N of use" and
|
|
669
|
+
"N lived days" is "N days of use" everywhere a person reads them, the console's
|
|
670
|
+
`counterparts mechanisms` included (its test holds the two surfaces to one judgement);
|
|
671
|
+
"the owner" in the feed, the event glossary and the help is "you"; "directory" is
|
|
672
|
+
"project". The status opening prints its last active date as "Oct 11" (`stampWords`).
|
|
673
|
+
Untouched: ids, JSON keys, CSS classes (`jd-lived`, `wk-*`), and the readers of stored
|
|
674
|
+
text — `memory-words.ts` and `search.js` still read a chapter heading's "lived day N",
|
|
675
|
+
and the Lookups line reads doctor's "last N lived days" (it says "days of use").
|
|
676
|
+
The web view's own dates stay "Sep 4th" (`dates.js#dateWords`): they were never MM-DD.
|
|
@@ -64,7 +64,7 @@ export function renderActivity(src: DashboardSource, opts: ActivityOptions = {})
|
|
|
64
64
|
const atLeast = opts.ref !== undefined && all.length >= FEED_CEILING;
|
|
65
65
|
|
|
66
66
|
const bound =
|
|
67
|
-
`I keep events for ${plural(store.retentionDays, "
|
|
67
|
+
`I keep events for ${plural(store.retentionDays, "day of use", "days of use")}; older ones are swept unless ` +
|
|
68
68
|
"a replay latch holds them. This is what I still have, not everything that ever happened.";
|
|
69
69
|
|
|
70
70
|
if (shown.length === 0) {
|
|
@@ -107,7 +107,7 @@ export function parseArgv(argv: readonly string[]): Parsed {
|
|
|
107
107
|
|
|
108
108
|
export function helpText(): string {
|
|
109
109
|
const lines = [
|
|
110
|
-
"counterparts dashboard —
|
|
110
|
+
"counterparts dashboard — your window",
|
|
111
111
|
"",
|
|
112
112
|
" bun run src/adapters/dashboard/bin/dashboard.ts <view> [flags]",
|
|
113
113
|
"",
|
|
@@ -131,7 +131,7 @@ export function helpText(): string {
|
|
|
131
131
|
" actions name (absent: the page offers no scope)",
|
|
132
132
|
" serve --default-store open the DEFAULT store instead. Without --dir",
|
|
133
133
|
" or --default-store, 'serve' refuses: on a machine",
|
|
134
|
-
" with an install the default is
|
|
134
|
+
" with an install the default is your live",
|
|
135
135
|
" memory.",
|
|
136
136
|
"",
|
|
137
137
|
"A flag a subcommand does not take is refused before anything is opened.",
|
|
@@ -253,7 +253,7 @@ export function serveRefusal(
|
|
|
253
253
|
}
|
|
254
254
|
return (
|
|
255
255
|
`Refused: 'serve' with no --dir would open ${targetDirOf(args)}, which is the default store — ` +
|
|
256
|
-
"on a machine with an install, that is
|
|
256
|
+
"on a machine with an install, that is your live memory. " +
|
|
257
257
|
"Pass --dir <path> to name a store, or --default-store to mean the default. Nothing was opened."
|
|
258
258
|
);
|
|
259
259
|
}
|
|
@@ -212,7 +212,7 @@ function renderOne(src: DashboardSource, id: string, opts: BrowseOptions): strin
|
|
|
212
212
|
: ` · claimed floor ${num(physics.salience.claimed)}`),
|
|
213
213
|
],
|
|
214
214
|
[
|
|
215
|
-
"
|
|
215
|
+
"use",
|
|
216
216
|
`born day ${physics.birthDay} · used ${plural(physics.uses, "time")} over ` +
|
|
217
217
|
`${plural(physics.reinforcedDays ?? 0, "day")} · last used day ${physics.lastUsedDay}`,
|
|
218
218
|
],
|
|
@@ -61,7 +61,7 @@ export function renderIdentity(src: DashboardSource, opts: IdentityOptions = {})
|
|
|
61
61
|
: e.protectedOutsideIdentity.map((id) => resolveRef(src.store, id, 56).label).join("\n");
|
|
62
62
|
|
|
63
63
|
const opening =
|
|
64
|
-
`On
|
|
64
|
+
`On day ${day} of use I hold ${plural(e.identity.length, "element")} in the identity band ` +
|
|
65
65
|
`and ${plural(e.protected.length, "element")} under protection. ` +
|
|
66
66
|
"The first is what repetition and salience earned and physics can still move; " +
|
|
67
67
|
"the second is ink no revision path reaches, including a revision that would be right.";
|
|
@@ -280,7 +280,7 @@ export const DURABLE_EVENTS = {
|
|
|
280
280
|
// What a delivery could not carry (durable since 2026-10-02; ring-only
|
|
281
281
|
// before, so a dropped notice or a hook past the host's cap left nothing).
|
|
282
282
|
"adapter.envelope.overcap": "a hook's output was past the host's 10,000-character cap even in plain form, so the host showed only a preview of it",
|
|
283
|
-
"adapter.notice.dropped": "the
|
|
283
|
+
"adapter.notice.dropped": "the notice meant for you was dropped from a session start so the rest of the envelope stayed under the host's cap",
|
|
284
284
|
"adapter.envelope.gave-way": "a part of a delivery waited for want of room — the write-up pointer, the scope question, the turn's recall, a reminder, the dream offer or the update notice (which hook, which part)",
|
|
285
285
|
"adapter.injection.overbudget": "a session start sent more than the ceiling the host reported (what it sent, and the ceiling)",
|
|
286
286
|
// Which CODE was live at a session start (2026-09-14): the hooks run whatever
|
|
@@ -299,7 +299,7 @@ export const DURABLE_EVENTS = {
|
|
|
299
299
|
"gate.deposit": "an authored deposit met the gate battery (which gates acted, and what they refused)",
|
|
300
300
|
"memory.pruned": "a memory was let go at the floor",
|
|
301
301
|
"memory.merged": "a duplicate was merged into its original",
|
|
302
|
-
"memory.unmerged": "
|
|
302
|
+
"memory.unmerged": "you put back a row a merge had archived (repair-merged-beliefs)",
|
|
303
303
|
"recall.decision": "a turn decided what came to mind (and what stayed quiet)",
|
|
304
304
|
"revision.pressure": "a belief or an identity element took a credited challenge",
|
|
305
305
|
"sweep.gate": "the crash fallback ran its gate (scopes looked at, every scope's refusal counted by reason, spans swept)",
|
|
@@ -325,15 +325,15 @@ export const DURABLE_EVENTS = {
|
|
|
325
325
|
// for scar §2.3's reason, one lane along: "we wrote one" is not "a session
|
|
326
326
|
// was handed one", and a pointer that stops being delivered is exactly the
|
|
327
327
|
// failure a single row would hide.
|
|
328
|
-
"handoff.written": "a session left a handoff for the next one in that
|
|
329
|
-
"handoff.shown": "a session opening in that
|
|
330
|
-
"handoff.cleared": "a session finished the work in a
|
|
331
|
-
"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
|
|
328
|
+
"handoff.written": "a session left a handoff for the next one in that project — one per session there (how big, which version, and how long it will show)",
|
|
329
|
+
"handoff.shown": "a session opening in that project was handed the pointer to a handoff there (how old it was, what it cost the wake, and how many were live beside it)",
|
|
330
|
+
"handoff.cleared": "a session finished the work in a project 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)",
|
|
331
|
+
"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 project 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)",
|
|
332
332
|
// Durable since 2026-10-01: it was a ring event, gone with the hook, and
|
|
333
333
|
// the wake bar could not say a session start went without it.
|
|
334
|
-
"handoff.lasthere.noroom": "a session start had no room for the \"Last here\" line naming the chapter last written in that
|
|
334
|
+
"handoff.lasthere.noroom": "a session start had no room for the \"Last here\" line naming the chapter last written in that project (the bundle's bytes, the ceiling, and whether a handoff was carried in its place)",
|
|
335
335
|
// Durable since 2026-10-02: "Work here" had more lines than the wake carried.
|
|
336
|
-
"self.work.overflow": "a session start had more \"Work here\" lines for its
|
|
336
|
+
"self.work.overflow": "a session start had more \"Work here\" lines for its project than it carried — more than the wake shows, so they rotate, or fewer fitted the room (how many, how many shown)",
|
|
337
337
|
"recall.credit": "a boundary decided which memories the replies actually used, and credited them",
|
|
338
338
|
// Learned association had no line in the log at all: an edge is its own
|
|
339
339
|
// record, so a flush that never happened read exactly like a credit pass with
|
|
@@ -347,14 +347,14 @@ export const DURABLE_EVENTS = {
|
|
|
347
347
|
// Remembering to act (2026-09-20, E2), in two names so a refusal can never be
|
|
348
348
|
// counted as a firing.
|
|
349
349
|
"prospective.fire": "a future date arrived and the reminder was offered into the turn (which window, and how much of its budget is left)",
|
|
350
|
-
"prospective.fire.refused": "a reminder was NOT offered (which brake held — one row per window per reason per
|
|
350
|
+
"prospective.fire.refused": "a reminder was NOT offered (which brake held — one row per window per reason per day of use)",
|
|
351
351
|
"prospective.plain": "a reminder its author marked plain was told to the person on its day (which window, which beat — its day, a month or range opening, or its last day — and the date; `late` when a day passed untold was told within its week after)",
|
|
352
352
|
// The journal's markdown copy and the hand export (2026-09-20, F6 and F7):
|
|
353
353
|
// the two places the constitution's "prose the owner can view" is kept now
|
|
354
354
|
// that every body is a column.
|
|
355
355
|
"journal.copy.written": "a chapter's markdown copy was written beside the store, so the diary is readable in any editor (which episode, which file, how big)",
|
|
356
356
|
"journal.copy.failed": "a chapter's markdown copy could not be written (which episode, and the reason code) — the chapter itself is safe in the database",
|
|
357
|
-
"store.export": "
|
|
357
|
+
"store.export": "you exported the store by hand (which kind of export, how many rows went, how many confidential ones were left out)",
|
|
358
358
|
// Raw-transcript retention (2026-09-23, B3). One row per date; `STARTED` goes
|
|
359
359
|
// in when the pass takes its latch and `LATCH_HELD` when a later worker finds
|
|
360
360
|
// the latch taken with no row, so a pass that died is never a silence.
|
|
@@ -367,15 +367,15 @@ export const DURABLE_EVENTS = {
|
|
|
367
367
|
"dream.begun": "a dream began: the dreamer was shown what was lived since the last one (how many new memories, how many shown in all, how many chapters)",
|
|
368
368
|
"dream.changed": "a dream changed memories (how many changes landed and were refused, by kind: merges, links, replays, gists, contradictions, feelings, nominations)",
|
|
369
369
|
"dream.journaled": "a dream ended with its journal entry written (how long, and what it changed)",
|
|
370
|
-
"dream.undone": "
|
|
371
|
-
"dream.ask": "the day's dream line started the nightly run or asked first (or again, for a run cut off),
|
|
370
|
+
"dream.undone": "you reversed a whole dream (how many of its changes were put back)",
|
|
371
|
+
"dream.ask": "the day's dream line started the nightly run or asked first (or again, for a run cut off), you said not today, or the dreaming setting changed",
|
|
372
372
|
// The owner's door out of the core (2026-09-26).
|
|
373
|
-
"band.demoted": "
|
|
373
|
+
"band.demoted": "you sent a core memory back to ordinary fading (and why is kept beside it)",
|
|
374
374
|
// The v8 upgrade's one-time proof (2026-09-26).
|
|
375
375
|
"physics.upgrade.census": "after the v8 upgrade, every memory was measured by the old arithmetic and the new (how many moved a band, down or up, and how many would be let go sooner or later)",
|
|
376
376
|
// Contradictions (2026-09-29). Ids and counts only; the why is on the pair's trail.
|
|
377
377
|
"contradiction.flagged": "two memories that disagree were flagged as a pair, unsettled (by a dream, today)",
|
|
378
|
-
"contradiction.settled": "a pair of memories that disagree was settled — changed, corrected or open — and by whom (a session, a dream, a reflection, the page writer or
|
|
378
|
+
"contradiction.settled": "a pair of memories that disagree was settled — changed, corrected or open — and by whom (a session, a dream, a reflection, the page writer or you)",
|
|
379
379
|
"contradiction.undone": "a settle was undone: strength put back, a corrected memory back in recall, the pair unsettled again",
|
|
380
380
|
// The update guard (2026-10-09). Ids, the reading and its numbers; no text.
|
|
381
381
|
"contradiction.held": "a new memory said it changed or corrected one that looked unrelated to it, so the old one was left as it was and the two were not linked (the writer was shown it and asked to settle it if it meant to)",
|
|
@@ -45,7 +45,7 @@ export type RefState =
|
|
|
45
45
|
*/
|
|
46
46
|
export const ABSENCE: Record<Exclude<RefState, "live" | "superseded" | "archived">, string> = {
|
|
47
47
|
unknown: "[no longer at this address]",
|
|
48
|
-
removed: "[removed by
|
|
48
|
+
removed: "[removed by you]",
|
|
49
49
|
dangling: "[a forwarding address with nothing at the end]",
|
|
50
50
|
broken: "[a forwarding loop]",
|
|
51
51
|
unreadable: "[here, but unreadable]",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
* labelled SINCE BIRTH. A number invented to look like "last cycle" would be scar
|
|
21
21
|
* §2.17 committed by the very view that exists to prevent it.
|
|
22
22
|
*/
|
|
23
|
+
import { stampWords } from "../../core/handoff/last-here.js";
|
|
23
24
|
import { band, strength, symmetryCheck } from "../../core/physics/index.js";
|
|
24
25
|
import { TUNABLES as SCHEMA_TUNABLES } from "../../core/schemas/index.js";
|
|
25
26
|
import {
|
|
@@ -150,8 +151,10 @@ export function renderStatus(src: DashboardSource, opts: StatusOptions = {}): st
|
|
|
150
151
|
const lastActive = src.store.getMeta("lastActiveDate") ?? "";
|
|
151
152
|
|
|
152
153
|
const opening =
|
|
153
|
-
|
|
154
|
-
|
|
154
|
+
// In the wake's and doctor's words (2026-10-12): days of use, and the
|
|
155
|
+
// date as "Oct 11".
|
|
156
|
+
`I have had ${plural(day, "day of use", "days of use")}` +
|
|
157
|
+
(lastActive === "" ? "" : ` — the latest ${/^\d{4}-\d{2}-\d{2}$/.test(lastActive) ? stampWords(lastActive.slice(5)) : lastActive}`) +
|
|
155
158
|
". " +
|
|
156
159
|
(t.live + t.archived + t.journal === 0
|
|
157
160
|
? "I am holding nothing yet."
|
|
@@ -39,7 +39,8 @@
|
|
|
39
39
|
*
|
|
40
40
|
* ## Which commands
|
|
41
41
|
*
|
|
42
|
-
* `note`, `remove`, `
|
|
42
|
+
* `note`, `remove`, `delete` (one kind of data, 2026-10-13), `about` (what a
|
|
43
|
+
* memory is about, 2026-10-11), `backup`,
|
|
43
44
|
* `export`, `scope`, `rebrief`, `verify`, and the
|
|
44
45
|
* read-only `ask` and `doctor` (the health tab's checklist: `doctor --json`,
|
|
45
46
|
* the console's own reading, so the page and the terminal cannot disagree
|
|
@@ -62,9 +63,13 @@ import { toMyVoice } from "./ask-voice.js";
|
|
|
62
63
|
export const NO_CONFIG_HOME = "/nonexistent/counterparts-dashboard-bare-store";
|
|
63
64
|
|
|
64
65
|
/** The actions, in the order a reader meets them. */
|
|
65
|
-
export const ACTIONS = ["ask", "note", "remove", "about", "backup", "export", "scope", "rebrief", "verify", "doctor"] as const;
|
|
66
|
+
export const ACTIONS = ["ask", "note", "remove", "delete", "about", "backup", "export", "scope", "rebrief", "verify", "doctor"] as const;
|
|
66
67
|
export type ActionName = (typeof ACTIONS)[number];
|
|
67
68
|
|
|
69
|
+
/** The kinds `delete` takes — `cli/commands-delete.ts#DELETE_KINDS`, spelled
|
|
70
|
+
* again so this file imports nothing of the console up front. */
|
|
71
|
+
const DELETE_KINDS: readonly string[] = ["conversation-text", "backups", "activity-log"];
|
|
72
|
+
|
|
68
73
|
export function isActionName(name: string): name is ActionName {
|
|
69
74
|
return (ACTIONS as readonly string[]).includes(name);
|
|
70
75
|
}
|
|
@@ -84,6 +89,8 @@ export const TIMEOUT_MS: Record<ActionName, number> = {
|
|
|
84
89
|
ask: 120_000,
|
|
85
90
|
note: 120_000,
|
|
86
91
|
remove: 120_000,
|
|
92
|
+
// Deleting backups takes every copy apart file by file.
|
|
93
|
+
delete: 10 * 60_000,
|
|
87
94
|
about: 30_000,
|
|
88
95
|
scope: 30_000,
|
|
89
96
|
rebrief: 120_000,
|
|
@@ -430,6 +437,18 @@ function argvFor(name: ActionName, body: Body, ctx: ActionContext): Built {
|
|
|
430
437
|
}
|
|
431
438
|
return { argv: [...argv, "--confirm", "--", id], answer: typed };
|
|
432
439
|
}
|
|
440
|
+
case "delete": {
|
|
441
|
+
// ONE KIND OF DATA (2026-10-13): the console's `delete <kind>`. WITHOUT
|
|
442
|
+
// `confirm` it is the console's own dry run — the counts, and "Nothing
|
|
443
|
+
// has changed"; WITH it, `--yes`, after the page asked plainly. The
|
|
444
|
+
// kinds are spelled here, not imported: this file loads nothing of the
|
|
445
|
+
// console until an action runs, and the console refuses any other word.
|
|
446
|
+
const kind = body["kind"];
|
|
447
|
+
if (typeof kind !== "string" || !DELETE_KINDS.includes(kind)) {
|
|
448
|
+
throw new Invalid(`kind is one of ${DELETE_KINDS.join(", ")}`);
|
|
449
|
+
}
|
|
450
|
+
return { argv: ["delete", ...dir, ...(flag(body, "confirm") ? ["--yes"] : []), "--", kind] };
|
|
451
|
+
}
|
|
433
452
|
case "about": {
|
|
434
453
|
// WHAT A MEMORY IS ABOUT (2026-10-11): the console's `about`, as the
|
|
435
454
|
// owner — one store function behind both doors (`Counterpart.markAbout`).
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
-
<title>counterparts —
|
|
6
|
+
<title>counterparts — your window</title>
|
|
7
7
|
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
|
|
8
8
|
<!-- The server fills this with a per-launch token; every management action
|
|
9
9
|
echoes it (web/actions.ts). Empty means this page cannot act. -->
|
|
@@ -291,7 +291,7 @@ export const FLOW_NODES: readonly FlowNode[] = [
|
|
|
291
291
|
key: "self",
|
|
292
292
|
label: "SELF",
|
|
293
293
|
sub: "identity · episodes",
|
|
294
|
-
what: "The autobiography: identity elements that strength earned or
|
|
294
|
+
what: "The autobiography: identity elements that strength earned or you made permanent, and the episode journal written in chapters, in the first person, at the boundary.",
|
|
295
295
|
analog: "Autobiographical memory and the narrative self — episodic replay feeding a stable self-schema.",
|
|
296
296
|
breaks: "Humans never author their episodes; here it is a ritual, which is the authorship thesis. Identity-band memories do not decay here. And transcript-derived self-reinforcement is deliberately not copied — it is the rumination pathway, a documented bug of human cognition rather than architecture.",
|
|
297
297
|
x: 0.82,
|
|
@@ -9,9 +9,9 @@ export default {
|
|
|
9
9
|
short: "Consolidation",
|
|
10
10
|
tagline: "Memories aren’t saved when they’re made. They’re rebuilt, offline, while you sleep.",
|
|
11
11
|
does: "A memory that comes back after a gap fades more slowly; the ones about us can become core.",
|
|
12
|
-
explainer: "Every time a memory comes back after a gap it fades more slowly — close-together returns count less, never against it. Every few
|
|
12
|
+
explainer: "Every time a memory comes back after a gap it fades more slowly — close-together returns count less, never against it. Every few days of use a short “sleep” decides the core: a memory about me or about us joins it when it was strongly felt and came back, or when it kept coming back over weeks, at most three a night.",
|
|
13
13
|
built: [
|
|
14
|
-
"Spaced returns make a memory fade more slowly; a use while it was showing in the wake's “
|
|
14
|
+
"Spaced returns make a memory fade more slowly; a use while it was showing in the wake's “Might be relevant” lane does not count.",
|
|
15
15
|
"Two lanes into the core, for memories about me or about us, capped at three a night; you can send one back (counterparts core --demote).",
|
|
16
16
|
"Exact duplicates merge at night; near-copies merge in a dream, with the originals kept.",
|
|
17
17
|
],
|
|
@@ -22,7 +22,7 @@ function tally(p) {
|
|
|
22
22
|
const parts = [r.awake + " came back in conversation"];
|
|
23
23
|
if (p.merges > 0) parts.push(p.merges + " merged");
|
|
24
24
|
if (r.dream > 0) parts.push('<span class="pic-dim">' + r.dream + " replayed in a dream</span>");
|
|
25
|
-
return '<p class="pic-cap">Last ' + r.days + "
|
|
25
|
+
return '<p class="pic-cap">Last ' + r.days + " days of use: " + parts.join(" · ") + " " + q("pic-returns", RETURNS_TIP) + "</p>";
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export function picture(p) {
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
name: "Decay & forgetting",
|
|
9
9
|
short: "Forgetting",
|
|
10
10
|
tagline: "Forgetting isn’t a failure of memory. It’s one of its jobs.",
|
|
11
|
-
does: "Memories we don't use fade a little each
|
|
11
|
+
does: "Memories we don't use fade a little each day of use, until they are set aside.",
|
|
12
12
|
explainer: "Unused memories fade over the days you actually work together, not calendar days. Very faint ones are archived, not deleted, and memories in the core identity band do not fade at all.",
|
|
13
13
|
built: ["Unused memories fade on the days you actually work together, and restart the curve when used.", "Very faint ones are archived, never deleted; the core identity band does not fade.", "Cards for people and projects fade gently after months of silence (people slower), and naming one again in a saved memory keeps it or brings it back."],
|
|
14
14
|
inDevelopment: [],
|
|
@@ -9,7 +9,7 @@ export default {
|
|
|
9
9
|
short: "Reconsolidation",
|
|
10
10
|
tagline: "Recall makes a memory briefly editable. Then it’s re-stored, sometimes rewritten.",
|
|
11
11
|
does: "An old memory changes only when enough new evidence argues with it.",
|
|
12
|
-
explainer: "When a new memory says it corrects a belief or a core line, that adds pressure, and once enough builds up over several days the old one is revised, with the old version kept for 90
|
|
13
|
-
built: ["When a new memory declares it corrects a belief or a core line, the correction adds pressure; past a bar, over several days for slow kinds, the old one is revised.", "The old version is kept for 90
|
|
12
|
+
explainer: "When a new memory says it corrects a belief or a core line, that adds pressure, and once enough builds up over several days the old one is revised, with the old version kept for 90 days of use. Remembering alone changes nothing.",
|
|
13
|
+
built: ["When a new memory declares it corrects a belief or a core line, the correction adds pressure; past a bar, over several days for slow kinds, the old one is revised.", "The old version is kept for 90 days of use."],
|
|
14
14
|
inDevelopment: ["Nothing detects a contradiction by itself: the writer has to declare it.", "Just remembering does not change a memory."],
|
|
15
15
|
};
|
|
@@ -25,13 +25,13 @@ function trend(perDay) {
|
|
|
25
25
|
? '<rect class="use-none" x="' + (i * W + 2) + '" y="' + (H - 1) + '" width="' + (W - 4) + '" height="1"/>'
|
|
26
26
|
: '<rect class="use-bar" x="' + (i * W + 2) + '" y="' + (H - Math.max(1, p * H)) + '" width="' + (W - 4) + '" height="' + Math.max(1, p * H) + '"/>') + "</g>";
|
|
27
27
|
}).join("");
|
|
28
|
-
return '<svg class="use-trend" viewBox="0 0 ' + perDay.length * W + " " + H + '" width="' + perDay.length * W + '" height="' + H + '" role="img" aria-label="Used share, per
|
|
28
|
+
return '<svg class="use-trend" viewBox="0 0 ' + perDay.length * W + " " + H + '" width="' + perDay.length * W + '" height="' + H + '" role="img" aria-label="Used share, per day of use">' + bars + "</svg>";
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
function useLine(u) {
|
|
32
32
|
if (!u) return "";
|
|
33
|
-
if (u.brought === 0) return '<p class="pic-use">Nothing was brought to mind in the last ' + u.days + "
|
|
34
|
-
return '<p class="pic-use">' + trend(u.perDay) + "<span>Of memories brought to mind in the last " + u.days + "
|
|
33
|
+
if (u.brought === 0) return '<p class="pic-use">Nothing was brought to mind in the last ' + u.days + " days of use.</p>";
|
|
34
|
+
return '<p class="pic-use">' + trend(u.perDay) + "<span>Of memories brought to mind in the last " + u.days + " days of use, <b>" + pctWords(u) +
|
|
35
35
|
"</b> got used (said out loud: " + pctWords(u.said) + ", footnotes: " + pctWords(u.footnote) + ") " + q("pic-use", USE_TIP) + "</span></p>";
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -6,7 +6,7 @@ import { memLink, nothingYet, two } from "../picture.js";
|
|
|
6
6
|
|
|
7
7
|
/** The line under the rows: which these are, of how many. */
|
|
8
8
|
export function caption(p) {
|
|
9
|
-
const days = "the last " + p.days + "
|
|
9
|
+
const days = "the last " + p.days + " days of use";
|
|
10
10
|
if (p.written > p.memories.length) {
|
|
11
11
|
return "The " + p.memories.length + " most salient of the " + p.written + " memories written in " + days + ".";
|
|
12
12
|
}
|
|
@@ -15,7 +15,7 @@ export function caption(p) {
|
|
|
15
15
|
|
|
16
16
|
export function picture(p) {
|
|
17
17
|
if (!p || p.memories.length === 0) {
|
|
18
|
-
return nothingYet("Nothing was written in the last " + ((p && p.days) || 7) + "
|
|
18
|
+
return nothingYet("Nothing was written in the last " + ((p && p.days) || 7) + " days of use, so nothing new has been scored.");
|
|
19
19
|
}
|
|
20
20
|
return '<ul class="pic-sal">' + p.memories.map((m) => {
|
|
21
21
|
const size = 6 + Math.round(Math.sqrt(Math.max(0, Math.min(1, m.salience))) * 22);
|