@recursiveintell/semantic-memory-mcp 1.1.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.
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* npm wrapper for semantic-memory-mcp Rust binary.
|
|
4
|
+
*
|
|
5
|
+
* Tries (in order):
|
|
6
|
+
* 1. A pre-built binary downloaded from GitHub releases
|
|
7
|
+
* 2. A cargo-installed binary from crates.io
|
|
8
|
+
* 3. Falls back to telling the user to install Rust
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const { execSync, spawn } = require("child_process");
|
|
12
|
+
const os = require("os");
|
|
13
|
+
const path = require("path");
|
|
14
|
+
const fs = require("fs");
|
|
15
|
+
|
|
16
|
+
const PLATFORM = os.platform();
|
|
17
|
+
const ARCH = os.arch();
|
|
18
|
+
const VERSION = "1.1.0";
|
|
19
|
+
|
|
20
|
+
const binaryName = "semantic-memory-mcp";
|
|
21
|
+
const binDir = path.join(__dirname, "..", ".bin-cache");
|
|
22
|
+
const binPath = path.join(binDir, binaryName);
|
|
23
|
+
|
|
24
|
+
function getDownloadUrl() {
|
|
25
|
+
const platformMap = {
|
|
26
|
+
"linux-x64": `https://github.com/RecursiveIntell/semantic-memory-mcp/releases/download/v${VERSION}/semantic-memory-mcp-linux-x64`,
|
|
27
|
+
"darwin-x64": `https://github.com/RecursiveIntell/semantic-memory-mcp/releases/download/v${VERSION}/semantic-memory-mcp-darwin-x64`,
|
|
28
|
+
"darwin-arm64": `https://github.com/RecursiveIntell/semantic-memory-mcp/releases/download/v${VERSION}/semantic-memory-mcp-darwin-arm64`,
|
|
29
|
+
};
|
|
30
|
+
const key = `${PLATFORM}-${ARCH}`;
|
|
31
|
+
return platformMap[key] || null;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function ensureBinary() {
|
|
35
|
+
// Already downloaded?
|
|
36
|
+
if (fs.existsSync(binPath)) {
|
|
37
|
+
try { fs.chmodSync(binPath, 0o755); } catch {}
|
|
38
|
+
return binPath;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Try downloading pre-built binary
|
|
42
|
+
const url = getDownloadUrl();
|
|
43
|
+
if (url) {
|
|
44
|
+
if (!fs.existsSync(binDir)) fs.mkdirSync(binDir, { recursive: true });
|
|
45
|
+
try {
|
|
46
|
+
execSync(`curl -sL -o "${binPath}" "${url}"`, { stdio: "pipe" });
|
|
47
|
+
fs.chmodSync(binPath, 0o755);
|
|
48
|
+
return binPath;
|
|
49
|
+
} catch {}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Fallback: check if cargo-installed binary is on PATH
|
|
53
|
+
try {
|
|
54
|
+
execSync(`which ${binaryName}`, { stdio: "pipe" });
|
|
55
|
+
return binaryName; // Use from PATH
|
|
56
|
+
} catch {}
|
|
57
|
+
|
|
58
|
+
// Fallback: try cargo install
|
|
59
|
+
try {
|
|
60
|
+
execSync("cargo install semantic-memory-mcp --locked", { stdio: "inherit" });
|
|
61
|
+
return binaryName; // Use from PATH after install
|
|
62
|
+
} catch {
|
|
63
|
+
process.stderr.write(
|
|
64
|
+
`No pre-built binary for ${PLATFORM}-${ARCH} and cargo is not available.\n` +
|
|
65
|
+
`Install Rust from https://rustup.rs and run: cargo install semantic-memory-mcp --locked\n`
|
|
66
|
+
);
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const binary = ensureBinary();
|
|
72
|
+
if (!binary) {
|
|
73
|
+
process.exit(1);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Pass through all arguments
|
|
77
|
+
const child = spawn(binary, process.argv.slice(2), {
|
|
78
|
+
stdio: "inherit",
|
|
79
|
+
env: process.env,
|
|
80
|
+
});
|
|
81
|
+
child.on("exit", (code) => process.exit(code || 0));
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@recursiveintell/semantic-memory-mcp",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Local-first MCP server for agent memory kits — persistent semantic search, witnessed retrieval, durable receipts, governed authority decisions, and claim-ledger trust enrichment.",
|
|
5
|
+
"bin": {
|
|
6
|
+
"semantic-memory-mcp": "bin/semantic-memory-mcp.js"
|
|
7
|
+
},
|
|
8
|
+
"keywords": [
|
|
9
|
+
"mcp",
|
|
10
|
+
"model-context-protocol",
|
|
11
|
+
"semantic-search",
|
|
12
|
+
"vector-search",
|
|
13
|
+
"knowledge-base",
|
|
14
|
+
"sqlite",
|
|
15
|
+
"rust",
|
|
16
|
+
"local-first",
|
|
17
|
+
"agent-memory-kits",
|
|
18
|
+
"lobehub"
|
|
19
|
+
],
|
|
20
|
+
"license": "Apache-2.0",
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "https://github.com/RecursiveIntell/semantic-memory-mcp.git"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://github.com/RecursiveIntell/semantic-memory-mcp",
|
|
26
|
+
"dependencies": {}
|
|
27
|
+
}
|
|
Binary file
|