@kelceyp/caw-server 1.0.205 → 1.0.206

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.
@@ -294,43 +294,18 @@ const emitResult = () => {
294
294
  }
295
295
  };
296
296
 
297
- // --- Inactivity timeout ---
298
- // Resets on every new transcript entry. Only fires after 5 continuous minutes
299
- // with NO transcript activity AND no process exit — indicating a genuine hang.
300
-
301
- const INACTIVITY_TIMEOUT_MS = 5 * 60 * 1000;
302
- let inactivityTimer = null;
303
-
304
- const resetInactivityTimer = () => {
305
- if (inactivityTimer) clearTimeout(inactivityTimer);
306
- inactivityTimer = setTimeout(() => {
307
- log('Inactivity timeout: no transcript activity for 5 minutes, killing claude');
308
- stopPolling();
309
- ptyProcess.kill();
310
- // Clean up temp dir before exiting — process.exit() is synchronous so
311
- // onExit cannot fire after this point.
312
- try { rmSync(tempDir, { recursive: true, force: true }); } catch {}
313
- process.exit(1);
314
- }, INACTIVITY_TIMEOUT_MS);
315
- };
316
-
317
297
  // --- Transcript poll interval ---
318
298
 
319
299
  let transcriptPollInterval;
320
300
 
321
301
  const stopPolling = () => {
322
- if (inactivityTimer) { clearTimeout(inactivityTimer); inactivityTimer = null; }
323
302
  if (transcriptPollInterval) { clearInterval(transcriptPollInterval); transcriptPollInterval = null; }
324
303
  };
325
304
 
326
305
  transcriptPollInterval = setInterval(() => {
327
- const newLines = tailTranscript();
328
- if (newLines > 0) resetInactivityTimer();
306
+ tailTranscript();
329
307
  }, 1000);
330
308
 
331
- // Start inactivity timer now that claude is spawned
332
- resetInactivityTimer();
333
-
334
309
  // --- Signal forwarding ---
335
310
  // Forward SIGTERM/SIGINT to the claude process inside the PTY.
336
311
  // onExit fires when ptyProcess exits, handling cleanup.