Skip to content
← Public packages

@kentcdodds/cloudflare-connect-pse-hyperframes

I Built Your Personal Software Ecosystem: Kent C. Dodds's Cloudflare Connect 2026 talk deck, built with HyperFrames. How Kody gives every user one of everything on Cloudflare.

FollowForkOpen app

Files

10-search-execute.html

156 lines · 9.3 KB · HTML
<section data-id="search-execute" data-label="Search finds the contract" data-steps="6" class="slide sf">
	<style>
		.sf h2 { margin-bottom: 18px; }
		.sf-wrap { position: relative; flex: 1; min-height: 0; }
		.sf-stage { position: absolute; inset: 0; overflow: hidden; }
		.sf-cam { position: absolute; inset: 0; transform-origin: 0 0; }
		.sf-wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
		.sf-wires path { fill: none; stroke: color-mix(in oklch, var(--muted) 45%, var(--line)); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
		.sf-wires .back { stroke-dasharray: 2 9; }
		.sf-node { position: absolute; translate: -50% -50%; display: flex; flex-direction: column; align-items: center; gap: 14px; z-index: 2; }
		.sf-name { font-family: var(--display); font-size: 44px; font-weight: 700; letter-spacing: -0.02em; }
		.sf-face, .sf-agent, .sf-kody {
			width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center;
			border: 3px solid var(--line); background: var(--surface);
		}
		.sf-node[data-lit='1'] .sf-face,
		.sf-node[data-lit='1'] .sf-agent,
		.sf-node[data-lit='1'] .sf-kody { border-color: var(--green); box-shadow: 0 0 0 8px color-mix(in oklch, var(--green) 14%, transparent); }
		.sf-face { background: #f0c7a4; position: relative; }
		.sf-face i, .sf-face b.mouth { position: absolute; display: block; }
		.sf-face i { width: 9px; height: 9px; border-radius: 50%; background: #3a2a22; top: 40px; }
		.sf-face i:first-child { left: 35px; }
		.sf-face i:nth-child(2) { left: 65px; }
		.sf-face b.mouth { left: 39px; top: 60px; width: 28px; height: 14px; border: 4px solid #3a2a22; border-top: 0; border-radius: 0 0 16px 16px; }
		.sf-agent { background: #241c18; }
		.sf-agent .ico { font-size: 58px; }
		.sf-kody { overflow: hidden; padding: 0; background: #f6ede4; }
		.sf-kody img { width: 100%; height: 100%; object-fit: cover; object-view-box: inset(5% 22% 43% 26%); }
		.sf-pill {
			position: absolute; translate: -50% -50%; width: auto; z-index: 3;
			background: var(--surface); border: 2px solid var(--line); border-radius: 20px;
			padding: 16px 22px 18px; box-shadow: var(--shadow);
		}
		.sf-pill > span { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 20px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
		.sf-pill > span::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
		.sf-pill.back > span::before { background: var(--sky); }
		.sf-pill pre { margin: 0; font-size: 22px; line-height: 1.34; color: var(--ink); white-space: pre-wrap; }
		.sf-pill.back { width: auto; }
		.sf-pill.back pre { font-size: 16px; line-height: 1.32; white-space: pre; color: var(--body); }
		.sf-pill pre .k { color: var(--green); }
		.sf-pill pre .s { color: var(--string); }
		.sf-pill pre .f { color: var(--ink); font-weight: 700; }
		.sf-pill pre .c { color: var(--muted); }
		.sf-pill pre .h { color: var(--ink); font-weight: 700; }
		.sf-pill.ask { width: auto; max-width: none; border-radius: 999px; padding: 16px 30px; font-size: 34px; font-weight: 600; white-space: nowrap; }
		.sf-arch {
			position: absolute; inset: 0 0 24px; z-index: 4; display: grid; grid-template-columns: 0.92fr 1fr 1.36fr; gap: 48px; align-content: center; align-items: stretch;
		}
		.sf-arch section { position: relative; background: var(--surface); border: 2px solid var(--line); border-radius: 22px; padding: 36px 36px 40px; box-shadow: var(--shadow); }
		.sf-arch section + section::before {
			content: ''; position: absolute; left: -40px; top: 50%; width: 26px; height: 26px; translate: 0 -50%;
			border-top: 4px solid var(--corner); border-right: 4px solid var(--corner); rotate: 45deg; border-radius: 2px;
		}
		.sf-arch h3 { display: flex; align-items: center; gap: 12px; margin: 0 0 30px; font-family: var(--mono); font-size: 28px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green); }
		.sf-arch .cf h3 { color: var(--orange-soft); }
		.sf-arch ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; }
		.sf-arch li { font-size: 36px; line-height: 1.2; color: var(--body); padding-left: 32px; position: relative; text-wrap: balance; }
		.sf-arch li::before { content: ''; position: absolute; left: 0; top: 0.5em; width: 12px; height: 12px; border-radius: 3px; background: color-mix(in oklch, var(--green) 70%, transparent); }
		.sf-arch li b { color: var(--ink); font-weight: 700; }
		.sf-arch .cf ul { gap: 26px; }
		.sf-arch .cf li { padding-left: 0; display: grid; grid-template-columns: 58px 1fr; column-gap: 22px; align-items: center; }
		.sf-arch .cf li::before { display: none; }
		.sf-arch .cf .ico { font-size: 56px; grid-row: span 2; }
		.sf-arch .cf code { font-size: 28px; color: var(--string); letter-spacing: 0; margin-top: 6px; }
		html[data-theme='light'] .sf-agent { background: #2a211c; }
	</style>
	<h2 data-enter>Search finds the contract</h2>
	<div class="sf-wrap">
		<div class="sf-stage" data-flow>
			<div class="sf-cam" data-cam>
				<svg class="sf-wires" viewBox="0 0 100 100" preserveAspectRatio="none" aria-hidden="true">
					<path d="M19.8 30.5 H38.2"></path>
					<path d="M37.4 28.6 L38.2 30.5 L37.4 32.4"></path>
					<path d="M46.4 27.6 H74.2"></path>
					<path d="M73.4 25.7 L74.2 27.6 L73.4 29.5"></path>
					<path class="back" d="M74.2 33.6 H46.4"></path>
					<path d="M47.2 31.7 L46.4 33.6 L47.2 35.5"></path>
				</svg>
				<div class="sf-node" data-node="you" style="left:16%; top:34%">
					<span class="sf-face" aria-hidden="true"><i></i><i></i><b class="mouth"></b></span>
					<span class="sf-name">You</span>
				</div>
				<div class="sf-node" data-node="agent" style="left:42%; top:34%">
					<span class="sf-agent"><span class="ico ico-claude"></span></span>
					<span class="sf-name">Agent</span>
				</div>
				<div class="sf-node" data-node="kody" style="left:78%; top:34%">
					<span class="sf-kody"><img src="assets/img/kody-base-640.webp" alt=""></span>
					<span class="sf-name">Kody</span>
				</div>
				<div class="sf-pill ask" data-pill="ask" style="left:23%; top:13%; opacity:0">close the shades in the back</div>
				<div class="sf-pill" data-pill="out" style="left:57%; top:13%; opacity:0">
					<span>Agent to Kody</span>
					<pre><span class="f">search</span>({
  query: <span class="s">"close the shades in the back"</span>
})</pre>
				</div>
				<div class="sf-pill back" data-pill="back" style="left:60%; top:73%; opacity:0">
					<span>Kody to agent</span>
					<pre><span class="h"># Search results</span>

1. <span class="h">package</span> @kentcdodds/home-controls default
   (<span class="s">home-controls</span> export <span class="s">./bond-area-shades</span>)
   Open, close, stop, or position every Bond shade in a named home area.
   Entity: <span class="s">package:home-controls#./bond-area-shades</span>
   Import: <span class="s">kody:@kentcdodds/home-controls/bond-area-shades</span>
   <span class="c">```ts</span>
   <span class="k">import</span> action <span class="k">from</span> <span class="s">"kody:@kentcdodds/home-controls/bond-area-shades"</span>
   <span class="k">export default async function</span> <span class="f">main</span>(params) {
     <span class="k">return await</span> <span class="f">action</span>(params)
   }
   <span class="c">```</span>
   Next: Use the inlined export call contract above from <span class="s">execute</span>.</pre>
				</div>
			</div>
		</div>
		<div class="sf-arch" data-step="5">
			<section>
				<h3>Searchable</h3>
				<ul>
					<li>Capabilities and guides</li>
					<li>Package exports</li>
					<li>Integrations and MCP servers</li>
					<li>Secret names, <b>never values</b></li>
				</ul>
			</section>
			<section>
				<h3>How it is indexed</h3>
				<ul>
					<li>Publish embeds each package</li>
					<li>Capabilities and memories too</li>
					<li>Ranks by meaning and words</li>
					<li>Relevant memories ride along</li>
				</ul>
			</section>
			<section class="cf">
				<h3><span class="ico ico-cloudflare"></span>Cloudflare</h3>
				<ul>
					<li><span class="ico ico-cf-workers-ai"></span><span><b>Workers AI</b> embeds</span><code>env.AI</code></li>
					<li><span class="ico ico-cf-vectorize"></span><span><b>Vectorize</b> finds matches</span><code>CAPABILITY_VECTOR_INDEX</code></li>
					<li><span class="ico ico-cf-d1"></span><span><b>D1</b> holds the catalog</span><code>APP_DB</code></li>
					<li><span class="ico ico-cf-kv"></span><span><b>Workers KV</b> holds bundles</span><code>BUNDLE_ARTIFACTS_KV</code></li>
				</ul>
			</section>
		</div>
	</div>
	<p class="brand">kody.codes</p>
	<aside class="notes">
		The user asks for an action. The agent searches Kody, and Kody returns markdown: a package hit, the entity ref, the import, and an execute example.
		Next: the search call up close. Next: the full path. Next: the results up close. Next: the full path.
		Next: capabilities, guides, package exports, integrations, MCP servers and secret names are searchable. Secret values never appear.
		Publish embeds each package. Capabilities and memories are embedded too, and relevant memories come back with the results.
		Workers AI makes the embeddings, Vectorize finds the nearest matches, D1 holds the catalog, and Workers KV holds the bundles.
		The binding names come straight from the Kody worker's wrangler config.
	</aside>
</section>