claude-glm 1.2.2 → 1.2.3

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.
Files changed (3) hide show
  1. package/bin/ccx +9 -4
  2. package/install.sh +9 -4
  3. package/package.json +1 -1
package/bin/ccx CHANGED
@@ -68,11 +68,16 @@ export ANTHROPIC_AUTH_TOKEN="${ANTHROPIC_AUTH_TOKEN:-local-proxy-token}"
68
68
  echo "[ccx] Starting Claude Code with multi-provider proxy..."
69
69
  echo "[ccx] Proxy will listen on: ${ANTHROPIC_BASE_URL}"
70
70
 
71
- # Kill any stale proxy on the same port
71
+ # Kill any stale ccx proxy (tsx anthropic-gateway) on the same port
72
72
  if lsof -ti:${PORT} >/dev/null 2>&1; then
73
- echo "[ccx] Killing stale proxy on port ${PORT}..."
74
- lsof -ti:${PORT} | xargs kill -9 2>/dev/null || true
75
- sleep 0.5
73
+ STALE_PIDS=$(lsof -ti:${PORT} 2>/dev/null | while read pid; do
74
+ ps -p "$pid" -o args= 2>/dev/null | grep -q "anthropic-gateway" && echo "$pid"
75
+ done)
76
+ if [ -n "$STALE_PIDS" ]; then
77
+ echo "[ccx] Killing stale proxy on port ${PORT}..."
78
+ echo "$STALE_PIDS" | xargs kill -9 2>/dev/null || true
79
+ sleep 0.5
80
+ fi
76
81
  fi
77
82
 
78
83
  # Start proxy in background
package/install.sh CHANGED
@@ -615,11 +615,16 @@ export ANTHROPIC_AUTH_TOKEN="${ANTHROPIC_AUTH_TOKEN:-local-proxy-token}"
615
615
  echo "[ccx] Starting Claude Code with multi-provider proxy..."
616
616
  echo "[ccx] Proxy will listen on: ${ANTHROPIC_BASE_URL}"
617
617
 
618
- # Kill any stale proxy on the same port
618
+ # Kill any stale ccx proxy (tsx anthropic-gateway) on the same port
619
619
  if lsof -ti:${PORT} >/dev/null 2>&1; then
620
- echo "[ccx] Killing stale proxy on port ${PORT}..."
621
- lsof -ti:${PORT} | xargs kill -9 2>/dev/null || true
622
- sleep 0.5
620
+ STALE_PIDS=$(lsof -ti:${PORT} 2>/dev/null | while read pid; do
621
+ ps -p "$pid" -o args= 2>/dev/null | grep -q "anthropic-gateway" && echo "$pid"
622
+ done)
623
+ if [ -n "$STALE_PIDS" ]; then
624
+ echo "[ccx] Killing stale proxy on port ${PORT}..."
625
+ echo "$STALE_PIDS" | xargs kill -9 2>/dev/null || true
626
+ sleep 0.5
627
+ fi
623
628
  fi
624
629
 
625
630
  # Start proxy in background
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-glm",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "Cross-platform installer for Claude Code with Z.AI GLM models, multi-provider proxy, and dangerously-skip-permissions shortcuts. Run with: npx claude-glm",
5
5
  "keywords": [
6
6
  "claude",