Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.
TypeScript browser-shellcontrol-planefile-managerhomelabmobile-firstnextjsptyreactself-hostedserver-managementshadcn-uisysadmintailwindcssterminaltypescriptvpsweb-desktopweb-terminal
fix(mcp): add native UI host probe
Rahmand51a42e23a92
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.mdindex fdf8e827..932e2389 100644--- a/docs/CHANGELOG.md+++ b/docs/CHANGELOG.md@@ -12,6 +12,7 @@ this is the *what*, and it is what Settings → About shows as “What's new”.**Fixed**+- `mcp` add native UI host probe- `chatgpt` stage portable OpenAI plugin package- `memory` keep large typed projections mutablediff --git a/docs/PROGRESS.md b/docs/PROGRESS.mdindex af166ff9..4c4aa3a0 100644--- a/docs/PROGRESS.md+++ b/docs/PROGRESS.md@@ -1,3 +1,11 @@+## 2026-09-20 — Add a static Native MCP App host-mount probe++A fresh ChatGPT acceptance from this session still executed `render_mso_page("/integrations")` and `integration_setup_open` successfully but surfaced their decoded structured objects instead of mounting the declared MCP App resource. That repeats the same failure across Page, Block/List history and dedicated Integrations setup while current tool schema, registered-app binding and production package state are already refreshed.++To isolate the remaining boundary without another Page/CSP/iframe rewrite, MSO now exposes one deliberately tiny read-only diagnostic tool, `mso_native_ui_probe`, bound only through standard `_meta.ui.resourceUri` to `ui://mso/native-probe-v1.html`. The resource is static dependency-free HTML containing only “MSO NATIVE UI WORKS”: no iframe, fetch, router, React bundle, bridge, tools/call, external domain or credential logic. It is advertised by normal `tools/list` and `resources/list/read`, included in the ChatGPT profile and generated MCP catalog, and has a tiny explicit output schema.++This is diagnostic instrumentation, not a claim that Native UI is fixed. Server-side tests can prove descriptor/resource correctness only. Final acceptance still requires reconnect/rescan into the newly deployed toolset and a new conversation where the registered MSO App itself is selected; only a visibly host-mounted component satisfies the UI Definition of Done. If the static probe also degrades to ordinary structured output there, Page/Integrations/CSP/iframe code is excluded and the remaining defect is the ChatGPT host invocation/presentation-attachment boundary.+## 2026-09-20 — Add durable server-native Local Agent standbyChatGPT/MCP local-agent collaboration previously had two useful but incomplete modes: a foreground `local_agent_inbox(wait_ms)` receiver that ended with the current request, and one-shot `local_agent_request` execution from a saved durable session. A coordinator therefore could not safely leave a session waiting, send it work later, receive the result, and keep the worker available without another manual user turn.diff --git a/docs/generated/MCP-CATALOG.md b/docs/generated/MCP-CATALOG.mdindex 1cfecf25..1ed223d7 100644--- a/docs/generated/MCP-CATALOG.md+++ b/docs/generated/MCP-CATALOG.md@@ -4,21 +4,21 @@## Full MSO catalog-<!-- mcp-toolset: server=1.15.1 version=2026.09.20.1 tools=113 read=55 write=35 exec=23 -->+<!-- mcp-toolset: server=1.15.1 version=2026.09.20.2 tools=114 read=56 write=35 exec=23 -->| Fact | Current source value ||---|---:|| MCP server | `1.15.1` |-| Toolset | `2026.09.20.1` |-| Toolset changed at | `2026-09-20T11:37:43+07:00` |-| Transport tools | **115** |-| Model/operator tools | **113** |-| Read | **55** |+| Toolset | `2026.09.20.2` |+| Toolset changed at | `2026-09-20T14:51:00+07:00` |+| Transport tools | **116** |+| Model/operator tools | **114** |+| Read | **56** || Write | **35** || Exec | **23** || App-only bridges | **2** |-### Read (55)+### Read (56)- `a2a_agent_discover`- `a2a_agents_list`@@ -51,6 +51,7 @@- `local_agent_inbox`- `local_agent_request_wait`- `local_agents_list`+- `mso_native_ui_probe`- `mso_surface_apps_list`- `organization_chart`- `project_agent_status`@@ -147,20 +148,20 @@## ChatGPT model profile-<!-- mcp-chatgpt-profile: server=1.15.1 version=2026.09.20.1 tools=113 read=55 write=35 exec=23 app-only=2 total=115 -->+<!-- mcp-chatgpt-profile: server=1.15.1 version=2026.09.20.2 tools=114 read=56 write=35 exec=23 app-only=2 total=116 -->The ChatGPT profile automatically projects the complete MSO-owned generic model/operator catalog. OAuth scope is still enforced independently; app-only compatibility bridges stay app-only, and project-owned MCP tool names remain dynamic data behind the generic project bridge.| Fact | Current source value ||---|---:|-| ChatGPT transport tools | **115** |-| ChatGPT model/operator tools | **113** |-| Read | **55** |+| ChatGPT transport tools | **116** |+| ChatGPT model/operator tools | **114** |+| Read | **56** || Write | **35** || Exec | **23** || App-only bridges | **2** |-### ChatGPT read (55)+### ChatGPT read (56)- `a2a_agent_discover`- `a2a_agents_list`@@ -193,6 +194,7 @@ The ChatGPT profile automatically projects the complete MSO-owned generic model/- `local_agent_inbox`- `local_agent_request_wait`- `local_agents_list`+- `mso_native_ui_probe`- `mso_surface_apps_list`- `organization_chart`- `project_agent_status`diff --git a/docs/integrations/CHATGPT-UI.md b/docs/integrations/CHATGPT-UI.mdindex 26ccf061..7f00c8f7 100644--- a/docs/integrations/CHATGPT-UI.md+++ b/docs/integrations/CHATGPT-UI.md@@ -1,14 +1,15 @@# ChatGPT MCP App UI-MSO exposes three explicit presentation resources. Ordinary data tools and workflow startup stay+MSO exposes three product presentation resources plus one deliberately minimal Native UI diagnostic probe. Ordinary data tools and workflow startup stayheadless; clients without MCP Apps keep structured/text results. The model fetches data first, then-chooses List, Block or Page as a separate render step.+chooses List, Block or Page as a separate render step. The probe exists only to distinguish server-side resource binding from ChatGPT host mounting and contains no product routing or interaction logic.| Surface | Entry tool | Resource | Purpose || --- | --- | --- | --- || List | `render_mso_list` | `ui://mso/list-v2.html` | Searchable compact collections and item actions || Block | `render_mso_block` | `ui://mso/block-v4.html` | Validation, actions, bounded CRUD input/output || Page | `render_mso_page`, `integration_setup_open` | `ui://mso/page-v15.html` | Native workspaces, session assets and reviewed project previews |+| Native probe | `mso_native_ui_probe` | `ui://mso/native-probe-v1.html` | Static diagnostic text only; no bridge, iframe, fetch, router or external dependency |## Layout and identity@@ -78,13 +79,13 @@ Page initializes MCP Apps protocol `2026-01-26`, then sendsnotifications and legacy wrapped `window.openai.toolOutput` use the same route validator.Unchanged outputs do not remount views; teardown clears active forms and observers.-List, Block and Page use the standards-first MCP Apps bridge (`ui/initialize`, tool-result notifications and `ui/message`/`tools/call` where applicable). Their render tools advertise standard `ui.resourceUri`; Block additionally retains its existing `openai/outputTemplate` compatibility binding for older ChatGPT hosts. Every ChatGPT tool has an output schema;+List, Block and Page use the standards-first MCP Apps bridge (`ui/initialize`, tool-result notifications and `ui/message`/`tools/call` where applicable). Their render tools advertise standard `ui.resourceUri`; Block additionally retains its existing `openai/outputTemplate` compatibility binding for older ChatGPT hosts. The Native UI probe intentionally advertises only standard `ui.resourceUri` and renders static HTML so a failure cannot be attributed to the Page shell, bridge, iframe, network access or legacy output-template compatibility. Every ChatGPT tool has an output schema;exact tools, counts and scopes are generated in [the catalog](../generated/MCP-CATALOG.md).Resource CSP is explicit: Block allows no nested frames; Page includes only exact reviewed iframe origins and permits its MSO origin for private setup requests. OpenAI requires stricter review for `frameDomains`; this is an official review boundary, not a blanket iframe ban. `OS_MCP_UI_ORIGIN` controls the widget origin, otherwisethe configured public origin derives it. Legacy redirect metadata supports Open in MSO.-Only the three current resources are listed. Older List/Block/Page URIs remain read aliases for current bytes, including List v1, Block v3/v2 and Page v14. `workflow_status` and `render_mso_surface`+The three product resources and the isolated Native UI diagnostic probe are listed. Older List/Block/Page URIs remain read aliases for current bytes, including List v1, Block v3/v2 and Page v14. `workflow_status` and `render_mso_surface`remain app-only compatibility tools. `workflow_start` has no UI binding.## Verification and deployment@@ -97,7 +98,7 @@ provider search and 320–1920 px reflow. Production release journeys verify autreal server handlers and provider revocation using synthetic stores.After shipping, compare live discovery/version/hash against `lib/mcp/toolset.ts` and the-generated catalog, verify the three resource URIs, render a List, and reopen the Page. Hosts cache tool+generated catalog, verify the three product resource URIs plus `ui://mso/native-probe-v1.html`, call `mso_native_ui_probe` from a directly selected registered app context, render a List, and reopen the Page. Hosts cache tooland resource descriptors: a development-app rescan/reconnect may still be needed.The server cannot replace an already mounted document in an old conversation.diff --git a/lib/mcp/chatgpt-profile.test.ts b/lib/mcp/chatgpt-profile.test.tsindex 163ce945..acbf0dc0 100644--- a/lib/mcp/chatgpt-profile.test.ts+++ b/lib/mcp/chatgpt-profile.test.ts@@ -4,6 +4,7 @@ vi.mock("server-only", () => ({}));const { dispatch } = await import("./dispatch");const { CHATGPT_APP_ONLY_TOOL_NAMES } = await import("./tool-contract");const { TOOLS } = await import("./tools");+const { MSO_NATIVE_UI_PROBE_URI } = await import("./ui-native-probe");const context = { principal: "mcp-client:chatgpt-test", sessionId: "session-profile", toolProfile: "chatgpt" as const };@@ -44,6 +45,11 @@ describe("ChatGPT full generic MCP profile", () => {expect(tools.some((tool) => tool.name === "tool_forge_promote")).toBe(true);expect(tools.some((tool) => tool.name === "a2a_handoff")).toBe(true);expect(tools.some((tool) => tool.name === "project_memory_upsert")).toBe(true);+ const nativeProbe = tools.find((tool) => tool.name === "mso_native_ui_probe") as { _meta?: { ui?: { resourceUri?: string; visibility?: string[] } } } | undefined;+ expect(nativeProbe?._meta?.ui).toEqual({ resourceUri: MSO_NATIVE_UI_PROBE_URI, visibility: ["model", "app"] });+ const probeCall = await dispatch({ id: 3, method: "tools/call", params: { name: "mso_native_ui_probe", arguments: {} } }, "read", "mcp:native-ui-probe", context);+ expect(probeCall.error).toBeUndefined();+ expect(JSON.stringify(probeCall.result)).toContain("MSO NATIVE UI WORKS");for (const name of CHATGPT_APP_ONLY_TOOL_NAMES) {const tool = tools.find((entry) => entry.name === name) as { _meta?: { ui?: { visibility?: string[] } } } | undefined;expect(tool?._meta?.ui?.visibility, name).toEqual(["app"]);diff --git a/lib/mcp/integration-model-contract.test.ts b/lib/mcp/integration-model-contract.test.tsindex ae29f65c..6d3490b3 100644--- a/lib/mcp/integration-model-contract.test.ts+++ b/lib/mcp/integration-model-contract.test.ts@@ -45,7 +45,7 @@ it("returns identity-bound setup only in UI-private metadata on both supported M});it("keeps current and older Page resources readable alongside the canonical List and Block",async()=>{const {readUiResource,listUiResources,MSO_PAGE_URI}=await import("./ui-resources");- expect(await listUiResources()).toHaveLength(3);const html=(await readUiResource(MSO_PAGE_URI))!.text;+ expect(await listUiResources()).toHaveLength(4);const html=(await readUiResource(MSO_PAGE_URI))!.text;for(const version of [1,2,3,4,5,6])expect((await readUiResource(`ui://mso/page-v${version}.html`))?.text).toBe(html);expect(html).toContain("mountConnectionManager");expect(html).toContain("data-display-mode");const script=inlineScripts(html)[0];expect(()=>new Function(script!)).not.toThrow();diff --git a/lib/mcp/parity.test.ts b/lib/mcp/parity.test.tsindex 47fc08a7..47e89b73 100644--- a/lib/mcp/parity.test.ts+++ b/lib/mcp/parity.test.ts@@ -21,6 +21,7 @@ const ALFA_ONLY: Record<string, string> = {};const MCP_ONLY: Record<string, string> = {+ "mso.native.ui.probe": "Static ChatGPT MCP Apps host-mount diagnostic; Alfa already runs inside the native MSO browser shell and has no equivalent external host-renderer boundary to probe.","workflow.graph": "Native Workflows UI has its own authenticated principal; external MCP graph CRUD/run/status must stay principal-scoped instead of inheriting an unrelated browser identity.","organization.chart": "MSO already exposes the owner-private Organization registry through Alfa’s dedicated Organization tab/API; external MCP needs a bounded programmatic read surface without duplicating that registry into conversational Alfa host tools.","organization.manage": "Organization mutations belong to the dedicated owner Organization UI/API with revision checks; external MCP gets the same store under write scope/audit, while Alfa conversation does not gain a second parallel mutation surface.",diff --git a/lib/mcp/tools-native-probe.ts b/lib/mcp/tools-native-probe.tsnew file mode 100644index 00000000..e8871f83--- /dev/null+++ b/lib/mcp/tools-native-probe.ts@@ -0,0 +1,27 @@+import { type McpTool, READ_ONLY, S } from "./tool-kit";+import { MSO_NATIVE_UI_PROBE_URI } from "./ui-native-probe";++export const NATIVE_UI_PROBE_OUTPUT_SCHEMA = {+ type: "object",+ properties: {+ ok: { type: "boolean" },+ message: { type: "string" },+ },+ required: ["ok", "message"],+ additionalProperties: false,+} as const;++export const NATIVE_UI_PROBE_TOOLS: McpTool[] = [{+ name: "mso_native_ui_probe",+ title: "MSO Native UI Probe",+ description: "Render one minimal static MCP App resource with no routing, iframe, network access, app shell, or bridge logic. Use only to distinguish server resource binding from ChatGPT host-side native UI mounting.",+ chatgptDescription: "Mount the minimal static MSO Native UI diagnostic resource.",+ scope: "read",+ annotations: READ_ONLY,+ inputSchema: S({}, []),+ outputSchema: NATIVE_UI_PROBE_OUTPUT_SCHEMA,+ meta: {+ ui: { resourceUri: MSO_NATIVE_UI_PROBE_URI, visibility: ["model", "app"] },+ },+ run: async () => ({ ok: true, message: "MSO NATIVE UI WORKS" }),+}];diff --git a/lib/mcp/tools-ui.ts b/lib/mcp/tools-ui.tsindex 57f6203b..8ae8b9bb 100644--- a/lib/mcp/tools-ui.ts+++ b/lib/mcp/tools-ui.ts@@ -1,3 +1,4 @@export { LIST_TOOLS } from "./tools-list";export { BLOCK_TOOLS } from "./tools-block";export { SURFACE_TOOLS } from "./tools-surface";+export { NATIVE_UI_PROBE_TOOLS } from "./tools-native-probe";diff --git a/lib/mcp/tools.ts b/lib/mcp/tools.tsindex ec2c1abb..f9f31757 100644--- a/lib/mcp/tools.ts+++ b/lib/mcp/tools.ts@@ -21,9 +21,9 @@ import { READ_TOOLS } from "./tools-read";import { READ_PIPELINE_TOOLS } from "./tools-read-pipeline";import { SESSION_ARTIFACT_TOOLS } from "./tools-session-artifacts";import { SUBAGENT_TOOLS } from "./tools-subagents";-import { BLOCK_TOOLS, LIST_TOOLS, SURFACE_TOOLS } from "./tools-ui";+import { BLOCK_TOOLS, LIST_TOOLS, NATIVE_UI_PROBE_TOOLS, SURFACE_TOOLS } from "./tools-ui";import type { McpTool } from "./tool-kit";import { MUTATE_TOOLS } from "./tools-mutate";-export const TOOLS: McpTool[] = [...FLOW_TOOLS, ...AGENT_OPEN_TOOLS, ...PROJECT_ASSET_TOOLS, ...PROJECT_MCP_MANAGE_TOOLS, ...SESSION_ARTIFACT_TOOLS, ...READ_TOOLS, ...FILE_TRANSFER_READ_TOOLS, ...DISCOVERY_TOOLS, ...LEARNING_TOOLS, ...AGENT_TOOLS, ...LOCAL_AGENT_TOOLS, ...SUBAGENT_TOOLS, ...A2A_TOOLS, ...FORGE_TOOLS, ...READ_PIPELINE_TOOLS, ...PROJECT_MCP_TOOLS, ...PROJECT_EXPERIENCE_TOOLS, ...ORGANIZATION_TOOLS, ...OPERATOR_DASHBOARD_TOOLS, ...BLOCK_TOOLS, ...LIST_TOOLS, ...SURFACE_TOOLS, ...INFRA_TOOLS, ...INTEGRATION_TOOLS, ...MUTATE_TOOLS, ...POWER_TOOLS].map(withWorkflowContext); export const TOOLS_BY_NAME = new Map(TOOLS.map((t) => [t.name, t]));+export const TOOLS: McpTool[] = [...FLOW_TOOLS, ...AGENT_OPEN_TOOLS, ...PROJECT_ASSET_TOOLS, ...PROJECT_MCP_MANAGE_TOOLS, ...SESSION_ARTIFACT_TOOLS, ...READ_TOOLS, ...FILE_TRANSFER_READ_TOOLS, ...DISCOVERY_TOOLS, ...LEARNING_TOOLS, ...AGENT_TOOLS, ...LOCAL_AGENT_TOOLS, ...SUBAGENT_TOOLS, ...A2A_TOOLS, ...FORGE_TOOLS, ...READ_PIPELINE_TOOLS, ...PROJECT_MCP_TOOLS, ...PROJECT_EXPERIENCE_TOOLS, ...ORGANIZATION_TOOLS, ...OPERATOR_DASHBOARD_TOOLS, ...NATIVE_UI_PROBE_TOOLS, ...BLOCK_TOOLS, ...LIST_TOOLS, ...SURFACE_TOOLS, ...INFRA_TOOLS, ...INTEGRATION_TOOLS, ...MUTATE_TOOLS, ...POWER_TOOLS].map(withWorkflowContext); export const TOOLS_BY_NAME = new Map(TOOLS.map((t) => [t.name, t]));diff --git a/lib/mcp/toolset.ts b/lib/mcp/toolset.tsindex ec8fa63d..8fa95e75 100644--- a/lib/mcp/toolset.ts+++ b/lib/mcp/toolset.ts@@ -4,8 +4,8 @@ import type { McpTool } from "./tool-kit";import { toolDescriptor, type McpToolProfile } from "./tool-contract";export const MCP_SERVER_VERSION = "1.15.1";-export const MCP_TOOLSET_VERSION = "2026.09.20.1";-export const MCP_TOOLSET_CHANGED_AT = "2026-09-20T11:37:43+07:00";+export const MCP_TOOLSET_VERSION = "2026.09.20.2";+export const MCP_TOOLSET_CHANGED_AT = "2026-09-20T14:51:00+07:00";export type McpToolsetInfo = {serverVersion: string;diff --git a/lib/mcp/ui-native-probe.ts b/lib/mcp/ui-native-probe.tsnew file mode 100644index 00000000..cd4959f2--- /dev/null+++ b/lib/mcp/ui-native-probe.ts@@ -0,0 +1,18 @@+export const MSO_NATIVE_UI_PROBE_URI = "ui://mso/native-probe-v1.html";+const MIME = "text/html;profile=mcp-app";++const html = String.raw`<!doctype html><meta charset="utf-8"><title>MSO Native UI Probe</title><main style="box-sizing:border-box;padding:16px;font:600 16px/1.4 system-ui,sans-serif">MSO NATIVE UI WORKS</main>`;++export const MSO_NATIVE_UI_PROBE_RESOURCE = {+ uri: MSO_NATIVE_UI_PROBE_URI,+ name: "MSO Native UI Probe",+ description: "Minimal static MCP App resource used only to isolate ChatGPT host-side native UI mounting.",+ mimeType: MIME,+ text: html,+ _meta: {+ ui: {+ prefersBorder: true,+ csp: { connectDomains: [], resourceDomains: [] },+ },+ },+} as const;diff --git a/lib/mcp/ui-page-lifecycle.test.ts b/lib/mcp/ui-page-lifecycle.test.tsindex 1881b3bd..4a235318 100644--- a/lib/mcp/ui-page-lifecycle.test.ts+++ b/lib/mcp/ui-page-lifecycle.test.ts@@ -12,7 +12,7 @@ describe("MCP Page lifecycle and cached resource migration", () => {expect(await readUiResource(LEGACY_PAGE_V2_URI)).toMatchObject({ uri: LEGACY_PAGE_V2_URI, text: page?.text });expect(await readUiResource(LEGACY_PAGE_V3_URI)).toMatchObject({ uri: LEGACY_PAGE_V3_URI, text: page?.text });expect(await readUiResource(LEGACY_PAGE_V9_URI)).toMatchObject({ uri: LEGACY_PAGE_V9_URI, text: page?.text });- expect(await listUiResources()).toHaveLength(3);+ expect(await listUiResources()).toHaveLength(4);expect((await listUiResources()).some((resource) => resource.uri === LEGACY_PAGE_V2_URI)).toBe(false);});it("includes the Apps handshake and reviewed preview contract in valid self-contained JavaScript", async () => {diff --git a/lib/mcp/ui-resources.test.ts b/lib/mcp/ui-resources.test.tsindex 72120f2f..1a5817d9 100644--- a/lib/mcp/ui-resources.test.ts+++ b/lib/mcp/ui-resources.test.ts@@ -12,12 +12,13 @@ const {MCP_APP_MIME_TYPE,MSO_BLOCK_URI,MSO_LIST_URI,+ MSO_NATIVE_UI_PROBE_URI,MSO_PAGE_URI,} = await import("./ui-resources");const { MCP_UI_DOMAIN, MSO_ORIGIN } = await import("./ui-config");describe("MCP Apps List, Block and Page contract", () => {- it("keeps workflow_start headless and binds only explicit Block/Page render tools", async () => {+ it("keeps workflow_start headless and binds only explicit presentation/probe tools", async () => {const initialized = await dispatch({ id: 1, method: "initialize" }, "write", "mcp:ui-init");expect(initialized.result).toMatchObject({capabilities: { tools: { listChanged: false }, resources: { listChanged: false } },@@ -71,6 +72,14 @@ describe("MCP Apps List, Block and Page contract", () => {});expect(setup?._meta?.["openai/outputTemplate"]).toBeUndefined();+ const probe = tools.find((tool) => tool.name === "mso_native_ui_probe");+ expect(probe?.outputSchema).toBeDefined();+ expect(probe?._meta).toMatchObject({+ ui: { resourceUri: MSO_NATIVE_UI_PROBE_URI, visibility: ["model", "app"] },+ });+ expect(probe?._meta?.["openai/outputTemplate"]).toBeUndefined();+ expect(probe?._meta?.["openai/widgetAccessible"]).toBeUndefined();+const legacy = tools.find((tool) => tool.name === "render_mso_surface");expect(legacy?._meta).toMatchObject({ ui: { visibility: ["app"] }, "openai/widgetAccessible": true });expect((legacy?._meta?.ui as { resourceUri?: string } | undefined)?.resourceUri).toBeUndefined();@@ -80,7 +89,7 @@ describe("MCP Apps List, Block and Page contract", () => {.filter((tool) => Boolean((tool._meta?.ui as { resourceUri?: string } | undefined)?.resourceUri)).map((tool) => tool.name).sort();- expect(resourceBound).toEqual(["integration_setup_open", "render_mso_block", "render_mso_list", "render_mso_page"]);+ expect(resourceBound).toEqual(["integration_setup_open", "mso_native_ui_probe", "render_mso_block", "render_mso_list", "render_mso_page"]);const appOnly = tools.filter((tool) => {const visibility = (tool._meta?.ui as { visibility?: string[] } | undefined)?.visibility;@@ -98,16 +107,33 @@ describe("MCP Apps List, Block and Page contract", () => {}});- it("advertises exactly three canonical resources: List, Block and Page", async () => {+ it("advertises the three product resources plus the isolated Native UI diagnostic probe", async () => {const listed = await dispatch({ id: 1, method: "resources/list" }, "read", "mcp:ui-resource");const resources = (listed.result as { resources: Array<{ uri: string; name: string; mimeType: string }> }).resources;expect(resources).toEqual([expect.objectContaining({ uri: MSO_LIST_URI, name: "MSO List", mimeType: MCP_APP_MIME_TYPE }),expect.objectContaining({ uri: MSO_BLOCK_URI, name: "MSO Block", mimeType: MCP_APP_MIME_TYPE }),expect.objectContaining({ uri: MSO_PAGE_URI, name: "MSO Page", mimeType: MCP_APP_MIME_TYPE }),+ expect.objectContaining({ uri: MSO_NATIVE_UI_PROBE_URI, name: "MSO Native UI Probe", mimeType: MCP_APP_MIME_TYPE }),]);});+ it("serves the Native UI probe as static dependency-free HTML", async () => {+ const read = await dispatch({ id: 31, method: "resources/read", params: { uri: MSO_NATIVE_UI_PROBE_URI } }, "read", "mcp:ui-native-probe");+ const content = (read.result as { contents: Array<{ uri: string; mimeType: string; text: string; _meta: Record<string, any> }> }).contents[0];+ expect(content.uri).toBe(MSO_NATIVE_UI_PROBE_URI);+ expect(content.mimeType).toBe(MCP_APP_MIME_TYPE);+ expect(content.text).toContain("MSO NATIVE UI WORKS");+ expect(content.text).not.toContain("<script");+ expect(content.text).not.toContain("fetch(");+ expect(content.text).not.toContain("iframe");+ expect(content._meta).toEqual({+ ui: {+ prefersBorder: true,+ csp: { connectDomains: [], resourceDomains: [] },+ },+ });+ });it("serves a self-contained searchable List whose actions only return follow-ups", async () => {const read = await dispatch({ id: 29, method: "resources/read", params: { uri: MSO_LIST_URI } }, "read", "mcp:ui-list");diff --git a/lib/mcp/ui-resources.ts b/lib/mcp/ui-resources.tsindex cb360488..476591f7 100644--- a/lib/mcp/ui-resources.ts+++ b/lib/mcp/ui-resources.ts@@ -1,13 +1,14 @@import { MSO_BLOCK_RESOURCE, MSO_BLOCK_URI } from "./ui-block";import { MSO_LIST_RESOURCE, MSO_LIST_URI } from "./ui-list";import { MSO_PAGE_URI, msoPageResource } from "./ui-surface";+import { MSO_NATIVE_UI_PROBE_RESOURCE, MSO_NATIVE_UI_PROBE_URI } from "./ui-native-probe";-export { MSO_BLOCK_URI, MSO_LIST_URI, MSO_PAGE_URI };+export { MSO_BLOCK_URI, MSO_LIST_URI, MSO_NATIVE_UI_PROBE_URI, MSO_PAGE_URI };export const MCP_APP_MIME_TYPE = "text/html;profile=mcp-app";// Read-only aliases keep already-cached ChatGPT action descriptors functional// across the UI-contract migration. They are intentionally not advertised by-// resources/list advertises the three canonical presentation levels: List, Block and Page.+// resources/list advertises the three product presentation levels plus the isolated Native UI diagnostic probe.export const LEGACY_LIST_V1_URI = "ui://mso/list-v1.html";export const LEGACY_BLOCK_V3_URI = "ui://mso/block-v3.html";export const LEGACY_BLOCK_V2_URI = "ui://mso/block-v2.html";@@ -58,7 +59,7 @@ const LEGACY_PAGE_URIS = new Set([export async function listUiResources(): Promise<Array<{ uri: string; name: string; description: string; mimeType: string }>> {const page = await msoPageResource();- return [MSO_LIST_RESOURCE, MSO_BLOCK_RESOURCE, page].map(({ uri, name, description, mimeType }) => ({ uri, name, description, mimeType }));+ return [MSO_LIST_RESOURCE, MSO_BLOCK_RESOURCE, page, MSO_NATIVE_UI_PROBE_RESOURCE].map(({ uri, name, description, mimeType }) => ({ uri, name, description, mimeType }));}export async function readUiResource(uri: string): Promise<McpUiResource | undefined> {@@ -66,6 +67,7 @@ export async function readUiResource(uri: string): Promise<McpUiResource | undefif (uri === LEGACY_LIST_V1_URI) return { ...MSO_LIST_RESOURCE, uri };if (uri === MSO_BLOCK_URI) return MSO_BLOCK_RESOURCE;if (uri === MSO_PAGE_URI) return msoPageResource();+ if (uri === MSO_NATIVE_UI_PROBE_URI) return MSO_NATIVE_UI_PROBE_RESOURCE;if (uri === LEGACY_BLOCK_V3_URI || uri === LEGACY_BLOCK_V2_URI || uri === LEGACY_BLOCK_V1_URI || uri === LEGACY_WORKFLOW_PROGRESS_URI) return { ...MSO_BLOCK_RESOURCE, uri };if (LEGACY_PAGE_URIS.has(uri)) return { ...(await msoPageResource()), uri };return undefined;