v3.5.0 — Major Release: Command Code Multi-Format Parser, AI Assist, Self-Revive Watchdog
CC Adapter (17 fixes): - Multi-format tool-call parser chain: DSML → bash → explore → XML → raw JSON → fallback - Three-tier argument parser (direct/unescape/unicode_escape) - Recursive double/triple-wrap unwrapping (_unwrap_cmd) - Post-extraction sanitizer validation - DSML tag support (current CC model format) - Self-revive watchdog (50 restarts, progressive backoff) - Debug-to-file logging (cc-debug.log) - Inline self-test (19 tests via --self-test) - ErrorAnalyzer with 4xx learning on retry - Schema cache with 24h TTL Launcher: - AI Assist integration - Updated usage dashboard - Reasoning controls per-provider - Updated cleanup patterns .deb: v3.5.0 (70KB) — v3.3.0 kept as fallback
This commit is contained in:
@@ -1,42 +1,51 @@
|
||||
#!/bin/bash
|
||||
# Cleanup script for Codex Desktop - kills stale processes before launch
|
||||
# Cleanup script for Codex Launcher - kills only launcher-owned processes.
|
||||
|
||||
echo "Cleaning up stale Codex processes..." >&2
|
||||
set -u
|
||||
|
||||
# Kill codex app-server processes
|
||||
for pid in $(ps aux 2>/dev/null | grep -E "codex .*app-server" | grep -v grep | awk '{print $2}'); do
|
||||
kill -9 "$pid" 2>/dev/null || true
|
||||
echo " Killed app-server pid=$pid"
|
||||
REGISTRY="${HOME}/.cache/codex-launcher/pids.json"
|
||||
|
||||
echo "Cleaning up launcher-owned processes..." >&2
|
||||
|
||||
kill_group() {
|
||||
kind="$1"
|
||||
pgid="$2"
|
||||
|
||||
if [ -z "$pgid" ] || [ "$pgid" = "null" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
if kill -TERM -- "-$pgid" 2>/dev/null; then
|
||||
echo " Stopped ${kind} pgid=${pgid}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
if [ -f "$REGISTRY" ]; then
|
||||
python3 - "$REGISTRY" <<'PY'
|
||||
import json, sys
|
||||
from pathlib import Path
|
||||
|
||||
path = Path(sys.argv[1])
|
||||
try:
|
||||
data = json.loads(path.read_text())
|
||||
except Exception:
|
||||
data = {}
|
||||
|
||||
for kind, meta in sorted(data.items()):
|
||||
pgid = meta.get('pgid') if isinstance(meta, dict) else None
|
||||
if pgid:
|
||||
print(f'{kind}\t{pgid}')
|
||||
PY
|
||||
else
|
||||
echo " No registry found; nothing to stop"
|
||||
fi | while IFS=$'\t' read -r kind pgid; do
|
||||
[ -n "${kind:-}" ] || continue
|
||||
kill_group "$kind" "$pgid"
|
||||
done
|
||||
|
||||
# Kill webview server
|
||||
for pid in $(ps aux 2>/dev/null | grep webview-server.py | grep -v grep | awk '{print $2}'); do
|
||||
kill -9 "$pid" 2>/dev/null || true
|
||||
echo " Killed webview-server pid=$pid"
|
||||
done
|
||||
|
||||
# Kill main electron process for codex-desktop
|
||||
for pid in $(ps aux 2>/dev/null | grep "/opt/codex-desktop/electron" | grep "class=codex-desktop" | grep -v grep | awk '{print $2}'); do
|
||||
kill -9 "$pid" 2>/dev/null || true
|
||||
echo " Killed electron pid=$pid"
|
||||
done
|
||||
|
||||
# Kill all remaining child processes of codex-desktop
|
||||
for pid in $(ps aux 2>/dev/null | grep "/opt/codex-desktop/" | grep -v grep | awk '{print $2}'); do
|
||||
kill -9 "$pid" 2>/dev/null || true
|
||||
done
|
||||
|
||||
# Kill zai proxy (if any)
|
||||
for pid in $(ps aux 2>/dev/null | grep zai-proxy.py | grep -v grep | awk '{print $2}'); do
|
||||
kill "$pid" 2>/dev/null || true
|
||||
done
|
||||
|
||||
# Kill unified translation proxy (if any)
|
||||
for pid in $(ps aux 2>/dev/null | grep translate-proxy.py | grep -v grep | awk '{print $2}'); do
|
||||
kill "$pid" 2>/dev/null || true
|
||||
done
|
||||
|
||||
# Remove stale socket and PID files
|
||||
rm -f "$HOME/.codex/.launch-action-socket" 2>/dev/null || true
|
||||
rm -f "$HOME/.codex/.codex-desktop-launch-action" 2>/dev/null || true
|
||||
rm -f "$HOME/.local/share/codex-desktop/.launch-action-socket" 2>/dev/null || true
|
||||
@@ -46,12 +55,4 @@ rm -f "$HOME/.cache/codex-desktop/.codex-desktop-pid" 2>/dev/null || true
|
||||
rm -f "$HOME/.local/share/codex-desktop/.webview-pid" 2>/dev/null || true
|
||||
rm -f "$HOME/.cache/codex-desktop/.webview-pid" 2>/dev/null || true
|
||||
|
||||
sleep 1
|
||||
|
||||
# Verify no remaining process on port 5175 (webview)
|
||||
if lsof -ti :5175 2>/dev/null | grep -q .; then
|
||||
echo " Warning: Port 5175 still in use"
|
||||
lsof -ti :5175 2>/dev/null | xargs kill -9 2>/dev/null || true
|
||||
fi
|
||||
|
||||
echo "Cleanup complete"
|
||||
|
||||
Reference in New Issue
Block a user