notesoup 0.61.0 → 0.62.0

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 (200) hide show
  1. package/.agents/plugins/marketplace.json +15 -0
  2. package/README.md +14 -11
  3. package/dist/plugins/antigravity/src/cli.d.ts +1 -0
  4. package/dist/plugins/antigravity/src/cli.js +23 -0
  5. package/dist/plugins/antigravity/src/hooks.d.ts +18 -0
  6. package/dist/plugins/antigravity/src/hooks.js +53 -0
  7. package/dist/plugins/antigravity/src/identity.d.ts +26 -0
  8. package/dist/plugins/antigravity/src/identity.js +129 -0
  9. package/dist/plugins/claude/src/helper.js +2 -1
  10. package/dist/plugins/codex/src/hooks.js +1 -0
  11. package/dist/plugins/codex/src/identity.d.ts +6 -1
  12. package/dist/plugins/codex/src/identity.js +13 -1
  13. package/dist/plugins/codex/src/mcp.d.ts +35 -7
  14. package/dist/plugins/codex/src/mcp.js +26 -88
  15. package/dist/plugins/codex/src/text.js +3 -3
  16. package/dist/plugins/dsh/tools.js +8 -4
  17. package/dist/plugins/mcp/operations.d.ts +15 -0
  18. package/dist/plugins/mcp/operations.js +43 -0
  19. package/dist/plugins/mcp/server.d.ts +14 -0
  20. package/dist/plugins/mcp/server.js +13 -0
  21. package/dist/plugins/pi/budget.d.ts +1 -1
  22. package/dist/plugins/pi/budget.js +3 -2
  23. package/dist/plugins/pi/entries.d.ts +1 -0
  24. package/dist/plugins/pi/entries.js +1 -0
  25. package/dist/plugins/pi/history-tools.js +2 -1
  26. package/dist/plugins/pi/history.js +18 -1
  27. package/dist/plugins/pi/notes/tools.js +7 -3
  28. package/dist/plugins/pi/render.d.ts +7 -1
  29. package/dist/plugins/pi/render.js +2 -2
  30. package/dist/plugins/pi/reset/lifecycle.d.ts +1 -1
  31. package/dist/plugins/pi/reset/lifecycle.js +8 -9
  32. package/dist/plugins/pi/runtime.js +102 -61
  33. package/dist/plugins/pi/tool-result.js +7 -7
  34. package/dist/plugins/pi/window.d.ts +33 -3
  35. package/dist/plugins/pi/window.js +209 -9
  36. package/dist/src/boot/render.js +18 -15
  37. package/dist/src/boot/text.d.ts +3 -1
  38. package/dist/src/boot/text.js +22 -20
  39. package/dist/src/budget/text.d.ts +2 -2
  40. package/dist/src/budget/text.js +13 -13
  41. package/dist/src/history/claude.d.ts +2 -0
  42. package/dist/src/history/claude.js +46 -0
  43. package/dist/src/history/codex-transcript.js +7 -5
  44. package/dist/src/history/codex.js +3 -0
  45. package/dist/src/history/corpus.d.ts +28 -1
  46. package/dist/src/history/corpus.js +40 -0
  47. package/dist/src/history/history.d.ts +37 -46
  48. package/dist/src/history/history.js +21 -40
  49. package/dist/src/history/local.js +67 -32
  50. package/dist/src/history/pi.d.ts +2 -1
  51. package/dist/src/history/pi.js +122 -48
  52. package/dist/src/history/prefilter.js +76 -19
  53. package/dist/src/history/query.d.ts +28 -49
  54. package/dist/src/history/query.js +83 -68
  55. package/dist/src/history/summary-cache.d.ts +8 -1
  56. package/dist/src/history/summary-cache.js +138 -12
  57. package/dist/src/index.d.ts +1 -1
  58. package/dist/src/index.js +1 -1
  59. package/dist/src/notes/errors.d.ts +1 -1
  60. package/dist/src/notes/frontmatter.d.ts +0 -2
  61. package/dist/src/notes/frontmatter.js +0 -2
  62. package/dist/src/notes/index.d.ts +1 -1
  63. package/dist/src/notes/index.js +1 -1
  64. package/dist/src/notes/policy.d.ts +15 -1
  65. package/dist/src/notes/policy.js +46 -5
  66. package/dist/src/notes/store.d.ts +12 -0
  67. package/dist/src/notes/store.js +16 -20
  68. package/dist/src/text-match.d.ts +10 -1
  69. package/dist/src/text-match.js +42 -3
  70. package/dist/src/tools/dream.d.ts +22 -93
  71. package/dist/src/tools/dream.js +30 -27
  72. package/dist/src/tools/history.d.ts +33 -26
  73. package/dist/src/tools/history.js +257 -163
  74. package/dist/src/tools/notes.d.ts +51 -163
  75. package/dist/src/tools/notes.js +146 -100
  76. package/dist/src/tools/output.d.ts +2 -1
  77. package/dist/src/tools/output.js +2 -1
  78. package/dist/src/tools/result.d.ts +4 -7
  79. package/dist/src/tools/result.js +8 -9
  80. package/dist/src/tools/schema.d.ts +4 -1
  81. package/dist/src/tools/schema.js +25 -1
  82. package/dist/test/agent-loop.test.js +198 -16
  83. package/dist/test/antigravity-live.test.d.ts +1 -0
  84. package/dist/test/antigravity-live.test.js +142 -0
  85. package/dist/test/antigravity-plugin.test.d.ts +1 -0
  86. package/dist/test/antigravity-plugin.test.js +101 -0
  87. package/dist/test/boot.integration.test.js +133 -14
  88. package/dist/test/claude-history.test.js +14 -13
  89. package/dist/test/claude-mod.test.js +9 -6
  90. package/dist/test/codex-history.test.js +15 -3
  91. package/dist/test/codex-plugin.test.js +76 -38
  92. package/dist/test/dependencies.test.js +7 -3
  93. package/dist/test/dream-skill.test.js +3 -3
  94. package/dist/test/dream-tools.test.js +101 -56
  95. package/dist/test/dsh.test.js +34 -19
  96. package/dist/test/helpers/dependency-graph.js +2 -2
  97. package/dist/test/helpers/extension.d.ts +65 -2
  98. package/dist/test/helpers/extension.js +72 -3
  99. package/dist/test/history-corpus.test.js +79 -77
  100. package/dist/test/history-summary-cache.test.js +97 -9
  101. package/dist/test/history.integration.test.js +234 -168
  102. package/dist/test/host-neutral.test.js +69 -19
  103. package/dist/test/marker.test.js +1 -1
  104. package/dist/test/note-policy.test.js +96 -77
  105. package/dist/test/notes.integration.test.js +212 -94
  106. package/dist/test/notes.test.js +184 -113
  107. package/dist/test/pi-render.test.js +20 -12
  108. package/dist/test/project-namespace.test.js +3 -2
  109. package/dist/test/reset-lifecycle.test.js +2 -2
  110. package/docs/antigravity.md +44 -0
  111. package/docs/architecture.md +6 -4
  112. package/docs/claude-code-mod.md +2 -2
  113. package/docs/codex.md +36 -38
  114. package/docs/dsh.md +3 -3
  115. package/docs/history-sessions.md +28 -50
  116. package/docs/notes-library.md +4 -4
  117. package/docs/skills.md +3 -3
  118. package/docs/tool-results.md +47 -28
  119. package/package.json +3 -2
  120. package/playbook.md +1 -1
  121. package/plugins/antigravity/dist/antigravity/notesoup.js +26886 -0
  122. package/plugins/antigravity/hooks.json +7 -0
  123. package/plugins/antigravity/mcp_config.json +8 -0
  124. package/plugins/antigravity/plugin.json +6 -0
  125. package/plugins/antigravity/src/cli.ts +22 -0
  126. package/plugins/antigravity/src/hooks.ts +51 -0
  127. package/plugins/antigravity/src/identity.ts +127 -0
  128. package/plugins/claude/.claude-plugin/plugin.json +1 -1
  129. package/plugins/claude/dist/claude/helper.js +1059 -534
  130. package/plugins/claude/hooks/register.ts +2 -2
  131. package/plugins/claude/playbook.md +1 -1
  132. package/plugins/claude/skills/dream/SKILL.md +1 -1
  133. package/plugins/claude/skills/notesoup/SKILL.md +92 -0
  134. package/plugins/claude/src/helper.ts +2 -1
  135. package/plugins/codex/.codex-plugin/plugin.json +8 -0
  136. package/plugins/codex/.mcp.json +11 -0
  137. package/plugins/codex/README.md +5 -21
  138. package/plugins/codex/dist/codex/notesoup.js +18480 -17946
  139. package/plugins/codex/src/hooks.ts +1 -0
  140. package/plugins/codex/src/identity.ts +14 -1
  141. package/plugins/codex/src/mcp.ts +28 -98
  142. package/plugins/codex/src/text.ts +3 -3
  143. package/plugins/dsh/tools.ts +8 -4
  144. package/plugins/mcp/operations.ts +50 -0
  145. package/plugins/mcp/server.ts +23 -0
  146. package/plugins/paseo/README.md +5 -10
  147. package/plugins/paseo/client/brain-empty-card.tsx +3 -3
  148. package/plugins/paseo/client/markdown.tsx +50 -38
  149. package/plugins/paseo/client/notes-op-card.tsx +12 -9
  150. package/plugins/paseo/client/paper-card.tsx +6 -5
  151. package/plugins/paseo/client/paper-palette.ts +2 -9
  152. package/plugins/paseo/client/sticky-card.tsx +2 -2
  153. package/plugins/paseo/client/tool-result.ts +7 -14
  154. package/plugins/paseo/package-lock.json +3406 -0
  155. package/plugins/paseo/package.json +1 -0
  156. package/plugins/paseo/test/markdown-core.test.ts +73 -66
  157. package/plugins/pi/budget.ts +3 -3
  158. package/plugins/pi/entries.ts +1 -0
  159. package/plugins/pi/history-tools.ts +2 -1
  160. package/plugins/pi/history.ts +30 -1
  161. package/plugins/pi/notes/tools.ts +7 -3
  162. package/plugins/pi/render.ts +6 -6
  163. package/plugins/pi/reset/lifecycle.ts +9 -10
  164. package/plugins/pi/runtime.ts +96 -60
  165. package/plugins/pi/tool-result.ts +8 -8
  166. package/plugins/pi/window.ts +198 -9
  167. package/skills/dream/SKILL.md +1 -1
  168. package/skills/notesoup/SKILL.md +92 -0
  169. package/src/boot/render.ts +18 -15
  170. package/src/boot/text.ts +23 -19
  171. package/src/budget/text.ts +13 -13
  172. package/src/history/claude.ts +41 -0
  173. package/src/history/codex-transcript.ts +6 -4
  174. package/src/history/codex.ts +2 -0
  175. package/src/history/corpus.ts +51 -2
  176. package/src/history/history.ts +35 -44
  177. package/src/history/local.ts +67 -27
  178. package/src/history/pi.ts +113 -35
  179. package/src/history/prefilter.ts +73 -15
  180. package/src/history/query.ts +93 -73
  181. package/src/history/summary-cache.ts +142 -17
  182. package/src/index.ts +1 -1
  183. package/src/notes/errors.ts +1 -1
  184. package/src/notes/frontmatter.ts +0 -3
  185. package/src/notes/index.ts +1 -1
  186. package/src/notes/policy.ts +44 -5
  187. package/src/notes/store.ts +17 -20
  188. package/src/text-match.ts +46 -4
  189. package/src/tools/dream.ts +29 -31
  190. package/src/tools/history.ts +249 -142
  191. package/src/tools/notes.ts +145 -113
  192. package/src/tools/output.ts +2 -1
  193. package/src/tools/result.ts +12 -11
  194. package/src/tools/schema.ts +24 -1
  195. package/plugins/claude/skills/memory/SKILL.md +0 -69
  196. package/plugins/codex/mcp.json +0 -10
  197. package/plugins/codex/plugin.json +0 -6
  198. package/plugins/paseo/client/markdown-core.tsx +0 -189
  199. package/plugins/paseo/client/typography.ts +0 -24
  200. package/skills/memory/SKILL.md +0 -69
