- Developer Experience & Framework Refinements:
- Automated Task Registration: Introduced a new script (
scripts/generate-task-registry.ts) and annpm run update-taskscommand to automatically discover and register all tasks from thesrc/tasksdirectory into the core automation engine (src/core/_automation.ts). This eliminates the need for manual registration, reducing boilerplate and potential for human error. - Robust
BaseTaskExecution: Refactored therunmethod insrc/tasks/BaseTask.tsto simplify its control flow. The new logic gracefully handles execution errors and uses a single, final verification step to determine the task's outcome, improving reliability and making the process easier to debug. - Enhanced Selector Guide: Added a practical, step-by-step guide to
src/tasks/task-readme.mdon how to use browser developer tools to find, copy, and test CSS selectors, empowering users to create more resilient automation tasks. - Code Standardization: Standardized the
runfunction signature insrc/tasks/taskExample.tsto align with the conventions used in other tasks, improving overall code consistency.
- Automated Task Registration: Introduced a new script (
- Task Example and Documentation Refinement:
- Further refined the
taskExample.tscode snippet and its introductory text for clarity and conciseness. - Provided detailed explanation on implementing manual delays and using direct selectors within tasks.
- Further refined the
- Task Guide Clarity Improvement:
- Further refined the 'Detailed Explanation of Task Parameters and Options' section in
src/tasks/task-readme.mdto be even more beginner-friendly, using simpler vocabulary, analogies, and clearer explanations for a non-native English speaking audience.
- Further refined the 'Detailed Explanation of Task Parameters and Options' section in
- Enhanced Task Example:
- Updated
src/tasks/taskExample.tswith more detailed comments and examples for parameters, specifically highlighting the usage of new dynamic delay parameters for improved user experience.
- Updated
- Further Beginner-Friendly Task Guide Revision:
- Significantly revised the 'Detailed Explanation of Task Parameters and Options' section in
src/tasks/task-readme.mdto be even more accessible for beginners, using simpler vocabulary, analogies, and clearer explanations.
- Significantly revised the 'Detailed Explanation of Task Parameters and Options' section in
- Dynamic Delay Parameters:
- Updated
src/utils/delay-getRange.tsto support dynamic delay inputs (e.g., "1s", "0.5", "2-5s"), interpreting all numeric inputs as seconds and converting to milliseconds. - Revised
src/tasks/task-readme.mdto explain these new dynamic delay formats forthis.automation.delay().
- Updated
- Beginner-Friendly Task Guide Revision:
- Significantly revised
src/tasks/task-readme.mdto be even more beginner-friendly, incorporating simplified language, more relatable examples, creative task ideas, and a direct explanation of selectors for easier task creation.
- Significantly revised
- Beginner-Friendly Task Guide:
- Revised
src/tasks/task-readme.mdto be more beginner-friendly, including simplified language, more relatable examples, creative task ideas, and integrated selector explanations for easier task creation.
- Revised
- Enhanced Task Documentation:
- Added a detailed explanation of all task parameters and options to
src/tasks/task-readme.md, coveringBaseTaskmethods, enhancedPagemethods, andTaskOptionsfor clearer task creation guidance.
- Added a detailed explanation of all task parameters and options to
- New Task Documentation:
- Created
src/tasks/task-readme.mdto provide a simple guide for users on how to create new automation tasks, explaining core concepts and step-by-step instructions.
- Created
- New Example Task:
- Created
src/tasks/taskExample.tsto demonstrate the usage of common automation actions (navigation, clicking, typing, scrolling, delays) within theBaseTaskframework.
- Created
- Logging Compaction:
- All logging messages across the
src/directory have been compacted to be no more than 60 characters for improved readability and conciseness in console output.
- All logging messages across the
- Core Architecture Refinement:
- Centralized Configuration: Introduced
ConfigService(src/core/config.ts) for unified loading and validation oftasks.json,selectors.json, and environment variables. - Consistent Logging: Implemented
UnifiedLogger(src/utils/unified-logger.ts) for standardized logging across core modules, integrating withAuditLoggerand replacing directconsole.logcalls. - Comprehensive Type Definitions: Created
src/types/core.tsto define robust interfaces for profiles, task configurations, selectors, and automation results, enhancing type safety. - Refined Error Handling: Enhanced
src/utils/errors.tswithConfigurationErrorand ensured consistent use of custom error classes throughout core modules. - Modular Core: Refactored
_automation.ts,_launchAutomation.ts,automation-runner.ts,browser-pool.ts, andprofile-manager.tsto leverage the new architecture, improving modularity, testability, and maintainability. - Accessibility Fix: Changed auditLogger property from private to public in
src/core/_automation.tsto allow access from AutomationRunner, fixing a TypeScript accessibility error. - Enhanced Monitoring Tool:
- Granular Task Progress:
BaseTask.tsnow emits detailedtask_progressevents viaauditLogger.monitoring/types/index.tsandmonitoring/services/dataService.tsupdated to consume and process these granular progress events.monitoring/src/components/ProfileDashboard.tsxupdated to display detailed taskstep,message, andstatus.
- Configuration Visibility:
- Added API endpoints (
/api/config/tasks,/api/config/selectors) tomonitoring/server.jsto expose configuration files. monitoring/types/index.tsupdated withTaskConfigurationandSelectorsinterfaces.- Created
monitoring/src/components/ConfigurationView.tsxto display configurations. - Integrated
ConfigurationViewintomonitoring/src/App.tsx.
- Added API endpoints (
- Real-time Log Streaming:
- Implemented
chokidarandtailinmonitoring/server.jsfor real-time log file watching andsocket.ioemission of new log entries and task progress updates. monitoring/src/App.tsxupdated to listen for and display these real-time log and progress events, replacing log polling.
- Implemented
- Centralized Configuration: Introduced
- Code Quality Improvements:
- ESLint Fixes: Resolved all ESLint errors (18 errors fixed) and reduced warnings from 95 to 70 by replacing unsafe
anytypes withunknownwhere appropriate, defining proper interfaces likeApiResponsefor API responses, and prefixing unused parameters with_for better type safety. - TypeScript Enhancements: Improved type definitions in
ixBrowserClient.tswithApiResponseinterface, updated error handling inerrors.tsandaudit-logger.tsto useunknowninstead ofany, and fixed type assertions in retry utilities. - Lint Configuration Update: Modified npm lint script to exclude monitoring folder and config files (.eslintrc.js, jest.config.js) to focus on source code quality.
- ESLint Fixes: Resolved all ESLint errors (18 errors fixed) and reduced warnings from 95 to 70 by replacing unsafe
- Codebase Cleanup:
- Monitoring Folder Cleanup: Removed duplicate and scattered files in
monitoring/root (e.g., old.tsxcomponents likeerror-boundary.tsx,logs-view.tsx,profile-dashboard.tsx,system-metrics.tsx,types.tsx, and unusedpage.tsx) to consolidate withsrc/components/structure.
- Monitoring Folder Cleanup: Removed duplicate and scattered files in
- Performance & Maintainability Improvements:
- Task Loading Optimization: Replaced synchronous task loading in
src/core/_automation.ts(usingfs.readdirSyncandrequire) with static imports of known tasks (taskFollowTwitter,taskJoinDiscord,taskReadGmail), improving startup performance and type safety.
- Task Loading Optimization: Replaced synchronous task loading in
- Type Safety Verification: Ensured TypeScript compilation passes without errors after all changes.
- New Automation Task: Gmail Read
- Added
taskReadGmail.tsfor automated Gmail inbox reading - Navigates to Gmail inbox, waits for load, adds random delay, clicks first mail
- Login Verification: Checks page title for "Inbox" and email address format
- Extracts and logs the logged-in email address for verification
- Returns email address in task result data for further usage
- Reading Simulation: Adds 2-3 minute random delay after clicking mail to simulate reading
- Supports verification-only mode and configurable delays
- Added Gmail selectors to
config/selectors.jsonfor first mail element - Updated task configuration to include Gmail read task
- Added
- Enhanced Twitter Follow Task
- Login Verification: Added login status verification for Twitter/X tasks
- Checks for user navigation elements to confirm authentication
- Enhanced audit logging for login verification steps
- Improved error handling for unauthenticated sessions
- Enhanced Monitoring Tool with Task Progress
- Real-time Task Progress Tracking: Added detailed task progress display in monitoring dashboard
- Progress Bars: Visual progress bars showing task completion percentage (0-100%)
- Task Status Indicators: Shows current task action (navigating, verifying, clicking, reading, etc.)
- Task Metadata: Displays task-specific data like email addresses, reading times, selectors used
- Audit Log Parsing: Enhanced data service to parse detailed audit logs for real-time progress
- Progress Calculation: Intelligent progress mapping for Gmail, Twitter, and Discord tasks
- Updated Types: Added TaskProgress interface and enhanced MonitoringData structure
- New Automation Task: Discord Server Join
- Added
taskJoinDiscord.tsfor automated Discord server joining via invite links - Supports human-like interactions with configurable delays and verification
- Includes fallback verification for already-joined servers
- Added Discord selectors to
config/selectors.json - Updated task configuration schema to support
inviteUrlparameter - Enhanced ESLint configuration for TypeScript support with proper rules
- Fixed TypeScript compilation issues in config validation
- Added
- Codebase Improvements & Testing Infrastructure:
- Testing Framework Setup: Added Jest and ts-jest for comprehensive unit testing with TypeScript support
- Test Scripts: Added
test:watchandtest:coveragenpm scripts for continuous testing and coverage reporting - Test Configuration: Created Jest configuration with TypeScript support and test utilities
- Sample Tests: Added example test structure for browser-pool module
- Lint Configuration: Updated ESLint to include TypeScript files (*.ts) in addition to JavaScript
- Configuration Validation: Created comprehensive Zod schemas for environment variables, task configs, and automation options
- Type Safety: Enhanced type validation for all configuration inputs with detailed error messages
- Codebase Refactoring & Modularization:
- Refactored Core Architecture: Broke down the large
_launchAutomation.tsfile (~520 lines) into three focused, single-responsibility modules:browser-pool.ts: Manages browser connection pooling, anti-detection scripts, and resource blockingprofile-manager.ts: Handles fetching and managing ixBrowser profiles with lazy loadingautomation-runner.ts: Orchestrates automation task execution and parallel processing
- Improved Maintainability: Reduced main orchestrator file to ~120 lines while preserving all functionality
- Enhanced Testability: Smaller, focused modules are easier to unit test and maintain
- Better Separation of Concerns: Each module has a clear, single responsibility
- Refactored Core Architecture: Broke down the large
- Security Verification: Confirmed proper environment variable usage for API keys with .env file exclusion from version control
- Migrated to TypeScript:
- The entire codebase has been migrated to TypeScript, improving code quality, maintainability, and developer experience.
- All JavaScript files in
src/utils,src/tasks, andsrc/corehave been converted to TypeScript. - The project now compiles without any errors and with
allowJsset tofalse.
- Codebase Refinements & Modularization:
- Abstracted Task Runner: Refactored the core automation logic to use a dynamic task registry, eliminating the
switchstatement and making it easier to add new tasks. - Dedicated API Client: Created a dedicated
IxBrowserClientclass to encapsulate all interactions with the ixBrowser API, improving modularity and maintainability. - Externalized Selectors: Moved all CSS selectors from task files into a centralized
config/selectors.jsonfile, making them easier to update.
- Abstracted Task Runner: Refactored the core automation logic to use a dynamic task registry, eliminating the
- Configuration & Validation:
- Centralized Configuration: Integrated
dotenvfor managing environment variables from a.envfile, improving configuration management. - Configuration Validation: Added
zodschema validation forconfig/tasks.jsonto prevent runtime errors from invalid configurations.
- Centralized Configuration: Integrated
- Error Handling & Debugging:
- Enhanced Error Context: The
ElementNotFoundErrornow includes the URL where the error occurred, providing more context for debugging.
- Enhanced Error Context: The
- Code Quality:
- Fixed all linting errors to improve code quality and consistency.
- API Integration Fixes:
- Updated the base URL for the ixBrowser API to
http://127.0.0.1:53200. - Refactored API calls to use
POSTrequests as required by the new documentation. - Updated endpoints for fetching opened profiles (
/api/v2/profile-opened-listand/api/v2/profile-list) and connecting to a profile (/api/v2/profile-open). - Improved response handling to align with the new API's error and data structure.
- Updated the base URL for the ixBrowser API to
- Documentation Updates:
- Updated
GEMINI.mdandreadme.mdto provide a more comprehensive overview of the project, including the new monitoring tool, externalized task configuration, and other recent enhancements. - Added instructions for installing and running the monitoring tool.
- Updated
- Human Simulation Enhancements:
- Improved mouse movement with Bezier curves, dynamic starting points, micro-jitters, and optional overshooting for more natural paths.
- Added post-click delays to
humanClickfor more realistic interaction timing. - Enhanced scrolling (
humanScroll) to simulate multiple smaller scroll events with variable delays.
- Codebase Optimization & Modularity:
- Optimized browser pool usage by ensuring browser instances are reused and only pages are closed after each automation run.
- Removed fixed
waitForTimeoutcalls from core automation logic, relying on dynamic delays within tasks. - Externalized task configuration into
config/tasks.jsonfor easier modification and expansion of tasks. - Implemented a dynamic task runner in
_automation.jsto execute tasks based on configuration. - Added
stopOnTaskFailureoption to task configuration for controlled error recovery.
- Utility Improvements:
- Consolidated
humanScrolllogic by removingscroll-human.jsand updatingpage-enhance.jsto use the enhancedhumanScrollfromhumanSimulation.js. - Enhanced
type-human.jswith typo simulation and variable key press/release delays for more natural typing. - Made error handling in
viewport-scrollIntoView.jsconfigurable with athrowOnErroroption. - Added random jitter to
retryWithBackoffinretry-utils.jsto make retry delays less predictable.
- Consolidated
- Fixed admin launcher for node path: Updated start-admin.bat to dynamically find the full path to node.exe using 'where node' and use -Wait to keep the admin window open; ensures server starts correctly as admin.
- Improved admin launcher: Updated start-admin.bat to use cmd /k for proper directory handling and -Wait to keep the admin window open; ensures server runs in correct directory.
- Fixed admin launcher: Updated start-admin.bat to use -Wait in Start-Process to keep the admin window open and prevent premature exit; added pause for diagnosis.
- Added process exit logging: Implemented logging for process exit events (exit, SIGINT, SIGTERM) to diagnose why the server is force closing when run as administrator.
- Enhanced server stability: Added uncaught exception and unhandled rejection handlers to prevent force close; increased logging in updateMetrics for better debugging.
- Fixed admin launcher: Updated start-admin.bat to use PowerShell Start-Process with -Wait to prevent force close and keep console open for monitoring.
- Added admin launcher: Created start-admin.bat to run monitoring server with administrator privileges for system restore point access; includes pause for error diagnosis.
- Enhanced restore point debugging: Added detailed logging for stdout and stderr in PowerShell command to diagnose why no restore points are detected; updated fallback messages for clarity.
- Improved restore point detection: Enhanced PowerShell command with better error handling and raw output logging for debugging; added fallback for cases with no restore points.
- Optimized redundancy reminder: Last system restore checkpoint now loads only once at server startup (not every 5s) and includes timestamp for better context.
- Added redundancy reminder: Displays last system restore checkpoint created as text above "Last updated" in system metrics for backup awareness.
- Enhanced metric precision: Updated CPU usage and storage usage to display 1 decimal place (e.g., 15.1%) for better accuracy.
- Simplified system metrics UI: Reduced to 4 boxes (CPU %, Memory % with GB, Storage % with GB, Download Mbps); removed unnecessary boxes and % for download speed; updated types and server to include storage used/total.
- Fixed CPU usage monitoring: Corrected to use si.currentLoad().currentLoad for accurate real-time CPU % (previously returning 0); all metrics now update every 5 seconds via polling and Socket.io.
- Implemented real-time system monitoring: Added 5-second polling for accurate CPU usage % (and other metrics) via server-side intervals and Socket.io emissions; updated client to receive and display live data.
- Enhanced system monitoring tools: Integrated systeminformation for real-time CPU usage %, RAM usage %, storage usage for drive C: %, and internet download speed Mbps; updated UI to display new metrics with dynamic progress bars.
- Implemented modern Tailwind CSS styling in monitoring tool: Updated all components with responsive design, gradients, animations, and improved UX; integrated Tailwind config and PostCSS for production build.
- Modernized monitoring tool: Enhanced App.tsx with useCallback, useMemo, error boundaries, dark mode, search/filter, Socket.io real-time updates, and improved UI styling for better UX.
- Added non-intrusive monitoring tool in monitoring/ folder: React/TypeScript localhost dashboard for real-time ixBrowser process monitoring, reading from logs/ without modifying core code.
- Work-in-progress Monitoring Tool
- Performance optimizations: Implemented resource pooling for browser contexts, lazy loading for large profiles, and enhanced memory monitoring in PowerShell orchestrator for efficient handling of >10 profiles.
- Documentation & onboarding: Expanded readme-full.md with comprehensive tutorial including step-by-step setup, customization examples, advanced usage, and detailed troubleshooting guides for common issues.
- Enhanced error handling: Introduced custom error classes (ProfileConnectionError, AutomationTimeoutError, NetworkError, ElementNotFoundError, TaskError, VerificationError) for specific failures and improved retry strategies with exponential backoff tailored to error types.
- Updated all dependencies to latest compatible versions, fixed eslint-plugin-promise version conflict, bumped version to 1.0.2, regenerated package-lock.json, and verified with lint/typecheck.
- Updated version to 1.0.1 for codebase maintenance.