#!/bin/bash
# Hermes Node Agent Installer — Linux Version
# Copyright (c) 2026 Stefy (nextime) Lanza <stefy@nexlab.net>
# All rights reserved.
#
# This software is released under the MIT License with a copyleft clause.
# See the LICENSE file for full terms.
#
# INSTALLER DESCRIPTION:
# Self-contained installer for Linux. Embedded: node agent code, init.d script.
# External: pip install websockets (online required).
# No git clone, no network downloads of our files.

set -e

echo "=== Hermes Node Agent Installer (Linux) ==="
echo ""

# Check if running as root (for service setup)
if [ "$EUID" -eq 0 ]; then 
    RUN_AS_ROOT=true
else
    RUN_AS_ROOT=false
    echo "⚠️  Not running as root — skipping service installation."
    echo "   To install as a service, run: sudo $0"
    echo ""
fi

# Check for Python 3
if ! command -v python3 &> /dev/null; then
    echo "❌ ERROR: Python 3 is required but not found."
    echo "   Install Python 3 first, then re-run this installer."
    exit 1
fi
echo "✓ Python: $(python3 --version)"

# Check for pip (will use it to install websockets)
if ! command -v pip3 &> /dev/null && ! command -v pip &> /dev/null; then
    echo "❌ ERROR: pip is required but not found."
    echo "   Install with: apt install python3-pip (Debian/Ubuntu) or equivalent"
    exit 1
fi
PIP_CMD="pip3"
command -v pip3 &> /dev/null || PIP_CMD="pip"

# Install websockets library (only network call)
echo "[1/5] Installing Python dependencies (websockets)..."
# Check if already installed
if python3 -c "import websockets" 2>/dev/null; then
    echo "✓ websockets library already installed"
else
    if ! $PIP_CMD install --quiet websockets 2>/dev/null; then
        echo "⚠️  Could not install via pip (may need network). Trying with user flag..."
        if ! $PIP_CMD install --user --quiet websockets 2>/dev/null; then
            echo "❌ Failed to install websockets. Try manually: $PIP_CMD install websockets"
            exit 1
        fi
    fi
    echo "✓ websockets library installed"
fi

# Determine install locations
if [ "$RUN_AS_ROOT" = true ]; then
    AGENT_DIR="/usr/local/bin"
    CONFIG_DIR="/etc/hermes-node"
    USE_SERVICE=true
else
    AGENT_DIR="$HOME/.local/bin"
    CONFIG_DIR="$HOME/.config/hermes-node"
    USE_SERVICE=false
fi

mkdir -p "$AGENT_DIR"
mkdir -p "$CONFIG_DIR"

# Extract embedded agent files
echo "[2/5] Extracting embedded agent files..."
TMP_EXTRACT=$(mktemp -d)
cd "$TMP_EXTRACT"

# === EMBEDDED TARBALL (base64) ===
cat <<'TARBALL_DATA' | base64 -d | tar xzf -
H4sIAAAAAAAAA+w87XLbRpL+jaeY0KqY9IrgN7VhYl8Ui5ZZK4sqUYovlU2JIDAUEYEAAoCWuba37s/tr6u6qtv7dbVXdY9xz5MX
uFe47p4ZYACQlOz1bu5ql0lZImamp6e7p7+hBY+WPK77gcPr1jX3k8aDT/5pwufgoIc/Wwe9pv5TfR60eq2D7kGve9BpP2i2Os1u
5wHrfXpUyp9VnFgRYw88N7Z2zbtr/P/pZ1Hiv+sDRTzPjBefao87+H/QbfUK/O81ewcPWPNTIbDr8zfO/4efNWau35hZ8cJ4yF6Q
NLBTkAZ2FgVJYAcePH4WhOvIvV4krGrXWLvZ7rNJwudrVvX5m8Rd8ho7sfzfWeyrGB9/DU89a2b6PHkKqw89j9HqmEU85tFr7pjw
GP6/WLgxi4N5cmtFnLk47nEr5g5b+Q6PWLLg7OXogp24Nvdjzm7dZMEsZgM6Hp8nzPasVcwR2IRzmn0yejY8nQzZ3PU4mwcRm69g
9wSOFZuF8x2itLORkHbY7Od/+nfYyF+9Yd/yKHYDH+bL0ZhglxdbMWAzWcffMtd3E4ZnA0xh3Tn/aeXCYQcMCbvPztbJIvBZZ5+F
brjPoiAAUiJ6cknNMGKesDo3DG4vAlZ58uTJTmSrhGmNwbyKXFIxkFMLbt8wd86ile+7/jWiWNoNfiarsGbAtO9ZZW94OTqqwN4/
sSb74Us8qs8MBp/zy9Orw8nV+Xh88SSJVtzgXsxLI3NLPRV4/Pwf//U///2vDPBOSlggjeMbNwzxocJGKhwrAZqbFQ0S/HIRqGFB
bLlmHyEPWLxyArbX1NdUjLmbEQIPrWiPx/0MZGe5tHyH1V+zkAY67POnrOHw1w0fREUcXz/Nf/4LG56fj88HKSAhqMRgh81WCfPh
ZPMARF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es-node-agent/hermes_node_agent.py "$AGENT_DIR/hermes-node-agent"
chmod +x "$AGENT_DIR/hermes-node-agent"
echo "✓ Agent: $AGENT_DIR/hermes-node-agent"

