counterparts 0.3.0 → 0.3.2
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 +76 -0
- package/docs/module-map.md +2 -0
- package/package.json +2 -1
- package/src/adapters/claude-code/CONTRACT.md +2 -1
- package/src/adapters/claude-code/NOTES.md +90 -2
- package/src/adapters/claude-code/bin/hook.ts +17 -2
- package/src/adapters/claude-code/bin/runner.ts +4 -1
- package/src/adapters/claude-code/config.ts +23 -0
- package/src/adapters/claude-code/doctor.ts +148 -26
- package/src/adapters/claude-code/hooks.ts +37 -12
- package/src/adapters/claude-code/index.ts +2 -0
- package/src/adapters/claude-code/standdown.ts +12 -1
- package/src/adapters/claude-code/transcript.ts +79 -6
- package/src/adapters/cli/INTERFACE-GAPS.md +4 -0
- package/src/adapters/cli/commands.ts +209 -61
- package/src/adapters/cli/export.ts +27 -3
- package/src/adapters/cli/help.ts +22 -8
- package/src/adapters/cli/install.ts +3 -5
- package/src/adapters/cli/mechanisms.ts +295 -0
- package/src/adapters/cli/repair-dates.ts +3 -1
- package/src/adapters/cli/snapshot.ts +4 -27
- package/src/adapters/dashboard/CONTRACT.md +13 -9
- package/src/adapters/dashboard/INTERFACE-GAPS.md +4 -0
- package/src/adapters/dashboard/NOTES.md +3 -2
- package/src/adapters/dashboard/activity.ts +2 -1
- package/src/adapters/dashboard/bin/dashboard.ts +18 -3
- package/src/adapters/dashboard/upgrade.ts +23 -0
- package/src/adapters/dashboard/web/README.md +153 -0
- package/src/adapters/dashboard/web/actions.ts +631 -0
- package/src/adapters/dashboard/web/app.html +40 -1703
- package/src/adapters/dashboard/web/app.js +55 -0
- package/src/adapters/dashboard/web/mechanisms/association/index.js +15 -0
- package/src/adapters/dashboard/web/mechanisms/association/panel.js +17 -0
- package/src/adapters/dashboard/web/mechanisms/consolidation/index.js +15 -0
- package/src/adapters/dashboard/web/mechanisms/consolidation/panel.js +23 -0
- package/src/adapters/dashboard/web/mechanisms/decay/index.js +15 -0
- package/src/adapters/dashboard/web/mechanisms/decay/panel.js +45 -0
- package/src/adapters/dashboard/web/mechanisms/emotional/index.js +15 -0
- package/src/adapters/dashboard/web/mechanisms/episodic-semantic/index.js +15 -0
- package/src/adapters/dashboard/web/mechanisms/index.js +60 -0
- package/src/adapters/dashboard/web/mechanisms/interference/index.js +15 -0
- package/src/adapters/dashboard/web/mechanisms/picture.js +28 -0
- package/src/adapters/dashboard/web/mechanisms/prospective/index.js +15 -0
- package/src/adapters/dashboard/web/mechanisms/reconsolidation/index.js +15 -0
- package/src/adapters/dashboard/web/mechanisms/reconsolidation/panel.js +15 -0
- package/src/adapters/dashboard/web/mechanisms/regions.js +30 -0
- package/src/adapters/dashboard/web/mechanisms/retrieval/index.js +15 -0
- package/src/adapters/dashboard/web/mechanisms/retrieval/panel.js +20 -0
- package/src/adapters/dashboard/web/mechanisms/salience/index.js +15 -0
- package/src/adapters/dashboard/web/mechanisms/salience/panel.js +14 -0
- package/src/adapters/dashboard/web/mechanisms/schema/index.js +15 -0
- package/src/adapters/dashboard/web/narrate.ts +10 -10
- package/src/adapters/dashboard/web/pages/flow/flow.css +38 -0
- package/src/adapters/dashboard/web/pages/flow/index.js +117 -0
- package/src/adapters/dashboard/web/pages/flow/sections/blind.js +12 -0
- package/src/adapters/dashboard/web/pages/flow/sections/detail.js +45 -0
- package/src/adapters/dashboard/web/pages/flow/sections/diagram.js +291 -0
- package/src/adapters/dashboard/web/pages/flow/sections/feed.js +11 -0
- package/src/adapters/dashboard/web/pages/flow/sections/fired.js +41 -0
- package/src/adapters/dashboard/web/pages/flow/sections/heatmap.js +25 -0
- package/src/adapters/dashboard/web/pages/flow/sections/records.js +24 -0
- package/src/adapters/dashboard/web/pages/flow/sections/symmetry.js +17 -0
- package/src/adapters/dashboard/web/pages/flow/state.js +3 -0
- package/src/adapters/dashboard/web/pages/health/health.css +93 -0
- package/src/adapters/dashboard/web/pages/health/index.js +41 -0
- package/src/adapters/dashboard/web/pages/health/sections/archive.js +84 -0
- package/src/adapters/dashboard/web/pages/health/sections/checks.js +172 -0
- package/src/adapters/dashboard/web/pages/health/sections/cycle.js +37 -0
- package/src/adapters/dashboard/web/pages/health/sections/verify.js +54 -0
- package/src/adapters/dashboard/web/pages/home/brain.js +375 -0
- package/src/adapters/dashboard/web/pages/home/home.css +134 -0
- package/src/adapters/dashboard/web/pages/home/index.js +84 -0
- package/src/adapters/dashboard/web/pages/home/sections/explorer.js +206 -0
- package/src/adapters/dashboard/web/pages/home/sections/hero.js +22 -0
- package/src/adapters/dashboard/web/pages/home/sections/live-activity.js +25 -0
- package/src/adapters/dashboard/web/pages/home/sections/recent-chapters.js +13 -0
- package/src/adapters/dashboard/web/pages/home/sections/tiles.js +52 -0
- package/src/adapters/dashboard/web/pages/memories/index.js +75 -0
- package/src/adapters/dashboard/web/pages/memories/memories.css +143 -0
- package/src/adapters/dashboard/web/pages/memories/sections/constellation.js +178 -0
- package/src/adapters/dashboard/web/pages/memories/sections/kinds.js +42 -0
- package/src/adapters/dashboard/web/pages/memories/sections/list.js +114 -0
- package/src/adapters/dashboard/web/pages/memories/sections/search.js +102 -0
- package/src/adapters/dashboard/web/pages/memories/sections/tools.js +155 -0
- package/src/adapters/dashboard/web/pages/memories/state.js +22 -0
- package/src/adapters/dashboard/web/pages/self/diff.js +79 -0
- package/src/adapters/dashboard/web/pages/self/index.js +43 -0
- package/src/adapters/dashboard/web/pages/self/markdown.js +61 -0
- package/src/adapters/dashboard/web/pages/self/sections/journal.js +32 -0
- package/src/adapters/dashboard/web/pages/self/sections/page.js +149 -0
- package/src/adapters/dashboard/web/pages/self/sections/settling.js +150 -0
- package/src/adapters/dashboard/web/pages/self/sections/stories.js +47 -0
- package/src/adapters/dashboard/web/pages/self/sections/wake.js +74 -0
- package/src/adapters/dashboard/web/pages/self/self.css +182 -0
- package/src/adapters/dashboard/web/server.ts +305 -28
- package/src/adapters/dashboard/web/shared/absence.js +14 -0
- package/src/adapters/dashboard/web/shared/actions.js +48 -0
- package/src/adapters/dashboard/web/shared/api.js +17 -0
- package/src/adapters/dashboard/web/shared/base.css +34 -0
- package/src/adapters/dashboard/web/shared/canvas.js +68 -0
- package/src/adapters/dashboard/web/shared/colors.js +6 -0
- package/src/adapters/dashboard/web/shared/dom.js +4 -0
- package/src/adapters/dashboard/web/shared/event-modal.js +25 -0
- package/src/adapters/dashboard/web/shared/fonts/OFL-courier-prime.txt +93 -0
- package/src/adapters/dashboard/web/shared/fonts/OFL-outfit.txt +93 -0
- package/src/adapters/dashboard/web/shared/fonts/courier-prime-latin-400.woff2 +0 -0
- package/src/adapters/dashboard/web/shared/fonts/courier-prime-latin-700.woff2 +0 -0
- package/src/adapters/dashboard/web/shared/fonts/outfit-latin-wght.woff2 +0 -0
- package/src/adapters/dashboard/web/shared/format.js +31 -0
- package/src/adapters/dashboard/web/shared/layout.css +32 -0
- package/src/adapters/dashboard/web/shared/memory-modal.js +124 -0
- package/src/adapters/dashboard/web/shared/modal.css +24 -0
- package/src/adapters/dashboard/web/shared/modal.js +22 -0
- package/src/adapters/dashboard/web/shared/state.js +12 -0
- package/src/adapters/dashboard/web/shared/tip.css +4 -0
- package/src/adapters/dashboard/web/shared/tip.js +12 -0
- package/src/adapters/dashboard/web/shared/tokens.css +50 -0
- package/src/adapters/dashboard/web/shared/type.css +52 -0
- package/src/adapters/dashboard/web/shared/utilities.css +5 -0
- package/src/adapters/dashboard/web/shared/vendor/MIT-three.txt +21 -0
- package/src/adapters/dashboard/web/shared/vendor/three.module.min.js +6 -0
- package/src/adapters/dashboard/web/shared/widgets/bar.css +9 -0
- package/src/adapters/dashboard/web/shared/widgets/card.css +6 -0
- package/src/adapters/dashboard/web/shared/widgets/chapters.js +15 -0
- package/src/adapters/dashboard/web/shared/widgets/chart.css +4 -0
- package/src/adapters/dashboard/web/shared/widgets/confirm.css +31 -0
- package/src/adapters/dashboard/web/shared/widgets/confirm.js +52 -0
- package/src/adapters/dashboard/web/shared/widgets/feed.css +13 -0
- package/src/adapters/dashboard/web/shared/widgets/feed.js +41 -0
- package/src/adapters/dashboard/web/shared/widgets/light.css +4 -0
- package/src/adapters/dashboard/web/shared/widgets/light.js +15 -0
- package/src/adapters/dashboard/web/shared/widgets/rows.css +7 -0
- package/src/adapters/dashboard/web/shared/widgets/table.css +17 -0
- package/src/adapters/dashboard/web/shared/widgets/tiles.css +14 -0
- package/src/adapters/dashboard/web/shell/pages.js +15 -0
- package/src/adapters/dashboard/web/shell/pulse.js +86 -0
- package/src/adapters/dashboard/web/shell/tabs.js +49 -0
- package/src/adapters/dashboard/web/static.ts +76 -0
- package/src/adapters/dashboard/web/views/activity.ts +80 -0
- package/src/adapters/dashboard/web/views/archive-words.ts +57 -0
- package/src/adapters/dashboard/web/views/flow-view.ts +217 -0
- package/src/adapters/dashboard/web/views/health.ts +328 -0
- package/src/adapters/dashboard/web/views/mechanism-panel.ts +370 -0
- package/src/adapters/dashboard/web/views/mechanisms.ts +302 -0
- package/src/adapters/dashboard/web/views/memories.ts +342 -0
- package/src/adapters/dashboard/web/views/memory.ts +210 -0
- package/src/adapters/dashboard/web/views/meta.ts +64 -0
- package/src/adapters/dashboard/web/views/mind.ts +729 -0
- package/src/adapters/dashboard/web/views/overview.ts +282 -0
- package/src/adapters/dashboard/web/views/pulse.ts +19 -0
- package/src/adapters/dashboard/web/views/rows.ts +207 -0
- package/src/adapters/dashboard/web/views/search.ts +62 -0
- package/src/adapters/dashboard/web/views/shared.ts +161 -0
- package/src/adapters/dashboard/web/views.ts +34 -1724
- package/src/adapters/fired.ts +138 -31
- package/src/adapters/mcp/INTERFACE-GAPS.md +4 -1
- package/src/adapters/mcp/NOTES.md +43 -0
- package/src/adapters/mcp/bin/serve.ts +9 -1
- package/src/adapters/mcp/index.ts +7 -0
- package/src/adapters/mcp/server.ts +167 -6
- package/src/adapters/mcp/tools.ts +42 -0
- package/src/adapters/mcp/write-up.ts +1 -1
- package/src/adapters/sessions.ts +18 -1
- package/src/adapters/snapshots.ts +71 -39
- package/src/core/associate/INTERFACE-GAPS.md +8 -0
- package/src/core/counterpart.ts +86 -7
- package/src/core/encode/INTERFACE-GAPS.md +12 -0
- package/src/core/feelings-wheel.ts +218 -0
- package/src/core/handoff/INTERFACE-GAPS.md +2 -0
- package/src/core/mint.ts +14 -2
- package/src/core/prospective/INTERFACE-GAPS.md +14 -0
- package/src/core/prospective/windows.ts +10 -48
- package/src/core/recall/INTERFACE-GAPS.md +6 -0
- package/src/core/remember/INTERFACE-GAPS.md +10 -0
- package/src/core/schemas/INTERFACE-GAPS.md +8 -0
- package/src/core/schemas/NOTES.md +118 -1
- package/src/core/schemas/index.ts +330 -40
- package/src/core/schemas/tunables.ts +23 -0
- package/src/core/schemas/types.ts +64 -1
- package/src/core/self/CONTRACT.md +3 -0
- package/src/core/self/INTERFACE-GAPS.md +10 -0
- package/src/core/self/NOTES.md +33 -2
- package/src/core/self/calendar.ts +7 -78
- package/src/core/self/episodes.ts +52 -12
- package/src/core/self/index.ts +40 -12
- package/src/core/self/writer.ts +22 -22
- package/src/core/sleep/NOTES.md +36 -0
- package/src/core/sleep/cycle.ts +38 -3
- package/src/core/sleep/fade.ts +76 -0
- package/src/core/sleep/index.ts +4 -1
- package/src/core/sleep/prune.ts +8 -1
- package/src/core/sleep/tunables.ts +5 -0
- package/src/core/sleep/types.ts +24 -0
- package/src/core/store/CONTRACT.md +36 -7
- package/src/core/store/NOTES.md +197 -0
- package/src/core/store/errors.ts +22 -0
- package/src/core/store/feelings.ts +182 -0
- package/src/core/store/index.ts +339 -45
- package/src/core/store/operational.ts +240 -22
- package/src/core/store/owner-op-seam.ts +13 -3
- package/src/core/store/paths.ts +15 -1
- package/src/core/store/pre-migration.ts +258 -0
- package/src/core/store/prose.ts +8 -1
- package/src/core/store/render.ts +3 -0
- package/src/core/time.ts +374 -0
- package/src/core/types.ts +13 -0
- package/src/adapters/dashboard/web/brain.html +0 -463
|
@@ -255,8 +255,12 @@ function collectMarkdown(store: Store, opts: ExportOptions): { bundle: Bundle; c
|
|
|
255
255
|
counts.notRendered.push(id);
|
|
256
256
|
continue;
|
|
257
257
|
}
|
|
258
|
-
const
|
|
259
|
-
if (
|
|
258
|
+
const rendered = render(id, doc);
|
|
259
|
+
if (rendered === null) continue;
|
|
260
|
+
// THE MEMORY'S FEELINGS TRAVEL WITH IT (schema v7, review N7): a short
|
|
261
|
+
// section after the body, one line each, so the readable copy says what the
|
|
262
|
+
// database does. The database export carries the table whole.
|
|
263
|
+
const text = rendered + feelingsSection(store, id);
|
|
260
264
|
put(pathFor(store, row, doc), text);
|
|
261
265
|
counts.rows += 1;
|
|
262
266
|
if (row.type === "episode") counts.journal += 1;
|
|
@@ -293,6 +297,25 @@ function collectMarkdown(store: Store, opts: ExportOptions): { bundle: Bundle; c
|
|
|
293
297
|
}
|
|
294
298
|
|
|
295
299
|
/** Where one row's markdown goes in the tree. Ids only; never a title. */
|
|
300
|
+
/** `\n## Feelings\n\n- owner · fear · worried · 0.6 — carried by …`, or "" when none. */
|
|
301
|
+
function feelingsSection(store: Store, id: string): string {
|
|
302
|
+
let rows;
|
|
303
|
+
try {
|
|
304
|
+
rows = store.feelingsFor(id);
|
|
305
|
+
} catch {
|
|
306
|
+
return "";
|
|
307
|
+
}
|
|
308
|
+
if (rows.length === 0) return "";
|
|
309
|
+
const index = new Map(rows.map((r, i) => [r.id, i + 1]));
|
|
310
|
+
const lines = rows.map((r, i) => {
|
|
311
|
+
const word = r.emotion === "other" ? `other: ${r.other_word ?? ""}` : r.emotion;
|
|
312
|
+
const under = r.beneath_id === null ? "" : ` · over #${String(index.get(r.beneath_id) ?? "?")}`;
|
|
313
|
+
const by = r.carried_by.length === 0 ? "" : ` — carried by: ${r.carried_by.replace(/\r?\n/g, " ")}`;
|
|
314
|
+
return `${String(i + 1)}. ${r.whose} · ${r.core} · ${word} · ${String(r.strength)}${under}${by}`;
|
|
315
|
+
});
|
|
316
|
+
return `\n\n## Feelings\n\n${lines.join("\n")}\n`;
|
|
317
|
+
}
|
|
318
|
+
|
|
296
319
|
function pathFor(store: Store, row: MemoryRow, doc: ProseDoc): string {
|
|
297
320
|
if (row.type === "episode") return journalRelativePath(doc);
|
|
298
321
|
if (row.type === "schema") {
|
|
@@ -710,7 +733,8 @@ function markdownReadme(census: MarkdownCensus, opts: ExportOptions): string {
|
|
|
710
733
|
"## What is here",
|
|
711
734
|
"",
|
|
712
735
|
"- `memories/<kind>/<id>.md` — one file per memory, grouped by kind. The file name is",
|
|
713
|
-
" the memory's id; the title, dates and everything else are in the frontmatter
|
|
736
|
+
" the memory's id; the title, dates and everything else are in the frontmatter, and",
|
|
737
|
+
" any feelings recorded on it are a `## Feelings` list after the words.",
|
|
714
738
|
census.archived === 0
|
|
715
739
|
? " None of them is archived: every memory here is a live one."
|
|
716
740
|
: ` ${String(census.archived)} of them ${census.archived === 1 ? "is" : "are"} ARCHIVED — faded, superseded or merged.` +
|
package/src/adapters/cli/help.ts
CHANGED
|
@@ -129,7 +129,7 @@ export const SHORT: Record<string, string | readonly string[]> = {
|
|
|
129
129
|
// build's. Finding #18 is exactly this list read by somebody who had just
|
|
130
130
|
// installed the package.
|
|
131
131
|
note: "Remember something on purpose, right now",
|
|
132
|
-
|
|
132
|
+
mechanisms: "Which parts of memory are working, one line each",
|
|
133
133
|
init: "Make a second, separate memory store — a scratch one",
|
|
134
134
|
"start-fresh": "Set this memory aside and start blank; --undo brings it back",
|
|
135
135
|
verify: "Count the search index against what is actually stored",
|
|
@@ -139,9 +139,10 @@ export const SHORT: Record<string, string | readonly string[]> = {
|
|
|
139
139
|
"repair-dates": "One-off repair: give imported memories their real dates",
|
|
140
140
|
"repair-merged-beliefs": "One-off repair: put back beliefs a cleanup pass filed away",
|
|
141
141
|
"probe-oq4": "A measurement: which footnotes were opened again later",
|
|
142
|
-
// ── the
|
|
142
|
+
// ── the ones that are on no page, and `UNLISTED` says why ──
|
|
143
143
|
help: "What it does, and every flag it takes",
|
|
144
144
|
recall: "Ask memory a question",
|
|
145
|
+
fired: "Which parts of memory are working, one line each",
|
|
145
146
|
version: "The version of Counterparts you have",
|
|
146
147
|
};
|
|
147
148
|
|
|
@@ -174,7 +175,7 @@ export const GROUPS: readonly HelpGroup[] = [
|
|
|
174
175
|
*/
|
|
175
176
|
export const ADVANCED: readonly string[] = [
|
|
176
177
|
"note",
|
|
177
|
-
"
|
|
178
|
+
"mechanisms",
|
|
178
179
|
"init",
|
|
179
180
|
"start-fresh",
|
|
180
181
|
"verify",
|
|
@@ -202,6 +203,9 @@ export const UNLISTED: Record<string, string> = {
|
|
|
202
203
|
// the right one for what the machinery does. `ask` is the word a PERSON
|
|
203
204
|
// reaches for, so that is the one on the map; both dispatch, forever.
|
|
204
205
|
recall: "the unlisted spelling of `ask` — it still dispatches, and always will",
|
|
206
|
+
// Renamed 2026-09-25: the owner found the old name's page a wall of text, and
|
|
207
|
+
// `mechanisms` is the word the site uses. Scripts that say `fired` keep working.
|
|
208
|
+
fired: "the older name of `mechanisms` — it still dispatches, the same command",
|
|
205
209
|
// `counterparts --version` is what a person types; `counterparts version` is
|
|
206
210
|
// the same answer for anybody who types the verb. Neither belongs on a map of
|
|
207
211
|
// things to do with a memory.
|
|
@@ -342,10 +346,18 @@ export const COMMAND_DETAIL: Record<string, readonly string[]> = {
|
|
|
342
346
|
"recall CONTRACT §7. The footnote header is the one string the probe varies",
|
|
343
347
|
"(recall/render.ts).",
|
|
344
348
|
],
|
|
349
|
+
mechanisms: [
|
|
350
|
+
"One line per memory mechanism: ● working this week, ◐ built but not firing,",
|
|
351
|
+
"○ not built yet, each with the count behind it; then the plumbing in one",
|
|
352
|
+
"line, naming only what is failing. `counterparts fired` is its older name.",
|
|
353
|
+
"",
|
|
354
|
+
"--all prints the full report, SILENT FIRST: when each part last fired, how",
|
|
355
|
+
"many times in the last 7 days, what it turned away, and — for the ones",
|
|
356
|
+
"nothing durable records — which row would fix that.",
|
|
357
|
+
],
|
|
345
358
|
fired: [
|
|
346
|
-
"
|
|
347
|
-
"
|
|
348
|
-
"which row would fix that.",
|
|
359
|
+
"`counterparts mechanisms` is the same command, and it is the listed",
|
|
360
|
+
"spelling; this one stays so scripts that call it keep working.",
|
|
349
361
|
],
|
|
350
362
|
"self-page": [
|
|
351
363
|
"With no flags it prints the page, its size, its version and the date it was",
|
|
@@ -371,8 +383,10 @@ export const COMMAND_DETAIL: Record<string, readonly string[]> = {
|
|
|
371
383
|
dashboard: [
|
|
372
384
|
"It reads the store your CONFIGURATION names — the one the hooks and the",
|
|
373
385
|
"memory tools open — so it needs no --dir. The page is served on 127.0.0.1",
|
|
374
|
-
"and nowhere else
|
|
375
|
-
"nothing
|
|
386
|
+
"and nowhere else. Looking is observer mode: it strengthens nothing and",
|
|
387
|
+
"deposits nothing. What you do there on purpose — a note, a removal, a",
|
|
388
|
+
"backup, an export, a scope, a rebrief, a verify, an ask — runs through",
|
|
389
|
+
"these same commands, and a removal asks you to type the id back.",
|
|
376
390
|
],
|
|
377
391
|
help: [
|
|
378
392
|
"With no command it prints the short map — the same page `counterparts",
|
|
@@ -43,6 +43,7 @@ import {
|
|
|
43
43
|
statSync,
|
|
44
44
|
writeFileSync,
|
|
45
45
|
} from "node:fs";
|
|
46
|
+
import { isDay } from "../../core/time.js";
|
|
46
47
|
import { homedir, tmpdir } from "node:os";
|
|
47
48
|
import { basename, dirname, join, resolve } from "node:path";
|
|
48
49
|
import { fileURLToPath } from "node:url";
|
|
@@ -769,11 +770,8 @@ export function parkedNameParts(
|
|
|
769
770
|
const m = new RegExp(`^${escaped}\\.parked-(\\d{4}-\\d{2}-\\d{2})(?:-(\\d+))?$`).exec(name);
|
|
770
771
|
if (m === null) return null;
|
|
771
772
|
const date = m[1] ?? "";
|
|
772
|
-
//
|
|
773
|
-
|
|
774
|
-
// which either fails to parse or comes back as some other day.
|
|
775
|
-
const parsed = new Date(`${date}T00:00:00.000Z`);
|
|
776
|
-
if (Number.isNaN(parsed.getTime()) || parsed.toISOString().slice(0, 10) !== date) return null;
|
|
773
|
+
// A real day, and not 2099-13-45 (`time.ts#isDay`).
|
|
774
|
+
if (!isDay(date)) return null;
|
|
777
775
|
if (m[2] === undefined) return { date, ordinal: 1 };
|
|
778
776
|
const ordinal = Number(m[2]);
|
|
779
777
|
if (!Number.isInteger(ordinal) || ordinal < 2) return null;
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `mechanisms` — the short answer to "is my memory working?", one line per
|
|
3
|
+
* memory mechanism the site names.
|
|
4
|
+
*
|
|
5
|
+
* **Why it exists** (2026-09-25). The owner ran `counterparts fired` and got 57
|
|
6
|
+
* rows mixing the eleven mechanisms with plumbing, sorted by state, in code
|
|
7
|
+
* words — and rows like "NEVER: a copy of the store could not be made" read as
|
|
8
|
+
* alarms when they are good news. This view is the page a regular user reads;
|
|
9
|
+
* `--all` still prints the full `fired` report, unchanged, for the diagnosis.
|
|
10
|
+
*
|
|
11
|
+
* **It reads nothing of its own.** Every count comes off the rows `fired.ts`
|
|
12
|
+
* already computed. The table below only says which of those rows are the
|
|
13
|
+
* evidence for which mechanism, and how to say the count in plain words.
|
|
14
|
+
*
|
|
15
|
+
* **Deliberately light.** The grouping and the words are this console's own,
|
|
16
|
+
* for now. The site and the dashboard have their own lists and are all still
|
|
17
|
+
* moving, so nothing here is shared with them or tested against them — the
|
|
18
|
+
* only coupling is to `MECHANISMS`, whose ids this table names.
|
|
19
|
+
*
|
|
20
|
+
* The truth per mechanism is `docs/research/mechanism-audit-2026-09-24.md`.
|
|
21
|
+
*/
|
|
22
|
+
import type { FiredReport, FiredRow } from "../fired.js";
|
|
23
|
+
|
|
24
|
+
/** The three lights. */
|
|
25
|
+
export const LIGHT = {
|
|
26
|
+
working: "●",
|
|
27
|
+
idle: "◐",
|
|
28
|
+
notBuilt: "○",
|
|
29
|
+
} as const;
|
|
30
|
+
export type Light = (typeof LIGHT)[keyof typeof LIGHT];
|
|
31
|
+
|
|
32
|
+
export type Group = "Encoding" | "Storage" | "Retrieval" | "Transformation";
|
|
33
|
+
|
|
34
|
+
/** The evidence rows, by `MECHANISMS` id, as the view reads them. */
|
|
35
|
+
type Rows = (id: string) => FiredRow | undefined;
|
|
36
|
+
|
|
37
|
+
export interface MemoryMechanism {
|
|
38
|
+
readonly name: string;
|
|
39
|
+
readonly group: Group;
|
|
40
|
+
/** `MECHANISMS` ids that are this mechanism's evidence. */
|
|
41
|
+
readonly evidence: readonly string[];
|
|
42
|
+
/** The light and one plain line, from the evidence rows. */
|
|
43
|
+
readonly read: (rows: Rows) => { light: Light; says: string };
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** Rows landed in the window, summed over the named ids. */
|
|
47
|
+
function week(rows: Rows, ...ids: string[]): number {
|
|
48
|
+
let n = 0;
|
|
49
|
+
for (const id of ids) n += rows(id)?.firedInWindow ?? 0;
|
|
50
|
+
return n;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function plural(n: number, one: string, many = `${one}s`): string {
|
|
54
|
+
return `${String(n)} ${n === 1 ? one : many}`;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const NOT_BUILT = (why: string) => (): { light: Light; says: string } => ({
|
|
58
|
+
light: LIGHT.notBuilt,
|
|
59
|
+
says: `not built yet: ${why}`,
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* THE ELEVEN, in the site's four groups and its order. `evidence` lists every
|
|
64
|
+
* id a `read` looks at, so the test can check each one still exists.
|
|
65
|
+
*/
|
|
66
|
+
export const MEMORY_MECHANISMS: readonly MemoryMechanism[] = [
|
|
67
|
+
// ── Encoding ──
|
|
68
|
+
{
|
|
69
|
+
name: "Salience",
|
|
70
|
+
group: "Encoding",
|
|
71
|
+
evidence: ["deposit", "chunk-gate"],
|
|
72
|
+
read: (rows) => {
|
|
73
|
+
const n = week(rows, "deposit", "chunk-gate");
|
|
74
|
+
return n > 0
|
|
75
|
+
? { light: LIGHT.working, says: `${plural(n, "memory", "memories")} written and scored` }
|
|
76
|
+
: { light: LIGHT.idle, says: "built, not firing yet: no memories written this week" };
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: "Emotion",
|
|
81
|
+
group: "Encoding",
|
|
82
|
+
evidence: ["emotion"],
|
|
83
|
+
// The audit's verdict: a feeling is recorded as a label and carries no
|
|
84
|
+
// weight, and the classifier ships off. Idle whatever the counts say.
|
|
85
|
+
read: (rows) => ({
|
|
86
|
+
light: LIGHT.idle,
|
|
87
|
+
says:
|
|
88
|
+
rows("emotion")?.state === "disabled"
|
|
89
|
+
? "built, held back: the feeling classifier is off, so feelings carry no weight yet"
|
|
90
|
+
: "built, not firing yet: feelings are recorded but carry no weight yet",
|
|
91
|
+
}),
|
|
92
|
+
},
|
|
93
|
+
// ── Storage ──
|
|
94
|
+
{
|
|
95
|
+
name: "Forgetting",
|
|
96
|
+
group: "Storage",
|
|
97
|
+
evidence: ["decay", "prune", "fade", "sleep-cycle"],
|
|
98
|
+
read: (rows) => {
|
|
99
|
+
// `memory.pruned` and `band.transition` are one row per memory; the fade
|
|
100
|
+
// is one row per night that faded a card.
|
|
101
|
+
const letGo = week(rows, "prune");
|
|
102
|
+
const dropped = week(rows, "decay");
|
|
103
|
+
const faded = week(rows, "fade");
|
|
104
|
+
const cycles = week(rows, "sleep-cycle");
|
|
105
|
+
const parts: string[] = [];
|
|
106
|
+
if (letGo > 0) parts.push(`${plural(letGo, "memory", "memories")} let go at the floor`);
|
|
107
|
+
if (dropped > 0) parts.push(`${plural(dropped, "memory", "memories")} faded a band`);
|
|
108
|
+
if (faded > 0) parts.push("unused names faded");
|
|
109
|
+
if (parts.length > 0) {
|
|
110
|
+
if (letGo === 0) parts.push("nothing at the floor yet");
|
|
111
|
+
return { light: LIGHT.working, says: parts.join("; ") };
|
|
112
|
+
}
|
|
113
|
+
if (cycles > 0) {
|
|
114
|
+
return {
|
|
115
|
+
light: LIGHT.working,
|
|
116
|
+
says: `decay ran in ${plural(cycles, "sleep cycle")}; nothing at the floor yet`,
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
return { light: LIGHT.idle, says: "built, not firing yet: no sleep cycle ran this week" };
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
name: "Interference",
|
|
124
|
+
group: "Storage",
|
|
125
|
+
evidence: [],
|
|
126
|
+
read: NOT_BUILT("only exact duplicates are merged"),
|
|
127
|
+
},
|
|
128
|
+
// ── Retrieval ──
|
|
129
|
+
{
|
|
130
|
+
name: "Retrieval",
|
|
131
|
+
group: "Retrieval",
|
|
132
|
+
evidence: ["recall-decision", "credit"],
|
|
133
|
+
read: (rows) => {
|
|
134
|
+
const turns = week(rows, "recall-decision");
|
|
135
|
+
// `recall.credit` is one row per session end, not per memory — so it is
|
|
136
|
+
// said as a fact, never as a count of memories.
|
|
137
|
+
const credited = week(rows, "credit") > 0;
|
|
138
|
+
if (turns === 0) {
|
|
139
|
+
return { light: LIGHT.idle, says: "built, not firing yet: no turns checked this week" };
|
|
140
|
+
}
|
|
141
|
+
return {
|
|
142
|
+
light: LIGHT.working,
|
|
143
|
+
says: credited
|
|
144
|
+
? `${plural(turns, "turn")} checked; memories used were strengthened`
|
|
145
|
+
: `${plural(turns, "turn")} checked; nothing used yet, so nothing strengthened`,
|
|
146
|
+
};
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
name: "Association",
|
|
151
|
+
group: "Retrieval",
|
|
152
|
+
evidence: ["association-saved", "association"],
|
|
153
|
+
read: (rows) => {
|
|
154
|
+
const saved = week(rows, "association-saved");
|
|
155
|
+
const held = rows("association")?.total ?? 0;
|
|
156
|
+
if (saved > 0) {
|
|
157
|
+
return {
|
|
158
|
+
light: LIGHT.working,
|
|
159
|
+
says: `links saved after ${plural(saved, "session")}; ${plural(held, "link")} held`,
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
return {
|
|
163
|
+
light: LIGHT.idle,
|
|
164
|
+
says:
|
|
165
|
+
held > 0
|
|
166
|
+
? `built, not firing yet: no new links this week (${plural(held, "link")} held)`
|
|
167
|
+
: "built, not firing yet: no links formed",
|
|
168
|
+
};
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: "Prospective",
|
|
173
|
+
group: "Retrieval",
|
|
174
|
+
evidence: ["prospective-armed", "prospective-fired"],
|
|
175
|
+
// Nothing in live use can put a date on a memory yet (audit: DRAFT_FIELDS),
|
|
176
|
+
// and nothing spends a fire. A store that holds dated intentions anyway has
|
|
177
|
+
// the half that is built; one that holds none has nothing of it.
|
|
178
|
+
read: (rows) => {
|
|
179
|
+
const armed = rows("prospective-armed")?.total ?? 0;
|
|
180
|
+
return armed > 0
|
|
181
|
+
? {
|
|
182
|
+
light: LIGHT.idle,
|
|
183
|
+
says: `built, not firing yet: ${plural(armed, "dated reminder")} held, and nothing brings one back yet`,
|
|
184
|
+
}
|
|
185
|
+
: { light: LIGHT.notBuilt, says: "not built yet: nothing can put a date on a memory" };
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
// ── Transformation ──
|
|
189
|
+
{
|
|
190
|
+
name: "Consolidation",
|
|
191
|
+
group: "Transformation",
|
|
192
|
+
evidence: ["sleep-cycle", "promotion", "dedup"],
|
|
193
|
+
read: (rows) => {
|
|
194
|
+
const cycles = week(rows, "sleep-cycle");
|
|
195
|
+
if (cycles === 0) {
|
|
196
|
+
return { light: LIGHT.idle, says: "built, not firing yet: no sleep cycle ran this week" };
|
|
197
|
+
}
|
|
198
|
+
const promoted = week(rows, "promotion");
|
|
199
|
+
const merged = week(rows, "dedup");
|
|
200
|
+
const extra: string[] = [];
|
|
201
|
+
if (promoted > 0) extra.push(`${plural(promoted, "memory", "memories")} became core`);
|
|
202
|
+
if (merged > 0) extra.push(`${plural(merged, "duplicate")} merged`);
|
|
203
|
+
return {
|
|
204
|
+
light: LIGHT.working,
|
|
205
|
+
says: `${plural(cycles, "sleep cycle")} ran${extra.length > 0 ? `; ${extra.join(", ")}` : ""}`,
|
|
206
|
+
};
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
name: "Reconsolidation",
|
|
211
|
+
group: "Transformation",
|
|
212
|
+
evidence: ["revision", "accommodation"],
|
|
213
|
+
read: (rows) => {
|
|
214
|
+
const pressed = week(rows, "revision");
|
|
215
|
+
const replaced = week(rows, "accommodation");
|
|
216
|
+
if (pressed + replaced > 0) {
|
|
217
|
+
const parts: string[] = [];
|
|
218
|
+
if (replaced > 0) parts.push(`${plural(replaced, "memory", "memories")} corrected, old version kept`);
|
|
219
|
+
if (pressed > 0) parts.push(`${plural(pressed, "belief")} challenged`);
|
|
220
|
+
return { light: LIGHT.working, says: parts.join("; ") };
|
|
221
|
+
}
|
|
222
|
+
return { light: LIGHT.idle, says: "built, not firing yet: nothing corrected this week" };
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
name: "Schemas",
|
|
227
|
+
group: "Transformation",
|
|
228
|
+
// Entity cards are built; beliefs about them have no live producer.
|
|
229
|
+
evidence: ["entity-birth"],
|
|
230
|
+
read: NOT_BUILT("nothing forms beliefs about people and projects yet"),
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
name: "Gist",
|
|
234
|
+
group: "Transformation",
|
|
235
|
+
evidence: ["gist"],
|
|
236
|
+
read: NOT_BUILT("many episodes are not yet distilled into one lasting memory"),
|
|
237
|
+
},
|
|
238
|
+
];
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* THE PLUMBING ROWS WHOSE FIRING MEANS SOMETHING FAILED, with the words to say
|
|
242
|
+
* it in. Every other plumbing row — a failure that never happened, an owner
|
|
243
|
+
* action never taken, a part blind by design — is not a problem, and the one
|
|
244
|
+
* line never makes it read like one.
|
|
245
|
+
*/
|
|
246
|
+
const TROUBLE: Readonly<Record<string, string>> = {
|
|
247
|
+
"worker-trouble": "the background worker failed or was refused",
|
|
248
|
+
"snapshot-trouble": "a copy of the store could not be made",
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
/** Every `MECHANISMS` id the eleven account for; the rest are plumbing. */
|
|
252
|
+
export function mechanismIds(): Set<string> {
|
|
253
|
+
return new Set(MEMORY_MECHANISMS.flatMap((m) => m.evidence));
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/** The plumbing line: how many parts ran this week, and only what failed. */
|
|
257
|
+
export function plumbingLine(report: FiredReport): string {
|
|
258
|
+
const mine = mechanismIds();
|
|
259
|
+
const plumbing = report.rows.filter((r) => !mine.has(r.id));
|
|
260
|
+
const running = plumbing.filter((r) => r.state === "firing" && TROUBLE[r.id] === undefined).length;
|
|
261
|
+
const failing: string[] = [];
|
|
262
|
+
for (const r of plumbing) {
|
|
263
|
+
const words = TROUBLE[r.id];
|
|
264
|
+
// No count: some of these rows are latched one per reason per day, so a
|
|
265
|
+
// number here would read as attempts and understate them.
|
|
266
|
+
if (words !== undefined && r.firedInWindow > 0) failing.push(words);
|
|
267
|
+
}
|
|
268
|
+
const head = `Plumbing: ${plural(running, "part")} running`;
|
|
269
|
+
return failing.length === 0
|
|
270
|
+
? `${head}, none failing.`
|
|
271
|
+
: `${head}; failing this week: ${failing.join("; ")}.`;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/** The whole short view, as plain lines: one per mechanism in the site's four
|
|
275
|
+
* groups and order, then the plumbing in one line. */
|
|
276
|
+
export function mechanismsLines(report: FiredReport): string[] {
|
|
277
|
+
const byId = new Map(report.rows.map((r) => [r.id, r]));
|
|
278
|
+
const rows: Rows = (id) => byId.get(id);
|
|
279
|
+
const width = Math.max(...MEMORY_MECHANISMS.map((m) => m.name.length)) + 2;
|
|
280
|
+
const lines = [`Memory mechanisms — last 7 days (${report.from} to ${report.today}, UTC)`, ""];
|
|
281
|
+
if (report.young) {
|
|
282
|
+
lines.push("This memory is new, so most of these have had nothing to do yet.", "");
|
|
283
|
+
}
|
|
284
|
+
for (const m of MEMORY_MECHANISMS) {
|
|
285
|
+
const { light, says } = m.read(rows);
|
|
286
|
+
lines.push(`${light} ${m.name.padEnd(width)}${says}`);
|
|
287
|
+
}
|
|
288
|
+
lines.push(
|
|
289
|
+
"",
|
|
290
|
+
`${LIGHT.working} working this week ${LIGHT.idle} built, not firing ${LIGHT.notBuilt} not built yet`,
|
|
291
|
+
plumbingLine(report),
|
|
292
|
+
"Every detail: counterparts mechanisms --all",
|
|
293
|
+
);
|
|
294
|
+
return lines;
|
|
295
|
+
}
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
* keeps its history. The owner runs `--apply`; nothing here runs it for him.
|
|
61
61
|
*/
|
|
62
62
|
import { Store, storeExists } from "../../core/store/index.js";
|
|
63
|
+
import { utcDate } from "../../core/time.js";
|
|
63
64
|
|
|
64
65
|
/** No memory in either lineage predates this. A parse below it is a coincidence. */
|
|
65
66
|
export const PLAUSIBLE_FLOOR = "2015-01-01";
|
|
@@ -132,8 +133,9 @@ const ISO_MONTH = /(?<!\d)(\d{4})-(\d{2})(?![\d-])/;
|
|
|
132
133
|
|
|
133
134
|
const TIER_ORDER: Record<Confidence, number> = { low: 0, medium: 1, high: 2 };
|
|
134
135
|
|
|
136
|
+
/** UTC on purpose: this repairs PRE-v7 rows, whose `learned_on` was UTC. */
|
|
135
137
|
function dateOfMs(ms: number): string {
|
|
136
|
-
return
|
|
138
|
+
return utcDate(ms);
|
|
137
139
|
}
|
|
138
140
|
|
|
139
141
|
/** A real calendar day inside the window the store could plausibly have lived. */
|
|
@@ -34,10 +34,10 @@ import {
|
|
|
34
34
|
} from "node:fs";
|
|
35
35
|
import { basename, dirname, join, resolve } from "node:path";
|
|
36
36
|
|
|
37
|
-
import { openDb } from "../../core/store/db.js";
|
|
38
37
|
import {
|
|
39
38
|
DATABASE_FILE,
|
|
40
39
|
LAYOUT,
|
|
40
|
+
vacuumInto,
|
|
41
41
|
assertSafeDataDir,
|
|
42
42
|
forbiddenRoots,
|
|
43
43
|
isWithin,
|
|
@@ -246,32 +246,9 @@ export function snapshot(store: Store, target: string): SnapshotReport {
|
|
|
246
246
|
return { ok: errors.length === 0, target: resolvedTarget, copied, excluded, errors };
|
|
247
247
|
}
|
|
248
248
|
|
|
249
|
-
/**
|
|
250
|
-
*
|
|
251
|
-
|
|
252
|
-
* silently replaces yesterday's is one crash away from being no backup at all.
|
|
253
|
-
*/
|
|
254
|
-
export function vacuumInto(
|
|
255
|
-
source: string,
|
|
256
|
-
destination: string,
|
|
257
|
-
): { ok: true } | { ok: false; error: string } {
|
|
258
|
-
if (!existsSync(source)) return { ok: false, error: "no canonical database at source" };
|
|
259
|
-
if (existsSync(destination)) {
|
|
260
|
-
return { ok: false, error: `destination already exists: ${destination}` };
|
|
261
|
-
}
|
|
262
|
-
let db;
|
|
263
|
-
try {
|
|
264
|
-
db = openDb(source);
|
|
265
|
-
// Single-quoted SQL literal: the path is escaped for SQL, never interpolated
|
|
266
|
-
// into a shell, because nothing here shells out.
|
|
267
|
-
db.exec(`VACUUM INTO '${destination.replace(/'/g, "''")}'`);
|
|
268
|
-
return { ok: true };
|
|
269
|
-
} catch (err) {
|
|
270
|
-
return { ok: false, error: String((err as Error).message ?? err) };
|
|
271
|
-
} finally {
|
|
272
|
-
db?.close();
|
|
273
|
-
}
|
|
274
|
-
}
|
|
249
|
+
/** `VACUUM INTO` on its own connection — the store's own copy primitive, kept
|
|
250
|
+
* exported here for the callers that always found it here. */
|
|
251
|
+
export { vacuumInto };
|
|
275
252
|
|
|
276
253
|
/** A snapshot directory name that sorts chronologically and never collides. */
|
|
277
254
|
export function snapshotName(at: number): string {
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
## 1. Purpose
|
|
4
4
|
|
|
5
5
|
The owner's window: what was remembered, what faded, what changed and why — visually, at a
|
|
6
|
-
glance. The direct instrument of constitution line 16
|
|
7
|
-
|
|
6
|
+
glance. The direct instrument of constitution line 16. Since 2026-09-25 it is also meant to
|
|
7
|
+
be the owner's main command center: most people will use the terminal once, to install,
|
|
8
|
+
and manage their memory here by clicking (the owner's own preference too).
|
|
8
9
|
|
|
9
10
|
## 2. Brain analog
|
|
10
11
|
|
|
@@ -42,13 +43,16 @@ Legibility is the product's answer to the trust question a brain never has to fa
|
|
|
42
43
|
## 5. Contract
|
|
43
44
|
|
|
44
45
|
**Inputs** — the canonical stores (read-only), the event log, the registry of kinds/bands,
|
|
45
|
-
the written self page and its versions (2026-09-18; shown as a
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
the written self page and its versions (2026-09-18; since 2026-09-25 shown as a timeline,
|
|
47
|
+
each version with what changed from the one before it).
|
|
48
|
+
**Outputs** — rendered views, and the owner's management actions. **Guarantees:** **[M]**
|
|
49
|
+
LOOKING is observer mode by construction (`docs/observer-mode.md`): every view strengthens
|
|
50
|
+
nothing, deposits nothing, resolves no references, and a test asserts the adapter's own
|
|
51
|
+
code holds no write handle to any canonical store. **[A]** MANAGING is the owner's own act
|
|
52
|
+
and is not artificially limited: an action the CLI offers (note, remove, backup, export,
|
|
53
|
+
scope, rebrief, …) may be offered here, run through the CLI's own door — the same code and
|
|
54
|
+
the same checks — never through the observer source; a destructive one asks the owner to
|
|
55
|
+
confirm. For now `install`, `uninstall` and `start-fresh` stay terminal-only. A known limit, not solved here: the page and its action token are served to anything that can reach the loopback port, so on a machine shared with other OS users another local user could manage this memory, not only read it. **[M]** Render-time id resolution everywhere; no memory body text is
|
|
52
56
|
persisted into dashboard state. **[M]** Totality: every registered axis appears or is
|
|
53
57
|
marked absent. **[A]** Views stay readable by a non-engineer — the owner is the acceptance
|
|
54
58
|
test.
|
|
@@ -10,6 +10,8 @@ of debt that goes silent if it is not written down.
|
|
|
10
10
|
|
|
11
11
|
## §1 — A read-only open still writes. `store/cache.ts`, `openCache`
|
|
12
12
|
|
|
13
|
+
**Closed 2026-09-24** — `store/cache.ts#openCache` writes the version row only when it differs, and leaves a cache from a newer build as found (`cacheAhead`, #190). The dashboard test's box-3 split may now be tightened.
|
|
14
|
+
|
|
13
15
|
**Found by:** the byte-identical test, on its first run.
|
|
14
16
|
|
|
15
17
|
**Have:** `Store.open` constructs box 3 through `openCache`, which unconditionally
|
|
@@ -71,6 +73,8 @@ records are not, so the two are not interchangeable for an old cycle.
|
|
|
71
73
|
|
|
72
74
|
## §3 — `self.enumerate` drops what it cannot read
|
|
73
75
|
|
|
76
|
+
**Closed 2026-09-24** — `self/identity.ts#enumerate` returns `absences` (`removed` / `unreadable`, and whether the row was protected, from the row or its tombstone). A `list({ protected: true })` filter is still absent.
|
|
77
|
+
|
|
74
78
|
**Found by:** the identity-view test that removes a protected element.
|
|
75
79
|
|
|
76
80
|
**Have:** `self/identity.ts`'s `enumerateOne` returns `null` when `readProse` or
|
|
@@ -76,8 +76,9 @@ write now fails `tsc` until someone has decided which part of the machine it
|
|
|
76
76
|
belongs to.
|
|
77
77
|
|
|
78
78
|
**One exception was opened, narrowly.** `web/server.ts` is the only file in this
|
|
79
|
-
directory that may import `node:fs` — `readFileSync`, for
|
|
80
|
-
that ship beside it
|
|
79
|
+
directory that may import `node:fs` — `readFileSync`, for the static files
|
|
80
|
+
that ship beside it (two HTML pages, and since the 2026-09-25 module split the
|
|
81
|
+
page's own `.js`/`.css` under `web/`, via `web/static.ts`) — and `node:http`. The directory-wide ban mechanizes "there
|
|
81
82
|
is no dashboard state file because nothing here can open one"; a read-only
|
|
82
83
|
import keeps that exactly, and the test pins the binding by name so it cannot
|
|
83
84
|
widen into a write. It also joins the enumerated network-verb list in
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
* keeping only the ones latched by a `dedupKey`. A feed that showed six rows
|
|
18
18
|
* without saying that would be quietly claiming six things ever happened.
|
|
19
19
|
*/
|
|
20
|
+
import { localClock } from "../../core/time.js";
|
|
20
21
|
import { PLAIN } from "./ansi.js";
|
|
21
22
|
import type { Style } from "./ansi.js";
|
|
22
23
|
import { NEVER, NONE, heading, indent, plural, stack, subheading, table, truncate } from "./layout.js";
|
|
@@ -64,7 +65,7 @@ export function renderActivity(src: DashboardSource, opts: ActivityOptions = {})
|
|
|
64
65
|
|
|
65
66
|
const rows: string[][] = [];
|
|
66
67
|
for (const row of shown) {
|
|
67
|
-
const when =
|
|
68
|
+
const when = localClock(row.at, store.zone());
|
|
68
69
|
const subject = row.ref === null ? style.dim("—") : resolveRef(store, row.ref, 44).label;
|
|
69
70
|
rows.push([`day ${row.day}`, style.dim(when), row.name, subject]);
|
|
70
71
|
const detail = payloadLine(src, row.payload, style);
|