@@ -7,12 +7,12 @@ import { Type } from "typebox";
7
7
  import { Check } from "typebox/value";
8
8
  import { loadNotesSnapshot } from "../src/boot/snapshot.js";
9
9
  import { renderBootBlock } from "../src/boot/render.js";
10
- import { HistoryPageItemSchema, HistoryRoleSchema, projectHistory } from "../src/history/history.js";
10
+ import { HistoryRoleSchema, ToolCallStatusSchema, projectHistory } from "../src/history/history.js";
11
11
  import { createNotesStore } from "../src/notes/store.js";
12
12
  import { notesWrite, notesUpdate, notesRead } from "../src/tools/notes.js";
13
13
  import { notesToolContext } from "../src/tools/notes-context.js";
14
- import { historyList, historyRead } from "../src/tools/history.js";
15
- import { historyRoles } from "../src/tools/schema.js";
14
+ import { historyList, historySearch, historyRead } from "../src/tools/history.js";
15
+ import { historyRoles, paramProblem, parseIsoTimestamp, stringEnum } from "../src/tools/schema.js";
16
16
  import { MAX_READ_WINDOW_CHARS, TOOL_OUTPUT_MAX_BYTES } from "../src/tools/output.js";
17
17
  import { ERROR_MESSAGE_MAX_CHARS, failure, success } from "../src/result.js";
