@colbymchenry/cmem 0.2.20 → 0.2.28

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.

Potentially problematic release.


This version of @colbymchenry/cmem might be problematic. Click here for more details.

package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@colbymchenry/cmem",
3
- "version": "0.2.20",
4
- "description": "Persistent session storage for Claude Code CLI",
3
+ "version": "0.2.28",
4
+ "description": "Never lose a Claude Code conversation again. Vector-powered semantic search, not markdown files. Browse, search, and resume any session.",
5
5
  "main": "dist/cli.js",
6
6
  "type": "module",
7
7
  "bin": {
@@ -9,7 +9,8 @@
9
9
  },
10
10
  "scripts": {
11
11
  "build": "tsup src/cli.ts --format esm --dts --clean",
12
- "dev": "tsup src/cli.ts --format esm --watch"
12
+ "dev": "tsup src/cli.ts --format esm --watch",
13
+ "postinstall": "node scripts/postinstall.js"
13
14
  },
14
15
  "dependencies": {
15
16
  "@modelcontextprotocol/sdk": "^1.0.0",
@@ -43,15 +44,23 @@
43
44
  "keywords": [
44
45
  "claude",
45
46
  "claude-code",
46
- "cli",
47
- "session",
47
+ "mcp",
48
48
  "memory",
49
- "ai"
49
+ "semantic-search",
50
+ "vector-search",
51
+ "session",
52
+ "context",
53
+ "ai",
54
+ "llm",
55
+ "embeddings",
56
+ "local",
57
+ "tui"
50
58
  ],
51
59
  "author": "Colby McHenry",
52
60
  "license": "MIT",
53
61
  "files": [
54
62
  "dist",
63
+ "scripts",
55
64
  "README.md"
56
65
  ]
57
66
  }
@@ -0,0 +1,46 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Postinstall script - restarts the cmem watch daemon if it's running
4
+ * This ensures the daemon uses the updated code after npm install
5
+ */
6
+ import { execSync } from 'child_process';
7
+ import { existsSync } from 'fs';
8
+ import { homedir } from 'os';
9
+ import { join } from 'path';
10
+
11
+ const PLIST_PATH = join(homedir(), 'Library', 'LaunchAgents', 'com.cmem.watch.plist');
12
+
13
+ // Only run on macOS
14
+ if (process.platform !== 'darwin') {
15
+ process.exit(0);
16
+ }
17
+
18
+ // Check if daemon is installed
19
+ if (!existsSync(PLIST_PATH)) {
20
+ process.exit(0);
21
+ }
22
+
23
+ // Check if daemon is running
24
+ try {
25
+ const result = execSync('launchctl list | grep com.cmem.watch', {
26
+ encoding: 'utf-8',
27
+ stdio: ['pipe', 'pipe', 'pipe'],
28
+ });
29
+
30
+ const parts = result.trim().split(/\s+/);
31
+ const pid = parts[0];
32
+
33
+ // If running (has a PID), restart it
34
+ if (pid && pid !== '-') {
35
+ console.log('Restarting cmem watch daemon to use updated code...');
36
+ try {
37
+ execSync(`launchctl unload "${PLIST_PATH}"`, { stdio: 'ignore' });
38
+ execSync(`launchctl load "${PLIST_PATH}"`, { stdio: 'ignore' });
39
+ console.log('✓ Daemon restarted');
40
+ } catch {
41
+ console.log('Note: Could not restart daemon. Run: cmem install');
42
+ }
43
+ }
44
+ } catch {
45
+ // Daemon not running, nothing to do
46
+ }