Patch Changes
-
#1807
7eea2fbThanks @mattzcarey! - Cleanup connector imports so connector modules are imported normally and the Vite plugin only auto-exports the CodemodeRuntime facet class. Codemode now fails loudly when the runtime facet class is not exported from the Worker entry. -
#1814
a79144dThanks @threepointone! - Dispose the dynamically-loaded Worker and its RPC entrypoint stub after each
DynamicWorkerExecutor.execute()run.Each execution spins up a child Worker via
loader.load()and obtains an RPC
Fetcherstub viagetEntrypoint(). These own native handles, and the code
previously left them for the garbage collector. When such a handle is finalized
late — for example during isolate shutdown under
@cloudflare/vitest-pool-workers— workerd raises a fatal assertion ("tried to
defer destruction during isolate shutdown") that kills the worker, surfacing as
a flaky "Worker exited unexpectedly" with no failing assertion. The milder
manifestation is workerd's "An RPC result was not disposed properly" warning.The executor now disposes the entrypoint stub and the loaded worker in
finally
blocks (best-effort, viaSymbol.dispose), releasing the handles while the
isolate is still alive. No behavior or API change for callers. -
#1793
247ebebThanks @mattzcarey! - Pass the outer MCP tool-call context toopenApiMcpServerrequest callbacks so server-to-client requests and notifications can be associated with the originating response stream. -
#1791
9c85369Thanks @mattzcarey! - Remove the root entry's runtime dependency on the optionalaiandzodpeers. Executor and runtime imports now bundle without either framework package installed. -
#1772
d4f27feThanks @mattzcarey! - Include each package's documentation in its published package. -
#1806
43f663dThanks @mattzcarey! - Increase the default DynamicWorkerExecutor timeout from 30 seconds to 60 seconds to better support longer-running codemode executions.