Commit Graph

23 Commits

Author SHA1 Message Date
b2fe9e0b7b Fix workflow production avec XML Digital Ocean et format Google Sheets
Corrections majeures:
- Digital Ocean: Récupération réelle XML depuis /wp-content/XML/ (86k chars au lieu de mock 1k)
- Nettoyage tags: Suppression <strong> dans extractElements() pour éviter parsing errors
- Doublons résilients: Tolérance doublons XML avec validation tags uniques
- Hiérarchie complète: StepExecutor génère 36 éléments depuis hierarchy.originalElement.name
- Format Google Sheets: Adaptation colonnes selon useVersionedSheet (17 legacy vs 21 versioned)
- Range Google Sheets: Force A1 avec INSERT_ROWS pour éviter décalage U:AO
- xmlTemplate optimisé: Exclusion du JSON metadata pour limite 50k chars

Résultat: 2151 mots, 36 éléments, sauvegarde correcte A-Q

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-08 14:52:19 +08:00
f51c4095f6 Add modular pipeline demo system with real module integration
- Add complete modular demo interface (public/modular-pipeline-demo.html)
- Add standalone demo server (simple-server.js) on port 3333
- Integrate real SelectiveCore, AdversarialCore, HumanSimulation, PatternBreaking modules
- Add configurable pipeline with step-by-step content transformation display
- Add new trend management and workflow configuration modules
- Add comprehensive test suite for full pipeline validation
- Update core modules for better modular integration and demo compatibility

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-23 16:03:20 +08:00
a4dce39343 Remove Gemini provider and fix ContentAssembly array bug
- Remove Gemini configuration from LLMManager (geo-blocked)
- Fix elements.forEach error in ContentAssembly.js
- Update provider count from 6 to 5 in tests
- Add array validation in injectGeneratedContent

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-22 07:08:14 +08:00
4f60de68d6 Fix BatchProcessor initialization and add comprehensive test suite
- Fix BatchProcessor constructor to avoid server blocking during startup
- Add comprehensive integration tests for all modular combinations
- Enhance CLAUDE.md documentation with new test commands
- Update SelectiveLayers configuration for better LLM allocation
- Add AutoReporter system for test automation
- Include production workflow validation tests

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 14:17:49 +08:00
8eecf1538e Fix Google Sheets metadata tracking issues
• AntiDetection_Level: Now shows actual adversarial mode instead of hardcoded "MVP"
• Parent_ID offset: Fixed calculation to match Google Sheets row numbers (removed -1)
• Pass adversarialMode parameter in all saveGeneratedArticleOrganic calls for proper tracking

Fixes:
- AntiDetection_Level column now displays: none, light, standard, heavy, adaptive
- Parent_ID now correctly corresponds to Google Sheets line numbers
- Consistent metadata across all versioning stages (v1.0 through v2.0)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 08:18:05 +08:00
a2ffe7fec5 Refactor batch processing system with shared QueueProcessor base class
• Created QueueProcessor base class for shared queue management, retry logic, and persistence
• Refactored BatchProcessor to extend QueueProcessor (385→142 lines, 63% reduction)
• Created BatchController with comprehensive API endpoints for batch operations
• Added Digital Ocean templates integration with caching
• Integrated batch endpoints into ManualServer with proper routing
• Fixed infinite recursion bug in queue status calculations
• Eliminated ~400 lines of duplicate code across processors
• Maintained backward compatibility with existing test interfaces