# Copy init.d script (for root installs)
if [ "$USE_SERVICE" = true ]; then
    cp hermes-node-agent/hermes-node-agent.init.d /etc/init.d/hermes-node-agent
    chmod +x /etc/init.d/hermes-node-agent
    echo "✓ Init script: /etc/init.d/hermes-node-agent"
fi

# Copy node_gateway.py (for plugin reference, if needed)
cp hermes-node-agent/node_gateway.py "$AGENT_DIR/hermes-node-gateway.py" 2>/dev/null || true

# Clean up
echo "[3/5] Cleaning up temporary files..."
cd /
rm -rf "$TMP_EXTRACT"

# Create config file if missing
echo "[4/5] Checking configuration..."
if [ ! -f "$CONFIG_DIR/config.json" ]; then
    echo "[5/5] Creating config file..."
    NODE_NAME=$(hostname)
    TOKEN=$(python3 -c "import secrets; print(secrets.token_hex(16))")
    
    cat > "$CONFIG_DIR/config.json" << EOF
{
  "gateway_url": "ws://YOUR-GATEWAY-HOST:8765",
  "node_name": "${NODE_NAME}",
  "token": "${TOKEN}",
  "sexec_path": "${HOME}/.openclaw/skills/sexec/sexec.sh",
  "reconnect_interval": 5,
  "heartbeat_interval": 30,
  "capabilities": ["exec"]
}
EOF
    echo "✓ Config: $CONFIG_DIR/config.json"
    echo ""
    echo "⚠️  IMPORTANT: Edit $CONFIG_DIR/config.json"
    echo "   → Set gateway_url to your gateway (e.g., wss://zeiss:8765)"
    echo "   → Set token to match gateway's token for this node"
    echo "   → Add capabilities: ["exec", "browser_control", "computer_control"] as needed"
else
    echo "[5/5] Config already exists → skipping"
    echo "   Config: $CONFIG_DIR/config.json"
fi

# Install SysV init service (root only)
if [ "$USE_SERVICE" = true ]; then
    echo ""
    echo "[Service] Enabling auto-start on boot..."
    update-rc.d hermes-node-agent defaults 2>/dev/null || true
    echo "✓ Service: /etc/init.d/hermes-node-agent"
    echo ""
    echo "Service commands:"
    echo "  /etc/init.d/hermes-node-agent start|stop|restart|status"
else
    echo ""
    echo "[Service] Skipped (not root). Manual start required:"
    echo "  $AGENT_DIR/hermes-node-agent --config $CONFIG_DIR/config.json"
fi

echo ""
echo "=== Installation Complete ==="
echo ""
echo "Quick start:"
echo "  Config:    $CONFIG_DIR/config.json"
echo "  Agent:     $AGENT_DIR/hermes-node-agent"
echo "  Run:       $AGENT_DIR/hermes-node-agent --config $CONFIG_DIR/config.json"
echo ""

if [ "$USE_SERVICE" = true ]; then
    echo "To start the service:"
    echo "  /etc/init.d/hermes-node-agent start"
    echo ""
else
    echo "To run manually:"
    echo "  $AGENT_DIR/hermes-node-agent --config $CONFIG_DIR/config.json &"
    echo ""
fi
