@agentmemory/agentmemory 0.9.30 → 0.9.32

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 (334) hide show
  1. package/.env.example +57 -48
  2. package/AGENTS.md +8 -8
  3. package/README.md +256 -819
  4. package/dist/.env.example +57 -48
  5. package/dist/cli.d.mts.map +1 -1
  6. package/dist/cli.mjs +2257 -1027
  7. package/dist/cli.mjs.map +1 -1
  8. package/dist/compression-recovery-CZh63Jmz.mjs +5997 -0
  9. package/dist/compression-recovery-CZh63Jmz.mjs.map +1 -0
  10. package/dist/{connect-B4_ca6BD.mjs → connect-BX3njQ3Y.mjs} +897 -276
  11. package/dist/connect-BX3njQ3Y.mjs.map +1 -0
  12. package/dist/hooks/_capture.d.mts +5 -1
  13. package/dist/hooks/_capture.d.mts.map +1 -1
  14. package/dist/hooks/_capture.mjs +141 -26
  15. package/dist/hooks/_capture.mjs.map +1 -1
  16. package/dist/hooks/notification.mjs +20 -6
  17. package/dist/hooks/notification.mjs.map +1 -1
  18. package/dist/hooks/post-commit.mjs +83 -10
  19. package/dist/hooks/post-commit.mjs.map +1 -1
  20. package/dist/hooks/post-tool-failure.mjs +19 -6
  21. package/dist/hooks/post-tool-failure.mjs.map +1 -1
  22. package/dist/hooks/post-tool-use.mjs +19 -6
  23. package/dist/hooks/post-tool-use.mjs.map +1 -1
  24. package/dist/hooks/pre-compact.mjs +104 -22
  25. package/dist/hooks/pre-compact.mjs.map +1 -1
  26. package/dist/hooks/pre-tool-use.mjs +83 -10
  27. package/dist/hooks/pre-tool-use.mjs.map +1 -1
  28. package/dist/hooks/prompt-submit.mjs +12 -4
  29. package/dist/hooks/prompt-submit.mjs.map +1 -1
  30. package/dist/hooks/session-end.mjs +59 -17
  31. package/dist/hooks/session-end.mjs.map +1 -1
  32. package/dist/hooks/session-start.mjs +95 -15
  33. package/dist/hooks/session-start.mjs.map +1 -1
  34. package/dist/hooks/stop.mjs +75 -72
  35. package/dist/hooks/stop.mjs.map +1 -1
  36. package/dist/hooks/subagent-start.mjs +13 -5
  37. package/dist/hooks/subagent-start.mjs.map +1 -1
  38. package/dist/hooks/subagent-stop.mjs +32 -10
  39. package/dist/hooks/subagent-stop.mjs.map +1 -1
  40. package/dist/hooks/task-completed.mjs +21 -6
  41. package/dist/hooks/task-completed.mjs.map +1 -1
  42. package/dist/{image-refs-T_urbwHM.mjs → image-refs-Cyta4Lf9.mjs} +2 -2
  43. package/dist/{image-refs-T_urbwHM.mjs.map → image-refs-Cyta4Lf9.mjs.map} +1 -1
  44. package/dist/index.mjs +16390 -11530
  45. package/dist/index.mjs.map +1 -1
  46. package/dist/integrations/dsh.d.mts +55 -0
  47. package/dist/integrations/dsh.d.mts.map +1 -0
  48. package/dist/integrations/dsh.mjs +1172 -0
  49. package/dist/integrations/dsh.mjs.map +1 -0
  50. package/dist/{keyed-mutex-DchXsyfP.mjs → keyed-mutex-DCUh7PG-.mjs} +58 -9
  51. package/dist/keyed-mutex-DCUh7PG-.mjs.map +1 -0
  52. package/dist/{secret-store-BnY3A50C.mjs → secret-store-iYXRcrO8.mjs} +717 -474
  53. package/dist/secret-store-iYXRcrO8.mjs.map +1 -0
  54. package/dist/session-arguments-zxsbbd8y.mjs +113 -0
  55. package/dist/session-arguments-zxsbbd8y.mjs.map +1 -0
  56. package/dist/{src-Jsq9LCeH.mjs → src-C23nMpda.mjs} +5263 -4667
  57. package/dist/src-C23nMpda.mjs.map +1 -0
  58. package/dist/{standalone-DKCdrf1d.mjs → standalone-BYo5USDb.mjs} +379 -63
  59. package/dist/standalone-BYo5USDb.mjs.map +1 -0
  60. package/dist/standalone.d.mts +1 -1
  61. package/dist/standalone.d.mts.map +1 -1
  62. package/dist/standalone.mjs +864 -81
  63. package/dist/standalone.mjs.map +1 -1
  64. package/dist/viewer/index.html +337 -168
  65. package/integrations/hermes/README.md +94 -0
  66. package/integrations/hermes/__init__.py +670 -0
  67. package/integrations/hermes/plugin.yaml +27 -0
  68. package/integrations/omp/LICENSE +190 -0
  69. package/integrations/omp/README.md +76 -0
  70. package/integrations/omp/capture.ts +1 -0
  71. package/integrations/omp/dist/index.mjs +1477 -0
  72. package/integrations/omp/index.ts +488 -0
  73. package/integrations/omp/package.json +13 -0
  74. package/integrations/omp/security.ts +67 -0
  75. package/integrations/omp/skills/agentmemory-agents/REFERENCE.md +32 -0
  76. package/integrations/omp/skills/agentmemory-agents/SKILL.md +48 -0
  77. package/integrations/omp/skills/agentmemory-agents/TROUBLESHOOTING.md +70 -0
  78. package/integrations/omp/skills/agentmemory-architecture/SKILL.md +37 -0
  79. package/integrations/omp/skills/agentmemory-architecture/TROUBLESHOOTING.md +70 -0
  80. package/integrations/omp/skills/agentmemory-config/REFERENCE.md +91 -0
  81. package/integrations/omp/skills/agentmemory-config/SKILL.md +98 -0
  82. package/integrations/omp/skills/agentmemory-config/TROUBLESHOOTING.md +70 -0
  83. package/integrations/omp/skills/agentmemory-hooks/REFERENCE.md +20 -0
  84. package/integrations/omp/skills/agentmemory-hooks/SKILL.md +60 -0
  85. package/integrations/omp/skills/agentmemory-hooks/TROUBLESHOOTING.md +70 -0
  86. package/integrations/omp/skills/agentmemory-mcp-tools/REFERENCE.md +66 -0
  87. package/integrations/omp/skills/agentmemory-mcp-tools/SKILL.md +52 -0
  88. package/integrations/omp/skills/agentmemory-mcp-tools/TROUBLESHOOTING.md +70 -0
  89. package/integrations/omp/skills/agentmemory-rest-api/REFERENCE.md +159 -0
  90. package/integrations/omp/skills/agentmemory-rest-api/SKILL.md +49 -0
  91. package/integrations/omp/skills/agentmemory-rest-api/TROUBLESHOOTING.md +70 -0
  92. package/integrations/omp/skills/commit-context/EXAMPLES.md +71 -0
  93. package/integrations/omp/skills/commit-context/SKILL.md +64 -0
  94. package/integrations/omp/skills/commit-context/TROUBLESHOOTING.md +70 -0
  95. package/integrations/omp/skills/commit-history/EXAMPLES.md +71 -0
  96. package/integrations/omp/skills/commit-history/SKILL.md +62 -0
  97. package/integrations/omp/skills/commit-history/TROUBLESHOOTING.md +70 -0
  98. package/integrations/omp/skills/forget/EXAMPLES.md +40 -0
  99. package/integrations/omp/skills/forget/SKILL.md +73 -0
  100. package/integrations/omp/skills/forget/TROUBLESHOOTING.md +70 -0
  101. package/integrations/omp/skills/handoff/EXAMPLES.md +57 -0
  102. package/integrations/omp/skills/handoff/SKILL.md +75 -0
  103. package/integrations/omp/skills/handoff/TROUBLESHOOTING.md +70 -0
  104. package/integrations/omp/skills/lesson/SKILL.md +64 -0
  105. package/integrations/omp/skills/lesson/TROUBLESHOOTING.md +70 -0
  106. package/integrations/omp/skills/memory-discipline/SKILL.md +65 -0
  107. package/integrations/omp/skills/memory-discipline/TROUBLESHOOTING.md +70 -0
  108. package/integrations/omp/skills/recall/EXAMPLES.md +74 -0
  109. package/integrations/omp/skills/recall/SKILL.md +74 -0
  110. package/integrations/omp/skills/recall/TROUBLESHOOTING.md +70 -0
  111. package/integrations/omp/skills/recap/EXAMPLES.md +62 -0
  112. package/integrations/omp/skills/recap/SKILL.md +68 -0
  113. package/integrations/omp/skills/recap/TROUBLESHOOTING.md +70 -0
  114. package/integrations/omp/skills/remember/EXAMPLES.md +67 -0
  115. package/integrations/omp/skills/remember/SKILL.md +66 -0
  116. package/integrations/omp/skills/remember/TROUBLESHOOTING.md +70 -0
  117. package/integrations/omp/skills/session-history/EXAMPLES.md +59 -0
  118. package/integrations/omp/skills/session-history/SKILL.md +67 -0
  119. package/integrations/omp/skills/session-history/TROUBLESHOOTING.md +70 -0
  120. package/integrations/omp/skills/write-agentmemory-skill/SKILL.md +41 -0
  121. package/integrations/omp/skills/write-agentmemory-skill/TROUBLESHOOTING.md +70 -0
  122. package/integrations/openclaw/LICENSE +190 -0
  123. package/integrations/openclaw/README.md +98 -0
  124. package/integrations/openclaw/openclaw.plugin.json +71 -0
  125. package/integrations/openclaw/package.json +38 -0
  126. package/integrations/openclaw/plugin.mjs +425 -0
  127. package/integrations/openclaw/plugin.yaml +26 -0
  128. package/integrations/openclaw/skills/agentmemory-agents/REFERENCE.md +32 -0
  129. package/integrations/openclaw/skills/agentmemory-agents/SKILL.md +48 -0
  130. package/integrations/openclaw/skills/agentmemory-agents/TROUBLESHOOTING.md +70 -0
  131. package/integrations/openclaw/skills/agentmemory-architecture/SKILL.md +37 -0
  132. package/integrations/openclaw/skills/agentmemory-architecture/TROUBLESHOOTING.md +70 -0
  133. package/integrations/openclaw/skills/agentmemory-config/REFERENCE.md +91 -0
  134. package/integrations/openclaw/skills/agentmemory-config/SKILL.md +98 -0
  135. package/integrations/openclaw/skills/agentmemory-config/TROUBLESHOOTING.md +70 -0
  136. package/integrations/openclaw/skills/agentmemory-hooks/REFERENCE.md +20 -0
  137. package/integrations/openclaw/skills/agentmemory-hooks/SKILL.md +60 -0
  138. package/integrations/openclaw/skills/agentmemory-hooks/TROUBLESHOOTING.md +70 -0
  139. package/integrations/openclaw/skills/agentmemory-mcp-tools/REFERENCE.md +66 -0
  140. package/integrations/openclaw/skills/agentmemory-mcp-tools/SKILL.md +52 -0
  141. package/integrations/openclaw/skills/agentmemory-mcp-tools/TROUBLESHOOTING.md +70 -0
  142. package/integrations/openclaw/skills/agentmemory-rest-api/REFERENCE.md +159 -0
  143. package/integrations/openclaw/skills/agentmemory-rest-api/SKILL.md +49 -0
  144. package/integrations/openclaw/skills/agentmemory-rest-api/TROUBLESHOOTING.md +70 -0
  145. package/integrations/openclaw/skills/commit-context/EXAMPLES.md +71 -0
  146. package/integrations/openclaw/skills/commit-context/SKILL.md +64 -0
  147. package/integrations/openclaw/skills/commit-context/TROUBLESHOOTING.md +70 -0
  148. package/integrations/openclaw/skills/commit-history/EXAMPLES.md +71 -0
  149. package/integrations/openclaw/skills/commit-history/SKILL.md +62 -0
  150. package/integrations/openclaw/skills/commit-history/TROUBLESHOOTING.md +70 -0
  151. package/integrations/openclaw/skills/forget/EXAMPLES.md +40 -0
  152. package/integrations/openclaw/skills/forget/SKILL.md +73 -0
  153. package/integrations/openclaw/skills/forget/TROUBLESHOOTING.md +70 -0
  154. package/integrations/openclaw/skills/handoff/EXAMPLES.md +57 -0
  155. package/integrations/openclaw/skills/handoff/SKILL.md +75 -0
  156. package/integrations/openclaw/skills/handoff/TROUBLESHOOTING.md +70 -0
  157. package/integrations/openclaw/skills/lesson/SKILL.md +64 -0
  158. package/integrations/openclaw/skills/lesson/TROUBLESHOOTING.md +70 -0
  159. package/integrations/openclaw/skills/memory-discipline/SKILL.md +65 -0
  160. package/integrations/openclaw/skills/memory-discipline/TROUBLESHOOTING.md +70 -0
  161. package/integrations/openclaw/skills/recall/EXAMPLES.md +74 -0
  162. package/integrations/openclaw/skills/recall/SKILL.md +74 -0
  163. package/integrations/openclaw/skills/recall/TROUBLESHOOTING.md +70 -0
  164. package/integrations/openclaw/skills/recap/EXAMPLES.md +62 -0
  165. package/integrations/openclaw/skills/recap/SKILL.md +68 -0
  166. package/integrations/openclaw/skills/recap/TROUBLESHOOTING.md +70 -0
  167. package/integrations/openclaw/skills/remember/EXAMPLES.md +67 -0
  168. package/integrations/openclaw/skills/remember/SKILL.md +66 -0
  169. package/integrations/openclaw/skills/remember/TROUBLESHOOTING.md +70 -0
  170. package/integrations/openclaw/skills/session-history/EXAMPLES.md +59 -0
  171. package/integrations/openclaw/skills/session-history/SKILL.md +67 -0
  172. package/integrations/openclaw/skills/session-history/TROUBLESHOOTING.md +70 -0
  173. package/integrations/openclaw/skills/write-agentmemory-skill/SKILL.md +41 -0
  174. package/integrations/openclaw/skills/write-agentmemory-skill/TROUBLESHOOTING.md +70 -0
  175. package/integrations/pi/LICENSE +190 -0
  176. package/integrations/pi/README.md +46 -51
  177. package/integrations/pi/dist/index.mjs +1460 -0
  178. package/integrations/pi/index.ts +192 -175
  179. package/integrations/pi/package.json +17 -7
  180. package/integrations/pi/security.ts +6 -26
  181. package/integrations/pi/skills/agentmemory-agents/REFERENCE.md +32 -0
  182. package/integrations/pi/skills/agentmemory-agents/SKILL.md +48 -0
  183. package/integrations/pi/skills/agentmemory-agents/TROUBLESHOOTING.md +70 -0
  184. package/integrations/pi/skills/agentmemory-architecture/SKILL.md +37 -0
  185. package/integrations/pi/skills/agentmemory-architecture/TROUBLESHOOTING.md +70 -0
  186. package/integrations/pi/skills/agentmemory-config/REFERENCE.md +91 -0
  187. package/integrations/pi/skills/agentmemory-config/SKILL.md +98 -0
  188. package/integrations/pi/skills/agentmemory-config/TROUBLESHOOTING.md +70 -0
  189. package/integrations/pi/skills/agentmemory-hooks/REFERENCE.md +20 -0
  190. package/integrations/pi/skills/agentmemory-hooks/SKILL.md +60 -0
  191. package/integrations/pi/skills/agentmemory-hooks/TROUBLESHOOTING.md +70 -0
  192. package/integrations/pi/skills/agentmemory-mcp-tools/REFERENCE.md +66 -0
  193. package/integrations/pi/skills/agentmemory-mcp-tools/SKILL.md +52 -0
  194. package/integrations/pi/skills/agentmemory-mcp-tools/TROUBLESHOOTING.md +70 -0
  195. package/integrations/pi/skills/agentmemory-rest-api/REFERENCE.md +159 -0
  196. package/integrations/pi/skills/agentmemory-rest-api/SKILL.md +49 -0
  197. package/integrations/pi/skills/agentmemory-rest-api/TROUBLESHOOTING.md +70 -0
  198. package/integrations/pi/skills/commit-context/EXAMPLES.md +71 -0
  199. package/integrations/pi/skills/commit-context/SKILL.md +64 -0
  200. package/integrations/pi/skills/commit-context/TROUBLESHOOTING.md +70 -0
  201. package/integrations/pi/skills/commit-history/EXAMPLES.md +71 -0
  202. package/integrations/pi/skills/commit-history/SKILL.md +62 -0
  203. package/integrations/pi/skills/commit-history/TROUBLESHOOTING.md +70 -0
  204. package/integrations/pi/skills/forget/EXAMPLES.md +40 -0
  205. package/integrations/pi/skills/forget/SKILL.md +73 -0
  206. package/integrations/pi/skills/forget/TROUBLESHOOTING.md +70 -0
  207. package/integrations/pi/skills/handoff/EXAMPLES.md +57 -0
  208. package/integrations/pi/skills/handoff/SKILL.md +75 -0
  209. package/integrations/pi/skills/handoff/TROUBLESHOOTING.md +70 -0
  210. package/integrations/pi/skills/lesson/SKILL.md +64 -0
  211. package/integrations/pi/skills/lesson/TROUBLESHOOTING.md +70 -0
  212. package/integrations/pi/skills/memory-discipline/SKILL.md +65 -0
  213. package/integrations/pi/skills/memory-discipline/TROUBLESHOOTING.md +70 -0
  214. package/integrations/pi/skills/recall/EXAMPLES.md +74 -0
  215. package/integrations/pi/skills/recall/SKILL.md +74 -0
  216. package/integrations/pi/skills/recall/TROUBLESHOOTING.md +70 -0
  217. package/integrations/pi/skills/recap/EXAMPLES.md +62 -0
  218. package/integrations/pi/skills/recap/SKILL.md +68 -0
  219. package/integrations/pi/skills/recap/TROUBLESHOOTING.md +70 -0
  220. package/integrations/pi/skills/remember/EXAMPLES.md +67 -0
  221. package/integrations/pi/skills/remember/SKILL.md +66 -0
  222. package/integrations/pi/skills/remember/TROUBLESHOOTING.md +70 -0
  223. package/integrations/pi/skills/session-history/EXAMPLES.md +59 -0
  224. package/integrations/pi/skills/session-history/SKILL.md +67 -0
  225. package/integrations/pi/skills/session-history/TROUBLESHOOTING.md +70 -0
  226. package/integrations/pi/skills/write-agentmemory-skill/SKILL.md +41 -0
  227. package/integrations/pi/skills/write-agentmemory-skill/TROUBLESHOOTING.md +70 -0
  228. package/package.json +33 -11
  229. package/plugin/.claude-plugin/plugin.json +16 -3
  230. package/plugin/.codex-plugin/plugin.json +4 -3
  231. package/plugin/.devin-plugin/plugin.json +6 -5
  232. package/plugin/.mcp.json +5 -1
  233. package/plugin/README.md +71 -0
  234. package/plugin/cursor/hooks.json +23 -8
  235. package/plugin/hooks/hooks.json +24 -12
  236. package/plugin/hooks.json +67 -0
  237. package/plugin/opencode/README.md +1 -1
  238. package/plugin/opencode/agentmemory-capture.ts +25 -11
  239. package/plugin/opencode/plugin.json +1 -1
  240. package/plugin/plugin.json +1 -1
  241. package/plugin/scripts/_capture.d.mts +5 -1
  242. package/plugin/scripts/_capture.d.mts.map +1 -1
  243. package/plugin/scripts/_capture.mjs +141 -26
  244. package/plugin/scripts/_capture.mjs.map +1 -1
  245. package/plugin/scripts/cursor/run-detached.mjs +786 -0
  246. package/plugin/scripts/cursor/run-detached.mjs.map +1 -0
  247. package/plugin/scripts/cursor/run-hook.d.mts +1 -0
  248. package/plugin/scripts/cursor/run-hook.mjs +704 -0
  249. package/plugin/scripts/cursor/run-hook.mjs.map +1 -0
  250. package/plugin/scripts/notification.mjs +20 -6
  251. package/plugin/scripts/notification.mjs.map +1 -1
  252. package/plugin/scripts/plugin-bridge.mjs +61 -11
  253. package/plugin/scripts/post-tool-failure.mjs +19 -6
  254. package/plugin/scripts/post-tool-failure.mjs.map +1 -1
  255. package/plugin/scripts/post-tool-use.mjs +19 -6
  256. package/plugin/scripts/post-tool-use.mjs.map +1 -1
  257. package/plugin/scripts/pre-compact.mjs +104 -22
  258. package/plugin/scripts/pre-compact.mjs.map +1 -1
  259. package/plugin/scripts/pre-tool-use.mjs +83 -10
  260. package/plugin/scripts/pre-tool-use.mjs.map +1 -1
  261. package/plugin/scripts/prompt-submit.mjs +12 -4
  262. package/plugin/scripts/prompt-submit.mjs.map +1 -1
  263. package/plugin/scripts/session-end.mjs +59 -17
  264. package/plugin/scripts/session-end.mjs.map +1 -1
  265. package/plugin/scripts/session-start.mjs +95 -15
  266. package/plugin/scripts/session-start.mjs.map +1 -1
  267. package/plugin/scripts/stop.mjs +75 -72
  268. package/plugin/scripts/stop.mjs.map +1 -1
  269. package/plugin/scripts/subagent-start.mjs +13 -5
  270. package/plugin/scripts/subagent-start.mjs.map +1 -1
  271. package/plugin/scripts/subagent-stop.mjs +32 -10
  272. package/plugin/scripts/subagent-stop.mjs.map +1 -1
  273. package/plugin/scripts/task-completed.mjs +21 -6
  274. package/plugin/scripts/task-completed.mjs.map +1 -1
  275. package/plugin/skills/_shared/TROUBLESHOOTING.md +21 -7
  276. package/plugin/skills/agentmemory-agents/REFERENCE.md +8 -7
  277. package/plugin/skills/agentmemory-agents/SKILL.md +19 -5
  278. package/plugin/skills/agentmemory-agents/TROUBLESHOOTING.md +70 -0
  279. package/plugin/skills/agentmemory-architecture/SKILL.md +8 -4
  280. package/plugin/skills/agentmemory-architecture/TROUBLESHOOTING.md +70 -0
  281. package/plugin/skills/agentmemory-config/REFERENCE.md +13 -15
  282. package/plugin/skills/agentmemory-config/SKILL.md +34 -10
  283. package/plugin/skills/agentmemory-config/TROUBLESHOOTING.md +70 -0
  284. package/plugin/skills/agentmemory-hooks/SKILL.md +31 -10
  285. package/plugin/skills/agentmemory-hooks/TROUBLESHOOTING.md +70 -0
  286. package/plugin/skills/agentmemory-mcp-tools/REFERENCE.md +5 -5
  287. package/plugin/skills/agentmemory-mcp-tools/SKILL.md +16 -3
  288. package/plugin/skills/agentmemory-mcp-tools/TROUBLESHOOTING.md +70 -0
  289. package/plugin/skills/agentmemory-rest-api/REFERENCE.md +10 -1
  290. package/plugin/skills/agentmemory-rest-api/SKILL.md +12 -6
  291. package/plugin/skills/agentmemory-rest-api/TROUBLESHOOTING.md +70 -0
  292. package/plugin/skills/commit-context/SKILL.md +1 -1
  293. package/plugin/skills/commit-context/TROUBLESHOOTING.md +70 -0
  294. package/plugin/skills/commit-history/SKILL.md +1 -1
  295. package/plugin/skills/commit-history/TROUBLESHOOTING.md +70 -0
  296. package/plugin/skills/forget/EXAMPLES.md +19 -54
  297. package/plugin/skills/forget/SKILL.md +16 -12
  298. package/plugin/skills/forget/TROUBLESHOOTING.md +70 -0
  299. package/plugin/skills/handoff/EXAMPLES.md +5 -4
  300. package/plugin/skills/handoff/SKILL.md +10 -5
  301. package/plugin/skills/handoff/TROUBLESHOOTING.md +70 -0
  302. package/plugin/skills/lesson/SKILL.md +1 -1
  303. package/plugin/skills/lesson/TROUBLESHOOTING.md +70 -0
  304. package/plugin/skills/memory-discipline/SKILL.md +1 -1
  305. package/plugin/skills/memory-discipline/TROUBLESHOOTING.md +70 -0
  306. package/plugin/skills/recall/SKILL.md +18 -7
  307. package/plugin/skills/recall/TROUBLESHOOTING.md +70 -0
  308. package/plugin/skills/recap/EXAMPLES.md +5 -3
  309. package/plugin/skills/recap/SKILL.md +11 -6
  310. package/plugin/skills/recap/TROUBLESHOOTING.md +70 -0
  311. package/plugin/skills/remember/EXAMPLES.md +3 -3
  312. package/plugin/skills/remember/SKILL.md +1 -1
  313. package/plugin/skills/remember/TROUBLESHOOTING.md +70 -0
  314. package/plugin/skills/session-history/EXAMPLES.md +2 -2
  315. package/plugin/skills/session-history/SKILL.md +10 -4
  316. package/plugin/skills/session-history/TROUBLESHOOTING.md +70 -0
  317. package/plugin/skills/write-agentmemory-skill/SKILL.md +2 -1
  318. package/plugin/skills/write-agentmemory-skill/TROUBLESHOOTING.md +70 -0
  319. package/dist/connect-B4_ca6BD.mjs.map +0 -1
  320. package/dist/docker-compose.yml +0 -73
  321. package/dist/iii-config.docker.yaml +0 -53
  322. package/dist/iii-config.yaml +0 -63
  323. package/dist/keyed-mutex-DchXsyfP.mjs.map +0 -1
  324. package/dist/secret-store-BnY3A50C.mjs.map +0 -1
  325. package/dist/src-Jsq9LCeH.mjs.map +0 -1
  326. package/dist/standalone-DKCdrf1d.mjs.map +0 -1
  327. package/dist/status-IRz7ta8-.mjs +0 -2344
  328. package/dist/status-IRz7ta8-.mjs.map +0 -1
  329. package/docker-compose.yml +0 -73
  330. package/iii-config.docker.yaml +0 -53
  331. package/iii-config.yaml +0 -63
  332. package/plugin/scripts/post-commit.mjs +0 -184
  333. package/plugin/scripts/post-commit.mjs.map +0 -1
  334. /package/plugin/scripts/{post-commit.d.mts → cursor/run-detached.d.mts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentmemory/agentmemory",
3
- "version": "0.9.30",
3
+ "version": "0.9.32",
4
4
  "description": "Persistent memory for AI coding agents, powered by iii-engine's three primitives",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",
@@ -17,27 +17,43 @@
17
17
  "agentmemory": "dist/cli.mjs"
18
18
  },
