Rendering layer
v2.0StableVirtual DOM Protocol
Structured UI representation that models understand natively.
- TypeScript
- Node.js
- Rust
import { parseTree, applyPatch } from "@legionedge/vdom";
// Model output arrives as a validated VNode tree, not markup
const tree = parseTree(modelOutput);
for await (const patch of generation) {
applyPatch(tree, patch); // streaming layout, v2
}
export default tree.toReact();
- Version
- v2.0
- Status
- Stable
- License
- Open specification
- Implementations
- TypeScript · Node.js · Rust
- Stack layer
- Rendering
What the spec defines
The guarantees, not the vibes.
The Virtual DOM Protocol is a structured representation of user interfaces built for AI comprehension. Models read and emit validated component trees instead of raw markup, so generated UI is inspectable, diffable, and safe to render — a malformed node is rejected at the seam, not discovered in production.
Version 2 added streaming layout patches: instead of waiting for a complete document, an interface updates incrementally as the model generates. Combined with stable node identity, that makes generation feel like editing — each patch invalidates exactly the subtree it touches.
It's the foundation of Nokuva's design intelligence. The canvas renders the protocol directly, the theme system writes tokens into it, and conversion to production code is a projection of the same tree — what you describe is what ships, with no design-to-code handoff.
The spec, JSON schemas, and conformance suite are published openly in the research registry. Reference implementations ship for TypeScript, Node.js, and Rust, all tested against the same suite.
Proven in production