An open-source, faster Devin alternative
TypeScript
Merge branch 'benchmarks-3' into feat/vm-do-poc
Brian Reardonf155f88e4158
diff --cc cloudflare-workers/api-edge/src/index.tsindex 13e2c1f3,2abe04a2..38522e66--- a/cloudflare-workers/api-edge/src/index.ts+++ b/cloudflare-workers/api-edge/src/index.ts@@@ -20,7 -20,7 +20,8 @@@// GET /healthexport { CreditAccount } from "../../shared/credit_account";+ export { PoolStock } from "./pool_stock";+export { VmSession } from "./vm_session";import { handleDashboard, type DashboardEnv } from "./dashboard";import {AGENT_SECURITY_NOTIFICATION_PATH,@@@ -91,12 -90,11 +92,17 @@@ export interface Env extends DashboardE// DEDICATED HMAC secret for handing a freshly-minted OR key to sessions-api// (NOT the generic internal-auth — this route carries a live model key). §6.7.5.OC_MANAGED_CRED_HMAC_SECRET: string;+ // Edge claim (pool_stock.ts): per-cell Durable Object stocking pre-reserved+ // hot pool boxes so default-shape creates are answered at the edge with zero+ // origin round trips. EDGE_CLAIM="0" is the kill switch (default on).+ POOL_STOCK: DurableObjectNamespace;+ EDGE_CLAIM?: string;+ // VM-DO exec data plane (vm_do_datapane_validation). One DO per sandbox holds a+ // persistent host-dialed WebSocket to the QEMU worker; exec routes edge→DO→VM+ // instead of tunnel→CP→worker, with automatic tunnel fallback when unconnected.+ // The host's /connect is authed by a per-sandbox HMAC over SESSION_JWT_SECRET+ // (see the /internal/vms/:id/connect route) — no dedicated secret.+ VM_SESSIONS: DurableObjectNamespace;}const DEFAULT_MAX_CONCURRENT_SANDBOXES = 50;diff --cc cloudflare-workers/api-edge/wrangler.tomlindex dfdf202d,a9ab750b..3398ffb3--- a/cloudflare-workers/api-edge/wrangler.toml+++ b/cloudflare-workers/api-edge/wrangler.toml@@@ -86,22 -86,26 +86,34 @@@ name = "CREDIT_ACCOUNTclass_name = "CreditAccount"script_name = "opensandbox-edge-dev"+ # Edge claim (src/pool_stock.ts): per-cell stock of pre-reserved hot pool+ # boxes so default-shape creates are answered at the edge. Kill switch:+ # EDGE_CLAIM = "0" in [vars].+ [[durable_objects.bindings]]+ name = "POOL_STOCK"+ class_name = "PoolStock"+ script_name = "opensandbox-edge-dev"++# VM-DO exec data plane (vm_do_datapane_validation): one DO per sandbox holds the- # host-dialed WebSocket to the QEMU worker. No script_name → same-script binding.++# host-dialed WebSocket to the QEMU worker.+[[durable_objects.bindings]]+name = "VM_SESSIONS"+class_name = "VmSession"++script_name = "opensandbox-edge-dev"+[[migrations]]tag = "v1"new_sqlite_classes = ["CreditAccount"]- # The prior v2/v3 reconciliation entries were dropped after a clean `wrangler- # delete` reset the migration ledger to v1; v2 below is the first real migration- # since, adding the VmSession DO class.[[migrations]]tag = "v2"+ new_sqlite_classes = ["PoolStock"]+-# v2 / v3 reconciliation entries were dropped after a clean `wrangler delete`-# reset the migration ledger to v1. If you ever apply a DO change out-of-band-# again, re-add the placeholder pattern (see git log for the old comments) or-# just `wrangler delete --force` to reset.++# v3 adds the VmSession DO class (VM-DO exec data plane). Sits after PoolStock's++# v2 to match the deployed ledger — do not renumber.++[[migrations]]++tag = "v3"+new_sqlite_classes = ["VmSession"]# Secrets (set via `wrangler secret put`):# SESSION_JWT_SECRET — HMAC for session JWT (shared with all CPs in cell fleet)