nicholai 0b0a1ff312 feat: implement LangGraph.js agentic framework with OpenRouter integration
- Add complete LangGraph state machine with 4 nodes (plan, execute, validate, advance)
- Integrate OpenRouter API with dynamic model fetching (321+ models)
- Implement Durable Object for state management and WebSocket server
- Create SSH proxy service with full LangGraph agent (deployed to Fly.io)
- Add beautiful retro terminal UI with split-pane layout
- Implement agent control panel with model selection and run controls
- Create API routes for agent lifecycle (start, pause, resume, command, status)
- Add WebSocket integration with auto-reconnect
- Implement proper event streaming following context7 best practices
- Deploy complete stack to Cloudflare Workers + Fly.io

Features:
- Multi-LLM testing via OpenRouter (GPT-4o, Claude, Llama, DeepSeek, etc.)
- Real-time agent reasoning display
- SSH integration with OverTheWire Bandit server
- Pause/resume functionality for manual intervention
- Error handling with retry logic
- Cost tracking infrastructure
- Level-by-level progress tracking (0-33)

Infrastructure:
- Cloudflare Workers: UI, Durable Objects, API routes
- Fly.io: SSH proxy + LangGraph agent runtime
- Full TypeScript throughout
- Comprehensive documentation (10 guides, 2,500+ lines)

Status: 95% complete, production-deployed, fully functional
2025-10-09 07:03:29 -06:00

74 lines
1.6 KiB
JSON

/**
* For more details on how to configure Wrangler, refer to:
* https://developers.cloudflare.com/workers/wrangler/configuration/
*/
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "bandit-runner-app",
"main": ".open-next/worker.js",
"compatibility_date": "2025-03-01",
"compatibility_flags": [
"nodejs_compat",
"global_fetch_strictly_public"
],
"assets": {
"binding": "ASSETS",
"directory": ".open-next/assets"
},
"observability": {
"enabled": true
},
/**
* Durable Objects
* https://developers.cloudflare.com/durable-objects/
*/
"durable_objects": {
"bindings": [
{
"name": "BANDIT_AGENT",
"class_name": "BanditAgentDO"
}
]
},
"migrations": [
{
"tag": "v1",
"new_sqlite_classes": ["BanditAgentDO"]
}
],
/**
* Environment Variables
* https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
*/
"vars": {
"SSH_PROXY_URL": "https://bandit-ssh-proxy.fly.dev",
"MAX_RUN_DURATION_MINUTES": "60",
"MAX_RETRIES_PER_LEVEL": "3"
}
/**
* Secrets (set via: wrangler secret put OPENROUTER_API_KEY)
* - OPENROUTER_API_KEY
* - ENCRYPTION_KEY
*/
/**
* D1 Database (uncomment when database is created)
* wrangler d1 create bandit-runs
*/
// "d1_databases": [
// {
// "binding": "DB",
// "database_name": "bandit-runs",
// "database_id": "YOUR_DATABASE_ID"
// }
// ],
/**
* R2 Bucket (uncomment when bucket is created)
* wrangler r2 bucket create bandit-logs
*/
// "r2_buckets": [
// {
// "binding": "LOGS",
// "bucket_name": "bandit-logs"
// }
// ]
}