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
@@ -1,24 +1,21 @@
1
1
  # Notes and history tool results
2
2
 
3
- The six notes/history tools share one result model on Pi, Claude Code, Codex and Cordis. Pi exposes compact results as `structuredContent` to codemode and renders them as `content` for ordinary model calls. Host adapters use the same shared handlers and text rendering; they do not re-run a query or truncate a different page.
3
+ Notes, dream and history tools return the same rendered results across Pi, Claude Code, Codex, Antigravity and Cordis. Only `notes_read` also returns structured data where supported.
4
4
 
5
- This is a breaking tool protocol change: successes no longer have `ok/data` wrappers, errors are flat, and read fields no longer sit under `window`. History execution details live once in the pageable document. Stored notes and raw Pi session entries are not deleted or rewritten by this change. In Pi, `get_context_remaining` independently declares `{ remaining_tokens }` as its output schema; `empty_brain` remains outside this protocol.
5
+ Stored notes and raw session entries are not rewritten by this protocol change. In Pi, `get_context_remaining` independently declares `{ remaining_tokens }` as its output schema; `empty_brain` remains outside this protocol.
6
6
 
7
7
  ## Results
8
8
 
9
- ```ts
10
- type Result<T> = T | { error: string; code: string };
11
- ```
12
-
13
- Each operation declares its concrete success schema; `error` is reserved for a refusal message. Success and expected failure both have a structured result; Pi's `isError` follows the outcome. Host-level argument validation, blocked execution and transport errors remain host failures. Shared handlers return an internal `Outcome<T>` (`{ ok: true, data }` or `{ ok: false, error: { code, message } }`); this envelope is not the Pi wire result. The Claude hook returns rendered text as a string result and sets `isError: true` only on a refusal.
9
+ In Pi codemode and DSH, all shared tools except `notes_read` return strings. Pi and MCP also provide `notes_read` as structured data; in Claude Code it is text only.
14
10
 
15
11
  ```js
16
- const result = await tools.notes_list({ glob: "@project/**" });
17
- if ("error" in result) return result.error;
18
- return result.files;
12
+ const note = await tools.notes_read({ address: "plan.md" });
13
+ return note.text;
19
14
  ```
20
15
 
21
- The text representation uses short mutation receipts, lists, search hits or raw text windows. It reports omissions and errors rather than hiding them. A refusal renders as one line, `error: <code>: <message>`, and the message carries every fact a caller needs to recover, such as the edit index and match lines for a note edit refusal.
16
+ A refusal displays `error: <code>: <message>`. Pi and MCP mark the call as failed (`isError: true`); Pi codemode throws an `Error`, and DSH throws a `HarnessError` with the refusal code. On Pi and MCP, `notes_read` additionally returns `{ error, code }` on refusal.
17
+
18
+ When an edit fails, the message identifies the failing edit and, for ambiguous text, the matching lines.
22
19
 
23
20
  ## Per-call project selection
24
21
 
@@ -26,7 +23,7 @@ All four notes tools accept optional `cwd`. Omitted means the host session's cur
26
23
 
27
24
  ## Read windows
28
25
 
29
- Both read operations return these fields at the result root, alongside identity and metadata:
26
+ `notes_read` returns these fields at the structured result root, alongside identity and metadata:
30
27
 
