@echo off REM RE-AI plugin verifier (Windows). Smoke tests the install. setlocal EnableDelayedExpansion set "PLUGIN_ROOT=%~dp0" if "%PLUGIN_ROOT:~-1%"=="\" set "PLUGIN_ROOT=%PLUGIN_ROOT:~0,-1%" if exist "%PLUGIN_ROOT%\.venv-re-ai\Scripts\activate.bat" ( call "%PLUGIN_ROOT%\.venv-re-ai\Scripts\activate.bat" set "PYTHON_BIN=python" echo ^(using venv^) ) else ( set "PYTHON_BIN=python" ) set "PASS=0" set "FAIL=0" echo === RE-AI verify === REM Manifest sanity echo . plugin.json is valid JSON "%PYTHON_BIN%" -c "import json; json.load(open('%PLUGIN_ROOT%\.claude-plugin\plugin.json'))" if errorlevel 1 ( set "FAIL=1" ) else ( set /a "PASS+=1" & echo PASS ) echo . .mcp.json is valid JSON "%PYTHON_BIN%" -c "import json; json.load(open('%PLUGIN_ROOT%\.mcp.json'))" if errorlevel 1 ( set "FAIL=1" ) else ( set /a "PASS+=1" & echo PASS ) echo . plugin.json has 'name' field "%PYTHON_BIN%" -c "import json; assert 'name' in json.load(open('%PLUGIN_ROOT%\.claude-plugin\plugin.json'))" if errorlevel 1 ( set "FAIL=1" ) else ( set /a "PASS+=1" & echo PASS ) echo . .mcp.json declares 10 servers with the 8 originals + re-il2cpp + re-winedbg "%PYTHON_BIN%" -c "import json; d=json.load(open('%PLUGIN_ROOT%\.mcp.json'))['mcpServers']; originals={'re-rizin','re-capa','re-lief','re-llm-decompile','re-mitm2swagger','re-kaitai','re-gdb','re-triton'}; assert len(d)==10 and originals.issubset(d) and 're-il2cpp' in d and 're-winedbg' in d, d" if errorlevel 1 ( set "FAIL=1" ) else ( set /a "PASS+=1" & echo PASS ) if exist "%PLUGIN_ROOT%\tests" ( "%PYTHON_BIN%" -m pytest -q "%PLUGIN_ROOT%\tests\test_skills_frontmatter.py" >nul 2>&1 if errorlevel 1 ( set "FAIL=1" ) else ( set /a "PASS+=1" & echo test_skills_frontmatter.py PASS ) "%PYTHON_BIN%" -m pytest -q "%PLUGIN_ROOT%\tests\test_plugin_manifest.py" >nul 2>&1 if errorlevel 1 ( set "FAIL=1" ) else ( set /a "PASS+=1" & echo test_plugin_manifest.py PASS ) ) echo. echo Passed: %PASS% echo Failed: %FAIL% if "%FAIL%"=="0" ( echo All checks passed. ) else ( echo Some checks failed. ) exit /b %FAIL% endlocal