mnemex 1.0.1 → 1.0.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.
package/bin/mnemex ADDED
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env node
2
+ const { execFileSync } = require('child_process');
3
+ const path = require('path');
4
+ const fs = require('fs');
5
+
6
+ // Find the actual binary
7
+ const binDir = __dirname;
8
+ const platform = process.platform;
9
+ const binName = platform === 'win32' ? 'mnemex.exe' : 'mnemex-bin';
10
+ const binPath = path.join(binDir, binName);
11
+
12
+ if (!fs.existsSync(binPath)) {
13
+ console.error('mnemex binary not found. Please reinstall: npm install -g mnemex');
14
+ process.exit(1);
15
+ }
16
+
17
+ // Execute the binary with all arguments
18
+ try {
19
+ execFileSync(binPath, process.argv.slice(2), { stdio: 'inherit' });
20
+ } catch (err) {
21
+ process.exit(err.status || 1);
22
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mnemex",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Memory Extension for AI Agents - Intelligent context optimization via semantic retrieval. MCP server for Claude Code.",
5
5
  "bin": {
6
6
  "mnemex": "./bin/mnemex"
@@ -31,9 +31,10 @@ if (!pkgName) {
31
31
  try {
32
32
  const pkgPath = require.resolve(`${pkgName}/package.json`);
33
33
  const pkgDir = path.dirname(pkgPath);
34
- const binName = PLATFORM === 'win32' ? 'mnemex.exe' : 'mnemex';
35
- const srcBin = path.join(pkgDir, 'bin', binName);
36
- const destBin = path.join(__dirname, '..', 'bin', binName);
34
+ const srcBinName = PLATFORM === 'win32' ? 'mnemex.exe' : 'mnemex';
35
+ const destBinName = PLATFORM === 'win32' ? 'mnemex.exe' : 'mnemex-bin';
36
+ const srcBin = path.join(pkgDir, 'bin', srcBinName);
37
+ const destBin = path.join(__dirname, '..', 'bin', destBinName);
37
38
 
38
39
  // Check if source binary exists
39
40
  if (!fs.existsSync(srcBin)) {