Repository navigation
Conversation
The versions lane now compiles each actor into a module of its own and
declares `actors` on every version, `[]` for an app with none. An absent
field is what a CLI from before actors sends, and the platform refuses it
(409 actors_undeclared) for an app that has them.
- Each actor compiles with the compiler's single-function bundle(), keyed
base44/actors/<Name>/entry.ts (an entry.js too), over the files its
entry reaches among its own folder and base44/shared — as apper
assembles one. Not cfwBundleInput: its flat main.ts loses the path that
makes the entry an actor.
- Declared as name, entry, source, module {size, digest} and static_egress
(the compiler's STATIC_EGRESS_ARTIFACT_MARKER, installed by the actor
prelude). Sorted by name.
- Upload slots come after the bundles', each at actors/<Name>.mjs, which
the client checks the server signed.
- BuildTarget.actorsDir; at most 50 actors, refused before compiling.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/cli@0.1.32-pr.665.1a74073Prefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/cli@0.1.32-pr.665.1a74073"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.1.32-pr.665.1a74073"
}
}
Preview published to npm registry — try new features instantly! |
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.
Note
Description
Teaches the version lane to compile and declare an app's actors alongside its backend functions, so a recorded version describes the Durable Object side of the app too. A new
core/version/actors.tscompiles each actor into a module of its own with the functions-compiler, declares it with its name, entry, source and digest, and stages its module atactors/<name>.mjsafter every other upload slot. Theactorsfield is always sent —[]for an app with none — because an absent field is what a pre-actors CLI sends and the platform rejects that for an app that has actors.Related Issue
None
Type of Change
Changes Made
core/version/actors.ts(new) —compileActors()reads every actor under the actors dir, compiles each one separately via the compiler's single-functionbundle()(concurrency 4), and returns anActorArtifactper actor: name, entry, source as written, module bytes, size, sha256 digest, and theSTATIC_EGRESS_ARTIFACT_MARKERcontract. Actors are sorted by name so upload slots never follow a filesystem walk.base44/actors/<Name>/entry.ts(anentry.jsincluded, since that path is what marks an entry as an actor), with the actor's own folder plusbase44/shared/**as the reachable set. Deliberately bypassescfwBundleInput, which would flatten a leaf entry tomain.ts. A reach into another actor or a function stays unresolved and fails the compile.build;InternalErrorif the compiler does not report a Durable Object class matching the actor's name.core/version/api.ts— declaresactorsin the create-version POST, computes the actor slot offset after assets + Worker modules + backend bundles, verifies the server signed each actor slot at the expectedactors/<name>.mjspath, and uploads each module withputPresignedBody.core/version/schema.ts— newActorArtifactinterface and a requiredactorsfield onArtifactSet.core/version/artifacts.ts— collects actors under the existingbuildstep tag.core/version/functions.ts— exportsrequireCompilerRuntime()(now parameterized with what is being compiled, for theDEPENDENCY_NOT_FOUNDmessage),describeFailure()andsha256()for reuse.core/project/target.ts—BuildTargetgainsactorsDir, defaulting toactors.docs/versions.md, plus updated declare/upload ordering and keywords.tests/core/version-actors.spec.ts(8 cases: empty set without loading the compiler, per-actor modules,entry.jskeyed asentry.ts, shared-module reach, no cross-actor reach, deterministic bytes, whole-set failure, the 50-actor cap) and 6 newpublishintegration cases (declaration shape, per-slot uploads, actors staged after bundles,actors: []for an app with none,build-step compile failure, and the standalone binary refusing an app with actors).TestAPIServernow signs actor slots; thewith-actorsfixture gains abase44/shared/limits.tsthe ChatRoom entry imports.Testing
npm test)Checklist
docs/(AGENTS.md) if I made architectural changesAdditional Notes
Actors are appended last in the declared-slot order (assets → Worker modules → backend bundles → actors), so an app gaining actors moves no slot the other kinds already had. Like backend functions, actor compilation needs the external
esbuild/@deno/loaderruntime packages, so the standalone binary refuses an app with actors withDEPENDENCY_NOT_FOUNDbefore declaring anything. The whole lane stays behind theBASE44_VERSIONS_APIenv gate.🤖 Generated by Claude | 2026-10-15 10:41 UTC | 1a74073