runcastle 1.2.1 → 1.2.2

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.
package/bin/runcastle.js CHANGED
@@ -1796,6 +1796,7 @@ var init_waypoints = __esm(() => {
1796
1796
  });
1797
1797
 
1798
1798
  // src/pty/dev-pane.ts
1799
+ import { execFileSync } from "child_process";
1799
1800
  function drivePaneId(ownerId) {
1800
1801
  return `${DRIVE_PREFIX}${ownerId}`;
1801
1802
  }
@@ -1855,14 +1856,20 @@ function devPaneLive(paneId) {
1855
1856
  const entry = ptyRegistry().get(paneId);
1856
1857
  return !!entry && !entry.exited;
1857
1858
  }
1859
+ function killProcessTree(pid) {
1860
+ try {
1861
+ if (process.platform === "win32") {
1862
+ execFileSync("taskkill", ["/pid", String(pid), "/T", "/F"], { stdio: "ignore" });
1863
+ } else {
1864
+ process.kill(-pid, "SIGTERM");
1865
+ }
1866
+ } catch {}
1867
+ }
1858
1868
  function stopDevPane(paneId) {
1859
1869
  const reg = ptyRegistry();
1860
1870
  const entry = reg.get(paneId);
1861
- if (entry && !entry.exited && process.platform !== "win32") {
1862
- try {
1863
- process.kill(-entry.pty.pid, "SIGTERM");
1864
- } catch {}
1865
- }
1871
+ if (entry && !entry.exited)
1872
+ killProcessTree(entry.pty.pid);
1866
1873
  reg.kill(paneId);
1867
1874
  reg.remove(paneId);
1868
1875
  }
package/index.js CHANGED
@@ -1795,6 +1795,7 @@ var init_waypoints = __esm(() => {
1795
1795
  });
1796
1796
 
1797
1797
  // src/pty/dev-pane.ts
1798
+ import { execFileSync } from "child_process";
1798
1799
  function drivePaneId(ownerId) {
1799
1800
  return `${DRIVE_PREFIX}${ownerId}`;
1800
1801
  }
@@ -1854,14 +1855,20 @@ function devPaneLive(paneId) {
1854
1855
  const entry = ptyRegistry().get(paneId);
1855
1856
  return !!entry && !entry.exited;
1856
1857
  }
1858
+ function killProcessTree(pid) {
1859
+ try {
1860
+ if (process.platform === "win32") {
1861
+ execFileSync("taskkill", ["/pid", String(pid), "/T", "/F"], { stdio: "ignore" });
1862
+ } else {
1863
+ process.kill(-pid, "SIGTERM");
1864
+ }
1865
+ } catch {}
1866
+ }
1857
1867
  function stopDevPane(paneId) {
1858
1868
  const reg = ptyRegistry();
1859
1869
  const entry = reg.get(paneId);
1860
- if (entry && !entry.exited && process.platform !== "win32") {
1861
- try {
1862
- process.kill(-entry.pty.pid, "SIGTERM");
1863
- } catch {}
1864
- }
1870
+ if (entry && !entry.exited)
1871
+ killProcessTree(entry.pty.pid);
1865
1872
  reg.kill(paneId);
1866
1873
  reg.remove(paneId);
1867
1874
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "runcastle",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Burn tickets into shipped features with Claude Code.",
5
5
  "license": "MIT",
6
6
  "type": "module",