@agentmemory/agentmemory 0.9.27 → 0.9.29

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 (156) hide show
  1. package/.env.example +15 -6
  2. package/AGENTS.md +7 -7
  3. package/README.md +292 -164
  4. package/dist/.env.example +15 -6
  5. package/dist/cli.d.mts.map +1 -1
  6. package/dist/cli.mjs +427 -177
  7. package/dist/cli.mjs.map +1 -1
  8. package/dist/{connect-bmZ5eqYN.mjs → connect-Qaeq15TQ.mjs} +717 -65
  9. package/dist/connect-Qaeq15TQ.mjs.map +1 -0
  10. package/dist/docker-compose.yml +2 -2
  11. package/dist/hooks/antigravity-bridge.d.mts +8 -0
  12. package/dist/hooks/antigravity-bridge.d.mts.map +1 -0
  13. package/dist/hooks/antigravity-bridge.mjs +114 -0
  14. package/dist/hooks/antigravity-bridge.mjs.map +1 -0
  15. package/dist/hooks/notification.mjs +21 -5
  16. package/dist/hooks/notification.mjs.map +1 -1
  17. package/dist/hooks/post-commit.mjs +15 -2
  18. package/dist/hooks/post-commit.mjs.map +1 -1
  19. package/dist/hooks/post-tool-failure.mjs +16 -4
  20. package/dist/hooks/post-tool-failure.mjs.map +1 -1
  21. package/dist/hooks/post-tool-use.mjs +16 -4
  22. package/dist/hooks/post-tool-use.mjs.map +1 -1
  23. package/dist/hooks/pre-compact.mjs +14 -3
  24. package/dist/hooks/pre-compact.mjs.map +1 -1
  25. package/dist/hooks/pre-tool-use.mjs +3 -2
  26. package/dist/hooks/pre-tool-use.mjs.map +1 -1
  27. package/dist/hooks/prompt-submit.mjs +16 -4
  28. package/dist/hooks/prompt-submit.mjs.map +1 -1
  29. package/dist/hooks/session-end.mjs +84 -19
  30. package/dist/hooks/session-end.mjs.map +1 -1
  31. package/dist/hooks/session-start.mjs +24 -5
  32. package/dist/hooks/session-start.mjs.map +1 -1
  33. package/dist/hooks/stop.mjs +3 -8
  34. package/dist/hooks/stop.mjs.map +1 -1
  35. package/dist/hooks/subagent-start.mjs +16 -4
  36. package/dist/hooks/subagent-start.mjs.map +1 -1
  37. package/dist/hooks/subagent-stop.mjs +16 -4
  38. package/dist/hooks/subagent-stop.mjs.map +1 -1
  39. package/dist/hooks/task-completed.mjs +16 -4
  40. package/dist/hooks/task-completed.mjs.map +1 -1
  41. package/dist/{image-refs-B5Zf_Djo.mjs → image-refs-BKLmp_sD.mjs} +4 -22
  42. package/dist/image-refs-BKLmp_sD.mjs.map +1 -0
  43. package/dist/image-refs-CJgZmb9X.mjs +34 -0
  44. package/dist/image-refs-CJgZmb9X.mjs.map +1 -0
  45. package/dist/index.mjs +1681 -911
  46. package/dist/index.mjs.map +1 -1
  47. package/dist/{image-store-Gpo2mgM9.mjs → keyed-mutex-DTHtcZrt.mjs} +14 -11
  48. package/dist/keyed-mutex-DTHtcZrt.mjs.map +1 -0
  49. package/dist/{logger-yHTcEBAI.mjs → logger-BEB7pCI9.mjs} +1 -1
  50. package/dist/{logger-yHTcEBAI.mjs.map → logger-BEB7pCI9.mjs.map} +1 -1
  51. package/dist/schema-BFZhNTF7.mjs +197 -0
  52. package/dist/schema-BFZhNTF7.mjs.map +1 -0
  53. package/dist/{src-MOg2zKJs.mjs → src-G7yt8gGm.mjs} +1521 -854
  54. package/dist/src-G7yt8gGm.mjs.map +1 -0
  55. package/dist/{standalone-BORXC71-.mjs → standalone-BqNJDJ04.mjs} +30 -16
  56. package/dist/standalone-BqNJDJ04.mjs.map +1 -0
  57. package/dist/standalone.d.mts.map +1 -1
  58. package/dist/standalone.mjs +55 -15
  59. package/dist/standalone.mjs.map +1 -1
  60. package/dist/{tools-registry-D8XVVPbJ.mjs → tools-registry-BV_2bu7z.mjs} +55 -17
  61. package/dist/tools-registry-BV_2bu7z.mjs.map +1 -0
  62. package/dist/viewer/favicon.svg +35 -1
  63. package/dist/viewer/index.html +473 -83
  64. package/docker-compose.yml +2 -2
  65. package/integrations/pi/README.md +77 -0
  66. package/integrations/pi/index.ts +403 -0
  67. package/integrations/pi/package.json +32 -0
  68. package/integrations/pi/security.ts +35 -0
  69. package/package.json +6 -4
  70. package/plugin/.claude-plugin/plugin.json +2 -2
  71. package/plugin/.codex-plugin/plugin.json +2 -2
  72. package/plugin/.devin-plugin/plugin.json +32 -0
  73. package/plugin/cursor/hooks.json +41 -0
  74. package/plugin/cursor/mcp.json +12 -0
  75. package/plugin/hooks/hooks.antigravity.json +43 -0
  76. package/plugin/hooks/hooks.devin.json +67 -0
  77. package/plugin/hooks/hooks.droid.json +55 -0
  78. package/plugin/opencode/README.md +1 -1
  79. package/plugin/opencode/agentmemory-capture.ts +73 -13
  80. package/plugin/opencode/plugin.json +1 -1
  81. package/plugin/plugin.json +2 -2
  82. package/plugin/scripts/antigravity-bridge.d.mts +8 -0
  83. package/plugin/scripts/antigravity-bridge.d.mts.map +1 -0
  84. package/plugin/scripts/antigravity-bridge.mjs +114 -0
  85. package/plugin/scripts/antigravity-bridge.mjs.map +1 -0
  86. package/plugin/scripts/notification.mjs +21 -5
  87. package/plugin/scripts/notification.mjs.map +1 -1
  88. package/plugin/scripts/post-commit.mjs +15 -2
  89. package/plugin/scripts/post-commit.mjs.map +1 -1
  90. package/plugin/scripts/post-tool-failure.mjs +16 -4
  91. package/plugin/scripts/post-tool-failure.mjs.map +1 -1
  92. package/plugin/scripts/post-tool-use.mjs +16 -4
  93. package/plugin/scripts/post-tool-use.mjs.map +1 -1
  94. package/plugin/scripts/pre-compact.mjs +14 -3
  95. package/plugin/scripts/pre-compact.mjs.map +1 -1
  96. package/plugin/scripts/pre-tool-use.mjs +3 -2
  97. package/plugin/scripts/pre-tool-use.mjs.map +1 -1
  98. package/plugin/scripts/prompt-submit.mjs +16 -4
  99. package/plugin/scripts/prompt-submit.mjs.map +1 -1
  100. package/plugin/scripts/session-end.mjs +84 -19
  101. package/plugin/scripts/session-end.mjs.map +1 -1
  102. package/plugin/scripts/session-start.mjs +24 -5
  103. package/plugin/scripts/session-start.mjs.map +1 -1
  104. package/plugin/scripts/stop.mjs +3 -8
  105. package/plugin/scripts/stop.mjs.map +1 -1
  106. package/plugin/scripts/subagent-start.mjs +16 -4
  107. package/plugin/scripts/subagent-start.mjs.map +1 -1
  108. package/plugin/scripts/subagent-stop.mjs +16 -4
  109. package/plugin/scripts/subagent-stop.mjs.map +1 -1
  110. package/plugin/scripts/task-completed.mjs +16 -4
  111. package/plugin/scripts/task-completed.mjs.map +1 -1
  112. package/plugin/skills/_shared/TROUBLESHOOTING.md +38 -0
  113. package/plugin/skills/agentmemory-agents/REFERENCE.md +31 -0
  114. package/plugin/skills/agentmemory-agents/SKILL.md +34 -0
  115. package/plugin/skills/agentmemory-architecture/SKILL.md +33 -0
  116. package/plugin/skills/agentmemory-config/REFERENCE.md +45 -0
  117. package/plugin/skills/agentmemory-config/SKILL.md +37 -0
  118. package/plugin/skills/agentmemory-hooks/REFERENCE.md +20 -0
  119. package/plugin/skills/agentmemory-hooks/SKILL.md +39 -0
  120. package/plugin/skills/agentmemory-mcp-tools/REFERENCE.md +66 -0
  121. package/plugin/skills/agentmemory-mcp-tools/SKILL.md +39 -0
  122. package/plugin/skills/agentmemory-rest-api/REFERENCE.md +142 -0
  123. package/plugin/skills/agentmemory-rest-api/SKILL.md +43 -0
  124. package/plugin/skills/commit-context/EXAMPLES.md +71 -0
  125. package/plugin/skills/commit-context/SKILL.md +53 -8
  126. package/plugin/skills/commit-history/EXAMPLES.md +71 -0
  127. package/plugin/skills/commit-history/SKILL.md +51 -9
  128. package/plugin/skills/forget/EXAMPLES.md +75 -0
  129. package/plugin/skills/forget/SKILL.md +57 -14
  130. package/plugin/skills/handoff/EXAMPLES.md +56 -0
  131. package/plugin/skills/handoff/SKILL.md +56 -9
  132. package/plugin/skills/lesson/SKILL.md +64 -0
  133. package/plugin/skills/memory-discipline/SKILL.md +57 -0
  134. package/plugin/skills/recall/EXAMPLES.md +74 -0
  135. package/plugin/skills/recall/SKILL.md +53 -11
  136. package/plugin/skills/recap/EXAMPLES.md +60 -0
  137. package/plugin/skills/recap/SKILL.md +51 -13
  138. package/plugin/skills/remember/EXAMPLES.md +67 -0
  139. package/plugin/skills/remember/SKILL.md +58 -17
  140. package/plugin/skills/session-history/EXAMPLES.md +59 -0
  141. package/plugin/skills/session-history/SKILL.md +54 -11
  142. package/plugin/skills/write-agentmemory-skill/SKILL.md +40 -0
  143. package/dist/connect-bmZ5eqYN.mjs.map +0 -1
  144. package/dist/image-refs-B5Zf_Djo.mjs.map +0 -1
  145. package/dist/image-store-Gpo2mgM9.mjs.map +0 -1
  146. package/dist/rolldown-runtime-twds-ZHy.mjs +0 -14
  147. package/dist/schema-CNiCWzV9.mjs +0 -78
  148. package/dist/schema-CNiCWzV9.mjs.map +0 -1
  149. package/dist/src-MOg2zKJs.mjs.map +0 -1
  150. package/dist/standalone-BORXC71-.mjs.map +0 -1
  151. package/dist/tools-registry-D8XVVPbJ.mjs.map +0 -1
  152. package/dist/version-9DNrRyph.mjs +0 -6
  153. package/dist/version-9DNrRyph.mjs.map +0 -1
  154. package/plugin/scripts/diagnostics.d.mts +0 -17
  155. package/plugin/scripts/diagnostics.d.mts.map +0 -1
  156. package/plugin/scripts/diagnostics.mjs.map +0 -1
