notesoup 0.60.1 → 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 -10
  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.d.ts +5 -0
  37. package/dist/src/boot/render.js +60 -28
  38. package/dist/src/boot/text.d.ts +3 -3
  39. package/dist/src/boot/text.js +27 -26
  40. package/dist/src/budget/text.d.ts +2 -2
  41. package/dist/src/budget/text.js +13 -13
  42. package/dist/src/history/claude.d.ts +2 -0
  43. package/dist/src/history/claude.js +46 -0
  44. package/dist/src/history/codex-transcript.js +7 -5
  45. package/dist/src/history/codex.js +3 -0
  46. package/dist/src/history/corpus.d.ts +28 -1
  47. package/dist/src/history/corpus.js +40 -0
  48. package/dist/src/history/history.d.ts +37 -46
  49. package/dist/src/history/history.js +21 -40
  50. package/dist/src/history/local.js +67 -32
  51. package/dist/src/history/pi.d.ts +2 -1
  52. package/dist/src/history/pi.js +122 -48
  53. package/dist/src/history/prefilter.js +76 -19
  54. package/dist/src/history/query.d.ts +28 -49
  55. package/dist/src/history/query.js +83 -68
  56. package/dist/src/history/summary-cache.d.ts +8 -1
  57. package/dist/src/history/summary-cache.js +138 -12
  58. package/dist/src/index.d.ts +1 -1
  59. package/dist/src/index.js +1 -1
  60. package/dist/src/notes/frontmatter.d.ts +4 -0
  61. package/dist/src/notes/frontmatter.js +15 -1
  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 +47 -6
  66. package/dist/src/notes/store.d.ts +14 -0
  67. package/dist/src/notes/store.js +33 -12
  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 -91
  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 +58 -160
  75. package/dist/src/tools/notes.js +151 -99
  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 +189 -56
  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 +4 -4
  115. package/docs/history-sessions.md +28 -50
  116. package/docs/notes-library.md +6 -6
  117. package/docs/reset-lifecycle.md +1 -1
  118. package/docs/skills.md +3 -3
  119. package/docs/tool-results.md +47 -28
  120. package/package.json +3 -2
  121. package/playbook.md +3 -3
  122. package/plugins/antigravity/dist/antigravity/notesoup.js +26886 -0
  123. package/plugins/antigravity/hooks.json +7 -0
  124. package/plugins/antigravity/mcp_config.json +8 -0
  125. package/plugins/antigravity/plugin.json +6 -0
  126. package/plugins/antigravity/src/cli.ts +22 -0
  127. package/plugins/antigravity/src/hooks.ts +51 -0
  128. package/plugins/antigravity/src/identity.ts +127 -0
  129. package/plugins/claude/.claude-plugin/plugin.json +1 -1
  130. package/plugins/claude/dist/claude/helper.js +1129 -549
  131. package/plugins/claude/hooks/register.ts +2 -2
  132. package/plugins/claude/playbook.md +3 -3
  133. package/plugins/claude/skills/dream/SKILL.md +2 -2
  134. package/plugins/claude/skills/notesoup/SKILL.md +92 -0
  135. package/plugins/claude/src/helper.ts +2 -1
  136. package/plugins/codex/.codex-plugin/plugin.json +8 -0
  137. package/plugins/codex/.mcp.json +11 -0
  138. package/plugins/codex/README.md +5 -21
  139. package/plugins/codex/dist/codex/notesoup.js +18494 -17905
  140. package/plugins/codex/src/hooks.ts +1 -0
  141. package/plugins/codex/src/identity.ts +14 -1
  142. package/plugins/codex/src/mcp.ts +28 -98
  143. package/plugins/codex/src/text.ts +3 -3
  144. package/plugins/dsh/tools.ts +8 -4
  145. package/plugins/mcp/operations.ts +50 -0
  146. package/plugins/mcp/server.ts +23 -0
  147. package/plugins/paseo/README.md +5 -10
  148. package/plugins/paseo/client/brain-empty-card.tsx +3 -3
  149. package/plugins/paseo/client/markdown.tsx +50 -38
  150. package/plugins/paseo/client/notes-op-card.tsx +12 -9
  151. package/plugins/paseo/client/paper-card.tsx +6 -5
  152. package/plugins/paseo/client/paper-palette.ts +2 -9
  153. package/plugins/paseo/client/sticky-card.tsx +2 -2
  154. package/plugins/paseo/client/tool-result.ts +7 -14
  155. package/plugins/paseo/package-lock.json +3406 -0
  156. package/plugins/paseo/package.json +1 -0
  157. package/plugins/paseo/test/markdown-core.test.ts +73 -66
  158. package/plugins/pi/budget.ts +3 -3
  159. package/plugins/pi/entries.ts +1 -0
  160. package/plugins/pi/history-tools.ts +2 -1
  161. package/plugins/pi/history.ts +30 -1
  162. package/plugins/pi/notes/tools.ts +7 -3
  163. package/plugins/pi/render.ts +6 -6
  164. package/plugins/pi/reset/lifecycle.ts +9 -10
  165. package/plugins/pi/runtime.ts +96 -60
  166. package/plugins/pi/tool-result.ts +8 -8
  167. package/plugins/pi/window.ts +198 -9
  168. package/skills/dream/SKILL.md +2 -2
  169. package/skills/notesoup/SKILL.md +92 -0
  170. package/src/boot/render.ts +59 -25
  171. package/src/boot/text.ts +30 -27
  172. package/src/budget/text.ts +13 -13
  173. package/src/history/claude.ts +41 -0
  174. package/src/history/codex-transcript.ts +6 -4
  175. package/src/history/codex.ts +2 -0
  176. package/src/history/corpus.ts +51 -2
  177. package/src/history/history.ts +35 -44
  178. package/src/history/local.ts +67 -27
  179. package/src/history/pi.ts +113 -35
  180. package/src/history/prefilter.ts +73 -15
  181. package/src/history/query.ts +93 -73
  182. package/src/history/summary-cache.ts +142 -17
  183. package/src/index.ts +1 -1
  184. package/src/notes/frontmatter.ts +16 -1
  185. package/src/notes/index.ts +1 -1
  186. package/src/notes/policy.ts +45 -6
  187. package/src/notes/store.ts +30 -15
  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 +150 -112
  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,4 +1,5 @@
