forked from cloudflare/moltworker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwrangler.jsonc
More file actions
100 lines (100 loc) · 2.56 KB
/
wrangler.jsonc
File metadata and controls
100 lines (100 loc) · 2.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "moltbot-sandbox",
"main": "src/index.ts",
"compatibility_date": "2025-05-06",
"compatibility_flags": [
"nodejs_compat"
],
"observability": {
"enabled": true,
},
// Static assets for admin UI (built by vite)
"assets": {
"directory": "./dist/client",
"not_found_handling": "single-page-application",
"html_handling": "auto-trailing-slash",
"binding": "ASSETS",
"run_worker_first": true,
},
// Allow importing HTML files as text modules and PNG files as binary
"rules": [
{
"type": "Text",
"globs": [
"**/*.html"
],
"fallthrough": false,
},
{
"type": "Data",
"globs": [
"**/*.png"
],
"fallthrough": false,
},
],
// Build command for vite
"build": {
"command": "npm run build",
},
// Container configuration for the Moltbot sandbox
"containers": [
{
"class_name": "Sandbox",
"image": "./Dockerfile",
"instance_type": "standard-4",
"max_instances": 1,
},
],
"durable_objects": {
"bindings": [
{
"class_name": "Sandbox",
"name": "Sandbox",
},
],
},
"migrations": [
{
"new_sqlite_classes": [
"Sandbox"
],
"tag": "v1",
},
],
// R2 bucket for persistent storage (moltbot data, conversations, etc.)
"r2_buckets": [
{
"binding": "MOLTBOT_BUCKET",
"bucket_name": "moltbot-data",
},
],
// Cron trigger to sync moltbot data to R2 every 5 minutes
"triggers": {
"crons": [
"*/5 * * * *"
],
},
// Browser Rendering binding for CDP shim
"browser": {
"binding": "BROWSER",
},
// Note: CF_ACCOUNT_ID should be set via `wrangler secret put CF_ACCOUNT_ID`
// Secrets to configure via `wrangler secret put`:
// - ANTHROPIC_API_KEY: Your Anthropic API key
// - CF_ACCESS_TEAM_DOMAIN: Cloudflare Access team domain
// - CF_ACCESS_AUD: Cloudflare Access application audience
// - TELEGRAM_BOT_TOKEN: (optional) Telegram bot token
// - DISCORD_BOT_TOKEN: (optional) Discord bot token
// - SLACK_BOT_TOKEN: (optional) Slack bot token
// - SLACK_APP_TOKEN: (optional) Slack app token
// - MOLTBOT_GATEWAY_TOKEN: (optional) Token to protect gateway access, if unset device pairing will be used
// - CDP_SECRET: (optional) Shared secret for /cdp endpoint authentication
// - GEMINI_API_KEY: (optional) Google Gemini API key
//
// R2 persistent storage secrets (required for data persistence across sessions):
// - R2_ACCESS_KEY_ID: R2 access key ID (from R2 API tokens)
// - R2_SECRET_ACCESS_KEY: R2 secret access key (from R2 API tokens)
// - CF_ACCOUNT_ID: Your Cloudflare account ID (for R2 endpoint URL)
}