Web SDK Phase 8.2: DOM digest + selector-based pointing engine#12
Merged
Conversation
…hase 8.2) - digest.ts: screenshot-free structured page view (interactive/annotated elements -> stable ids, accessible labels, viewport rects) + element registry + getPageDigest(). data-skilly annotations prioritized; capped with no silent drop. - pointing.ts: parse [POINT:id:label], resolve (digest id / data-skilly / CSS / visible-text fallback), fly the cursor along a bezier arc, re-anchor on scroll/resize. parsePointTags() strips tags from the response text. - widget: setCursorPosition (engine drives per-frame); removed CSS transform transition. - index: turn flow now builds the digest and drives real pointing. Validated: bun typecheck + build clean; Playwright confirms the cursor flies and lands exactly on the data-skilly-resolved element (0px error). 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 signature "points at the real element" capability — the web analog of the desktop cursor overlay, built on the 8.1 widget.
What's in it
digest.ts— DOM digest: a structured, screenshot-free view of the page's interactive/annotated/heading elements → stable ids, accessible labels, viewport rects, plus an element registry.data-skillyannotations are prioritized; the list is capped with a logged warning (no silent truncation). Exposed asSkilly.getPageDigest()(the page view the AI consumes in 8.3).pointing.ts— pointing engine: parses[POINT:id:label], resolves the target (digest id →data-skilly→ element id → CSS selector → visible-text fallback), flies the cursor along a bezier arc, and re-anchors on scroll/resize so it stays pinned.parsePointTags()strips the tags from the response text.setCursorPosition(driven per-frame by the engine); removed the CSS transform transition.Validation
bun run typecheck+bun run buildclean (IIFE ~12KB).data-skilly="pricing-section"element — measured 0px from its center — with the POINT tag stripped from the bubble. Screenshot verified.Next
8.3 OpenAI Realtime voice pipeline (replaces the simulated turn; sends the digest to the AI) · 8.4+ multi-tenant Next.js backend.