package/.env.example CHANGED
@@ -26,22 +26,24 @@
26
26
  # The detection order is OPENAI_API_KEY → MINIMAX_API_KEY → ANTHROPIC_API_KEY
27
27
  # → GEMINI_API_KEY → OPENROUTER_API_KEY → noop.
28
28
 
29
- # OPENAI_API_KEY=sk-... # Used for OpenAI-compatible embeddings today. PR #307 will extend this to chat completions (DeepSeek, SiliconFlow, vLLM, LM Studio, Ollama via `/v1`).
29
+ # OPENAI_API_KEY=sk-... # Activates both the OpenAI-compatible LLM provider (DeepSeek, SiliconFlow, vLLM, LM Studio, Ollama via `/v1`) and OpenAI embeddings. Set OPENAI_API_KEY_FOR_LLM=false to scope it to embeddings only.
30
30
  # OPENAI_BASE_URL=https://api.openai.com # Override for OpenAI-compatible providers
31
+ # OPENAI_MODEL=gpt-5.6-luna # Default OpenAI-compatible chat model
32
+ # OPENAI_API_KEY_FOR_LLM=false # Skip OpenAI auto-detection for LLM; key stays active for embeddings
31
33
 
32
34
  # ANTHROPIC_API_KEY=sk-ant-...