19
19
  "scripts": {
20
- "build": "tsdown && (cp iii-config.yaml dist/ 2>/dev/null || true) && (cp iii-config.docker.yaml dist/ 2>/dev/null || true) && (cp docker-compose.yml dist/ 2>/dev/null || true) && (cp .env.example dist/ 2>/dev/null || true) && mkdir -p dist/viewer && cp src/viewer/index.html dist/viewer/ && cp src/viewer/favicon.svg dist/viewer/",
20
+ "build": "tsdown && node scripts/copy-assets.mjs",
21
21
  "dev": "tsx src/index.ts",
22
22
  "start": "node dist/cli.mjs",
23
23
  "migrate": "node dist/functions/migrate.js",
24
+ "pretest": "npm run build",
24
25
  "test": "vitest run --exclude test/integration.test.ts",
25
26
  "test:watch": "vitest --exclude test/integration.test.ts",
26
27
  "test:integration": "vitest run test/integration.test.ts",
27
28
  "test:all": "vitest run",
29
+ "test:vector-recovery:packaged": "node scripts/release-gate/vector-recovery.mjs",
30
+ "test:startup:packaged": "node scripts/release-gate/startup.mjs",
31
+ "test:summary-recovery:packaged": "node scripts/release-gate/summary-recovery.mjs",
32
+ "test:cli-diagnostics:packaged": "node scripts/release-gate/cli-diagnostics.mjs",
33
+ "test:graph-index:packaged": "node scripts/release-gate/graph-index.mjs",
34
+ "test:skills:packaged": "node scripts/release-gate/skills.mjs",
35
+ "test:openclaw:packaged": "node scripts/release-gate/openclaw.mjs",
28
36
  "release:gate": "node scripts/release-gate/run.mjs",
37
+ "release:prepare": "node scripts/release/publish.mjs prepare",
38
+ "release:publish": "node scripts/release/publish.mjs publish",
29
39
  "skills:gen": "tsx scripts/skills/generate.ts",
30
40
  "engine:hashes": "node scripts/engine-hashes.mjs",
31
41
  "skills:check": "tsx scripts/skills/generate.ts --check && tsx scripts/skills/check.ts",
32
42
  "docs:sync": "tsx scripts/docs-sync.ts",
33
43
  "docs:check": "tsx scripts/docs-sync.ts --check",
34
44
  "plugin:pack:codex": "npm run build && node scripts/plugins/package-codex.mjs",
45
+ "plugin:pack:pi": "tsdown --filter pi-extension && node scripts/plugins/prepare-native.mjs && node -e \"require('node:fs').mkdirSync('dist/plugins', { recursive: true })\" && npm pack ./integrations/pi --pack-destination dist/plugins",
35
46
  "plugin:verify:published": "node scripts/plugins/verify-published.mjs",
36
47
  "test:plugin:live": "node scripts/plugins/test-live.mjs",
37
48
  "bench:load": "node --import tsx benchmark/load-100k.ts",
38
49
  "bench:capture-costs": "node --import tsx benchmark/capture-costs.ts",
39
- "eval:longmemeval": "tsx eval/runner/longmemeval.ts",
40
- "eval:coding-life": "tsx eval/runner/coding-life.ts"
50
+ "eval:longmemeval": "node --import tsx eval/runner/longmemeval.ts",
51
+ "eval:coding-life": "node --import tsx eval/runner/coding-life.ts",
52
+ "eval:lifecycle": "node --import tsx eval/runner/lifecycle.ts",
53
+ "eval:recall": "node --import tsx eval/runner/recall-quality.ts",
54
+ "eval:check": "tsc --noEmit --project tsconfig.eval.json && vitest run test/eval-adapters.test.ts test/eval-integrity.test.ts",
55
+ "prepack": "node scripts/plugins/prepare-native.mjs",
56
+ "plugin:pack:openclaw": "node scripts/plugins/prepare-native.mjs && node -e \"require('node:fs').mkdirSync('dist/plugins', { recursive: true })\" && npm pack ./integrations/openclaw --pack-destination dist/plugins"
41
57
  },
42
58
  "keywords": [
43
59
  "ai",
@@ -52,11 +68,12 @@
52
68
  ],
53
69
  "files": [
54
70
  "dist/",
71
+ "!dist/plugins/**",
55
72
  "plugin/",
56
73
  "integrations/pi/",
57
- "iii-config.yaml",
58
- "iii-config.docker.yaml",
59
- "docker-compose.yml",
74
+ "integrations/omp/",
75
+ "integrations/hermes/",
76
+ "integrations/openclaw/",
60
77
  ".env.example",
61
78
  "LICENSE",
62
79
  "README.md",
@@ -73,10 +90,12 @@
73
90
  "@anthropic-ai/sdk": "^0.100.1",
74
91
  "@clack/prompts": "^1.2.0",
75
92
  "dotenv": "^18.0.3",
76
- "@iii-dev/helpers": "0.22.1",
77
- "iii-sdk": "0.22.1",
93
+ "@iii-dev/helpers": "0.25.0",
94
+ "iii-sdk": "0.25.0",
78
95
  "picocolors": "^1.1.1",
79
- "zod": "^4.0.0"
96
+ "zod": "^4.0.0",
97
+ "yaml": "^2.8.1",
98
+ "json5": "^2.2.3"
80
99
  },
81
100
  "optionalDependencies": {
82
101
  "@huggingface/transformers": "^4.2.0",
@@ -85,10 +104,13 @@
85
104
  },
86
105
  "devDependencies": {
87
106
  "@types/node": "^26.6.2",
107
+ "sigstore": "4.1.1",
88
108
  "tsdown": "^0.21.10",
89
109
  "tsx": "^4.19.0",
110
+ "typebox": "^1.4.3",
90
111
  "typescript": "^6.0.3",
91
- "vitest": "^4.1.6"
112
+ "vitest": "^4.1.6",
113
+ "ws": "^8.21.0"
92
114
  },
93
115
  "overrides": {
94
116
  "qs": "^6.15.2",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "agentmemory",
3
- "version": "0.9.30",
4
- "description": "Persistent memory for AI coding agents -- captures tool usage, compresses via LLM, injects context into future sessions. 12 hooks, 54 MCP tools, 17 skills, real-time viewer.",
3
+ "version": "0.9.32",
4
+ "description": "Persistent local memory for Claude. Hooks record prompts, tool calls and replies to a separately installed agentmemory server on your machine; skills and 54 MCP tools search and manage that memory. No outside AI provider is used unless you enable one.",
5
5
  "author": {
6
6
  "name": "Rohit Ghumare",
7
7
  "url": "https://github.com/rohitg00"
@@ -9,5 +9,18 @@
9
9
  "license": "Apache-2.0",
10
10
  "homepage": "https://github.com/rohitg00/agentmemory",
11
11
  "repository": "https://github.com/rohitg00/agentmemory",
12
- "skills": ["./skills/"]
12
+ "skills": ["./skills/"],
13
+ "userConfig": {
14
+ "agentmemory_url": {
15
+ "type": "string",
16
+ "title": "agentmemory server URL",
17
+ "description": "Where the hooks and MCP server reach your agentmemory server. Leave empty to use AGENTMEMORY_URL from your environment when it is set, otherwise http://localhost:3111. A remote server must use https."
18
+ },
19
+ "agentmemory_secret": {
20
+ "type": "string",
21
+ "title": "agentmemory server secret",
22
+ "description": "Only needed for a remote agentmemory server. Leave empty for a server on this machine; the plugin then reads the local server's own secret and never sends it off this machine.",
23
+ "sensitive": true
24
+ }
25
+ }
13
26
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentmemory",
3
- "version": "0.9.30",
3
+ "version": "0.9.32",
4
4
  "description": "Local persistent memory for coding agents. Recall decisions, resume sessions, learn from corrections, and manage memory through 54 MCP tools and 17 skills. Optional capture through 6 Codex hooks.",
5
5
  "author": {
6
6
  "name": "Rohit Ghumare",
@@ -15,9 +15,10 @@
15
15
  "interface": {
16
16
  "displayName": "Agent Memory",
17
17
  "shortDescription": "Memory across coding sessions",
18
- "longDescription": "Recall past decisions, resume work, save useful context, and learn from corrections across Codex and Claude Code using one local Agent Memory daemon. Includes search, session history, lessons, graph queries, memory maintenance, export, and deletion workflows. Requires Node.js 20+ and a running Agent Memory daemon. Basic keyword recall needs no model key. Embeddings and model-based features require configuration; external providers may receive selected data when enabled. Automatic capture requires trusted, supported hooks. Designed for local Codex sessions.",
18
+ "longDescription": "Recall past decisions, resume work, save useful context, and learn from corrections across your coding sessions using one local Agent Memory daemon. Includes search, session history, lessons, graph queries, memory maintenance, export, and deletion workflows. Requires Node.js 20+ and a running Agent Memory daemon. Basic keyword recall needs no model key. Embeddings and model-based features require configuration; external providers may receive selected data when enabled. Automatic capture requires trusted, supported hooks. Designed for local Codex sessions.",
19
19
  "developerName": "Rohit Ghumare",
20
- "websiteURL": "https://github.com/rohitg00/agentmemory",
20
+ "websiteURL": "https://www.agent-memory.dev",
21
+ "privacyPolicyURL": "https://www.agent-memory.dev/privacy",
21
22
  "supportURL": "https://github.com/rohitg00/agentmemory/issues",
22
23
  "category": "Developer Tools",
23
24
  "capabilities": ["Local persistent memory", "Session handoff", "Lessons and recall", "Memory management"],
@@ -1,7 +1,9 @@
1
1
  {
2
2
  "name": "agentmemory",
3
- "version": "0.9.30",
4
- "description": "Persistent memory for AI coding agents. Captures sessions, recalls with hybrid BM25 + vector + graph search, and exposes 54 memory tools over MCP. Keyless by default, runs on your machine.",
3
+ "displayName": "agentmemory",
4
+ "version": "0.9.32",
5
+ "description": "Persistent memory for Devin CLI and Devin Desktop. Captures every session automatically, recalls with hybrid BM25 + vector + graph search, and exposes 54 memory tools over MCP. Keyless by default, runs on your machine. Not supported in cloud sessions.",
6
+ "logo": "assets/icon.svg",
5
7
  "author": {
6
8
  "name": "Rohit Ghumare",
7
9
  "email": "ghumare64@gmail.com"
@@ -21,11 +23,10 @@
21
23
  "command": "npx",
22
24
  "args": [
23
25
  "-y",
24
- "@agentmemory/mcp"
26
+ "@agentmemory/mcp@0.9.32"
25
27
  ],
26
28
  "env": {
27
- "AGENTMEMORY_URL": "${AGENTMEMORY_URL:-http://localhost:3111}",
28
- "AGENTMEMORY_SECRET": "${AGENTMEMORY_SECRET:-}"
29
+ "AGENTMEMORY_URL": "${AGENTMEMORY_URL:-http://localhost:3111}"
29
30
  }
30
31
  }
31
32
  }
package/plugin/.mcp.json CHANGED
@@ -2,7 +2,11 @@
2
2
  "mcpServers": {
3
3
  "agentmemory": {
4
4
  "command": "node",
5
- "args": ["${CLAUDE_PLUGIN_ROOT}/scripts/plugin-bridge.mjs"]
5
+ "args": ["${CLAUDE_PLUGIN_ROOT}/scripts/plugin-bridge.mjs"],
6
+ "env": {
7
+ "CLAUDE_PLUGIN_OPTION_AGENTMEMORY_URL": "${user_config.agentmemory_url}",
8
+ "CLAUDE_PLUGIN_OPTION_AGENTMEMORY_SECRET": "${user_config.agentmemory_secret}"
9
+ }
6
10
  }
7
11
  }
8
12
  }
@@ -0,0 +1,71 @@
1
+ # agentmemory
2
+
3
+ agentmemory gives Claude persistent memory across sessions. Its hooks record what happens in each session, and its skills and MCP tools let Claude search that history, save decisions and lessons, and pick up earlier work. Everything is stored on your own machine by default.
4
+
5
+ ## Install
6
+
7
+ ```
8
+ /plugin install agentmemory --marketplace rohitg00/agentmemory
9
+ ```
10
+
11
+ ## Requirements
12
+
13
+ This plugin is a client for the agentmemory server, a separate program that you install and run yourself. The 54 MCP tools, the search index and the viewer all come from that server. Without it the hooks have nowhere to send events and the tools return errors.
14
+
15
+ Start the server in its own terminal with Node.js 20 or newer:
16
+
17
+ ```bash
18
+ npx -y @agentmemory/agentmemory@latest
19
+ ```
20
+
21
+ Keep it running while you use the plugin. Check it with `npx -y @agentmemory/agentmemory@latest status`. The server listens on `http://localhost:3111` and the viewer on `http://localhost:3113`.
22
+
23
+ When you enable the plugin, Claude Code asks for two optional settings: the server URL and the server secret. Leave both empty for a local server. If the URL is empty, the plugin uses `AGENTMEMORY_URL` from your environment when it is set. Claude Code keeps the secret in your system keychain; on systems without a keychain it keeps it in `~/.claude/.credentials.json`, a file readable only by your user. The plugin sends events and the secret only to a loopback address or an `https://` URL; for a remote `http://` URL it sends nothing.
24
+
25
+ ## What the hooks record
26
+
27
+ The plugin registers 12 Claude Code hooks. They record:
28
+
29
+ - every prompt you submit, including prompts recovered from the session transcript when the session ends
30
+ - the name, input and output of each tool call, and the error when a call fails. This includes results returned by other connectors and MCP servers
31
+ - the final reply of the assistant and of each subagent, up to 4,000 characters
32
+ - session start and end, subagent start, notifications and completed tasks, with the working directory
33
+
34
+ Before storage, `<private>...</private>` blocks and common secret formats such as API keys and private keys are replaced with redaction markers. Long tool output is truncated.
35
+
36
+ ## Where it is kept and for how long
37
+
38
+ The server stores everything in a local data folder:
39
+
40
+ - macOS: `~/Library/Application Support/agentmemory`
41
+ - Linux: `~/.local/share/agentmemory`
42
+ - Windows: `%APPDATA%\agentmemory`
43
+
44
+ If the server is down, hook events wait in a `capture-spool` folder inside the same data folder. The spool holds at most 5 MiB and drops events older than 7 days.
45
+
46
+ Data is kept until you delete it. Each session keeps at most 500 observations by default. Memories that carry an expiry date are removed automatically after that date.
47
+
48
+ ## What can leave your machine
49
+
50
+ By default, nothing. Search uses local keyword matching, and no LLM is called. Content leaves your machine only when you turn on one of these options on the server:
51
+
52
+ - `AGENTMEMORY_LLM_PROVIDER` selects an LLM provider (Anthropic, OpenAI, Gemini, OpenRouter or MiniMax). Session summaries, consolidation and reflection then send excerpts of recorded content to it. A provider key that is already in your environment does nothing until you set this option. LLM compression of each observation stays off unless you also set `AGENTMEMORY_AUTO_COMPRESS=true`.
53
+ - `AGENTMEMORY_ALLOW_AGENT_SDK=true`, with no provider selected, sends the same excerpts to Claude through the Claude Agent SDK.
54
+ - `EMBEDDING_PROVIDER` set to `gemini`, `openai`, `voyage`, `cohere` or `openrouter` sends text to that service to build search vectors. `EMBEDDING_PROVIDER=local` runs on your machine after a one-time model download.
55
+ - A Redis state backend stores records on the Redis server you configure.
56
+ - Mesh sync sends memories to peer agentmemory servers that you register.
57
+
58
+ Context injection is also off by default. The plugin prints stored memory into the conversation only when you set `AGENTMEMORY_INJECT_CONTEXT=true`.
59
+
60
+ ## View and delete your data
61
+
62
+ - Open the viewer at `http://localhost:3113`, or run `npx -y @agentmemory/agentmemory@latest status`.
63
+ - Export everything with the `memory_export` tool.
64
+ - Delete single memories with the `forget` skill or the `memory_governance_delete` tool.
65
+ - Delete everything: stop the server with `npx -y @agentmemory/agentmemory@latest stop`, then delete the data folder listed above. With a Redis state backend, also delete agentmemory's records from that Redis server, for example by flushing the Redis database you gave agentmemory.
66
+
67
+ Recalled memories are evidence from past sessions, not instructions. Claude should check them before acting on them.
68
+
69
+ Privacy policy: https://agent-memory.dev/privacy
70
+
71
+ Source and issues: https://github.com/rohitg00/agentmemory
@@ -3,38 +3,53 @@
3
3
  "hooks": {
4
4
  "sessionStart": [
5
5
  {
6
- "command": "node ${CURSOR_PLUGIN_ROOT}/plugin/scripts/session-start.mjs"
6
+ "command": "node \"${CURSOR_PLUGIN_ROOT}/plugin/scripts/cursor/run-hook.mjs\" sessionStart"
7
7
  }
8
8
  ],
9
9
  "beforeSubmitPrompt": [
10
10
  {
11
- "command": "node ${CURSOR_PLUGIN_ROOT}/plugin/scripts/prompt-submit.mjs"
11
+ "command": "node \"${CURSOR_PLUGIN_ROOT}/plugin/scripts/cursor/run-hook.mjs\" beforeSubmitPrompt"
12
12
  }
13
13
  ],
14
14
  "preToolUse": [
15
15
  {
16
- "command": "node ${CURSOR_PLUGIN_ROOT}/plugin/scripts/pre-tool-use.mjs",
17
- "matcher": "Shell|Read|Write|Grep"
16
+ "matcher": "Edit|Write|Read|Glob|Grep|Shell",
17
+ "command": "node \"${CURSOR_PLUGIN_ROOT}/plugin/scripts/cursor/run-hook.mjs\" preToolUse"
18
18
  }
19
19
  ],
20
20
  "postToolUse": [
21
21
  {
22
- "command": "node ${CURSOR_PLUGIN_ROOT}/plugin/scripts/post-tool-use.mjs"
22
+ "command": "node \"${CURSOR_PLUGIN_ROOT}/plugin/scripts/cursor/run-hook.mjs\" postToolUse"
23
23
  }
24
24
  ],
25
25
  "postToolUseFailure": [
26
26
  {
27
- "command": "node ${CURSOR_PLUGIN_ROOT}/plugin/scripts/post-tool-failure.mjs"
27
+ "command": "node \"${CURSOR_PLUGIN_ROOT}/plugin/scripts/cursor/run-hook.mjs\" postToolUseFailure"
28
+ }
29
+ ],
30
+ "preCompact": [
31
+ {
32
+ "command": "node \"${CURSOR_PLUGIN_ROOT}/plugin/scripts/cursor/run-hook.mjs\" preCompact"
33
+ }
34
+ ],
35
+ "subagentStart": [
36
+ {
37
+ "command": "node \"${CURSOR_PLUGIN_ROOT}/plugin/scripts/cursor/run-hook.mjs\" subagentStart"
38
+ }
39
+ ],
40
+ "subagentStop": [
41
+ {
42
+ "command": "node \"${CURSOR_PLUGIN_ROOT}/plugin/scripts/cursor/run-hook.mjs\" subagentStop"
28
43
  }
29
44
  ],
30
45
  "stop": [
31
46
  {
32
- "command": "node ${CURSOR_PLUGIN_ROOT}/plugin/scripts/stop.mjs"
47
+ "command": "node \"${CURSOR_PLUGIN_ROOT}/plugin/scripts/cursor/run-detached.mjs\" stop"
33
48
  }
34
49
  ],
35
50
  "sessionEnd": [
36
51
  {
37
- "command": "node ${CURSOR_PLUGIN_ROOT}/plugin/scripts/session-end.mjs"
52
+ "command": "node \"${CURSOR_PLUGIN_ROOT}/plugin/scripts/cursor/run-detached.mjs\" sessionEnd"
38
53
  }
39
54
  ]
40
55
  }
@@ -5,7 +5,8 @@
5
5
  "hooks": [
6
6
  {
7
7
  "type": "command",
8
- "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/session-start.mjs\""
8
+ "command": "node",
9
+ "args": ["${CLAUDE_PLUGIN_ROOT}/scripts/session-start.mjs"]
9
10
  }
10
11
  ]
11
12
  }
@@ -15,7 +16,8 @@
15
16
  "hooks": [
16
17
  {
17
18
  "type": "command",
18
- "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/prompt-submit.mjs\""
19
+ "command": "node",
20
+ "args": ["${CLAUDE_PLUGIN_ROOT}/scripts/prompt-submit.mjs"]
19
21
  }
20
22
  ]
21
23
  }
@@ -26,7 +28,8 @@
26
28
  "hooks": [
27
29
  {
28
30
  "type": "command",
29
- "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/pre-tool-use.mjs\""
31
+ "command": "node",
32
+ "args": ["${CLAUDE_PLUGIN_ROOT}/scripts/pre-tool-use.mjs"]
30
33
  }
31
34
  ]
32
35
  }
@@ -36,7 +39,8 @@
36
39
  "hooks": [
37
40
  {
38
41
  "type": "command",
39
- "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/post-tool-use.mjs\""
42
+ "command": "node",
43
+ "args": ["${CLAUDE_PLUGIN_ROOT}/scripts/post-tool-use.mjs"]
40
44
  }
41
45
  ]
42
46
  }
@@ -46,7 +50,8 @@
46
50
  "hooks": [
47
51
  {
48
52
  "type": "command",
49
- "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/post-tool-failure.mjs\""
53
+ "command": "node",
54
+ "args": ["${CLAUDE_PLUGIN_ROOT}/scripts/post-tool-failure.mjs"]
50
55
  }
51
56
  ]
52
57
  }
@@ -56,7 +61,8 @@
56
61
  "hooks": [
57
62
  {
58
63
  "type": "command",
59
- "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/pre-compact.mjs\""
64
+ "command": "node",
65
+ "args": ["${CLAUDE_PLUGIN_ROOT}/scripts/pre-compact.mjs"]
60
66
  }
61
67
  ]
62
68
  }
@@ -66,7 +72,8 @@
66
72
  "hooks": [
67
73
  {
68
74
  "type": "command",
69
- "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/subagent-start.mjs\""
75
+ "command": "node",
76
+ "args": ["${CLAUDE_PLUGIN_ROOT}/scripts/subagent-start.mjs"]
70
77
  }
71
78
  ]
72
79
  }
@@ -76,7 +83,8 @@
76
83
  "hooks": [
77
84
  {
78
85
  "type": "command",
79
- "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/subagent-stop.mjs\""
86
+ "command": "node",
87
+ "args": ["${CLAUDE_PLUGIN_ROOT}/scripts/subagent-stop.mjs"]
80
88
  }
81
89
  ]
82
90
  }
@@ -86,7 +94,8 @@
86
94
  "hooks": [
87
95
  {
88
96
  "type": "command",
89
- "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/notification.mjs\""
97
+ "command": "node",
98
+ "args": ["${CLAUDE_PLUGIN_ROOT}/scripts/notification.mjs"]
90
99
  }
91
100
  ]
92
101
  }
@@ -96,7 +105,8 @@
96
105
  "hooks": [
97
106
  {
98
107
  "type": "command",
99
- "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/task-completed.mjs\""
108
+ "command": "node",
109
+ "args": ["${CLAUDE_PLUGIN_ROOT}/scripts/task-completed.mjs"]
100
110
  }
101
111
  ]
102
112
  }
@@ -106,7 +116,8 @@
106
116
  "hooks": [
107
117
  {
108
118
  "type": "command",
109
- "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/stop.mjs\""
119
+ "command": "node",
120
+ "args": ["${CLAUDE_PLUGIN_ROOT}/scripts/stop.mjs"]
110
121
  }
111
122
  ]
