claude-glm 1.2.1 → 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 +12 -0
  2. package/install.sh +12 -0
  3. package/package.json +1 -1
package/bin/ccx CHANGED
@@ -68,6 +68,18 @@ 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 ccx proxy (tsx anthropic-gateway) on the same port
72
+ if lsof -ti:${PORT} >/dev/null 2>&1; then
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
81
+ fi
82
+
71
83
  # Start proxy in background
72
84
  npx -y tsx "${ROOT_DIR}/adapters/anthropic-gateway.ts" > /tmp/claude-proxy.log 2>&1 &
73
85
  PROXY_PID=$!
package/install.sh CHANGED
@@ -615,6 +615,18 @@ 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 ccx proxy (tsx anthropic-gateway) on the same port
619
+ if lsof -ti:${PORT} >/dev/null 2>&1; then
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
628
+ fi
629
+
618
630
  # Start proxy in background
619
631
  npx -y tsx "${ROOT_DIR}/adapters/anthropic-gateway.ts" > /tmp/claude-proxy.log 2>&1 &
620
632
  PROXY_PID=$!
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-glm",
3
- "version": "1.2.1",
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",