33
- # ANTHROPIC_MODEL=claude-sonnet-4-20250514 # Default Anthropic model
35
+ # ANTHROPIC_MODEL=claude-sonnet-5 # Default Anthropic model
34
36
  # ANTHROPIC_BASE_URL=https://api.anthropic.com # Override for Anthropic-compatible proxies / Azure AI Foundry
35
37
 
36
38
  # GEMINI_API_KEY=... # Either env name works; GEMINI_API_KEY takes precedence
37
39
  # GOOGLE_API_KEY=... # Alias for GEMINI_API_KEY when set alone (emits a one-time stderr hint)
38
- # GEMINI_MODEL=gemini-2.5-flash # Default Gemini model (auto-detected GA model)
40
+ # GEMINI_MODEL=gemini-3.7-flash # Default Gemini model (current stable Flash)
39
41
 
40
42
  # OPENROUTER_API_KEY=sk-or-...
41
- # OPENROUTER_MODEL=anthropic/claude-sonnet-4-20250514
43
+ # OPENROUTER_MODEL=anthropic/claude-sonnet-5
42
44
 
43
45
  # MINIMAX_API_KEY=...
44
- # MINIMAX_MODEL=MiniMax-M2.7
46
+ # MINIMAX_MODEL=MiniMax-M3
45
47
 
