team-anya 0.2.4 → 0.2.5

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.
@@ -31,6 +31,11 @@ export function removePid(anyaHome) {
31
31
  unlinkSync(pidFile);
32
32
  }
33
33
  export function isProcessAlive(pid) {
34
+ // 如果 PID 就是当前进程自身,说明是容器重启后 PID 复用(尤其 PID 1)
35
+ // 这不是另一个运行中的实例,应视为残留
36
+ if (pid === process.pid) {
37
+ return false;
38
+ }
34
39
  try {
35
40
  process.kill(pid, 0);
36
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "team-anya",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "type": "module",
5
5
  "description": "Team Anya - AI 数字员工系统",
6
6
  "bin": {