Repository navigation
Conversation
🦋 Changeset detectedLatest commit: 330a701 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
The backend that runs ECMAScript modules in a Dynamic Worker is the home of codemode modules and the `codemode:*` host modules, but its name described where it runs rather than what it is for. Rename it to `CodemodeBackend`, its options to `CodemodeBackendOptions`, and its import path to `@cloudflare/computer/backends/codemode`, with no alias for the old names. The source folder, the example, the docs and the tests follow. The backend's default id and its `type` change from `"worker-javascript"` to `"codemode"`, so the exec tool now offers it to the model as `"codemode"`. Runs are saved under the id of the backend that started them, and a backend only looks at its own, so a backend under the new id leaves runs saved under the old one alone: it doesn't resume them, list their waiting calls or find them by id. Passing `id: "worker-javascript"` keeps them reachable. The changeset describes both upgrade paths. The example's Worker and R2 bucket are renamed to `computer-codemode-example` and `computer-codemode-hello`.
ben-reitz
force-pushed
the
browser/codemode-backend
branch
from
November 4, 2026 14:21
d98779a to
330a701
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The backend that runs ECMAScript modules in a Dynamic Worker is where codemode modules and the
codemode:*host modules live, butWorkerJavaScriptBackendnames where it runs rather than what it's for. The docs and comments also called it several other things: "Worker JavaScript", "isolate JavaScript" and "the JavaScript backend".This change renames it to
CodemodeBackendand uses that name everywhere, including its default id, which is now"codemode"instead of"worker-javascript". There's no alias for the old names. This is a breaking change in two steps. The first is a rename:The second is the id. Runs are saved under the id of the backend that started them, and a backend only looks at its own. A backend under the new id doesn't fail on runs saved as
"worker-javascript"; it ignores them. It doesn't resume them,pending()doesn't list their waiting calls, andgetExec()can't find them. An app that wants to keep those runs, or its existingbackend: "worker-javascript"andexec.backendskeys, passes the old id:Otherwise it changes those references to
"codemode", and runs that were in flight when it deploys are out of reach. The exec tool shows the model each backend's id, so it now offers this one as"codemode". The changeset spells out both paths and we should make sure this change is clear in the ugprade notes.The source folder moves to
packages/computer/src/backends/codemode/, and the example moves toexamples/codemode, with its Worker and R2 bucket renamed tocomputer-codemode-exampleandcomputer-codemode-hello.docs/17_isolate_javascript.mdkeeps its file name and title, since links point at them.To check it, build and import the new path:
The existing tests cover the backend under its new name and id, and every test config in
packages/computerpasses. The package README, the root README, the design docs, and the egress, rlm and celld examples use the new names.Agents code that imports
@cloudflare/computer/backends/worker-javascriptor selects the"worker-javascript"backend needs the same changes when it picks up this release.