{"name":"mdx-a2ui: Safely Convert MDX to A2UI JSON for Enhanced Data Models","description":"mdx-a2ui is an experimental project designed to convert MDX content, which combines prose and a closed component catalog, into A2UI JSON. This tool parses JSX without evaluation, ensuring a secure conversion process. It aims to leverage MDX for authoring while benefiting from A2UI's structured data model and validation capabilities.","github":"https://github.com/cixzhang/mdx-a2ui","url":"https://osrepos.com/repo/cixzhang-mdx-a2ui","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/cixzhang-mdx-a2ui","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/cixzhang-mdx-a2ui.md","json":"https://osrepos.com/repo/cixzhang-mdx-a2ui.json","topics":["MDX","A2UI","JSON Conversion","Content Parsing","Developer Tool","Experimental","Open Source"],"keywords":["MDX","A2UI","JSON Conversion","Content Parsing","Developer Tool","Experimental","Open Source"],"stars":null,"summary":"mdx-a2ui is an experimental project designed to convert MDX content, which combines prose and a closed component catalog, into A2UI JSON. This tool parses JSX without evaluation, ensuring a secure conversion process. It aims to leverage MDX for authoring while benefiting from A2UI's structured data model and validation capabilities.","content":"## Introduction\n\n`mdx-a2ui` is an experimental project by cixzhang that offers a unique approach to converting MDX content into A2UI JSON. This tool focuses on parsing MDX, including its JSX components, without ever evaluating the code, thus enhancing security. It bridges the gap between MDX as an authoring format and A2UI as a robust data model.\n\nThe intended flow is:\n\n\nagent writes MDX  ?  repair (if still streaming)  ?  convert  ?  A2UI JSON  ?  any A2UI renderer\n\n\n## Why Use and Benefits\n\nThe project addresses the distinct strengths of MDX and A2UI. MDX provides a superior authoring experience for an agent, allowing prose to remain prose while interactive elements become components. It is significantly denser than the A2UI it produces, which reduces context costs for models on every replay.\n\nConversely, A2UI excels as a data model, offering a schema, a validator, renderers for several design systems, and clients that are not a web browser. By converting instead of compiling, `mdx-a2ui` allows users to benefit from both formats securely. An MDX document is code, and `evaluate()` runs it, which is not safe. This library converts instead, accepting attribute expressions only if they parse as a JSON literal, ensuring no evaluator is in the path to abuse.\n\n## Installation\n\nAs an experimental project, `mdx-a2ui` is not yet published to npm. Installation details are not available, and it is not recommended for production use at this stage. The project status indicates that nothing is stable, and all exports carry an `experimental_` prefix.\n\n## Examples\n\nGiven its experimental status and lack of an npm package, specific usage examples are not provided for direct implementation. Developers interested in contributing or exploring the codebase can refer to the GitHub repository for the latest updates.\n\n## Links\n\n*   GitHub Repository: [cixzhang/mdx-a2ui](https://github.com/cixzhang/mdx-a2ui){:target=\"_blank\"}\n*   License: [MIT License](https://github.com/cixzhang/mdx-a2ui/blob/main/LICENSE){:target=\"_blank\"}","metrics":{"detailViews":0,"githubClicks":0},"dates":{"published":null,"modified":"2026-09-09T08:42:13.000Z"}}