Draft
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Rspack Bundle Analysis
Main CompilerSource:
Total emitted JS: 6.35 MB Runtime CompilerSource:
Total emitted JS: 5.38 MB Package Footprint (npm pack + npm install)
|
- add typed MCP Apps protocol/constants and React adapter via useMcpApp() - support newer MCP Apps host features like view modes, resources, messaging, model-context updates, and size reporting - tighten public types and reduce unnecessary unknown in the UI/runtime surface
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New UI Package:
@xmcp-dev/uiWe've introduced a new UI package
@xmcp-dev/uithat sits closer to shadcn/ui in spirit than a low-level widget schema. It supports two complementary authoring modes that share the same visual foundation:1. Direct React Authoring (Human-friendly)
Engineers can build UIs using familiar, package-owned components such as:
Card,Button,Input,Select,Table,Alert,Badge,Checkbox,Switch,Textarea, and layout primitives.This provides a clean, shadcn-style developer experience.
2. Programmatic JSON Authoring (Agent-friendly)
Agents and tools can generate a JSON
AppSchema, which is then rendered by the same runtime and component system. Both paths use the same component vocabulary and theming layer, ensuring visual consistency.What Was Added
App,AppSchema,ThemeProvider,ThemeTokens, etc.classNamesupport for JSON-rendered components, enabling per-instance customization even in programmatic UIsDemo / Showcase
We built a new
ui-showcaseexample that demonstrates:renderJsontool for rendering raw JSON App SchemasWhat This Proves
Future Considerations
Renderer Registry Architecture
The current registry is simple and functional but manual. As the component set grows, we should move toward a declarative component-definition model where each component declares its schema shape, renderer binding, React primitive mapping, and metadata. This would reduce drift between validation, runtime, and documentation.
Stronger Renderer Contracts
While the renderer is already cleaner, the binding layer could become loose over time. Long-term, we should make JSON-rendered component contracts more explicit and strictly typed.
Better Layer Separation
Current structure (
react/,components/,renderer/) is solid. We should enforce this separation more strictly so primitives stay pure and schema bindings remain thin.More Forgiving LLM Input Path
The current
renderJsonis quite strict. For better agent experience, we should consider:Slot-level Styling Overrides
Currently customization is mostly top-level
className+ app-level tokens. In the future, we may want slot-level overrides (e.g.headerClassName,contentClassName,triggerClassName) especially for the JSON/programmatic path.Theming Maturity
The token system is a good foundation. Future improvements could include named presets, theme inheritance, per-app/per-section scoping, and clearer documentation of stable/public tokens.
Long-term Extensibility
If external teams will build on top of this package, we need to decide whether extensions should happen via:
This decision will significantly impact the registry and schema design.