Skip to content

add first-class generated UI renderers - #15

Merged
siddarthvader merged 3 commits into
mainfrom
codex/thinking
Jul 14, 2026
Merged

add first-class generated UI renderers#15
siddarthvader merged 3 commits into
mainfrom
codex/thinking

Conversation

@siddarthvader

@siddarthvader siddarthvader commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

What changed

  • add first-class GeneratedUiRenderer<TTarget> and render-session contracts
  • make renderer selection explicit across the Svelte, React, Solid, and Vue adapters
  • add DOMPurify as the sole built-in browser renderer with an exact generated-UI policy and DocumentFragment commits
  • organize the generated-UI domain under src/ui with thin compiler, policy, renderer, and DOM-session modules
  • remove the direct innerHTML renderer and legacy gruntend-sdk/ui/dom mounting shortcut
  • update the SvelteKit example, README, release smoke imports, API reference, architecture docs, and documentation website
  • add a minor changeset for the public renderer API and adapter requirements

Why

Generated code should produce UI values without selecting how those values reach an application-owned target. Making the renderer an explicit host-selected strategy keeps compilation, markup sanitization, JavaScript execution, and tool authorization as separate boundaries while preserving an interface for custom render targets.

DOMPurify is the normal built-in browser path. Applications that need another target or commit strategy can implement GeneratedUiRenderer<TTarget> directly instead of relying on a second built-in HTML sink.

Developer impact

Framework adapters now require a renderer prop. Create the renderer once for the mounted component lifetime and pass it with the GeneratedUi controller.

The package adds gruntend-sdk/renderer and gruntend-sdk/renderer/dom-purify. The generated-UI compiler remains available through gruntend-sdk/ui-runtime for compatibility, backed by its new domain location.

Validation

  • Format
  • Lint
  • Test
  • Library typecheck
  • Package build
  • SvelteKit example build
  • Website build
  • git diff --check
  • stale public renderer and legacy mount reference scan

All GitHub CI jobs pass.

@siddarthvader
siddarthvader merged commit 98478a7 into main Jul 14, 2026
7 checks passed
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