mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-03-17 19:03:09 +00:00
Major changes across 21 files (755 additions, 196 deletions): Browser Automation Migration: - Add versioned project migration system (prompts.py) with content-based detection and section-level regex replacement for coding/testing prompts - Migrate STEP 5 (browser verification) and BROWSER AUTOMATION sections in coding prompt template to use playwright-cli commands - Migrate STEP 2 and AVAILABLE TOOLS sections in testing prompt template - Migration auto-runs at agent startup (autonomous_agent_demo.py), copies playwright-cli skill, scaffolds .playwright/cli.config.json, updates .gitignore, and stamps .migration_version file - Add playwright-cli command validation to security allowlist (security.py) with tests for allowed subcommands and blocked eval/run-code Headless Browser Setting Fix: - Add _apply_playwright_headless() to process_manager.py that reads/updates .playwright/cli.config.json before agent subprocess launch - Remove dead PLAYWRIGHT_HEADLESS env var that was never consumed - Settings UI toggle now correctly controls visible browser window Playwright CLI Auto-Install: - Add ensurePlaywrightCli() to lib/cli.js for npm global entry point - Add playwright-cli detection + npm install to start.bat, start.sh, start_ui.bat, start_ui.sh for all startup paths Other Improvements: - Add project folder path tooltip to ProjectSelector.tsx dropdown items - Remove legacy Playwright MCP server configuration from client.py - Update CLAUDE.md with playwright-cli skill documentation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
69 lines
1.7 KiB
Batchfile
69 lines
1.7 KiB
Batchfile
@echo off
|
|
cd /d "%~dp0"
|
|
|
|
echo.
|
|
echo ========================================
|
|
echo AutoForge - Autonomous Coding Agent
|
|
echo ========================================
|
|
echo.
|
|
|
|
REM Check if Claude CLI is installed
|
|
where claude >nul 2>nul
|
|
if %errorlevel% neq 0 (
|
|
echo [ERROR] Claude CLI not found
|
|
echo.
|
|
echo Please install Claude CLI first:
|
|
echo https://claude.ai/download
|
|
echo.
|
|
echo Then run this script again.
|
|
echo.
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
echo [OK] Claude CLI found
|
|
|
|
REM Note: Claude CLI no longer stores credentials in ~/.claude/.credentials.json
|
|
REM We can't reliably check auth status without making an API call, so we just
|
|
REM verify the CLI is installed and remind the user to login if needed
|
|
set "CLAUDE_DIR=%USERPROFILE%\.claude"
|
|
if exist "%CLAUDE_DIR%\" (
|
|
echo [OK] Claude CLI directory found
|
|
echo ^(If you're not logged in, run: claude login^)
|
|
) else (
|
|
echo [!] Claude CLI not configured
|
|
echo.
|
|
echo Please run 'claude login' to authenticate before continuing.
|
|
echo.
|
|
pause
|
|
)
|
|
|
|
:setup_venv
|
|
echo.
|
|
|
|
REM Check if venv exists, create if not
|
|
if not exist "venv\Scripts\activate.bat" (
|
|
echo Creating virtual environment...
|
|
python -m venv venv
|
|
)
|
|
|
|
REM Activate the virtual environment
|
|
call venv\Scripts\activate.bat
|
|
|
|
REM Install dependencies
|
|
echo Installing dependencies...
|
|
pip install -r requirements.txt --quiet
|
|
|
|
REM Ensure playwright-cli is available for browser automation
|
|
where playwright-cli >nul 2>&1
|
|
if %ERRORLEVEL% neq 0 (
|
|
echo Installing playwright-cli for browser automation...
|
|
call npm install -g @playwright/cli >nul 2>&1
|
|
if %ERRORLEVEL% neq 0 (
|
|
echo Note: Could not install playwright-cli. Install manually: npm install -g @playwright/cli
|
|
)
|
|
)
|
|
|
|
REM Run the app
|
|
python start.py
|