-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwrangler.jsonc
More file actions
210 lines (210 loc) · 6.47 KB
/
Copy pathwrangler.jsonc
File metadata and controls
210 lines (210 loc) · 6.47 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "fly-dev",
"main": "worker/src/index.ts",
"compatibility_date": "2026-05-24",
"compatibility_flags": ["nodejs_compat"],
"assets": {
"directory": "dist",
"binding": "ASSETS",
// Run the Worker BEFORE the assets layer so the auth gate fires on page
// navigations (otherwise "/" -> index.html is served by assets directly,
// bypassing the gate). The catch-all serves static sub-resources via the
// ASSETS binding after the gate check.
"run_worker_first": true,
// SPA routing: the default "auto-trailing-slash" 302-redirects /index.html and
// any client route (e.g. /command-center) toward "/", so deep links bounced to
// the dashboard. "none" stops those redirects; "single-page-application" serves
// index.html (200) for any unmatched path so the client router renders the route.
"html_handling": "none",
"not_found_handling": "single-page-application"
},
"routes": [
{
"pattern": "dev.fly.pm",
"custom_domain": true
}
],
"workers_dev": false,
"preview_urls": false,
// Self-healing reaper + autonomous Linear project watcher: both run every 5 minutes.
"triggers": {
"crons": ["*/5 * * * *"]
},
"tail_consumers": [
{
"service": "fly-dev-tail"
}
],
"observability": {
"enabled": true,
"head_sampling_rate": 1,
"logs": {
"enabled": true,
"head_sampling_rate": 1,
"persist": true,
"invocation_logs": true
},
"traces": {
"enabled": true,
"persist": true,
"head_sampling_rate": 1
}
},
"ai": {
"binding": "AI"
},
"browser": {
"binding": "MYBROWSER"
},
"dispatch_namespaces": [
{
"binding": "USER_WORKERS",
"namespace": "fly-dev-production"
}
],
"kv_namespaces": [
{
"binding": "CACHE",
"id": "486f8ccff1744020a1d8427f1d60ccdc"
},
{
"binding": "SESSION_CACHE",
"id": "53f23a4907da4f3e9a97d40c1c4f1f9a"
}
],
"r2_buckets": [
{
"binding": "ARTIFACTS",
"bucket_name": "fly-dev-artifacts"
},
{
"binding": "TEMPLATE_ASSETS",
"bucket_name": "fly-dev-template-assets"
}
],
"d1_databases": [
{
"binding": "DB",
"database_name": "fly-dev",
"database_id": "3f03fde5-d0ba-4f35-940e-318567b45cab",
"migrations_dir": "migrations"
}
],
"queues": {
"producers": [
{
"binding": "WORK_QUEUE",
"queue": "fly-dev-work"
},
{
"binding": "MEMORY_QUEUE",
"queue": "fly-dev-memory"
}
],
"consumers": [
{
// Agent-memory retains, off the run hot path. Generous retries because a
// brief Hindsight/VM blip should redeliver, not dead-letter, a memory.
"queue": "fly-dev-memory",
"max_batch_size": 10,
"max_batch_timeout": 5,
"max_retries": 5,
"dead_letter_queue": "fly-dev-memory-dlq"
},
{
"queue": "fly-dev-work",
// Serialize queue ADMISSION (max_concurrency: 1) so getActiveRunCount()
// can't be read stale by parallel autoscaled consumer invocations racing
// the count-then-create capacity gate. Throughput ceiling is 8 containers
// anyway, so a single admission consumer is acceptable. Combined with the
// per-batch reservation in queue(), this closes the cross-invocation race.
"max_concurrency": 1,
"max_batch_size": 8,
"max_batch_timeout": 5,
"max_retries": 3,
"dead_letter_queue": "fly-dev-work-dlq"
}
]
},
"workflows": [
{
"name": "fly-dev-run-workflow",
"binding": "RUN_WORKFLOW",
"class_name": "RunWorkflow"
}
],
"durable_objects": {
"bindings": [
{
"name": "PROJECT_CONDUCTORS",
"class_name": "ProjectConductor"
},
{
"name": "USER_WORKER_CONTROLLERS",
"class_name": "UserWorkerController"
},
{
"name": "DEV_ORCHESTRATOR",
"class_name": "DevOrchestratorAgent"
},
{
"name": "SANDBOX_CONTAINER",
"class_name": "SandboxContainer"
}
]
},
"migrations": [
{
"tag": "v1",
"new_sqlite_classes": [
"ProjectConductor",
"UserWorkerController",
"DevOrchestratorAgent",
"SandboxContainer"
]
}
],
"containers": [
{
"class_name": "SandboxContainer",
"image": "./container/Dockerfile",
// standard-3 specs (2 vCPU / 8 GiB / 16 GB disk), set EXPLICITLY as a custom
// instance type because the named "standard-3" string did not apply the larger
// resources on this wrangler/platform version (the deployed instance stayed at
// 1 vCPU / 6 GiB). More CPU/disk for clone + agent + test gate, and a different
// capacity pool than the constrained standard-2 ("no free slot").
"instance_type": { "vcpu": 2, "memory_mib": 8192, "disk_mb": 16000 },
"max_instances": 8
}
],
"vars": {
"APP_ENV": "production",
"APP_URL": "https://dev.fly.pm",
"AI_GATEWAY_ID": "x",
"CODEX_GATEWAY_MODEL": "openai/gpt-5.5",
"CLOUDFLARE_GATEWAY_MODEL": "@cf/openai/gpt-oss-120b",
"APPLE_TEMPLATE_REPO": "aloewright/warp-template-apple-multiplatform",
"CLOUDFLARE_TEMPLATE_REPO": "aloewright/aloe-template-cloudflare-fullstack",
"FIRECRAWL_WORKER_URL": "https://firecrawl-cf.lazee.workers.dev",
"FLY_AUTH_ORIGIN": "https://fly.pm",
"PLAYWRIGHT_WORKER_URL": "",
"REQUIRE_HUMAN_APPROVAL": "false",
"GITHUB_APP_ID": "3899646",
"AUTH_HUB_URL": "https://auth.fly.pm",
"CONTINUE_AUTONOMY": "true",
"CONTINUE_EXECUTE_CAP": "3",
// Queue-admission gate: how many sandboxes may run concurrently. Measured: with
// self-exit + orphans cleared, the account still provisions only ~1-2 standard-3
// containers at once (shared with ~6 other container apps), and gate=4 produced
// capacity_exhausted churn. Set to 2 (real concurrency, minimal overshoot); the
// bounded-requeue absorbs the rest. Raise only if 2 provisions cleanly with headroom.
"MAX_CONTAINER_INSTANCES": "2",
// Agent memory (self-hosted Hindsight). Flip MEMORY_ENABLED to "true" to turn on
// recall/retain/reflect; secrets (HINDSIGHT_API_KEY, HINDSIGHT_CF_ACCESS_CLIENT_ID/
// SECRET) are set via `wrangler secret put`. Server lives in infra/hindsight/.
"MEMORY_ENABLED": "true",
"MEMORY_REFLECT_MODE": "auto",
"HINDSIGHT_BASE_URL": "https://hindsight.fly.pm"
}
}