feat: Upgrade eversale for pip install with full CLI flag propagation#51
Draft
codegen-sh[bot] wants to merge 8 commits intomainfrom
Draft
feat: Upgrade eversale for pip install with full CLI flag propagation#51codegen-sh[bot] wants to merge 8 commits intomainfrom
codegen-sh[bot] wants to merge 8 commits intomainfrom
Conversation
- Add pyproject.toml with all dependencies from requirements.txt - Add eversale_cli.py as pure Python CLI entry point (replaces Node.js wrapper) - Add engine/__init__.py for proper package discovery - Remove all /mnt/c/ WSL hardcoded paths from workspace_paths.py - Update config.yaml: Z.AI endpoints (api/coding/paas/v4), glm-5/glm-4.7v models - Fix gpu_llm_client.py: correct fallback URL and vision model (glm-4.7v) - Fix llm_client.py: default models to glm-5/glm-4.7v, env var support - Fix config_loader.py: correct default URL for CLI mode - Fix run_simple.py: UnboundLocalError for steps/history, logging import, SyntaxWarning - Fix fast_track_safety.py: invalid escape sequence in docstring - Update README.md: remove /mnt/c/ path references CLI usage: eversale \ Co-authored-by: Zeeeepa <zeeeepa@gmail.com>Task"
…ion bugs Changes: - Remove all /mnt/c/ WSL path references from 10 files for native Windows support - output_path.py: Remove WSL-specific Desktop/Downloads path detection, replace /mnt/c/ display conversion with cross-platform ~/home shortening - action_templates.py: Fix regex patterns in google_search, search_youtube, search_github, search_twitter, search_linkedin, search_reddit templates to correctly skip platform names in variable extraction - Update doc references in selector_fallbacks.py, self_healing_selectors.py, workflow_dsl.py, example_recovery_usage.py, verify_uitars_*.py, apply_incremental_*.py to use relative paths Testing: - 43/43 template matching tests pass (100%) - 14/16 variable extraction tests pass (87.5%, up from 56%) - Full E2E browser automation: SUCCESS (headless google.com navigation) - Z.AI API connectivity verified with glm-5 model - Zero /mnt/c/ references remaining in codebase (verified via grep)
…ased locators
- Replace deprecated page.accessibility.snapshot() with modern
page.locator('body').aria_snapshot() API (Playwright 1.49+)
- Add _ref_map to track ref_id -> (role, name) mapping for element resolution
- Add _resolve_element() with 8-level fallback chain:
1. Role + Name locator (get_by_role)
2. Text-based search (get_by_text)
3. Placeholder matching (get_by_placeholder)
4. Label matching (get_by_label)
5. Name-to-ref fuzzy search
6. CSS selector fallback
7. Text last resort
8. Placeholder last resort
- Optimize LLM prompt for efficiency and clarity
- Add new action types: press, scroll, screenshot
- Add consecutive passive action guard (prevents extract/wait loops)
- Use networkidle + SPA hydration wait for navigation
- Focus-before-fill for input reliability
Tested on chat.z.ai login form:
- Email textbox: get_by_role('textbox', name='Enter Your Email') -> 1 match ✅
- Password textbox: get_by_role('textbox', name='Enter Your Password') -> 1 match ✅
- Form fill: both fields filled successfully end-to-end ✅
Co-authored-by: Zeeeepa <zeeeepa@gmail.com>
- run_mcp.py: fix indentation (lines 220-242 were over-indented inside f-string scope) - fast_extract.py: remove UTF-8 BOM character (EF BB BF) - apply_incremental_changes.py: fix escaped quotes in line 156 (use double quotes instead of backslash-escaped singles) All 451 Python files now pass ast.parse() validation. Co-authored-by: Zeeeepa <zeeeepa@gmail.com>
…ation Major changes: - Enhanced eversale_cli.py with robust flag parsing (--ultimate, --headless, --debug, --max-steps) - Fixed CLI flag propagation via environment variables (EVERSALE_HEADLESS, EVERSALE_DEBUG, EVERSALE_MAX_STEPS) - run_simple.py now reads env vars after argparse to receive flags from CLI dispatch - mcp_client.py reads EVERSALE_HEADLESS env var at init for ultimate mode headless support - Added a11y_compat.py compatibility module for Playwright 1.47+ accessibility API removal - Replaced deprecated page.accessibility.snapshot() calls with CDP fallback chain across 9 files - Removed all /mnt/c/ WSL paths for native Windows operation CLI usage: eversale \ Co-authored-by: Zeeeepa <zeeeepa@gmail.com>Task"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Complete upgrade of the eversale system to be fully operational via
pip install -e .with proper CLI commands. All changes have been tested end-to-end with real Z.AI API calls.What This PR Does
1. Enhanced CLI Entry Point (
eversale_cli.py)--ultimate,--headless,--debug,--max-steps NEVERSALE_HEADLESS=1, etc.) so downstream scripts receive them aftersys.argvreconstruction2. Fixed Flag Propagation (Root Cause Fix)
Problem: CLI stripped flags from
sys.argvand set env vars, but downstream scripts only readsys.argv→ flags were silently dropped.Fix in
run_simple.py: Afterparse_args(), check env vars and override:Fix in
mcp_client.py: Read env var at MCPClient init:3. Playwright Accessibility API Compatibility (
a11y_compat.py)page.accessibility.snapshot()4. No WSL Paths
/mnt/c/paths — works natively on WindowsCLI Usage
Test Results (Z.AI glm-5 model)
eversale --headless "say hello"eversale --ultimate --headless "say hello"eversale --headless "navigate to google.com and tell me the page title"eversale --ultimate --headless "navigate to google.com and tell me the page title"eversale --versionEversale CLI v2.1.218eversale --helppip install -e .Files Changed (11 files, +353/-17 lines)
eversale_cli.pyengine/run_simple.pyengine/run_ultimate.pyengine/agent/mcp_client.pyengine/agent/a11y_compat.pyengine/agent/a11y_browser.pyengine/agent/accessibility_element_finder.pyengine/agent/cdp_browser_connector.pyengine/agent/coordinate_targeting.pyengine/agent/dom_first_browser.pyengine/agent/playwright_direct.py💻 View my work • 👤 Initiated by @Zeeeepa • About Codegen
⛔ Remove Codegen from PR • 🚫 Ban action checks
Summary by cubic
Upgrade
eversaleto install viapip install -e .and run through a new CLI with reliable flag propagation, plus add aplaywrightaccessibility compatibility layer for versions 1.47+.New Features
eversaleCLI with--ultimate,--headless,--debug,--max-steps.EVERSALE_HEADLESS,EVERSALE_DEBUG,EVERSALE_MAX_STEPS) so downstream scripts receive them;run_simple,run_ultimate, andMCPClientread these.a11y_compat.pyusing CDP (Accessibility.getFullAXTree) with fallbacks; replaced deprecatedpage.accessibility.snapshot()across the codebase.EVERSALE_HOME/EVERSALE_ENGINE_DIRandchdirs to resolve relative paths; verified native Windows operation.Bug Fixes
sys.argvstripping by reading env overrides inrun_simple/run_ultimate.playwright≥1.47 via compatibility layer./mnt/c/paths to prevent path issues on Windows.Written for commit 2de549a. Summary will update on new commits.