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
@@ -458,7 +458,7 @@ export function register(on: On) {
458
458
  const wipe = await $.tool.register({
459
459
  name: "empty_brain",
460
460
  description: "Clear your in-context memory and start a fresh context window. Your session, notes, and history survive. Pass `last_word` to stick a tiny note on your forehead for after the wipe.",
461
- inputSchema: { type: "object", properties: { last_word: { type: "string", description: "A tiny sticky note, at most 300 characters. After the wipe it is slapped on your forehead; longer notes are refused." }, terminate: { type: "boolean", description: "Stop after the wipe. Default: false.", default: false } }, additionalProperties: false },
461
+ inputSchema: { type: "object", properties: { last_word: { type: "string", description: "A tiny sticky note (at most 300 characters), slapped on your forehead after the wipe." }, terminate: { type: "boolean", description: "Stop after the wipe.", default: false } }, additionalProperties: false },
462
462
  isDeferred: false,
463
463
  } satisfies ToolSpec)
464
464
  registered.add(wipe.tool)
@@ -620,7 +620,7 @@ async function callNotesTool($: Engine, state: ResetState, e: ToolCallInput): Pr
620
620
  if (state.flow.requestReset({ lastWord, terminate: terminate === true })) state.continuation = undefined
621
621
  return { result: `Brain reset requested. This tool batch will finish, then the turn stops before its next model request unless it has new user input to handle. Your notes and sticky note survive the reset.${state.flow.request!.resume ? " You will continue in a fresh window after the reset." : " No automatic continuation will be submitted."}` }
622
622
  }
623
- const history = name === "history_list" || name === "history_read"
623
+ const history = name === "history_list" || name === "history_search" || name === "history_read"
624
624
  if (history && agentId !== undefined) return errorResult("history is unavailable for subagents; main-session history is not their transcript")
625
625
  const result = await run($, { op: "tool", tool: name, params, identity, history: state.history }, history ? HISTORY_TIMEOUT_MS : TIMEOUT_MS)
626
626
  if (!result.ok) return errorResult(result.error)
@@ -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 `description` already names its proper notebook, move it there, preserving its metadata, and keep its `description` true. 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; it is the one default-pinned page and loads every window when live unless explicitly unpinned. Every durable note gets a one-line `description` (max 160 characters) saying what it holds and when to open it — boot lists each notebook's unpinned notes newest first from these, so a missing, stale, or vague description hides the page. A hand-written `MAP.md` is an ordinary note now; once its lines live in `description`s, crumple it. 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`), adjustable per note; overflow warns without truncating a pinned body. Preserve standing rules and keep descriptions true as notes are promoted or retired.
30
+ 8. **Keep wake-up pages useful.** Each writable notebook's `CHEATSHEET.md` holds compact standing reminders; it is the one default-pinned page and loads every window when live unless explicitly unpinned. Every durable note gets a short one-line `description` saying what it holds and when to open it — boot lists each notebook's unpinned notes newest first from these, so a missing, stale, or vague description hides the page. A hand-written `MAP.md` is an ordinary note now; once its lines live in `description`s, crumple it. Do not create empty pages. Pin slots per notebook are capped, and each page carries a UTF-8 byte budget (4 KB for `CHEATSHEET.md`, 8 KB for ordinary notes; overridable in frontmatter); overflow warns, and boot truncates over-budget pinned bodies. Preserve standing rules and keep descriptions true as notes are promoted or retired.
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), the one default-pinned page; it loads every window when live unless explicitly unpinned. Every durable note carries a one-line `description` (max 160 characters) saying what it holds and when to open it — boot renders each notebook's index from these, so a missing or stale description is an index defect. Ordinary notes default to a 4096-code-point advisory budget (2048 for root `CHEATSHEET.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.
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 compact `CHEATSHEET.md`, the one default-pinned page; it loads every window when live unless explicitly unpinned. Every durable note carries a short one-line `description` saying what it holds and when to open it — boot renders each notebook's index from these, so a missing or stale description is an index defect. Pages carry UTF-8 byte budgets (4 KB for `CHEATSHEET.md`, 8 KB for ordinary notes, overridable in frontmatter); overflow warns, and boot truncates over-budget pinned bodies. 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
 
