- HealthWatcher thread: monitors proxy /health every 5s - LogAnalyzer thread: tails cc-debug.log for 18 failure signal patterns - Tier 1 rule engine: 14 rules for instant auto-recovery (< 1s) - Tier 2 incident store: JSON pattern database with success rates - Tier 3 AI diagnostic agent: calls configurable provider/model for novel failures - AIMonitoringWindow GUI: ON/OFF toggle, provider/model/API key selector, incident log - 30 fault types catalogued across 5 categories (A-E) - Enhanced /health endpoint with memory_mb, uptime_s, requests_total - Auto-restart proxy, auto-clear schema cache, kill stale processes - Safety: rate-limited AI calls, restart caps, cooldowns per pattern - AI Monitoring design spec (AI-MONITORING-DESIGN.md) - 54 self-test patterns passing
37 lines
1.6 KiB
Bash
Executable File
37 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
|
|
if [ -f "$SCRIPT_DIR/codex-launcher_3.8.0_all.deb" ]; then
|
|
echo "Installing codex-launcher_3.8.0_all.deb ..."
|
|
sudo dpkg -i "$SCRIPT_DIR/codex-launcher_3.8.0_all.deb"
|
|
echo ""
|
|
echo "Installed v3.8.0 via .deb package."
|
|
echo " translate-proxy.py -> /usr/bin/translate-proxy.py"
|
|
echo " codex-launcher-gui -> /usr/bin/codex-launcher-gui"
|
|
echo " cleanup-codex-stale -> /usr/bin/cleanup-codex-stale.sh"
|
|
echo " desktop entry -> /usr/share/applications/codex-launcher.desktop"
|
|
else
|
|
BIN_DIR="$HOME/.local/bin"
|
|
APP_DIR="$HOME/.local/share/applications"
|
|
mkdir -p "$BIN_DIR" "$APP_DIR"
|
|
cp "$SCRIPT_DIR/src/translate-proxy.py" "$BIN_DIR/"
|
|
cp "$SCRIPT_DIR/src/codex-launcher-gui" "$BIN_DIR/"
|
|
cp "$SCRIPT_DIR/src/cleanup-codex-stale.sh" "$BIN_DIR/"
|
|
chmod +x "$BIN_DIR/translate-proxy.py"
|
|
chmod +x "$BIN_DIR/codex-launcher-gui"
|
|
chmod +x "$BIN_DIR/cleanup-codex-stale.sh"
|
|
USERNAME=$(whoami)
|
|
sed "s/YOUR_USERNAME/$USERNAME/g" "$SCRIPT_DIR/src/codex-launcher.desktop.template" > "$APP_DIR/codex-launcher.desktop"
|
|
update-desktop-database "$APP_DIR" 2>/dev/null || true
|
|
echo "Installed from source."
|
|
echo " translate-proxy.py -> $BIN_DIR/translate-proxy.py"
|
|
echo " codex-launcher-gui -> $BIN_DIR/codex-launcher-gui"
|
|
echo " cleanup-codex-stale -> $BIN_DIR/cleanup-codex-stale.sh"
|
|
echo " desktop entry -> $APP_DIR/codex-launcher.desktop"
|
|
fi
|
|
|
|
echo ""
|
|
echo "Open 'Codex Launcher' from your app grid, or run: codex-launcher-gui"
|