18
18
  import { fitsResult, resultSchema, wireResult, readTextWindow, renderOutcome, renderTextWindow, structuredBytes, } from "../src/tools/result.js";
@@ -33,7 +33,7 @@ function refusal(result) {
33
33
  }
34
34
  const makeData = (window) => ({ header: "identity, metadata, cursors, and a footer".repeat(4), window });
35
35
  const renderData = (result) => result.ok ? `${result.data.header}\n${renderTextWindow(result.data.window)}` : renderOutcome(result, () => "");
36
- const read = (text, offset, limit) => readTextWindow(text, offset, limit, makeData, renderData);
36
+ const read = (text, offset, limit) => readTextWindow(text, offset, limit, makeData, renderData, (result) => fitsResult(result, renderData));
37
37
  test("shared boot uses only explicit identity, loader, captured time and logical tool bindings", async (t) => {
38
38
  const notesIdentity = identity(t);
39
39
  const openedAt = 1_700_000_000_000;
@@ -50,19 +50,19 @@ test("shared boot uses only explicit identity, loader, captured time and logical
50
50
  const block = { agentName: notesIdentity.agent, modelName: notesIdentity.model, tree: { trunk: "test", windows: [{ shortName: "root", isCurrent: false }, { shortName: "next", isCurrent: true }] }, notes: snapshot, tools };
51
51
  const rendered = renderBootBlock(block);
52
52
  assert.equal(renderBootBlock(block), rendered);
53
- assert.ok(rendered.includes(" checkpoint.md · 1m ago — 😀"), "an index entry is the locator plus the note's own first line");
53
+ assert.ok(rendered.includes("\ncheckpoint.md · 1m ago — 😀"), "an index entry is the locator plus the note's own first line, without indentation");
54
54
  assert.ok(rendered.includes("Try `memo_list` again"));
55
55
  assert.equal(/notes_\*|notes_list|history_\*|history_list|history_read|get_context_remaining|empty_brain/.test(rendered), false);
56
56
  });
57
57
  test("the shared result module bounds both surfaces and resumes by offset", () => {
58
58
  const text = `${"a".repeat(120)}😀${"b".repeat(30)}`;
59
59
  const chars = Array.from(text);
60
- // The requested count stops the read, and the footer says only where to continue.
60
+ // The requested count stops the read, and the footer states delivered/total and where to continue.
61
61
  const first = data(read(text, 0, 10));
62
62
  assert.equal(first.window.text, chars.slice(0, 10).join(""));
63
63
  assert.equal(first.window.next_offset_chars, 10);
64
64
  assert.equal(first.window.total_chars, chars.length);
65
- assert.match(renderData(success(first)), /\[truncated; continue at offset_chars=10\]$/);
65
+ assert.match(renderData(success(first)), /\[truncated at 10\/151 chars; continue at offset_chars=10\]$/);
66
66
  // Concatenating windows by their cursors reproduces the source, marker-free.
67
67
  const second = data(read(text, first.window.next_offset_chars ?? 0, 10));
68
68
  assert.equal(`${first.window.text}${second.window.text}`, chars.slice(0, 20).join(""));
@@ -81,7 +81,7 @@ test("the shared result module bounds both surfaces and resumes by offset", () =
81
81
  assert.ok(Buffer.byteLength(renderData(success(capped)), "utf8") <= TOOL_OUTPUT_MAX_BYTES, "the model text fits");
82
82
  assert.ok(Buffer.byteLength(JSON.stringify(wireResult(success(capped))), "utf8") <= TOOL_OUTPUT_MAX_BYTES, "the structured outcome fits");
83
83
  assert.equal(capped.window.text, huge.slice(0, cappedEnd), "the delivered slice is a verbatim prefix");
84
- assert.match(renderData(success(capped)), new RegExp(`\\[truncated; continue at offset_chars=${cappedEnd}\\]$`));
84
+ assert.match(renderData(success(capped)), new RegExp(`\\[truncated at ${cappedEnd}/${capped.window.total_chars} chars; continue at offset_chars=${cappedEnd}\\]$`));
85
85
  // Code points, not UTF-16 units.
86
86
  const emoji = data(read("😀😀😀", 1, 1));
87
87
  assert.equal(emoji.window.text, "😀");
@@ -248,7 +248,7 @@ test("shared history operations read typed events through the addresses the adap
248
248
  assert.match(full.text, /needle output/, "the document carries the result");
249
249
  assert.equal(full.next_offset_chars, null);
250
250
  // A query offset addresses that same document, so reading from it resumes inside the result.
251
- const searched = data(await historyList.execute({ query: "NEEDLE", roles: ["tool"] }, projection));
251
+ const searched = data(await historySearch.execute({ query: "NEEDLE", roles: ["tool"] }, projection));
252
252
  assert.equal(searched.items.length, 1);
253
253
  const hit = searched.items[0];
254
254
  if ("folded" in hit)
@@ -261,19 +261,69 @@ test("shared history operations read typed events through the addresses the adap
261
261
  assert.match(refusal(await historyRead.execute({ seq: 9_999 }, projection)).message, /9,?999/, "an unknown address is refused by name");
262
262
  assert.equal(data(await historyRead.execute({ seq: 3 }, projection)).seq, 2, "a paired result address resolves to its call event");
263
263
  });
264
- test("one role schema declares the four public roles for the page item, the read payload, and the role filter", () => {
265
- const read = (role) => ({
266
- seq: 1, role, created_at: null,
267
- text: "", total_chars: 0, next_offset_chars: null,
268
- });
269
- assert.equal(HistoryPageItemSchema.properties.role, HistoryRoleSchema, "the page item reuses the authoritative role schema");
270
- assert.deepEqual(historyRoles().items, HistoryRoleSchema, "the role filter carries the authoritative role schema");
264
+ test("ISO 8601 parameters without an offset mean host local time", () => {
265
+ // Date and clock fields without an offset are read on the host clock, like the notes store does.
266
+ assert.equal(parseIsoTimestamp("2026-11-27"), new Date(2026, 10, 27).getTime());
267
+ assert.equal(parseIsoTimestamp("2026-11-27T13:40"), new Date(2026, 10, 27, 13, 40).getTime());
268
+ assert.equal(parseIsoTimestamp("2026-11-27T13:40:05"), new Date(2026, 10, 27, 13, 40, 5).getTime());
269
+ assert.equal(parseIsoTimestamp("2026-11-27T13:40:05.2509"), new Date(2026, 10, 27, 13, 40, 5, 250).getTime(), "fractional seconds truncate to milliseconds");
270
+ assert.equal(parseIsoTimestamp("0099-01-01"), new Date("0099-01-01T00:00:00").getTime(), "years below 100 keep their literal value");
271
+ // Explicit offsets fix the instant.
272
+ assert.equal(parseIsoTimestamp("2026-11-27T13:40:05Z"), Date.UTC(2026, 10, 27, 13, 40, 5));
273
+ assert.equal(parseIsoTimestamp("2026-11-27T13:40:05+08:00"), Date.UTC(2026, 10, 27, 5, 40, 5));
274
+ assert.equal(parseIsoTimestamp("2026-11-27T13:40:05-0530"), Date.UTC(2026, 10, 27, 19, 10, 5));
275
+ for (const invalid of ["2026-02-30", "2026-13-01", "2026-11-27T25:00", "2026-11-27T13:60", "2026-11-27T13:40:60", "yesterday", "2026-11-27 13:40", "2026-11-27T13", "2026-11-27T13:40:05 Z", ""]) {
276
+ assert.equal(parseIsoTimestamp(invalid), undefined, `${JSON.stringify(invalid)} is refused`);
277
+ }
278
+ });
279
+ test("tool literal enums serialize as string enums and validate their values", () => {
280
+ const values = ["a", "b"];
281
+ const example = stringEnum(values, { description: "example", type: "number" });
282
+ const valid = "a";
283
+ // @ts-expect-error literal unions must not widen to arbitrary strings
284
+ const invalid = "c";
285
+ assert.equal(valid, "a");
286
+ assert.equal(invalid, "c");
287
+ const serialized = (schema) => JSON.parse(JSON.stringify(schema));
288
+ assert.equal(serialized(example).type, "string");
289
+ assert.equal(serialized(example).description, "example");
290
+ const origins = ["user", "self", "external"];
291
+ const roles = ["user", "assistant", "tool", "context"];
292
+ const shapes = [
293
+ [serialized(notesWrite.parameters).properties.origin, origins],
294
+ [serialized(notesUpdate.parameters).properties.origin, origins],
295
+ [serialized(notesRead.outputSchema).anyOf[0].properties.metadata.properties.origin, origins],
296
+ [serialized(historyList.parameters).properties.roles.items, roles],
297
+ [serialized(historySearch.parameters).properties.roles.items, roles],
298
+ [serialized(ToolCallStatusSchema), ["ok", "error", "unfinished"]],
299
+ ];
300
+ for (const [schema, expected] of shapes) {
301
+ assert.equal(schema.type, "string");
302
+ assert.deepEqual(schema.enum, expected);
303
+ assert.equal(schema.anyOf, undefined);
304
+ }
305
+ for (const [schema, allowed] of [[notesWrite.parameters.properties.origin, origins], [HistoryRoleSchema, roles], [ToolCallStatusSchema, ["ok", "error", "unfinished"]]]) {
306
+ for (const value of allowed)
307
+ assert.equal(Check(schema, value), true);
308
+ for (const value of ["invalid", 1, true, {}, null]) {
309
+ assert.equal(Check(schema, value), false, `${JSON.stringify(value)} is rejected`);
310
+ assert.notEqual(paramProblem(schema, value), "unrecognized shape");
311
+ }
312
+ }
313
+ for (const [parameters, base] of [[notesWrite.parameters, { address: "a", content: "b" }], [notesUpdate.parameters, { address: "a" }]]) {
314
+ for (const value of ["invalid", 1, true, {}, null]) {
315
+ const params = { ...base, origin: value };
316
+ assert.equal(Check(parameters.properties.origin, value), false);
317
+ assert.match(paramProblem(parameters, params), /origin/);
318
+ }
319
+ }
320
+ });
321
+ test("the role filter uses the four public history roles", () => {
322
+ assert.deepEqual(historyRoles().items, HistoryRoleSchema);
271
323
  for (const role of ["user", "assistant", "tool", "context"]) {
272
324
  assert.equal(Check(HistoryRoleSchema, role), true, `${role} is a public role`);
273
- assert.equal(Check(historyRead.outputSchema, read(role)), true, `history_read accepts ${role}`);
274
325
  }
275
- assert.equal(Check(HistoryRoleSchema, "developer"), false, "a role outside the four is refused");
276
- assert.equal(Check(historyRead.outputSchema, read("developer")), false, "history_read refuses a role outside the four");
326
+ assert.equal(Check(HistoryRoleSchema, "developer"), false);
277
327
  });
278
328
  test("history paging bounds are the schema's, and a zero limit still pages one event", async () => {
279
329
  const items = Array.from({ length: 3 }, (_, index) => ({ seq: index + 1, windowId: "root", role: "user", text: `message-${index}` }));
@@ -10,7 +10,7 @@ test.beforeEach(env.beforeEach);
10
10
  test.afterEach(env.afterEach);
11
11
  test.after(env.dispose);
12
12
  function beforeAgentStart(captured, ctx) {
13
- return runHandlers(captured, "before_agent_start", { type: "before_agent_start", systemPromptOptions: { sections: {} } }, ctx);
13
+ return runHandlers(captured, "before_agent_start", { type: "before_agent_start", systemPromptOptions: { sections: {}, skills: [] } }, ctx);
14
14
  }
15
15
  test("marker stamps its own seq at run start once the interval is reached, never mid-turn", async () => {
16
16
  const sessionManager = managerWithMessages(99);
@@ -37,8 +37,8 @@ test("frontmatter policy round-trips without materializing defaults; arbitrary e
37
37
  await notes.write("MAP", "index");
38
38
  const defaults = (await notes.read("MAP")).meta;
39
39
  assert.equal(defaults.pinned, undefined);
40
- assert.deepEqual(effectiveNotePolicy(defaults, "MAP.md"), { pinned: false, budget: 4096, readonly: false });
41
- assert.deepEqual(effectiveNotePolicy(defaults, "CHEATSHEET.md"), { pinned: true, budget: 2048, readonly: false });
40
+ assert.deepEqual(effectiveNotePolicy(defaults, "MAP.md"), { pinned: false, budget: 8192, readonly: false });
41
+ assert.deepEqual(effectiveNotePolicy(defaults, "CHEATSHEET.md"), { pinned: true, budget: 4096, readonly: false });
42
42
  assert.equal(effectiveNotePolicy(defaults, "nested/MAP.md").pinned, false);
43
43
  writeFileSync(file("MAP.md"), readFileSync(file("MAP.md"), "utf8").replace("\n---\n\n", "\npinned: false\nbudget: 3000\nreadonly: true\ncustom: {\"nested\":[1,\"two\"]}\n---\n\n"));
44
44
  const meta = (await notes.read("MAP")).meta;
@@ -51,15 +51,15 @@ test("frontmatter policy round-trips without materializing defaults; arbitrary e
51
51
  assert.deepEqual(persisted.meta.custom, { nested: [1, "two"] });
52
52
  assert.equal(persisted.body, "new index");
53
53
  });
54
- test("default budgets distinguish root index pages from ordinary notes, independently of pinning", async (t) => {
54
+ test("default budgets distinguish root CHEATSHEET from ordinary notes, independently of pinning", async (t) => {
55
55
  const { context, notes } = fixture(t);
56
56
  for (const [address, budget, pinned] of [
57
- ["MAP", 4096, undefined],
58
- ["CHEATSHEET", 2048, undefined],
59
- ["ordinary", 4096, undefined],
60
- ["custom-pin", 4096, true],
61
- ["nested/MAP", 4096, undefined],
62
- ["nested/CHEATSHEET", 4096, undefined],
57
+ ["MAP", 8192, undefined],
58
+ ["CHEATSHEET", 4096, undefined],
59
+ ["ordinary", 8192, undefined],
60
+ ["custom-pin", 8192, true],
61
+ ["nested/MAP", 8192, undefined],
62
+ ["nested/CHEATSHEET", 8192, undefined],
63
63
  ]) {
64
64
  const written = data(await notesWrite.execute({ address, content: "body", pinned }, context));
65
65
  assert.equal(written.budget, budget, address);
@@ -69,48 +69,49 @@ test("default budgets distinguish root index pages from ordinary notes, independ
69
69
  await notes.write("ordinary", "another replacement");
70
70
  assert.equal(data(await notesRead.execute({ address: "ordinary" }, context)).metadata.budget, 1234);
71
71
  });
72
- test("tools set policy, validate values, and visibly report effective policy and code-point warnings", async (t) => {
72
+ test("tools reject budget overrides, enforce UTF-8 byte warnings, and wrap warnings in <notesoup:warning>", async (t) => {
73
73
  const { context, notes, file } = fixture(t);
74
74
  for (const tool of [notesWrite, notesUpdate]) {
75
75
  const required = tool === notesWrite ? { address: "x", content: "body" } : { address: "x" };
76
- assert.equal(Check(tool.parameters, { ...required, pinned: false, budget: 2, readonly: true }), true);
77
- for (const invalid of [{ pinned: "false" }, { readonly: 1 }, { budget: 0 }, { budget: 1.5 }, { budget: Number.MAX_SAFE_INTEGER + 1 }]) {
76
+ assert.equal(Check(tool.parameters, { ...required, pinned: false, readonly: true }), true);
77
+ for (const invalid of [{ pinned: "false" }, { readonly: 1 }, { budget: 100 }, { budget: 0 }]) {
78
78
  assert.equal(Check(tool.parameters, { ...required, ...invalid }), false);
79
79
  }
80
80
  }
81
- const written = await notesWrite.execute({ address: "custom", content: "😀".repeat(2), budget: 2, pinned: true, readonly: true }, context);
82
- assert.equal(Check(notesWrite.outputSchema, wireResult(written)), true);
83
- assert.deepEqual(data(written).warnings, [], "2 astral characters are within budget");
84
- assert.equal(data(written).budget, 2);
85
- assert.match(notesWrite.render(written), /pinned true \| budget 2 \| readonly true/);
86
- const updated = await notesUpdate.execute({ address: "custom", readonly: false, edits: [{ oldText: "😀".repeat(2), newText: "😀".repeat(3) }] }, context);
87
- assert.equal(Check(notesUpdate.outputSchema, wireResult(updated)), true);
81
+ // Frontmatter / store budget override still works: 2 astral chars = 8 UTF-8 bytes.
82
+ await notes.write("custom", "😀".repeat(2), { budget: 8, pinned: true, readonly: true });
83
+ const written = await notesWrite.execute({ address: "custom", content: "😀".repeat(2), pinned: true, readonly: false }, context);
84
+ assert.equal("outputSchema" in notesWrite, false);
85
+ assert.deepEqual(data(written).warnings, [], "8 UTF-8 bytes fit within budget 8");
86
+ assert.equal(data(written).budget, 8);
87
+ assert.match(notesWrite.render(written), /^overwrote custom\.md \| pinned \| budget 8$/);
88
+ const updated = await notesUpdate.execute({ address: "custom", edits: [{ oldText: "😀".repeat(2), newText: "😀".repeat(3) }] }, context);
89
+ assert.equal("outputSchema" in notesUpdate, false);
88
90
  assert.equal(data(updated).warnings.length, 1);
89
- assert.match(notesUpdate.render(updated), /3 Unicode code points, over budget 2 — boil it down\./);
91
+ assert.match(notesUpdate.render(updated), /<notesoup:warning>note body is 12 bytes \(budget 8\); boot truncates it to budget — trim, split, or unpin\.<\/notesoup:warning>/);
90
92
  assert.equal((await notes.read("custom")).body, "😀".repeat(3), "over budget saves the entire body");
91
93
  const read = await notesRead.execute({ address: "custom", max_chars: 10 }, context);
92
94
  assert.equal(Check(notesRead.outputSchema, wireResult(read)), true);
93
- assert.deepEqual({ pinned: data(read).metadata.pinned, budget: data(read).metadata.budget, readonly: data(read).metadata.readonly }, { pinned: true, budget: 2, readonly: false });
94
- assert.match(notesRead.render(read), /pinned true \| budget 2 \| readonly false/);
95
- assert.match(notesRead.render(read), /Warning: note body is 3/);
95
+ assert.deepEqual({ pinned: data(read).metadata.pinned, budget: data(read).metadata.budget, readonly: data(read).metadata.readonly }, { pinned: true, budget: 8, readonly: false });
96
+ assert.match(notesRead.render(read), /pinned true \| budget 8 \| readonly false/);
97
+ assert.match(notesRead.render(read), /<notesoup:warning>note body is 12 bytes \(budget 8\)/);
96
98
  const list = await notesList.execute({}, context);
97
- assert.equal(Check(notesList.outputSchema, wireResult(list)), true);
99
+ assert.equal("outputSchema" in notesList, false);
98
100
  assert.equal(data(list).files[0].pinned, true);
99
- assert.match(notesList.render(list), /pinned true \| budget 2 \| readonly false/);
100
- assert.match(notesList.render(list), /Warning: note body is 3/);
101
- const search = await notesList.execute({ query: "😀", max_matches_per_file: 1 }, context);
102
- assert.equal(Check(notesList.outputSchema, wireResult(search)), true);
103
- assert.equal(data(search).files[0].budget, 2);
104
- assert.match(notesList.render(search), /pinned true \| budget 2 \| readonly false/);
105
- assert.match(notesList.render(search), /Warning: note body is 3/);
106
- const overflow = await notesWrite.execute({ address: "overflow", content: "😀".repeat(3), budget: 2 }, context);
107
- for (const warnings of [data(overflow).warnings, data(read).warnings]) {
108
- assert.ok(warnings.length > 0);
109
- assert.ok(warnings.every(warning => warning.endsWith("— boil it down.")));
110
- }
111
- const larger = await notesUpdate.execute({ address: "custom", budget: 4, pinned: false }, context);
112
- assert.deepEqual(data(larger).warnings, []);
113
- assert.equal(data(larger).change_kind, "metadata");
101
+ assert.match(notesList.render(list), /custom\.md \| pinned \| budget 8 \| updated/);
102
+ assert.doesNotMatch(notesList.render(list), /readonly false/);
103
+ assert.match(notesList.render(list), /<notesoup:warning>note body is 12 bytes \(budget 8\)/);
104
+ const search = await notesList.execute({ query: "😀", max_matches_per_note: 1 }, context);
105
+ assert.equal(data(search).files[0].budget, 8);
106
+ assert.match(notesList.render(search), /custom\.md \| pinned \| budget 8 \| updated/);
107
+ assert.doesNotMatch(notesList.render(search), /readonly false/);
108
+ assert.match(notesList.render(search), /<notesoup:warning>note body is 12 bytes \(budget 8\)/);
109
+ await notes.write("unpinned-over", "x".repeat(8193));
110
+ const overflow = await notesRead.execute({ address: "unpinned-over" }, context);
111
+ assert.match(notesRead.render(overflow), /<notesoup:warning>note body is 8193 bytes \(budget 8192\); trim or split it\.<\/notesoup:warning>/);
112
+ const larger = await notes.update("custom", undefined, { budget: 16, pinned: false });
113
+ assert.deepEqual(larger.warnings, []);
114
+ assert.equal(larger.change.kind, "metadata");
114
115
  const before = readFileSync(file("custom.md"), "utf8");
115
116
  // Runtime JavaScript callers bypass schemas; the real store still validates before saving.
116
117
  for (const invalid of [{ pinned: "false" }, { budget: null }, { readonly: "yes" }]) {
@@ -118,7 +119,7 @@ test("tools set policy, validate values, and visibly report effective policy and
118
119
  await assert.rejects(() => notes.update("custom", undefined, invalid), refused("invalid_policy"));
119
120
  assert.equal(readFileSync(file("custom.md"), "utf8"), before);
120
121
  }
121
- writeFileSync(file("custom.md"), before.replace("budget: 4", "budget: -1"));
122
+ writeFileSync(file("custom.md"), before.replace("budget: 16", "budget: -1"));
122
123
  const badFrontmatter = await notesRead.execute({ address: "custom" }, context);
123
124
  assert.equal(badFrontmatter.ok, false);
124
125
  if (!badFrontmatter.ok)
@@ -209,7 +210,7 @@ test("moves resolve absent policy at the new path, preserving explicit false/tru
209
210
  const { notes, file } = fixture(t);
210
211
  await notes.write("CHEATSHEET", "default");
211
212
  await notes.rename("CHEATSHEET", "ordinary");
212
- assert.deepEqual(effectiveNotePolicy((await notes.read("ordinary")).meta, "ordinary.md"), { pinned: false, budget: 4096, readonly: false });
213
+ assert.deepEqual(effectiveNotePolicy((await notes.read("ordinary")).meta, "ordinary.md"), { pinned: false, budget: 8192, readonly: false });
213
214
  await notes.rename("ordinary", "CHEATSHEET");
214
215
  assert.equal(effectiveNotePolicy((await notes.read("CHEATSHEET")).meta, "CHEATSHEET.md").pinned, true);
215
216
  assert.equal(parseNote(readFileSync(file("CHEATSHEET.md"), "utf8")).meta.pinned, undefined);
@@ -225,29 +226,37 @@ test("moves resolve absent policy at the new path, preserving explicit false/tru
225
226
  await notes.update("candidate", undefined, { renameTo: "CHEATSHEET", pinned: false });
226
227
  assert.equal(effectiveNotePolicy((await notes.read("CHEATSHEET")).meta, "CHEATSHEET.md").pinned, false);
227
228
  });
228
- test("boot uses metadata pins, full bodies, explicit false and visible legacy over-cap omissions", async (t) => {
229
- const { identity, notes, file } = fixture(t);
230
- await notes.write("CHEATSHEET", "default rules");
229
+ test("boot uses metadata pins, truncates over-budget pins at byte budget with outside warning, and names legacy over-cap omissions", async (t) => {
230
+ const { identity, notes, file, context } = fixture(t);
231
+ const body = "# Default rules\n\n- first rule\n - nested rule\n\n```ts\n const value = 1;\n```";
232
+ await notes.write("CHEATSHEET", body);
231
233
  await notes.write("MAP", "# Unpinned map\nMAP_NOT_INJECTED", { pinned: false });
232
- await notes.write("custom", "😀".repeat(5) + "TAIL_IS_HERE", { pinned: true, budget: 4 });
234
+ // 5 emojis (20 bytes) + 12 ASCII chars = 32 bytes; budget 10 bytes fits 2 emojis (8 bytes, 2 chars).
235
+ await notes.write("custom", "😀".repeat(5) + "TAIL_IS_HERE", { pinned: true, budget: 10 });
233
236
  await notes.write("nested/MAP", "# Nested map\nNESTED_NOT_INJECTED");
234
237
  await notes.write("roomy", "R".repeat(3000), { pinned: true, budget: 3000 });
235
238
  let rendered = await boot(identity);
236
- assert.ok(rendered.indexOf("CHEATSHEET.md\n\n default rules") < rendered.indexOf("custom.md\n\n"));
237
- assert.ok(rendered.includes("😀".repeat(5) + "TAIL_IS_HERE"));
238
- assert.match(rendered, /Warning: note body is 17 Unicode code points, over budget 4/);
239
+ const pinned = `── CHEATSHEET.md ──\n\n${body}\n\n── end of note ──`;
240
+ assert.ok(rendered.includes(pinned), "the pinned note retains its exact Markdown indentation");
241
+ assert.ok(rendered.indexOf(pinned) < rendered.indexOf("── custom.md ──"));
242
+ const customWarning = "<notesoup:warning>note body is 32 bytes (budget 10); boot truncates it to budget — trim, split, or unpin.</notesoup:warning>";
243
+ const customBlock = `${customWarning}\n── custom.md ──\n\n${"😀".repeat(2)}\n\n[truncated at 2/17; offset_chars=2]\n\n── end of note ──`;
244
+ assert.ok(rendered.includes(customBlock), "warning sits outside the note frame and body truncates cleanly on a code-point boundary");
245
+ assert.equal(rendered.includes("TAIL_IS_HERE"), false, "overflow tail is truncated in boot");
246
+ const resumed = data(await notesRead.execute({ address: "custom", offset_chars: 2 }, context));
247
+ assert.equal(resumed.text, "😀".repeat(3) + "TAIL_IS_HERE", "offset_chars resumes cleanly from the exact truncated code point");
239
248
  assert.ok(rendered.includes("R".repeat(3000)));
240
249
  assert.equal(rendered.includes("MAP_NOT_INJECTED"), false);
241
250
  assert.equal(rendered.includes("NESTED_NOT_INJECTED"), false);
242
251
  assert.match(rendered, /MAP.md ·/); // explicit false gets a normal recent seat
243
252
  await notes.write("a", "body a", { pinned: true });
244
- await notes.write("b", "body b", { pinned: true });
253
+ await notes.write("b", "😀", { pinned: true, budget: 2 }); // first char exceeds budget
245
254
  await notes.write("z", "OMITTED_PIN_BODY");
246
255
  writeFileSync(file("z.md"), readFileSync(file("z.md"), "utf8").replace("\n---\n\n", "\npinned: true\n---\n\n"));
247
256
  rendered = await boot(identity);
248
- assert.match(rendered, /Warning: only 5 pinned notes per notebook are injected; omitted pins: z.md/);
257
+ assert.ok(rendered.includes("── b.md ──\n\n[truncated at 0/1; offset_chars=0]\n\n── end of note ──"), "zero-char cut emits clean marker without leading blank lines");
258
+ assert.match(rendered, /<notesoup:warning>only 5 pinned notes per notebook are injected; omitted pins: z.md/);
249
259
  assert.equal(rendered.includes("OMITTED_PIN_BODY"), false);
250
- assert.ok(rendered.includes("TAIL_IS_HERE"));
251
260
  });
252
261
  test("MAP.md is an ordinary note by default while CHEATSHEET.md stays the one default pin", async (t) => {
253
262
  const { notes, context } = fixture(t);
@@ -255,16 +264,16 @@ test("MAP.md is an ordinary note by default while CHEATSHEET.md stays the one de
255
264
  await notes.write("CHEATSHEET", "rules");
256
265
  const map = (await notes.read("MAP")).meta;
257
266
  const cheatsheet = (await notes.read("CHEATSHEET")).meta;
258
- assert.deepEqual(effectiveNotePolicy(map, "MAP.md"), { pinned: false, budget: 4096, readonly: false });
259
- assert.deepEqual(effectiveNotePolicy(cheatsheet, "CHEATSHEET.md"), { pinned: true, budget: 2048, readonly: false });
267
+ assert.deepEqual(effectiveNotePolicy(map, "MAP.md"), { pinned: false, budget: 8192, readonly: false });
268
+ assert.deepEqual(effectiveNotePolicy(cheatsheet, "CHEATSHEET.md"), { pinned: true, budget: 4096, readonly: false });
260
269
  await notes.rename("MAP", "moved-map");
261
- assert.deepEqual(effectiveNotePolicy((await notes.read("moved-map")).meta, "moved-map.md"), { pinned: false, budget: 4096, readonly: false });
270
+ assert.deepEqual(effectiveNotePolicy((await notes.read("moved-map")).meta, "moved-map.md"), { pinned: false, budget: 8192, readonly: false });
262
271
  const listed = data(await notesList.execute({}, context));
263
272
  assert.equal(listed.files.find(file => file.address === "CHEATSHEET.md")?.pinned, true);
264
273
  assert.equal(listed.files.find(file => file.address === "moved-map.md")?.pinned, false, "MAP.md keeps no special role after a move");
265
274
  });
266
275
  test("description normalizes to one line, persists, renders in read and list, and clears on empty", async (t) => {
267
- const { notes, file, context } = fixture(t);
276
+ const { identity, notes, file, context } = fixture(t);
268
277
  const written = await notesWrite.execute({ address: "described", content: "body", description: " first\n\tsecond third " }, context);
269
278
  assert.equal(written.ok, true);
270
279
  assert.equal((await notes.read("described")).meta.description, "first second third");
@@ -288,23 +297,33 @@ test("description normalizes to one line, persists, renders in read and list, an
288
297
  await notesUpdate.execute({ address: "described", description: " \n\t " }, context);
289
298
  assert.equal((await notes.read("described")).meta.description, undefined);
290
299
  assert.equal(/^description:/m.test(readFileSync(file("described.md"), "utf8")), false);
291
- // Exactly 160 code points is accepted; 161 is refused naming the count and the limit.
292
- await notes.write("max", "body", { description: "😀".repeat(160) });
300
+ // Exactly 160 code points saves cleanly; over 160 saves with a warning and truncates in boot.
301
+ const exact = await notesWrite.execute({ address: "max", content: "body", description: "😀".repeat(160) }, context);
302
+ assert.equal(exact.ok, true);
303
+ assert.deepEqual(data(exact).warnings, [], "160 astral code points fit without warning");
293
304
  assert.equal((await notes.read("max")).meta.description, "😀".repeat(160), "160 astral code points fit");
294
305
  const tooLong = "😀".repeat(161);
295
- for (const attempt of [
296
- () => notesWrite.execute({ address: "too-long", content: "body", description: tooLong }, context),
297
- () => notesUpdate.execute({ address: "described", description: tooLong }, context),
298
- ]) {
299
- const refusal = await attempt();
300
- assert.equal(refusal.ok, false);
301
- if (!refusal.ok) {
302
- assert.equal(refusal.error.code, "invalid_description");
303
- assert.match(refusal.error.message, /161 characters; limit is 160/);
304
- }
305
- }
306
- assert.equal((await notes.read("too-long")), undefined, "a refused write saves nothing");
307
- assert.equal((await notes.read("described")).meta.description, undefined, "a refused update leaves the note alone");
306
+ const writtenLong = await notesWrite.execute({ address: "too-long", content: "body", description: tooLong }, context);
307
+ assert.equal(writtenLong.ok, true);
308
+ assert.equal(data(writtenLong).warnings.length, 1);
309
+ assert.match(notesWrite.render(writtenLong), /<notesoup:warning>description is 161 chars \(max 160\); boot index truncates it\.<\/notesoup:warning>/);
310
+ assert.equal((await notes.read("too-long")).meta.description, tooLong, "an oversized description still saves whole");
311
+ const updatedLong = await notesUpdate.execute({ address: "described", description: tooLong }, context);
312
+ assert.equal(updatedLong.ok, true);
313
+ assert.equal(data(updatedLong).warnings.length, 1);
314
+ assert.match(notesUpdate.render(updatedLong), /<notesoup:warning>description is 161 chars \(max 160\); boot index truncates it\.<\/notesoup:warning>/);
315
+ assert.equal((await notes.read("described")).meta.description, tooLong);
316
+ const readLong = await notesRead.execute({ address: "too-long" }, context);
317
+ assert.equal(data(readLong).warnings.length, 1);
318
+ assert.match(notesRead.render(readLong), /<notesoup:warning>description is 161 chars \(max 160\)/);
319
+ const listLong = await notesList.execute({ glob: "too-long.md" }, context);
320
+ assert.equal(data(listLong).files[0]?.warnings.length, 1);
321
+ assert.match(notesList.render(listLong), /<notesoup:warning>description is 161 chars \(max 160\)/);
322
+ const renderedLong = await boot(identity);
323
+ assert.ok(renderedLong.includes(`${"😀".repeat(160)}…`), "boot index truncates saved over-160 descriptions");
324
+ assert.equal(renderedLong.includes(tooLong), false);
325
+ const shortened = await notesUpdate.execute({ address: "described", description: "short again" }, context);
326
+ assert.deepEqual(data(shortened).warnings, [], "shortening the description clears the warning");
308
327
  });
309
328
  test("boot auto-indexes unpinned notes newest first with description, fallback title, and pinned/crumpled omissions", async (t) => {
310
329
  const { identity, notes } = fixture(t);
@@ -317,10 +336,10 @@ test("boot auto-indexes unpinned notes newest first with description, fallback t
317
336
  await notes.update("gone", undefined, { crumpled: true });
318
337
  const rendered = await boot(identity);
319
338
  assert.equal(rendered.includes("recent"), false, "the old recent label is gone");
320
- assert.match(rendered, /^notes$/m, "the index follows pinned pages under one subheader");
321
- assert.match(rendered, / {2}plain\.md · just now — first line only/);
322
- assert.match(rendered, / {2}heading\.md · just now — Heading title/);
323
- assert.match(rendered, / {2}described\.md · just now — when to open this/);
339
+ assert.match(rendered, /^── index ──$/m, "the index follows pinned pages under one subheader");
340
+ assert.match(rendered, /^plain\.md · just now — first line only$/m);
341
+ assert.match(rendered, /^heading\.md · just now — Heading title$/m);
342
+ assert.match(rendered, /^described\.md · just now — when to open this$/m);
324
343
  assert.ok(rendered.indexOf("plain.md ·") < rendered.indexOf("heading.md ·"), "newest unpinned note leads");
325
344
  assert.ok(rendered.indexOf("heading.md ·") < rendered.indexOf("described.md ·"));
326
345
  assert.equal(rendered.includes("hidden.md ·"), false, "pinned pages do not repeat in the index");
@@ -331,8 +350,8 @@ test("boot auto-indexes unpinned notes newest first with description, fallback t
331
350
  await notes.update("CHEATSHEET", undefined, { pinned: false, crumpled: true });
332
351
  await notes.update("hidden", undefined, { crumpled: true });
333
352
  const bare = await boot(identity);
334
- assert.equal(/^notes$/m.test(bare), false);
335
- assert.match(bare, / {2}plain\.md · just now — first line only/);
353
+ assert.equal(/^── index ──$/m.test(bare), false);
354
+ assert.match(bare, /^plain\.md · just now — first line only$/m);
336
355
  });
337
356
  test("boot shelf index enforces entry and character caps with an explicit omission marker", async (t) => {
338
357
  const { identity, notes } = fixture(t);
@@ -340,7 +359,7 @@ test("boot shelf index enforces entry and character caps with an explicit omissi
340
359
  await notes.write(`bulk-${index}`, "body", { description: "d" });
341
360
  const entries = await boot(identity);
342
361
  assert.equal(entries.split(" · just now — d").length - 1, 25, "only 25 entries fit");
343
- assert.match(entries, / {2}… and 1 more \(use notes_list\)/);
362
+ assert.match(entries, /^… and 1 more \(use notes_list\)$/m);
344
363
  assert.equal(entries.includes("bulk-0.md ·"), false, "the oldest entry is the one left out");
345
364
  const wide = fixture(t);
346
365
  for (let index = 0; index < 25; index++)