@@ -0,0 +1,92 @@
1
+ ---
2
+ name: notesoup
3
+ description: How notesoup's `notes_*` and `history_*` tools fit together — note addresses and notebooks, finding things again, and saving recovery state. Use when the context-window protocol is missing or unclear, or when unsure where a note belongs or how to find something again.
4
+ ---
5
+
6
+ # Notesoup
7
+
8
+ Two stores outlive the context window. Anything in neither is lost when the window ends or is wiped.
9
+
10
+ - **Notes** (`notes_*`) — what you choose to keep. Plain markdown, written on purpose.
11
+ - **History** (`history_*`) — recorded messages, tool calls and summaries. Current session by default; other local sessions/harnesses through `session`. Read-only.
12
+
13
+ Each tool's own description covers its parameters and paging. This guide covers what the descriptions cannot: where notes belong, and how the tools work together.
14
+
15
+ ## Addresses
16
+
17
+ The address decides who a note belongs to and how long it lasts.
18
+
19
+ | Address | Note | Keep there |
20
+ | --- | --- | --- |
21
+ | `<path>`, no `@` | session note | current task state and loose ends; gone with the session |
22
+ | `@project/<path>` | project note | decisions and constraints future work must respect |
23
+ | `@human/<path>` | human note | how to work with this human, across projects |
24
+ | `@self/<path>` | self note | your reminders; yours alone if you have a name, shared by everyone nameless |
25
+ | `@model/<path>` | model note | what applies to this model only |
26
+ | `@projects/<name>/<path>` | named project, read-only | discover names and root paths with `notes_list` glob `@projects/*/**` |
27
+ | `@sessions/<id>/<path>` | named session, read-only | recover earlier task state; discover with glob `@sessions/*/**` |
28
+
29
+ When notes conflict, the one most relevant to what you're doing applies. If that doesn't settle it, judge the case.
30
+
31
+ Any other `@` prefix is refused. A path is relative and `/`-separated, with no empty, `.` or `..` segments.
32
+
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
+
35
+ `CHEATSHEET.md` at each notebook's root is the default-pinned page you wake up with; absent or crumpled pages are skipped. Set `pinned`, `readonly`, and `description` through `notes_write`/`notes_update` or frontmatter. Explicit `pinned:false` unpins even a default page; each page carries a UTF-8 byte budget (4 KB for root `CHEATSHEET.md`, 8 KB for ordinary notes; overridable in frontmatter). Overflow on body budget or an oversized description warns but still saves; boot truncates over-budget pinned bodies and oversized descriptions. `readonly:true` is a soft lock, not security; explicitly set `readonly:false` to unlock, alone or alongside your changes. Keep `CHEATSHEET.md` compact with short bullets. Give each durable note a short one-line `description`: boot lists every notebook's unpinned pages newest first as address, age, and description, so it is the only index. Do not create empty pages.
36
+
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
+
39
+ ## Finding things again
40
+
41
+ ### Notes
42
+
43
+ In `notes_list`, omit `glob` for this session and the current shared notebooks. Use `**` for all notebooks or `@sessions/*/**` for all sessions.
44
+
45
+ - **A note**: add `glob` to narrow where `notes_list` looks, and `query` if you remember a phrase. Then use `notes_read` with the address and, for a match, its `offset_chars`.
46
+ - **Older notes**: when `notes_list` ends with `→ older: {…}`, call it again with that object to see older matches. Continue until the line is gone.
47
+ ### Shared search and read conventions
48
+
49
+ Queries look for literal text, ignoring case. A list of phrases matches any one of them.
50
+
51
+ Both list tools report omissions and partial previews. A truncated result is not the whole
52
+ record.
53
+
54
+ Read offsets count characters relative to the body or event document, not the
55
+ presentation header.
56
+
57
+ Continue an incomplete read at the offset named in its trailing notice. A concurrent edit can
58
+ change a note's offsets.
59
+
60
+ All shared tools return text. On supported hosts, `notes_read` also returns the note body
61
+ `text` without presentation markers, plus `next_offset_chars`, metadata and warnings.
62
+
63
+ When carrying a reference into another window, save its full address or event identity, not just
64
+ a quotation; you can retrieve the text again.
65
+
66
+ ### History
67
+
68
+ - **Browse a known timeline**: `history_list({ before: 190 })` uses exclusive integer seq bounds (see the boot window tree for earlier windows), with optional ISO 8601 `since` / `until`. With `after` (or `since` alone) you page forward; otherwise take the newest events. Follow the older/newer and expand recipes.
69
+ - **List sessions**: pass a wildcard such as `session: "*"` or `"pi:*"` to `history_list` for one representative event per session (default 20 sessions), optionally narrowed with `roles` and `since` / `until`.
70
+ - **Find a passage**: `history_search({ query: "remembered phrase", context: 1 })` searches all roles in the current session, one named session, or a wildcard such as `session: "*"`, with optional neighboring events, `roles`, and ISO 8601 `since` / `until`. `query` is required (an empty query returns no matches).
71
+ - **Target one session**: all three tools accept an ID or prefix, optionally qualified with `pi:`, `claude:`, `codex:` or `dsh:`. Omit `session` for this session. If ambiguous, pass a longer or qualified ID. DSH sessions are available only from DSH.
72
+ - **Open a passage**: `history_read({ seq: 42 })` reads one event. If a session heading is shown above the event, include the full session ID; if a preview offset is shown, pass it as `offset_chars`. Follow the continuation to read more.
73
+
74
+ Save the seq and full session ID together when carrying a cross-session reference into another window. An empty search is not proof an event never happened: wildcard searches skip sessions that cannot be read.
75
+
76
+ ## Saving recovery state
77
+
78
+ Before a long or risky step, or when room runs low, keep session notes named for what they hold (not `current.md`) and rewrite them in place with short sections and bullets instead of starting new ones or appending a timeline. Skip standing rules already in `@project`/`@human`/`@self`/`@model` and commit details git can show; record only the live delta:
79
+
80
+ - current status, blockers, and the next action
81
+ - what the human decided (in their words)
82
+ - what failed, and why
83
+ - where half-done work and unrecorded findings live (branches, worktrees, scratch paths, drafts, running tasks, key facts not saved elsewhere)
84
+ - skills, notes, files, or already-found history seqs to reopen
85
+
86
+ `get_context_remaining` reports the room left. `empty_brain` starts a fresh window, so save the note first.
87
+
88
+ ## When a tool is missing or refuses
89
+
90
+ A refusal displays `error: <code>: <message>`; read the message before retrying. `notes_read` also supplies `{ error, code }` where structured results are available.
91
+
92
+ If a `notes_*` or `history_*` tool is absent or fails at the host level, do not imitate it: no filesystem tools on `@` addresses, and no reading or editing note storage or session files directly. Use the tools that remain, tell the human which one is missing, and keep essential state in the reply.
@@ -4,7 +4,7 @@ import type { Static, TSchema } from "typebox";
4
4
  import { Check } from "typebox/value";
