vibe-coding-master 0.8.9 → 0.8.11

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.
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>VibeCodingMaster</title>
7
- <script type="module" crossorigin src="/assets/index-BWbworWs.js"></script>
7
+ <script type="module" crossorigin src="/assets/index-Db0OTAez.js"></script>
8
8
  <link rel="stylesheet" crossorigin href="/assets/index-xgiQeUD5.css">
9
9
  </head>
10
10
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibe-coding-master",
3
- "version": "0.8.9",
3
+ "version": "0.8.11",
4
4
  "description": "Local GUI session cockpit for Claude Code role sessions.",
5
5
  "type": "module",
6
6
  "files": [
@@ -117,6 +117,27 @@ def process_exists(pid: int) -> bool:
117
117
  return True
118
118
 
119
119
 
120
+ def process_group_exists(pgid: int) -> bool:
121
+ try:
122
+ os.killpg(pgid, 0)
123
+ return True
124
+ except ProcessLookupError:
125
+ return False
126
+ except PermissionError:
127
+ return True
128
+
129
+
130
+ def wait_for_process_group_exit(process: subprocess.Popen, timeout: float) -> bool:
131
+ deadline = time.monotonic() + timeout
132
+ while time.monotonic() < deadline:
133
+ process.poll()
134
+ if not process_group_exists(process.pid):
135
+ return True
136
+ time.sleep(0.05)
137
+ process.poll()
138
+ return not process_group_exists(process.pid)
139
+
140
+
120
141
  def stop_command(process: subprocess.Popen) -> str:
121
142
  try:
122
143
  os.killpg(process.pid, signal.SIGTERM)
@@ -127,17 +148,15 @@ def stop_command(process: subprocess.Popen) -> str:
127
148
  process.terminate()
128
149
  mode = "process"
129
150
 
130
- try:
131
- process.wait(timeout=2)
151
+ if wait_for_process_group_exit(process, 2):
132
152
  return f"terminated-{mode}"
133
- except subprocess.TimeoutExpired:
134
- pass
135
153
 
136
154
  try:
137
155
  os.killpg(process.pid, signal.SIGKILL)
138
156
  except (ProcessLookupError, PermissionError):
139
- process.kill()
140
- return f"killed-{mode}"
157
+ if process.poll() is None:
158
+ process.kill()
159
+ return f"killed-{mode}" if wait_for_process_group_exit(process, 2) else f"cleanup-incomplete-{mode}"
141
160
 
142
161
 
143
162
  def lease_age_seconds(lease_path: Path) -> float | None: