@mcp-native/react-native 0.9.1 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +30 -22
- package/package.json +9 -12
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 MCP Native contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -12,23 +12,30 @@
|
|
|
12
12
|
|
|
13
13
|
</div>
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
`@mcp-native/react-native` turns a surface validated by `@mcp-native/a2ui` into native UI using
|
|
16
|
+
components supplied by your application. It supports the complete pinned A2UI basic catalog,
|
|
17
|
+
policy-gated media, and locally compiled host extensions. Your app keeps control of the component
|
|
18
|
+
implementations, visual design, and action delivery.
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
The renderer is an internal platform layer, not proof of complete A2UI v1.0 conformance. The custom `0.1` surface remains available only through deprecated migration APIs, while the v1.0 adapter converts the complete pinned basic catalog, including bounded dynamic lists and policy-gated media, into the same host-owned `NativeElement` boundary. Exactly negotiated local host extensions use a separate closed registration boundary. See the [feature-scoped conformance profile](https://github.com/pablospaniard/mcp-native/blob/main/docs/a2ui-v1-conformance.md).
|
|
20
|
+
The renderer implements the native portion of the documented A2UI v1 Candidate profile. The v1 adapter converts the complete pinned basic catalog, including bounded dynamic lists and policy-gated media, into the host-owned `NativeElement` boundary. Exactly negotiated local host extensions use a separate closed registration boundary. The custom `0.1` surface remains available through migration APIs. See the [feature-scoped A2UI profile](https://github.com/pablospaniard/mcp-native/blob/main/docs/a2ui-v1-conformance.md) for exact coverage.
|
|
22
21
|
|
|
23
22
|
## Install
|
|
24
23
|
|
|
25
24
|
```bash
|
|
26
|
-
npm install @mcp-native/react-native react
|
|
25
|
+
npm install @mcp-native/react-native react
|
|
27
26
|
```
|
|
28
27
|
|
|
29
|
-
`@mcp-native/a2ui` and `@mcp-native/core` are installed as dependencies. React
|
|
28
|
+
`@mcp-native/a2ui` and `@mcp-native/core` are installed as dependencies. React `>=18.1.0` is the
|
|
29
|
+
only peer dependency. The renderer does not depend on Expo or import React Native; a native host
|
|
30
|
+
supplies its locally bundled components and platform integrations.
|
|
31
|
+
|
|
32
|
+
## Start with the A2UI v1 renderer
|
|
33
|
+
|
|
34
|
+
New integrations mount `A2uiV1NativeSurface` with an explicit catalog policy and locally bundled
|
|
35
|
+
components. Continue with the [v1 render-plan adapter](#a2ui-v1-render-plan-adapter) for the complete
|
|
36
|
+
host flow, catalog mapping, local state, validation, actions, media, and extension support.
|
|
30
37
|
|
|
31
|
-
##
|
|
38
|
+
## Legacy custom `0.1` migration
|
|
32
39
|
|
|
33
40
|
Use the explicit legacy subpaths during `0.9.x`. These APIs leave package roots at `1.0.0`; the
|
|
34
41
|
subpaths remain frozen for migration and security fixes.
|
|
@@ -84,7 +91,7 @@ The renderer uses only the currently allowed component names:
|
|
|
84
91
|
type NativeComponentName = "Button" | "Text" | "TextInput" | "View";
|
|
85
92
|
```
|
|
86
93
|
|
|
87
|
-
This example uses deprecated custom `0.1` APIs. The application host decides how each name maps to a locally bundled component and how declared button actions reach `McpNativeRuntime`. `onBindingChange` reports a validated binding name and the next text value for that legacy
|
|
94
|
+
This example uses deprecated custom `0.1` APIs. The application host decides how each name maps to a locally bundled component and how declared button actions reach `McpNativeRuntime`. `onBindingChange` reports a validated binding name and the next text value for that legacy surface. New hosts should use `A2uiV1NativeSurface`.
|
|
88
95
|
|
|
89
96
|
## A2UI v1 render-plan adapter
|
|
90
97
|
|
|
@@ -121,18 +128,19 @@ registry and an exact `hostExtensionPolicy` grant. Advertise their catalog IDs w
|
|
|
121
128
|
`getA2uiV1NativeSupportedHostExtensionCatalogIds` only after the local registration and policy are
|
|
122
129
|
installed. See the [media and extension guide](../../docs/media-and-host-extensions.md).
|
|
123
130
|
|
|
124
|
-
These mappings have automated host-boundary coverage. The [Expo Go
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
repeatable Node.js render-plan budgets
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
131
|
+
These mappings have automated host-boundary coverage. The runnable [Expo Go todo
|
|
132
|
+
app](../../examples/expo-go-todolist/README.md) demonstrates the lifecycle, catalog, bindings,
|
|
133
|
+
actions, persistence, and accessibility boundary in a complete native workflow. The [automated
|
|
134
|
+
robustness gates](../../docs/a2ui-v1-performance.md) define repeatable Node.js render-plan budgets
|
|
135
|
+
and fixed-seed generated-input coverage.
|
|
136
|
+
|
|
137
|
+
For release/platform testing, `npm run native:host:prepare` generates a pinned temporary native
|
|
138
|
+
host. It installs local package tarballs and the accessibility, complete-catalog, media, and
|
|
139
|
+
Codegen/Fabric extension fixtures. This is reproducible integration evidence, not a package peer or
|
|
140
|
+
native-framework version boundary.
|
|
141
|
+
The [Expo Go integration proof](../../docs/native-accessibility-testing.md) documents the runnable
|
|
142
|
+
app-level evidence. Generated hosts remain the automated package fixtures; the Expo app complements
|
|
143
|
+
them with a workflow users can launch and inspect directly.
|
|
136
144
|
|
|
137
145
|
The Milestone 9 fixture also places this native surface beside an isolated MCP Apps WebView through
|
|
138
146
|
the convenience package's host-owned coordinator. It exercises fixed accessibility order,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-native/react-native",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.3",
|
|
4
4
|
"description": "React Native renderer primitives for MCP Native.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"a2ui",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
23
|
"dist",
|
|
24
|
+
"LICENSE",
|
|
24
25
|
"README.md"
|
|
25
26
|
],
|
|
26
27
|
"type": "module",
|
|
@@ -30,19 +31,21 @@
|
|
|
30
31
|
"exports": {
|
|
31
32
|
".": {
|
|
32
33
|
"types": "./dist/index.d.ts",
|
|
33
|
-
"import": "./dist/index.js"
|
|
34
|
+
"import": "./dist/index.js",
|
|
35
|
+
"default": "./dist/index.js"
|
|
34
36
|
},
|
|
35
37
|
"./legacy": {
|
|
36
38
|
"types": "./dist/legacy.d.ts",
|
|
37
|
-
"import": "./dist/legacy.js"
|
|
39
|
+
"import": "./dist/legacy.js",
|
|
40
|
+
"default": "./dist/legacy.js"
|
|
38
41
|
}
|
|
39
42
|
},
|
|
40
43
|
"publishConfig": {
|
|
41
44
|
"access": "public"
|
|
42
45
|
},
|
|
43
46
|
"dependencies": {
|
|
44
|
-
"@mcp-native/a2ui": "^0.9.
|
|
45
|
-
"@mcp-native/core": "^0.9.
|
|
47
|
+
"@mcp-native/a2ui": "^0.9.3",
|
|
48
|
+
"@mcp-native/core": "^0.9.3"
|
|
46
49
|
},
|
|
47
50
|
"devDependencies": {
|
|
48
51
|
"@types/react": "19.1.17",
|
|
@@ -50,12 +53,6 @@
|
|
|
50
53
|
"test-renderer": "1.2.0"
|
|
51
54
|
},
|
|
52
55
|
"peerDependencies": {
|
|
53
|
-
"react": ">=18.
|
|
54
|
-
"react-native": ">=0.87.0 <1"
|
|
55
|
-
},
|
|
56
|
-
"peerDependenciesMeta": {
|
|
57
|
-
"react-native": {
|
|
58
|
-
"optional": true
|
|
59
|
-
}
|
|
56
|
+
"react": ">=18.1.0"
|
|
60
57
|
}
|
|
61
58
|
}
|