2.0.0-beta.88 - Alchemy AI and Formal Verification
beta.88 is 261 pull requests from 33 contributors: 91 features and 128 bug fixes.
Alchemy AI is a new package, @alchemy.run/ai. You write a piece of
agent work as prose that mentions its tools, models and Domain commands, and
it runs on Pi or OpenCode, hosted on Cloudflare, Rivet or Effect Cluster. A
tool may use only the bindings it binds while it is built.
Verify proves the rules of an Alchemy Domain model, or finds the
sequence of commands that breaks one. Domain also gains Domain.Decision
(one command decided across several aggregates), Domain.Sealed fields
with crypto-shredding, signed receipts, strongly consistent commands,
rewrites and compaction. DigitalOcean, Convex and 1Password are
new providers, and a StateEncryption Layer encrypts secrets in state
before any state store sees them.
Alchemy AI
Section titled “Alchemy AI”@alchemy.run/ai runs agent work on Alchemy. A process is prose that
says how to do a piece of work. Mentioning a tool, a model or another
process grants it to the process, and makes running the process require its
Layer (#3499,
#3661):
export class Research extends AI.Process<Research>()("Research", { description: "Answer one question about the code, with file paths.",})` Answer one question about the repository in your working directory. Search with ${AI.Grep} and open what looks relevant with ${AI.Read}. If the question is too broad, start a ${AI.Self} on ${Fast} for each part.` {}Yielding a process gives a client. A session is one running instance, reached by a key you choose:
const research = yield* Research;const session = research.get("parser");
const reply = yield* session.prompt("Where is the parser?");yield* session.send("Also check the tests.", { requestId: "c-812" });yield* session.steer("Only look in src."); // read by the running turnyield* session.interrupt;
// status first, then every item after `after`, then liveyield* session.events({ after: lastSeq }).pipe(Stream.runForEach(forward));Docs: What is Alchemy AI? · Processes · Processes that use processes · Tutorial.
A tool is a declaration and a Layer. It binds what it reaches where it is built:
export class SaveNote extends AI.Tool<SaveNote>()("save_note", { description: "Save a note under a key.", parameters: Schema.Struct({ key: Schema.String, text: Schema.String }), success: Schema.Struct({ saved: Schema.Boolean }),}) {}
export const SaveNoteLive = SaveNote.make( Effect.gen(function* () { const notes = yield* Cloudflare.KV.ReadWriteNamespace(Notes); return Effect.fn(function* ({ key, text }) { yield* notes.put(key, text).pipe(Effect.orDie); return { saved: true }; }); }),);AI.Bash, AI.Read, AI.Edit, AI.Write, AI.Grep and AI.Glob are
names only. A Layer says what each one is: the harness’s own tool, or yours.
An MCP server is a mention too, and stands for every tool it offers:
export class Docs extends AI.McpServer<Docs>()("docs") {}
export const DocsLive = Docs.layer( McpClient.layerHttp({ name: "my-agent", version: "1.0.0", protocol: McpProtocol.v2025_11_25, url: "https://docs.example.com/mcp", }).pipe(Layer.provide(FetchHttpClient.layer)),);Docs: Tools · Coding tools · MCP servers.
A tool uses only what it binds
Section titled “A tool uses only what it binds”At runtime a tool can use only the bindings it binds while it is built (#3820, #3752). A tool handed a client that was bound outside it fails on that call:
const LeakLive = Leak.make(({ key }) => notes.get(key));// CapabilityDenied: Tool leak used Cloudflare.KVNamespace.ReadWrite on// Cloudflare.KV.Namespace(Notes), which it does not bind where it is built.// Bind it where the tool is built.Core records this for any package. framed("Tool", "lookup")(build) from
alchemy/CapabilityGraph names a part of a runtime, and the recording is
compiled out of the deployed bundle.
The harness and the model are Layers
Section titled “The harness and the model are Layers”A process never says which coding agent runs it. That is one Layer, and moving from Pi Durable to OpenCode changes two lines:
export const Live = EngineerLive.pipe( Layer.provide( Layer.mergeAll(Pi.HarnessLive, Pi.CodingTools, AI.DefaultModel(Smart)), ), Layer.provide(Layer.mergeAll(PiCloudflare.DurableObjectStorage, SmartLive)), Layer.provide( Layer.mergeAll( OpenCode.HarnessLive, OpenCode.CodingTools, AI.DefaultModel(Smart), ), ), Layer.provide( Layer.mergeAll(OpenCodeCloudflare.DurableObjectStorage, SmartLive), ),);Both harnesses run inside the Durable Object that holds the session. OpenCode 2 runs on the object’s SQLite, so a sandbox is only where tools find files and a shell (#3620).
A model’s class is its name. The Layer picks the LLM behind it and says what it can take (#3844, #3855):
import * as AIAnthropic from "@alchemy.run/ai/Anthropic";import * as AICloudflare from "@alchemy.run/ai/Cloudflare";import * as AIOpenAI from "@alchemy.run/ai/OpenAI";
export class Smart extends AI.Model<Smart>()("smart") {}export class Fast extends AI.Model<Fast>()("fast") {}
export const SmartLive = AIAnthropic.Model(Smart, { model: "claude-opus-5-5", contextWindow: 200_000, images: true,});export const FastLive = AIOpenAI.Model(Fast, { model: "gpt-5.4-mini" });// or a model Cloudflare hosts, through an AI GatewayAICloudflare.Model(Fast, { model: "@cf/meta/llama-3.3-70b-instruct-fp8-fast", gateway: Gateway,});Sandboxes are a Layer per platform: @alchemy.run/ai/E2B, /Boat,
/Daytona, /Modal and /Archil.
import * as AIE2B from "@alchemy.run/ai/E2B";
export const Base = E2B.Template("Base", { image: "node:22-bookworm" });export const SandboxesLive = AIE2B.Sandboxes(Base, { timeout: 600 });Docs: Choose a harness · Pi · OpenCode · Models · Sandboxes.
Where sessions run
Section titled “Where sessions run”Give a process’s Layer to a host, and each session runs in an object of its own, with its own storage, alarm and sandbox. A run cut off by an eviction resumes from its wake alarm (#3771, #3835):
// Cloudflare: a Durable Object per sessionconst TriageSessions = AICloudflare.ProcessSessions( TriageLive.pipe(Layer.provide(Harness)),);
// Rivet (or AICluster.ProcessSessions on Effect Cluster)export default AIRivet.ProcessSessions( "Sessions", { main: import.meta.url, pool: Default }, TriageLive.pipe(Layer.provide(Harness)),);
// a testconst TriageInMemory = AI.layerInMemory(TriagePlayed);Docs: Where sessions run · Cloudflare · Rivet · Effect Cluster · In memory.
Processes and Domain models
Section titled “Processes and Domain models”A process mentions a model’s commands and views, and the mention becomes tools. What a session acts as is stored beside it and never shown to the model:
export class Dispute extends AI.Process<Dispute>()("Dispute", {}) {}
export const DisputeLive = Dispute.toLayer({ description: "Look into one disputed withdrawal and settle it.",})` Read the account with ${() => Bank.AccountSummary}, and what the customer wrote with ${ReadMessages}.
If the withdrawal was not theirs, send ${() => Bank.RefundWithdrawal} and ${() => Bank.FreezeAccount}. Otherwise send ${() => Bank.RejectDispute}.`;A model hands a session work from a policy, which holds the process’s client like any other service:
export const IssueWorkLive = IssueWork.toLayer( Effect.gen(function* () { const triage = yield* Triage; return ({ source, event }) => Match.valueTags(event, { IssueReported: () => triage .get(source.id) .send(started(source.id), { requestId: "start" }), IssueCommented: ({ body, commentId }) => triage.get(source.id).send(replied(body), { requestId: commentId }), }).pipe(Effect.orDie); }),);The prose mentions the model and the model’s policy imports the process, so
Model, Aggregate, View, Projection, Stream, Policy, Saga,
Query, Decision and Api now take their props directly or as a thunk.
examples/cloudflare-ai-issues is a GitHub issue board built this way.
Docs: Processes and Domain models · Connect a front end.
Code mode
Section titled “Code mode”Tools inside AI.CodeMode(...) are reached from a program the model writes,
against typed declarations of each tool. A Layer says how programs are
written and where they run
(#3620):
export class Settle extends AI.Process<Settle>()("Settle", { description: "Settle every account.",})` Work out the amounts and move the money by writing a program over ${AI.CodeMode(Add, Withdraw)}.` {}
// the model writes an Effect, run in an isolate of its ownconst CodeModeLive = AI.CodeModeEffect.pipe( Layer.provide(AICloudflare.EvalWorkerLoader()),);The model sees each tool as a typed function, with its failures as
Data.TaggedError classes, and writes a module:
export default Effect.gen(function* () { return yield* tools.withdraw({ account: "checking", amount: 500 }).pipe( Effect.catchTag("InsufficientFunds", (error) => Effect.succeed(error.balance), ), );});AI.CodeModeAsync has it write promises instead, and
AICloudflare.EvalQuickJS() runs programs on QuickJS for its step and
memory limits.
Docs: Code mode.
Alchemy Domain
Section titled “Alchemy Domain”Verify: prove a model’s rules
Section titled “Verify: prove a model’s rules”Write down what must always be true of a Domain model, and one test proves it or finds the sequence of commands that breaks it. Nobody writes a value to try (#3260).
Rules go on the declaration:
export class Account extends Domain.Aggregate("Account", { // ... invariants: { NeverOverdrawn: (account) => account._tag !== "Open" || account.balance >= 0, }, transitions: { AClosedAccountStaysClosed: ({ before, after }) => before._tag !== "Closed" || after._tag === "Closed", },}) {}
// src/Bank.model.tsexport class Bank extends Domain.Model("Bank", { // ... invariants: { NoTransferLeftPending: (bank) => bank.Transfer.every((transfer) => transfer.state._tag !== "Pending"), }, relations: { AClaimedNameBelongsToItsCustomer: Domain.Relation({ over: { customer: Customer, claim: UsernameClaim }, holds: ({ customer, claim }) => claim.state._tag !== "Claimed" || claim.state.customerId !== customer.id || (customer.state._tag === "Registered" && customer.state.username === claim.id), }), }, sometimes: { AnAccountHoldsMoney: (bank) => bank.Account.some( (account) => account.state._tag === "Open" && account.state.balance > 0, ), },}) {}One test verifies them:
import * as Verify from "@alchemy.run/domain/Verify";
const story = Story.make(Bank, { layer: BankHandlers, stub: [FraudCheck, Payments],});
it.effect("the bank keeps its promises", () => Verify.model(Bank, { apis: [CustomerApi, SupportApi], story, lock: "./Bank.lock.json", }).pipe(Effect.provide(NodeServices.layer)),);The report says how far each rule is known to hold. Prove reads decide,
evolve and the rules as logic and asks Z3 whether any state and input
break one. Explore runs every short sequence of commands through the Apis,
following policies, sagas, schedules, views and external systems, with each
event delivered twice and each saga step run twice:
Bank: 46 outcomes, 1 decision, 5 policies, 1 saga, 1 view, 1 projection
Proved: for every state and every input, after any number of commands ✓ Account.NeverOverdrawn ✓ Account.AClosedAccountStaysClosed ✓ RegisterCustomer.OnlyAFreeNameIsClaimed ✓ Bank.AClaimedNameBelongsToItsCustomer
Checked: in every sequence of up to 2 commands through CustomerApi, SupportApi20,138 sequences, 9,725 states ✓ Bank.TransfersLoseNoMoney ✓ Bank.NoTransferLeftPending
Sampled: 200 longer sequences, of up to 12 commands picked at random (seed 1) ✓ none breaks a rule
Agreed with the real code: inputs picked for each of 141 paths through thecommands did what the prover readA broken rule fails with the shortest sequence that breaks it. Here a policy takes a ticket’s id from an external system, so an event delivered twice issues two tickets:
✗ Tickets.OneTicketPerSeat breaks 1. Seat "A" BookSeat { id: "A" } → SeatBooked ↳ Issue asks Numbers.next → { number: "C" } ↳ Issue: Ticket "C" IssueTicket { seat: "A" } → TicketIssued ↳ Issue, handling its event again, asks Numbers.next → { number: "E" } ↳ Issue, again: Ticket "E" IssueTicket { seat: "A" } → TicketIssuedWhen a story can run the sequence, the report writes it as one to paste into a test.
It suggests the rule that’s missing
Section titled “It suggests the rule that’s missing”A proof starts from any state the rules allow, so it can fail from a state no sequence reaches. The report prints the invariant that rules that state out (#3560):
✓ NeverOverdrawn not proved: Capture { id: "" } breaks it from { balance: 0, reserved: 1 } No sequence that was run reaches that state, and none can. Every command keeps this, and with it the rule is proved. Add it: ReservedWithinBalance: (hold) => hold.reserved <= hold.balance,lock keeps each rule as written, so a rule can’t be quietly weakened:
Not done ✗ Account.NeverOverdrawn says less than the rule locked in Bank.lock.json: { _tag: "Open", balance: 0 } passes it now, and the locked rule refuses itHandlers are read as you write them
Section titled “Handlers are read as you write them”The prover reads ordinary handler code: loops, classes, try/catch,
effect/Match, Effect.fn with typed failures, Option, Result,
BigDecimal, HashMap, DateTime and Duration, Stream, and over 900
library functions in all. A rule about time is proved as written, and the clock in
decide is the command’s time
(#3659):
const TERM = Duration.days(30);
export class Lease extends Domain.Aggregate("Lease", { // ... transitions: { TheLeaseNeverShortens: ({ before, after }) => DateTime.isGreaterThanOrEqualTo(after.until, before.until), }, decide: { Renew: Effect.fn(function* (lease) { const now = yield* DateTime.now; if (DateTime.isLessThanOrEqualTo(lease.until, now)) { return yield* new Lapsed(); } return [ Renewed.make({ until: lease.until.pipe(DateTime.addDuration(TERM)) }), ]; }), },}) {}A handler that sleeps, races, sets a time limit or starts a fiber is proved for every duration an input can give. The prover hands the library the handler’s effects and lets it run them, on time that passes only when no fiber can run (#3743):
Send: Effect.fn(function* (_dispatch, command) { const won = yield* Effect.race( Effect.as(Effect.sleep(command.fast * 2), "fast"), Effect.as(Effect.sleep(command.slow * 2), "slow"), ).pipe(Effect.timeoutOption(command.limit * 2 + 1)); return [new Sent({ by: Option.getOrElse(won, () => "nobody") })];}),Code the prover doesn’t support is reported with its file, line and reason,
and never proved as if it were read. opaque names functions it shouldn’t
look inside, and packages names workspace packages it should
(#3638):
Verify.aggregate(Ticket, { opaque: [idOf], packages: ["@acme/rules"] });Every path the prover reads is also run on the real decide and evolve,
and a path it read wrongly fails the check. The Domain tutorial now verifies
the bank as it is built
(#3504).
Behind this: #3503, #3660, #3702, #3707, #3738, #3739 and #3742.
Docs: Verifying a model · What can be verified.
Decide one command across several aggregates
Section titled “Decide one command across several aggregates”Domain.Decision decides one command against several aggregate instances at
once. Every event commits, or none does
(#3420):
export class TransferMoney extends Domain.Command("TransferMoney", { input: { from: AccountId, to: AccountId, amount: Schema.Int }, events: [TransferSent, TransferReceived], rejects: [InsufficientFunds],}) {}
export class Transfer extends Domain.Decision(TransferMoney, { reads: { from: Account, to: Account }, keyOf: (cmd) => ({ from: cmd.from, to: cmd.to }), decide: ({ from, to }, cmd) => cmd.amount > from.state.balance ? new InsufficientFunds() : [ from.record(new TransferSent({ to: to.id, amount: cmd.amount })), to.record( new TransferReceived({ from: from.id, amount: cmd.amount }), ), ],}) {}
export class Bank extends Domain.Model("Bank", { aggregates: [Account], decisions: [Transfer],}) {}
const transfer = yield* Transfer;yield* transfer.send(new TransferMoney({ from, to, amount: 30 }));On Cloudflare, Rivet and Effect Cluster each instance has its own storage, so
a decision is a two-phase commit that the first instance it reads drives. No
timeout decides an outcome: if the driver stops, it wakes and runs the same
steps again from its storage. A decision states transitions of its own,
and Verify proves them.
Docs: Decision · Unique values.
Sealed fields and crypto-shredding
Section titled “Sealed fields and crypto-shredding”Domain.Sealed seals personal data under a key kept per subject. Deleting
the key erases the data everywhere, including the copies a rewrite can’t
reach: backups, archives and exports
(#3705).
// decide, evolve and views see { subject, box }, never the valueexport const Address = Domain.Sealed(Schema.String);
export class AddressSet extends Domain.Event("AddressSet", { address: Address,}) {}export class SetAddress extends Domain.Command("SetAddress", { input: { customerId: CustomerId, address: Address }, events: [AddressSet],}) {}A client names the subject, and the model seals the value when the command arrives, before it is stored or decided:
yield* bank.SetAddress({ customerId, address: Address.plain(customerId, "1 Main St"),});A query, policy or saga step opens a value, or shreds the subject’s key:
const vault = yield* Domain.Vault;// an Option: None once the key is shreddedconst address = yield* vault.open(Address, contact.address);// no event changes, no view folds againyield* vault.shred(customerId);Domain.VaultLive takes two Layers: where the keys are kept, and what wraps
them. Any store pairs with any wrap:
// Cloudflare: a Durable Object per subject, under a Secrets Store root keyDomain.VaultLive.pipe( Layer.provide( Layer.merge(Domain.HostKeyStore, DomainCloudflare.SecretKeyWrap(RootKey)), ),);
// AWS: DynamoDB, under KMSDomain.VaultLive.pipe( Layer.provide( Layer.merge( DomainAWS.DynamoKeyStore(Keys), DomainAWS.KmsKeyWrap(RootKey, { intermediateKey: { keep: "5 minutes" } }), ), ),);Also DomainCloudflare.D1KeyStore, DomainGCP.FirestoreKeyStore with
DomainGCP.KmsKeyWrap, and SqlKeyStore for Postgres. Stories run with a
test Vault and gain Story.shred(subject).
Docs: Crypto-shredding · Sealed value · Erasing personal data.
Signed receipts
Section titled “Signed receipts”A read that passes atLeast is now judged by validate on the state it
finds, and again after the write it waits for. So a command that grants
access lets the read right after it succeed
(#3814):
// AccountSummary.validate refuses anyone but the account's ownerconst receipt = yield* support.ChangeOwner({ accountId, customerId });yield* bank.AccountSummary.get(accountId, { atLeast: receipt }); // was NotOwnerA refused read must not wait on a receipt anyone could make up: how long the
wait took would say when a write reached a key the caller may not read. So
an Api with a ReceiptKey signs each command’s receipt, and a refused read
waits only for receipts it signed
(#3894):
// HMAC-SHA256 in the process, under an Alchemy.Random made at deployDomain.SecretReceiptKey("ReceiptKey");
// signing keys KMS wraps: one call per process per `keep`DomainAWS.KmsReceiptKey(AWS.KMS.Key("ReceiptRootKey"), { keep: "15 minutes" });
// signed inside KMS, the key never leaves it: one call per commandDomainAWS.KmsMacReceiptKey( AWS.KMS.Key("ReceiptMacKey", { keySpec: "HMAC_256", keyUsage: "GENERATE_VERIFY_MAC", }),);Without a ReceiptKey, receipts are unsigned and a refused read is refused
at once. DomainGCP.KmsReceiptKey and KmsMacReceiptKey do the same with
Cloud KMS, through the new GCP.KMS.MacSign and MacVerify bindings.
A refused read also looks the same for a key with history and one that was
never written, and clients get one generic defect instead of a handler’s
internals (#3414).
Thanks Taras Kornichuk!
Docs: View security: Read your own write.
Commands that wait for their views
Section titled “Commands that wait for their views”A command sent through an Api can answer once every view its events reach has applied them. Any read after the answer, by this client or another, includes the command (#3469):
yield* bank.DepositMoney( { accountId, amount: 500 }, { consistency: "strong" },);const summary = yield* bank.AccountSummary.get(accountId); // has the deposit
// or for a whole clientconst bank = yield* CustomerApi.clientHttp(url).pipe( Effect.provideService(Domain.DefaultConsistency, "strong"),);The wait is on the server, so it holds for RPC, plain HTTP, AI tools and
MCP. The default stays "eventual". Measured warm on Cloudflare with one
view, a command takes 55 ms at p50 eventual and 89 ms strong; with four
views, 63 ms and 370 ms.
Docs: Command: Choose when it answers.
Rewrites and compaction
Section titled “Rewrites and compaction”Domain.Rewrite changes the events an instance has already recorded, and
its state, views, projections and streams follow. Domain.Compaction
replaces a long history with a roll-up of its state
(#3652):
// keep, replace or remove each event of one instanceexport class ForgetOwner extends Domain.Rewrite("ForgetOwner", { of: Account, input: { customerId: CustomerId }, events: { AccountOpened: (event, { customerId }) => event.customerId === customerId ? new AccountOpened({ ...event, owner: "" }) : event, },}) {}
// remove the whole instanceexport class DeleteCustomer extends Domain.Rewrite("DeleteCustomer", { of: Customer, delete: true,}) {}
const receipt = yield* accounts.rewrite( accountId, new ForgetOwner({ customerId }),);yield* accounts.rewritten(receipt); // every view and projection caught upexport class BringForward extends Domain.Compaction("BringForward", { of: Wallet, rollup: (wallet) => [new WalletBroughtForward({ state: wallet })],}) {}
// the replaced events go wherever the Layer sends them, then are removedexport const BringForwardLive = BringForward.toLayer( Effect.gen(function* () { const archive = yield* Cloudflare.R2.WriteBucket(Archive); return Effect.fn(function* ({ stream, events }) { const key = `${stream}/${events[0]!.envelope.seq}.json`; yield* archive.put(key, JSON.stringify(events)).pipe(Effect.orDie); }); }).pipe(Effect.provide(Cloudflare.R2.WriteBucketBinding)), { after: { events: 1_000 } }, // each instance compacts itself);A rewrite that would break an invariant fails with InvariantBroken, and a
roll-up that doesn’t fold back to the instance’s state is refused with
CompactionLossy. Verify.model covers both.
Docs: Rewrite · Compaction · Closing the books · Correcting mistakes.
Import a history
Section titled “Import a history”import appends events that were already decided, for moving an aggregate’s
history in from another system. It runs evolve but not decide, views and
projections apply the events, and policies never react to them
(#3457,
#3571):
const receipt = yield* accounts.import( Account.ref(accountId), deposits.map((row) => ({ event: new MoneyDeposited(row), at: DateTime.makeUnsafe(row.createdAt), // keeps its original time })), { commandId: `import:${accountId}` },);yield* Ledger.caughtUp(receipt);Thanks Dallen Pyrah!
Live reads end when the session does
Section titled “Live reads end when the session does”A live read ends when its middleware’s verdict runs out, so an expired session stops receiving pushes (#3458). Thanks Dallen Pyrah!
// in the Session middlewareyield* Domain.setExpiry(session.value.expires);Views say which event they reflect
Section titled “Views say which event they reflect”A view’s snapshot and every frame of its watch say which event they
reflect (#3693):
const { state, position } = yield* bank.AccountSummary.snapshot(accountId);// position: { stream: "Account/a-1", seq: 7 }Docs: View.
A story provides a service per command
Section titled “A story provides a service per command”A story computes a service for each command (#3697). Thanks digicoder!
story( Story.provideWith(CurrentActor, ({ refs }) => Effect.succeed(customer(owners[refs[0]!.id]!)), ), Story.when(new WithdrawMoney({ accountId: "a-1", amount: 30 })), // as c-1 Story.when(new WithdrawMoney({ accountId: "a-2", amount: 30 })), // as c-2);Docs: Story.
Effect UI commands from a Domain Api
Section titled “Effect UI commands from a Domain Api”@alchemy.run/domain/EffectUI turns a Domain Api into
Effect UI commands, queries and subscriptions
(#3798). Thanks
Taras Kornichuk!
export const Bank = DomainEffectUI.make(CustomerApi, { commands: { WithdrawMoney: { consistency: "strong" } }, queries: { AccountLedger: { take: 20, key: (entry) => entry.id } },});Docs: Effect UI.
Old receipts and deliveries are pruned
Section titled “Old receipts and deliveries are pruned”Receipts, delivery marks and cancelled names are pruned once they’re old enough, on every host, so an instance’s storage stops growing with its traffic (#3221, #3712):
DomainCloudflare.layerDurableObjects({ // the defaults; "forever" keeps a kind of row retention: { receipts: "30 days", deliveries: "7 days", cancelled: "7 days" },});Cloudflare
Section titled “Cloudflare”TCP Workers
Section titled “TCP Workers”A Worker can accept inbound TCP, from Spectrum or from another Worker.
Return a connect handler
(#3587):
export default class Echo extends Cloudflare.Worker<Echo>()( "Echo", { main: import.meta.url }, Effect.gen(function* () { return { connect: (socket) => Effect.gen(function* () { const { pull } = yield* socket.reader; const writer = yield* socket.writer; while (true) { for (const chunk of yield* pull) yield* writer.write(chunk); } }).pipe(Effect.catch(() => Effect.void)), }; }),) {}
// on a public portyield* Cloudflare.Spectrum.Application("EchoTcp", { zoneId: zone.zoneId, dns: { type: "CNAME", name: "tcp.example.com" }, protocol: "tcp/9000", trafficType: "worker", originWorkerId: echo.workerId,});
// from another Worker, over a service bindingconst echo = yield* Cloudflare.Workers.Connect(Echo);const socket = yield* echo("echo.internal:7");Docs: TCP.
Lambda Managed Instances and GPUs
Section titled “Lambda Managed Instances and GPUs”Lambda functions run on Lambda Managed Instances, including GPU-accelerated container functions (#3588):
const gpus = yield* AWS.Lambda.CapacityProvider("Gpus", { subnetIds: [subnet.subnetId], securityGroupIds: [securityGroup.groupId], allowedInstanceTypes: ["g6.xlarge", "g5.xlarge", "g4dn.xlarge"], maxVCpuCount: 16,});
const infer = yield* AWS.Lambda.Function("Infer", { image: { context: "./model", dockerfile: "Dockerfile" }, architecture: "x86_64", capacityProvider: gpus, acceleratorMemorySize: 16, memorySize: 8192, minExecutionEnvironments: 0, // scale to zero when idle maxExecutionEnvironments: 4,});Customer-managed runtimes
Section titled “Customer-managed runtimes”Build a Lambda runtime from a container image, roll it out through an
alias, and run functions on it. It runs on floci under alchemy dev too
(#3664,
#3668):
const runtime = yield* AWS.Lambda.Runtime("Node", { description: "Node.js 24 with the company CA bundle",});const v1 = yield* AWS.Lambda.RuntimeVersion("NodeV1", { runtime, context: "./runtime",});const prod = yield* AWS.Lambda.RuntimeAlias("NodeProd", { version: v1, name: "prod",});
yield* AWS.Lambda.Function("Api", { main: import.meta.url, runtime: prod });AWS.Lambda.ResourcePolicy shares a runtime with other accounts, and a
function there uses it through AWS.Lambda.RuntimeAlias.lookup. Functions
also take the nodejs26.x runtime
(#3710).
AWS CLI profiles
Section titled “AWS CLI profiles”alchemy profile edit offers one “AWS CLI profile” entry that reads what
kind of profile it is: assumed roles, credential_process, web identity,
static keys, SSO or aws login
(#3356). Thanks
Jason Kuhrt and
Rahul Mishra!
alchemy profile edit --no-input --add AWS --method aws-profile \ --set awsProfile=sandboxOnly the profile name and account ID are saved. Credentials resolve on each command.
Sovereign and partitioned regions
Section titled “Sovereign and partitioned regions”@alchemy.run/aws derives the ARN partition, endpoint DNS suffix and
global-service region from the stack’s region, so stacks deploy to the AWS
European Sovereign Cloud, aws-cn and aws-us-gov. Websites with a custom
domain work there too
(#2895,
#3914). Thanks
gegi!
// in a lifecycle operationconst { accountId, region, partition } = yield* AWSEnvironment.current;
partitionOf("eusc-de-east-1"); // "aws-eusc"dnsSuffixOf("eusc-de-east-1"); // "amazonaws.eu"In the aws partition every ARN and host is unchanged.
Write rows into S3 Tables
Section titled “Write rows into S3 Tables”S3 Tables gains bindings that write rows straight into an Iceberg table, and Storage Lens for Tables (#3905, #3918):
const putRows = yield* AWS.S3Tables.PutRows(table);
const { acceptedRows } = yield* putRows({ payloadFormat: "JSON", // newline-delimited JSON, or one Avro file payload: new TextEncoder().encode( events.map((event) => JSON.stringify(event)).join("\n"), ),});
yield* AWS.S3Tables.StorageLensConfiguration("Lens", { include: { tableBuckets: [bucket.tableBucketArn] },});Glue business glossary
Section titled “Glue business glossary”Glue’s business glossary is two resources and seven bindings (#3911):
const glossary = yield* AWS.Glue.Glossary("Bank", { description: "What the bank's words mean.",});yield* AWS.Glue.GlossaryTerm("Overdrawn", { glossary: glossary.glossaryId, shortDescription: "An account whose balance is below zero.",});SQS FIFO batches of 10,000 messages
Section titled “SQS FIFO batches of 10,000 messages”An SQS FIFO consumer takes batches of up to 10,000 messages in provisioned mode (#3632):
yield* SQS.consumeQueueMessages( queue, { batchSize: 10_000, maximumBatchingWindow: "5 seconds", provisionedPollerConfig: { MinimumPollers: 2, MaximumPollers: 10 }, }, handler,);Every AWS service runs on floci
Section titled “Every AWS service runs on floci”Every AWS service has a floci provider, and its live suite passes on floci,
so alchemy dev emulates all of them
(#3208). alchemy dev
also forwards FLOCI_* settings to the emulator. With mock mode on, EC2
instances and RDS databases exist only as API state
(#3916):
FLOCI_SERVICES_EC2_MOCK=true FLOCI_SERVICES_RDS_MOCK=true alchemy devDocs: AWS local development · Lambda.
New providers
Section titled “New providers”DigitalOcean
Section titled “DigitalOcean”@alchemy.run/digitalocean covers DigitalOcean end to end. An App is an
Effect runtime: Alchemy bundles the program, builds an image, pushes it to
the team’s registry and deploys it on App Platform
(#2034,
#3229). Thanks
Ricardo for the first resources!
export default class Api extends DigitalOcean.App<Api>()( "Api", { main: import.meta.url, region: "nyc" }, Effect.gen(function* () { const putObject = yield* DigitalOcean.Spaces.PutObject(Uploads); const conn = yield* DigitalOcean.Databases.Connect(AppDb); yield* DigitalOcean.cron("0 3 * * *", () => putObject({ Key: "nightly.txt", Body: new Date().toISOString() }), ); return { fetch: Effect.gen(function* () { const uri = yield* conn.connectionString; // Redacted<string> return HttpServerResponse.text("ok"); }), }; }).pipe( Effect.provide( Layer.mergeAll( DigitalOcean.Spaces.PutObjectHttp, DigitalOcean.Databases.ConnectHttp, DigitalOcean.CronLive, ), ), ),) {}Managed databases run migrations on every deploy:
const pg = yield* DigitalOcean.Databases.Cluster("db", { engine: "pg", size: "db-s-1vcpu-1gb", region: "nyc3",});const app = yield* DigitalOcean.Databases.Database("app", { clusterId: pg.clusterId, migrations: "./migrations",});The package also has Functions, 14 website frameworks, Droplets, VPCs and load balancers, Kubernetes, Spaces, MicroVM sandboxes, GenAI agents and knowledge bases, Serverless and Dedicated Inference, monitoring and DNS.
Docs: DigitalOcean · What is DigitalOcean? · App Platform · Managed databases.
Convex
Section titled “Convex”@alchemy.run/convex deploys Convex Cloud projects and deployments, and a
self-hosted Convex backend on AWS
(#2925). Thanks
Christian Stamati!
const project = yield* Convex.Project("Project");const deployment = yield* Convex.Deployment("Backend", { project, type: "preview",});yield* Convex.Functions("Functions", { deployment, rootDir: "." });Convex functions can be written with Effect: a declaration holds the path and schemas, a Layer holds the code, and callers pass the declaration (#3563):
import * as Convex from "@alchemy.run/convex/Server";
export class AddMessage extends Convex.Mutation<AddMessage>()("messages:add", { args: Schema.Struct({ channel: Schema.String, body: Schema.String }), returns: Messages.Id, error: EmptyChannel,}) {}
export const AddMessageLive = Layer.effect( AddMessage, Effect.gen(function* () { return Effect.fn(function* ({ channel, body }) { if (channel === "") return yield* new EmptyChannel({ body }); return yield* Messages.insert({ channel, body, sentAt: new Date() }); }); }),);
// from a Worker or Lambdaconst run = yield* Convex.RunMutation(Backend);const id = yield* run(AddMessage, { channel: "general", body: "hi" });A query that inserts doesn’t type-check, and an action’s Layer can take
Alchemy bindings such as AWS.SQS.SendMessage.
Docs: Convex · What is Convex? · Queries, mutations and actions.
1Password and Infisical
Section titled “1Password and Infisical”@alchemy.run/1password loads secrets from 1Password into a stack’s Effect
Config: a whole Environment, chosen vault fields, or both
(#2749). Thanks
Max Newcomer!
export default Alchemy.Stack( "MyApp", { providers: Layer.empty, state: Alchemy.localState(), secrets: [ OnePassword.Environment(({ stage }) => ({ environmentId: stage === "prod" ? "production-id" : "development-id", })), OnePassword.SecretReferences({ references: { STRIPE_KEY: "op://Billing/Stripe/credential" }, }), ], }, Effect.gen(function* () { const stripeKey = yield* Config.Redacted("STRIPE_KEY"); return {}; }),);@alchemy.run/infisical gains two resources: Infisical.ProjectIdentity, a
machine identity a CI job logs in as with its OIDC token, and
Infisical.Secret, a shared row a stack writes
(#3082). Thanks
Jason Kuhrt!
yield* Infisical.Secret("IngestToken", { project: "6f1c…", environment: "dev", name: "AXIOM_INGEST_TOKEN", value: token.token,});Effect Cluster: HTTPS gateways, your own VPC, shared databases
Section titled “Effect Cluster: HTTPS gateways, your own VPC, shared databases”An AWS pool’s gateway no longer has to be a public load balancer on plain HTTP, and the cluster can run in a VPC you own (#3722):
// HTTPS on your domainClusterAWS.EcsPool("Default", { gateway: ClusterAWS.LoadBalancerGateway({ domain: "cluster.example.com" }),});
// HTTPS without a domain: CloudFront → VPC origin → internal load balancerClusterAWS.EcsPool("Default", { gateway: ClusterAWS.CloudFrontGateway() });
// only callers in the VPCClusterAWS.EcsPool("Default", { gateway: ClusterAWS.LoadBalancerGateway({ scheme: "internal" }),});
const vpc = EC2.Vpc.lookup({ name: "shared" });export const Database = ClusterAWS.Database("Cluster", { network: { vpcId: vpc.vpcId, subnetIds: [a.subnetId, b.subnetId], cidrBlock: vpc.cidrBlock, assignPublicIp: false, },});Every pool accepts Cluster.Database.fromUrl
(#3446), and a runner
opens one Domain storage pool however many models it hosts, sized with
databaseConnections
(#3422). Thanks
digicoder!
export const Default = ClusterKubernetes.DeploymentPool("Default", { replicas: 2, databaseConnections: 4, // default: the Postgres client's 10}).pipe(Layer.provide(Database));Docs: Effect Cluster on AWS · Databases.
Effect UI websites
Section titled “Effect UI websites”Website.EffectUI deploys Effect UI apps on
Cloudflare, AWS, GCP, Fly, Hetzner, Railway, DigitalOcean, Neon and Prisma.
The rendering mode comes from the app’s own Vite plugin
(#3834):
const site = yield* Cloudflare.Website.EffectUI("Website");const web = yield* AWS.Website.EffectUI("Web", { output: "server" });On Cloudflare the generated server becomes the Worker and renders in
workerd, in alchemy dev too.
Docs: Effect UI on Cloudflare.
Containers run on Node.js 26 by default
Section titled “Containers run on Node.js 26 by default”Bundled container programs (main) now run on Node.js 26 instead of Bun,
and every resource that runs one takes a runtime that picks Node.js or Bun
and its version
(#3558). Thanks
Tadas Varanauskas! That covers:
- AWS:
ECS.TaskandECS.Service - GCP:
Run.Service,Run.JobandRun.WorkerPool - Kubernetes:
DeploymentandJob, on EKS and GKE too - Cloudflare:
Container - Docker:
Service - E2B:
Template - Modal:
Function,ServerandSandbox
// node:26-slimyield* AWS.ECS.Task("Api", { main: import.meta.url });
// node:24-slimyield* GCP.Run.Service("Legacy", { main: import.meta.url, runtime: "node24" });
// oven/bun:1.3, the newest 1.3.xyield* Kubernetes.Deployment("Worker", { main: import.meta.url, runtime: "bun1.3",});A program that uses Bun APIs (Bun.serve, bun:sqlite) keeps working with
runtime: "bun", which builds the same image as before.
Encrypt secrets in state with a StateEncryption Layer
Section titled “Encrypt secrets in state with a StateEncryption Layer”Provide a StateEncryption Layer to a state store and every Redacted
value is encrypted before the store sees it. Only the secrets are
ciphertext, so plans, diffs and alchemy state still read the rest of a
record. A store without one writes secrets in plaintext, as before, except
the AWS stores, which encrypt with their own KMS key
(#3167):
// AWS stores encrypt by default, with alias/alchemy-statestate: AWS.state();
// any store, with the key in AWS KMSstate: Cloudflare.state().pipe(Layer.provide(AWS.stateEncryption()));state: postgresState({ url }).pipe(Layer.provide(AWS.stateEncryption()));
// no key service: ALCHEMY_STATE_PASSPHRASEstate: Cloudflare.state().pipe(Layer.provide(passphraseEncryption()));A stage converts as it loads. The AWS stores create their KMS key on the first run outside CI, and move an existing table and buckets to SSE-KMS under it. In CI a missing key fails the deploy until you run the bootstrap once:
alchemy state bootstrap --backend awsCI roles need kms:GenerateDataKey, kms:Decrypt and kms:DescribeKey on
the key. The KMS encryption context is the stack and stage, so an IAM policy
can grant decrypt for one stage only. To go back to an older version, first
deploy every stage with AWS.stateEncryption({ disable: true }).
Two more changes keep secrets off the screen. A plan no longer prints the
previous plaintext of a prop that became secret
(#3482), and
alchemy state read masks secrets unless you pass --reveal
(#3829). Thanks
Isak Wang Gustavsen and
Rahul Mishra!
# alchemy plan, before- API_KEY: example-value+ API_KEY: (redacted)
# now- API_KEY: (hidden)+ API_KEY: (redacted)Docs: State store: Encrypting secrets ·
alchemy state.
Secret env values stay out of host configuration
Section titled “Secret env values stay out of host configuration”A Redacted env value, from the env prop or bound by a capability, no
longer sits in plain text where anyone who can describe the host can read
it. Your code doesn’t change:
export default class Api extends Lambda.Function<Api>()( "Api", { main: import.meta.url, env: { STRIPE_KEY: Redacted.make("sk_live_…") } }, Effect.gen(function* () { const key = yield* Config.Redacted("STRIPE_KEY"); return { fetch: handle(key) }; }),) {}// aws lambda get-function-configuration → Environment.Variables"STRIPE_KEY": "sk_live_…","ALCHEMY_SECRET_ENV": "/alchemy/lambda/<function>:3",| Host | Secrets now live in |
|---|---|
| Lambda Functions and Web Functions | one SSM SecureString parameter per function (#3741, #3744) |
Cloud Run, Cloud Functions, GCP.Website.* |
Secret Manager, as a pinned secretKeyRef (#3765) |
Kubernetes.Deployment and Job |
the workload’s own Secret (#3581) |
| Effect Cluster on ECS and Compute Engine | Secrets Manager and Secret Manager (#3618, #3766) |
| Rivet pools and control planes | each host’s secret store: Fly App secrets, Secrets Manager, Secret Manager, Kubernetes Secrets (#3582, #3586, #3604) |
Each reference is pinned to a version, so a new secret rolls the host. Thanks Jeremie Dayan for the GCP hosts!
Every host also writes env through one helper now, so process.env and
Config read the same string everywhere. A secret used to deploy as the
literal "<redacted>" on ECS, App Runner, Batch, EC2 and Hetzner
(#3523,
#3518):
env: { NAME: "it's", // "it's" PEM: "line1\nline2", // "line1\nline2" PORT: 3000, // "3000" OPTS: { region: "eu" }, // '{"region":"eu"}' TOKEN: Redacted.make("s3cret"), // "s3cret" BUILD_ID: "12345678901.12345678901234", // was rounded at runtime}Thanks Rahul Mishra!
Callbacks on any backend, once or on a schedule
Section titled “Callbacks on any backend, once or on a schedule”Alchemy.makeCallback is one contract, Alchemy.Callbacks, with a Layer
per backend. Leaving the Layer out is a type error
(#3215):
const onExpire = yield* Alchemy.makeCallback( "expire", Effect.fn(function* ({ orderId }: { orderId: string }) { yield* expireOrder(orderId).pipe(Effect.orDie); }),);
yield* onExpire.schedule(orderId, { after: "1 hour", payload: { orderId } });yield* onExpire.cancel(orderId);// a Lambda Function: one-time EventBridge Scheduler schedules}).pipe( Effect.provide( AWS.Scheduler.SchedulerCallbacks({ deadLetterQueue: AWS.SQS.Queue("FailedCallbacks"), }), ),);
// a Durable Object: its own SQLite and alarm}).pipe(Effect.provide(Cloudflare.DurableObjectCallbacks));
// a Rivet Durable Object}).pipe(Effect.provide(Rivet.DurableObjectCallbacks));A job can repeat with every or cron. A failed run is retried until it
succeeds, and only then does the job move to its next run
(#3580,
#3285). Thanks
Manoel Neto for the Rivet Layer!
yield* sweep.schedule("expired", { every: "10 seconds", payload: undefined });yield* report.schedule("daily", { cron: "0 9 * * *", timeZone: "Europe/London", payload: undefined,});On AWS, Scheduler.CreateSchedule binds to the Queue or Function a schedule
delivers to, and declares the role Scheduler assumes:
// a Lambda Functionconst role = yield* AWS.IAM.Role("SchedulerRole", roleProps);const schedule = yield* AWS.Scheduler.CreateSchedule(role, group);const schedule = yield* AWS.Scheduler.CreateSchedule(queue, { group });
yield* schedule({ Name: "reminder", ScheduleExpression: "at(2026-01-01T00:00:00)", Target: { Arn: queueArn, Input }, Target: { Input },});Thanks Dallen Pyrah for most of this!
Host Durable Objects in any process
Section titled “Host Durable Objects in any process”A process Alchemy didn’t build, such as an existing server or a test, can host Rivet Durable Objects as a node of a pool and call any class’s instances (#3396):
import * as RivetNode from "@alchemy.run/rivet/Node";
export const main = Effect.gen(function* () { // joins the pool as a node and hosts Room here until interrupted yield* RivetNode.serve([Room]).pipe(Effect.forkScoped);
const rooms = yield* RivetNode.connect(Room); yield* rooms.getByName("lobby").join();}).pipe(Effect.scoped);Keys, sleep and timeouts
Section titled “Keys, sleep and timeouts”Durable Objects are addressed by a key with several parts, can be put to sleep or destroyed, and set their own timeouts. An alarm whose node dies while its handler runs now runs again (#3455, #3464):
export default class Room extends Rivet.DurableObject<Room>()( "Room", { main: import.meta.url, sleepTimeout: "1 minute" }, Effect.gen(function* () { return Effect.gen(function* () { const state = yield* Rivet.DurableObjectState; return { whoAmI: () => Effect.succeed(state.key), // ["acme", "lobby"] rest: () => state.sleep(), // storage kept close: () => state.destroy(), // storage gone onSleep: () => Effect.log("room going to sleep"), }; }); }).pipe(Effect.provide(Default)),) {}
const lobby = rooms.getByKey(["acme", "lobby"]);Prebuilt images
Section titled “Prebuilt images”A Durable Object can be a prebuilt image that every node runs unchanged (#3332):
export const Actors = Rivet.DurableObject("Actors", { image: "us-docker.pkg.dev/acme/app/actors@sha256:…",}).pipe(Effect.provide(Default));Effect workflows
Section titled “Effect workflows”Effect workflows run on Rivet with Rivet.layerWorkflowEngine, which passes
the shared Workflows conformance suite
(#3594):
export const WorkflowsLive = Workflows.layer(SendWelcome, handler).pipe( Layer.provideMerge( Rivet.layerWorkflowEngine({ name: "Workflows", main: import.meta.url, handler: "WorkflowsLive", pool: Default, }), ),);agentOS sandboxes
Section titled “agentOS sandboxes”agentOS VMs are sandboxes with the same handle as every other sandbox provider (#3603):
const base = yield* Rivet.SandboxTemplate("Agent", { software: [Registry.Git, Registry.Ripgrep, Registry.Jq],});const sandboxes = yield* Rivet.CreateSandbox(base);
// one VM per key: created on first use, the same VM afterconst sandbox = sandboxes.getOrCreate("task-42");const result = yield* sandbox.exec(["sh", "-c", "jq '.a + 1' data.json"]);Pools and the control plane
Section titled “Pools and the control plane”Pools take a node version so a deploy drains actors off older nodes, run
the RivetKit release your program resolves on engine 3.1.1, and on GCP
restart nodes one at a time and take secrets and a private network
(#3584,
#3575,
#3456):
export const Default = RivetGCP.ComputeEnginePool("Default", { replicas: 3, version: 42, // raise it per deploy drainOnVersionUpgrade: true, secrets: { DATABASE_URL: "projects/acme/secrets/database-url/versions/3" },}).pipe(Layer.provide(Cluster));Rivet.ControlPlane takes a private nodeEndpoint and the network it’s
on, and pools on that network connect to it
(#3724).
GCP.SecretManager.Secret takes a deploy-time value, and Fly.Secret
reports the App’s secrets version for Fly.Machine’s minSecretsVersion.
Docs: Rivet sandboxes · Pools · Secrets.
alchemy drift exits 3 when an interrupted deploy left a resource it
couldn’t compare, so a scheduled job no longer reads “clean” for a resource
it never checked (#3561):
alchemy drift --stage prod# 0 in sync · 1 the check failed · 2 drifted · 3 a resource left uncheckedALCHEMY_DIR moves the project’s .alchemy directory
(#3438):
ALCHEMY_DIR=.alchemy-ci alchemy deployAlso: recursive state read fetches entries concurrently, 25× faster at 512
entries (#3419), piped
output is flushed before exit
(#3436), child-process
output no longer gains blank lines from a split CRLF
(#2299), and
SIGKILLing alchemy dev stops workerd and the sidecar
(#3821). Thanks
Rahul Mishra,
Yuzu and
Ibrahim Elkamali!
Docs: alchemy drift.
128 bug fixes
Section titled “128 bug fixes”Engine and core
Section titled “Engine and core”- A plan with two resources whose props yield each other fails with
DeclarationCycleError, naming the cycle, instead of hanging (#3428). Thanks Zach Bimson! - Destroy keeps binding edges between separate cycles, so a resource is no longer deleted while another still binds it (#3159). Thanks Ibrahim Elkamali!
Output.mapEffectruns its effect once per deploy for each input, however many Outputs derive from it (#3645). Before, an Effect Cluster pool bundled its program six times at once and failed about half its redeploys (#3621).Command.Buildhashes a single-file output by its contents, so a changed artifact no longer plans a no-op (#3157). Thanks Ibrahim Elkamali!- A bundle hashes the same wherever the checkout and the package store sit, so a Worker built in another CI job no longer deploys again (#3535). Thanks Yannic Charlon!
anyandunknownno longer erase typed Effect errors: about 1,000 sites now carry their real error types, and a lint rule keeps it that way (#3222).alchemy/Runtime/Bootstraploads under Node, which@alchemy.run/domain/Rivetand/EffectClusterneed (#3532). Thanks Mikkel!ALCHEMY_DEVreadstrueinTest.make({ dev: true })stacks (#3328), and a plainitwhose body returns an Effect fails instead of passing without running it (#3616).- Interrupting a command mid-refresh no longer loses the rotated OAuth refresh token, which used to cost a browser login (#3827).
- OAuth token parameters stay redacted in telemetry spans, local state files are
0600, and the Vite dev module server reads only what Vite’s own file policy allows (#3829). - A workflow run whose compensation dies stores the defect and reads as
Diedinstead ofRunningforever.Workflows.OnResultis called each time the Durable Object engine stores a result (#3599). undefinedRPC arguments stayundefinedacross Rivet, Effect Cluster and Railway transports, which a Domain backfill’s first listing depends on (#3382, #3637). Thanks digicoder!
Cloudflare
Section titled “Cloudflare”- A Container that leaves
instancesout keeps the count Cloudflare is running, and a scaling change no longer rolls out an unchanged configuration (#3095). Thanks Yannic Charlon! - A Worker ↔ Container cycle deploys on a fresh stage for accounts that require a Durable Object binding on a default application (#3265). Thanks Doga Genc!
- Two Containers built from one
contexteach publish to their own repository (#3655). - A deploy that would declare more than 100
exportsfails before anything is uploaded (#2979), and adopting a Worker with no Durable Objects into one that has them no longer hangs in precreate (#3592). - Spans and logs from Durable Object fibers that run outside an event reach the bound OTLP destinations (#3268).
- The state store recovers after the account’s workers.dev subdomain is renamed, instead of hanging at “Loading stack state” (#3666).
R2.S3Credentialsworks on a website’senv(#3625), and a previews-only Worker stops reporting drift on its URLs (#3730).- A server-shaped
Fetcher.fetchsurfaces a rejected native fetch asHttpServerError(#3435), and Worker assets are hashed concurrently, 9.8× faster on 1,500 files (#3442). Thanks Yuzu! - Framework websites share one Worker source:
memo.workspacesworks on every framework, a deleted workspace rebuilds instead of failing the plan, root.env*files are hashed, andenvvalues likeWorker.URLreach the build (#3250). A client-onlyWebsite.Foldkitserves deep links in dev (#3225). - Under
alchemy dev, a local Worker’sCloudflare.emailsubscription no longer creates live Email Routing rules on the zone (#1375). Thanks Michael K! - Local dev:
vite previewon a large build starts in about 1 s instead of 54 s (#3462),getPlatformProxy()disposes RPC results (#3483), and loopback ports passed to a container’sstart()are forwarded on Linux (#3323). Thanks Isak Wang Gustavsen and Robbert Van Cauteren! @alchemy.run/cloudflaredeclares@cloudflare/workers-typesas a peer, so strict pnpm installs resolve its types (#3880). Thanks Jason Kuhrt!- SCIM, TSIG, API token and observability destination secrets that the SDK now returns as
Redactedare no longer wrapped twice (#3642, #3644, #3647), and API tokens can name the newest permission groups (#3882).
Alchemy Domain
Section titled “Alchemy Domain”- An Effect Cluster runner frozen past its shard lock no longer commits over another runner’s command (#3711).
- Durable Object drains run only as their callbacks, in passes of at most 5 s, so queued work is no longer dropped when an object receives no further events (#3762). A drain that finds a dead drain’s lease looks again when it ends (#3220), and resending a command delivers what its first commit left staged (#3609). Thanks Qcho and Taras Kornichuk!
- A policy chain runs any number of aggregate → policy → aggregate hops. It used to stall after about 8 (#3656).
- The first command to a new instance no longer waits 2–3 s for the backfill directory (#3373), the first Domain call in an isolate no longer waits for the runs it starts (#3614), and a new projection’s first read no longer waits 5 s for a poll (#3748). Thanks Riordan!
- A projection key’s cost per delivery no longer grows with its sources: 2 ms at a million sources, where 21,000 took 66 ms (#3716). A projection batch that merges flows names every flow in its span (#3759). Thanks Qcho!
- A rebuilt projection keeps appending to its stream instead of dropping entries (#3579), and
caughtUpwaits for projections fed by a view (#3380). - A model whose schemas have no JSON form fails its Layer build instead of failing on the first value in production (#2814). Thanks Taras Kornichuk!
Event.makeandRejection.makeare typed as the class they’re called on, sodecidecan return them (#3357). Thanks Maguire Krist!- A Story no longer hangs on a run that waits on several things at once (#3253), and
InMemory’sdrainwaits for every run (#3667). AnInMemorytimer that wakes early is re-armed (#3376). Thanks Taras Kornichuk and Stvya! - On Effect Cluster, a saga step that runs again sends the same commands (#3252), a deploy’s new runs begin once a runner joins (#3424), and live reads work on the Durable Object pool (#3600, #3573, #3612).
- Commits on a Rivet-hosted model no longer deadlock for 30 s (#3415), and a call cut off by its actor stopping answers a retryable 503 instead of a result (#3576).
- A command scheduled and run on beta.85 doesn’t run again after an upgrade (#3601), and a scheduled command that ran stays
AlreadyExecutedafter its receipt is pruned (#3689). - The first deploy after
alchemy destroyno longer fails its backfill withInstanceNotFound(#3379), a Worker yielded twice still exports its models’ classes (#3865), and the migration Workflow follows the model’s jurisdiction (#3891).
- An Effect-native ECS
TaskorServiceredeploys when only its program, or a module it imports, changes (#3567). Thanks William Blazer! AssetDeploymentaccepts*infileOptionsglobs, and re-uploads files whose headers changed (#2968, #2994). Thanks Altay!- The server SQS consumer on ECS and EC2 caps each receive at 10 messages and 20 s, where a Lambda-sized setting killed its loop (#3632, #3633).
- A
CloudFront.Distributionupdate that adds a custom origin no longer fails withIllegalUpdate(#3834), and IoT SiteWise bindings send whole epoch seconds again (#3869).
Everything else
Section titled “Everything else”- A
Docker.Servicerolls onto an image rebuilt under the same tag, rolls onto a change in a module its program imports, and reports a published port Swarm assigns (#3559, #3639, #3640). - An unchanged Kubernetes
contextimage source plans a no-op (#3760). - GCP requests that carry the same name in the URL and the body send both values, which fixes Firebase Rules releases, license assignments and Dataplex glossaries (#3630), and IAM grants, Datastore bindings and
AddSecretVersionsend the flattened bodies the API reads (#3591). Thanks Michael K! - Railway: a context that is a pnpm workspace no longer runs out of memory during plan (#3501),
startCommand: nullclears a start command (#3533), a Rivet engine Railway is still starting is waited for (#3619), and variables the SDK returns asRedactedare read (#3803). Thanks Mikkel! Axiom.Datasetdeploys with a token that can’t read datasets (#3824), and PlanetScale no longer treats a403on a role as a deleted role (#3443).- A missing profile for an SDK whose credentials can’t fail at build is reported as
CredentialsRequired(#3665, #3793), and secrets the Infisical, GitHub, STS, Daytona, Convex, Turso, Modal, GCP and Stripe SDKs now return asRedactedare handled (#3643, #3648, #3670, #3804, #3339). @alchemy.run/sqldeclares@types/pgas an optional peer (#3481). Thanks Alex!- Commit builds of
@alchemy.run/ai,pi,opencodeandtestare published as preview packages, and preview publishes retry transient failures (#3952, #3677). - The GitHub Action checks out again: a dangling editor symlink is gone from the source archive (#3447).
npx skills add alchemy-run/alchemy --skill alchemy-domaininstalls the skill files again, andalchemy-aiwith it (#3819, #3823). Thanks Yuzu and benknab!
Also in this release
Section titled “Also in this release”Alchemy Domain
- Each Domain model lives in one Durable Object class, and a Worker can bind classes it keeps only while their objects move (#3049).
test/Domaintype fixtures pinexactOptionalPropertyTypesand models without projections (#3377).- The docs teach strong consistency for reading your own writes (#3893), and say that live reads push over WebSockets on Rivet and Effect Cluster (#3395). Thanks Dallen Pyrah!
Cloudflare
- An Effect-native Container (
main) is managed by its Durable Object, which picks the image atstart(), takes snapshots and can bind several Containers (#3257). - A Workers for Platforms dispatch binding takes an outbound Worker for every
fetch()a user Worker makes (#3768). Thanks Zach Bimson! Website.Vitetakes amode, so.env.<mode>files load (#3792).- A
rulesentry uploads a matching JSON import as its own module (#3729),R2Errorcarries R2’s error code (#3654), andCloudflare.state()can turn off the state store’s invocation logs (#3524). AI.GatewaytakesworkersAiBillingMode(#3306), andCloudConnector.Rulesroutes to OCI Object Storage (#3636). Thanks gabriel-astraaria!alchemy devWorkers that share D1, R2 or KV no longer fail withSQLITE_BUSY(#3003).- The local runtime moves to workerd
1.20261117.1, synced with upstream Miniflare (#3341), and local containers run natively on arm64 withALCHEMY_LOCAL_CONTAINER_PLATFORM=host(#3676). Thanks Rahul Mishra!
AWS
- An ECS Service can skip the stable wait with
waitForStableDeployment: false, which often saves two minutes after the task is running (#3777). Thanks Rohan Godha! AWS.EC2.Instancetakessecrets, read from Secrets Manager or SSM at boot with a role granted exactly those ARNs.- An ECS
ServiceorTaskruns a registry image without copying it into ECR withmirror: false.
Providers
-
GitHub.RepositorytakessquashMergeCommitTitle,squashMergeCommitMessageandhasPullRequests(#3502, #3805), andGitHub.Environmentallows deployments from tags (#3735). Thanks Michael K and gabriel-astraaria!yield* GitHub.Environment("production", {owner: "my-org",repository: "my-repo",name: "production",deploymentBranchPolicy: {customBranchPolicies: ["main"],customTagPolicies: ["v*"],},}); -
Hetzner.Servertakesbootstrap: false, for a plain server without the Node install script or the generated root key (#3830). -
A Railway website names its Service with
name(#3534). Thanks Mikkel! -
Kubernetes.LocalClusterputs its registry and node ports on free host ports withregistryPort: 0andhostPort: 0, and reports them inports(#3704). -
Every distilled SDK is regenerated from its latest spec (#3802). Thanks Michael K!
Docs
- The home page presents Alchemy as a framework for generating and verifying working software, with a Domain model and AI processes in the walk-through (#3416, #3833, #3907).
- The Cloudflare email page shows sending from an async Worker or Vite site (#3791), AI Gateway spend limits are documented in dollars, not cents (#3662), and the Railway docs say Effect-native Services run on Node (#3763).
See the CHANGELOG for every other change, and thanks to everyone who contributed.