Skip to content

Web SDK Phase 8.1: @skilly/web embed widget (skeleton)#11

Merged
engmsaleh merged 1 commit into
developfrom
feature/web-sdk-8.1-widget
Jun 3, 2026
Merged

Web SDK Phase 8.1: @skilly/web embed widget (skeleton)#11
engmsaleh merged 1 commit into
developfrom
feature/web-sdk-8.1-widget

Conversation

@engmsaleh
Copy link
Copy Markdown
Collaborator

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/web package — vanilla TS + Shadow DOM (no framework; embeds must be tiny + style-isolated). tsup~7KB IIFE (window.Skilly) + ESM + .d.ts.
  • Public API: init / start / on / identify / destroy, plus auto-init from data-skilly-* script attributes and a typed event emitter.
  • Shadow-DOM widget: floating launcher, response bubble, blue cursor + moveCursorTo.
  • Lazy, tolerant WASM-core loader — the widget runs UI-only if the core isn't served.
  • Demo host page (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.
  • Playwright: confirmed the widget mounts in a Shadow root, the launcher renders bottom-right, and clicking "Start" shows the response bubble ("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.

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>
@engmsaleh engmsaleh merged commit 3da6e18 into develop Jun 3, 2026
16 checks passed
@engmsaleh engmsaleh deleted the feature/web-sdk-8.1-widget branch June 3, 2026 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant