notesoup 0.58.2 → 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 (47) 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 +16 -8
  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/dsh.md +1 -1
  33. package/docs/notes-library.md +1 -1
  34. package/docs/tool-results.md +1 -1
  35. package/package.json +1 -1
  36. package/playbook.md +1 -1
  37. package/plugins/claude/.claude-plugin/plugin.json +1 -1
  38. package/plugins/claude/dist/claude/helper.js +10 -8
  39. package/plugins/claude/playbook.md +1 -1
  40. package/plugins/claude/skills/dream/SKILL.md +1 -1
  41. package/plugins/claude/skills/memory/SKILL.md +1 -1
  42. package/plugins/codex/dist/codex/notesoup.js +10 -8
  43. package/skills/dream/SKILL.md +1 -1
  44. package/skills/memory/SKILL.md +1 -1
  45. package/src/boot/text.ts +5 -4
  46. package/src/notes/policy.ts +4 -3
  47. package/src/tools/notes.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "notesoup",
3
- "version": "0.58.2",
3
+ "version": "0.58.3",
4
4
  "type": "module",
5
5
  "main": "./dist/src/index.js",
6
6
  "types": "./dist/src/index.d.ts",
package/playbook.md CHANGED
@@ -27,7 +27,7 @@ Durable notes hold decisions, constraints, and lessons that stay true after the
27
27
  5. **Relocate misfiled notes.** When a standing ruling or the note's own MAP already names its proper notebook, move it there, preserving its metadata, and update both notebooks' maps. Do it, don't propose it. Propose only when the destination notebook itself is unclear.
28
28
  6. **Preserve meaning and provenance.** Keep facts, conditions, exceptions, uncertainty, authorship, and sources. When promoting a finding, cite its source. Do not relabel agent-authored material as human-authored. If its destination or authority is unclear, propose the promotion instead.
29
29
  7. **Keep notes manageable.** Aim below about 200 lines / 8KB per note. Split oversized notes by topic with one-line cross-links.
30
- 8. **Keep wake-up pages useful.** Each writable notebook's `CHEATSHEET.md` holds standing reminders, kept to five lines. Its `MAP.md` holds only the note index: durable notes' addresses and short gists. Both default to pinned and load every window when live unless explicitly unpinned; do not create empty pages. Each notebook allows five live pins. Every page defaults to a 2048-code-point advisory budget, adjustable per note; overflow warns without truncating a pinned body. Preserve standing rules, add promoted notes to the map, and drop entries that no longer hold. Maps follow the same size budget.
30
+ 8. **Keep wake-up pages useful.** Each writable notebook's `CHEATSHEET.md` holds standing reminders, kept to five lines. Its `MAP.md` holds only the note index: durable notes' addresses and short gists. Both default to pinned and load every window when live unless explicitly unpinned; do not create empty pages. Each notebook allows five live pins. Ordinary pages default to a 4096-code-point advisory budget (2048 for root `CHEATSHEET.md` and `MAP.md`), adjustable per note; overflow warns without truncating a pinned body. Preserve standing rules, add promoted notes to the map, and drop entries that no longer hold.
31
31
 
32
32
  ## Deleting
33
33
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "notesoup",
3
- "version": "0.58.2",
3
+ "version": "0.58.3",
4
4
  "description": "Durable notes and a host-scoped notes boot section for Claude Code.",
5
5
  "author": {
6
6
  "name": "AstroSheep"
@@ -8165,7 +8165,7 @@ function addressFor(identity2, scope, path, who) {
8165
8165
  }
8166
8166
 
8167
8167
  // src/notes/policy.ts
8168
- var DEFAULT_NOTE_BUDGET = 2048;
8168
+ var DEFAULT_NOTE_BUDGET = 4096;
8169
8169
  var MAX_PINNED_NOTES = 5;
8170
8170
  var DEFAULT_PINNED_PAGES = ["CHEATSHEET.md", "MAP.md"];
8171
8171
  function validateNotePolicy(fields) {
@@ -8178,9 +8178,10 @@ function validateNotePolicy(fields) {
8178
8178
  }
8179
8179
  function effectiveNotePolicy(fields, path) {
8180
8180
  validateNotePolicy(fields);
8181
+ const defaultPage = DEFAULT_PINNED_PAGES.some((page) => page === path);
8181
8182
  return {
8182
- pinned: fields.pinned ?? DEFAULT_PINNED_PAGES.some((page) => page === path),
8183
- budget: fields.budget ?? DEFAULT_NOTE_BUDGET,
8183
+ pinned: fields.pinned ?? defaultPage,
8184
+ budget: fields.budget ?? (defaultPage ? 2048 : DEFAULT_NOTE_BUDGET),
8184
8185
  readonly: fields.readonly ?? false
8185
8186
  };
8186
8187
  }
@@ -9166,7 +9167,7 @@ var ORIGIN = typebox_exports.Optional(typebox_exports.Union([...ORIGIN_VALUES],
9166
9167
  }));
9167
9168
  var POLICY_PARAMETERS = {
9168
9169
  pinned: typebox_exports.Optional(typebox_exports.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." })),
9169
- budget: typebox_exports.Optional(typebox_exports.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." })),
9170
+ budget: typebox_exports.Optional(typebox_exports.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." })),
9170
9171
  readonly: typebox_exports.Optional(typebox_exports.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." }))
9171
9172
  };
9172
9173
  var PolicySchema = {
@@ -11229,10 +11230,11 @@ Pinned pages get jammed straight into your brain the moment you wake up. Whoever
11229
11230
  reads them, and next is you. So keep them short, and keep them true.
11230
11231
 
11231
11232
  Set \`pinned\`, \`budget\`, and \`readonly\` with the note tools or frontmatter. Each notebook allows five
11232
- live pins, including the defaults; \`pinned:false\` unpins even a default page. Every page's budget
11233
- starts at 2048 Unicode code points; set a positive integer to change it. Going over warns but saves,
11234
- and pinned bodies arrive whole, not cut short. \`readonly:true\` is a soft lock, not security;
11235
- explicitly set \`readonly:false\` to unlock, on its own or with your changes.
11233
+ live pins, including the defaults; \`pinned:false\` unpins even a default page. Budgets start at 4096
11234
+ Unicode code points, or 2048 for root \`CHEATSHEET.md\` and \`MAP.md\`; set a positive integer to
11235
+ change one. Going over warns but saves, and pinned bodies arrive whole, not cut short.
11236
+ \`readonly:true\` is a soft lock, not security; explicitly set \`readonly:false\` to unlock,
11237
+ on its own or with your changes.
11236
11238
 
11237
11239
  - **\`CHEATSHEET.md\`** holds what you'll want next time \u2014 a rule, a warning, a grudge, a name,
11238
11240
  a phone number you'll regret losing. Nobody grades it. Keep it to five lines, or it grows fat
@@ -27,7 +27,7 @@ Durable notes hold decisions, constraints, and lessons that stay true after the
27
27
  5. **Relocate misfiled notes.** When a standing ruling or the note's own MAP already names its proper notebook, move it there, preserving its metadata, and update both notebooks' maps. Do it, don't propose it. Propose only when the destination notebook itself is unclear.
28
28
  6. **Preserve meaning and provenance.** Keep facts, conditions, exceptions, uncertainty, authorship, and sources. When promoting a finding, cite its source. Do not relabel agent-authored material as human-authored. If its destination or authority is unclear, propose the promotion instead.
29
29
  7. **Keep notes manageable.** Aim below about 200 lines / 8KB per note. Split oversized notes by topic with one-line cross-links.
30
- 8. **Keep wake-up pages useful.** Each writable notebook's `CHEATSHEET.md` holds standing reminders, kept to five lines. Its `MAP.md` holds only the note index: durable notes' addresses and short gists. Both default to pinned and load every window when live unless explicitly unpinned; do not create empty pages. Each notebook allows five live pins. Every page defaults to a 2048-code-point advisory budget, adjustable per note; overflow warns without truncating a pinned body. Preserve standing rules, add promoted notes to the map, and drop entries that no longer hold. Maps follow the same size budget.
30
+ 8. **Keep wake-up pages useful.** Each writable notebook's `CHEATSHEET.md` holds standing reminders, kept to five lines. Its `MAP.md` holds only the note index: durable notes' addresses and short gists. Both default to pinned and load every window when live unless explicitly unpinned; do not create empty pages. Each notebook allows five live pins. Ordinary pages default to a 4096-code-point advisory budget (2048 for root `CHEATSHEET.md` and `MAP.md`), adjustable per note; overflow warns without truncating a pinned body. Preserve standing rules, add promoted notes to the map, and drop entries that no longer hold.
31
31
 
32
32
  ## Deleting
33
33
 
@@ -5,7 +5,7 @@ description: Review and consolidate durable notes using notesoup's shared dream
5
5
 
6
6
  # Dream
7
7
 
8
- Read `../../playbook.md` completely, resolving the path from this skill's directory. It is the shared guide to reviewing and organizing notes. Standing reminders belong in a separate `CHEATSHEET.md` (five lines); `MAP.md` holds only the note index. Both default to pinned and load every window when live unless explicitly unpinned. Every note defaults to a 2048-code-point advisory budget, adjustable per note; pinned bodies load whole with overflow warnings. Respect soft readonly locks; explicitly unlock with `readonly:false` before changing a locked note.
8
+ Read `../../playbook.md` completely, resolving the path from this skill's directory. It is the shared guide to reviewing and organizing notes. Standing reminders belong in a separate `CHEATSHEET.md` (five lines); `MAP.md` holds only the note index. Both default to pinned and load every window when live unless explicitly unpinned. Ordinary notes default to a 4096-code-point advisory budget (2048 for root `CHEATSHEET.md` and `MAP.md`), adjustable per note; pinned bodies load whole with overflow warnings. Respect soft readonly locks; explicitly unlock with `readonly:false` before changing a locked note.
9
9
 
10
10
  Dream in this agent's current session. Do not start another agent or model unless the human asks.
11
11
 
@@ -32,7 +32,7 @@ Any other `@` prefix is refused. A path is relative and `/`-separated, with no e
32
32
 
33
33
  `@` addresses are not file paths: never pass them to file tools like `read`, `write`, `edit`, or `bash`. That creates a stray directory instead of a note.
34
34
 
35
- `CHEATSHEET.md` and `MAP.md` at each notebook's root are separate default-pinned pages you wake up with; absent or crumpled pages are skipped. Set `pinned`, `budget`, and `readonly` through `notes_write`/`notes_update` or frontmatter. Explicit `pinned:false` unpins even a default page. Each notebook allows five live pins; every page defaults to a 2048-code-point advisory budget, adjustable per note. Overflow warns but saves, and pinned bodies load whole. `readonly:true` is a soft lock, not security; explicitly set `readonly:false` to unlock, alone or alongside your changes. Keep standing reminders in `CHEATSHEET.md`, to five lines. `MAP.md` holds only the note index: each durable note's address and gist, for lookup. Update it whenever you add, move or crumple a durable note. Do not create empty pages.
35
+ `CHEATSHEET.md` and `MAP.md` at each notebook's root are separate default-pinned pages you wake up with; absent or crumpled pages are skipped. Set `pinned`, `budget`, and `readonly` through `notes_write`/`notes_update` or frontmatter. Explicit `pinned:false` unpins even a default page. Each notebook allows five live pins; ordinary pages default to a 4096-code-point advisory budget (2048 for root `CHEATSHEET.md` and `MAP.md`), adjustable per note. Overflow warns but saves, and pinned bodies load whole. `readonly:true` is a soft lock, not security; explicitly set `readonly:false` to unlock, alone or alongside your changes. Keep standing reminders in `CHEATSHEET.md`, to five lines. `MAP.md` holds only the note index: each durable note's address and gist, for lookup. Update it whenever you add, move or crumple a durable note. Do not create empty pages.
36
36
 
37
37
  Keep notes focused on what is true now; if a piece of past context still matters (such as why an approach was ruled out), keep only a brief summary rather than a blow-by-blow log. Crumple notes that are no longer true; a stale note is worse than none.
38
38
 
@@ -25140,7 +25140,7 @@ function addressFor(identity, scope, path, who) {
25140
25140
  }
25141
25141
 
25142
25142
  // src/notes/policy.ts
25143
- var DEFAULT_NOTE_BUDGET = 2048;
25143
+ var DEFAULT_NOTE_BUDGET = 4096;
25144
25144
  var MAX_PINNED_NOTES = 5;
25145
25145
  var DEFAULT_PINNED_PAGES = ["CHEATSHEET.md", "MAP.md"];
25146
25146
  function validateNotePolicy(fields) {
@@ -25153,9 +25153,10 @@ function validateNotePolicy(fields) {
25153
25153
  }
25154
25154
  function effectiveNotePolicy(fields, path) {
25155
25155
  validateNotePolicy(fields);
25156
+ const defaultPage = DEFAULT_PINNED_PAGES.some((page) => page === path);
25156
25157
  return {
25157
- pinned: fields.pinned ?? DEFAULT_PINNED_PAGES.some((page) => page === path),
25158
- budget: fields.budget ?? DEFAULT_NOTE_BUDGET,
25158
+ pinned: fields.pinned ?? defaultPage,
25159
+ budget: fields.budget ?? (defaultPage ? 2048 : DEFAULT_NOTE_BUDGET),
25159
25160
  readonly: fields.readonly ?? false
25160
25161
  };
25161
25162
  }
@@ -26141,7 +26142,7 @@ var ORIGIN = typebox_exports.Optional(typebox_exports.Union([...ORIGIN_VALUES],
26141
26142
  }));
26142
26143
  var POLICY_PARAMETERS = {
26143
26144
  pinned: typebox_exports.Optional(typebox_exports.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." })),
26144
- budget: typebox_exports.Optional(typebox_exports.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." })),
26145
+ budget: typebox_exports.Optional(typebox_exports.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." })),
26145
26146
  readonly: typebox_exports.Optional(typebox_exports.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." }))
26146
26147
  };
26147
26148
  var PolicySchema = {
@@ -28284,10 +28285,11 @@ Pinned pages get jammed straight into your brain the moment you wake up. Whoever
28284
28285
  reads them, and next is you. So keep them short, and keep them true.
28285
28286
 
28286
28287
  Set \`pinned\`, \`budget\`, and \`readonly\` with the note tools or frontmatter. Each notebook allows five
28287
- live pins, including the defaults; \`pinned:false\` unpins even a default page. Every page's budget
28288
- starts at 2048 Unicode code points; set a positive integer to change it. Going over warns but saves,
28289
- and pinned bodies arrive whole, not cut short. \`readonly:true\` is a soft lock, not security;
28290
- explicitly set \`readonly:false\` to unlock, on its own or with your changes.
28288
+ live pins, including the defaults; \`pinned:false\` unpins even a default page. Budgets start at 4096
28289
+ Unicode code points, or 2048 for root \`CHEATSHEET.md\` and \`MAP.md\`; set a positive integer to
28290
+ change one. Going over warns but saves, and pinned bodies arrive whole, not cut short.
28291
+ \`readonly:true\` is a soft lock, not security; explicitly set \`readonly:false\` to unlock,
28292
+ on its own or with your changes.
28291
28293
 
28292
28294
  - **\`CHEATSHEET.md\`** holds what you'll want next time \u2014 a rule, a warning, a grudge, a name,
28293
28295
  a phone number you'll regret losing. Nobody grades it. Keep it to five lines, or it grows fat
@@ -5,7 +5,7 @@ description: Review and consolidate durable notes using notesoup's shared dream
5
5
 
6
6
  # Dream
7
7
 
8
- Read `../../playbook.md` completely, resolving the path from this skill's directory. It is the shared guide to reviewing and organizing notes. Standing reminders belong in a separate `CHEATSHEET.md` (five lines); `MAP.md` holds only the note index. Both default to pinned and load every window when live unless explicitly unpinned. Every note defaults to a 2048-code-point advisory budget, adjustable per note; pinned bodies load whole with overflow warnings. Respect soft readonly locks; explicitly unlock with `readonly:false` before changing a locked note.
8
+ Read `../../playbook.md` completely, resolving the path from this skill's directory. It is the shared guide to reviewing and organizing notes. Standing reminders belong in a separate `CHEATSHEET.md` (five lines); `MAP.md` holds only the note index. Both default to pinned and load every window when live unless explicitly unpinned. Ordinary notes default to a 4096-code-point advisory budget (2048 for root `CHEATSHEET.md` and `MAP.md`), adjustable per note; pinned bodies load whole with overflow warnings. Respect soft readonly locks; explicitly unlock with `readonly:false` before changing a locked note.
9
9
 
10
10
  Dream in this agent's current session. Do not start another agent or model unless the human asks.
11
11
 
@@ -32,7 +32,7 @@ Any other `@` prefix is refused. A path is relative and `/`-separated, with no e
32
32
 
33
33
  `@` addresses are not file paths: never pass them to file tools like `read`, `write`, `edit`, or `bash`. That creates a stray directory instead of a note.
34
34
 
35
- `CHEATSHEET.md` and `MAP.md` at each notebook's root are separate default-pinned pages you wake up with; absent or crumpled pages are skipped. Set `pinned`, `budget`, and `readonly` through `notes_write`/`notes_update` or frontmatter. Explicit `pinned:false` unpins even a default page. Each notebook allows five live pins; every page defaults to a 2048-code-point advisory budget, adjustable per note. Overflow warns but saves, and pinned bodies load whole. `readonly:true` is a soft lock, not security; explicitly set `readonly:false` to unlock, alone or alongside your changes. Keep standing reminders in `CHEATSHEET.md`, to five lines. `MAP.md` holds only the note index: each durable note's address and gist, for lookup. Update it whenever you add, move or crumple a durable note. Do not create empty pages.
35
+ `CHEATSHEET.md` and `MAP.md` at each notebook's root are separate default-pinned pages you wake up with; absent or crumpled pages are skipped. Set `pinned`, `budget`, and `readonly` through `notes_write`/`notes_update` or frontmatter. Explicit `pinned:false` unpins even a default page. Each notebook allows five live pins; ordinary pages default to a 4096-code-point advisory budget (2048 for root `CHEATSHEET.md` and `MAP.md`), adjustable per note. Overflow warns but saves, and pinned bodies load whole. `readonly:true` is a soft lock, not security; explicitly set `readonly:false` to unlock, alone or alongside your changes. Keep standing reminders in `CHEATSHEET.md`, to five lines. `MAP.md` holds only the note index: each durable note's address and gist, for lookup. Update it whenever you add, move or crumple a durable note. Do not create empty pages.
36
36
 
37
37
  Keep notes focused on what is true now; if a piece of past context still matters (such as why an approach was ruled out), keep only a brief summary rather than a blow-by-blow log. Crumple notes that are no longer true; a stale note is worse than none.
38
38
 
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 = {