31
28
  ```ts
32
29
  {
@@ -39,14 +36,14 @@ Both read operations return these fields at the result root, alongside identity
39
36
  Positions count Unicode code points, not UTF-16 units or UTF-8 bytes. The returned text is a contiguous unmodified prefix of the requested range, without ellipsis markers. `next_offset_chars` names the first undelivered character, or is null at the true end. A negative input offset selects a tail; the delivered window does not echo the offset it resolved.
40
37
 
41
38
  - `notes_read`: `address`, optional `project_key`, and `metadata` accompany the text fields. Positions address only the note **body**. Access counts and last-access times remain stored; only `dream_begin` rows report last access.
42
- - `history_read`: `seq`, `role`, `created_at`, and a tool summary accompany the text fields. Explicit session targeting also carries canonical `session`. Positions address one deterministic document derived from the event's facts. Query matches address that same document, not its decorated presentation.
39
+ - `history_read`: the rendered header identifies the seq, role and any tool summary. Explicit session targeting also displays the canonical session. Positions address one deterministic document derived from the event's facts. Query matches address that same document, not its decorated presentation.
43
40
 
44
41
  Repeated note reads observe the current file; this is not a retained snapshot service. A concurrent body edit can change positions. History reflects the active branch and recorded facts, including a result that may arrive after a pending call was first observed.
45
42
 
46
- Text rendering puts identity and relevant metadata above the payload. Only an incomplete read receives a continuation suffix, which says where to continue and nothing about why the window stopped:
43
+ Text rendering puts identity and relevant metadata above the payload. Only an incomplete read receives a continuation suffix, which states how much of the document was delivered and where to resume:
47
44
 
48
45
  ```text
