- Updated `scripts/market_research.py` to provide helpful hints on Jules NameResolutionError.
- Updated `docs/USER_NOTES.md` to document the schedule setup and current API status.
- Created `docs/upgrade_suggestions.md` to establish the upgrade context (NotebookLM) and track pending analysis.
- Verified scheduler execution (PID running).
- Note: Gemini API is currently rate-limited (429) and Jules API endpoint requires verification.
Co-authored-by: Mouy-leng <199350297+Mouy-leng@users.noreply.github.com>
Replaced per-branch git log calls with a single git for-each-ref command using the ahead-behind atom. This optimizes the script from O(N) to O(1) git subprocess calls.
Co-authored-by: Mouy-leng <199350297+Mouy-leng@users.noreply.github.com>
Replaced blocking `subprocess.run` calls with `asyncio.create_subprocess_exec` to ensure the Telegram bot event loop remains responsive during long-running deployment tasks.
Key changes:
- Switched to `asyncio.create_subprocess_exec` for command execution.
- implemented `asyncio.wait_for` to handle the 300s timeout.
- Added explicit process cleanup (kill/wait) on timeout.
- Manually decoded stdout/stderr since async subprocesses return bytes.
Verified with a reproduction script showing the event loop gap dropped from ~2.0s (blocking) to ~0.1s (non-blocking).
Co-authored-by: Mouy-leng <199350297+Mouy-leng@users.noreply.github.com>
- Added links to `docs/SETUP_AND_DEPLOY.md` and `docs/WSL_AND_VPS_DEPLOYMENT.md`.
- Added section for Shared/Default AI Keys with security placeholders.
- Added Access Code placeholder for OneDrive.
- Added NotebookLM and Cursor Connect links.
- Consolidated workspace links.
Parallelizes the Gemini and Jules AI analysis calls in `scripts/market_research.py` using `concurrent.futures`. This optimization allows both API requests to execute concurrently, reducing the total execution time of the script to the duration of the slower request rather than the sum of both.
Changes:
- Imported `concurrent.futures` in `scripts/market_research.py`.
- Replaced sequential calls to `analyze_with_gemini` and `analyze_with_jules` with `ThreadPoolExecutor` submission.
- Created `scripts/manage_cloudflare.py` to get/set security levels via API.
- Created `scripts/setup_cloudflare_tunnel.sh` to install `cloudflared`.
- Created `config/vault.json` with user-provided Zone/Account IDs for `lengkundee01.org`.
- Created `docs/CLOUDFLARE_GUIDE.md` with usage instructions.
- Updated `requirements.txt` to include `requests` as a core dependency.
- Added `yfinance` to fetch real market data.
- Enhanced `scripts/market_research.py` to use `yfinance` and support Jules AI.
- Enhanced `scripts/upgrade_repo.py` to support Jules AI for code suggestions.
- Updated `scripts/schedule_research.py` to load environment variables.
- Created `scripts/setup_research.sh` to automate setup.
- Updated `requirements.txt` and `README.md`.
Replaced `os.path.exists()` + `os.path.getmtime()` with a single `os.stat()` call in `scripts/web_dashboard.py` to reduce syscalls by 50% for cache checks. Also pre-calculated static file paths at module level to avoid redundant `abspath` and `join` calls on every request.
Impact:
- Reduces filesystem operations per request.
- Improves code cleanliness by centralizing path constants.
- Verified with existing tests and manual curl check.
- Update `AiAssistant.mqh` to support `Ai_AskJules` using Bearer token authentication.
- Add `ENUM_AI_PROVIDER` to select between Gemini and Jules API.
- Update `SMC_TrendBreakout_MTF_EA.mq5` with new inputs for Jules API (Key, URL, Model).
- Rename input group "Gemini AI" to "AI Filter" and use `AiProvider` input.
- Ensure API keys are not hardcoded in source.
- Added `scripts/market_research.py` to analyze market data using Gemini.
- Added `scripts/upgrade_repo.py` to suggest code upgrades based on research.
- Added `scripts/schedule_research.py` to orchestrate periodic research.
- Updated `config/startup_config.json` to include the scheduler.
- Added `schedule` and `google-generativeai` to `requirements.txt`.
Added a new 'Locations' section to docs/USER_NOTES.md containing:
- The user-provided Google Maps link (Battambang, Cambodia).
- The verified geolocation of the ZOLO Bridge server (Phnom Penh, Cambodia).
- Added `--monitor` flag to `scripts/startup.sh`.
- Fixed circular nameref warning in `scripts/startup.sh`.
- Updated `startup.sh` to pass the monitor flag to `startup_orchestrator.py`.
- Verified system startup and web dashboard accessibility.
- Created `mt5/MQL5/Include/ManagePositions.mqh` with fixed logic (added missing `||` operator).
- Created `.vscode/extensions.json` with recommended extensions.
- Verified file creation and syntax fix.
- Create `mt5/MQL5/Include/AiAssistant.mqh` for shared AI logic.
- Modularize Gemini API calls, prompt construction, and response parsing.
- Update `SMC_TrendBreakout_MTF_EA.mq5` to use `AiAssistant.mqh`.
- Enhance AI prompt with RSI and ATR context for better decision making.
- Add `RSIPeriod` input parameter.
- Add include guards to `AiAssistant.mqh` and `ZoloBridge.mqh`.
- Created `docs/INDEX.md` to categorize and index all repository documentation.
- Created `docs/USER_NOTES.md` as a dedicated place for user notes and external references.
- Updated `README.md` to link to the new documentation index and notes file.
- Preserved existing documentation structure while making it more navigable.