12 packages · MIT · shipped from main

Changelog

What shipped in MDMA, newest first. Versions are the ones the packages actually published — pulled from the release commits in the open-source repository.

Highlight
Permalink

Cross-format generative UI benchmark

A benchmark that runs four generative-UI formats against their own published prompts and their own validators, with auto-repair switched off for every format including MDMA. 1107 generations across three model tiers, every raw generation committed to the repo.

  • Feature

    MDMA holds its rate from flagship down to open weights

    On the 'renders every time' measure MDMA scores 94.4% on both Opus 5 and the open-weights Gemma-4-26B — a 0.0pp drop between tiers. OpenUI Lang drops 27.8pp over the same two models and json-render drops 44.4pp.

  • Feature

    Each format judged by its own validator

    Every format was given its own published system prompt and scored with its own validator, on a byte-identical user message with no format hints. The report discloses where a format's own validator disagrees with the harness.

  • Feature

    Prompt cost published alongside reliability

    System-prompt size is part of the bill: OpenUI Lang 5172 tokens, MDMA 5910, json-render 8466, A2UI 19689. Mean output tokens and a renderable-per-1k-tokens efficiency figure are reported per model.

Highlight
Permalink

Vue 3 renderer

MDMA documents now render in Vue 3, with the same public API as the React renderer. Three view layers over one headless core: React, Vue and React Native.

  • Feature

    @mobile-reality/mdma-renderer-vue

    Forms, tables, charts, approval gates and the rest of the catalog as interactive Vue 3 components, with full state, bindings, actions, policy, audit and PII redaction from the same spec + runtime stack.

  • Feature

    State through composables

    useComponentState, useBinding and useDocumentState return ComputedRefs, so reads stay reactive. MdmaProvider, MdmaThemeProvider, element overrides and custom variants are wired through provide/inject with exported InjectionKeys.

  • Feature

    Same stylesheet, portable themes

    The Vue package ships the same --mdma-* driven styles.css as the React renderer, so a theme object moves between the two unchanged. Components are defineComponent + h() in plain .ts — no SFCs, no bundler.

Highlight
Permalink

The custom component type

A tenth component type that lets a host register its own components while keeping the spec intent-level — and, unlike the older custom-type escape hatch, one an LLM can actually author.

  • Feature

    A stable envelope, not a type per component

    type: custom carries a name that selects a host-registered variant, a props record for its inputs and an actions map for its events. A model cannot invent type: timer, but it can emit type: custom with name: timer once that variant is in the catalog the host passes to buildSystemPrompt.

  • Feature

    registerCustomComponent()

    One runtime call registers a variant's handler and its props schema together. The parser validates the envelope against the union, then the props against the matching entry in customSchemas, prefixing errors with props.*.

  • Feature

    Unregistered names degrade, they do not break

    An unknown name passes the parse rather than failing it, so a document authored against a richer host still renders elsewhere; the renderer draws an inline notice instead of nothing.

  • Feature

    Prompt variants for the newest models

    Author, fixer and agent prompts document the envelope. Adds tuned variants for GPT-5.6 (sol / terra / luna), Claude Opus 4.8, Fable 5, Gemini 3.5 Flash and Grok 4.5.

Permalink

AG-UI: activity feed and human-in-the-loop

The AG-UI bridge grows a second delivery channel, shared state hydration, an agent activity feed and interrupts, so an agent run can stop on an approval gate and resume from the user's answer.

  • Feature

    A dedicated CUSTOM event channel

    A backend that would rather not interleave documents into visible prose can emit them on a CUSTOM event named mdma. Both channels feed one parse → store → render pipeline.

  • Feature

    Activity feed, kept out of the document store

    Tool calls, run steps and reasoning streams surface as an ordered feed via bridge.activity, each with a stable id, a kind, a label, a running/done status and streamed detail. Agent chatter and rendered components stay decoupled — render it as a timeline beside the documents, or ignore it.

  • Feature

    Interrupts and resume modes

    Interrupts on RUN_FINISHED surface as bridge.interrupts, with resumeMode of auto, interrupt or user-turn. Returning false from onAction hands resumption to the caller.

Permalink

Theming across all three renderers

An opt-in theme prop on MdmaDocument, with one token shape shared by web and native so a theme object is portable.

  • Feature

    light, dark, auto, or your own tokens

    Pass a preset, follow the OS preference with auto, or hand over a full MdmaTheme token object. Omit the prop and nothing changes — the default light look is unaffected.

  • Feature

    CSS variables, overridable in your own stylesheet

    The web stylesheet is driven by --mdma-* variables applied via data-theme or inline, so a theme can also be overridden directly in CSS. A document with no theme prop inherits from an ancestor MdmaThemeProvider.

  • Feature

    Derived states match your palette

    Button hover and the input focus ring derive from the base tokens through color-mix, so a custom primary gets a coherent hover and focus instead of the built-in purple. A custom dark theme also selects the dark base, so headings and code backgrounds follow.

  • Fix

    Native palettes unified with web

    The React Native defaults were a blue-primary palette; they now match the web renderer's light and dark themes exactly. The native table and chart renderers, whose bodies had no themed background, now fill their container.

Permalink

React Native renderer

The same MDMA document, rendered as native iOS and Android UI, reusing the headless spec and runtime stack unchanged.

  • Feature

    @mobile-reality/mdma-renderer-react-native

    Renders the built-in component types plus inline Markdown as native UI. Only the view layer is reimplemented with RN primitives — spec and runtime are shared with the web renderer.

  • Feature

    Theme provider and customizations from day one

    Ships MdmaDocument, per-component renderers, an MdmaThemeProvider with light and dark tokens, and customizations support.

Permalink

Routable tasklists and webhooks, state hydration

Completing a checklist or firing a webhook now resumes an AG-UI conversation, and a store can be created pre-populated from a persisted conversation.

  • Feature

    Tasklist completion and webhook triggers as events

    The tasklist renderer emits ACTION_TRIGGERED on the transition into all-items-checked, and the webhook renderer gains a trigger button emitting INTEGRATION_CALLED. The bridge routes both back into the agent run alongside submit, button and approve/deny.

  • Feature

    initialState on createDocumentStore

    Hydrate component values at store creation — restoring a persisted conversation, for instance. It overlays AST defaults without emitting audit events or marking fields touched, and applies only to freshly created components so a streaming re-parse never clobbers in-flight edits.

  • Fix

    No more 'unknown component' flash while streaming

    A half-streamed type inside an unclosed fence is held as a pending block with a loading skeleton instead of rendering an unknown-type notice, and updateAst re-initialises a component when its type changes between parses.

Permalink

AG-UI bridge

A bridge that renders MDMA documents streamed over the AG-UI protocol and routes user actions back into the agent run.

  • Feature

    @mobile-reality/mdma-agui

    A headless core, createMdmaAgentBridge, plus an optional React layer of useMdmaAgentStream and MdmaAgentView. Submit, approve and deny travel back into the run.

  • Feature

    No hard dependency on AG-UI

    AG-UI coupling is isolated to a minimal structural agent interface, so any @ag-ui/client HttpAgent works. A conformance test type-checks that interface against the real packages without shipping them.

Permalink

A DSL-aware prompt for the self-hosted model

The mobile-reality/mdma-il author variant now carries the MDMA-IL DSL grammar it was fine-tuned against, as a single source of truth instead of a copy living in the eval harness.

  • Feature

    MDMA-IL grammar in the prompt

    getAuthorPromptVariant('mobile-reality/mdma-il') returns the full authoring prompt — DSL input grammar, authoring rules and worked form, table and chart examples. The previous variant had none, which put the model out of distribution.