Web SDK Phase 8.1: @skilly/web embed widget (skeleton)#11
Merged
Conversation
The embeddable companion site owners drop into their web app via one <script>. Vanilla TS + Shadow DOM (no framework — embeds must be tiny + style-isolated), built with tsup to a ~7KB IIFE (window.Skilly) + ESM + .d.ts. - Public API: init/start/on/identify/destroy + auto-init from data-skilly-* attrs. - Shadow-DOM widget: launcher button, response bubble, blue cursor + moveCursorTo. - Lazy/tolerant WASM-core loader (widget runs UI-only if core absent). - Simulated turn lifecycle (listening->thinking->speaking->complete) so the embed is demonstrable; real DOM digest+pointing (8.2), voice (8.3), backend (8.4+) next. Validated: bun typecheck + build clean; Playwright confirms the widget mounts, launcher renders, and start() shows the bubble + cursor (screenshot verified). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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 first genuinely new browser code — the embeddable Skilly companion site owners drop into their web app via one
<script>. Builds on the WASM core from #10.What's in it
@skilly/webpackage — vanilla TS + Shadow DOM (no framework; embeds must be tiny + style-isolated).tsup→ ~7KB IIFE (window.Skilly) + ESM +.d.ts.init/start/on/identify/destroy, plus auto-init fromdata-skilly-*script attributes and a typed event emitter.moveCursorTo.bun run demo).8.1 is the embed skeleton: a simulated turn lifecycle (listening → thinking → speaking → complete) so the flow is demonstrable end-to-end.
Validation
bun run typecheck(tsc) +bun run build(tsup) — clean."Let's get started with…") + the blue cursor. Screenshot verified; host page styles untouched.Not in this slice
8.2 DOM digest + selector-based pointing · 8.3 OpenAI Realtime voice pipeline · 8.4+ multi-tenant Next.js backend (keys, metering, SKILL.md serving).
Build output (
dist/,node_modules/,generated/) is gitignored.