@absolutejs/mcp 0.17.5 → 0.17.6

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 CHANGED
@@ -6,6 +6,16 @@ This file is generated by `absolute-changelog` from the entries in
6
6
  `changelog/`. Edit an entry, not this file — and add new ones under
7
7
  `changelog/unreleased/`.
8
8
 
9
+ ## 0.17.6 — 2026-09-11
10
+
11
+ ### Added
12
+
13
+ - **Allow verified patched hosts through the version fallback with optional Apps configuration** (`clientSupportsMcpApps`, `McpAppsConfig`)
14
+
15
+ ### Fixed
16
+
17
+ - **Use text and structured report results on affected VS Code builds while their upstream webview startup race remains unresolved**
18
+
9
19
  ## 0.17.5 — 2026-09-11
10
20
 
11
21
  ### Added
@@ -0,0 +1,19 @@
1
+ # Upstream issues
2
+
3
+ ## VS Code webviews can go blank after a remount
4
+
5
+ Tracking: [microsoft/vscode#335908](https://github.com/microsoft/vscode/issues/335908). An issue was submitted; no pull request was submitted.
6
+
7
+ An earlier asynchronous origin-hash completion can replace the iframe after a newer mount connects. In native Windows VS Code 1.135.0, delaying the first hash reproduced a blank report. A current-promise guard passed three rounds across balance, usage and receipts in the isolated test process. The same unguarded method was found in the local 1.136.1 bundle; that version was source-inspected, not runtime-tested. See [the source patch and regression checker](canary/vscode/README.md).
8
+
9
+ ### Shared workaround in MCP 0.17.6
10
+
11
+ New sessions identifying themselves as `Visual Studio Code` version `1.135.0` or `1.136.1` receive text and structured results without Apps metadata or HTML resources. Report tools remain available. Authorization, billing and other host negotiations are unchanged. This exact-version rule is a presentation workaround, not a security boundary or a certification of other versions.
12
+
13
+ For an existing VS Code connection, run **MCP: Reset Cached Tools**, then **Developer: Reload Window**, reconnect/start the MCP server and open a new chat. Reconnection alone reused old UI metadata in our test. Reconnect the MCP server after upgrading: the negotiated Apps capability is stored in the session, so existing sessions retain their old decision. Consumers get the workaround through the package; they do not need a project-specific renderer or an editor patch.
14
+
15
+ `apps.allowKnownBrokenHosts: true` bypasses the version exclusion for controlled testing of a verified patched host. It still requires the host to advertise the Apps MIME capability. Do not enable it on ordinary affected installations. The diagnostic in-memory VS Code patch does not survive restart and is not the deployed workaround.
16
+
17
+ ### Removal
18
+
19
+ Keep the fallback for affected builds until they can reliably render Apps. When an upstream fix ships, verify fresh conversations, repeated mounts, refresh and pagination in the released host before certifying rich views there. Remove the override when a patched test build is retired. Keep the source regression and issue history so a successful retry is not mistaken for a fix.
@@ -28,4 +28,6 @@ Some unmodified first-load runs passed too: this is a timing-sensitive failure,
28
28
 
29
29
  ## Delivery status
30
30
 
31
- This package distributes a reviewable upstream source patch and regression checker. It does **not** patch users' VS Code installations. The in-memory test change does not survive an editor restart. An upstream release or an explicitly maintained patched host build is required before claiming that ordinary VS Code users receive this fix. Keep the first-load rollout gate open until that distribution is verified. No upstream submission is implied by this artifact.
31
+ The bug is reported in [microsoft/vscode#335908](https://github.com/microsoft/vscode/issues/335908); no PR was submitted. This package distributes the source patch and checker for review, but does not modify installed editors. The test-process patch disappears on restart.
32
+
33
+ MCP 0.17.6 instead defaults affected versions to text and structured reports. Reconnect after upgrading to negotiate the fallback. See [UPSTREAM_ISSUES.md](../../UPSTREAM_ISSUES.md) for the exact version scope, diagnostic override and removal conditions. Rich first-load support remains unverified in an unmodified released host.
package/changelog.json CHANGED
@@ -2,6 +2,24 @@
2
2
  "contract": 1,
3
3
  "name": "@absolutejs/mcp",
4
4
  "releases": [
5
+ {
6
+ "version": "0.17.6",
7
+ "date": "2026-09-11",
8
+ "changes": [
9
+ {
10
+ "kind": "fixed",
11
+ "summary": "Use text and structured report results on affected VS Code builds while their upstream webview startup race remains unresolved"
12
+ },
13
+ {
14
+ "kind": "added",
15
+ "summary": "Allow verified patched hosts through the version fallback with optional Apps configuration",
16
+ "symbols": [
17
+ "clientSupportsMcpApps",
18
+ "McpAppsConfig"
19
+ ]
20
+ }
21
+ ]
22
+ },
5
23
  {
6
24
  "version": "0.17.5",
7
25
  "date": "2026-09-11",
package/dist/apps.js CHANGED
@@ -49,9 +49,11 @@ var createBillingApps = () => {
49
49
 
50
50
  // src/apps.ts
51
51
  var MCP_APP_MIME = "text/html;profile=mcp-app";
52
- var clientSupportsMcpApps = (params) => {
52
+ var clientSupportsMcpApps = (params, options = {}) => {
53
53
  if (!isRecord(params) || !isRecord(params.capabilities) || !isRecord(params.capabilities.extensions))
54
54
  return false;
55
+ if (!options.allowKnownBrokenHosts && isRecord(params.clientInfo) && params.clientInfo.name === "Visual Studio Code" && (params.clientInfo.version === "1.135.0" || params.clientInfo.version === "1.136.1"))
56
+ return false;
55
57
  const ui = params.capabilities.extensions["io.modelcontextprotocol/ui"];
56
58
  return isRecord(ui) && Array.isArray(ui.mimeTypes) && ui.mimeTypes.includes(MCP_APP_MIME);
57
59
  };
package/dist/index.js CHANGED
@@ -49,9 +49,11 @@ var createBillingApps = () => {
49
49
 
50
50
  // src/apps.ts
51
51
  var MCP_APP_MIME = "text/html;profile=mcp-app";
52
- var clientSupportsMcpApps = (params) => {
52
+ var clientSupportsMcpApps = (params, options = {}) => {
53
53
  if (!isRecord(params) || !isRecord(params.capabilities) || !isRecord(params.capabilities.extensions))
54
54
  return false;
55
+ if (!options.allowKnownBrokenHosts && isRecord(params.clientInfo) && params.clientInfo.name === "Visual Studio Code" && (params.clientInfo.version === "1.135.0" || params.clientInfo.version === "1.136.1"))
56
+ return false;
55
57
  const ui = params.capabilities.extensions["io.modelcontextprotocol/ui"];
56
58
  return isRecord(ui) && Array.isArray(ui.mimeTypes) && ui.mimeTypes.includes(MCP_APP_MIME);
57
59
  };
@@ -1379,7 +1381,7 @@ var initialize = async (config, id, params, context) => {
1379
1381
  if (!config.elicitation?.enabled && !config.apps || !context.sessions)
1380
1382
  return response;
1381
1383
  const elicitation = clientElicitation(params);
1382
- const sessionId = await context.sessions.create(elicitation.form || elicitation.url, elicitation.url, Boolean(config.apps) && clientSupportsMcpApps(params));
1384
+ const sessionId = await context.sessions.create(elicitation.form || elicitation.url, elicitation.url, Boolean(config.apps) && clientSupportsMcpApps(params, config.apps));
1383
1385
  response.headers.set("Mcp-Session-Id", sessionId);
1384
1386
  return response;
1385
1387
  };
@@ -5,11 +5,13 @@ export type McpAppResource = {
5
5
  html: string;
6
6
  };
7
7
  export type McpAppsConfig = {
8
+ /** Only enable for a host build whose upstream rendering fix has been verified. */
9
+ allowKnownBrokenHosts?: boolean;
8
10
  resources: Record<string, McpAppResource>;
9
11
  store?: McpSessionStore;
10
12
  };
11
13
  /** Capability is presentation only; never a commerce or authorization decision. */
12
- export declare const clientSupportsMcpApps: (params: unknown) => boolean;
14
+ export declare const clientSupportsMcpApps: (params: unknown, options?: Pick<McpAppsConfig, "allowKnownBrokenHosts">) => boolean;
13
15
  export declare const withMcpApp: (tool: McpTool, resourceUri: string) => McpTool;
14
16
  /** Offline templates: all data comes through authenticated tool results and the
15
17
  * official host bridge. Network, nested frames and privileged permissions are not requested. */
@@ -97,3 +97,9 @@ This verifies the selected read path, not every tenant resource, token revocatio
97
97
  ## VS Code first-load race identified
98
98
 
99
99
  MCP 0.17.5 includes `canary/vscode/README.md`, a VS Code source patch and an executable actual-method regression. A controlled out-of-order origin-hash completion reproduces a blank view in native VS Code 1.135.0. The candidate current-promise guard passed three rounds across all three report views and both source-level completion orders. This is a host fix, not an MCP renderer change. The package distributes the patch for review; it does not modify installed editors or certify an upstream release. First-load activation remains blocked until a supported host containing the fix is verified.
100
+
101
+ ## Temporary VS Code fallback (0.17.6)
102
+
103
+ The issue is tracked in [microsoft/vscode#335908](https://github.com/microsoft/vscode/issues/335908). Known affected versions now receive text and structured reports on new sessions, keeping tools usable without invoking the faulty webview path. Other hosts retain their negotiated presentation. See [UPSTREAM_ISSUES.md](../UPSTREAM_ISSUES.md) for scope and removal conditions. This workaround does not certify rich rendering on affected editors.
104
+
105
+ Native Windows VS Code 1.135.0 verification: after removing the in-memory editor patch, reconnecting alone left cached UI metadata and produced resource errors. Running **MCP: Reset Cached Tools**, reloading the window and opening a new chat cleared it. The final run returned all three reports as visible text, with three successful tool calls, no resource reads and no App frames. This is a verified text fallback, not rich rendering evidence.
package/package.json CHANGED
@@ -72,7 +72,8 @@
72
72
  "docs/mcp-apps.md",
73
73
  "docs/third-party",
74
74
  "canary",
75
- "docs/host-canaries.md"
75
+ "docs/host-canaries.md",
76
+ "UPSTREAM_ISSUES.md"
76
77
  ],
77
78
  "scripts": {
78
79
  "build": "bun run build:apps && rm -rf dist && bun build src/index.ts src/manifest.ts src/commerce.ts src/apps.ts --outdir dist --root ./src --target=bun --external @absolutejs/agency --external '@absolutejs/agency/*' --external elysia && tsc --emitDeclarationOnly --project tsconfig.json && absolute-manifest emit",
@@ -87,5 +88,5 @@
87
88
  "check:canary": "tsc --noEmit --strict --skipLibCheck --moduleResolution bundler --module esnext --target esnext --types bun canary/server.ts canary/authenticated.ts canary/vscode/check-mount.ts"
88
89
  },
89
90
  "types": "./dist/src/index.d.ts",
90
- "version": "0.17.5"
91
+ "version": "0.17.6"
91
92
  }