- 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>
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>