mirror of
https://github.com/stablyai/orca.git
synced 2026-11-15 18:37:24 +00:00
Cloudflare generates no preview URLs for a Worker that implements a Durable Object, so every --preview-alias upload of orca-sandbox-control-dev 404ed. The runner DO moves to orca-sandbox-build-runner-dev (wrangler.build-runner.dev.jsonc); the control plane binds it with script_name and deletes its own class (migration env-build-runner-v2). The runner only keeps the alarm: each step calls back into the control plane's BuildTicker RPC entrypoint, which runs the same tickBuild with the control plane's D1, provider and secrets, so nothing is duplicated.
35 lines
1.5 KiB
JSON
35 lines
1.5 KiB
JSON
{
|
|
"$schema": "node_modules/wrangler/config-schema.json",
|
|
// Local `wrangler dev` only. No routes and workers.dev is off, so a deploy from this file
|
|
// publishes nothing reachable. Deployed environments live in the private deploy config.
|
|
// Secrets (stdin only, never here): VERCEL_TOKEN (Orca's team, Sandbox scope) and
|
|
// CONTROL_PLANE_TOKEN (shared with the billing Worker). Local dev: an untracked .dev.vars.
|
|
"name": "orca-sandbox-control-local",
|
|
"main": "src/index.ts",
|
|
"compatibility_date": "2026-11-01",
|
|
"workers_dev": false,
|
|
"d1_databases": [
|
|
{
|
|
"binding": "SANDBOX_DB",
|
|
"database_name": "orca-sandbox-control-local",
|
|
"database_id": "00000000-0000-0000-0000-000000000000",
|
|
"migrations_dir": "migrations"
|
|
}
|
|
],
|
|
// Usage settlement, lease/deadline enforcement and stuck-row reconciliation.
|
|
// Environment builds advance on Durable Object alarms (EnvironmentBuildRunner), not on readers. The
|
|
// runner is its own Worker (wrangler.build-runner.jsonc; `pnpm dev` runs both), see src/build-runner.ts.
|
|
"durable_objects": {
|
|
"bindings": [{ "name": "ENV_BUILD_RUNNER", "class_name": "EnvironmentBuildRunner", "script_name": "orca-sandbox-build-runner-local" }]
|
|
},
|
|
"triggers": { "crons": ["*/5 * * * *"] },
|
|
"vars": {
|
|
"SANDBOX_ENV": "local",
|
|
"SANDBOX_JWT_AUDIENCE": "orca-sandbox",
|
|
"VERCEL_REGION": "pdx1",
|
|
"VERCEL_FALLBACK_REGIONS": "iad1",
|
|
// Local dev never calls billing; deployed configs set BILLING_URL and drop this.
|
|
"ENTITLEMENTS_MODE": "stub"
|
|
}
|
|
}
|