The publish bundler artifact, worker-bundler source and esbuild wasm, is fetched from static assets at first use instead of being inlined into the worker script, returning the script to its previous size. Cold-start latency regressed while the 19MB artifact chunk was part of the script blob.
Showing the changes to apps/cloud/src/engine/execution-stack.ts (1 of 8 files). Show all
Unified · Split
| @@ -64,6 +64,7 @@ const cloudPluginFactory = executorConfig.plugins as (deps: { · 63 unmodified lines | ||
| 64 | 64 | readonly activeToolkitSlug?: string; |
| 65 | 65 | readonly allowLocalNetwork?: boolean; |
| 66 | 66 | readonly workerLoader?: WorkerLoader; |
| 67 | + readonly workerAssets?: { readonly fetch: (request: Request) => Promise<Response> }; | |
| 67 | 68 | }) => readonly AnyPlugin[]; |
| 68 | 69 | |
| 69 | 70 | // Fresh plugin instances per request, carrying the Worker env's WorkOS Vault |
| @@ -80,6 +81,7 @@ export const CloudPluginsProvider: Layer.Layer<PluginsProvider> = Layer.succeed( · 10 unmodified lines | ||
| 80 | 81 | context?.mcpResource?.kind === "toolkit" ? context.mcpResource.slug : undefined, |
| 81 | 82 | allowLocalNetwork: env.ALLOW_LOCAL_NETWORK === "true", |
| 82 | 83 | workerLoader: env.LOADER, |
| 84 | + workerAssets: env.ASSETS, | |
| 83 | 85 | }), |
| 84 | 86 | }); |
| 85 | 87 | |