counterparts 0.3.2 → 0.3.3

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.
Files changed (66) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/package.json +1 -1
  3. package/src/adapters/claude-code/NOTES.md +12 -0
  4. package/src/adapters/claude-code/bin/hook.ts +85 -22
  5. package/src/adapters/claude-code/config.ts +7 -0
  6. package/src/adapters/claude-code/doctor.ts +20 -4
  7. package/src/adapters/claude-code/hooks.ts +157 -6
  8. package/src/adapters/claude-code/index.ts +3 -0
  9. package/src/adapters/cli/commands.ts +11 -0
  10. package/src/adapters/cli/mechanisms.ts +46 -21
  11. package/src/adapters/dashboard/registries.ts +4 -0
  12. package/src/adapters/dashboard/web/README.md +19 -11
  13. package/src/adapters/dashboard/web/flow.ts +2 -0
  14. package/src/adapters/dashboard/web/mechanisms/emotional/index.js +9 -5
  15. package/src/adapters/dashboard/web/mechanisms/prospective/index.js +6 -3
  16. package/src/adapters/dashboard/web/narrate.ts +8 -0
  17. package/src/adapters/dashboard/web/pages/health/sections/checks.js +17 -1
  18. package/src/adapters/dashboard/web/pages/self/index.js +55 -16
  19. package/src/adapters/dashboard/web/pages/self/sections/journal.js +75 -19
  20. package/src/adapters/dashboard/web/pages/self/sections/page.js +108 -65
  21. package/src/adapters/dashboard/web/pages/self/sections/settling.js +94 -99
  22. package/src/adapters/dashboard/web/pages/self/sections/wake.js +31 -15
  23. package/src/adapters/dashboard/web/pages/self/self.css +119 -59
  24. package/src/adapters/dashboard/web/pages/self/state.js +23 -0
  25. package/src/adapters/dashboard/web/pages/self/tips.js +50 -0
  26. package/src/adapters/dashboard/web/shared/memory-modal.js +9 -0
  27. package/src/adapters/dashboard/web/views/mechanisms.ts +85 -14
  28. package/src/adapters/dashboard/web/views/memory.ts +15 -1
  29. package/src/adapters/dashboard/web/views/mind.ts +130 -6
  30. package/src/adapters/feelings-line.ts +74 -0
  31. package/src/adapters/fired.ts +78 -18
  32. package/src/adapters/mcp/CONTRACT.md +8 -0
  33. package/src/adapters/mcp/NOTES.md +45 -0
  34. package/src/adapters/mcp/server.ts +165 -6
  35. package/src/adapters/mcp/tools.ts +51 -4
  36. package/src/core/bridge.ts +21 -16
  37. package/src/core/counterpart.ts +309 -6
  38. package/src/core/encode/CONTRACT.md +7 -1
  39. package/src/core/feelings-wheel.ts +171 -13
  40. package/src/core/mint.ts +9 -0
  41. package/src/core/physics/CONTRACT.md +43 -0
  42. package/src/core/physics/NOTES.md +94 -0
  43. package/src/core/physics/index.ts +98 -6
  44. package/src/core/prospective/CONTRACT.md +35 -6
  45. package/src/core/prospective/INTERFACE-GAPS.md +10 -5
  46. package/src/core/prospective/NOTES.md +175 -4
  47. package/src/core/prospective/derive.ts +32 -3
  48. package/src/core/prospective/index.ts +362 -39
  49. package/src/core/prospective/tunables.ts +18 -1
  50. package/src/core/prospective/windows.ts +104 -46
  51. package/src/core/recall/CONTRACT.md +28 -0
  52. package/src/core/recall/NOTES.md +39 -0
  53. package/src/core/recall/activate.ts +32 -5
  54. package/src/core/recall/gate.ts +7 -1
  55. package/src/core/recall/index.ts +19 -0
  56. package/src/core/recall/mood.ts +106 -0
  57. package/src/core/recall/tunables.ts +26 -0
  58. package/src/core/remember/index.ts +1 -0
  59. package/src/core/remember/proposals.ts +86 -3
  60. package/src/core/self/identity.ts +20 -1
  61. package/src/core/store/CONTRACT.md +9 -2
  62. package/src/core/store/NOTES.md +20 -0
  63. package/src/core/store/feelings.ts +23 -6
  64. package/src/core/store/index.ts +107 -10
  65. package/src/core/store/operational.ts +15 -1
  66. package/src/core/types.ts +9 -0
