The best way to control Claude Code, Codex and more from any computer or phone
| 1 | --- |
| 2 | title: 2.0.0-beta.83 - Cloudflare Birthday Week |
| 3 | date: 2026-10-12T09:00:00Z |
| 4 | category: release |
| 5 | excerpt: v2.0.0-beta.83 supports Cloudflare's Birthday Week launches — containers managed by Durable Objects, K2 event streams, Basin, Workers KV Instant, Workers Issues, and vinext 1.0 — plus Hyperdrive to private databases over Workers VPC, per-entrypoint Workers Cache, Durable Objects deployed with exports, federated APIs, and adopting Cloudflare Access apps. Also a Turso provider, AWS console login, DSQL migrations, Neon roles, and 93 bug fixes. |
| 6 | --- |
| 7 | |
| 8 | beta.83 supports Cloudflare's **Birthday Week** launches. Containers can now |
| 9 | be **managed by Durable Objects**: bind one Container per image and start |
| 10 | the one you need. **K2** gives you durable event streams, and **Basin** turns |
| 11 | Pipelines and the R2 Data Catalog into one data platform. **Workers KV |
| 12 | Instant**, **Workers Issues**, and **vinext 1.0** work out of the box. |
| 13 | |
| 14 | Outside Birthday Week, Workers can reach **private databases through |
| 15 | Hyperdrive and Workers VPC**, set **Workers Cache per entrypoint**, and |
| 16 | serve one hostname from many Workers with **federated APIs**, and take over |
| 17 | existing **Cloudflare Access** apps. Durable |
| 18 | Objects now deploy with Cloudflare's **declarative exports**. Kubernetes resources send `Redacted` |
| 19 | secrets to the cluster. There is also a new **Turso** provider, **AWS console login**, **DSQL migrations**, |
| 20 | and **`Neon.Role`**. |
| 21 | |
| 22 | It also ships **93 bug fixes** and closes 51 issues. See |
| 23 | [Bug fixes](#93-bug-fixes). This post covers beta.82 and beta.83. |
| 24 | |
| 25 | :::caution |
| 26 | **Breaking changes** |
| 27 | |
| 28 | - **Containers start explicitly, and one Container is one image** |
| 29 | ([#1905](https://github.com/alchemy-run/alchemy/pull/1905), |
| 30 | [#2223](https://github.com/alchemy-run/alchemy/pull/2223)). |
| 31 | `Cloudflare.Containers.layer` is removed. `yield* Sandbox` binds the |
| 32 | container without starting it; call `sandbox.start()` before you use |
| 33 | it: |
| 34 | |
| 35 | ```diff lang="typescript" |
| 36 | const sandbox = yield* Sandbox; |
| 37 | -return { ping: () => sandbox.ping() }; |
| 38 | +const start = sandbox.start({ enableInternet: true }); |
| 39 | +return { ping: () => start.pipe(Effect.andThen(sandbox.ping())) }; |
| 40 | ``` |
| 41 | |
| 42 | A Durable Object-managed Container declares a single `image` (or |
| 43 | `dockerfile`). The `images` map from beta.82 is removed: declare one |
| 44 | Container per image and bind each to the Durable Object. On an async |
| 45 | Worker, the Container's `className` is replaced by the Durable Object |
| 46 | binding's `containers`, and a Durable Object-managed Container placed |
| 47 | directly in `env` fails with `DurableObjectContainerBindingError`: |
| 48 | |
| 49 | ```typescript |
| 50 | env: { |
| 51 | AGENT: Cloudflare.DurableObject("Agent", { containers: [Node, Python] }), |
| 52 | } |
| 53 | ``` |
| 54 | |
| 55 | A container's |
| 56 | RPC shape can no longer declare members the handle already has (`start`, |
| 57 | `exec`, `image`, `getTcpPort`, …), and RPC on a stopped container fails |
| 58 | with `ContainerNotRunningError`. |
| 59 | - **Pipelines streams are private by default** |
| 60 | ([#2010](https://github.com/alchemy-run/alchemy/pull/2010)). A |
| 61 | `Pipelines.Stream` declared without `http` no longer gets a public, |
| 62 | unauthenticated ingest endpoint. Set |
| 63 | `http: { enabled: true, authentication: false }` to keep one. |
| 64 | - **Durable Objects deploy with `exports`, and you can't go back** |
| 65 | ([#2135](https://github.com/alchemy-run/alchemy/pull/2135)). After a |
| 66 | Worker with Durable Objects deploys on beta.82, older Alchemy releases |
| 67 | can no longer deploy it. Upgrade every machine and CI job that deploys |
| 68 | the stack together. The first deploy after upgrading must go out at |
| 69 | 100% traffic. See [below](#durable-objects-deploy-with-exports). |
| 70 | - **`InstanceId` is now `ResourceContext`** |
| 71 | ([#2160](https://github.com/alchemy-run/alchemy/pull/2160)). Custom |
| 72 | providers read the instance id from the resource context: |
| 73 | |
| 74 | ```diff lang="typescript" |
| 75 | import * as Effect from "effect/Effect"; |
| 76 | -import { InstanceId } from "alchemy"; |
| 77 | -const instanceId = yield* InstanceId; |
| 78 | +import { ResourceContext } from "alchemy"; |
| 79 | +const { instanceId } = yield* ResourceContext; |
| 80 | ``` |
| 81 | |
| 82 | - **The CLI needs Node 24.11.1+ or Bun** |
| 83 | ([#2151](https://github.com/alchemy-run/alchemy/pull/2151)). Node 22 |
| 84 | and 23 are no longer supported. |
| 85 | - **Bundles are written to `.alchemy/bundles`** |
| 86 | ([#2133](https://github.com/alchemy-run/alchemy/pull/2133)), not |
| 87 | `dist/`. Workers and Lambdas redeploy once after you upgrade because |
| 88 | their sourcemap paths change. Set `build.output.dir` to choose a |
| 89 | location. |
| 90 | - **`Git.BlobStoreR2` needs a `ReadWriteBucket` implementation** |
| 91 | ([#2102](https://github.com/alchemy-run/alchemy/pull/2102)). Provide |
| 92 | `Cloudflare.R2.ReadWriteBucketBinding` (or `ReadWriteBucketHttp`) on |
| 93 | the Worker. |
| 94 | - **Removed GCP resources** |
| 95 | ([#2159](https://github.com/alchemy-run/alchemy/pull/2159), |
| 96 | [#2024](https://github.com/alchemy-run/alchemy/pull/2024)). Google |
| 97 | removed the APIs behind `GCP.WorkspaceEvents.TasksPushNotificationConfig` |
| 98 | and the `GCP.Dataplex` data taxonomy resources. |
| 99 | - **An `MtlsCertificate` in `env` is an mTLS binding** |
| 100 | ([#2051](https://github.com/alchemy-run/alchemy/pull/2051)), typed as a |
| 101 | `Fetcher`, instead of a JSON binding. |
| 102 | ::: |
| 103 | |
| 104 | ## Cloudflare Birthday Week |
| 105 | |
| 106 | ### Containers managed by Durable Objects |
| 107 | |
| 108 | Cloudflare rebuilt Containers so a Durable Object can start one directly |
| 109 | ([#1905](https://github.com/alchemy-run/alchemy/pull/1905), |
| 110 | [#2223](https://github.com/alchemy-run/alchemy/pull/2223)). Declare one |
| 111 | Container per image with `schedulingPolicy: "durable_object"`: |
| 112 | |
| 113 | ```typescript |
| 114 | export class Node extends Cloudflare.Container<Node>()("Node", { |
| 115 | schedulingPolicy: "durable_object", |
| 116 | image: "node:24-slim", |
| 117 | }) {} |
| 118 | |
| 119 | export class Python extends Cloudflare.Container<Python>()("Python", { |
| 120 | schedulingPolicy: "durable_object", |
| 121 | dockerfile: "./python/Dockerfile", |
| 122 | context: "./python", |
| 123 | }) {} |
| 124 | ``` |
| 125 | |
| 126 | Bind as many as you need in the Durable Object. Each handle's `start()` |
| 127 | starts its own image, with the instance size and entrypoint you choose: |
| 128 | |
| 129 | ```typescript |
| 130 | export class Agent extends Cloudflare.DurableObject<Agent>()( |
| 131 | "Agent", |
| 132 | Effect.gen(function* () { |
| 133 | const node = yield* Node; |
| 134 | const python = yield* Python; |
| 135 | return Effect.succeed({ |
| 136 | run: (cmd: string[]) => |
| 137 | Effect.gen(function* () { |
| 138 | yield* node.start({ |
| 139 | instance: "lite", |
| 140 | entrypoint: ["sleep", "infinity"], |
| 141 | enableInternet: false, |
| 142 | }); |
| 143 | return yield* (yield* node.exec(cmd)).output(); |
| 144 | }).pipe(Effect.scoped), |
| 145 | }); |
| 146 | }), |
| 147 | ) {} |
| 148 | ``` |
| 149 | |
| 150 | A Durable Object runs one container at a time, so start one image and |
| 151 | `destroy()` it before you switch. |
| 152 | |
| 153 | A plain async Durable Object lists its Containers on its binding. A |
| 154 | Container can back several classes: |
| 155 | |
| 156 | ```typescript |
| 157 | // alchemy.run.ts |
| 158 | const Node = Cloudflare.Container("Node", { |
| 159 | schedulingPolicy: "durable_object", |
| 160 | image: "node:24-slim", |
| 161 | }); |
| 162 | const Python = Cloudflare.Container("Python", { |
| 163 | schedulingPolicy: "durable_object", |
| 164 | image: "python:3.13-slim", |
| 165 | }); |
| 166 | const Rust = Cloudflare.Container("Rust", { |
| 167 | schedulingPolicy: "durable_object", |
| 168 | image: "rust:1.90-slim", |
| 169 | }); |
| 170 | |
| 171 | export const Worker = Cloudflare.Worker("App", { |
| 172 | main: "./src/worker.ts", |
| 173 | env: { |
| 174 | AGENT: Cloudflare.DurableObject("Agent", { containers: [Node, Python] }), |
| 175 | REVIEWER: Cloudflare.DurableObject("Reviewer", { containers: [Node, Rust] }), |
| 176 | }, |
| 177 | }); |
| 178 | ``` |
| 179 | |
| 180 | The class finds each image in `ctx.container.images` under its |
| 181 | Container's id: |
| 182 | |
| 183 | ```typescript |
| 184 | // src/worker.ts |
| 185 | import { DurableObject } from "cloudflare:workers"; |
| 186 | |
| 187 | export class Agent extends DurableObject { |
| 188 | async run(cmd: string[]) { |
| 189 | const container = this.ctx.container!; |
| 190 | if (!container.running) { |
| 191 | container.start({ |
| 192 | image: container.images.Node, |
| 193 | entrypoint: ["sleep", "infinity"], |
| 194 | enableInternet: false, |
| 195 | }); |
| 196 | } |
| 197 | return (await container.exec(cmd)).output(); |
| 198 | } |
| 199 | } |
| 200 | ``` |
| 201 | |
| 202 | Snapshots, SSH, and stdin streaming are supported, and the same code runs |
| 203 | under `alchemy dev`. Thanks |
| 204 | [Dan van der Merwe](https://github.com/danieljvdm)! |
| 205 | |
| 206 | Docs: [Containers](/cloudflare/compute/containers) · |
| 207 | [Container lifecycle](/cloudflare/compute/container-lifecycle). |
| 208 | |
| 209 | ### K2 event streams |
| 210 | |
| 211 | `Cloudflare.K2.Stream` is a durable event stream stored in R2 |
| 212 | ([#2010](https://github.com/alchemy-run/alchemy/pull/2010)). A Worker |
| 213 | writes to it through a binding: |
| 214 | |
| 215 | ```typescript |
| 216 | export const Orders = Cloudflare.K2.Stream("Orders", { |
| 217 | retention: "7 days", |
| 218 | }); |
| 219 | |
| 220 | export default class Api extends Cloudflare.Worker<Api>()( |
| 221 | "Api", |
| 222 | { main: import.meta.url }, |
| 223 | Effect.gen(function* () { |
| 224 | const orders = yield* Cloudflare.K2.WriteStream(Orders); |
| 225 | return { |
| 226 | fetch: Effect.gen(function* () { |
| 227 | const request = yield* HttpServerRequest; |
| 228 | yield* orders.send([{ content: yield* request.text }]); |
| 229 | return HttpServerResponse.empty({ status: 202 }); |
| 230 | }), |
| 231 | }; |
| 232 | }).pipe(Effect.provide(Cloudflare.K2.WriteStreamBinding)), |
| 233 | ) {} |
| 234 | ``` |
| 235 | |
| 236 | Long-running hosts consume the stream with `consumeStreamRecords`. Here a |
| 237 | Fly Service reviews large orders: |
| 238 | |
| 239 | ```typescript |
| 240 | yield* Cloudflare.K2.consumeStreamRecords( |
| 241 | Orders, |
| 242 | { startAt: "earliest", concurrency: 4 }, |
| 243 | (records) => |
| 244 | records.pipe( |
| 245 | Stream.map((record) => record.value), |
| 246 | Stream.filter((order) => order.amountCents > 100_000), |
| 247 | Stream.runForEach((order) => Effect.log(`review ${order.orderId}`)), |
| 248 | ), |
| 249 | ); |
| 250 | ``` |
| 251 | |
| 252 | :::caution |
| 253 | Workers can't consume K2 streams yet. Cloudflare can't push records to a |
| 254 | Worker, so produce from Workers and consume from a long-running host such as |
| 255 | a Fly, ECS, EC2, Railway, Hetzner, or Docker service. Alchemy will add a |
| 256 | Worker consumer once Cloudflare supports one. |
| 257 | ::: |
| 258 | |
| 259 | Docs: [K2](/cloudflare/messaging/k2). |
| 260 | |
| 261 | ### Basin |
| 262 | |
| 263 | Cloudflare renamed its data platform **Basin**: Pipelines, the R2 Data |
| 264 | Catalog, and SQL. The same resources are now also exported as |
| 265 | `Cloudflare.Basin.*` ([#2010](https://github.com/alchemy-run/alchemy/pull/2010)). |
| 266 | A pipeline reads a stream and writes to an Iceberg table with SQL: |
| 267 | |
| 268 | ```typescript |
| 269 | const lake = yield* Cloudflare.R2.Bucket("Lake"); |
| 270 | const catalog = yield* Cloudflare.Basin.Catalog("Catalog", { bucket: lake }); |
| 271 | const views = yield* Cloudflare.Basin.Stream("PageViews", { schema: PageView }); |
| 272 | |
| 273 | const table = yield* Cloudflare.Basin.Sink("PageViewTable", { |
| 274 | type: "basin_catalog", |
| 275 | catalog, |
| 276 | table: { namespace: "web", name: "page_views" }, |
| 277 | token: yield* Config.Redacted("CATALOG_TOKEN"), |
| 278 | }); |
| 279 | |
| 280 | yield* Cloudflare.Basin.Pipeline("PageViewEtl", { |
| 281 | sql: Output.interpolate` |
| 282 | INSERT INTO ${table.name} |
| 283 | SELECT userId, path, at FROM ${views.name}`, |
| 284 | }); |
| 285 | ``` |
| 286 | |
| 287 | Alchemy checks the SQL with Cloudflare during plan, so a bad statement fails |
| 288 | before anything changes. |
| 289 | |
| 290 | `Basin.Table` creates an Iceberg table directly, with columns from an Effect |
| 291 | Schema: |
| 292 | |
| 293 | ```typescript |
| 294 | const orders = yield* Cloudflare.Basin.Table("Orders", { |
| 295 | catalog, |
| 296 | namespace: "sales", |
| 297 | schema: Order, |
| 298 | partitionBy: ["day(at)"], |
| 299 | }); |
| 300 | ``` |
| 301 | |
| 302 | Docs: [Pipelines](/cloudflare/data/pipelines) · |
| 303 | [Iceberg tables](/cloudflare/data/iceberg-tables). |
| 304 | |
| 305 | ### Workers KV Instant |
| 306 | |
| 307 | `Cloudflare.KV.InstantNamespace` creates a namespace in Cloudflare's new |
| 308 | Instant mode, for small configuration that is read often |
| 309 | ([#2027](https://github.com/alchemy-run/alchemy/pull/2027)). The existing |
| 310 | KV capabilities accept it, and `alchemy dev` emulates it: |
| 311 | |
| 312 | ```typescript |
| 313 | const config = yield* Cloudflare.KV.InstantNamespace("Config"); |
| 314 | |
| 315 | // in a Worker |
| 316 | const kv = yield* Cloudflare.KV.ReadNamespace(config); |
| 317 | const enabled = yield* kv.get("feature-enabled"); |
| 318 | ``` |
| 319 | |
| 320 | Switching a namespace between classic and Instant replaces it and does not |
| 321 | copy its data. Thanks [BlankParticle](https://github.com/BlankParticle)! |
| 322 | |
| 323 | ### Workers Issues |
| 324 | |
| 325 | Turn on Workers Issues error detection for a Worker |
| 326 | ([#1992](https://github.com/alchemy-run/alchemy/pull/1992)). Version |
| 327 | uploads and gradual rollouts keep the setting: |
| 328 | |
| 329 | ```typescript |
| 330 | yield* Cloudflare.Worker("Api", { |
| 331 | main: "./src/worker.ts", |
| 332 | observability: { issues: { enabled: true } }, |
| 333 | }); |
| 334 | ``` |
| 335 | |
| 336 | ### vinext 1.0 |
| 337 | |
| 338 | `Website.Vinext` supports vinext 1.0, including hybrid App and Pages |
| 339 | Router builds ([#2025](https://github.com/alchemy-run/alchemy/pull/2025)). |
| 340 | Thanks [BlankParticle](https://github.com/BlankParticle)! |
| 341 | |
| 342 | ## Private databases with Hyperdrive |
| 343 | |
| 344 | A Hyperdrive connection can now reach a database that has no public |
| 345 | endpoint, through a Workers VPC service |
| 346 | ([#2218](https://github.com/alchemy-run/alchemy/pull/2218)). Point the |
| 347 | origin at the service with `serviceId`: |
| 348 | |
| 349 | ```typescript |
| 350 | const hyperdrive = yield* Cloudflare.Hyperdrive.Connection("Hyperdrive", { |
| 351 | origin: { |
| 352 | scheme: "postgres", |
| 353 | serviceId: service.serviceId, |
| 354 | database: "app", |
| 355 | user: "app", |
| 356 | password: password.text, |
| 357 | }, |
| 358 | }); |
| 359 | ``` |
| 360 | |
| 361 | The guide connects a Worker to Aurora in private AWS subnets through a |
| 362 | Cloudflare Tunnel, and `examples/cloudflare-hyperdrive-aws-vpc` deploys |
| 363 | the whole thing. |
| 364 | |
| 365 | Docs: [Private databases](/cloudflare/data/hyperdrive-private-database). |
| 366 | |
| 367 | ## Workers Cache per entrypoint |
| 368 | |
| 369 | `entrypoints` sets Workers Cache for each entrypoint of a Worker |
| 370 | ([#2216](https://github.com/alchemy-run/alchemy/pull/2216)). An |
| 371 | entrypoint you don't list uses the Worker's `cache` setting: |
| 372 | |
| 373 | ```typescript |
| 374 | yield* Cloudflare.Worker("Api", { |
| 375 | main: "./src/worker.ts", |
| 376 | entrypoints: { |
| 377 | default: { cache: { enabled: false } }, |
| 378 | Public: { cache: { enabled: true } }, |
| 379 | }, |
| 380 | }); |
| 381 | ``` |
| 382 | |
| 383 | ## Durable Objects deploy with exports |
| 384 | |
| 385 | Alchemy now uploads Durable Objects with Cloudflare's declarative |
| 386 | `exports` instead of `migrations` |
| 387 | ([#2135](https://github.com/alchemy-run/alchemy/pull/2135)). Your code |
| 388 | doesn't change. Alchemy can now deploy and adopt Workers that were last |
| 389 | deployed by Wrangler 4.107 or later. |
| 390 | |
| 391 | :::caution |
| 392 | This is a one-way change. Once a Worker deploys with `exports`, a release |
| 393 | before beta.82 can't deploy it again. Pin `alchemy@2.0.0-beta.82` or later |
| 394 | everywhere the stack is deployed (laptops, CI, preview jobs) before the |
| 395 | first deploy, and don't roll back past it. |
| 396 | ::: |
| 397 | |
| 398 | The first deploy after upgrading must go out at 100% traffic. If you use |
| 399 | gradual deployments, remove `version.traffic` for that one deploy; |
| 400 | otherwise it fails with `WorkerVersionConfigError`. |
| 401 | |
| 402 | Removing a Durable Object binding no longer deletes its namespace while |
| 403 | the class is still exported. Remove the class from your code to delete |
| 404 | it. Previews still use `migrations`. |
| 405 | |
| 406 | Docs: [Durable Objects](/cloudflare/compute/durable-objects) · |
| 407 | [Gradual deployments](/cloudflare/compute/gradual-deployments). |
| 408 | |
| 409 | ## Federated APIs |
| 410 | |
| 411 | Serve one hostname from several Workers, each with only the permissions |
| 412 | it needs, using zone `routes` |
| 413 | ([#2088](https://github.com/alchemy-run/alchemy/pull/2088)). `alchemy dev` |
| 414 | applies the same routing locally: |
| 415 | |
| 416 | ```typescript |
| 417 | yield* Cloudflare.Worker("Home", { |
| 418 | main: "./src/home.ts", |
| 419 | domain: "api.example.com", |
| 420 | }); |
| 421 | |
| 422 | yield* Cloudflare.Worker("Orders", { |
| 423 | main: "./src/orders.ts", |
| 424 | routes: [{ pattern: "api.example.com/orders*" }], |
| 425 | }); |
| 426 | ``` |
| 427 | |
| 428 | Docs: [Federated APIs](/cloudflare/networking/federated-apis). |
| 429 | |
| 430 | ## Cloudflare Access: adopt apps and SaaS |
| 431 | |
| 432 | `Access.Application` can take over an existing app by its Cloudflare id |
| 433 | ([#1848](https://github.com/alchemy-run/alchemy/pull/1848)). The id and |
| 434 | `aud` stay the same, so JWT validation keeps working, and no `--adopt` is |
| 435 | needed: |
| 436 | |
| 437 | ```typescript |
| 438 | const grafana = yield* Cloudflare.Access.Application("Grafana", { |
| 439 | applicationId: "4f8e3c1a-5b2d-4e6f-9a7b-1c2d3e4f5a6b", |
| 440 | type: "self_hosted", |
| 441 | domain: "grafana.example.com", |
| 442 | }); |
| 443 | ``` |
| 444 | |
| 445 | If the id doesn't exist, the deploy fails with `DeclaredApplicationNotFound` |
| 446 | instead of creating a new app. |
| 447 | |
| 448 | SAML and OIDC SaaS apps are supported too. The values Cloudflare generates, |
| 449 | such as the SSO endpoint and client id, come back as outputs: |
| 450 | |
| 451 | ```typescript |
| 452 | const looker = yield* Cloudflare.Access.Application("Looker", { |
| 453 | type: "saas", |
| 454 | saasApp: { |
| 455 | authType: "saml", |
| 456 | spEntityId: "https://example.looker.com", |
| 457 | consumerServiceUrl: "https://example.looker.com/saml/acs", |
| 458 | }, |
| 459 | }); |
| 460 | ``` |
| 461 | |
| 462 | `Access.Policy` gains SSH and RDP connection rules, approval groups, and a |
| 463 | justification prompt: |
| 464 | |
| 465 | ```typescript |
| 466 | yield* Cloudflare.Access.Policy("SshOps", { |
| 467 | decision: "allow", |
| 468 | include: [{ emailDomain: "example.com" }], |
| 469 | connectionRules: { ssh: { usernames: ["root", "ubuntu"] } }, |
| 470 | approvalGroups: [{ approvalsNeeded: 1, emailAddresses: ["lead@example.com"] }], |
| 471 | purposeJustificationRequired: true, |
| 472 | }); |
| 473 | ``` |
| 474 | |
| 475 | Updates no longer reset settings you leave out of the props. A field you |
| 476 | omit keeps its live value; pass `[]` or `false` to clear it. Thanks |
| 477 | [spinx](https://github.com/spinx) and |
| 478 | [Chinoman10](https://github.com/Chinoman10)! |
| 479 | |
| 480 | Docs: [Access](/cloudflare/security/access). |
| 481 | |
| 482 | ## Turso |
| 483 | |
| 484 | A new **Turso** provider creates groups and databases, with migrations, |
| 485 | and binds them to Workers and Lambdas |
| 486 | ([#2138](https://github.com/alchemy-run/alchemy/pull/2138)): |
| 487 | |
| 488 | ```typescript |
| 489 | import * as Turso from "alchemy/Turso"; |
| 490 | |
| 491 | export const Group = Turso.Group("Group", { location: "aws-us-east-1" }); |
| 492 | |
| 493 | export const Db = Effect.gen(function* () { |
| 494 | const group = yield* Group; |
| 495 | return yield* Turso.Database("Db", { |
| 496 | group: group.name, |
| 497 | migrations: "./migrations", |
| 498 | }); |
| 499 | }); |
| 500 | ``` |
| 501 | |
| 502 | Query it with Drizzle or `SQL.LibSQL`: |
| 503 | |
| 504 | ```typescript |
| 505 | const conn = yield* Turso.Connect(Db); |
| 506 | const db = yield* Drizzle.LibSQL(conn); |
| 507 | ``` |
| 508 | |
| 509 | `Turso.ManageDatabases` creates a database per tenant at runtime: |
| 510 | |
| 511 | ```typescript |
| 512 | const tenants = yield* Turso.ManageDatabases(Tenants); |
| 513 | const acme = yield* tenants.create("acme"); |
| 514 | ``` |
| 515 | |
| 516 | Docs: [Turso](/turso) · [Tutorial](/turso/tutorial/part-1). |
| 517 | |
| 518 | ## AWS console login |
| 519 | |
| 520 | Authenticate an AWS profile with `aws login` (AWS CLI 2.32+), with no |
| 521 | long-lived keys |
| 522 | ([#1759](https://github.com/alchemy-run/alchemy/pull/1759)). |
| 523 | `alchemy profile refresh` signs in again when the session expires: |
| 524 | |
| 525 | ```sh |
| 526 | aws login --profile my-console |
| 527 | alchemy profile edit --add AWS --method console-login --set loginProfile=my-console |
| 528 | ``` |
| 529 | |
| 530 | Thanks [jperezrealini](https://github.com/jperezrealini)! |
| 531 | |
| 532 | Docs: [AWS setup](/aws/setup). |
| 533 | |
| 534 | ## DSQL migrations |
| 535 | |
| 536 | `AWS.DSQL.Cluster` applies SQL migrations when it deploys |
| 537 | ([#1544](https://github.com/alchemy-run/alchemy/pull/1544)). Each |
| 538 | statement runs in its own transaction, and `CREATE INDEX` becomes |
| 539 | `CREATE INDEX ASYNC`. SQL that DSQL can't run is rejected before the |
| 540 | cluster is touched: |
| 541 | |
| 542 | ```typescript |
| 543 | const database = yield* AWS.DSQL.Cluster("Database", { |
| 544 | migrations: "./migrations", |
| 545 | }); |
| 546 | ``` |
| 547 | |
| 548 | Thanks [carlulsoe](https://github.com/carlulsoe)! |
| 549 | |
| 550 | Docs: [Drizzle on DSQL](/aws/data/drizzle-dsql). |
| 551 | |
| 552 | ## Neon roles |
| 553 | |
| 554 | `Neon.Role` creates a Postgres role on a branch, with a stable password |
| 555 | ([#2078](https://github.com/alchemy-run/alchemy/pull/2078)): |
| 556 | |
| 557 | ```typescript |
| 558 | const app = yield* Neon.Role("App", { branch }); |
| 559 | const owner = yield* Neon.Role("Owner", { branch, name: "app_owner", noLogin: true }); |
| 560 | ``` |
| 561 | |
| 562 | Every Neon role has owner-level access to the branch's databases. |
| 563 | |
| 564 | Docs: [Roles](/neon/data/roles). |
| 565 | |
| 566 | ## Kubernetes secrets and drift |
| 567 | |
| 568 | `Redacted` values in a `Kubernetes.Manifest` or `Kubernetes.HelmChart` |
| 569 | now reach the cluster as the real secret |
| 570 | ([#1948](https://github.com/alchemy-run/alchemy/pull/1948)). Before, the |
| 571 | cluster stored the placeholder `<redacted>`. Plans and state still keep |
| 572 | the value wrapped: |
| 573 | |
| 574 | ```typescript |
| 575 | yield* Kubernetes.Manifest("Token", { |
| 576 | cluster, |
| 577 | manifest: { |
| 578 | apiVersion: "v1", |
| 579 | kind: "Secret", |
| 580 | metadata: { name: "token" }, |
| 581 | stringData: { token: Redacted.make(token) }, |
| 582 | }, |
| 583 | }); |
| 584 | |
| 585 | yield* Kubernetes.HelmChart("App", { |
| 586 | cluster, |
| 587 | chart: "./chart", |
| 588 | values: { apiKey: Redacted.make(apiKey) }, |
| 589 | }); |
| 590 | ``` |
| 591 | |
| 592 | API errors and Helm output are scrubbed of those secrets, including their |
| 593 | base64 and JSON-escaped forms. Destroy fails when the cluster refuses a |
| 594 | delete (403 or 5xx) instead of reporting success, and calls to an |
| 595 | unreachable API server time out. `alchemy drift` now reports in-cluster |
| 596 | edits to the fields you declared, such as an image or replica count. |
| 597 | |
| 598 | `Kubernetes.Deployment` also takes the cluster resource directly, so its |
| 599 | props can be a plain object |
| 600 | ([#2005](https://github.com/alchemy-run/alchemy/pull/2005)): |
| 601 | |
| 602 | ```diff lang="typescript" |
| 603 | export default Kubernetes.Deployment( |
| 604 | "Api", |
| 605 | - Effect.gen(function* () { |
| 606 | - return { main: import.meta.url, cluster: yield* Gke, port: 3000 }; |
| 607 | - }), |
| 608 | + { main: import.meta.url, cluster: Gke, port: 3000 }, |
| 609 | impl, |
| 610 | ); |
| 611 | ``` |
| 612 | |
| 613 | `Neon.Function` takes `branch` and `project` the same way. |
| 614 | |
| 615 | Docs: [Kubernetes](/kubernetes). |
| 616 | |
| 617 | ## 93 bug fixes |
| 618 | |
| 619 | This release merges 93 fixes: 29 for Cloudflare and its local runtime, 23 for |
| 620 | AWS, 8 for Docker, and the rest across PlanetScale, the CLI, Prisma, GCP, |
| 621 | frontend frameworks, Neon, floci, and more. |
| 622 | |
| 623 | One of them, |
| 624 | [#2174](https://github.com/alchemy-run/alchemy/pull/2174), fixes the resource |
| 625 | leaks, slow deletes, and flaky tests that kept the live AWS, Cloudflare, and |
| 626 | GCP suites from passing with clean accounts. For example, deleting a Lambda |
| 627 | function no longer waits about 40 seconds for its log group, interrupted |
| 628 | creates on CloudFront and Vertex AI are cleaned up instead of leaked, and |
| 629 | a replaced ACM PCA certificate authority no longer keeps its old policy. |
| 630 | |
| 631 | The full list is in the |
| 632 | [CHANGELOG](https://github.com/alchemy-run/alchemy/blob/main/CHANGELOG.md#v200-beta82). |
| 633 | |
| 634 | ## Also in this release |
| 635 | |
| 636 | - **`QueueSink`** ([#1781](https://github.com/alchemy-run/alchemy/pull/1781)) |
| 637 | drains an Effect `Stream` into a Queue, in batches Cloudflare accepts. |
| 638 | - **Bind a Worker's own entrypoints** |
| 639 | ([#2115](https://github.com/alchemy-run/alchemy/pull/2115), |
| 640 | [#2161](https://github.com/alchemy-run/alchemy/pull/2161)) — |
| 641 | `Cloudflare.WorkerEntrypoint<Api>("Api")` without a Worker targets the |
| 642 | Worker that declares it, and Effect Workers call themselves through |
| 643 | `ctx.exports`. |
| 644 | - **R2 bucket locks** |
| 645 | ([#1984](https://github.com/alchemy-run/alchemy/pull/1984)) with |
| 646 | `locks` on `R2.Bucket`, and **`R2.S3Credentials` tokens are scoped to |
| 647 | their bucket** ([#1985](https://github.com/alchemy-run/alchemy/pull/1985)) |
| 648 | instead of every bucket in the account. Thanks |
| 649 | [0x0f0f0f](https://github.com/0x0f0f0f)! |
| 650 | - **AI crawler policies** on `BotManagement` |
| 651 | ([#1911](https://github.com/alchemy-run/alchemy/pull/1911)), |
| 652 | **`Ssl.CertificateTransparencyAlerting`** |
| 653 | ([#1913](https://github.com/alchemy-run/alchemy/pull/1913)), and email |
| 654 | sending events on Queues |
| 655 | ([#1914](https://github.com/alchemy-run/alchemy/pull/1914)). Thanks |
| 656 | [birbprophet](https://github.com/birbprophet)! |
| 657 | - **`MtlsCertificate.Fetch`** |
| 658 | ([#2051](https://github.com/alchemy-run/alchemy/pull/2051)) calls an |
| 659 | origin with a client certificate from an Effect Worker. Thanks |
| 660 | [TBIQ007](https://github.com/TBIQ007)! |
| 661 | - **Durable Object namespaces** support `jurisdiction` |
| 662 | ([#2007](https://github.com/alchemy-run/alchemy/pull/2007)) and `get`, |
| 663 | `idFromName`, `idFromString`, `newUniqueId` |
| 664 | ([#852](https://github.com/alchemy-run/alchemy/pull/852)). Thanks |
| 665 | [Makisuo](https://github.com/Makisuo) and |
| 666 | [Butch78](https://github.com/Butch78)! |
| 667 | - **Workers AI** reports billed neurons on finish parts |
| 668 | ([#1724](https://github.com/alchemy-run/alchemy/pull/1724)), and |
| 669 | streamed text, tool calls, and reasoning are fixed |
| 670 | ([#2064](https://github.com/alchemy-run/alchemy/pull/2064)). |
| 671 | - **DynamoDB HTTP bindings from Cloudflare Workers** |
| 672 | ([#1782](https://github.com/alchemy-run/alchemy/pull/1782)). |
| 673 | - **`logging.retention`** on Lambda Functions and ECS Tasks |
| 674 | ([#2042](https://github.com/alchemy-run/alchemy/pull/2042)) and an |
| 675 | opt-in `recoveryWindowInDays` on Secrets Manager secrets |
| 676 | ([#2053](https://github.com/alchemy-run/alchemy/pull/2053)). Thanks |
| 677 | [TBIQ007](https://github.com/TBIQ007)! |
| 678 | - **Lambda timeouts are traced** |
| 679 | ([#1494](https://github.com/alchemy-run/alchemy/pull/1494)) — the root |
| 680 | span ends and telemetry flushes `timeoutMargin` before the timeout. |
| 681 | - **`AWS.providers()` and `AWS.state()` use a provided `AWSEnvironment`** |
| 682 | ([#1933](https://github.com/alchemy-run/alchemy/pull/1933)). Thanks |
| 683 | [Bjorn Pagen](https://github.com/bjornpagen)! |
| 684 | - **GCP**: IAM service accounts, project services, and private GKE |
| 685 | ([#1995](https://github.com/alchemy-run/alchemy/pull/1995)), BigQuery |
| 686 | views and external tables |
| 687 | ([#2082](https://github.com/alchemy-run/alchemy/pull/2082)), and |
| 688 | in-place `databaseVersion` upgrades on Cloud SQL |
| 689 | ([#2029](https://github.com/alchemy-run/alchemy/pull/2029)). Thanks |
| 690 | [connyay](https://github.com/connyay) and |
| 691 | [bartek671](https://github.com/bartek671)! |
| 692 | - **PlanetScale `deletionProtection`** |
| 693 | ([#1861](https://github.com/alchemy-run/alchemy/pull/1861)) — thanks |
| 694 | [agcty](https://github.com/agcty)! — and an edited migration that |
| 695 | already ran now replaces a dev branch or fails on production |
| 696 | ([#1489](https://github.com/alchemy-run/alchemy/pull/1489)). |
| 697 | - **Docker** runtime options (`networkMode`, `capAdd`, `devices`) and |
| 698 | ordered `envFiles` |
| 699 | ([#1946](https://github.com/alchemy-run/alchemy/pull/1946), |
| 700 | [#1947](https://github.com/alchemy-run/alchemy/pull/1947)), Podman |
| 701 | ([#2095](https://github.com/alchemy-run/alchemy/pull/2095)), and |
| 702 | authenticated image builds |
| 703 | ([#1858](https://github.com/alchemy-run/alchemy/pull/1858)). Thanks |
| 704 | [bjorntechTobbe](https://github.com/bjorntechTobbe), |
| 705 | [armancharan](https://github.com/armancharan), and |
| 706 | [EthanShoeDev](https://github.com/EthanShoeDev)! |
| 707 | - **`Railway.Service` delete** only removes its own environment's |
| 708 | instance ([#2184](https://github.com/alchemy-run/alchemy/pull/2184)). |
| 709 | - **SvelteKit 3.0** |
| 710 | ([#2060](https://github.com/alchemy-run/alchemy/pull/2060)) and a faster |
| 711 | CLI with a simpler launcher |
| 712 | ([#2151](https://github.com/alchemy-run/alchemy/pull/2151)). Thanks |
| 713 | [BlankParticle](https://github.com/BlankParticle)! |
| 714 | - **`alchemy dev` on AWS** no longer hangs when Docker can't publish an |
| 715 | emulator port |
| 716 | ([#2215](https://github.com/alchemy-run/alchemy/pull/2215), |
| 717 | [#2217](https://github.com/alchemy-run/alchemy/pull/2217)). |
| 718 | |
| 719 | ## Where to go next |
| 720 | |
| 721 | - [Containers](/cloudflare/compute/containers) · [Container lifecycle](/cloudflare/compute/container-lifecycle) |
| 722 | - [K2](/cloudflare/messaging/k2) · [Pipelines](/cloudflare/data/pipelines) · [Iceberg tables](/cloudflare/data/iceberg-tables) |
| 723 | - [Hyperdrive private databases](/cloudflare/data/hyperdrive-private-database) · [Federated APIs](/cloudflare/networking/federated-apis) |
| 724 | - [Durable Objects](/cloudflare/compute/durable-objects) · [Workers](/cloudflare/compute/workers) · [Access](/cloudflare/security/access) |
| 725 | - [Kubernetes](/kubernetes) |
| 726 | - [Turso](/turso) · [AWS setup](/aws/setup) · [Drizzle on DSQL](/aws/data/drizzle-dsql) · [Neon roles](/neon/data/roles) |
| 727 | - [CHANGELOG](https://github.com/alchemy-run/alchemy/blob/main/CHANGELOG.md#v200-beta83) |
| 728 | - [Compare v2.0.0-beta.81 → v2.0.0-beta.83](https://github.com/alchemy-run/alchemy/compare/v2.0.0-beta.81...v2.0.0-beta.83) |