Skip to content

The Open Standard for Generative UI

docs: clarify OpenUI is framework-agnostic; add Vue and Svelte API reference (#1245)

abhithesysfaf911b81458
diff --git a/README.md b/README.md
index 804556fc9..cfc84a6ed 100644
--- a/README.md
+++ b/README.md
@@ -21,7 +21,7 @@
</div>
-OpenUI is a full-stack, renderer-agnostic Generative UI framework built around a compact, streaming-first language. It offers official React support with built-in component libraries and ready-to-use chat interfaces, plus community-supported integrations for other frameworks. OpenUI Lang uses up to 67% fewer tokens than JSON.
+OpenUI is a full-stack, framework-agnostic Generative UI framework built around a compact, streaming-first language. A framework-agnostic core powers first-party runtimes for React, Vue, Svelte, and Angular, and React additionally ships built-in component libraries and ready-to-use chat interfaces. OpenUI Lang uses up to 67% fewer tokens than JSON.
<div align="center">
@@ -47,7 +47,7 @@ At the center of OpenUI is **OpenUI Lang**: a compact, streaming-first language
- **OpenUI Lang** - A compact language for structured UI generation designed for streaming output.
- **Built-in component libraries** - Charts, forms, tables, layouts, and more, ready to use or extend.
- **Prompt generation from your component library** - Generate model instructions directly from the components you allow.
-- **Streaming renderer** - Parse and render model output progressively in React as tokens arrive.
+- **Streaming renderer** - Parse and render model output progressively in React, Vue, Svelte, or Angular as tokens arrive.
- **Chat and app surfaces** - Use the same foundation for assistants, copilots, and broader interactive product flows.
## Quick Start
diff --git a/docs/app/layout.tsx b/docs/app/layout.tsx
index f9a2a48a4..be9fa0b63 100644
--- a/docs/app/layout.tsx
+++ b/docs/app/layout.tsx
@@ -17,7 +17,7 @@ const geistMono = Geist_Mono({
const SITE_TITLE = "OpenUI - The Open Standard for Generative UI";
const SITE_DESCRIPTION =
- "Full-stack, renderer-agnostic Generative UI built on OpenUI Lang, a streaming-first language with official React support, community integrations, and up to 67% fewer tokens than JSON.";
+ "Full-stack, framework-agnostic Generative UI built on OpenUI Lang, a streaming-first language with first-party runtimes for React, Vue, Svelte, and Angular, and up to 67% fewer tokens than JSON.";
const SITE_IMAGE = "/meta-image.png?v=20260725-1708";
export const metadata: Metadata = {
diff --git a/docs/app/llms.txt/route.ts b/docs/app/llms.txt/route.ts
index 217b816e8..05cc9c59a 100644
--- a/docs/app/llms.txt/route.ts
+++ b/docs/app/llms.txt/route.ts
@@ -4,7 +4,7 @@ export const dynamic = "force-static";
export const revalidate = false;
const SITE_DESCRIPTION =
- "Full-stack, renderer-agnostic Generative UI built on OpenUI Lang, a streaming-first language with official React support, community integrations, and up to 67% fewer tokens than JSON.";
+ "Full-stack, framework-agnostic Generative UI built on OpenUI Lang, a streaming-first language with first-party runtimes for React, Vue, Svelte, and Angular, and up to 67% fewer tokens than JSON.";
export async function GET() {
const pages = source.getPages().map((page) => {
diff --git a/docs/content/docs/api-reference/index.mdx b/docs/content/docs/api-reference/index.mdx
index e31d75cd6..cf25f5202 100644
--- a/docs/content/docs/api-reference/index.mdx
+++ b/docs/content/docs/api-reference/index.mdx
@@ -47,8 +47,8 @@ The OpenUI SDK is split into packages that build on each other:
| A LangChain or LangGraph agent connected to an OpenUI frontend | [`@openuidev/langchain`](/docs/api-reference/langchain) |
| Autofix or conversation history on the Gateway | [`@openuidev/server`](/docs/api-reference/server) |
| Model-generated emails | [`@openuidev/react-email`](/docs/api-reference/react-email) |
-| Vue integration | [`@openuidev/vue-lang`](https://github.com/thesysdev/openui/tree/main/packages/vue-lang) |
-| Svelte integration | [`@openuidev/svelte-lang`](https://github.com/thesysdev/openui/tree/main/packages/svelte-lang) |
+| Vue integration | [`@openuidev/vue-lang`](/docs/api-reference/vue-lang) |
+| Svelte integration | [`@openuidev/svelte-lang`](/docs/api-reference/svelte-lang) |
| Script-tag, CDN, or iframe embeds | [`@openuidev/browser-bundle`](https://github.com/thesysdev/openui/tree/main/packages/browser-bundle) |
| An in-app panel showing captured errors during development | [`@openuidev/devtools`](/docs/api-reference/devtools) |
| App scaffolding, prompt/schema generation, and deploy from the command line | [`@openuidev/cli`](/docs/api-reference/cli) |
@@ -91,16 +91,10 @@ The OpenUI SDK is split into packages that build on each other:
<Card title="@openuidev/react-email" href="/docs/api-reference/react-email">
API reference for the pre-built email templates library and prompt options.
</Card>
- <Card
- title="@openuidev/vue-lang"
- href="https://github.com/thesysdev/openui/tree/main/packages/vue-lang"
- >
+ <Card title="@openuidev/vue-lang" href="/docs/api-reference/vue-lang">
Vue 3 bindings for defining model-renderable components and rendering streamed OpenUI Lang.
</Card>
- <Card
- title="@openuidev/svelte-lang"
- href="https://github.com/thesysdev/openui/tree/main/packages/svelte-lang"
- >
+ <Card title="@openuidev/svelte-lang" href="/docs/api-reference/svelte-lang">
Svelte 5 bindings for defining model-renderable components and rendering streamed OpenUI Lang.
</Card>
<Card
diff --git a/docs/content/docs/api-reference/meta.json b/docs/content/docs/api-reference/meta.json
index fa18a8b7a..afd4bfd5d 100644
--- a/docs/content/docs/api-reference/meta.json
+++ b/docs/content/docs/api-reference/meta.json
@@ -13,6 +13,8 @@
"devtools",
"cli",
"angular-lang",
+ "vue-lang",
+ "svelte-lang",
"a2ui"
]
}
diff --git a/docs/content/docs/api-reference/svelte-lang.mdx b/docs/content/docs/api-reference/svelte-lang.mdx
new file mode 100644
index 000000000..4024c91e6
--- /dev/null
+++ b/docs/content/docs/api-reference/svelte-lang.mdx
@@ -0,0 +1,225 @@
+---
+title: "@openuidev/svelte-lang"
+description: API reference for Svelte 5 component libraries, streaming rendering, actions, form state, and validation.
+---
+
+Use this package to define Svelte components a model can render, generate prompts from their schemas, and render streamed OpenUI Lang. It provides a `Renderer` component and context helpers for use inside rendered components. You supply your component library, styling, chat interface, and model transport.
+
+For a runnable SvelteKit chat integration with the Vercel AI SDK, see the [Svelte example](https://github.com/thesysdev/openui/tree/main/examples/app-frameworks/svelte).
+
+## Install
+
+```bash
+npm install @openuidev/svelte-lang zod
+```
+
+Version `0.3.0` requires Svelte `>=5.0.0` and Zod `^3.25.0 || ^4.0.0`. Use the `zod/v4` API when defining schemas.
+
+<Callout type="info">
+ The Svelte renderer covers component rendering, simple actions, and form state. It does not yet
+ evaluate prop expressions (ternaries, built-ins, `Each`, references), execute `Action([...])` step
+ plans, run `Query()` calls or mutations, or manage `$variable` state, and it has no
+ `toolProvider`, `queryLoader`, or `onError` props. The [React](/docs/api-reference/react-lang),
+ [Vue](/docs/api-reference/vue-lang), and [Angular](/docs/api-reference/angular-lang) runtimes
+ support them.
+</Callout>
+
+## Define a library
+
+`defineComponent(config)` accepts a name, description, ordered Zod object schema, and Svelte component. It returns a `DefinedComponent` whose `.ref` can be used in another component's schema, such as `z.array(Child.ref)`.
+
+Registered components receive a `props` prop containing the parsed values, plus a `renderNode` snippet. Props may be incomplete while the model streams; use optional access and empty-array fallbacks in markup.
+
+```svelte title="Greeting.svelte"
+<script lang="ts">
+ let { props }: { props: { name?: string } } = $props();
+</script>
+
+<p>Hello, {props.name}!</p>
+```
+
+```ts title="library.ts"
+import { createLibrary, defineComponent } from "@openuidev/svelte-lang";
+import { z } from "zod/v4";
+import GreetingComponent from "./Greeting.svelte";
+
+const Greeting = defineComponent({
+ name: "Greeting",
+ description: "Greet the user by name.",
+ props: z.object({ name: z.string() }),
+ component: GreetingComponent,
+});
+
+export const library = createLibrary({
+ components: [Greeting],
+ root: "Greeting",
+});
+
+const systemPrompt = library.prompt({
+ preamble: "You are a helpful assistant.",
+ examples: ['root = Greeting("Alice")'],
+});
+const schema = library.toJSONSchema();
+```
+
+`createLibrary(definition)` accepts `components` and an optional `root`, `id`, or `componentGroups`. It returns the component registry, `prompt(options?)`, and `toJSONSchema()`. Use `PromptOptions` for prompt options such as `preamble`, `additionalRules`, and `examples`.
+
+The order of schema properties determines the positional argument order in OpenUI Lang. Generate the model prompt from the same definitions the renderer uses. For a SvelteKit server route, share the schema definitions and use `@openuidev/lang-core` to generate prompts without importing `.svelte` files.
+
+## `Renderer`
+
+Pass the accumulated response text as it streams. Callbacks are ordinary props.
+
+```svelte title="AssistantMessage.svelte"
+<script lang="ts">
+ import { Renderer, type ActionEvent } from "@openuidev/svelte-lang";
+ import { library } from "./library";
+
+ let { response, isStreaming }: { response: string | null; isStreaming: boolean } = $props();
+
+ function handleAction(event: ActionEvent) {
+ // Forward continuation actions to your application's normal send-message path.
+ console.log(event.humanFriendlyMessage, event.formState);
+ }
+</script>
+
+<Renderer {response} {library} {isStreaming} onAction={handleAction} />
+```
+
+| Prop | Type | Purpose |
+| :-------------- | :-------------------------------------- | :------------------------------------------------------------- |
+| `response` | `string \| null` | Accumulated OpenUI Lang text |
+| `library` | `Library` | Library returned by `createLibrary` |
+| `isStreaming` | `boolean` | Whether the model is still producing text; defaults to `false` |
+| `onAction` | `(event: ActionEvent) => void` | Continuation or URL action dispatched by a component |
+| `onStateUpdate` | `(state: Record<string, any>) => void` | Updated form state map |
+| `initialState` | `Record<string, any>` | Form state to hydrate; replaced when a new object is passed |
+| `onParseResult` | `(result: ParseResult \| null) => void` | Current parse result |
+
+The renderer builds its parser from `library` once when it mounts. To switch libraries, wrap the `Renderer` in a `{#key library}` block.
+
+The renderer does not pass `library.root` to its parser. It renders the `root` statement when one exists, and otherwise the first component statement; `root` still shapes the generated prompt.
+
+`initialState` and `onStateUpdate` use the shape `{ [formName]: { [fieldName]: { value, componentType } } }`. Fields set without a form name are stored at the top level.
+
+A component that throws while rendering is logged to the console and renders nothing until its node or props change. Parse exceptions are also logged, and the renderer shows nothing until the response parses again.
+
+## Nested components with `renderNode`
+
+`renderNode` is a Svelte snippet passed to every registered component. It renders values, arrays, and parsed element nodes. Render children with `{@render}`:
+
+```svelte title="Card.svelte"
+<script lang="ts">
+ import type { Snippet } from "svelte";
+
+ let {
+ props,
+ renderNode,
+ }: { props: { title?: string; children?: unknown[] }; renderNode: Snippet<[unknown]> } =
+ $props();
+</script>
+
+<section>
+ {#if props.title}<h3>{props.title}</h3>{/if}
+ {@render renderNode(props.children)}
+</section>
+```
+
+Register the container with `defineComponent` and describe its allowed children using their `.ref` schemas. `renderNode` is passed as a prop rather than through context, so forward it explicitly if a child Svelte component needs to render nested nodes.
+
+A form component can call `setFormNameContext(name)` so descendants can read it with `getFormName()`.
+
+## Context helpers
+
+Call these helpers during component initialization, in the `<script>` block of a component rendered inside `Renderer`. `getOpenUIContext()` throws when used outside a renderer.
+
+| Helper | Returns |
+| :--------------------- | :-------------------------------------------- |
+| `getOpenUIContext()` | Full `OpenUIContextValue` |
+| `getTriggerAction()` | Runtime `triggerAction` function |
+| `getIsStreaming()` | `() => boolean` getter |
+| `getGetFieldValue()` | Runtime `getFieldValue` function |
+| `getSetFieldValue()` | Runtime `setFieldValue` function |
+| `getFormName()` | Current form name, or `undefined` |
+| `useSetDefaultValue()` | Nothing; persists a default value (see below) |
+
+`setOpenUIContext(value)` is exported for custom renderers; `Renderer` calls it for you.
+
+`getIsStreaming()` returns a getter so the value stays reactive. Call it in markup:
+
+```svelte
+<script lang="ts">
+ import { getIsStreaming } from "@openuidev/svelte-lang";
+
+ const isStreaming = getIsStreaming();
+</script>
+
+<button disabled={isStreaming()}>Submit</button>
+```
+
+### Actions
+
+```ts
+triggerAction(
+ userMessage: string,
+ formName?: string,
+ action?: ActionConfig,
+): void;
+```
+
+Calling `triggerAction("Explain the chart")` emits a `BuiltinActionType.ContinueConversation` action. Pass `{ type, params }` as `action` to emit a different type, such as `BuiltinActionType.OpenUrl`. Handle `onAction` in the host to send a new model turn or open the URL. The renderer does not call an LLM itself.
+
+`ActionEvent` includes `type`, `params`, `humanFriendlyMessage`, and optional `formState` and `formName`. When `formName` names a form that has values, `formState` contains only that form. Otherwise it contains all form state, or is `undefined` when no field has a value yet.
+
+### Field state and defaults
+
+```ts
+getFieldValue(formName: string | undefined, name: string): any;
+
+setFieldValue(
+ formName: string | undefined,
+ componentType: string | undefined,
+ name: string,
+ value: any,
+ shouldTriggerSaveCallback?: boolean, // defaults to true
+): void;
+```
+
+Text inputs should pass `false` for `shouldTriggerSaveCallback` on change and `true` on blur. Discrete inputs such as selects and radio groups should pass `true`.
+
+`useSetDefaultValue({ formName?, componentType, name, defaultValue, shouldTriggerSaveCallback? })` persists `defaultValue` once streaming finishes, but only when the field has no value yet. `shouldTriggerSaveCallback` defaults to `false`. Call it during component initialization; it uses `$effect`.
+
+## Form validation
+
+Validation helpers are opt-in for your custom form components:
+
+| Export | Purpose |
+| :----------------------------------- | :-------------------------------------------------------------- |
+| `createFormValidation()` | Create a `FormValidationContextValue` backed by Svelte `$state` |
+| `setFormValidationContext(value)` | Share a validation context with descendants |
+| `getFormValidation()` | Read the closest context, or `null` when none was set |
+| `parseRules`, `parseStructuredRules` | Convert validation declarations into parsed rules |
+| `validate`, `builtInValidators` | Run validation or access built-in validators |
+
+The context exposes a reactive `errors` record, `validateField`, `registerField`, `unregisterField`, `validateForm`, and `clearFieldError`. Register fields with `registerField(name, rules, getValue)`, unregister them in `onDestroy`, and call `validateForm()` before triggering the submit action. A validation context reports errors; your components render those messages and enforce submission behavior.
+
+## Parser
+
+`createParser` and `createStreamingParser` are re-exported from `@openuidev/lang-core`. A parser takes the library's JSON schema and optional root name:
+
+```ts
+import { createParser } from "@openuidev/svelte-lang";
+
+const parser = createParser(library.toJSONSchema(), "Greeting");
+const result = parser.parse('root = Greeting("Alice")');
+
+console.log(result.root, result.meta.errors, result.meta.unresolved);
+```
+
+In server-only code, import parser and prompt utilities directly from `@openuidev/lang-core`. Because the Svelte renderer has no `onError` prop, use `onParseResult` and inspect `result.meta.errors` to surface parser validation errors.
+
+## Types
+
+The package exports `Library`, `LibraryDefinition`, `DefinedComponent`, `ComponentRenderer` (a Svelte `Component`), `ComponentRenderProps`, `ComponentGroup`, `SubComponentOf`, `PromptOptions`, `RendererProps`, `OpenUIContextValue`, `ActionConfig`, `FormValidationContextValue`, `ParsedRule`, `ValidatorFn`, and the shared Lang Core `ActionEvent`, `ElementNode`, `ParseResult`, and `LibraryJSONSchema` types.
+
+Other value exports are `tagSchemaId` and `BuiltinActionType`, re-exported from Lang Core.
diff --git a/docs/content/docs/api-reference/vue-lang.mdx b/docs/content/docs/api-reference/vue-lang.mdx
new file mode 100644
index 000000000..fade366f4
--- /dev/null
+++ b/docs/content/docs/api-reference/vue-lang.mdx
@@ -0,0 +1,252 @@
+---
+title: "@openuidev/vue-lang"
+description: API reference for Vue 3 component libraries, streaming rendering, actions, state, queries, and validation.
+---
+
+Use this package to define Vue components a model can render, generate prompts from their schemas, and render streamed OpenUI Lang. It provides a `Renderer` component and composables for use inside rendered components. You supply your component library, styling, chat interface, and model transport.
+
+For a runnable Nuxt chat integration with the Vercel AI SDK, see the [Vue example](https://github.com/thesysdev/openui/tree/main/examples/app-frameworks/vue).
+
+## Install
+
+```bash
+npm install @openuidev/vue-lang zod
+```
+
+Version `0.3.0` requires Vue `>=3.5.0` and Zod `^3.25.0 || ^4.0.0`. Use the `zod/v4` API when defining schemas.
+
+## Define a library
+
+`defineComponent(config)` accepts a name, description, ordered Zod object schema, and Vue component. It returns a `DefinedComponent` whose `.ref` can be used in another component's schema, such as `z.array(Child.ref)`.
+
+Registered components receive a `props` prop containing the parsed values, plus a `renderNode` prop. Declare both, or Vue forwards the undeclared `renderNode` function to the root element as an attribute. Props may be incomplete while the model streams; use optional access and empty-array fallbacks in templates.
+
+```vue title="Greeting.vue"
+<script setup lang="ts">
+import type { RenderNodeResult } from "@openuidev/vue-lang";
+
+defineProps<{
+ props: { name?: string };
+ renderNode: (value: unknown) => RenderNodeResult;
+}>();
+</script>
+
+<template>
+ <p>Hello, {{ props.name }}!</p>
+</template>
+```
+
+```ts title="library.ts"
+import { createLibrary, defineComponent } from "@openuidev/vue-lang";
+import { z } from "zod/v4";
+import GreetingComponent from "./Greeting.vue";
+
+const Greeting = defineComponent({
+ name: "Greeting",
+ description: "Greet the user by name.",
+ props: z.object({ name: z.string() }),
+ component: GreetingComponent,
+});
+
+export const library = createLibrary({
+ components: [Greeting],
+ root: "Greeting",
+});
+
+const systemPrompt = library.prompt({
+ preamble: "You are a helpful assistant.",
+ examples: ['root = Greeting("Alice")'],
+});
+const schema = library.toJSONSchema();
+```
+
+`createLibrary(definition)` accepts `components` and an optional `root`, `id`, or `componentGroups`. It returns the component registry, `prompt(options?)`, and `toJSONSchema()`. Use `PromptOptions` for prompt options such as `preamble`, `additionalRules`, and `examples`.
+
+The order of schema properties determines the positional argument order in OpenUI Lang. Generate the model prompt from the same definitions the renderer uses. For a server route, share the schema definitions and use `@openuidev/lang-core` to generate prompts without importing `.vue` files.
+
+## `Renderer`
+
+Pass the accumulated response text as it streams. Callbacks are ordinary props, not emitted events, so bind them with `:on-action` rather than `@action`.
+
+```vue title="AssistantMessage.vue"
+<script setup lang="ts">
+import { Renderer, type ActionEvent } from "@openuidev/vue-lang";
+import { library } from "./library";
+
+defineProps<{ response: string | null; isStreaming: boolean }>();
+
+function handleAction(event: ActionEvent) {
+ // Forward continuation actions to your application's normal send-message path.
+ console.log(event.humanFriendlyMessage, event.formState);
+}
+</script>
+
+<template>
+ <Renderer
+ :response="response"
+ :library="library"
+ :is-streaming="isStreaming"
+ :on-action="handleAction"
+ />
+</template>
+```
+
+| Prop | Type | Purpose |
+| :-------------- | :-------------------------------------------------------------------- | :------------------------------------------------------------------ |
+| `response` | `string \| null` | Accumulated OpenUI Lang text |
+| `library` | `Library` | Library returned by `createLibrary` |
+| `isStreaming` | `boolean` | Whether the model is still producing text; defaults to `false` |
+| `onAction` | `(event: ActionEvent) => void` | Continuation or URL action dispatched by a component |
+| `onStateUpdate` | `(state: Record<string, any>) => void` | Updated store snapshot |
+| `initialState` | `Record<string, any>` | State for initial hydration |
+| `onParseResult` | `(result: ParseResult \| null) => void` | Current parse result |
+| `toolProvider` | `Record<string, (args) => Promise<unknown>> \| McpClientLike \| null` | Async function map or MCP-like client for `Query()` and mutations |
+| `queryLoader` | `Component \| VNode \| null` | Indicator displayed while a query is loading; defaults to a spinner |
+| `onError` | `(errors: OpenUIError[]) => void` | Structured parser, runtime, and tool errors |
+
+The renderer reads `library` once when it mounts. To switch libraries, give the `Renderer` a new `key` so it remounts.
+
+`onError` is called once streaming finishes and again whenever the error set changes; it is reset to `[]` when a new stream starts. Without `onError`, errors are logged with `console.warn`. A component that throws while rendering is logged to the console and renders nothing until its node or props change.
+
+## Nested components with `useRenderNode`
+
+`useRenderNode()` returns a function that turns a parsed value, array, or element node into VNodes. Render the result with a functional `<component>`:
+
+```vue title="Card.vue"
+<script setup lang="ts">
+import { useRenderNode, type RenderNodeResult } from "@openuidev/vue-lang";
+
+defineProps<{
+ props: { title?: string; children?: unknown[] };
+ renderNode: (value: unknown) => RenderNodeResult;
+}>();
+const renderNode = useRenderNode();
+</script>
+
+<template>
+ <section>
+ <h3 v-if="props.title">{{ props.title }}</h3>
+ <component :is="() => renderNode(props.children)" />
+ </section>
+</template>
+```
+
+Register the container with `defineComponent` and describe its allowed children using their `.ref` schemas. The same function is also passed to every registered component as the `renderNode` prop.
+
+A form component can call `provideFormName(ref(name))` so descendants can read it with `useFormName()`.
+
+## Context composables
+
+Call composables in `<script setup>` of a component rendered inside `Renderer`. `useOpenUI()` throws when used outside a renderer.
+
+| Composable | Returns |
+| :--------------------- | :-------------------------------------------- |
+| `useOpenUI()` | Full `OpenUIContextValue` |
+| `useRenderNode()` | `(value: unknown) => RenderNodeResult` |
+| `useTriggerAction()` | Runtime `triggerAction` function |
+| `useIsStreaming()` | `Ref<boolean>` |
+| `useIsQueryLoading()` | `Ref<boolean>` |
+| `useGetFieldValue()` | Runtime `getFieldValue` function |
+| `useSetFieldValue()` | Runtime `setFieldValue` function |
+| `useFormName()` | `Ref<string \| undefined>`, or `undefined` |
+| `useSetDefaultValue()` | Nothing; persists a default value (see below) |
+
+The full context also exposes the underlying `store` and `evaluationContext`. `provideOpenUIContext(value)` is exported for custom renderers; `Renderer` calls it for you.
+
+```vue
+<script setup lang="ts">
+import { useIsQueryLoading, useIsStreaming } from "@openuidev/vue-lang";
+
+const isStreaming = useIsStreaming();
+const isQueryLoading = useIsQueryLoading();
+</script>
+
+<template>
+ <button :disabled="isStreaming || isQueryLoading">Submit</button>
+</template>
+```
+
+### Actions
+
+```ts
+triggerAction(
+ userMessage: string,
+ formName?: string,
+ action?: ActionConfig,
+): void;
+```
+
+Calling `triggerAction("Explain the chart")` emits a `BuiltinActionType.ContinueConversation` action. Handle `onAction` in the host to send a new model turn. Preserve `humanFriendlyMessage`, relevant `params.context`, and `formState` when serializing the turn. The renderer does not call an LLM itself.
+
+`ActionEvent` includes `type`, `params`, `humanFriendlyMessage`, and optional `formState` and `formName`. `BuiltinActionType.OpenUrl` is a separate action for the host to handle. Action plans produced by OpenUI Lang can also set or reset state and run mutations; those steps execute in the runtime.
+
+### Field state and defaults
+
+```ts
+getFieldValue(formName: string | undefined, name: string): any;
+
+setFieldValue(
+ formName: string | undefined,
+ componentType: string | undefined,
+ name: string,
+ value: any,
+ shouldTriggerSaveCallback?: boolean, // defaults to true
+): void;
+```
+
+Text inputs should pass `false` for `shouldTriggerSaveCallback` on change and `true` on blur. Discrete inputs such as selects and radio groups should pass `true`.
+
+`useSetDefaultValue({ formName?, componentType, name, defaultValue, shouldTriggerSaveCallback? })` persists `defaultValue` once streaming finishes, but only when the field has no value yet. `shouldTriggerSaveCallback` defaults to `false`.
+
+## Form validation
+
+Validation helpers are opt-in for your custom form components:
+
+| Export | Purpose |
+| :----------------------------------- | :------------------------------------------------------------- |
+| `createFormValidation()` | Create a `FormValidationContextValue` backed by Vue `reactive` |
+| `provideFormValidation(value)` | Share a validation context with descendants |
+| `useFormValidation()` | Inject the closest context, or `null` when none was provided |
+| `parseRules`, `parseStructuredRules` | Convert validation declarations into parsed rules |
+| `validate`, `builtInValidators` | Run validation or access built-in validators |
+
+The context exposes a reactive `errors` record, `validateField`, `registerField`, `unregisterField`, `validateForm`, and `clearFieldError`. Register fields with `registerField(name, rules, getValue)`, unregister them in `onUnmounted`, and call `validateForm()` before triggering the submit action. A validation context reports errors; your components render those messages and enforce submission behavior.
+
+## Tool providers
+
+`toolProvider` is a map of async functions, an `McpClientLike` object, or `null`. A function-map entry receives an argument object and returns a promise. MCP-like clients expose `callTool({ name, arguments })`.
+
+```ts
+const toolProvider = {
+ async get_status(args: Record<string, unknown>) {
+ const response = await fetch(`/api/status?id=${encodeURIComponent(String(args.id))}`);
+ if (!response.ok) throw new Error("Could not load status");
+ return response.json();
+ },
+};
+```
+
+Pass it through `:tool-provider`. The runtime executes `Query()` calls and mutations invoked by action steps, and reads the latest `toolProvider` value on every call. Calling a name missing from a function map throws `ToolNotFoundError`. Keep secrets and privileged operations in your server endpoints. Use `queryLoader` and `useIsQueryLoading()` to provide loading feedback.
+
+## Parser and errors
+
+`createParser` and `createStreamingParser` are re-exported from `@openuidev/lang-core`. A parser takes the library's JSON schema and optional root name:
+
+```ts
+import { createParser } from "@openuidev/vue-lang";
+
+const parser = createParser(library.toJSONSchema(), "Greeting");
+const result = parser.parse('root = Greeting("Alice")');
+
+console.log(result.root, result.meta.errors, result.meta.unresolved);
+```
+
+In server-only code, import parser and prompt utilities directly from `@openuidev/lang-core`.
+
+Inspect `ParseResult.meta.errors` and the renderer's `onError` callback. `OpenUIError.code` distinguishes errors such as `parse-failed`, `missing-required`, `null-required`, `unknown-component`, `excess-args`, `tool-not-found`, `tool-error`, and `mcp-error`. Check unresolved references and the presence of a root before treating a complete model response as valid.
+
+## Types
+
+The package exports `Library`, `LibraryDefinition`, `DefinedComponent`, `ComponentRenderer` (a Vue `Component`), `ComponentRenderProps`, `RenderNodeResult`, `ComponentGroup`, `SubComponentOf`, `PromptOptions`, `RendererProps`, `OpenUIContextValue`, `ActionConfig`, `FormValidationContextValue`, `ParsedRule`, `ValidatorFn`, and the shared Lang Core `ActionEvent`, `ElementNode`, `EvaluationContext`, `McpClientLike`, `OpenUIError`, `ParseResult`, `ToolProvider`, and `LibraryJSONSchema` types.
+
+Other value exports are `tagSchemaId`, `BuiltinActionType`, `ToolNotFoundError`, and `extractToolResult`, re-exported from Lang Core. `extractToolResult` unwraps an MCP `callTool` result: it returns `structuredContent` when present, otherwise the text content parsed as JSON when possible, and throws when the result is an error.
diff --git a/package.json b/package.json
index 8fc503b0e..690180636 100644
--- a/package.json
+++ b/package.json
@@ -3,7 +3,7 @@
"version": "1.0.1",
"private": true,
"packageManager": "[email protected]",
- "description": "A full-stack, renderer-agnostic Generative UI framework with a streaming-first language, official React support, and community integrations for other frameworks",
+ "description": "A full-stack, framework-agnostic Generative UI framework with a streaming-first language and first-party runtimes for React, Vue, Svelte, and Angular",
"main": "index.js",
"scripts": {
"examples:install": "node scripts/manage-starters.mjs examples install",