@@ -44,7 +44,7 @@
44
44
  * No body text, no question text, no note text ever reaches an event.
45
45
  */
46
46
  import { MCP_RECALL_EVENT } from "../../core/counterpart.js";
47
- import { localDate } from "../../core/time.js";
47
+ import { localDate, parseCalendarDate, todayIn } from "../../core/time.js";
48
48
  import type { ChapterResult, Counterpart, DepositResult } from "../../core/counterpart.js";
49
49
  import type { SemanticSource } from "../../core/recall/index.js";
50
50
  import { AUTHOR_DIMENSIONS } from "../../core/remember/index.js";
@@ -112,7 +112,7 @@ export const SERVER_NAME = "counterparts";
112
112
  * host decides whether to trust what follows. Read from a constant rather than
113
113
  * from disk so the server opens no file to answer its first message.
114
114
  */
115
- export const SERVER_VERSION = "0.3.2";
115
+ export const SERVER_VERSION = "0.3.3";
116
116
 
117
117
  /**
118
118
  * THE ONE LINE EVERY TOOL ANSWERS WITH when the store on disk is a schema AHEAD
@@ -922,6 +922,11 @@ export class McpServer {
922
922
  detail: "relevance, emotional and predictive are each a number from 0 to 1.",
923
923
  });
924
924
  }
925
+ // THE REMINDER DATE AND HOW IT COMES BACK (2026-09-26) — checked before
926
+ // anything is captured, so an unreadable one is a refusal that says which
927
+ // shapes ARE readable rather than a note that lands without its date.
928
+ const dated = readReminder(args);
929
+ if ("refused" in dated) return this.refuse("note", dated.refused, { detail: dated.detail });
925
930
  const session = this.session ?? "mcp";
926
931
 
927
932
  const captured = this.counterpart.captureJot({ session, scope: this.scope, text });
@@ -939,6 +944,7 @@ export class McpServer {
939
944
  if (typeof args["updates"] === "string") draft["updates"] = args["updates"];
940
945
  if (salience !== undefined) draft["claimed"] = salience;
941
946
  if (Object.keys(dims).length > 0) draft["salience"] = dims;
947
+ Object.assign(draft, dated.fields);
942
948
 
943
949
  const model = this.sessionModel();
944
950
  const feelings = readFeelings(args["feelings"]);
@@ -951,7 +957,10 @@ export class McpServer {
951
957
  ownSpanHash,
952
958
  ...(model === undefined ? {} : { model }),
953
959
  });
954
- return this.depositResult("note", deposit, this.recordFeelings(deposit, feelings.inputs, model));
960
+ return this.depositResult("note", deposit, {
961
+ ...this.recordFeelings(deposit, feelings.inputs, model),
962
+ ...reminderEcho(deposit, dated, this.today()),
963
+ });
955
964
  }
956
965
 
957
966
  /**
@@ -1496,10 +1505,12 @@ export class McpServer {
1496
1505
  ): Promise<{ outcomes: Record<string, unknown>[]; deposited: number; duplicates: number; entries: Record<string, unknown>[] }> {
1497
1506
  const entries: Record<string, unknown>[] = [];
1498
1507
  const feelingsOf: FeelingsRead[] = [];
1508
+ const datedOf: ReminderRead[] = [];
1499
1509
  for (const item of raw) {
1500
1510
  if (item === null || typeof item !== "object" || Array.isArray(item)) {
1501
1511
  entries.push({ content: "" });
1502
1512
  feelingsOf.push({ inputs: [] });
1513
+ datedOf.push({ fields: {}, remindIgnored: false });
1503
1514
  continue;
1504
1515
  }
1505
1516
  const rec = item as Record<string, unknown>;
@@ -1513,6 +1524,11 @@ export class McpServer {
1513
1524
  // one entry as malformed, which is this tool's per-entry isolation rule.
1514
1525
  const entryDims = readDimensions(rec) ?? pickDimensions(rec);
1515
1526
  if (Object.keys(entryDims).length > 0) draft["salience"] = entryDims;
1527
+ // The reminder date (2026-09-26), per entry: an unreadable one refuses
1528
+ // THIS entry below, by name, and its siblings still land.
1529
+ const dated = readReminder(rec);
1530
+ if (!("refused" in dated)) Object.assign(draft, dated.fields);
1531
+ datedOf.push(dated);
1516
1532
  entries.push(draft);
1517
1533
  feelingsOf.push(readFeelings(rec["feelings"]));
1518
1534
  }
@@ -1529,6 +1545,11 @@ export class McpServer {
1529
1545
  outcomes.push({ stored: false, reason: "feelings-malformed", detail: feelings.refused });
1530
1546
  continue;
1531
1547
  }
1548
+ const dated = datedOf[n] ?? { fields: {}, remindIgnored: false };
1549
+ if ("refused" in dated) {
1550
+ outcomes.push({ stored: false, reason: dated.refused, detail: dated.detail });
1551
+ continue;
1552
+ }
1532
1553
  let result: DepositResult;
1533
1554
  try {
1534
1555
  result = await this.counterpart.submitSessionEnd(draft, {
@@ -1557,6 +1578,7 @@ export class McpServer {
1557
1578
  ...(malformed === null ? {} : { malformed }),
1558
1579
  ...(malformed === "KIND_UNKNOWN" ? { kinds: [...MEMORY_KINDS] } : {}),
1559
1580
  ...this.recordFeelings(result, feelings.inputs, model),
1581
+ ...reminderEcho(result, dated, this.today()),
1560
1582
  });
1561
1583
  }
1562
1584
  return { outcomes, deposited, duplicates, entries };
@@ -1946,6 +1968,12 @@ export class McpServer {
1946
1968
  return claimed;
1947
1969
  }
1948
1970
 
1971
+ /** The person's calendar day now, in the store's zone (docs/time.md rule 3),
1972
+ * off this server's injectable clock — what a past `eventDate` is told against. */
1973
+ private today(): string {
1974
+ return todayIn(this.counterpart.store.zone(), this.nowFn());
1975
+ }
1976
+
1949
1977
  /**
1950
1978
  * The model the hooks last saw answer in THIS server's bound session — the
1951
1979
  * relay a chapter's model takes (self NOTES §24), used since 2026-09-25 for
@@ -2097,18 +2125,36 @@ export class McpServer {
2097
2125
  }
2098
2126
  try {
2099
2127
  const added = this.counterpart.addFeelings(deposit.memoryId, inputs, model === undefined ? {} : { model });
2128
+ // Two kinds of notice (emotion part A): a word kept as the writer's own
2129
+ // (`other`), with a suggestion ONLY when a wheel word is genuinely close;
2130
+ // and a word read as a wheel word (`readAs`: exposed → vulnerable).
2131
+ const kept = added.notices.filter((n) => n.readAs === undefined);
2132
+ const read = added.notices.filter((n) => n.readAs !== undefined);
2100
2133
  return {
2101
2134
  feelings: {
2102
2135
  stored: added.ids.length,
2103
- ...(added.notices.length === 0
2136
+ ...(kept.length === 0
2104
2137
  ? {}
2105
2138
  : {
2106
- other: added.notices.map((n) => ({
2139
+ other: kept.map((n) => ({
2107
2140
  index: n.index,
2108
2141
  word: n.word,
2109
2142
  core: n.core,
2110
2143
  closest: n.closest,
2111
- note: `"${n.word}" is not on the feelings wheel, so it was kept as other. If you meant one of these, say it that way next time: ${n.closest.join(", ")}.`,
2144
+ note:
2145
+ n.closest.length === 0
2146
+ ? `"${n.word}" is not on the feelings wheel, so it was kept as your own word.`
2147
+ : `"${n.word}" is not on the feelings wheel, so it was kept as your own word. If you meant ${n.closest.join(" or ")}, say it that way next time.`,
2148
+ })),
2149
+ }),
2150
+ ...(read.length === 0
2151
+ ? {}
2152
+ : {
2153
+ readAs: read.map((n) => ({
2154
+ index: n.index,
2155
+ word: n.word,
2156
+ as: n.readAs,
2157
+ note: `"${n.word}" was stored as ${String(n.readAs)}.`,
2112
2158
  })),
2113
2159
  }),
2114
2160
  },
@@ -2249,6 +2295,119 @@ function pickDimensions(rec: Record<string, unknown>): Record<string, unknown> {
2249
2295
  return out;
2250
2296
  }
2251
2297
 
2298
+ // ── a reminder date on a tool call (2026-09-26) ─────────────────────────────
2299
+
2300
+ /** What `readReminder` hands back: the draft fields, and what to say about them. */
2301
+ type ReminderRead =
2302
+ | {
2303
+ /** `eventDate: null` is the explicit drop (a revision's cancel); `remind`
2304
+ * rides only when it was SENT, so a revision can tell a left-out mode
2305
+ * from a stated one (review N7). */
2306
+ readonly fields: { eventDate?: string | null; remind?: "plain" | "quiet" };
2307
+ /** `remind` was sent with no `eventDate`: there is nothing for it to shape
2308
+ * — unless the memory it revises carries a date (`DepositResult.reminder`). */
2309
+ readonly remindIgnored: boolean;
2310
+ }
2311
+ | { readonly refused: "event-date-unreadable" | "remind-unknown"; readonly detail: string };
2312
+
2313
+ const EVENT_DATE_SHAPES =
2314
+ 'A day "2026-10-15", a month "2026-10", a year "2026", or a range of two days "2026-10-20..2026-10-31" (first day first). Convert "late October" or "before the 15th" into one of those yourself.';
2315
+
2316
+ const YEAR_ALONE_NOTE =
2317
+ "A year alone names no day, so this will not come back on its own. Give a month, a day or a range if it should.";
2318
+
2319
+ /** Review N8 (2026-09-26): a past date is accepted and kept, and SAID — so a
2320
+ * wrong year can be caught by the model that wrote it. */
2321
+ const DATE_PASSED_NOTE = "That date has already passed — it won't come back as a reminder.";
2322
+
2323
+ /**
2324
+ * `eventDate` and `remind` off a `note` or a `session_end` entry, CHECKED
2325
+ * before anything mints: the date by `time.ts` (the one module that reads
2326
+ * dates), `remind` against its two words. Never a date parsed from prose — the
2327
+ * model writes the field (owner decision 2026-09-25/26).
2328
+ */
2329
+ function readReminder(rec: Record<string, unknown>): ReminderRead {
2330
+ const rawDate = rec["eventDate"];
2331
+ const rawRemind = rec["remind"];
2332
+ if (rawRemind !== undefined && rawRemind !== null && rawRemind !== "plain" && rawRemind !== "quiet") {
2333
+ return { refused: "remind-unknown", detail: '`remind` is "plain" or "quiet".' };
2334
+ }
2335
+ const sent: { remind?: "plain" | "quiet" } =
2336
+ rawRemind === "plain" || rawRemind === "quiet" ? { remind: rawRemind } : {};
2337
+ if (rawDate === undefined || rawDate === null) {
2338
+ return {
2339
+ fields: { ...(rawDate === null ? { eventDate: null } : {}), ...sent },
2340
+ remindIgnored: sent.remind !== undefined,
2341
+ };
2342
+ }
2343
+ const read = typeof rawDate === "string" ? parseCalendarDate(rawDate) : null;
2344
+ if (read === null) {
2345
+ return {
2346
+ refused: "event-date-unreadable",
2347
+ detail: `\`eventDate\` ${typeof rawDate === "string" ? `"${rawDate.slice(0, 64)}"` : "(not text)"} is not a date this can read. ${EVENT_DATE_SHAPES}`,
2348
+ };
2349
+ }
2350
+ return { fields: { eventDate: read.text, ...sent }, remindIgnored: false };
2351
+ }
2352
+
2353
+ /** What to say about a recorded date: that it has already passed (its last day
2354
+ * is before the person's today — `time.ts#todayIn` in the store's zone), or
2355
+ * that a year alone never comes back. One note, the passed one first. */
2356
+ function dateNote(eventDate: string, today: string): Record<string, unknown> {
2357
+ const read = parseCalendarDate(eventDate);
2358
+ if (read === null) return {};
2359
+ if (read.last < today) return { note: DATE_PASSED_NOTE };
2360
+ return read.precision === "year" ? { note: YEAR_ALONE_NOTE } : {};
2361
+ }
2362
+
2363
+ /** The reminder half of a deposit's answer: what was RECORDED — after a
2364
+ * revision's carry-over, not merely what was sent — or why `remind` had
2365
+ * nothing to shape. Nothing when neither field was sent or nothing minted. */
2366
+ function reminderEcho(deposit: DepositResult, dated: ReminderRead, today: string): Record<string, unknown> {
2367
+ if ("refused" in dated || !deposit.deposited) return {};
2368
+ const carried = deposit.reminder;
2369
+ if (carried !== undefined) {
2370
+ const unmoved = carried.moved ? {} : { unmoved: true };
2371
+ if (carried.eventDate === null) {
2372
+ return {
2373
+ reminder: {
2374
+ cleared: true,
2375
+ from: carried.from,
2376
+ ...unmoved,
2377
+ note: "The date is dropped: neither this memory nor the one it revises will come back as a reminder.",
2378
+ },
2379
+ };
2380
+ }
2381
+ return {
2382
+ reminder: {
2383
+ eventDate: carried.eventDate,
2384
+ remind: carried.remind ?? "quiet",
2385
+ from: carried.from,
2386
+ ...(carried.inherited.length > 0 ? { carriedOver: [...carried.inherited] } : {}),
2387
+ ...unmoved,
2388
+ ...dateNote(carried.eventDate, today),
2389
+ },
2390
+ };
2391
+ }
2392
+ const { eventDate, remind } = dated.fields;
2393
+ if (typeof eventDate === "string") {
2394
+ return { reminder: { eventDate, remind: remind ?? "quiet", ...dateNote(eventDate, today) } };
2395
+ }
2396
+ // A cancel that found nothing to cancel is SAID (review of #247): silence
2397
+ // here read as success while a reminder the model meant to drop kept coming.
2398
+ if (eventDate === null && (deposit.proposal?.updates?.declared ?? null) !== null) {
2399
+ return {
2400
+ reminder: {
2401
+ cleared: false,
2402
+ note: "No date was dropped: `updates` did not reach a dated memory by its id, so nothing was cancelled.",
2403
+ },
2404
+ };
2405
+ }
2406
+ return dated.remindIgnored
2407
+ ? { reminder: { ignored: "remind", note: "`remind` shapes how a date comes back; with no `eventDate` there was nothing to shape." } }
2408
+ : {};
2409
+ }
2410
+
2252
2411
  // ── feelings on a tool call (schema v7) ─────────────────────────────────────