49
- [truncated; continue at offset_chars=12000]
46
+ [truncated at 12000/45000 chars; continue at offset_chars=12000]
50
47
  ```
51
48
 
52
49
  The suffix and presentation header are never part of `text`, search offsets or total character counts. At the end there is no completion footer.
@@ -55,31 +52,55 @@ The suffix and presentation header are never part of `text`, search offsets or t
55
52
 
56
53
  The native adapter allocates seqs from session append order, selects the active branch and decodes facts. Shared history pairs calls and results without allocating a second transcript. A paired execution is addressed by its call seq. Its result's raw slot is not a public event address; list/search provide the canonical seq. Unpaired results remain independently addressable. Inactive-branch addresses are not readable.
57
54
 
58
- Seqs address events across the whole session, including earlier windows. With `session` omitted, list and read headers use `seq <seq> | <role>`; the boot window tree supplies seq ranges for narrowing a list with `after` and `before`. With an explicit selector, returned events/read data carry canonical `session`, headers use `session <harness>:<id> | seq <seq> | <role>`, and all paging/expand/neighborhood recipes carry that same identity. Wildcards accept time bounds only, and report whether more results may exist beyond the page. See [cross-session history](history-sessions.md) for discovery, representative selection and refusal rules.
55
+ Seqs address events across the whole session, including earlier windows. With `session` omitted, headers use `seq <seq> | <role>` plus the event's local ISO timestamp when recorded (`seq <seq> | <role> | <timestamp>`); the boot window tree supplies seq ranges for narrowing `history_list` with `after` and `before`. With an explicit selector, `history_list` and `history_search` print `=== session <harness>:<id> ===` once above that session's rows, `history_read` uses `session <harness>:<id> | seq <seq> | <role> | <timestamp>`, and all paging/expand/neighborhood recipes carry that same identity. Untimed events omit the timestamp segment. Wildcard selectors in `history_list` and `history_search` accept `since` / `until` time bounds and report whether more results may exist beyond the page. See [cross-session history](history-sessions.md) for discovery, representative selection and refusal rules.
59
56
 
60
- Tool events expose `tool`, `tool_status`, and, when recorded, `output_truncated` and `full_output_path`; a truncated run is named even when the host recorded no path, and the full text path is named only when it exists. `history_read` also reports `nested_calls`; a page row does not. Full arguments and nested-call records live only in the searchable/readable document, avoiding a second structured copy on every read.
57
+ Tool event headers expose the tool name, status and, when recorded, truncation and full output path; a truncated run is named even when the host recorded no path, and the full text path is named only when it exists. `history_read` also reports nested-call counts and completeness; a page row does not. Full arguments and nested-call records live only in the searchable/readable document, without duplicating the document.
61
58
 
62
59
  Pi's nested records contain child ID, name, optional arguments, status, timing and error, plus completeness. They contain **no child result bodies**. Absent records do not establish that no nested work occurred. Host-omitted arguments and unfinished calls remain visible as incomplete evidence. Child records belong to their parent event and do not consume seqs.
63
60
 
64
- `history_read` reports `nested_calls.call_count` and `nested_calls.complete` exactly as recorded: the count is every record the host stored, even if the current text slice contains none of them. Continue with `next_offset_chars` to recover the entire recorded document. Both a call's result and an unpaired result carry their recorded evidence; neither invents the call the other one is missing. Query results contain event rows only; folded rows exist only in the browse view.
61
+ `history_read` reports the count and completeness of nested calls exactly as recorded: the count is every record the host stored, even if the current text slice contains none of them. Continue at the displayed `offset_chars` to recover the entire recorded document. Both a call's result and an unpaired result carry their recorded evidence; neither invents the call the other one is missing. Query results contain event rows only; folded rows exist only in the browse view.
65
62
 
66
63
  ## Bounds and continuation
67
64
 
68
- One selection determines the structured result and its text. Both complete representations must fit the 32 KiB output budget, including metadata, cursor and rendered notice. A programmatic caller does not receive an unbounded hidden payload beside a truncated textual one. History operations accept an optional pure text wrapper from the host: selection and read-window checks measure that wrapper around the shared rendering, and the caller must apply the same wrapper at delivery. Host prose stays in its plugin; no final clipping or separate query is involved.
65
+ ### Notes
66
+
67
+ `notes_list` with a non-empty `query` returns only matching notes and displays hit lines with their line numbers and `offset_chars`, plus a count when lines are omitted. `max_matches_per_note` requires a query. `notes_list` shows the newest page and, when more match, ends with `→ older: {…}`: pass that object back to keep reading older notes; it carries `cursor` as `<updated_at> <address>`. Paging continues from the last shown note, so an edited note cannot repeat. Omit `glob` for current notebooks or supply a non-empty glob to narrow or widen the selection.
68
+
69
+ `notes_write` and `notes_update` accept optional `pinned`, `readonly`, and `description` fields (`budget` is a frontmatter-only override, not a model tool parameter). Their receipts and list/search rows display only policy that differs from the note's path defaults (`pinned`, `pinned false` on an unpinned root `CHEATSHEET.md`, `budget <N>`, `readonly`), while read metadata keeps the full effective policy (with `description` included on read metadata and list/search rows when present). Warnings render inside `<notesoup:warning>...</notesoup:warning>` when a body exceeds its UTF-8 byte budget (4096 bytes for root `CHEATSHEET.md`, 8192 bytes for ordinary notes) or when `description` exceeds the boot-index display cap. Both save whole; boot truncates over-budget pinned bodies at the budget boundary (`[truncated at X/Y; offset_chars=X]`) and places warnings outside the note frame. Pi's write/update/read cards display policy and warnings even when collapsed. Pi shows the update diff in the expanded card; the tool response stays a short receipt.
70
+
71
+ A readonly note refuses mutations with `readonly` until explicitly unlocked with `readonly:false`; this is a soft lock, not security. Pin admission refuses a sixth live pin per notebook with `pin_limit`, including restore/move/rename. Invalid policy fields refuse with `invalid_policy`.
69
72
 
70
- `history_list` takes exclusive `after` and `before` bounds. Each accepts a seq (an integer or a digit-only string) or an ISO 8601 time (UTC when no offset is given). With `after`, `limit` counts forward (`after: 0` starts at the oldest event); without it, `limit` counts back from the newest eligible end. Both bounds define a range. Rows always come back oldest first.
73
+ A note read reports unrecognized frontmatter under `metadata.extra`; a value too large to carry, or past the verbatim budget, is named in place as `[omitted: too large]` under its key, and the value itself stays in the note file. A rename receipt displays both source and destination.
71
74
 
72
- With a non-empty `query`, `context: N` includes up to N events on each side of each hit, from the same session’s visible events. `after`, `before`, and `roles` limit hits, not their neighbors. Neighbor rows carry `context: true` and do not count toward `limit`; overlapping windows merge and the same output budget applies. History pages carry boolean `has_older` and `has_newer` flags. To page a single session, use the first non-context item's `seq` as `before` or the last non-context item's `seq` as `after`, with its `session` when present. Keep the search filters on the next call. Wildcard pages suggest narrowing by time, query, roles or session pattern instead. Only single-session browsing without roles folds tool/context runs.
75
+ `notes_update` takes `replace_all` for the whole call and `edits[].replace_all` for one edit; a per-edit value overrides the call default for that edit, so one atomic update can mix unique-match edits with multi-occurrence ones.
73
76
 
74
- `notes_list` with a non-empty `query` returns only matching notes and adds `matches` containing `line`, `text` and `offset_chars`, plus `more_matches` when lines are omitted. `max_matches_per_file` requires a query, as does history's `context`. Queries are literal and case-insensitive; a list matches any entry, ignoring empty entries. An empty or omitted query browses. Notes results are unpaged snapshots with a `more` count. Omit `glob` for current notebooks or supply a non-empty glob to narrow or widen the selection.
77
+ ### Shared bounds
75
78
 
76
- A history read can stop anywhere in the event document, including inside serialized arguments; concatenate its verbatim text slices before parsing any arguments.
79
+ A result fits within 32 KiB of UTF-8, including the headers, notices and continuation footers
80
+ you see. For `notes_read`, the structured result must also fit within 32 KiB when encoded as
81
+ JSON.
77
82
 
78
- `notes_write` and `notes_update` accept optional `pinned`, `budget`, `readonly`, and `description` fields. Their receipts, list/search rows, and read `metadata` expose the effective `pinned`, `budget`, and `readonly` values as structured fields **and visible text** (with `description` included on read metadata and list/search rows when present). Successes also carry a `warnings` array (per file for list/search), rendered visibly when a body exceeds its budget: the default is 4096 Unicode code points for ordinary pages and 2048 for root `CHEATSHEET.md`, adjustable per note. Overflow saves successfully; boot injects full pinned bodies instead of cutting them. Pi's custom write/update/read renderers show policy and warnings even when collapsed, outside the expandable body/diff and clipped summary. A readonly note refuses mutations with `readonly` until explicitly unlocked with `readonly:false`; this is a soft lock, not security. Pin admission refuses a sixth live pin per notebook with `pin_limit`, including restore/move/rename. Invalid policy fields refuse with `invalid_policy`; a `description` over 160 Unicode code points refuses with `invalid_description`.
83
+ Queries are literal and case-insensitive; a list matches any entry, ignoring empty entries. In `notes_list`, an empty or omitted query browses; in `history_search`, `query` is required and an empty query returns no matches.
79
84
 
80
- A note read reports unrecognized frontmatter under `metadata.extra`; a value too large to carry, or past the verbatim budget, is named in place as `[omitted: too large]` under its key rather than delivered in part, and the value itself stays in the note file. A rename receipt uses `address` for the destination and `rename_from` for the source; it has no duplicate `rename_to` field.
85
+ A read that cannot deliver a single advancing character refuses with `output_too_large` rather
86
+ than returning an empty window. A concurrent change to the source can invalidate a previously
87
+ observed offset.
81
88
 
82
- `output_too_large` is not one failure. Each operation's own message says what it means: a read that cannot deliver a single advancing character is refused rather than answered with an empty window, and a search result whose first match line cannot fit is cut to the longest prefix that does and ends with ` [truncated]`. `notes_update` returns a compact policy-bearing receipt plus any budget warning; Pi attaches the rendered diff under `details.diff` for the UI rather than repeating it in model-facing text or `structuredContent`. Narrowing helps only where a parameter genuinely reduces the selection — `glob` or `query`, `roles`, `limit`, `max_chars_per_item`, or an `after`/`before` seq or time range — and cannot help a read whose own metadata is what overflows. History pages refuse with `page_too_large` for the same reason. Nothing is ever quietly delivered short: every other omission is reported on the successful result that carries it.
89
+ A shortened note search match ends with ` [truncated]`; a shortened history preview appends the same ` [truncated]` and names its starting character position as ` | offset_chars <N>` on the header line. The markers are not part of either source document.
90
+
91
+ Narrowing helps only when a parameter actually reduces the selection. A read whose own metadata
92
+ or header overflows cannot be repaired by narrowing a list or search.
93
+
94
+ If a result omits entries or cuts a preview short, it tells you. Text and structured note reads
95
+ refer to the same slice.
96
+
97
+ ### History
98
+
99
+ - `history_list` browses a single timeline in ascending seq order, or lists one representative event per session when given a wildcard `session` (e.g. `*` or `pi:*`). For a single timeline, `after` and `before` are exclusive integer seqs (with `after: 0` starting at the beginning), optional `since` / `until` filter by ISO 8601 time, and without `roles`, tool/context runs fold and don't count against `limit` (use `→ expand` to see them). Follow `→ older` or `→ newer` to keep paging with the same options. For wildcard sessions, `after` / `before` are refused; use `since` / `until` and `roles`.
100
+ - `history_search` finds literal, case-insensitive text (`query` required; a list means any match, and an empty query returns no matches), including tool arguments and output. Search one session or a wildcard such as `*`. Use exclusive ISO 8601 `since` / `until` bounds (local time without an offset); without `since` take the newest matches. `context: N` adds visible neighbors on either side of a hit, even outside its filters, without consuming `limit`. If more results exist, narrow the time range, query, roles or session pattern.
101
+ - `history_read` opens one event using `seq`, the session shown above it if any, and the header's `offset_chars` if shown. Follow `offset_chars` to continue a long read. Concatenate text slices without headers or footers before parsing any recorded arguments.
102
+
103
+ Both list and search default to 20 events or hits/sessions, with a 32 KiB UTF-8 text limit including session headings, notices and footers. Limit previews with `max_chars_per_item`; if a page cannot fit, narrow your request or read a single event.
83
104
 
84
105
  ## Ownership
85
106
 
@@ -90,5 +111,3 @@ A note read reports unrecognized frontmatter under `metadata.extra`; a value too
90
111
  - Host adapters supply base cwd, default identity, projections, optional pure text decoration and transport packaging only; they do not implement separate cwd override algorithms.
91
112
 
92
113
  There is no second query implementation for codemode, no copy of session storage and no migration of user records.
93
-
94
- In single-session browse pages, `items` contains events only. A folded tool/context run appears in `folded_before` on the following event, or in `folded_after` at the end of the page. Folded runs do not count toward the event limit.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "notesoup",
3
- "version": "0.61.0",
3
+ "version": "0.62.0",
4
4
  "type": "module",
5
5
  "main": "./dist/src/index.js",
6
6
  "types": "./dist/src/index.d.ts",
@@ -23,7 +23,7 @@
23
23
  "import": "./dist/plugins/dsh/engine.js"
24
24
  }
25
25
  },
26
- "description": "Host-neutral notes, history and context-window core, with plugins for Pi, Claude Code, the DeepSeek Harness and Codex.",
26
+ "description": "Host-neutral notes, history and context-window core, with plugins for Pi, Claude Code, the DeepSeek Harness, Codex and Antigravity.",
27
27
  "license": "MIT",
28
28
  "keywords": [
29
29
  "pi-package",
@@ -48,6 +48,7 @@
48
48
  "files": [
49
49
  "src",
50
50
  "plugins",
51
+ ".agents/plugins/marketplace.json",
51
52
  "dist",
52
53
  "docs",
53
54
  "LICENSE",
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 `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