@lotargo/memory_plugin 1.1.1 → 1.1.3

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.
@@ -0,0 +1,20 @@
1
+ import { execSync } from "child_process";
2
+
3
+ try {
4
+ if (process.platform === "win32") {
5
+ // Forcefully stop any running Node processes executing memory-agent or index.js to unlock DLLs/EXEs
6
+ try {
7
+ execSync('wmic process where "name=\'node.exe\' and commandline like \'%memory-agent%\'" call terminate', { stdio: "ignore" });
8
+ } catch {}
9
+ try {
10
+ execSync('wmic process where "name=\'node.exe\' and commandline like \'%memory_plugin%\'" call terminate', { stdio: "ignore" });
11
+ } catch {}
12
+ } else {
13
+ // Linux / macOS: use pkill
14
+ try {
15
+ execSync('pkill -f "memory-agent|memory_plugin" || true', { stdio: "ignore" });
16
+ } catch {}
17
+ }
18
+ } catch (e) {
19
+ // Ignore errors if no processes were running
20
+ }
package/package.json CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "name": "@lotargo/memory_plugin",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "Persistent memory agent for coding AI tools — remembers user preferences and project context across sessions. Works with Antigravity, OpenCode, Claude Code, and Codex.",
5
5
  "type": "module",
6
6
  "main": "opencode-plugin/index.js",
7
+ "scripts": {
8
+ "preinstall": "node mcp-server/preinstall.js || true"
9
+ },
7
10
  "bin": {
8
11
  "memory_plugin": "mcp-server/index.js",
9
12
  "memory-agent": "mcp-server/index.js",
@@ -24,6 +27,7 @@
24
27
  "mcp-server/index.js",
25
28
  "mcp-server/memory.js",
26
29
  "mcp-server/setup.js",
30
+ "mcp-server/preinstall.js",
27
31
  "skills"
28
32
  ],
29
33
  "keywords": [
@@ -58,6 +58,15 @@ When `recall` is invoked, the engine returns saved facts along with their Agent-
58
58
  Use this tool when adding technical documentation, API specs, architectural documents, or code repos into the searchable knowledge base.
59
59
  - **Hierarchy Chunking**: The engine automatically creates 3-tier chunks (Big Document -> Medium Section -> Small Micro-Chunk) and extracts GraphRAG code symbols.
60
60
  - **Auto Vector Embeddings**: Dense ONNX vectors (`multilingual-e5-small`) are automatically computed and indexed in SQLite.
61
+ - **CRITICAL Schema Usage & Parameters**:
62
+ - `content` (required, string): Must be the **actual raw text or markdown content** of the document, NOT just a file path!
63
+ - `type` (optional, enum: `"text"`, `"file"`, `"url"`): Set to `"text"` (default) or `"file"`.
64
+ - `path` (optional, string): Provide the absolute file path (e.g. `f:\projects\plugins\memory\README.md`).
65
+ - `title` (optional, string): Provide document title (e.g. `README.md`).
66
+ - **Correct Example**: `ingest_document(content: "<full text content>", path: "f:/path/to/file.md", title: "file.md", type: "file")`
67
+ - ❌ **Common Error**: `ingest_document(content: "f:/path/to/file.md")` — this causes validation failures because `content` is missing the text content.
68
+
69
+ - **CLI/Script Execution Note**: When writing batch node scripts to call `ingestDocument`, remember that `@lotargo/memory_plugin` uses ES Modules (`"type": "module"`). Use `import` syntax instead of `require()`.
61
70
 
62
71
  ### Hybrid Retrieval (`query_knowledge_base`)
63
72
  Use this tool BEFORE answering deep architectural or technical questions when indexed documents exist.