This commit removes deprecated modules and reorganizes code into logical directories: Deleted files (superseded by newer systems): - claude_code_server.py (replaced by agent-sdk direct integration) - heartbeat.py (superseded by scheduled_tasks.py) - pulse_brain.py (unused in production) - config/pulse_brain_config.py (obsolete config) Created directory structure: - examples/ (7 example files: example_*.py, demo_*.py) - tests/ (5 test files: test_*.py) Updated imports: - agent.py: Removed heartbeat module and all enable_heartbeat logic - bot_runner.py: Removed heartbeat parameter from Agent initialization - llm_interface.py: Updated deprecated claude_code_server message Preserved essential files: - hooks.py (for future use) - adapters/skill_integration.py (for future use) - All Google integration tools (Gmail, Calendar, Contacts) - GLM provider code (backward compatibility) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
80 lines
2.0 KiB
Batchfile
80 lines
2.0 KiB
Batchfile
@echo off
|
|
REM ========================================
|
|
REM Ajarbot - Windows One-Command Launcher
|
|
REM ========================================
|
|
REM
|
|
REM This script:
|
|
REM 1. Creates/activates virtual environment
|
|
REM 2. Installs dependencies if needed
|
|
REM 3. Runs ajarbot.py
|
|
REM
|
|
REM Usage:
|
|
REM run.bat Run the bot
|
|
REM run.bat --init Generate config template
|
|
REM run.bat --health Health check
|
|
REM
|
|
|
|
echo ========================================
|
|
echo Ajarbot Windows Launcher
|
|
echo ========================================
|
|
echo.
|
|
|
|
REM Check if virtual environment exists
|
|
if not exist "venv\Scripts\activate.bat" (
|
|
echo [Setup] Creating virtual environment...
|
|
python -m venv venv
|
|
if errorlevel 1 (
|
|
echo ERROR: Failed to create virtual environment
|
|
echo Please ensure Python 3.10+ is installed and in PATH
|
|
pause
|
|
exit /b 1
|
|
)
|
|
echo [Setup] Virtual environment created
|
|
)
|
|
|
|
REM Activate virtual environment
|
|
echo [Setup] Activating virtual environment...
|
|
call venv\Scripts\activate.bat
|
|
if errorlevel 1 (
|
|
echo ERROR: Failed to activate virtual environment
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
REM Check if dependencies are installed (check for a key package)
|
|
python -c "import anthropic" 2>nul
|
|
if errorlevel 1 (
|
|
echo.
|
|
echo [Setup] Installing dependencies...
|
|
echo This may take a few minutes on first run...
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
if errorlevel 1 (
|
|
echo ERROR: Failed to install dependencies
|
|
pause
|
|
exit /b 1
|
|
)
|
|
echo [Setup] Dependencies installed
|
|
echo.
|
|
)
|
|
|
|
REM Run ajarbot with all arguments passed through
|
|
echo [Launch] Starting ajarbot...
|
|
echo.
|
|
python ajarbot.py %*
|
|
|
|
REM Check exit code
|
|
if errorlevel 1 (
|
|
echo.
|
|
echo ========================================
|
|
echo Ajarbot exited with an error
|
|
echo ========================================
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
echo.
|
|
echo ========================================
|
|
echo Ajarbot stopped cleanly
|
|
echo ========================================
|