mcp-native 0.2.0 → 0.4.0

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.
Files changed (2) hide show
  1. package/README.md +32 -11
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -15,9 +15,9 @@
15
15
 
16
16
  > **Experimental:** MCP Native is a proof of concept, not a production-ready MCP or React Native runtime. APIs may change before `1.0.0`.
17
17
 
18
- > **Compatibility:** the initial tool/resource boundary preserves MCP `2026-07-28` fields, but complete MCP conformance is still in progress. The current declarative `0.1` surface is not A2UI v1.0, and the WebView primitives are not a complete MCP Apps host. See the [standards compatibility matrix](https://github.com/pablospaniard/mcp-native/blob/main/docs/standards-compatibility.md).
18
+ > **Compatibility:** the initial tool/resource boundary preserves MCP `2026-07-28` fields, but complete MCP conformance is still in progress. The package exposes the feature-scoped A2UI v1.0 Candidate profile and retains custom `0.1` APIs only as deprecated migration support; this is not an unqualified A2UI renderer claim. The WebView primitives are not a complete MCP Apps host. See the [A2UI profile](https://github.com/pablospaniard/mcp-native/blob/main/docs/a2ui-v1-conformance.md) and [standards matrix](https://github.com/pablospaniard/mcp-native/blob/main/docs/standards-compatibility.md).
19
19
 
20
- `mcp-native` is the convenience package for the runtime and UI APIs. It re-exports the runtime contracts, declarative surface parser, trusted native renderer and hooks, and policy-gated WebView compatibility primitives from focused `@mcp-native/*` packages. Transport adapters are installed separately.
20
+ `mcp-native` is the convenience package for the runtime and UI APIs. It re-exports the runtime contracts, A2UI v1 lifecycle/capability/renderer-message APIs, trusted native renderer and hooks, deprecated custom surface migration APIs, and policy-gated WebView compatibility primitives from focused `@mcp-native/*` packages. Transport adapters are installed separately.
21
21
 
22
22
  ## Install
23
23
 
@@ -27,7 +27,17 @@ npm install mcp-native react
27
27
 
28
28
  Add `react-native` when mounting native surfaces. The package is ESM-only and includes TypeScript declarations.
29
29
 
30
- ## End-to-end preview
30
+ ## A2UI v1 Candidate path
31
+
32
+ Version `0.4.0` re-exports the APIs needed to negotiate the project-owned binding, resolve official
33
+ v1 JSONL lifecycle envelopes, maintain bounded ordered surface state, apply explicit host
34
+ component/event/function policies, and mount the supported native subset through
35
+ `A2uiV1NativeSurface`. The mounted surface keeps string edits renderer-local and returns validated
36
+ official action envelopes to a host callback; it never selects a return transport. See the
37
+ [complete v1 host-flow example](https://github.com/pablospaniard/mcp-native#a2ui-v1-candidate-host-flow)
38
+ and the [`@mcp-native/react-native` adapter documentation](https://github.com/pablospaniard/mcp-native/tree/main/packages/react-native#a2ui-v1-render-plan-adapter).
39
+
40
+ ## Deprecated `0.1` proof-model preview
31
41
 
32
42
  ```tsx
33
43
  import {
@@ -91,12 +101,12 @@ The host supplies the locally bundled native components and explicitly allows th
91
101
 
92
102
  ## Included packages
93
103
 
94
- | Package | What it provides |
95
- | ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------- |
96
- | [`@mcp-native/core`](https://www.npmjs.com/package/@mcp-native/core) | MCP client contracts, runtime delegation, JSON types, and declared tool actions. |
97
- | [`@mcp-native/a2ui`](https://www.npmjs.com/package/@mcp-native/a2ui) | Strict parsing for the internal `0.1` proof-of-concept surface. |
98
- | [`@mcp-native/react-native`](https://www.npmjs.com/package/@mcp-native/react-native) | Trusted render plans, React hooks, and a fixed host-owned component catalog. |
99
- | [`@mcp-native/webview`](https://www.npmjs.com/package/@mcp-native/webview) | HTML policy primitives for the planned MCP Apps compatibility path. |
104
+ | Package | What it provides |
105
+ | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------- |
106
+ | [`@mcp-native/core`](https://www.npmjs.com/package/@mcp-native/core) | MCP client contracts, runtime delegation, JSON types, and declared tool actions. |
107
+ | [`@mcp-native/a2ui`](https://www.npmjs.com/package/@mcp-native/a2ui) | Feature-scoped v1 Candidate adapter plus deprecated `0.1` migration APIs. |
108
+ | [`@mcp-native/react-native`](https://www.npmjs.com/package/@mcp-native/react-native) | Trusted plans, local v1 state/actions, hooks, and a host-owned component catalog. |
109
+ | [`@mcp-native/webview`](https://www.npmjs.com/package/@mcp-native/webview) | HTML policy primitives for the planned MCP Apps compatibility path. |
100
110
 
101
111
  Install an individual package instead when you only need one layer.
102
112
 
@@ -108,15 +118,26 @@ Use the separately installable [`@mcp-native/mcp`](https://github.com/pablospani
108
118
  - strict validation for container, text, button, and text-input nodes;
109
119
  - declared tool-action dispatch;
110
120
  - strict A2UI resource-link resolution from tool results;
111
- - trusted render plans for `View`, `Text`, `Button`, and `TextInput`;
121
+ - schema-validated A2UI v1 JSONL lifecycle state and explicit host policies;
122
+ - strict A2UI v1 catalog-capability parsing and overlap negotiation;
123
+ - bounded A2UI v1 dynamic lists with relative renderer-local bindings and `@index`;
124
+ - bounded A2UI v1 `formatString` execution and host-callback action envelopes;
125
+ - host-localized A2UI v1 number and currency formatting;
126
+ - bounded host-localized A2UI v1 date formatting;
127
+ - host-localized A2UI v1 plural selection and pure boolean functions;
128
+ - bounded A2UI v1 validation functions and renderer-side field and button checks;
129
+ - press-time, host-policy-gated A2UI v1 HTTP(S) `openUrl` actions;
130
+ - trusted render plans for `View`, `Text`, `Button`, and `TextInput`, with closed host-owned
131
+ variants for supported A2UI structure and style hints;
112
132
  - mounting through host-provided components with action and text-binding event translation;
133
+ - typed adapters from trusted native primitives into locally bundled design-system components;
113
134
  - memoized render-plan and safely observed asynchronous action-dispatch hooks;
114
135
  - policy-gated inline and remote HTML document descriptions;
115
136
  - MCP `2026-07-28` tool/resource field preservation through the official SDK adapter;
116
137
  - pinned current-protocol integration coverage through the SDK HTTP handler/fetch path;
117
138
  - ESM exports, TypeScript declarations, automated tests, and signed npm provenance.
118
139
 
119
- The project does not yet include local binding state, streaming UI updates, capability negotiation, authentication helpers, or a runnable mobile demo. Follow the [roadmap](https://github.com/pablospaniard/mcp-native#roadmap) for progress.
140
+ The supported A2UI v1 native subset now includes renderer-local absolute and dynamic-list-relative string bindings, bounded `formatString`, host-localized number, currency, date, and plural formatting, validation functions and supported renderer checks, pure boolean functions, template-instance action resolution, `@index` with offsets, host-callback action envelopes, policy-gated HTTP(S) `openUrl`, and closed catalog-capability metadata with inline catalogs disabled. Full streaming host integration, transport placement for A2UI capability objects, authentication helpers, and a runnable mobile demo remain incomplete. Follow the [roadmap](https://github.com/pablospaniard/mcp-native#roadmap) for progress.
120
141
 
121
142
  ## Security model
122
143
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-native",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "Convenience package for the MCP Native runtime.",
5
5
  "keywords": [
6
6
  "a2ui",
@@ -37,10 +37,10 @@
37
37
  "access": "public"
38
38
  },
39
39
  "dependencies": {
40
- "@mcp-native/a2ui": "^0.2.0",
41
- "@mcp-native/core": "^0.2.0",
42
- "@mcp-native/react-native": "^0.2.0",
43
- "@mcp-native/webview": "^0.2.0"
40
+ "@mcp-native/a2ui": "^0.4.0",
41
+ "@mcp-native/core": "^0.4.0",
42
+ "@mcp-native/react-native": "^0.4.0",
43
+ "@mcp-native/webview": "^0.4.0"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "react": ">=18.3.1 <20",