Commit Graph
91 Commits
Author SHA1 Message Date
mygo-kyx 2c875594a6 feat: Add commands and help text for timed scheduler management and status. 2026-02-10 02:43:23 +08:00
mygo-kyx 4d5fa36183 feat: add configurable timed scheduler to the Telegram bot for automated tasks. 2026-02-10 02:38:45 +08:00
mygo-kyx b9dd421714 feat: automatically clean team and tracker files after 'run all' or 'resume' tasks and notify administrators. 2026-02-09 18:02:50 +08:00
mygo-kyx 4c40949696 fix: Prevent double-prefixing of S2A team names and refactor Telegram bot's thread pool usage for non-blocking execution. 2026-02-08 02:21:57 +08:00
mygo-kyx cb1fb57b53 feat: Prefix team account names with 'team-' in service functions and add 'CodexAuth' to gitignore. 2026-02-08 01:27:56 +08:00
mygo-kyx 713564fc25 team-mail 2026-02-07 02:42:05 +08:00
mygo-kyx 6b41c9bccd feat: Initialize CodexAuth project, including virtual environment, dependencies, and initial authentication scripts. 2026-02-07 02:22:01 +08:00
mygo-kyx 71efc3b04c feat: Install Python dependencies into virtual environment and add get_code.py script. 2026-02-07 02:03:16 +08:00
mygo-kyx 36bd799c8f fix(telegram_bot): Correct GPTMail API endpoint and authentication method
- Change API endpoint from `/api/mail/list` to `/api/generate-email`
- Update HTTP method from POST to GET request
- Replace `Authorization` header with `X-API-Key` for proper authentication
- Remove unnecessary payload parameter from API request
- Enhance response handling to extract and display generated test email
- Add error message parsing from API response for better debugging
- Improve test connection feedback to show actual generated email address
2026-02-04 03:09:28 +08:00
mygo-kyx a7867ae406 feat(s2a_service): Add pure API authorization mode without browser
- Add S2A_API_MODE configuration option to enable browser-less authorization
- Implement S2AApiAuthorizer class using curl_cffi for browser fingerprint simulation
- Add Sentinel PoW (Proof of Work) solver with FNV-1a hashing algorithm
- Implement OAuth flow via direct API calls instead of browser automation
- Add s2a_api_authorize() function to handle email/password authentication
- Support proxy configuration for API requests
- Add requirements token generation for API authentication
- Update browser_automation.py to check S2A_API_MODE and route to API or browser flow
- Update config.py to load S2A_API_MODE from configuration
- Add api_mode option to config.toml.example with documentation
- Improves performance and stability by eliminating browser overhead while maintaining compatibility with existing browser-based flow
2026-02-02 09:26:57 +08:00
mygo-kyx ae86ca42df feat(email_service): Support dynamic email configuration reloading
- Import EMAIL_API_AUTH and EMAIL_ROLE from config module on each function call
- Update create_email_user() to use dynamically loaded current_auth and current_role
- Update get_verification_code() to use dynamically loaded current_auth
- Update fetch_email_content() to use dynamically loaded current_auth
- Enable runtime configuration switching without service restart
2026-01-30 16:15:17 +08:00
mygo-kyx b50ad199de feat(email_service): Add dynamic email provider configuration support
- Import EMAIL_PROVIDER from config at runtime in unified functions to enable dynamic provider switching
- Update unified_generate_email() to fetch current provider configuration on each call
- Update unified_create_email() to fetch current provider configuration on each call
- Update unified_get_verification_code() to fetch current provider configuration on each call
- Update unified_fetch_emails() to fetch current provider configuration on each call
- Update fallback comments to reflect support for both KYX and Cloud Mail systems
- Allows email provider to be switched without restarting the application
2026-01-30 16:02:00 +08:00
mygo-kyx cb55db7901 feat(config,email_service): Add Cloud Mail API path auto-completion utility
- Add get_cloudmail_api_base() helper function to automatically append /api/public path to EMAIL_API_BASE
- Update create_email_user() to use get_cloudmail_api_base() for consistent API endpoint construction
- Update get_verification_code() to use get_cloudmail_api_base() for email list retrieval
- Update fetch_email_content() to use get_cloudmail_api_base() for email list retrieval
- Refactor telegram_bot.py to use centralized path completion logic instead of inline implementation
- Improve API endpoint consistency across email service operations and reduce code duplication
2026-01-30 15:43:48 +08:00
mygo-kyx 1c17015669 refactor(telegram_bot): Improve Cloud Mail domain management and API response handling
- Extract message object using get_message() helper in _cloudmail_add_domain and _cloudmail_del_domain methods for consistency
- Replace direct update.message.reply_text() calls with message.reply_text() throughout domain management functions
- Add comprehensive HTTP status code validation in API connection check
- Implement empty response detection to handle edge cases where API returns blank content
- Add JSON parsing error handling with fallback error message for non-JSON responses
- Improve error messaging to include HTTP status codes and API error codes for better debugging
- Enhance robustness of email service API validation with multiple safety checks
2026-01-30 15:30:16 +08:00
mygo-kyx f39dff8ee6 feat(telegram_bot): Add Cloud Mail configuration and batch team processing
- Add Cloud Mail API configuration support (api_base, api_auth, domains) in config.py
- Implement run_teams_by_count() function for processing specified number of teams with smart filtering
- Add Cloud Mail management commands: /cloudmail, /cloudmail_token, /cloudmail_api, /cloudmail_domains
- Add callback handlers for run_all, run, and cloudmail interactive operations
- Refactor /run command to use interactive selection for count and email service instead of direct argument
- Update bot command descriptions and help text to reflect new functionality
- Add Cloud Mail domain management and token configuration capabilities
- Enable batch processing with progress tracking and automatic team completion detection
2026-01-30 14:07:37 +08:00
mygo-kyx 79c3eb733c feat(registration): Add email retry mechanism for API registration failures
- Add `allow_fallback` parameter to `register_openai_account_auto()` to control fallback behavior
- Return `"retry_new_email"` status when API registration fails without fallback enabled
- Return `"domain_blacklisted"` status when domain is blacklisted during registration
- Update `register_only()` to handle and propagate `"retry_new_email"` status
- Update `register_and_authorize()` to handle and propagate `"retry_new_email"` status
- Add retry logic in `process_accounts()` to regenerate email and reinvite on API failures
- Add retry logic in `_process_single_account_worker()` to regenerate email and reinvite on API failures
- Improve error handling to distinguish between domain blacklist and API failures requiring email regeneration
2026-01-30 12:24:40 +08:00
mygo-kyx e4f330500d feat(telegram_bot): Add concurrent team registration with multi-worker support
- Implement concurrent registration processing with configurable worker count
- Add CONCURRENT_ENABLED and CONCURRENT_WORKERS config options for parallel execution
- Replace single-threaded loop with task queue and worker thread pool architecture
- Add per-worker step tracking and status display in progress messages
- Implement thread-safe result collection with results_lock for concurrent access
- Update progress UI to show individual worker status and concurrent worker count
- Refactor step callback to support multiple workers with worker_id tracking
- Add graceful shutdown handling for concurrent workers
- Improve progress message updates to only refresh when content changes
- Optimize performance by allowing multiple registrations to run in parallel
2026-01-30 10:50:25 +08:00
mygo-kyx 85949d8ede 2 2026-01-30 10:28:16 +08:00
mygo-kyx fcf1354bc7 1 2026-01-30 10:20:28 +08:00
mygo-kyx 6d3aa84af9 feat(telegram_bot): Add simplified team registration format with output options
- Add support for simplified team_reg callback format (team_reg:1, team_reg:3, team_reg:5)
- Implement direct count parsing from callback data without intermediate steps
- Add output method selection UI with JSON file and team.json options
- Add custom count input handler for flexible registration quantities (1-50)
- Improve user experience by reducing callback navigation steps
- Set user state flag for awaiting custom count input
2026-01-30 10:15:26 +08:00
mygo-kyx 11395bf1ba feat(payment): Integrate Stripe API and refactor payment flow
- Add new stripe_api.py module with StripePaymentAPI class and payment retry logic
- Import Stripe payment module in auto_gpt_team.py with graceful fallback handling
- Refactor run_payment_flow() to extract form filling logic into _fill_payment_form()
- Simplify error handling by returning structured tuples (success, error_type, error_msg)
- Remove redundant comments and streamline selector logic for payment form elements
- Improve code maintainability by separating concerns between form filling and flow orchestration
- Add STRIPE_API_AVAILABLE flag to track payment module availability at runtime
2026-01-30 09:57:55 +08:00
mygo-kyx ad03fab8e9 1 2026-01-30 09:05:59 +08:00
mygo-kyx b7e3cd840b feat(telegram_bot): Add update_token command for mail API token management
- Add new /update_token command handler to update mail API token in config.toml
- Register command in handlers list and set_my_commands for bot menu
- Add command documentation to help text with usage example
- Implement token update logic with TOML file read/write operations
- Display masked token values (first 8 and last 4 characters) for security
- Add automatic config reload after token update
- Include error handling for missing tomli_w dependency and file operations
- Restrict command to admin users only via @admin_only decorator
2026-01-30 08:57:50 +08:00
mygo-kyx 20e2719d0e feat(telegram_bot): Add verify_all command for force account re-verification
- Add new /verify_all command to force re-verify all accounts with tokens
- Update command registration to include verify_all handler
- Modify _validate_and_cleanup_accounts() to accept force_all parameter
- Add progress bar visualization using block characters (█░)
- Implement progress bar helper function with percentage display
- Update verification logic to handle two modes: normal and force-all
- Enhance user messages with token count and mode-specific text
- Update help text and command descriptions in Chinese
- Improve progress tracking with visual feedback during verification
- Separate /verify (unverified only) from /verify_all (all with tokens)
2026-01-30 08:53:40 +08:00
mygo-kyx 75a0dccebe feat(registration): Add email retry mechanism with team invitation support
- Add automatic email retry logic when verification code times out (5-second timeout)
- Implement new email creation and team invitation for failed verification attempts
- Add max_email_retries parameter to control retry attempts (default: 3)
- Add team_name parameter to enable automatic team invitations for new emails
- Return special "new_email:xxx@xxx.com:password" format when new email is used
- Update register_openai_account_auto() to support team_name parameter
- Update register_and_authorize() to support team_name parameter and return new email info
- Improve verification code timeout handling with configurable retry intervals
- Add nonlocal verification_timeout flag to track timeout state across retries
- Update docstrings to document new parameters and return value changes
2026-01-30 08:46:03 +08:00
mygo-kyx b7e658c567 4 2026-01-30 06:10:31 +08:00
mygo-kyx e43bd390f0 3 2026-01-28 06:59:22 +08:00
mygo-kyx eb255fdf77 1 2026-01-28 06:54:50 +08:00
mygo-kyx 8d5f8fe3bb 9 2026-01-27 10:34:25 +08:00
mygo-kyx 52b875a7f9 8 2026-01-27 10:26:21 +08:00
mygo-kyx a4f542ace2 7 2026-01-27 10:21:02 +08:00
mygo-kyx ad10d1f2b7 6 2026-01-27 10:08:10 +08:00
mygo-kyx 06eaff03b9 5 2026-01-27 09:59:16 +08:00
mygo-kyx a973343b48 4 2026-01-27 09:47:12 +08:00
mygo-kyx c937bc7356 3 2026-01-27 09:30:57 +08:00
mygo-kyx e14aabd0e2 2 2026-01-27 09:25:04 +08:00
mygo-kyx 935531955f 1 2026-01-27 09:14:49 +08:00
mygo-kyx 6cafaa4ab7 多线程 2026-01-27 09:08:34 +08:00
mygo-kyx 8cb7a50bb9 5 2026-01-26 07:17:55 +08:00
mygo-kyx adb60cdfd6 4 2026-01-26 06:58:04 +08:00
mygo-kyx 20cdf8060d chore: update auto_gpt_team.py 2026-01-25 06:38:15 +08:00
mygo-kyx 6364d43c90 4 2026-01-25 06:16:01 +08:00
mygo-kyx 86206f8a97 3 2026-01-25 06:12:20 +08:00
mygo-kyx c2aa9785cb 2 2026-01-25 06:10:05 +08:00
mygo-kyx ccff201fde 1 2026-01-25 06:00:24 +08:00
mygo-kyx 32e926c4af 协议 2026-01-25 05:40:08 +08:00
mygo-kyx af161cca4f a 2026-01-24 08:06:56 +08:00
mygo-kyx 970340fbd4 a 2026-01-24 07:54:40 +08:00
mygo-kyx effc1add37 feat(email_domains): Add domain validation and improve domain management
- Add validate_domain_format() function with comprehensive domain format validation
* Validates domain structure (must contain dot, valid characters, proper TLD length)
* Normalizes domain format (adds @ prefix, removes quotes/special chars)
* Returns validation status with detailed error messages
- Update add_email_domains() to use new validation function
* Track invalid domains separately in return tuple
* Return (added, skipped, invalid, total) instead of (added, skipped, total)
* Improve error handling and domain normalization
- Add get_file_domains_count() function to retrieve txt file domain count
- Update clear_email_domains() to return count of cleared domains
- Enhance telegram_bot.py command menu organization
* Add s2a command handler and callback for S2A service management panel
* Reorganize bot commands with category comments (基础信息, 任务控制, 配置管理, etc.)
* Add missing commands: clean_errors, clean_teams, iban_list, iban_add, iban_clear, domain_list, domain_add, domain_del, domain_clear, team_fingerprint, team_register, s2a
- Update domain_add command help text with format requirements
- Improve code documentation and consistency across both files
2026-01-24 07:52:10 +08:00
mygo-kyx 6b914bad41 a 2026-01-24 07:36:18 +08:00
mygo-kyx d93383fe23 a 2026-01-24 07:22:10 +08:00
mygo-kyx c6ab6b3123 u 2026-01-24 07:09:54 +08:00
mygo-kyx fb3ebae995 u 2026-01-24 06:57:25 +08:00
mygo-kyx 289e8ec71f update 2026-01-24 06:51:28 +08:00
mygo-kyx 0e8b5ba237 feat(telegram_bot): Add AutoGPTPlus management panel with configuration controls
- Add /autogptplus command with interactive menu for ChatGPT subscription automation
- Implement callback handler for AutoGPTPlus actions (config view, token setup, email/API testing)
- Add _show_autogptplus_config() to display current configuration with masked sensitive data
- Add _prompt_autogptplus_token() to handle Cloud Mail API token input and updates
- Add _test_autogptplus_email() and _test_autogptplus_api() for testing functionality
- Add _update_autogptplus_token() to persist token changes to config.toml
- Register AutoGPTPlus command in bot command list with Chinese description
- Update help text to include AutoGPTPlus management panel section
- Add admin-only access control for all AutoGPTPlus operations
- Provides centralized management interface for email domains, SEPA IBANs, and API configuration
2026-01-24 06:35:29 +08:00
mygo-kyx 7c4688895e update 2026-01-24 06:07:31 +08:00
mygo-kyx 421caca1b7 update 2026-01-21 22:24:36 +08:00
mygo-kyx 6600195a3f update 2026-01-21 22:05:56 +08:00
mygo-kyx 7a7b503b3c 111 2026-01-20 21:42:14 +08:00
mygo-kyx 2f04569470 feat(telegram_bot): Add batch JSON import progress tracking with real-time updates
- Add import batch statistics tracking with progress message management
- Implement real-time progress message updates during multi-file JSON imports
- Add timeout-based batch completion to finalize imports after 2 seconds of inactivity
- Create progress text generation with processing and completion states
- Add batch import result aggregation (added, skipped, errors, total counts)
- Implement concurrent-safe progress updates using asyncio locks
- Enhance JSON file handler to support batch import workflow with progress feedback
- Add _process_import_json_batch method to return structured import results
- Display file-by-file processing status with current file name and statistics
- Show final summary with team.json total count and error details on completion
- Automatically refresh configuration after batch import completes
2026-01-20 21:37:14 +08:00
mygo-kyx 26438386c1 update 2026-01-20 21:26:44 +08:00
mygo-kyx 906aceff6e update 2026-01-20 21:15:50 +08:00
mygo-kyx 6559e4b84a update 2026-01-20 21:09:54 +08:00
mygo-kyx a7835170f7 update 2026-01-20 20:43:24 +08:00
mygo-kyx 13d5af8874 fix 2026-01-20 20:36:13 +08:00
mygo-kyx 4b00b9dd0a 22 2026-01-20 19:37:19 +08:00
mygo-kyx 828757077d update 2026-01-20 19:34:13 +08:00
mygo-kyx 24905a773c fix 2026-01-19 00:16:02 +08:00
mygo-kyx 5de0a1a053 feat(telegram_bot): Auto-reload config after account import to sync memory state
- Add automatic config reload after importing accounts to team.json
- Prevent save_team_json() from overwriting newly imported data by syncing memory state
- Update user feedback message to indicate config is auto-refreshed instead of requiring manual /reload command
- Improve user experience by eliminating extra step after account import
2026-01-18 17:45:21 +08:00
mygo-kyx 95fa705768 feat: Implement result deduplication by email and enhance summary reporting to detail only failed accounts. 2026-01-18 06:59:35 +08:00
mygo-kyx 49cb2430c8 Update Telegram bot implementation. 2026-01-18 06:44:58 +08:00
mygo-kyx 930cd203ee feat: Update Telegram bot implementation and its main execution script. 2026-01-18 06:39:10 +08:00
mygo-kyx b75d12b5aa feat: Add authorized field to old format account parsing based on accessToken presence. 2026-01-18 06:27:23 +08:00
mygo-kyx 4ca15d9f01 Update telegram bot implementation. 2026-01-18 06:21:18 +08:00
mygo-kyx 94145f7dd0 update 2026-01-18 06:04:06 +08:00
mygo-kyx f919e71de1 refactor: update the main execution logic in run.py 2026-01-18 05:59:56 +08:00
mygo-kyx 83a9e38aa7 Update core logic, Telegram bot, browser automation, and email services. 2026-01-18 05:57:52 +08:00
mygo-kyx 7e92e12c79 update 2026-01-18 05:38:14 +08:00
mygo-kyx e510c568b4 update 2026-01-18 04:17:42 +08:00
mygo-kyx 07816afd8d update script 2026-01-18 04:02:57 +08:00
mygo-kyx a4ca3ec093 update 2026-01-18 03:45:02 +08:00
mygo-kyx 0d19a9a96d refactor(config, telegram_bot): Simplify GPTMail API key configuration and remove redundant Telegram enabled flag
- Simplify GPTMail API key initialization logic by removing separate api_key and api_keys variables and consolidating into single line with fallback to ["gpt-test"]
- Update config.toml.example to use api_keys list format instead of deprecated api_key single value
- Remove TELEGRAM_ENABLED configuration variable and related check from telegram_bot.py
- Simplify Telegram Bot startup validation to only check for bot_token and admin_chat_ids
- Update default auth_provider from "cpa" to "s2a" in config.toml.example
- Improve documentation comments in config.toml.example for GPTMail domains and CRS service
- Localize error messages in telegram_bot.py to Chinese for consistency
- Streamline configuration by removing unnecessary intermediate variables and checks
2026-01-18 02:14:08 +08:00
mygo-kyx c39a01c4c0 update 2026-01-18 01:57:11 +08:00
mygo-kyx ad120687b3 feat(logger, telegram_bot): Add real-time Telegram logging capability
- Add TelegramLogHandler class to stream logs to Telegram in real-time
- Implement enable_telegram_logging() method to activate Telegram log streaming
- Implement disable_telegram_logging() method to deactivate Telegram log streaming
- Implement is_telegram_logging_enabled() method to check logging status
- Add /logs_live command to enable real-time log push notifications
- Add /logs_stop command to disable real-time log push notifications
- Update help text to document new real-time logging commands
- Remove obsolete team.json.example file
- Enables administrators to monitor system logs in real-time through Telegram bot
2026-01-18 01:16:20 +08:00
mygo-kyx b902922d22 feat(config, email_service, telegram_bot): Add dynamic GPTMail API key management and config reload capability
- Add reload_config() function to dynamically reload config.toml and team.json without restart
- Implement GPTMail API key management with support for multiple keys (api_keys list)
- Add functions to manage GPTMail keys: get_gptmail_keys(), add_gptmail_key(), remove_gptmail_key()
- Add key rotation strategies: get_next_gptmail_key() (round-robin) and get_random_gptmail_key()
- Add gptmail_keys.json file support for dynamic key management
- Fix config parsing to handle include_team_owners and proxy settings in multiple locations
- Update email_service.py to use key rotation for GPTMail API calls
- Update telegram_bot.py to support dynamic key management
- Add install_service.sh script for service installation
- Update config.toml.example with new api_keys configuration option
- Improve configuration flexibility by supporting both old (api_key) and new (api_keys) formats
2026-01-17 05:52:05 +08:00
mygo-kyx 64707768f8 5 2026-01-16 00:32:23 +08:00
mygo-kyx 7e8c3784c1 feat(bot_notifier, browser_automation): Add debug screenshot capability and improve browser automation
- Add `_send_photo_to_all()` async method to send photos to all admin chat IDs
- Add `send_screenshot()` async method for sending debug screenshots via Telegram
- Add `send_screenshot_sync()` synchronous wrapper for non-async code integration
- Add `save_debug_screenshot()` function to capture and send screenshots when DEBUG_SCREENSHOT=true
- Add debug screenshot directory creation and timestamp-based file naming
- Improve browser initialization with automation detection bypass and realistic User-Agent
- Add `--disable-blink-features=AutomationControlled` flag to hide automation characteristics
- Set Mozilla/5.0 User-Agent string to mimic real Chrome browser
- Enhance OpenAI account registration flow with better error handling and debugging
- Add screenshot capture on page load failures and popup abnormalities
- Improve popup detection with additional CSS and text selectors for better reliability
- Increase timeout values for popup loading and form detection (1-3s to 2-5s)
- Add multiple fallback selectors for login form detection (email input fields, welcome text)
- Improve signup button retry logic with longer wait times and additional selector options
- Add screenshot capture on critical failures (popup retry failed, signup button not found)
2026-01-16 00:07:40 +08:00
mygo-kyx 99599134c0 4 2026-01-15 23:56:00 +08:00
mygo-kyx 51d03038e0 33 2026-01-15 23:53:33 +08:00
mygo-kyx b1953b5d95 2 2026-01-15 23:39:41 +08:00
mygo-kyx 06f906abc7 first 2026-01-15 23:02:16 +08:00