@muxtsou/memory-cell 0.1.4
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.
- package/README.md +28 -0
- package/bin/run.js +84 -0
- package/package.json +36 -0
package/README.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# @muxtsou/memory-cell
|
|
2
|
+
|
|
3
|
+
Cross-platform CLI & MCP Server for Memory Cell — Grounding, Code Intelligence & Universal Directives.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
### Run directly with npx (No install needed)
|
|
8
|
+
```bash
|
|
9
|
+
npx @muxtsou/memory-cell --help
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
### Install globally via npm
|
|
13
|
+
```bash
|
|
14
|
+
npm install -g @muxtsou/memory-cell
|
|
15
|
+
memory-cell --help
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Install in your project
|
|
19
|
+
```bash
|
|
20
|
+
npm install -D @muxtsou/memory-cell
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Supported Platforms
|
|
24
|
+
- macOS (Apple Silicon arm64)
|
|
25
|
+
- macOS (Intel x86_64)
|
|
26
|
+
- Linux (x86_64)
|
|
27
|
+
- Linux (ARM64)
|
|
28
|
+
- Windows (x86_64)
|
package/bin/run.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { spawnSync } = require("child_process");
|
|
3
|
+
const path = require("path");
|
|
4
|
+
const fs = require("fs");
|
|
5
|
+
|
|
6
|
+
const SCOPE = "@muxtsou";
|
|
7
|
+
const BIN_NAME = "memory-cell";
|
|
8
|
+
|
|
9
|
+
// Mapping from Node platform + arch to the sub-package name
|
|
10
|
+
const PLATFORM_PACKAGES = {
|
|
11
|
+
"darwin-arm64": `${SCOPE}/${BIN_NAME}-darwin-arm64`,
|
|
12
|
+
"darwin-x64": `${SCOPE}/${BIN_NAME}-darwin-x64`,
|
|
13
|
+
"linux-x64": `${SCOPE}/${BIN_NAME}-linux-x64`,
|
|
14
|
+
"linux-arm64": `${SCOPE}/${BIN_NAME}-linux-arm64`,
|
|
15
|
+
"win32-x64": `${SCOPE}/${BIN_NAME}-win32-x64`,
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const key = `${process.platform}-${process.arch}`;
|
|
19
|
+
const pkgName = PLATFORM_PACKAGES[key];
|
|
20
|
+
|
|
21
|
+
if (!pkgName) {
|
|
22
|
+
console.error(`[memory-cell] Error: Unsupported platform/architecture: ${process.platform} ${process.arch}`);
|
|
23
|
+
process.exit(1);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const exeSuffix = process.platform === "win32" ? ".exe" : "";
|
|
27
|
+
const binaryFileName = `${BIN_NAME}${exeSuffix}`;
|
|
28
|
+
|
|
29
|
+
function resolveBinary() {
|
|
30
|
+
// 1. Try resolving via node require.resolve into the platform package
|
|
31
|
+
try {
|
|
32
|
+
const pkgJsonPath = require.resolve(`${pkgName}/package.json`);
|
|
33
|
+
const binPath = path.join(path.dirname(pkgJsonPath), "bin", binaryFileName);
|
|
34
|
+
if (fs.existsSync(binPath)) {
|
|
35
|
+
return binPath;
|
|
36
|
+
}
|
|
37
|
+
} catch (e) {
|
|
38
|
+
// optionalDependencies package might be hoisted differently or not found
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// 2. Fallback check relative to current node_modules layout
|
|
42
|
+
const possiblePaths = [
|
|
43
|
+
path.join(__dirname, "..", "..", `${BIN_NAME}-${key}`, "bin", binaryFileName),
|
|
44
|
+
path.join(__dirname, "..", "node_modules", pkgName, "bin", binaryFileName),
|
|
45
|
+
path.join(__dirname, "..", "..", "..", "node_modules", pkgName, "bin", binaryFileName),
|
|
46
|
+
];
|
|
47
|
+
|
|
48
|
+
for (const candidate of possiblePaths) {
|
|
49
|
+
if (fs.existsSync(candidate)) {
|
|
50
|
+
return candidate;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const binPath = resolveBinary();
|
|
58
|
+
|
|
59
|
+
if (!binPath) {
|
|
60
|
+
console.error(`[memory-cell] Error: Failed to locate native binary for ${pkgName} (${key}).`);
|
|
61
|
+
console.error(`[memory-cell] Please ensure optionalDependencies were not skipped during installation.`);
|
|
62
|
+
process.exit(1);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Make sure binary is executable on Unix systems
|
|
66
|
+
if (process.platform !== "win32") {
|
|
67
|
+
try {
|
|
68
|
+
fs.chmodSync(binPath, 0o755);
|
|
69
|
+
} catch (e) {
|
|
70
|
+
// Ignore chmod errors
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const result = spawnSync(binPath, process.argv.slice(2), {
|
|
75
|
+
stdio: "inherit",
|
|
76
|
+
env: process.env,
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
if (result.error) {
|
|
80
|
+
console.error(`[memory-cell] Execution error: ${result.error.message}`);
|
|
81
|
+
process.exit(1);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
process.exit(result.status ?? 0);
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@muxtsou/memory-cell",
|
|
3
|
+
"version": "0.1.4",
|
|
4
|
+
"description": "Cross-platform CLI and MCP cognitive runtime for AI coding assistants",
|
|
5
|
+
"bin": {
|
|
6
|
+
"memory-cell": "bin/run.js"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"bin/run.js"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/memorycell-ai/memory-cell"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"memory-cell",
|
|
18
|
+
"mcp",
|
|
19
|
+
"ai",
|
|
20
|
+
"code-intelligence",
|
|
21
|
+
"ast",
|
|
22
|
+
"cli"
|
|
23
|
+
],
|
|
24
|
+
"author": "Memory Cell Team",
|
|
25
|
+
"license": "Apache-2.0",
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"optionalDependencies": {
|
|
30
|
+
"@muxtsou/memory-cell-darwin-arm64": "0.1.4",
|
|
31
|
+
"@muxtsou/memory-cell-darwin-x64": "0.1.4",
|
|
32
|
+
"@muxtsou/memory-cell-linux-x64": "0.1.4",
|
|
33
|
+
"@muxtsou/memory-cell-linux-arm64": "0.1.4",
|
|
34
|
+
"@muxtsou/memory-cell-win32-x64": "0.1.4"
|
|
35
|
+
}
|
|
36
|
+
}
|