1
1
  import type { PluginTheme } from "@getpaseo/plugin";
2
+ import { isDarkTheme } from "@astrosheep/paseo-ui/theme";
2
3
 
3
4
  const LIGHT_PAPER = {
4
5
  background: "#faf7f0",
@@ -27,15 +28,7 @@ const DARK_PAPER: PaperPalette = {
27
28
  tapeEdge: "rgba(218, 195, 134, 0.16)",
28
29
  };
29
30
 
30
- /** Paseo theme colors are hex (#RGB, #RRGGBB or #RRGGBBAA). */
31
- function brightness(hex: string): number {
32
- const rgb = hex.length === 4 ? hex.slice(1).replace(/./g, digit => digit + digit) : hex.slice(1, 7);
33
- return 0.299 * parseInt(rgb.slice(0, 2), 16)
34
- + 0.587 * parseInt(rgb.slice(2, 4), 16)
35
- + 0.114 * parseInt(rgb.slice(4, 6), 16);
36
- }
37
-
38
31
  export function paperPalette(theme: PluginTheme): PaperPalette {
39
32
  // The SDK exposes colors, not appearance. Use the host theme, never the OS color scheme.
40
- return brightness(theme.colors.foreground) > brightness(theme.colors.surface0) ? DARK_PAPER : LIGHT_PAPER;
33
+ return isDarkTheme(theme) ? DARK_PAPER : LIGHT_PAPER;
41
34
  }
@@ -3,14 +3,14 @@ import { Text } from "react-native";
3
3
  import type { LastWord } from "../shared/last-word.ts";
4
4
  import { PaperCard } from "./paper-card.tsx";
5
5
  import { paperPalette } from "./paper-palette.ts";
6
- import { typography } from "./typography.ts";
6
+ import { typography } from "@astrosheep/paseo-ui/theme";
7
7
 
8
8
  export function StickyCard({ item, layout, theme }: PluginTimelineItemProps<LastWord>) {
9
9
  const paper = paperPalette(theme);
10
10
  const text = item.data.text.replace(/^\*You peel a sticky note off your forehead\.\*\n/, "");
11
11
  return (
12
12
  <PaperCard paper={paper} compact={layout.compact}>
13
- <Text selectable style={{ ...typography(theme).body, color: paper.ink, flexShrink: 1 }}>{text}</Text>
13
+ <Text selectable style={{ ...typography(theme, layout.platform).body, color: paper.ink, flexShrink: 1 }}>{text}</Text>
14
14
  </PaperCard>
15
15
  );
16
16
  }
@@ -1,3 +1,5 @@
1
+ import { extractToolEnvelope, stripToolPrefix } from "@astrosheep/paseo-ui/envelope";
2
+
1
3
  // Paseo's Pi and Claude adapters use different tool-result envelopes.
2
4
  export function isRecord(value: unknown): value is Record<string, unknown> {
3
5
  return typeof value === "object" && value !== null;
@@ -5,27 +7,18 @@ export function isRecord(value: unknown): value is Record<string, unknown> {
5
7
 
6
8
  /** Strip only Notesoup's exact MCP server prefix, never another server's. */
7
9
  export function notesoupToolName(name: string): string {
8
- const prefix = "mcp__notesoup__";
9
- return name.startsWith(prefix) ? name.slice(prefix.length) : name;
10
- }
11
-
12
- function textContent(content: unknown): string | undefined {
13
- if (typeof content === "string") return content;
14
- if (!Array.isArray(content)) return undefined;
15
- const parts = content.filter(isRecord).filter((block) => block.type === "text" && typeof block.text === "string");
16
- return parts.length > 0 ? parts.map((block) => block.text as string).join("\n") : undefined;
10
+ if (!name.startsWith("mcp__notesoup__")) return name;
11
+ return stripToolPrefix(name, "notesoup") ?? name;
17
12
  }
18
13
 
19
14
  /** Pi live/history: content blocks. Claude: buildToolOutput's output field. */
20
15
  export function resultText(output: unknown): string | undefined {
21
16
  if (!isRecord(output)) return undefined;
22
- return textContent(output.content) ?? (typeof output.output === "string" ? output.output : undefined);
17
+ return extractToolEnvelope(output).text;
23
18
  }
24
19
 
25
20
  /** Claude failures have no output; handleToolResult preserves the raw block in error. */
26
21
  export function resultError(output: unknown, error: unknown): string {
27
- return resultText(output)
28
- ?? (typeof error === "string" ? error : undefined)
29
- ?? (isRecord(error) ? textContent(error.content) ?? (typeof error.message === "string" ? error.message : undefined) : undefined)
30
- ?? "failed";
22
+ const envelope = extractToolEnvelope(isRecord(output) ? output : undefined, error);
23
+ return envelope.text ?? envelope.errorFull ?? "failed";
31
24
  }