46
48
  # MAX_TOKENS=4096 # Cap LLM completion tokens for compression / summarise calls
47
49
 
@@ -111,6 +113,13 @@
111
113
  # CONSOLIDATION_DECAY_DAYS=30 # Age (days) after which non-reinforced memories decay during consolidation
112
114
  # GRAPH_EXTRACTION_ENABLED=true # Extract concept-graph edges on remember; powers the graph-traversal recall path
113
115
  # GRAPH_EXTRACTION_BATCH_SIZE=8 # Memories per graph-extraction batch
116
+
117
+ # Local reasoning models only: set to 1 to ask the model to skip its
118
+ # hidden thinking pass during graph extraction. Extraction runs several
119
+ # times faster; relation quality can drop slightly. Leave unset to let
120
+ # the model think (default).
121
+ # AGENTMEMORY_LLM_NOTHINK=1
122
+
114
123
  # AGENTMEMORY_REFLECT=true # Periodically auto-synthesize lessons from memories
115
124
  # AGENTMEMORY_DROP_STALE_INDEX=true # Drop on-disk BM25 / vector index on startup if dim guard fires (#248). Recovery toggle for stuck-state debugging.
116
125
  # AGENTMEMORY_IMAGE_EMBEDDINGS=true # Enable image embeddings when an image provider is present (experimental).
@@ -119,7 +128,7 @@
119
128
  # 6. CLI / runtime knobs
120
129
  # -----------------------------------------------------------------------------
121
130
 
122
- # AGENTMEMORY_TOOLS=all # core (7 tools, default) | all (51 tools) — surface exposed to MCP clients
131
+ # AGENTMEMORY_TOOLS=core # all (54 tools, default) | core (8 tools): surface exposed to MCP clients
123
132
  # AGENTMEMORY_SLOTS=memory # Comma-separated plugin slot names the CLI should claim
124
133
  # AGENTMEMORY_DEBUG=1 # Trace MCP shim probe + standalone fallback decisions to stderr
125
134
  # AGENTMEMORY_FORCE_PROXY=1 # Skip the MCP shim livez probe and trust AGENTMEMORY_URL (for sandboxed MCP clients that can't reach localhost)
package/AGENTS.md CHANGED
@@ -109,16 +109,16 @@ Hook scripts in `src/hooks/` are standalone Node.js scripts (no iii-sdk import).
109
109
 
110
110
  ## Testing
111
111
 
112
- - All tests must pass before PR: `npm test` (950+ tests)
112
+ - All tests must pass before PR: `npm test` (1,596+ tests)
113
113
  - Mock pattern: `vi.mock("iii-sdk")` with mock `sdk.trigger`, `kv.get/set/list`
114
114
  - Test files go in `test/` with `.test.ts` extension
115
115
  - Follow existing patterns in `test/crystallize.test.ts` for function tests
116
116
 
117
- ## Current Stats (v0.9.16)
117
+ ## Current Stats (v0.9.29)
118
118
 
119
- - 53 MCP tools (8 visible by default, `AGENTMEMORY_TOOLS=all` for all)
120
- - 128 REST endpoints
119
+ - 54 MCP tools (8 visible by default, `AGENTMEMORY_TOOLS=all` for all)
120
+ - 130 REST endpoints
121
121
  - 6 MCP resources, 3 MCP prompts
122
- - 12 hooks, 4 skills
123
- - 50+ iii functions
124
- - 950+ tests
122
+ - 12 hooks, 17 skills
123
+ - 260+ iii functions
124
+ - 1,596+ tests