()
| 142 | } |
| 143 | |
| 144 | function defaultProcessRunning(): boolean { |
| 145 | // No reliable pgrep on Windows; rely on the lock-file signal there. |
| 146 | if (process.platform === "win32") return false; |
| 147 | const r = spawnSync("pgrep", ["-f", "gbrain autopilot"], { encoding: "utf-8", timeout: 3_000 }); |
| 148 | return r.status === 0 && (r.stdout || "").trim().length > 0; |
| 149 | } |
| 150 | |
| 151 | // ── Capability detection (E4 + Codex: per-process memo, no persistent cache) ─ |
| 152 | // |
nothing calls this directly
no test coverage detected