@nuwax-ai/openui-mcp 0.1.9 → 0.1.10

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/CHANGELOG.md ADDED
@@ -0,0 +1,24 @@
1
+ # Changelog
2
+
3
+ ## 0.1.10
4
+
5
+ - Serve the optional shared OpenUI Runtime page for both inline and sidecar
6
+ Artifacts; PC Web inline remains direct-Renderer-first.
7
+ - Add the `desktop-query` page transport used by the conversation-scoped Nuwax
8
+ PC proxy.
9
+ - Use relative Runtime asset and Artifact URLs so non-root proxy prefixes work.
10
+ - Send `OPENUI_READY` and `OPENUI_RESIZE` messages for iframe integration and
11
+ automatic height updates.
12
+ - Import the official OpenUI UI stylesheet inside the Runtime page to isolate it
13
+ from host reset styles.
14
+ - Correct required validation for dates, date ranges, wrapped values, and option
15
+ groups.
16
+ - Localize required validation messages for English, Simplified Chinese,
17
+ Traditional Chinese, and Japanese.
18
+ - Add cache-versioned Runtime assets and synchronize the npm package, MCP server,
19
+ and page asset versions.
20
+
21
+ ## 0.1.9 and earlier
22
+
23
+ - Initial `nuwax_render_openui` tool, Artifact contract, authoring prompt, DSL
24
+ schema resources, stdio/Streamable HTTP transports, and sidecar Runtime.
package/README.md CHANGED
@@ -1,10 +1,11 @@
1
1
  # Nuwax OpenUI MCP
2
2
 
3
3
  OpenUI over MCP for Nuwax Agent sessions. One MCP tool publishes a validated,
4
- versioned OpenUI artifact that a host can render in either of two places:
4
+ versioned OpenUI artifact that a host can present in either of two places:
5
5
 
6
- - **inline** — native OpenUI React UI directly under the existing tool bar;
7
- - **sidecar** a trusted page URL opened in the existing preview iframe.
6
+ - **inline** — rendered directly by the host Renderer by default, with an
7
+ optional OpenUI Runtime iframe mode;
8
+ - **sidecar** — the same Runtime page opened in the preview area or a full page.
8
9
 
9
10
  The project intentionally does not replace the host's chat transport, session
10
11
  model, permission system, or tool status UI.
@@ -16,8 +17,12 @@ This repository contains the first executable foundation:
16
17
  - `nuwax_render_openui` MCP tool;
17
18
  - `nuwax.openui/v1` input and structured-result contract;
18
19
  - stdio and Streamable HTTP transports;
19
- - inline artifacts and sidecar page artifacts;
20
- - an OpenUI React sidecar renderer;
20
+ - direct Renderer and page Runtime options for inline artifacts;
21
+ - one OpenUI React page Runtime shared by iframe-inline and sidecar artifacts;
22
+ - relative-path and desktop-query transports for proxied Runtime pages;
23
+ - `OPENUI_READY` / `OPENUI_RESIZE` page messages for iframe auto-sizing;
24
+ - localized required validation, including date and date-range values;
25
+ - isolated Runtime styles, independent from the Nuwax host reset stylesheet;
21
26
  - source policy, artifact TTL, Host validation, CSP, and tests.
22
27
 
23
28
  The default artifact store is in-memory. Production deployments should provide
@@ -29,10 +34,21 @@ a durable, tenant-aware `ArtifactStore` and authentication at the edge.
29
34
  Agent
30
35
  └─ MCP call: nuwax_render_openui
31
36
  └─ validate + persist artifact
32
- ├─ inline → structuredContent → host OpenUI Renderer
33
- └─ sidecar signed/trusted page URL → preview iframe
37
+ ├─ structuredContent → host discovers the artifact
38
+ ├─ inline host Renderer (default)
39
+ └─ shared Runtime page
40
+ ├─ inline iframe (optional)
41
+ └─ sidecar preview / full page
34
42
  ```
35
43
 
44
+ `presentation.mode` controls where the host presents the Artifact; it does not
45
+ force an inline rendering technology. PC hosts should default inline Artifacts
46
+ to the direct Renderer and may explicitly select the iframe Runtime for stronger
47
+ style isolation or cross-client page reuse. `GET /openui/pages/:id` is available
48
+ for both inline and sidecar artifacts. For backward compatibility, only sidecar
49
+ structured results currently contain `artifact.page.url`; an iframe-inline host
50
+ builds its trusted page URL from its configured proxy route and `artifactId`.
51
+
36
52
  OpenUI runtime queries and mutations are intentionally not proxied in the first
37
53
  release. They must be added behind a host-controlled MCP proxy with tenant,
38
54
  conversation, artifact, allowlist, permission, and audit checks.
@@ -80,8 +96,8 @@ Example MCP client configuration:
80
96
 
81
97
  The stdio process starts the sidecar HTTP server by default and both transports
82
98
  share the same in-memory artifact store. Set
83
- `NUWAX_OPENUI_SIDECAR_SERVER_ENABLED=false` only when inline rendering is the
84
- sole requirement or another process owns the sidecar service.
99
+ `NUWAX_OPENUI_SIDECAR_SERVER_ENABLED=false` only when another process owns the
100
+ page Runtime service. Page-based inline rendering also needs this service.
85
101
 
86
102
  For NuwaClaw, configure this server as persistent so all Agent sessions share
87
103
  one process and one sidecar port:
@@ -91,7 +107,7 @@ one process and one sidecar port:
91
107
  "mcpServers": {
92
108
  "nuwax-openui": {
93
109
  "command": "npx",
94
- "args": ["-y", "@nuwax-ai/openui-mcp@0.1.4"],
110
+ "args": ["-y", "@nuwax-ai/openui-mcp@0.1.10"],
95
111
  "env": {
96
112
  "NUWAX_OPENUI_HOST": "127.0.0.1",
97
113
  "NUWAX_OPENUI_PORT": "8787",
@@ -124,7 +140,33 @@ Endpoints:
124
140
  | `POST /mcp` | MCP Streamable HTTP |
125
141
  | `GET /healthz` | Health check |
126
142
  | `GET /openui/artifacts/:id` | Artifact document for the renderer |
127
- | `GET /openui/pages/:id` | Sidecar page |
143
+ | `GET /openui/pages/:id` | Shared inline/sidecar Runtime page |
144
+ | `GET /openui/assets/*` | Runtime JavaScript and CSS |
145
+
146
+ ### Proxied page transports
147
+
148
+ The default page uses relative path assets and Artifact lookup:
149
+
150
+ ```text
151
+ GET /openui/pages/{artifactId}
152
+ ├─ ../assets/sidecar.css
153
+ ├─ ../assets/sidecar.js
154
+ └─ ../artifacts/{artifactId}
155
+ ```
156
+
157
+ For the Nuwax PC desktop/file proxy, request the page with
158
+ `?transport=desktop-query`. The generated page keeps all subsequent requests on
159
+ the same conversation-scoped URL and changes only the query:
160
+
161
+ ```text
162
+ ?openui=css
163
+ ?openui=js
164
+ ?openui=artifact&artifactId={artifactId}
165
+ ```
166
+
167
+ The query transport is a page transport convention, not a general-purpose
168
+ proxy. The Nuwax host must derive the conversation and target service from its
169
+ authenticated context and must not accept an arbitrary upstream URL.
128
170
 
129
171
  ## Tool contract
130
172
 
@@ -196,21 +238,79 @@ runtime behavior.
196
238
 
197
239
  ## Host integration
198
240
 
199
- For inline mode, mount the OpenUI renderer inside the existing tool block:
241
+ PC Web inline supports two rendering strategies. The direct Renderer is the
242
+ default because it has no local Runtime/network dependency and integrates with
243
+ the existing conversation lifecycle:
244
+
245
+ ```tsx
246
+ <Renderer
247
+ library={openuiLibrary}
248
+ response={artifact.document.source}
249
+ isStreaming={false}
250
+ />
251
+ ```
252
+
253
+ The host may explicitly select iframe mode for isolation or page-runtime
254
+ testing:
200
255
 
201
256
  ```tsx
202
257
  <ToolProcessShell header={existingToolBar}>
203
- <Renderer
204
- library={nuwaxOpenUiLibrary}
205
- response={artifact.document.source}
206
- isStreaming={status === 'receiving'}
258
+ <iframe
259
+ src={resolveTrustedOpenUiPageUrl(artifact.artifactId)}
260
+ sandbox="allow-scripts"
261
+ title={artifact.title}
207
262
  />
208
263
  </ToolProcessShell>
209
264
  ```
210
265
 
211
- For sidecar mode, use `artifact.page.url` only after the host validates its
212
- origin and artifact context. Use a dedicated restrictive iframe sandbox; do not
213
- reuse a broad legacy sandbox profile.
266
+ For sidecar mode, `artifact.page.url` can be used only after the host validates
267
+ its origin and artifact context. Use a dedicated restrictive iframe sandbox;
268
+ do not reuse a broad legacy sandbox profile.
269
+
270
+ ### Page bridge and automatic height
271
+
272
+ After an Artifact is loaded, the Runtime sends these messages to its parent:
273
+
274
+ ```ts
275
+ type OpenUiRuntimeMessage =
276
+ | {
277
+ type: 'OPENUI_READY';
278
+ protocolVersion: 'nuwax.openui-page/v1';
279
+ artifactId: string;
280
+ }
281
+ | {
282
+ type: 'OPENUI_RESIZE';
283
+ protocolVersion: 'nuwax.openui-page/v1';
284
+ artifactId: string;
285
+ height: number;
286
+ };
287
+ ```
288
+
289
+ The current Runtime uses `ResizeObserver` on its rendered root, so form
290
+ validation messages, date selection, expanding content, and responsive wrapping
291
+ can update the iframe height. The host must validate `event.source`, the trusted
292
+ Runtime origin, `protocolVersion`, and `artifactId` before applying the height.
293
+ It should also clamp the height and provide an expand/scroll fallback for large
294
+ documents.
295
+
296
+ The v1 bridge currently reports readiness and size only. Host context, actions,
297
+ nonce/sequence replay protection, and native/mobile WebView bridges are planned
298
+ extensions and must not be assumed by clients yet.
299
+
300
+ ### Runtime styles, validation, and locale
301
+
302
+ The page Runtime imports the official `@openuidev/react-ui` stylesheet inside
303
+ its own document. This prevents host rules such as `button { color: inherit }`
304
+ from overriding iframe-rendered OpenUI button colors. A direct Renderer shares
305
+ the host document and must load the official layered stylesheet plus scoped,
306
+ unlayered compatibility overrides for host reset rules.
307
+
308
+ The page Runtime replaces the built-in `required` validator to correctly accept
309
+ `Date`, date-range objects, wrapped values, and selected checkbox maps. Required
310
+ messages follow `navigator.language` for English, Simplified Chinese,
311
+ Traditional Chinese, and Japanese. Unknown locales fall back to English. A host
312
+ using the direct Renderer must install the equivalent validator integration in
313
+ its own JavaScript context; Nuwax PC Web does this through its i18n runtime.
214
314
 
215
315
  ## Security model
216
316
 
@@ -1,5 +1,6 @@
1
1
  export * from './artifact-store.js';
2
2
  export * from './contracts.js';
3
+ export * from './version.js';
3
4
  export * from './mcp-server.js';
4
5
  export * from './openui-validator.js';
5
6
  export * from './policy.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  export * from './artifact-store.js';
2
2
  export * from './contracts.js';
3
+ export * from './version.js';
3
4
  export * from './mcp-server.js';
4
5
  export * from './openui-validator.js';
5
6
  export * from './policy.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../../src/mcp-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAepE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE/D,wBAAgB,qBAAqB,CACnC,aAAa,EAAE,mBAAmB,GACjC,SAAS,CAsJX"}
1
+ {"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../../src/mcp-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAgBpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE/D,wBAAgB,qBAAqB,CACnC,aAAa,EAAE,mBAAmB,GACjC,SAAS,CAsJX"}
@@ -1,12 +1,13 @@
1
1
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
2
  import { z } from 'zod';
3
3
  import { OPENUI_AUTHORING_PROMPT_NAME, OPENUI_GUIDE_RESOURCE_URI, OPENUI_REFERENCE_TOOL_NAME, OPENUI_SCHEMA_RESOURCE_URI, OPENUI_TOOL_NAME, openUiReferenceInputSchema, openUiArtifactSchema, renderOpenUiInputSchema, } from './contracts.js';
4
+ import { OPENUI_MCP_VERSION } from './version.js';
4
5
  import { getOpenUiDslSchema, getOpenUiReference } from './openui-reference.js';
5
6
  import { OpenUiPolicyError } from './policy.js';
6
7
  export function createOpenUiMcpServer(renderService) {
7
8
  const server = new McpServer({
8
9
  name: 'nuwax-openui-mcp',
9
- version: '0.1.4',
10
+ version: OPENUI_MCP_VERSION,
10
11
  });
11
12
  server.registerResource('nuwax-openui-dsl-schema', OPENUI_SCHEMA_RESOURCE_URI, {
12
13
  title: 'Nuwax OpenUI Lang v0.5 JSON Schema',
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["../../src/mcp-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,4BAA4B,EAC5B,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC1B,gBAAgB,EAChB,0BAA0B,EAC1B,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGhD,MAAM,UAAU,qBAAqB,CACnC,aAAkC;IAElC,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;QAC3B,IAAI,EAAE,kBAAkB;QACxB,OAAO,EAAE,OAAO;KACjB,CAAC,CAAC;IAEH,MAAM,CAAC,gBAAgB,CACrB,yBAAyB,EACzB,0BAA0B,EAC1B;QACE,KAAK,EAAE,oCAAoC;QAC3C,WAAW,EACT,6G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AAC,CAAC,KAAK,CAAC,OAAO;oBACf,CAAC,CAAC,kCAAkC,CAAC;YAC3C,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,GAAG,OAAO,2CAA2C,0BAA0B,8FAA8F;qBACpL;iBACF;gBACD,KAAK,EACH,KAAK,YAAY,iBAAiB;oBAChC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE;oBACtB,CAAC,CAAC,EAAE,IAAI,EAAE,yBAAyB,EAAE;aAC1C,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { OPENUI_MCP_VERSION } from './version.js';
1
2
  function escapeHtml(value) {
2
3
  return value
3
4
  .replaceAll('&', '&amp;')
@@ -6,14 +7,13 @@ function escapeHtml(value) {
6
7
  .replaceAll('"', '&quot;')
7
8
  .replaceAll("'", '&#039;');
8
9
  }
9
- const SIDECAR_ASSET_VERSION = '0.1.9';
10
10
  export function createSidecarPageHtml(artifactId, title, transport = 'path') {
11
11
  const stylesheetUrl = transport === 'desktop-query'
12
- ? `?openui=css&v=${SIDECAR_ASSET_VERSION}`
13
- : `../assets/sidecar.css?v=${SIDECAR_ASSET_VERSION}`;
12
+ ? `?openui=css&v=${OPENUI_MCP_VERSION}`
13
+ : `../assets/sidecar.css?v=${OPENUI_MCP_VERSION}`;
14
14
  const scriptUrl = transport === 'desktop-query'
15
- ? `?openui=js&v=${SIDECAR_ASSET_VERSION}`
16
- : `../assets/sidecar.js?v=${SIDECAR_ASSET_VERSION}`;
15
+ ? `?openui=js&v=${OPENUI_MCP_VERSION}`
16
+ : `../assets/sidecar.js?v=${OPENUI_MCP_VERSION}`;
17
17
  return `<!doctype html>
18
18
  <html lang="en">
19
19
  <head>
@@ -1 +1 @@
1
- {"version":3,"file":"page-template.js","sourceRoot":"","sources":["../../src/page-template.ts"],"names":[],"mappings":"AAAA,SAAS,UAAU,CAAC,KAAa;IAC/B,OAAO,KAAK;SACT,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC;SACxB,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC;SACvB,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC;SACvB,UAAU,CAAC,GAAG,EAAE,QAAQ,CAAC;SACzB,UAAU,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;AAC/B,CAAC;AAED,MAAM,qBAAqB,GAAG,OAAO,CAAC;AAEtC,MAAM,UAAU,qBAAqB,CACnC,UAAkB,EAClB,KAAa,EACb,YAAsC,MAAM;IAE5C,MAAM,aAAa,GACjB,SAAS,KAAK,eAAe;QAC3B,CAAC,CAAC,iBAAiB,qBAAqB,EAAE;QAC1C,CAAC,CAAC,2BAA2B,qBAAqB,EAAE,CAAC;IACzD,MAAM,SAAS,GACb,SAAS,KAAK,eAAe;QAC3B,CAAC,CAAC,gBAAgB,qBAAqB,EAAE;QACzC,CAAC,CAAC,0BAA0B,qBAAqB,EAAE,CAAC;IACxD,OAAO;;;;;;aAMI,UAAU,CAAC,KAAK,CAAC;mCACK,aAAa;;;wCAGR,UAAU,CAAC,UAAU,CAAC;iCAC7B,SAAS;;QAElC,CAAC;AACT,CAAC"}
1
+ {"version":3,"file":"page-template.js","sourceRoot":"","sources":["../../src/page-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,SAAS,UAAU,CAAC,KAAa;IAC/B,OAAO,KAAK;SACT,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC;SACxB,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC;SACvB,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC;SACvB,UAAU,CAAC,GAAG,EAAE,QAAQ,CAAC;SACzB,UAAU,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,qBAAqB,CACnC,UAAkB,EAClB,KAAa,EACb,YAAsC,MAAM;IAE5C,MAAM,aAAa,GACjB,SAAS,KAAK,eAAe;QAC3B,CAAC,CAAC,iBAAiB,kBAAkB,EAAE;QACvC,CAAC,CAAC,2BAA2B,kBAAkB,EAAE,CAAC;IACtD,MAAM,SAAS,GACb,SAAS,KAAK,eAAe;QAC3B,CAAC,CAAC,gBAAgB,kBAAkB,EAAE;QACtC,CAAC,CAAC,0BAA0B,kBAAkB,EAAE,CAAC;IACrD,OAAO;;;;;;aAMI,UAAU,CAAC,KAAK,CAAC;mCACK,aAAa;;;wCAGR,UAAU,CAAC,UAAU,CAAC;iCAC7B,SAAS;;QAElC,CAAC;AACT,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const OPENUI_MCP_VERSION = "0.1.10";
2
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,WAAW,CAAC"}
@@ -0,0 +1,2 @@
1
+ export const OPENUI_MCP_VERSION = '0.1.10';
2
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAAQ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuwax-ai/openui-mcp",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "OpenUI over MCP for Nuwax, with inline and sidecar rendering contracts.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -32,6 +32,7 @@
32
32
  "files": [
33
33
  "dist",
34
34
  "README.md",
35
+ "CHANGELOG.md",
35
36
  "LICENSE"
36
37
  ],
37
38
  "scripts": {