claude-friends 0.4.11 → 0.4.12

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.
Files changed (2) hide show
  1. package/daemon.js +10 -2
  2. package/package.json +1 -1
package/daemon.js CHANGED
@@ -52,8 +52,16 @@ setInterval(() => {
52
52
  }
53
53
  }, 15000);
54
54
 
55
- // Keep process alive
56
- setInterval(() => {}, 60000);
55
+ // Exit when parent process (Claude Code) dies
56
+ const parentPid = process.ppid;
57
+ setInterval(() => {
58
+ try {
59
+ process.kill(parentPid, 0); // Check if parent is alive (signal 0 = no-op)
60
+ } catch {
61
+ ws.close();
62
+ process.exit(0);
63
+ }
64
+ }, 5000);
57
65
 
58
66
  // Clean exit
59
67
  process.on("SIGINT", () => { ws.close(); process.exit(0); });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-friends",
3
- "version": "0.4.11",
3
+ "version": "0.4.12",
4
4
  "description": "See who's online in Claude Code. Add friends, share status, nudge each other.",
5
5
  "type": "module",
6
6
  "bin": {