notesoup 0.58.1 → 0.58.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 (49) hide show
  1. package/README.md +1 -1
  2. package/dist/src/boot/text.d.ts +1 -1
  3. package/dist/src/boot/text.js +5 -4
  4. package/dist/src/notes/policy.d.ts +1 -1
  5. package/dist/src/notes/policy.js +4 -3
  6. package/dist/src/tools/notes.js +1 -1
  7. package/dist/test/agent-loop.test.js +13 -39
  8. package/dist/test/boot.integration.test.js +20 -18
  9. package/dist/test/budget-settings.integration.test.js +18 -13
  10. package/dist/test/claude-history.test.js +1 -2
  11. package/dist/test/claude-mod.test.js +417 -87
  12. package/dist/test/codex-history.test.js +9 -6
  13. package/dist/test/codex-plugin.test.js +4 -8
  14. package/dist/test/dream-skill.test.js +6 -10
  15. package/dist/test/dsh-cli.test.js +2 -3
  16. package/dist/test/dsh.test.js +1 -7
  17. package/dist/test/helpers/extension.js +3 -1
  18. package/dist/test/history-corpus.test.js +2 -3
  19. package/dist/test/history-prefilter.test.js +33 -40
  20. package/dist/test/history-summary-cache.test.js +1 -1
  21. package/dist/test/history.integration.test.js +11 -37
  22. package/dist/test/host-neutral.test.js +2 -2
  23. package/dist/test/marker.test.js +1 -2
  24. package/dist/test/model-facing-text.test.js +20 -187
  25. package/dist/test/note-policy.test.js +40 -22
  26. package/dist/test/notes-library.test.js +2 -2
  27. package/dist/test/notes.integration.test.js +36 -149
  28. package/dist/test/notes.test.js +13 -61
  29. package/dist/test/pi-render.test.js +23 -62
  30. package/dist/test/reset-lifecycle.test.js +4 -9
  31. package/docs/architecture.md +1 -1
  32. package/docs/claude-code-mod.md +15 -3
  33. package/docs/dsh.md +1 -1
  34. package/docs/notes-library.md +1 -1
  35. package/docs/tool-results.md +1 -1
  36. package/package.json +1 -1
  37. package/playbook.md +1 -1
  38. package/plugins/claude/.claude-plugin/plugin.json +1 -1
  39. package/plugins/claude/dist/claude/helper.js +10 -8
  40. package/plugins/claude/hooks/register.ts +198 -130
  41. package/plugins/claude/playbook.md +1 -1
  42. package/plugins/claude/skills/dream/SKILL.md +1 -1
  43. package/plugins/claude/skills/memory/SKILL.md +1 -1
  44. package/plugins/codex/dist/codex/notesoup.js +10 -8
  45. package/skills/dream/SKILL.md +1 -1
  46. package/skills/memory/SKILL.md +1 -1
  47. package/src/boot/text.ts +5 -4
  48. package/src/notes/policy.ts +4 -3
  49. package/src/tools/notes.ts +1 -1
package/src/boot/text.ts CHANGED
@@ -64,10 +64,11 @@ Pinned pages get jammed straight into your brain the moment you wake up. Whoever
64
64
  reads them, and next is you. So keep them short, and keep them true.
65
65
 
66
66
  Set \`pinned\`, \`budget\`, and \`readonly\` with the note tools or frontmatter. Each notebook allows five
67
- live pins, including the defaults; \`pinned:false\` unpins even a default page. Every page's budget
68
- starts at 2048 Unicode code points; set a positive integer to change it. Going over warns but saves,
69
- and pinned bodies arrive whole, not cut short. \`readonly:true\` is a soft lock, not security;
70
- explicitly set \`readonly:false\` to unlock, on its own or with your changes.
67
+ live pins, including the defaults; \`pinned:false\` unpins even a default page. Budgets start at 4096
68
+ Unicode code points, or 2048 for root \`CHEATSHEET.md\` and \`MAP.md\`; set a positive integer to
69
+ change one. Going over warns but saves, and pinned bodies arrive whole, not cut short.
70
+ \`readonly:true\` is a soft lock, not security; explicitly set \`readonly:false\` to unlock,
71
+ on its own or with your changes.
71
72
 
72
73
  - **\`CHEATSHEET.md\`** holds what you'll want next time — a rule, a warning, a grudge, a name,
73
74
  a phone number you'll regret losing. Nobody grades it. Keep it to five lines, or it grows fat
@@ -2,7 +2,7 @@ import { NoteError } from "./errors.js";
2
2
 
3
3
  export type NotePolicyFields = { pinned?: boolean; budget?: number; readonly?: boolean };
4
4
  export type NotePolicy = Required<NotePolicyFields>;
5
- export const DEFAULT_NOTE_BUDGET = 2048;
5
+ export const DEFAULT_NOTE_BUDGET = 4096;
6
6
  export const MAX_PINNED_NOTES = 5;
7
7
  /** Defaults and ordering live here; no other layer assigns behavior by page name. */
8
8
  const DEFAULT_PINNED_PAGES = ["CHEATSHEET.md", "MAP.md"] as const;
@@ -19,9 +19,10 @@ export function validateNotePolicy(fields: NotePolicyFields): void {
19
19
  /** Only root default pages are pinned implicitly; an explicit false always wins. */
20
20
  export function effectiveNotePolicy(fields: NotePolicyFields, path: string): NotePolicy {
21
21
  validateNotePolicy(fields);
22
+ const defaultPage = DEFAULT_PINNED_PAGES.some(page => page === path);
22
23
  return {
23
- pinned: fields.pinned ?? DEFAULT_PINNED_PAGES.some(page => page === path),
24
- budget: fields.budget ?? DEFAULT_NOTE_BUDGET,
24
+ pinned: fields.pinned ?? defaultPage,
25
+ budget: fields.budget ?? (defaultPage ? 2048 : DEFAULT_NOTE_BUDGET),
25
26
  readonly: fields.readonly ?? false,
26
27
  };
27
28
  }
@@ -19,7 +19,7 @@ const ORIGIN = Type.Optional(Type.Union([...ORIGIN_VALUES], {
19
19
  }));
20
20
  const POLICY_PARAMETERS = {
21
21
  pinned: Type.Optional(Type.Boolean({ description: "Inject the full body at boot. At most 5 live pins per notebook; root CHEATSHEET.md/MAP.md default true, all others false. Explicit false overrides the default." })),
22
- budget: Type.Optional(Type.Integer({ minimum: 1, maximum: Number.MAX_SAFE_INTEGER, description: "Body budget in Unicode code points (default 2048 for every note). Over budget warns but saves; boot does not truncate." })),
22
+ budget: Type.Optional(Type.Integer({ minimum: 1, maximum: Number.MAX_SAFE_INTEGER, description: "Body budget in Unicode code points (default 4096; root CHEATSHEET.md and MAP.md default 2048). Over budget warns but saves; boot does not truncate." })),
23
23
  readonly: Type.Optional(Type.Boolean({ description: "Soft lock, not a security boundary. true locks changes; explicitly pass false to unlock, including in the same call as edits or overwrite." })),
24
24
  };
25
25
  const PolicySchema = {