From d1a0ebee61b8987df85c328d359967e46d1e5226 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Fri, 26 Dec 2025 19:42:23 +0900 Subject: [PATCH] fix(health): correct CLIProxy port detection on macOS/Linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two bugs caused the health check to incorrectly report "Proxy not running": 1. lsof command used mutually exclusive flags (-t and -F) - Removed -t flag since -F already provides structured output 2. isCLIProxyProcess whitelist was missing common binary names - Added: cliproxyapi, cli-proxy-api-plus (and .exe variants) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/utils/port-utils.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/utils/port-utils.ts b/src/utils/port-utils.ts index e3351ac2..8416e97e 100644 --- a/src/utils/port-utils.ts +++ b/src/utils/port-utils.ts @@ -38,7 +38,7 @@ export async function getPortProcess(port: number): Promise */ async function getPortProcessUnix(port: number): Promise { try { - const { stdout } = await execAsync(`lsof -i :${port} -sTCP:LISTEN -t -F pcn`, { + const { stdout } = await execAsync(`lsof -i :${port} -sTCP:LISTEN -F pcn`, { timeout: 3000, }); @@ -117,7 +117,7 @@ export function isCLIProxyProcess(process: PortProcess | null): boolean { return false; } - // Match cli-proxy, cli-proxy.exe, cliproxy, cliproxy.exe, cli-proxy-api + // Match various CLIProxy binary names const name = process.processName.toLowerCase(); return [ 'cli-proxy', @@ -126,6 +126,10 @@ export function isCLIProxyProcess(process: PortProcess | null): boolean { 'cliproxy.exe', 'cli-proxy-api', 'cli-proxy-api.exe', + 'cliproxyapi', + 'cliproxyapi.exe', + 'cli-proxy-api-plus', + 'cli-proxy-api-plus.exe', ].includes(name); }