Skip to content
← Public packages

@kentcdodds/cloudflare-connect-personal-software-ecosystem

I Built Your Personal Software Ecosystem: Kent C. Dodds's Cloudflare Connect 2026 lightning talk deck (Reveal.js). How Kody gives every user one of everything on Cloudflare.

FollowForkOpen app

Files

10-worker-loader.html

24 lines · 966 B · HTML
<section id="worker-loader" data-slide="worker-loader" data-title="Worker Loader">
	<h2>Worker Loader</h2>
	<pre class="loader-code"><code class="language-typescript">// worker.ts
const modules = {
  "executor.js": codeExecutor,
  "entry.ts": bundledCode,
}

const isolate = env.LOADER
  .get(workerId, () => ({ modules }))
  .getEntrypoint()

const { result } = await isolate.evaluate({
  kody: capabilities, // emailSend, secretList, ...
})</code></pre>
	<aside class="notes">
		worker.ts on the host. modules is the isolate wrapper plus the bundled user graph.
		LOADER is the Worker Loader binding. get returns the Dynamic Worker, and getEntrypoint
		is the isolate. The dispatchers object is the capability map on one kody object, and
		evaluate injects it. Inside the isolate, executor.js wraps kody in a Proxy, so every
		kody.* call is __dispatchers.kody.call. Steal @cloudflare/codemode and
		@cloudflare/worker-bundler. Next: secrets.
	</aside>
</section>