112
123
  }
@@ -116,7 +127,8 @@
116
127
  "hooks": [
117
128
  {
118
129
  "type": "command",
119
- "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/session-end.mjs\""
130
+ "command": "node",
131
+ "args": ["${CLAUDE_PLUGIN_ROOT}/scripts/session-end.mjs"]
120
132
  }
121
133
  ]
122
134
  }
@@ -0,0 +1,67 @@
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [
4
+ {
5
+ "hooks": [
6
+ {
7
+ "type": "command",
8
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/session-start.mjs\""
9
+ }
10
+ ]
11
+ }
12
+ ],
13
+ "UserPromptSubmit": [
14
+ {
15
+ "hooks": [
16
+ {
17
+ "type": "command",
18
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/prompt-submit.mjs\""
19
+ }
20
+ ]
21
+ }
22
+ ],
23
+ "PreToolUse": [
24
+ {
25
+ "matcher": "^(exec|edit|write|read|apply_patch|grep|glob)$",
26
+ "hooks": [
27
+ {
28
+ "type": "command",
29
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/pre-tool-use.mjs\""
30
+ }
31
+ ]
32
+ }
33
+ ],
34
+ "PostToolUse": [
35
+ {
36
+ "matcher": "",
37
+ "hooks": [
38
+ {
39
+ "type": "command",
40
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/post-tool-use.mjs\""
41
+ }
42
+ ]
43
+ }
44
+ ],
45
+ "Stop": [
46
+ {
47
+ "matcher": "",
48
+ "hooks": [
49
+ {
50
+ "type": "command",
51
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/stop.mjs\""
52
+ }
53
+ ]
54
+ }
55
+ ],
56
+ "SessionEnd": [
57
+ {
58
+ "hooks": [
59
+ {
60
+ "type": "command",
61
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/session-end.mjs\""
62
+ }
63
+ ]
64
+ }
65
+ ]
66
+ }
67
+ }
@@ -440,7 +440,7 @@ agentmemory ──push──▶ OpenCode system prompt
440
440
 
