@seamnet/client 0.13.4 → 0.13.6

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/lib/guardian.js +5 -5
  2. package/package.json +1 -1
package/lib/guardian.js CHANGED
@@ -130,13 +130,13 @@ export async function guardianRun() {
130
130
  process.exit(1);
131
131
  }
132
132
 
133
- // 单例保证:检查 PID 文件,如已有活进程则退出
134
- if (isGuardianRunning()) {
135
- const existingPid = readGuardianPid();
133
+ // 单例保证:检查 PID 文件,如已有别的活进程则退出
134
+ const existingPid = readGuardianPid();
135
+ if (existingPid !== null && existingPid !== process.pid && isPidAlive(existingPid)) {
136
136
  console.error(`Guardian already running (pid: ${existingPid}). Exiting.`);
137
137
  process.exit(0);
138
138
  }
139
- // 写 PID,退出时清理
139
+ // 写 PID(覆盖 guardianStart 写的 child.pid),退出时清理
140
140
  writeFileSync(PID_PATH, String(process.pid));
141
141
  const cleanPid = () => { try { if (existsSync(PID_PATH)) unlinkSync(PID_PATH); } catch {} };
142
142
  process.on('exit', cleanPid);
@@ -228,7 +228,7 @@ export async function guardianRun() {
228
228
  setTimeout(() => {
229
229
  try {
230
230
  execSync(
231
- `${tmux} send-keys -t ${safeSession} 'claude --dangerously-skip-permissions' Enter`,
231
+ `${tmux} send-keys -t ${safeSession} 'claude --dangerously-skip-permissions --continue' Enter`,
232
232
  { stdio: 'ignore', timeout: 5000 }
233
233
  );
234
234
  guardianState.set('cc_restarted', new Date().toISOString());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamnet/client",
3
- "version": "0.13.4",
3
+ "version": "0.13.6",
4
4
  "description": "One command to join Seam — the network where people and AI stay in sync.",
5
5
  "bin": {
6
6
  "seam-client": "bin/cli.js",