counterparts 0.3.12 → 0.3.13
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 +184 -0
- package/docs/module-map.md +1 -1
- package/package.json +1 -1
- package/src/adapters/claude-code/CONTRACT.md +36 -10
- package/src/adapters/claude-code/INTERFACE-GAPS.md +116 -16
- package/src/adapters/claude-code/NOTES.md +131 -0
- package/src/adapters/claude-code/bin/hook.ts +35 -2
- package/src/adapters/claude-code/doctor.ts +155 -21
- package/src/adapters/claude-code/hooks.ts +49 -7
- package/src/adapters/claude-code/index.ts +11 -0
- package/src/adapters/claude-code/night-run.ts +133 -12
- package/src/adapters/claude-code/transcript.ts +268 -1
- package/src/adapters/cli/CONTRACT.md +5 -0
- package/src/adapters/cli/INTERFACE-GAPS.md +8 -4
- package/src/adapters/cli/NOTES.md +111 -0
- package/src/adapters/cli/commands.ts +65 -14
- package/src/adapters/cli/dream-core.ts +57 -42
- package/src/adapters/cli/export.ts +320 -21
- package/src/adapters/cli/index.ts +1 -0
- package/src/adapters/cli/install.ts +39 -7
- package/src/adapters/cli/mechanisms.ts +7 -1
- package/src/adapters/cli/uninstall.ts +13 -5
- package/src/adapters/cli/wire.ts +189 -63
- package/src/adapters/dashboard/INTERFACE-GAPS.md +10 -1
- package/src/adapters/dashboard/NOTES.md +79 -0
- package/src/adapters/dashboard/registries.ts +10 -2
- package/src/adapters/dashboard/web/README.md +19 -14
- package/src/adapters/dashboard/web/actions.ts +23 -1
- package/src/adapters/dashboard/web/flow.ts +4 -1
- package/src/adapters/dashboard/web/lanes.ts +3 -0
- package/src/adapters/dashboard/web/narrate.ts +30 -2
- package/src/adapters/dashboard/web/pages/flow/sections/fired.js +1 -0
- package/src/adapters/dashboard/web/pages/memories/memories.css +17 -4
- package/src/adapters/dashboard/web/pages/memories/row.js +37 -21
- package/src/adapters/dashboard/web/pages/memories/sections/search.js +279 -60
- package/src/adapters/dashboard/web/pages/memories/state.js +2 -1
- package/src/adapters/dashboard/web/server.ts +0 -5
- package/src/adapters/dashboard/web/shared/memory-marks.css +7 -0
- package/src/adapters/dashboard/web/shared/memory-marks.js +33 -0
- package/src/adapters/dashboard/web/shared/memory-modal.js +5 -3
- package/src/adapters/dashboard/web/views/health.ts +1 -1
- package/src/adapters/dashboard/web/views/search.ts +4 -45
- package/src/adapters/dashboard/web/views.ts +2 -2
- package/src/adapters/fired.ts +410 -25
- package/src/adapters/host-wiring.ts +300 -0
- package/src/adapters/lifecycle.ts +14 -0
- package/src/adapters/log/index.ts +2 -0
- package/src/adapters/mcp/CONTRACT.md +33 -3
- package/src/adapters/mcp/INTERFACE-GAPS.md +24 -2
- package/src/adapters/mcp/NOTES.md +136 -0
- package/src/adapters/mcp/bin/serve.ts +30 -0
- package/src/adapters/mcp/facts.ts +13 -1
- package/src/adapters/mcp/meaning.ts +208 -13
- package/src/adapters/mcp/server.ts +87 -15
- package/src/adapters/mcp/stdio.ts +3 -1
- package/src/adapters/mcp/stood-down.ts +51 -0
- package/src/adapters/mcp/tools.ts +27 -7
- package/src/adapters/plugin-run.sh +133 -0
- package/src/adapters/plugin.ts +329 -0
- package/src/core/associate/CONTRACT.md +2 -1
- package/src/core/associate/INTERFACE-GAPS.md +6 -1
- package/src/core/associate/NOTES.md +45 -0
- package/src/core/briefing.ts +12 -3
- package/src/core/contradictions.ts +184 -0
- package/src/core/counterpart.ts +451 -18
- package/src/core/dream/CONTRACT.md +5 -2
- package/src/core/dream/INTERFACE-GAPS.md +29 -6
- package/src/core/dream/NOTES.md +21 -0
- package/src/core/dream/index.ts +33 -1
- package/src/core/dream/reflect.ts +20 -5
- package/src/core/encode/INTERFACE-GAPS.md +3 -1
- package/src/core/fit/INTERFACE-GAPS.md +8 -2
- package/src/core/fit/NOTES.md +5 -2
- package/src/core/fit/index.ts +4 -1
- package/src/core/handoff/CONTRACT.md +37 -2
- package/src/core/handoff/INTERFACE-GAPS.md +10 -0
- package/src/core/handoff/NOTES.md +66 -0
- package/src/core/handoff/index.ts +214 -12
- package/src/core/mint.ts +8 -2
- package/src/core/physics/CONTRACT.md +11 -1
- package/src/core/physics/NOTES.md +30 -0
- package/src/core/physics/index.ts +26 -4
- package/src/core/prospective/CONTRACT.md +45 -6
- package/src/core/prospective/INTERFACE-GAPS.md +4 -0
- package/src/core/prospective/NOTES.md +138 -0
- package/src/core/prospective/derive.ts +33 -5
- package/src/core/prospective/index.ts +90 -5
- package/src/core/prospective/windows.ts +72 -1
- package/src/core/recall/CONTRACT.md +6 -2
- package/src/core/recall/INTERFACE-GAPS.md +28 -4
- package/src/core/recall/NOTES.md +57 -1
- package/src/core/recall/probe.ts +58 -0
- package/src/core/recall/session.ts +27 -3
- package/src/core/recall/time-ask.ts +116 -18
- package/src/core/remember/CONTRACT.md +4 -1
- package/src/core/remember/INTERFACE-GAPS.md +9 -1
- package/src/core/remember/proposals.ts +38 -5
- package/src/core/revision.ts +5 -0
- package/src/core/schemas/CONTRACT.md +13 -1
- package/src/core/schemas/INTERFACE-GAPS.md +20 -2
- package/src/core/schemas/NOTES.md +127 -0
- package/src/core/schemas/types.ts +2 -0
- package/src/core/self/CONTRACT.md +15 -4
- package/src/core/self/INTERFACE-GAPS.md +7 -2
- package/src/core/self/NOTES.md +49 -0
- package/src/core/self/briefing.ts +12 -2
- package/src/core/self/index.ts +82 -8
- package/src/core/self/page.ts +88 -0
- package/src/core/sleep/INTERFACE-GAPS.md +22 -3
- package/src/core/sleep/NOTES.md +11 -0
- package/src/core/sleep/prune.ts +6 -2
- package/src/core/store/NOTES.md +14 -0
- package/src/core/store/index.ts +107 -0
- package/src/core/time.ts +152 -0
- package/tools/install-loop/run.sh +48 -12
- package/src/adapters/dashboard/web/pages/memories/fold.js +0 -53
|
@@ -54,6 +54,7 @@ import {
|
|
|
54
54
|
MCP_RECALL_EVENT,
|
|
55
55
|
MCP_PART_EVENT,
|
|
56
56
|
MCP_OVERSIZE_EVENT,
|
|
57
|
+
MCP_SPILLED_EVENT,
|
|
57
58
|
ENVELOPE_GAVE_WAY_EVENT,
|
|
58
59
|
ENVELOPE_OVERCAP_EVENT,
|
|
59
60
|
INJECTION_OVERBUDGET_EVENT,
|
|
@@ -114,9 +115,11 @@ import {
|
|
|
114
115
|
DREAM_UNDONE_EVENT,
|
|
115
116
|
} from "../../core/dream/index.js";
|
|
116
117
|
import { V8_CENSUS_EVENT } from "../../core/sleep/index.js";
|
|
117
|
-
// Contradictions (2026-09-29, `core/contradictions.ts`): a flag, a settle, an
|
|
118
|
+
// Contradictions (2026-09-29, `core/contradictions.ts`): a flag, a settle, an
|
|
119
|
+
// undo — and a write's `updates` held as unrelated (2026-10-09).
|
|
118
120
|
import {
|
|
119
121
|
CONTRADICTION_FLAGGED_EVENT,
|
|
122
|
+
CONTRADICTION_HELD_EVENT,
|
|
120
123
|
CONTRADICTION_SETTLED_EVENT,
|
|
121
124
|
CONTRADICTION_UNDONE_EVENT,
|
|
122
125
|
} from "../../core/contradictions.js";
|
|
@@ -206,6 +209,7 @@ export type DurableEventName =
|
|
|
206
209
|
| typeof MCP_RECALL_EVENT
|
|
207
210
|
| typeof MCP_PART_EVENT
|
|
208
211
|
| typeof MCP_OVERSIZE_EVENT
|
|
212
|
+
| typeof MCP_SPILLED_EVENT
|
|
209
213
|
| typeof ENVELOPE_OVERCAP_EVENT
|
|
210
214
|
| typeof NOTICE_DROPPED_EVENT
|
|
211
215
|
| typeof ENVELOPE_GAVE_WAY_EVENT
|
|
@@ -235,6 +239,7 @@ export type DurableEventName =
|
|
|
235
239
|
| typeof CONTRADICTION_FLAGGED_EVENT
|
|
236
240
|
| typeof CONTRADICTION_SETTLED_EVENT
|
|
237
241
|
| typeof CONTRADICTION_UNDONE_EVENT
|
|
242
|
+
| typeof CONTRADICTION_HELD_EVENT
|
|
238
243
|
| typeof COVERAGE_OWED_EVENT
|
|
239
244
|
| typeof COVERAGE_WRITTEN_EVENT
|
|
240
245
|
| typeof COVERAGE_LAPSED_EVENT;
|
|
@@ -266,6 +271,7 @@ export const DURABLE_EVENTS = {
|
|
|
266
271
|
"mcp.recall": "the session went looking for a memory on purpose (what kind of ask, how much came back, and every verdict that kept something out)",
|
|
267
272
|
"mcp.part": "a later part of a dream's or a reflection's bundle was handed over (which part of how many, and its size)",
|
|
268
273
|
"mcp.result.oversize": "a tool result came to more than the host shows in one answer, and was cut to fit with a note saying so",
|
|
274
|
+
"mcp.result.spilled": "the host showed one of the nightly run's tool results only as a short preview, so the run read part of it (found in the run's own transcript)",
|
|
269
275
|
// What a delivery could not carry (durable since 2026-10-02; ring-only
|
|
270
276
|
// before, so a dropped notice or a hook past the host's cap left nothing).
|
|
271
277
|
"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",
|
|
@@ -280,7 +286,7 @@ export const DURABLE_EVENTS = {
|
|
|
280
286
|
"adapter.primacy.deliver": "a hook delivered while the parallel run was on",
|
|
281
287
|
"adapter.primacy.standdown": "a hook withheld delivery so the other system could speak",
|
|
282
288
|
"adapter.recall": "a turn's recall was composed for injection (counts and bytes)",
|
|
283
|
-
"adapter.wake.delivered": "the
|
|
289
|
+
"adapter.wake.delivered": "the wake's arrival was checked, at the first prompt or the first Stop",
|
|
284
290
|
"adapter.wake.injected": "a wake bundle was handed to the host (bytes, never text)",
|
|
285
291
|
"band.promoted": "a memory crossed into the identity band",
|
|
286
292
|
"band.transition": "a memory changed bands (the symmetry counter's food)",
|
|
@@ -366,6 +372,8 @@ export const DURABLE_EVENTS = {
|
|
|
366
372
|
"contradiction.flagged": "two memories that disagree were flagged as a pair, unsettled (by a dream, today)",
|
|
367
373
|
"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 the owner)",
|
|
368
374
|
"contradiction.undone": "a settle was undone: strength put back, a corrected memory back in recall, the pair unsettled again",
|
|
375
|
+
// The update guard (2026-10-09). Ids, the reading and its numbers; no text.
|
|
376
|
+
"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)",
|
|
369
377
|
// What is not written up (2026-09-30). Ids and counts only; one row per stretch per state.
|
|
370
378
|
"coverage.owed": "a session left a stretch that is not written up — three pieces or more over a quarter of an hour — and is no longer at work, so it owes a write-up (how many pieces, over how long)",
|
|
371
379
|
"coverage.written": "a stretch of a session was written up (how many pieces, and by whom: the session itself, a \"nothing new\", a chapter, or the next session)",
|
|
@@ -15,7 +15,7 @@ step, no dependencies. `server.ts` serves them as files (see "Serving" below).
|
|
|
15
15
|
| `ask-voice.ts` | `toMyVoice(question, ownerName)`: Ask is the owner talking to me, so `ask` turns his question into my voice before it searches ("do you remember what I said" → "do I remember what Mike said"; his I → "you" when the store knows no name). Pure; the rules are in its header and `test/dashboard-ask-voice.test.ts`. The server reads the name (`sleep#ownerNames`) and hands `actions.ts` the string |
|
|
16
16
|
| `static.ts` | `resolveStatic()`: which URL paths are static files and where they live (pure; no fs) |
|
|
17
17
|
| `views.ts` | the index of `views/`: re-exports every view, so callers import from here |
|
|
18
|
-
| `views/<name>.ts` | one module per `/api` view: `meta`, `overview` (the home tab's; its "Today" lines are `today`), `memories` (`/api/memories` + `/api/memories/list`), `memory`, `search` (`/api/search`
|
|
18
|
+
| `views/<name>.ts` | one module per `/api` view: `meta`, `overview` (the home tab's; its "Today" lines are `today`), `memories` (`/api/memories` + `/api/memories/list`), `memory`, `search` (`/api/search`), `mind` (the self tab's; its trait bars are `traits`), `activity`, `flow-view` (`/api/flow` + `/api/node`), `health`, `pulse`, `mechanisms`, `mechanism-panel` (`/api/mechanism?id=`) |
|
|
19
19
|
| `views/archive-words.ts` | why a memory was archived, in plain words: one table (`ARCHIVE_WORDS`, a group phrase and a single-row phrase per reason) and one fallback for a reason nobody mapped; health's bar, the memories list and home's archived count read it |
|
|
20
20
|
| `views/mechanisms.ts` | `/api/mechanisms`: each mechanism's light (grey = not built, green = fired in the last 7 lived days, waiting = built and not due — a scheduled run ahead, or nothing to act on — amber = built and quiet), its `build` (built / partly / not: the pill's "partly built" tag), one evidence line, the newest backing event `seq`s. Which rows count as a firing is `adapters/mechanism-evidence.ts` — ONE judgement shared with `counterparts mechanisms` (`cli/mechanisms.ts`), which keeps its own words and its calendar window; this file owns the lived-day window and the dashboard's words |
|
|
21
21
|
| `views/shared.ts` | the census and small counters every view leans on |
|
|
@@ -178,19 +178,24 @@ which Home draws too; an axis clicked filters the list), `list.js` (every
|
|
|
178
178
|
memory, newest or oldest first, twenty a page, two rows of chips with a few
|
|
179
179
|
words each on hover, paged on the server by `/api/memories/list` in
|
|
180
180
|
`views/memories.ts`, which also groups several put-away versions of one memory
|
|
181
|
-
into one row), `search.js` (ONE box with a "by word | by meaning" switch
|
|
182
|
-
beside it, `state.js#find.mode`, 2026-09-30
|
|
183
|
-
`/api/search`, and Enter only runs it at once;
|
|
184
|
-
`act("ask", {json:true})
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
with
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
181
|
+
into one row), `search.js` (ONE box with a "by word | facts | by meaning" switch
|
|
182
|
+
beside it, `state.js#find.mode`, 2026-09-30, three ways since 2026-10-09: by
|
|
183
|
+
word finds as you type, `/api/search`, and Enter only runs it at once; facts
|
|
184
|
+
and by meaning ask on Enter via `act("ask", {json:true, mode, page})`, the
|
|
185
|
+
console's `ask --json --mode`, and draw the answer it returned — facts every
|
|
186
|
+
match, counted and paged, with who said it, when and what it was before; by
|
|
187
|
+
meaning the arc, chapters in time order with their moments and feelings —
|
|
188
|
+
through pure functions (`factsRows`, `meaningRows`, …) that
|
|
189
|
+
`test/dashboard-ask-answers.test.ts` feeds real answers; the switch never flips
|
|
190
|
+
by itself; when the words find fewer than `CLOSE_BELOW`,
|
|
191
|
+
`views/search.ts#closeMatches` adds "close matches", a typo or two away over
|
|
192
|
+
titles and words, the dashboard's own pass with `store.search` untouched; the
|
|
193
|
+
answers take the list's place and "×" gives it back; the search's words are
|
|
194
|
+
marked where they appear in an answer (`row.js#marked`, whole words as the
|
|
195
|
+
word index splits them, escaped first; for Ask, the question's longer words),
|
|
196
|
+
and a memory id written in a row's words is a small link to it
|
|
197
|
+
(`memory-marks.js#idMark`); the question is turned into my voice server side
|
|
198
|
+
by `ask-voice.ts`), and `tools.js` (add a memory, and the
|
|
194
199
|
back-up/export folder dialog). `views/memory-words.ts` says how a row's words
|
|
195
200
|
are shown (a date at their front lifted off, a journal chapter's heading lifted
|
|
196
201
|
off, feelings in words); archive reasons come from `views/archive-words.ts`.
|
|
@@ -353,13 +353,35 @@ function argvFor(name: ActionName, body: Body, ctx: ActionContext): Built {
|
|
|
353
353
|
// The answers as data, so the page can list them and open each one.
|
|
354
354
|
if (flag(body, "json")) argv.push("--json");
|
|
355
355
|
if (id !== undefined) return { argv: [...argv, "--id", id] };
|
|
356
|
+
// THE MODE (2026-10-09): facts is the console's default and adds
|
|
357
|
+
// nothing; meaning is asked for by name. And which page of the answer.
|
|
358
|
+
const mode = body["mode"];
|
|
359
|
+
if (mode !== undefined && mode !== null && mode !== "facts" && mode !== "meaning") {
|
|
360
|
+
throw new Invalid("mode is facts or meaning");
|
|
361
|
+
}
|
|
362
|
+
if (mode === "meaning") argv.push("--mode", "meaning");
|
|
363
|
+
const page = body["page"];
|
|
364
|
+
if (page !== undefined && page !== null) {
|
|
365
|
+
if (typeof page !== "number" || !Number.isInteger(page) || page < 1 || page > 10_000) {
|
|
366
|
+
throw new Invalid("page is a whole number from 1");
|
|
367
|
+
}
|
|
368
|
+
argv.push("--page", String(page));
|
|
369
|
+
}
|
|
356
370
|
// THE OWNER'S VOICE, TURNED INTO MINE (memories round 3b): "what have you
|
|
357
371
|
// learned about yourself?" searches as "what have I learned about
|
|
358
372
|
// myself?". The page shows what was searched and can ask again with
|
|
359
373
|
// `exact: true`. The CLI's own `ask` is untouched.
|
|
360
374
|
const typed = words(question as string, "question");
|
|
361
375
|
const exact = flag(body, "exact");
|
|
362
|
-
|
|
376
|
+
// In MEANING mode his "I" becomes "you", never his name (review of #333):
|
|
377
|
+
// meaning then took the card with the most memories as its subject, so
|
|
378
|
+
// "what has Ilya been to me" turned into "… to Rosalind" answered about
|
|
379
|
+
// Rosalind. Since 2026-10-09 meaning picks the card the question is
|
|
380
|
+
// about (`meaning.ts#subjectOf`), and in my voice (`--voiced`) "you" is
|
|
381
|
+
// the owner to it: his feelings stay his, and "what have you been like"
|
|
382
|
+
// is his own card.
|
|
383
|
+
const owner = mode === "meaning" ? null : ctx.ownerName ?? null;
|
|
384
|
+
const voiced = exact ? { text: typed, changed: false } : toMyVoice(typed, owner);
|
|
363
385
|
// In MY voice, "I" is me: a question about feeling asks about the
|
|
364
386
|
// counterpart's own feelings (`--voiced`, U13). `exact` keeps the owner's
|
|
365
387
|
// words, and his "I".
|
|
@@ -431,9 +431,11 @@ export const EVENT_NODE = {
|
|
|
431
431
|
// The deliberate look is a retrieval, so it lands where the ambient one does.
|
|
432
432
|
"mcp.recall": "recall",
|
|
433
433
|
// A bundle part is the night's reading; an oversize cut is the server's
|
|
434
|
-
// answer to it (2026-10-02) — both land where the dream does
|
|
434
|
+
// answer to it (2026-10-02) — both land where the dream does; so does a
|
|
435
|
+
// result the host cut after the server answered (2026-10-09).
|
|
435
436
|
"mcp.part": "sleep",
|
|
436
437
|
"mcp.result.oversize": "sleep",
|
|
438
|
+
"mcp.result.spilled": "sleep",
|
|
437
439
|
// A reminder arriving is a CUE offered into the turn (§12: arrival is a cue,
|
|
438
440
|
// not a command), so both rows land on the prospective node.
|
|
439
441
|
"prospective.fire": "prospective",
|
|
@@ -483,6 +485,7 @@ export const EVENT_NODE = {
|
|
|
483
485
|
"contradiction.flagged": "schemas",
|
|
484
486
|
"contradiction.settled": "schemas",
|
|
485
487
|
"contradiction.undone": "schemas",
|
|
488
|
+
"contradiction.held": "schemas",
|
|
486
489
|
} as const satisfies Record<DurableEventName, NodeKey>;
|
|
487
490
|
|
|
488
491
|
export function nodeOf(name: string): NodeKey | null {
|
|
@@ -69,6 +69,8 @@ export const LANES = {
|
|
|
69
69
|
"contradiction.settled": "home",
|
|
70
70
|
"contradiction.flagged": "flow",
|
|
71
71
|
"contradiction.undone": "flow",
|
|
72
|
+
// A held `updates` (2026-10-09) moved nothing: housekeeping.
|
|
73
|
+
"contradiction.held": "flow",
|
|
72
74
|
// A session end that strengthened nothing is housekeeping — unless the credit
|
|
73
75
|
// itself failed, which is a real problem about memories and stays home.
|
|
74
76
|
"recall.credit": (p) =>
|
|
@@ -123,6 +125,7 @@ export const LANES = {
|
|
|
123
125
|
"mcp.recall": "flow",
|
|
124
126
|
"mcp.part": "flow",
|
|
125
127
|
"mcp.result.oversize": "flow",
|
|
128
|
+
"mcp.result.spilled": "flow",
|
|
126
129
|
"prospective.fire.refused": "flow",
|
|
127
130
|
"recall.decision": "flow",
|
|
128
131
|
"remember.prune": "flow",
|
|
@@ -791,7 +791,7 @@ export const NARRATORS = {
|
|
|
791
791
|
notable(`I handed the host who I have been — ${n(t, "bytes") ?? 0} bytes of briefing, at the start of a session.`),
|
|
792
792
|
"adapter.wake.delivered": (t) => {
|
|
793
793
|
const seen = t.p["seen"] === true || t.p["sentinelSeen"] === true || t.p["ok"] === true;
|
|
794
|
-
if (seen) return calm(`I checked the
|
|
794
|
+
if (seen) return calm(`I checked the session's transcript and my briefing had arrived intact.`);
|
|
795
795
|
// The check says WHY since 2026-09-17, and one of its answers is not a problem:
|
|
796
796
|
// a session that was owed no briefing (nothing was printed at its start).
|
|
797
797
|
const outcome = s(t, "outcome");
|
|
@@ -809,7 +809,20 @@ export const NARRATORS = {
|
|
|
809
809
|
if (outcome === "mismatch") {
|
|
810
810
|
return amber(`A briefing arrived, but not the one I composed for this session — most likely a resumed session showing an earlier run's.`);
|
|
811
811
|
}
|
|
812
|
-
|
|
812
|
+
// WHAT THE CHECK COULD READ (2026-10-08), as doctor's Wake line splits it.
|
|
813
|
+
// No file at the first prompt is the host writing it later, not a lost
|
|
814
|
+
// wake: the rows from before the check learned to wait for the Stop.
|
|
815
|
+
const transcript = s(t, "transcript");
|
|
816
|
+
if (transcript === "absent" && s(t, "checkedAt") !== "stop") {
|
|
817
|
+
return calm(`I could not check whether my briefing arrived: the session had not written its transcript yet when I looked. That is not a sign it went missing.`);
|
|
818
|
+
}
|
|
819
|
+
if (transcript === "absent") {
|
|
820
|
+
return amber(`By the end of the first turn this session still had no transcript, so I could not check that my briefing arrived.`);
|
|
821
|
+
}
|
|
822
|
+
if (transcript === "unreadable") {
|
|
823
|
+
return amber(`The session's transcript was there and I could not read it, so I could not check that my briefing arrived.`);
|
|
824
|
+
}
|
|
825
|
+
return amber(`I read the session's transcript and could not find my briefing in it. A wake nobody read is a day I started as a stranger.`);
|
|
813
826
|
},
|
|
814
827
|
|
|
815
828
|
// ── the host's session ─────────────────────────────────────────────────────
|
|
@@ -883,6 +896,13 @@ export const NARRATORS = {
|
|
|
883
896
|
: `${said}; it went out whole, as nothing in it was one long text to cut.`,
|
|
884
897
|
);
|
|
885
898
|
},
|
|
899
|
+
// The host's cut, read from the night run's own transcript (2026-10-09).
|
|
900
|
+
"mcp.result.spilled": (t) => {
|
|
901
|
+
const tool = typeof t.p["tool"] === "string" ? t.p["tool"].replace(/^mcp__counterparts__/, "") : "a tool";
|
|
902
|
+
const phase = typeof t.p["phase"] === "string" ? ` (${t.p["phase"]})` : "";
|
|
903
|
+
const size = typeof t.p["said"] === "string" ? `, at ${t.p["said"]},` : "";
|
|
904
|
+
return amber(`Claude Code showed the nightly run's answer from ${tool}${phase}${size} only as a short preview — the run read part of it.`);
|
|
905
|
+
},
|
|
886
906
|
|
|
887
907
|
// ── going looking on purpose ───────────────────────────────────────────────
|
|
888
908
|
"mcp.recall": (t) => {
|
|
@@ -1060,6 +1080,11 @@ export const NARRATORS = {
|
|
|
1060
1080
|
: notable(`${who} settled a contradiction as ${how}: ${s(t, "holds") ?? "one"} holds over ${s(t, "over") ?? "the other"}.`);
|
|
1061
1081
|
},
|
|
1062
1082
|
"contradiction.undone": (t) => calm(`A settle was undone (${s(t, "pair") ?? "a pair"}); the pair is unsettled again.`),
|
|
1083
|
+
"contradiction.held": (t) =>
|
|
1084
|
+
calm(
|
|
1085
|
+
`A new memory said it ${s(t, "how") === "corrected" ? "corrected" : "changed"} ${s(t, "over") ?? "another"}, which looked unrelated to it` +
|
|
1086
|
+
`${s(t, "by") === "meaning" ? " in meaning" : " in its words"}, so that one was left as it was and the two were not linked.`,
|
|
1087
|
+
),
|
|
1063
1088
|
|
|
1064
1089
|
// ── what is not written up (2026-09-30) ─────────────────────────────────
|
|
1065
1090
|
"coverage.owed": (t) =>
|
|
@@ -1150,6 +1175,7 @@ export const REF_KIND = {
|
|
|
1150
1175
|
// A part's run id (a dream's or a reflection's) is in its payload, not a memory.
|
|
1151
1176
|
"mcp.part": "none",
|
|
1152
1177
|
"mcp.result.oversize": "none",
|
|
1178
|
+
"mcp.result.spilled": "none",
|
|
1153
1179
|
"adapter.envelope.overcap": "none",
|
|
1154
1180
|
"adapter.notice.dropped": "none",
|
|
1155
1181
|
"adapter.envelope.gave-way": "none",
|
|
@@ -1241,6 +1267,8 @@ export const REF_KIND = {
|
|
|
1241
1267
|
"contradiction.flagged": "none",
|
|
1242
1268
|
"contradiction.settled": "none",
|
|
1243
1269
|
"contradiction.undone": "none",
|
|
1270
|
+
// A held `updates` points at the NEW memory (2026-10-09).
|
|
1271
|
+
"contradiction.held": "memory",
|
|
1244
1272
|
// A coverage row names a session in its payload; a written row's ref is the
|
|
1245
1273
|
// claim (a proposal id, or `nothing-new:` / `chapter:` / `writeup:` and an id).
|
|
1246
1274
|
"coverage.owed": "none",
|
|
@@ -34,6 +34,7 @@ export async function render() {
|
|
|
34
34
|
rows.join("") + "</tbody></table>";
|
|
35
35
|
$("h-fired-foot").textContent =
|
|
36
36
|
d.from + "→" + d.today + " (UTC), against " + d.previousFrom + "→" + d.previousTo + ". " +
|
|
37
|
+
(d.missedOccasion && d.missedOccasion.length ? "Its occasion came this week and it did not fire: " + d.missedOccasion.join("; ") + ". " : "") +
|
|
37
38
|
(d.wentQuiet.length ? "Fired last week and not once this week: " + d.wentQuiet.join("; ") + ". "
|
|
38
39
|
: "Nothing that fired last week has fallen silent this week. ") +
|
|
39
40
|
(d.truncated ? "The event read hit its ceiling, so every count is a floor. " : "") +
|
|
@@ -43,6 +43,9 @@
|
|
|
43
43
|
.find-x:hover,.find-x:focus-visible{color:var(--cyan);outline:none}
|
|
44
44
|
.find-head{color:var(--dim);font-size:12.5px;margin:8px 0 0}
|
|
45
45
|
.find-hint{color:var(--faint)}
|
|
46
|
+
/* An answer's quieter notes, on their own line under its head (what it is
|
|
47
|
+
about, a time it named, what it left out and why). */
|
|
48
|
+
.find-note{display:block;color:var(--faint);font-size:12px;margin-top:2px}
|
|
46
49
|
|
|
47
50
|
/* ── the two small pictures: how well I remember, how it feels ── */
|
|
48
51
|
.glance2{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,24rem),1fr));gap:0 20px;align-items:stretch}
|
|
@@ -133,14 +136,24 @@
|
|
|
133
136
|
-webkit-box-orient:vertical;overflow-wrap:anywhere;margin-top:1px}
|
|
134
137
|
.mtext.solo{color:var(--t);font-size:13.5px;margin-top:0}
|
|
135
138
|
.mwhy{color:var(--amber);font-size:12px;margin-top:3px}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
.
|
|
139
|
+
/* Under an Ask answer's words: who said it, when, which chapter, what it was
|
|
140
|
+
before; under a chapter of an arc, its moments, each a link (2026-10-09). */
|
|
141
|
+
.mfacts{color:var(--faint);font-size:12px;line-height:1.5;margin-top:3px;overflow-wrap:anywhere}
|
|
142
|
+
.mearlier{color:var(--faint)}
|
|
143
|
+
.mmoments{display:flex;flex-direction:column;align-items:flex-start;gap:1px;margin-top:4px}
|
|
144
|
+
.mmoment{max-width:100%;padding:0;background:none;border:none;color:var(--cyan);font:inherit;font-size:12px;text-align:left;
|
|
145
|
+
cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
146
|
+
.mmoment:hover,.mmoment:focus-visible{text-decoration:underline;outline:none}
|
|
147
|
+
.mmore{color:var(--faint);font-size:12px}
|
|
148
|
+
/* A stretch of an arc this page does not show, and what recurs across it. */
|
|
149
|
+
.mfold{padding:7px 15px;border-bottom:1px solid var(--border);color:var(--faint);font-size:12.5px}
|
|
150
|
+
/* A row that opens nothing (a session's moments with no chapter). */
|
|
151
|
+
.mrow:not(.click){cursor:default}
|
|
152
|
+
.mrow:not(.click):hover{background:none}
|
|
139
153
|
.mside{display:flex;flex-direction:column;align-items:flex-end;gap:4px;min-width:0;padding-top:2px}
|
|
140
154
|
.mline{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end;min-height:18px}
|
|
141
155
|
.mdate{color:var(--faint);font-size:12px;white-space:nowrap}
|
|
142
156
|
.mkind{display:inline-flex;align-items:center;gap:5px;color:var(--faint);font-size:12px;white-space:nowrap}
|
|
143
|
-
.mtier{color:var(--faint);font-size:11.5px;white-space:nowrap}
|
|
144
157
|
.mfading{color:var(--amber);font-size:12px;white-space:nowrap}
|
|
145
158
|
/* The close matches' heading, under the exact ones (M4). */
|
|
146
159
|
.mclose-h{padding:9px 15px 7px;border-bottom:1px solid var(--border);color:var(--ink);font-size:12.5px;font-weight:600;background:rgba(255,255,255,.02)}
|
|
@@ -3,17 +3,18 @@
|
|
|
3
3
|
date, the kind and the marks on the right. Every row is drawn at the same
|
|
4
4
|
brightness (round 4, 2026-09-28): how well it is remembered shows only when
|
|
5
5
|
it is not the usual — the one word "fading". A plain fact carries no kind
|
|
6
|
-
tag (the quiet default); a journal chapter is titled by its day.
|
|
6
|
+
tag (the quiet default); a journal chapter is titled by its day. An id
|
|
7
|
+
written inside the words is a small link to that memory (2026-10-09). */
|
|
7
8
|
import { esc } from "../../shared/dom.js";
|
|
8
9
|
import { dateOr, dateWords } from "../../shared/dates.js";
|
|
9
|
-
import { badges, feelingDots, kindMark, kindOf } from "../../shared/memory-marks.js";
|
|
10
|
+
import { ID_IN_WORDS, badges, feelingDots, idMark, kindMark, kindOf } from "../../shared/memory-marks.js";
|
|
10
11
|
import { openMemory } from "../../shared/memory-modal.js";
|
|
11
12
|
|
|
12
13
|
/** Rows under `container` open their memory on a click or Enter (one listener
|
|
13
14
|
* for every row it will ever hold, so a repaint needs no rewiring). */
|
|
14
15
|
export function wireRows(container) {
|
|
15
16
|
const open = (e) => {
|
|
16
|
-
// A link inside a row (a
|
|
17
|
+
// A link inside a row (an id in its words, a moment under a chapter) opens what it names, not the row.
|
|
17
18
|
const link = e.target.closest("[data-open]");
|
|
18
19
|
if (link && container.contains(link)) { openMemory(link.dataset.open); return; }
|
|
19
20
|
const row = e.target.closest(".mrow[data-id]");
|
|
@@ -24,7 +25,13 @@ export function wireRows(container) {
|
|
|
24
25
|
container.addEventListener("keydown", (e) => { if (e.key === "Enter" && !e.target.closest("button")) open(e); });
|
|
25
26
|
}
|
|
26
27
|
|
|
27
|
-
const DATE_WORDS = {
|
|
28
|
+
const DATE_WORDS = {
|
|
29
|
+
text: "the date written in the memory",
|
|
30
|
+
chapter: "the day its journal chapter names",
|
|
31
|
+
recorded: "the day it was recorded",
|
|
32
|
+
happened: "the day it happened",
|
|
33
|
+
learned: "the day I learned it",
|
|
34
|
+
};
|
|
28
35
|
|
|
29
36
|
/** A journal chapter's title: "Journal · Sun, Sep 27th", or "Journal" with no day. */
|
|
30
37
|
export function journalTitle(date) {
|
|
@@ -38,15 +45,25 @@ export function searchWords(q) {
|
|
|
38
45
|
return String(q || "").toLowerCase().split(/[^a-z0-9]+/).filter((t) => t.length >= 2);
|
|
39
46
|
}
|
|
40
47
|
|
|
48
|
+
const ID_SPLIT = new RegExp("(" + ID_IN_WORDS.source + ")");
|
|
49
|
+
|
|
41
50
|
/**
|
|
42
51
|
* `text` with every whole word that is one of `words` (any case) in a
|
|
43
|
-
* `<mark>` (M5, 2026-09-30)
|
|
44
|
-
*
|
|
52
|
+
* `<mark>` (M5, 2026-09-30), and every memory id in it drawn as a link to that
|
|
53
|
+
* memory (`memory-marks.js#idMark`, 2026-10-09; `quiet`: drawn, not linked).
|
|
54
|
+
* Escaped piece by piece BEFORE marking, so nothing unescaped reaches the page
|
|
55
|
+
* and no mark lands inside an entity or an id.
|
|
45
56
|
*/
|
|
46
|
-
export function marked(text, words) {
|
|
57
|
+
export function marked(text, words, quiet) {
|
|
47
58
|
const want = new Set((words || []).map((w) => String(w).toLowerCase()));
|
|
48
|
-
|
|
49
|
-
|
|
59
|
+
return String(text || "").split(ID_SPLIT)
|
|
60
|
+
.map((piece, j) => (j % 2 === 1 ? idMark(piece, quiet) : markWords(piece, want)))
|
|
61
|
+
.join("");
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function markWords(text, want) {
|
|
65
|
+
if (want.size === 0) return esc(text);
|
|
66
|
+
return text.split(/([A-Za-z0-9]+)/)
|
|
50
67
|
.map((part, i) => (i % 2 === 1 && want.has(part.toLowerCase()) ? "<mark>" + esc(part) + "</mark>" : esc(part)))
|
|
51
68
|
.join("");
|
|
52
69
|
}
|
|
@@ -71,10 +88,12 @@ export function withoutRowDate(title, text, date) {
|
|
|
71
88
|
|
|
72
89
|
/**
|
|
73
90
|
* `r`: { id, title, text, confidential, kind, date, dateFrom, core, protected,
|
|
74
|
-
* journal, feelings, archived, hold, versions, schemaRole }. `
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
91
|
+
* journal, feelings, archived, hold, versions, schemaRole }. With no `id` the
|
|
92
|
+
* row opens nothing (a session's moments in an Ask by meaning); with no
|
|
93
|
+
* `kind` it carries no kind tag (an answer that does not say). `opts.under`
|
|
94
|
+
* is markup, already escaped, drawn under the words (an Ask answer's who said
|
|
95
|
+
* it, when, and what it was before); `opts.mark` (words) marks where a
|
|
96
|
+
* search's words appear.
|
|
78
97
|
*/
|
|
79
98
|
export function memRow(r, opts = {}) {
|
|
80
99
|
// The date on the right is not said again in the words beside it.
|
|
@@ -87,19 +106,16 @@ export function memRow(r, opts = {}) {
|
|
|
87
106
|
const k = kindOf(r.kind);
|
|
88
107
|
const kindWords = k.label + (r.schemaRole ? " · " + r.schemaRole : "");
|
|
89
108
|
// A plain fact is the quiet default: no tag. A journal chapter says so in its title.
|
|
90
|
-
const kindTag = (r.kind === "fact" && !r.schemaRole) || r.journal ? ""
|
|
109
|
+
const kindTag = !r.kind || (r.kind === "fact" && !r.schemaRole) || r.journal ? ""
|
|
91
110
|
: '<span class="mkind" title="' + esc(kindWords) + '">' + kindMark(r.kind, false) + '<span class="klabel">' + esc(kindWords) + "</span></span>";
|
|
92
|
-
const held =
|
|
93
|
-
: r.hold === "fading" ? '<span class="mfading" title="unless it is used, I may put it away within my next two weeks of use">fading</span>' : "";
|
|
111
|
+
const held = r.hold === "fading" ? '<span class="mfading" title="unless it is used, I may put it away within my next two weeks of use">fading</span>' : "";
|
|
94
112
|
const date = r.date && !r.journal
|
|
95
113
|
? '<span class="mdate" title="' + esc(DATE_WORDS[r.dateFrom] || "") + '">' + esc(dateOr(r.date)) + "</span>" : "";
|
|
96
114
|
const put = r.archived
|
|
97
115
|
? '<div class="mwhy">put away: ' + esc(r.archived) + (r.versions > 1 ? " · " + r.versions + " versions" : "") + "</div>" : "";
|
|
98
|
-
const id = esc(r.id);
|
|
99
|
-
return '<div class="mrow
|
|
100
|
-
'<div class="mmain">' + main +
|
|
101
|
-
(opts.from ? '<button type="button" class="mchapter" data-open="' + esc(opts.from.id) + '">' + esc(opts.from.words) + "</button>" : "") +
|
|
102
|
-
put + "</div>" +
|
|
116
|
+
const open = r.id ? ' click" role="button" tabindex="0" data-id="' + esc(r.id) + '"' : '"';
|
|
117
|
+
return '<div class="mrow' + (r.archived ? " arch" : "") + open + ">" +
|
|
118
|
+
'<div class="mmain">' + main + (opts.under || "") + put + "</div>" +
|
|
103
119
|
'<div class="mside">' +
|
|
104
120
|
'<span class="mline">' + held + date + "</span>" +
|
|
105
121
|
'<span class="mline">' + badges({ ...r, journal: false }) + feelingDots(r.feelings, true) + kindTag + "</span>" +
|