5
5
  import { paramProblem } from "../../../src/tools/schema.js";
6
6
  import { notesList, notesRead, notesUpdate, notesWrite } from "../../../src/tools/notes.js";
7
- import { historyList, historyRead, type HistoryTextWrapper } from "../../../src/tools/history.js";
7
+ import { historyList, historySearch, historyRead, type HistoryTextWrapper } from "../../../src/tools/history.js";
8
8
  import { localHistoryCorpus, type LocalHistoryOptions } from "../../../src/history/local.js";
9
9
  import { readClaudeHistory, type ClaudeHistorySource } from "./history.js";
10
10
  import { loadNotesSnapshot } from "../../../src/boot/snapshot.js";
@@ -58,6 +58,7 @@ const OPERATIONS: Record<string, BoundOperation<[NotesToolContext]>> = {
58
58
 
59
59
  const HISTORY_OPERATIONS = {
60
60
  history_list: boundOperation(historyList),
61
+ history_search: boundOperation(historySearch),
61
62
  history_read: boundOperation(historyRead),
62
63
  };
63
64
  function historySource(value: unknown, sessionId: string): ClaudeHistorySource {
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "notesoup",
3
+ "version": "1.0.0",
4
+ "description": "Host-neutral notes and native history for Codex, with a native-window boot.",
5
+ "keywords": ["notes", "history", "context-window"],
6
+ "hooks": "./hooks/hooks.json",
7
+ "mcpServers": "./.mcp.json"
8
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "mcpServers": {
3
+ "notesoup": {
4
+ "type": "stdio",
5
+ "command": "node",
6
+ "args": ["dist/codex/notesoup.js", "mcp"],
7
+ "cwd": ".",
8
+ "env_vars": ["CODEX_HOME", "NOTESOUP_HOME", "NOTESOUP_AGENT"]
9
+ }
10
+ }
11
+ }
@@ -1,10 +1,8 @@
1
1
  # notesoup for Codex
2
2
 
3
- Native notes and history for Codex **0.160.1**. The plugin bundles one stdio MCP server with the five notebooks and two history tools, and one hook helper that injects the notes boot into each native context window. `new_context` and `get_context_remaining` stay Codex's own tools; notesoup does not replace Codex's reset or budget.
3
+ Native model-context boot, notes and history for Codex. Validated against real root and independent child turns on Codex 0.171.0. Rollout support is shape-checked, not pinned to a CLI version.
4
4
 
5
- ## Install
6
-
7
- Build the bundle, add this repository as a marketplace, install the plugin, and approve its hooks:
5
+ Build, add the checkout as a marketplace, and install the native plugin:
8
6
 
9
7
  ```sh
10
8
  npm ci && npm run build
@@ -12,7 +10,7 @@ codex plugin marketplace add /absolute/path/to/notesoup
12
10
  codex plugin add notesoup@notesoup
13
11
  ```
14
12
 
15
- Then set the target native-mode configuration in `~/.codex/config.toml` (source-checked, not exercised against a live Codex config parser in this stage):
13
+ Review and trust the notesoup hooks and MCP tool permissions in Codex. Merge the native feature configuration into your existing `config.toml`:
16
14
 
17
15
  ```toml
18
16
  [features]
@@ -24,20 +22,6 @@ enabled = true
24
22
  use_history_notes_extension = false
25
23
  ```
26
24
 
27
- Do not also set `token_budget = true`: the table above is the whole setting. Restart Codex or resume the thread after installing, so `SessionStart` can bind the thread.
28
-
29
- ## What it does
30
-
31
- - The `SessionStart` hook reads the native rollout, binds thread identity from hook facts, and returns the notes boot for the current native window. A restart, resume or compact without an existing boot for that window gets one.
32
- - `notes_*` uses `NOTESOUP_HOME` (default `~/.agents/notes`) and the current turn's model for `@model`.
33
- - `history_*` reads the local rollout: root windows and a child's own ancestry. Window ids are `codex:<thread>:<native-window-uuid>`.
34
- - Stale roots, missing windows, missing turn models and missing bindings are refusals. Resume or compact once to rebind.
35
- - A child `PreCompact` is stopped with `continue: false`: Codex 0.160.1 has no child post-compact recovery hook. Save a handoff and start a fresh child.
36
-
37
- Requires Node **>=22.15** for compressed `.jsonl.zst` rollouts.
38
-
39
- ## Limits
40
-
41
- 128 KiB boot cap (host spilling disabled), 32 KiB tool results, local rollout history only, no MCP reset or budget fallback, no dream backend, no notifications or commands. Codex versions other than 0.160.1 are refused.
25
+ Root and child first-turn hooks inject their respective boots before any tool call. Native `new_context` and `get_context_remaining` stay Codex's own tools. Child post-compact recovery is not supported by the native hook contract: save a handoff and start a new child instead.
42
26
 
43
- This stage is validated with producer-shaped fixtures and the official MCP SDK client, not against a live Codex model loop. See [docs/codex.md](../../docs/codex.md) for setup, refusal codes, window identity and the validation scope.
27
+ Requires Node >=22.15 for compressed rollouts. See [docs/codex.md](../../docs/codex.md) for installation, identity rules, test coverage and limits.