2253
2412
 
2254
2413
  type FeelingsRead = { inputs: FeelingInput[] } | { refused: string };
@@ -117,13 +117,14 @@ export interface ToolSpec {
117
117
  /**
118
118
  * `feelings` on a `note` or a `session_end` entry (schema v7, 2026-09-25): one
119
119
  * object per feeling, spelled on the feelings wheel (`core/feelings-wheel.ts`).
120
- * Stored beside the memory and read by nothing yet — salience still comes from
121
- * `emotional`.
120
+ * Since emotion part A (2026-09-26) they weigh: the strongest one, or
121
+ * `emotional` if that is stronger, raises the memory and slows its fading
122
+ * (physics §5.10), and a recent one sets the mood recall matches (recall G18).
122
123
  */
123
124
  const FEELINGS_PROPERTY = {
124
125
  type: "array",
125
126
  description:
126
- "Optional: the feelings in this moment, one object each — mixed feelings are several, and yours and the owner's go side by side. Stored beside the memory; they change nothing about how it is held yet.",
127
+ "Optional: the feelings in this moment, one object each — mixed feelings are several, and yours and the owner's go side by side. The strongest feeling on a memory holds it higher and slows its fading; memories that felt the way someone feels now come to mind more easily.",
127
128
  items: {
128
129
  type: "object",
129
130
  properties: {
@@ -132,7 +133,7 @@ const FEELINGS_PROPERTY = {
132
133
  emotion: {
133
134
  type: "string",
134
135
  description:
135
- "The specific feeling on the wheel under that core (e.g. hopeful, anxious, frustrated), or your own word — kept as other, and the reply names the nearest wheel words.",
136
+ "The specific feeling on the wheel under that core (e.g. hopeful, anxious, frustrated, grateful, curious, relieved, fond, moved), or your own word, kept as yours. Blends go under either core: tender and wistful (sad or happy), bittersweet (happy or sad), sheepish (fear or sad).",
136
137
  },
137
138
  strength: { type: "number", minimum: 0, maximum: 1 },
138
139
  carried_by: {
@@ -154,6 +155,46 @@ const FEELINGS_PROPERTY = {
154
155
  },
155
156
  } as const;
156
157
 
158
+ /**
159
+ * `eventDate` and `remind` on a `note` or a `session_end` entry (2026-09-26,
160
+ * owner decisions: an explicit date field only, never a date read out of the
161
+ * text; plain or quiet, default quiet, stored in the memory's meta).
162
+ */
163
+ const EVENT_DATE_PROPERTY = {
164
+ type: ["string", "null"],
165
+ description:
166
+ 'Optional: the calendar date this memory is ABOUT, when that is a future date — so it comes back around then. Write it yourself, in one of four shapes: a day "2026-10-15", a month "2026-10", a range of two days "2026-10-20..2026-10-31" (that is how to say "late October"), or a year "2026" (a year alone never comes back on its own). Say "before the 15th" as the day or a range ending on it. Leave it out when nothing is dated; a date written only in the text is never read. An unreadable date is refused, and nothing is stored. Revising a dated memory by its id with `updates`: its date and remind carry over unless you send new ones; send null to drop the date (done, cancelled).',
167
+ } as const;
168
+
169
+ const REMIND_PROPERTY = {
170
+ type: "string",
171
+ enum: ["plain", "quiet"],
172
+ description:
173
+ 'Optional, with eventDate: how it comes back. "plain" when you judge it genuinely matters for remembering to DO something — a real deadline, an important date — or when the person says it matters ("don\'t let me forget to pay taxes before Oct 15th!"): on the day it is said plainly, once, to them in their terminal and to you in context (a month or range: its first day and its last). Otherwise "quiet", the default: it can surface as a footnote around the date, at most twice — giving it a date is itself what makes it eligible, whatever its salience.',
174
+ } as const;
175
+
176
+ /** The two privileges `note` and `session_end` share for the date fields. */
177
+ const DATE_PRIVILEGES: readonly Privilege[] = [
178
+ {
179
+ claim:
180
+ "`eventDate` is a FIELD, never read out of your text: it is checked by the one module that reads dates, and an unreadable one is refused by name before anything is stored.",
181
+ mechanizedBy:
182
+ "src/adapters/mcp/server.ts#readReminder -> src/core/remember/proposals.ts#intake (EVENT_DATE_UNREADABLE) -> src/core/time.ts#parseCalendarDate",
183
+ },
184
+ {
185
+ claim:
186
+ 'A "plain" reminder is said at most once per beat — on its day, or on the first and the last day of a month or range — and never under observer stance; a "quiet" one is only ever a cue, capped at the footnote tier and spent at most twice per window.',
187
+ mechanizedBy:
188
+ "src/core/prospective/index.ts#Prospective.plainDue + claimPlain (dedupKey latch) + fire (FIRES_PER_WINDOW) -> src/core/counterpart.ts#recallForTurn",
189
+ },
190
+ {
191
+ claim:
192
+ "A revision OWNS the reminder: revising a dated memory by its id carries its date and remind over unless you send your own (null drops the date), and the old memory's date is cleared — kept in its version — so one reminder never comes back twice. A later revision of the older id still finds the reminder where it moved, and what was already said or used for the same window still counts.",
193
+ mechanizedBy:
194
+ "src/core/counterpart.ts#carryReminder + reminderHolder + moveReminder -> src/core/store/index.ts#revise (eventDate: null, meta.reminderMovedTo) -> src/core/prospective/index.ts#lineage (meta.reminderFrom)",
195
+ },
196
+ ];
197
+
157
198
  /**
158
199
  * `note`'s privileges. Each one is a sentence v1 would have shipped in a prompt
159
200
  * and left unenforced; each one names the file that enforces it here.
@@ -214,6 +255,7 @@ const NOTE: ToolSpec = {
214
255
  mechanizedBy:
215
256
  "src/core/remember/updates.ts#resolveUpdates -> src/core/mint.ts#mintProposal (UPDATES_META_KEY)",
216
257
  },
258
+ ...DATE_PRIVILEGES,
217
259
  {
218
260
  claim: "Under observer stance nothing is written and the refusal says so.",
219
261
  mechanizedBy: "src/core/store/index.ts#mutate (observer stand-down)",
@@ -259,6 +301,8 @@ const NOTE: ToolSpec = {
259
301
  description: "What sort of thing this is about. Defaults to fact.",
260
302
  },
261
303
  title: { type: "string", description: "Optional short handle for the memory." },
304
+ eventDate: EVENT_DATE_PROPERTY,
305
+ remind: REMIND_PROPERTY,
262
306
  feelings: FEELINGS_PROPERTY,
263
307
  },
264
308
  required: ["text"],
@@ -443,6 +487,7 @@ const SESSION_END: ToolSpec = {
443
487
  claim: "Credentials are redacted and empty entries are refused, per entry, without failing the batch.",
444
488
  mechanizedBy: "src/core/encode/secrets.ts + src/adapters/mcp/server.ts#sessionEndTool (per-entry isolation)",
445
489
  },
490
+ ...DATE_PRIVILEGES,
446
491
  {
447
492
  claim: "Under observer stance nothing is written and the refusal says so.",
448
493
  mechanizedBy: "src/core/store/index.ts#mutate (observer stand-down)",
@@ -541,6 +586,8 @@ const SESSION_END: ToolSpec = {
541
586
  description:
542
587
  "The id or handle of a memory this revises, if it revises one. A field — never written into `content`.",
543
588
  },
589
+ eventDate: EVENT_DATE_PROPERTY,
590
+ remind: REMIND_PROPERTY,
544
591
  feelings: FEELINGS_PROPERTY,
545
592
  },
546
593
  required: ["content"],
@@ -186,27 +186,32 @@ function verdictFor(
186
186
  }
187
187
 
188
188
  /**
189
- * All three author dimensions or nothing — a partial claim is not padded.
189
+ * The author's dimensions, as given — a missing one reads 0, exactly as
190
+ * `mint.ts` has always stored it.
190
191
  *
191
- * NAMED GAP (2026-09-04): the obvious source for `emotional` when the author
192
- * gave none is the stated-emotion gate, and it cannot supply one.
193
- * `encode/emotion.ts#gateEmotion` yields a `DurableFeeling` of `{type, subject}`
194
- * — a feeling that SURVIVED, with no magnitude on it anywhere — so there is no
195
- * number to read across, and manufacturing one from "a feeling was stated" is
196
- * retro-typing emotion, which encode §3 forbids outright. Left open rather than
197
- * approximated; the MCP adapter's contract carries the same gap as its §7.4.
192
+ * CHANGED 2026-09-26 (emotion part A, owner decision 1: "stop dropping a lone
193
+ * `emotional` score"). This used to be all three or nothing, so a note that
194
+ * said only `emotional: 0.9` reached the battery with no dimensions at all —
195
+ * while `mint.ts`, reading the same draft, stored the 0.9 on the row. The two
196
+ * readings of one note disagreed; now they agree. Padding a missing dimension
197
+ * with 0 claims nothing the author did not say: 0 is what an unsaid dimension
198
+ * has always been on the row. The SWEEP's intake (`counterpart.ts#applySweep`)
199
+ * keeps its all-three rule on purpose — a retelling author's lone number is not
200
+ * testimony, and it would now lift height and slow decay (physics §5.10).
201
+ *
202
+ * Still NOT manufactured from a stated feeling: `encode/emotion.ts#gateEmotion`
203
+ * yields `{type, subject}` with no magnitude, and inventing one from "a feeling
204
+ * was stated" is retro-typing emotion, which encode §3 forbids. Recorded
205
+ * FEELINGS (the `feelings` table) carry their own strength and reach physics
206
+ * beside the row (`feelingPeak`), not through this function.
198
207
  */
199
208
  function dimensionsFrom(
200
209
  s: Partial<{ relevance: number; emotional: number; predictive: number }>,
201
210
  ): ClaimedDimensions | null {
202
- if (
203
- typeof s.relevance === "number" &&
204
- typeof s.emotional === "number" &&
205
- typeof s.predictive === "number"
206
- ) {
207
- return { relevance: s.relevance, emotional: s.emotional, predictive: s.predictive };
208
- }
209
- return null;
211
+ const given = [s.relevance, s.emotional, s.predictive].some((v) => typeof v === "number");
212
+ if (!given) return null;
213
+ const n = (v: number | undefined): number => (typeof v === "number" ? v : 0);
214
+ return { relevance: n(s.relevance), emotional: n(s.emotional), predictive: n(s.predictive) };
210
215
  }
211
216
 
212
217
  /**