441
441
  ### Why OpenCode goes direct
442
442
 
443
- agentmemory already persists everything in SQLite (`data/state_store.db`). Adding an intermediate MEMORY.md file would duplicate data, introduce sync lag, and require the model to re-parse structured context from markdown. Direct injection delivers the same data with lower latency and zero staleness — the agent always sees what agentmemory knows right now.
443
+ agentmemory persists state through the iii state worker, using file-backed KV (`data/state_store.db`) by default or Redis when configured. Adding an intermediate MEMORY.md file would duplicate data, introduce sync lag, and require the model to re-parse structured context from markdown. Direct injection delivers the same data with lower latency and zero staleness — the agent always sees what agentmemory knows right now.
444
444
 
445
445
  ## Slash commands
446
446
 
@@ -1,8 +1,8 @@
1
1
  import type { Plugin } from "@opencode-ai/plugin";
2
2
  import { execFileSync } from "node:child_process";
3
- import { readFileSync } from "node:fs";
3
+ import { readFileSync, realpathSync } from "node:fs";
4
4
  import { homedir } from "node:os";
5
- import { basename, join } from "node:path";
5
+ import { basename, dirname, join, resolve } from "node:path";
6
6
 
7
7
  const API = process.env.AGENTMEMORY_URL || "http://localhost:3111";
8
8
  // OpenCode reports tool names in lowercase ("read", "edit", ...); matching is
@@ -116,7 +116,7 @@ async function observe(
116
116
  let activeSessionId: string | null = null;
117
117
  let pendingConfig: Record<string, unknown> | null = null;
118
118
  // Default scope resolved at plugin init (same resolution order as the hooks'
119
- // resolveProject: env override, git toplevel basename, cwd basename). In a
119
+ // resolveProject: env override, git repository basename, cwd basename). In a
120
120
  // long-lived OpenCode process serving multiple directories these defaults are
121
121
  // only a fallback — attribution is per-session via sessionProjects, resolved
122
122
  // from each session's own directory at session.created. Module-level-only
@@ -138,13 +138,19 @@ function resolveProjectName(dir: string): string {
138
138
  const cached = projectNameCache.get(dir);
139
139
  if (cached !== undefined) return cached;
140
140
  try {
141
- const top = execFileSync("git", ["rev-parse", "--show-toplevel"], {
142
- cwd: dir,
143
- stdio: ["ignore", "pipe", "ignore"],
144
- encoding: "utf8",
145
- }).trim();
141
+ const [top, gitDir, commonDir] = execFileSync(
142
+ "git",
143
+ ["rev-parse", "--show-toplevel", "--git-dir", "--git-common-dir"],
144
+ {
145
+ cwd: dir,
146
+ stdio: ["ignore", "pipe", "ignore"],
147
+ encoding: "utf8",
148
+ },
149
+ )
150
+ .trim()
151
+ .split(/\r?\n/);
146
152
  if (top) {
147
- const name = basename(top);
153
+ const name = basename(repositoryRoot(dir, top, gitDir, commonDir));
148
154
  projectNameCache.set(dir, name);
149
155
  return name;
150
156
  }
@@ -155,6 +161,14 @@ function resolveProjectName(dir: string): string {
155
161
  projectNameCache.set(dir, fallback);
156
162
  return fallback;
157
163
  }
164
+
165
+ function repositoryRoot(dir: string, top: string, gitDir?: string, commonDir?: string): string {
166
+ if (!gitDir || !commonDir) return top;
167
+ const physical = realpathSync(dir);
168
+ const common = resolve(physical, commonDir);
169
+ if (resolve(physical, gitDir) === common || basename(common) !== ".git") return top;
170
+ return dirname(common);
171
+ }
158
172
  const stashedFiles = new Map<string, Set<string>>();
159
173
  const seenSubtaskIds = new Map<string, Set<string>>();
160
174
  const seenToolCallIds = new Map<string, Set<string>>();
@@ -380,7 +394,7 @@ const v1Hooks: Plugin = async (ctx) => {
380
394
  if (DEBUG) console.error("[agentmemory] session.deleted with no session ID");
381
395
  return;
382
396
  }
383
- await post("/session/end", { sessionId: sid });
397
+ await post("/session/end", { sessionId: sid, final: true });
384
398
  post("/crystals/auto", { olderThanDays: 7 }, 30000);
385
399
  post("/consolidate-pipeline", { tier: "all", force: true }, 30000);
386
400
  if (sid === activeSessionId) activeSessionId = null;
@@ -1260,7 +1274,7 @@ async function v2Setup(ctx: any) {
1260
1274
  case "session.deleted": {
1261
1275
  const sid = (data.sessionID as string) || activeSessionId;
1262
1276
  if (!sid) return;
1263
- await post("/session/end", { sessionId: sid });
1277
+ await post("/session/end", { sessionId: sid, final: true });
1264
1278
  void post("/crystals/auto", { olderThanDays: 7 }, 30000);
1265
1279
  void post("/consolidate-pipeline", { tier: "all", force: true }, 30000);
1266
1280
  if (sid === activeSessionId) activeSessionId = null;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentmemory-capture",
3
- "version": "0.9.30",
3
+ "version": "0.9.32",
4
4
  "description": "OpenCode plugin for agentmemory — full Claude Code hook parity: session lifecycle (create/idle/status/compacted/update/diff/delete/error), messages & prompts (chat.message, message.updated user+assistant, message.removed), tool lifecycle (ToolPart states with timing), part tracking (subtask, step-finish, reasoning, file, patch, compaction, agent, retry), file enrichment pipeline, permissions, task tracking (w/ priority), commands, config & model tracking. 22 hooks, 2 slash commands.",
5
5
  "author": {
6
6
  "name": "Rohit Ghumare",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentmemory",
3
- "version": "0.9.30",
3
+ "version": "0.9.32",
4
4
  "description": "Persistent memory for AI coding agents -- captures tool usage, compresses via LLM, injects context into future sessions. 12 hooks, 54 MCP tools, 17 skills, real-time viewer.",
5
5
  "author": {
6
6
  "name": "Rohit Ghumare",
@@ -1,3 +1,6 @@
1
+ //#region src/functions/privacy.d.ts
2
+ declare function stripPrivateData(input: string): string;
3
+ //#endregion
1
4
  //#region src/hooks/_capture.d.ts
2
5
  declare const REST_URL: string;
3
6
  type CaptureOutcome = "delivered" | "duplicate" | "rejected" | "spooled" | "dropped";
@@ -11,6 +14,7 @@ interface ObserveBody {
11
14
  eventId?: string;
12
15
  }
13
16
  declare function authHeaders(): Record<string, string>;
17
+ declare function transportBlocked(): boolean;
14
18
  declare function withEventId(body: ObserveBody, host: Record<string, unknown>, content?: unknown, options?: {
15
19
  stable?: boolean;
16
20
  }): ObserveBody;
@@ -18,5 +22,5 @@ declare function captureObservation(body: ObserveBody, timeoutMs: number): Promi
18
22
  declare function isDrainChild(): boolean;
19
23
  declare function runDrainChild(): Promise<void>;
20
24
  //#endregion
21
- export { CaptureOutcome, ObserveBody, REST_URL, authHeaders, captureObservation, isDrainChild, runDrainChild, withEventId };
25
+ export { CaptureOutcome, ObserveBody, REST_URL, authHeaders, captureObservation, isDrainChild, runDrainChild, stripPrivateData, transportBlocked, withEventId };
22
26
  //# sourceMappingURL=_capture.d.mts.map