Commit Graph

3 Commits

Author SHA1 Message Date
Dani 28d6229802 docs(cloudflare): Update IMPLEMENTATION_SUMMARY with file download structure details
Added comprehensive documentation about file download structure
matching E2B pattern (cloudflare-{timestamp}/).

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 17:40:14 -04:00
Dani 40e5f66f85 fix(cloudflare): Align file download directory structure with E2B pattern
Fixed Cloudflare sandbox to save generated files in project root using
timestamp-based directories, matching E2B's sandbox-{id} pattern.

**Changes**:
- Modified launcher.ts to accept targetDir parameter (5th argument)
- Updated LauncherConfig interface with optional targetDir field
- Modified displayResults() to use targetDir instead of process.cwd()
- Fixed TypeScript errors (workerUrl undefined, unused language variable)
- Updated src/index.js to pass targetDir to launcher
- Added cloudflare-*/ and sandbox-*/ to .gitignore
- Updated IMPLEMENTATION_SUMMARY.md with file structure details

**Directory Structure**:
- Before: `.claude/sandbox/cloudflare/cloudflare-output/`
- After: `your-project/cloudflare-{timestamp}/`

**Pattern Comparison**:
- E2B: `your-project/sandbox-{id}/`
- Cloudflare: `your-project/cloudflare-{timestamp}/`

Files now download to clean, timestamped directories in the project root,
improving organization and matching user expectations from E2B behavior.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 09:44:05 -04:00
Dani 2799202579 feat: Add Cloudflare Workers sandbox with AI code generation
Implemented complete Cloudflare sandbox integration for executing Claude Code with automatic file downloads.

Features:
- AI-powered code generation using Claude Sonnet 4.5
- Automatic extraction and download of HTML/CSS/JS files
- TypeScript launcher and monitoring tools
- Support for web development requests with file detection
- Integration with CLI (--sandbox cloudflare)
- Global edge deployment capability
- Comprehensive documentation and debugging guides

Files Added:
- Worker source (src/index.ts) with Claude AI integration
- TypeScript launcher with file extraction
- Real-time monitoring tool
- Complete documentation suite (4 MD files)
- Configuration files (wrangler.toml, package.json, tsconfig.json)

Integration:
- Modified src/index.js to support cloudflare sandbox provider
- Split E2B and Cloudflare logic into separate functions
- Added file download functionality similar to E2B

Tested:
- Successfully generates and downloads HTML/CSS/JS files
- Works with agents (e.g., frontend-developer)
- Proper error handling and user feedback

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-19 19:37:05 -04:00