Architecture benefits:
- Single source of truth for queue processing logic
- Simplified maintenance and bug fixes
- Clear separation between AutoProcessor (production) and BatchProcessor (R&D)
- Extensible design for future processor types

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 02:04:48 +08:00
48c16ab262 Add Git push configuration for port 443 SSH 2025-09-16 12:08:22 +08:00
98d7cca9e2 Add comprehensive edge cases tests for API system
- Security tests: SQL injection, XSS, path traversal validation
- Parameters tests: Unicode, large payloads, extreme values handling
- Performance tests: Concurrency, rapid requests, mixed operations
- All edge cases pass with robust error handling and data validation
- API demonstrates production-ready security and stability
2025-09-16 11:35:36 +08:00
5f9ff4941d Complete API system implementation with comprehensive testing
- APIController.js: Full RESTful API with articles, projects, templates endpoints
- Real HTTP integration tests with live server validation
- Unit tests with proper mocking and error handling
- API documentation with examples and usage patterns
- Enhanced audit tool supporting HTML, npm scripts, dynamic imports
- Cleaned 28 dead files identified by enhanced audit analysis
- Google Sheets integration fully validated in test environment
2025-09-16 11:10:46 +08:00
96b0afc3bc Fix critical authentication and Digital Ocean integration issues
- Fixed OpenAI API key hardcoding in BrainConfig.js causing 401 errors
- Implemented proper Digital Ocean Spaces integration with AWS SDK
  - Added deployArticle() function for HTML upload
  - Fixed fetchXMLFromDigitalOcean() to retrieve from correct path
  - Direct access to root bucket instead of wp-content/XML/
- Added aws-sdk dependency for S3-compatible operations
- Created comprehensive integration test suite
- Validated complete workflow: Google Sheets → DO XML → Processing

All external systems now operational:
 Google Sheets auth and data retrieval
 Digital Ocean Spaces upload/download
 XML template processing
 LLM API authentication

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-15 23:06:07 +08:00
b60bb48e9e Intelligent merge: Align Main.js/StepExecutor with API setup base
Combines two parallel developments:
1. Remote: API setup base (326a6a5) with new /api/generate-simple endpoint
2. Local: Main.js/StepExecutor alignment for production consistency

Key technical improvements:
- Main.js: Migrated from generateSimple() to StepExecutor.executeInitialGeneration()
- StepExecutor: Fixed to respect HTML options (selectiveStack, adversarialMode, etc.)
  * executeSelective() now uses applyPredefinedStack() with specific stack
  * executeAdversarial() uses proper mode mapping (light→lightDefense, etc.)
  * executeHumanSimulation() uses applyPredefinedSimulation() with mode
  * executePatternBreaking() uses applyPatternBreakingStack() with mode
- Updated process_real.js and DigitalOceanWorkflow.js to use handleModularWorkflow()
- Removed legacy ManualTrigger.js (Apps Script compatibility)

This ensures 100% consistency between step-by-step debugging interface and
automated Main.js workflow, while preserving the new API functionality.
Both development paths now use identical, tested and validated functions.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-15 15:43:21 +08:00
326a6a5284 setup base for api system 2025-09-15 14:14:32 +08:00
9dbb6be5dc Improve step by step system, fix modular level 3 and 4 modules 2025-09-11 15:31:53 +08:00
00181de202 update test system and logger 2025-09-08 12:33:16 +08:00
870cfb0340 [200~add step-by-step versioning system with Google Sheets integration
- Add intermediate saves (v1.0-v1.4) to Generated_Articles_Versioned
  - Fix compiled_text pipeline (generatedTexts object structure)
  - Add /api/workflow-modulaire endpoint with version tracking
  - Create test-modulaire.html interface with real-time logs
  - Support parent-child linking via Parent_Article_ID
2025-09-06 16:38:20 +08:00
bfb6e5c7f3 Setup test system extended 2025-09-05 20:09:53 +08:00
590f6a93a8 Module system code base 2025-09-04 21:24:45 +08:00
ad9e3e1374 Add logviewer.html, prompt improvment, clean duplication 2025-09-04 09:27:07 +08:00
31ea27153d update logviewer.js to show level 25 messages 2025-09-03 21:32:19 +08:00
ed12aba6f8 prompt cleaning and setup of content testing 2025-09-03 17:17:41 +08:00
28fc01531c Resolve initial .gitignore merge conflict 2025-09-03 15:33:17 +08:00
239a7161c2 Initial commit 2025-09-03 15:29:19 +08:00
bc2eee78e9 Initial commit 2025-09-02 07:18:02 +00:00