@echo off
REM Hermes Node Agent launcher (user-owned)
REM Reads config from %APPDATA%\HermesNode\config.json

setlocal

set "AGENT_EXE=%~dp0hermes-node-agent.exe"
set "CONFIG_FILE=%APPDATA%\HermesNode\config.json"

if not exist "%CONFIG_FILE%" (
    echo [ERROR] Config file not found: %CONFIG_FILE%
    echo Please run the installer first to create your configuration.
    pause
    exit /b 1
)

if not exist "%AGENT_EXE%" (
    echo [ERROR] Agent executable not found: %AGENT_EXE%
    pause
    exit /b 1
)

echo [INFO] Starting Hermes Node Agent...
echo [INFO] Config: %CONFIG_FILE%
echo [INFO] Press Ctrl+C to stop.

"%AGENT_EXE%" --config "%CONFIG_FILE%"

endlocal
