@usex/mikrotik-mcp 4.23.0 → 4.24.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.
package/dist/cli.js CHANGED
@@ -125,7 +125,7 @@ import {
125
125
  updateAaaEntity,
126
126
  updateSummaryLine,
127
127
  writeBackup
128
- } from "./shared/cli-tssmr7sb.js";
128
+ } from "./shared/cli-10wtq3xb.js";
129
129
 
130
130
  // src/cli.ts
131
131
  import { existsSync as existsSync2 } from "fs";
@@ -133,7 +133,7 @@ import { existsSync as existsSync2 } from "fs";
133
133
  // src/observability/dashboard.ts
134
134
  import { spawn } from "child_process";
135
135
  import { readFileSync as readFileSync3 } from "fs";
136
- import { homedir as homedir2, networkInterfaces } from "os";
136
+ import { homedir as homedir3, networkInterfaces } from "os";
137
137
  import { dirname as dirname5, join as join4 } from "path";
138
138
  var {serve } = globalThis.Bun;
139
139
  import { z as z2 } from "zod";
@@ -1676,6 +1676,27 @@ function computeStats(events, opts) {
1676
1676
  };
1677
1677
  }
1678
1678
 
1679
+ // src/observability/http-error.ts
1680
+ import { homedir as homedir2 } from "os";
1681
+ var HOME = homedir2();
1682
+ var MAX_LEN = 300;
1683
+ function sanitizeMessage(raw, home, fallback) {
1684
+ const line = raw.split(`
1685
+ `, 1)[0].trim();
1686
+ const masked = home.length > 1 ? line.split(home).join("~") : line;
1687
+ if (!masked)
1688
+ return fallback;
1689
+ return masked.length > MAX_LEN ? `${masked.slice(0, MAX_LEN)}\u2026` : masked;
1690
+ }
1691
+ function clientError(e, fallback = "unknown error") {
1692
+ return sanitizeMessage(e instanceof Error ? e.message : String(e), HOME, fallback);
1693
+ }
1694
+ function logError(e) {
1695
+ if (e instanceof Error)
1696
+ return e.stack ?? e.message;
1697
+ return String(e);
1698
+ }
1699
+
1679
1700
  // src/observability/drift-routes.ts
1680
1701
  var storePromise = null;
1681
1702
  function getStore() {
@@ -1810,7 +1831,7 @@ async function driftRoutes(req, url) {
1810
1831
  } catch {}
1811
1832
  return json(report);
1812
1833
  } catch (e) {
1813
- return json({ error: e instanceof Error ? e.message : String(e) }, 502);
1834
+ return json({ error: clientError(e) }, 502);
1814
1835
  }
1815
1836
  }
1816
1837
  return null;
@@ -1958,7 +1979,7 @@ function restartProcess() {
1958
1979
  ok = true;
1959
1980
  logger.warn("Dashboard requested a restart \u2014 relaunched a fresh server process; this one is exiting.");
1960
1981
  } catch (e) {
1961
- logger.error(`Restart relaunch failed: ${e instanceof Error ? e.message : String(e)}. Exiting anyway.`);
1982
+ logger.error(`Restart relaunch failed: ${logError(e)}. Exiting anyway.`);
1962
1983
  }
1963
1984
  setTimeout(() => process.exit(0), 500);
1964
1985
  return ok;
@@ -2305,9 +2326,8 @@ async function configRoutes(req, url, admin) {
2305
2326
  logger.info(`Config reloaded from source \u2014 ${devices.length} device(s): ${devices.join(", ")}`);
2306
2327
  return json3({ ok: true, mode: "config", count: devices.length, devices });
2307
2328
  } catch (e) {
2308
- const error = e instanceof Error ? e.message : String(e);
2309
- logger.error(`Config reload failed: ${error}`);
2310
- return json3({ ok: false, error }, 500);
2329
+ logger.error(`Config reload failed: ${logError(e)}`);
2330
+ return json3({ ok: false, error: clientError(e) }, 500);
2311
2331
  }
2312
2332
  }
2313
2333
  if (p === "/api/config/history" && req.method === "GET") {
@@ -2424,7 +2444,7 @@ async function modulesRoutes(req, url) {
2424
2444
  atomicWrite(getConfigSource().path, serializeConfig(next));
2425
2445
  } catch (e) {
2426
2446
  persisted = false;
2427
- warning = `applied live but not saved to disk: ${e instanceof Error ? e.message : String(e)}`;
2447
+ warning = `applied live but not saved to disk: ${clientError(e)}`;
2428
2448
  }
2429
2449
  if (persisted) {
2430
2450
  recordVersion(getConfig(), "auto", Date.now(), `module ${b.enabled ? "enabled" : "disabled"}: ${mod.slug}`);
@@ -2455,7 +2475,7 @@ async function modulesRoutes(req, url) {
2455
2475
  atomicWrite(getConfigSource().path, serializeConfig(next));
2456
2476
  } catch (e) {
2457
2477
  persisted = false;
2458
- warning = `applied live but not saved to disk: ${e instanceof Error ? e.message : String(e)}`;
2478
+ warning = `applied live but not saved to disk: ${clientError(e)}`;
2459
2479
  }
2460
2480
  if (persisted) {
2461
2481
  recordVersion(getConfig(), "auto", Date.now(), `app views ${b.enabled ? "enabled" : "disabled"}`);
@@ -2827,7 +2847,7 @@ async function featureRoutes(req, url) {
2827
2847
  }));
2828
2848
  return json3({ configured: true, target: s3Target(), objects, truncated: !!res.isTruncated });
2829
2849
  } catch (e) {
2830
- return json3({ error: e instanceof Error ? e.message : String(e) }, 502);
2850
+ return json3({ error: clientError(e) }, 502);
2831
2851
  }
2832
2852
  }
2833
2853
  if (p === "/api/s3/presign" && req.method === "GET") {
@@ -2840,7 +2860,7 @@ async function featureRoutes(req, url) {
2840
2860
  const link = getS3Client().presign(key, { expiresIn: presignExpiresIn(), method: "GET" });
2841
2861
  return json3({ url: link });
2842
2862
  } catch (e) {
2843
- return json3({ error: e instanceof Error ? e.message : String(e) }, 502);
2863
+ return json3({ error: clientError(e) }, 502);
2844
2864
  }
2845
2865
  }
2846
2866
  if (p === "/api/s3/delete" && req.method === "POST") {
@@ -2856,7 +2876,7 @@ async function featureRoutes(req, url) {
2856
2876
  await client.delete(b.key);
2857
2877
  return json3({ ok: true, key: b.key });
2858
2878
  } catch (e) {
2859
- return json3({ error: e instanceof Error ? e.message : String(e) }, 502);
2879
+ return json3({ error: clientError(e) }, 502);
2860
2880
  }
2861
2881
  }
2862
2882
  if (p === "/api/backups" && req.method === "GET") {
@@ -2871,7 +2891,7 @@ async function featureRoutes(req, url) {
2871
2891
  const raw = b?.dir?.trim();
2872
2892
  if (!raw)
2873
2893
  return json3({ error: "dir required" }, 400);
2874
- const dir = raw === "~" || raw.startsWith("~/") ? join4(homedir2(), raw.slice(1)) : raw;
2894
+ const dir = raw === "~" || raw.startsWith("~/") ? join4(homedir3(), raw.slice(1)) : raw;
2875
2895
  const next = { ...getConfig(), backupDir: dir };
2876
2896
  setConfig(next);
2877
2897
  try {
@@ -2881,7 +2901,7 @@ async function featureRoutes(req, url) {
2881
2901
  ok: true,
2882
2902
  dir: backupDir(),
2883
2903
  persisted: false,
2884
- warning: `applied live but not saved: ${e instanceof Error ? e.message : String(e)}`
2904
+ warning: `applied live but not saved: ${clientError(e)}`
2885
2905
  });
2886
2906
  }
2887
2907
  recordVersion(getConfig(), "auto", Date.now(), "backup path changed");
@@ -2921,7 +2941,7 @@ async function featureRoutes(req, url) {
2921
2941
  const safe = b.name.endsWith(".rsc") ? b.name : `${b.name}.rsc`;
2922
2942
  return json3({ ok: true, name: writeBackup(safe, b.content) });
2923
2943
  } catch (e) {
2924
- return json3({ error: e instanceof Error ? e.message : String(e) }, 400);
2944
+ return json3({ error: clientError(e) }, 400);
2925
2945
  }
2926
2946
  }
2927
2947
  if (p === "/api/backups/rename" && req.method === "POST") {
@@ -2931,7 +2951,7 @@ async function featureRoutes(req, url) {
2931
2951
  try {
2932
2952
  return json3({ ok: true, name: renameBackup(b.name, b.new_name) });
2933
2953
  } catch (e) {
2934
- return json3({ error: e instanceof Error ? e.message : String(e) }, 400);
2954
+ return json3({ error: clientError(e) }, 400);
2935
2955
  }
2936
2956
  }
2937
2957
  if (p === "/api/backups/delete" && req.method === "POST") {
@@ -2941,7 +2961,7 @@ async function featureRoutes(req, url) {
2941
2961
  try {
2942
2962
  return deleteBackup(b.name) ? json3({ ok: true }) : json3({ error: "not found" }, 404);
2943
2963
  } catch (e) {
2944
- return json3({ error: e instanceof Error ? e.message : String(e) }, 400);
2964
+ return json3({ error: clientError(e) }, 400);
2945
2965
  }
2946
2966
  }
2947
2967
  if (p === "/api/backups/restore" && req.method === "POST") {
@@ -3136,7 +3156,7 @@ async function runDashboard(cfg, transportLabel) {
3136
3156
  atomicWrite(getConfigSource().path, serializeConfig(next));
3137
3157
  } catch (e) {
3138
3158
  persisted = false;
3139
- warning = `applied live but not saved to disk: ${e instanceof Error ? e.message : String(e)}`;
3159
+ warning = `applied live but not saved to disk: ${clientError(e)}`;
3140
3160
  }
3141
3161
  if (persisted) {
3142
3162
  recordVersion(getConfig(), "auto", Date.now(), `device ${b.disabled ? "disabled" : "enabled"}: ${b.device}`);
@@ -3175,7 +3195,7 @@ async function runDashboard(cfg, transportLabel) {
3175
3195
  try {
3176
3196
  return json3(await fetchLatestRelease());
3177
3197
  } catch (e) {
3178
- return json3({ error: e instanceof Error ? e.message : "fetch failed" }, 502);
3198
+ return json3({ error: clientError(e, "fetch failed") }, 502);
3179
3199
  }
3180
3200
  }
3181
3201
  if (url.pathname === "/api/catalog" && req.method === "GET") {
@@ -3211,7 +3231,7 @@ async function runDashboard(cfg, transportLabel) {
3211
3231
  try {
3212
3232
  return json3(await fetchAllReleases());
3213
3233
  } catch (e) {
3214
- return json3({ error: e instanceof Error ? e.message : "fetch failed" }, 502);
3234
+ return json3({ error: clientError(e, "fetch failed") }, 502);
3215
3235
  }
3216
3236
  }
3217
3237
  if (url.pathname === "/api/upgrade" && req.method === "POST") {
@@ -3278,9 +3298,8 @@ async function runDashboard(cfg, transportLabel) {
3278
3298
  try {
3279
3299
  return await dashboardRoute(req, url, srv, configAdmin, transportLabel);
3280
3300
  } catch (e) {
3281
- const msg = e instanceof Error ? e.message : String(e);
3282
- logger.error(`Dashboard request failed (${url.pathname}): ${msg}`);
3283
- return json3({ error: msg }, 502);
3301
+ logger.error(`Dashboard request failed (${url.pathname}): ${logError(e)}`);
3302
+ return json3({ error: clientError(e) }, 502);
3284
3303
  }
3285
3304
  },
3286
3305
  websocket: {
package/dist/index.js CHANGED
@@ -29,7 +29,7 @@ import {
29
29
  selectToolModules,
30
30
  setConfig,
31
31
  updateSummaryLine
32
- } from "./shared/library-2144zr9f.js";
32
+ } from "./shared/library-2f8ty72a.js";
33
33
  // src/server.ts
34
34
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
35
35
  import { ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
@@ -3810,7 +3810,7 @@ async function deviceDateStamp(ctx) {
3810
3810
 
3811
3811
  // src/core/slug.ts
3812
3812
  function deviceSlug(name) {
3813
- const s = (name ?? "").replace(/[^A-Za-z0-9-]+/g, "-").replace(/^-+|-+$/g, "");
3813
+ const s = (name ?? "").replace(/[^A-Za-z0-9-]+/g, "-").replace(/^-+|(?<!-)-+$/g, "");
3814
3814
  return s || "device";
3815
3815
  }
3816
3816
 
@@ -4375,7 +4375,7 @@ function getS3Client() {
4375
4375
  return new S3Client(opts);
4376
4376
  }
4377
4377
  function trimSlashes(s) {
4378
- return s.replace(/^\/+|\/+$/g, "");
4378
+ return s.replace(/^\/+|(?<!\/)\/+$/g, "");
4379
4379
  }
4380
4380
  function s3DevicePrefix(device) {
4381
4381
  const segments = [getS3Config()?.prefix ?? "", device ? deviceSlug(device) : ""].map(trimSlashes).filter(Boolean);
@@ -8196,7 +8196,7 @@ function num(s) {
8196
8196
  function orMatch(field, values, op = "~") {
8197
8197
  if (values.length === 0)
8198
8198
  return "";
8199
- const terms = values.map((v) => `${field}${op}"${v.replace(/"/g, "\\\"")}"`);
8199
+ const terms = values.map((v) => `${field}${op}"${v.replace(/[\\"]/g, "\\$&")}"`);
8200
8200
  return `(${terms.join(" or ")})`;
8201
8201
  }
8202
8202
  // src/utils/redact-secrets.ts
@@ -9070,7 +9070,7 @@ var cache = null;
9070
9070
  async function gateway() {
9071
9071
  if (cache)
9072
9072
  return cache;
9073
- const { moduleCatalog } = await import("./cli-p673815b.js");
9073
+ const { moduleCatalog } = await import("./cli-ps0h2mxx.js");
9074
9074
  const forIndex = [];
9075
9075
  const byName = new Map;
9076
9076
  for (const mod of moduleCatalog) {
@@ -4,7 +4,7 @@ import {
4
4
  allToolModules,
5
5
  moduleCatalog,
6
6
  selectToolModules
7
- } from "./cli-tssmr7sb.js";
7
+ } from "./cli-10wtq3xb.js";
8
8
  export {
9
9
  selectToolModules,
10
10
  moduleCatalog,
@@ -3589,7 +3589,7 @@ async function deviceDateStamp(ctx) {
3589
3589
 
3590
3590
  // src/core/slug.ts
3591
3591
  function deviceSlug(name) {
3592
- const s = (name ?? "").replace(/[^A-Za-z0-9-]+/g, "-").replace(/^-+|-+$/g, "");
3592
+ const s = (name ?? "").replace(/[^A-Za-z0-9-]+/g, "-").replace(/^-+|(?<!-)-+$/g, "");
3593
3593
  return s || "device";
3594
3594
  }
3595
3595
 
@@ -4154,7 +4154,7 @@ function getS3Client() {
4154
4154
  return new S3Client(opts);
4155
4155
  }
4156
4156
  function trimSlashes(s) {
4157
- return s.replace(/^\/+|\/+$/g, "");
4157
+ return s.replace(/^\/+|(?<!\/)\/+$/g, "");
4158
4158
  }
4159
4159
  function s3DevicePrefix(device) {
4160
4160
  const segments = [getS3Config()?.prefix ?? "", device ? deviceSlug(device) : ""].map(trimSlashes).filter(Boolean);
@@ -7975,7 +7975,7 @@ function num(s) {
7975
7975
  function orMatch(field, values, op = "~") {
7976
7976
  if (values.length === 0)
7977
7977
  return "";
7978
- const terms = values.map((v) => `${field}${op}"${v.replace(/"/g, "\\\"")}"`);
7978
+ const terms = values.map((v) => `${field}${op}"${v.replace(/[\\"]/g, "\\$&")}"`);
7979
7979
  return `(${terms.join(" or ")})`;
7980
7980
  }
7981
7981
  // src/utils/redact-secrets.ts
@@ -8849,7 +8849,7 @@ var cache = null;
8849
8849
  async function gateway() {
8850
8850
  if (cache)
8851
8851
  return cache;
8852
- const { moduleCatalog } = await import("./library-8f4pbp0x.js");
8852
+ const { moduleCatalog } = await import("./library-phwm9kqe.js");
8853
8853
  const forIndex = [];
8854
8854
  const byName = new Map;
8855
8855
  for (const mod of moduleCatalog) {
@@ -4,7 +4,7 @@ import {
4
4
  allToolModules,
5
5
  moduleCatalog,
6
6
  selectToolModules
7
- } from "./library-2144zr9f.js";
7
+ } from "./library-2f8ty72a.js";
8
8
  export {
9
9
  selectToolModules,
10
10
  moduleCatalog,
package/dist/ui/aaa.html CHANGED
@@ -99,7 +99,7 @@ Maps to Permission Policy \`microphone\` feature.`),geolocation:I({}).optional()
99
99
 
100
100
  Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:I({}).optional().describe(`Request clipboard write access.
101
101
 
102
- Maps to Permission Policy \`clipboard-write\` feature.`)});I({method:V(`ui/notifications/size-changed`),params:I({width:M().optional().describe(`New width in pixels.`),height:M().optional().describe(`New height in pixels.`)})});var Sv=I({method:V(`ui/notifications/tool-input`),params:I({arguments:z(j(),P().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Cv=I({method:V(`ui/notifications/tool-input-partial`),params:I({arguments:z(j(),P().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),wv=I({method:V(`ui/notifications/tool-cancelled`),params:I({reason:j().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),Tv=I({fonts:j().optional()}),Ev=I({variables:gv.optional().describe(`CSS variables for theming the app.`),css:Tv.optional().describe(`CSS blocks that apps can inject.`)}),Dv=I({method:V(`ui/resource-teardown`),params:I({})});z(j(),P());var Ov=I({text:I({}).optional().describe(`Host supports text content blocks.`),image:I({}).optional().describe(`Host supports image content blocks.`),audio:I({}).optional().describe(`Host supports audio content blocks.`),resource:I({}).optional().describe(`Host supports resource content blocks.`),resourceLink:I({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:I({}).optional().describe(`Host supports structured content.`)});I({method:V(`ui/notifications/request-teardown`),params:I({}).optional()});var kv=I({experimental:I({}).optional().describe(`Experimental features (structure TBD).`),openLinks:I({}).optional().describe(`Host supports opening external URLs.`),downloadFile:I({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:I({listChanged:N().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:I({listChanged:N().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:I({}).optional().describe(`Host accepts log messages.`),sandbox:I({permissions:xv.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:bv.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:Ov.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:Ov.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:I({tools:I({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),Av=I({experimental:I({}).optional().describe(`Experimental features (structure TBD).`),tools:I({listChanged:N().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:F(hv).optional().describe(`Display modes the app supports.`)});I({method:V(`ui/notifications/initialized`),params:I({}).optional()}),I({csp:bv.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:xv.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:j().optional().describe(`Dedicated origin for view sandbox.
102
+ Maps to Permission Policy \`clipboard-write\` feature.`)});I({method:V(`ui/notifications/size-changed`),params:I({width:M().optional().describe(`New width in pixels.`),height:M().optional().describe(`New height in pixels.`)})});var Sv=I({method:V(`ui/notifications/tool-input`),params:I({arguments:z(j(),P().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Cv=I({method:V(`ui/notifications/tool-input-partial`),params:I({arguments:z(j(),P().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),wv=I({method:V(`ui/notifications/tool-cancelled`),params:I({reason:j().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),Tv=I({fonts:j().optional()}),Ev=I({variables:gv.optional().describe(`CSS variables for theming the app.`),css:Tv.optional().describe(`CSS blocks that apps can inject.`)}),Dv=I({method:V(`ui/resource-teardown`),params:I({})});z(j(),P());var Ov=I({text:I({}).optional().describe(`Host supports text content blocks.`),image:I({}).optional().describe(`Host supports image content blocks.`),audio:I({}).optional().describe(`Host supports audio content blocks.`),resource:I({}).optional().describe(`Host supports resource content blocks.`),resourceLink:I({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:I({}).optional().describe(`Host supports structured content.`)});I({method:V(`ui/notifications/request-teardown`),params:I({}).optional()});var kv=I({experimental:z(j(),z(j(),qf()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:I({}).optional().describe(`Host supports opening external URLs.`),downloadFile:I({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:I({listChanged:N().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:I({listChanged:N().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:I({}).optional().describe(`Host accepts log messages.`),sandbox:I({permissions:xv.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:bv.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:Ov.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:Ov.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:I({tools:I({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),Av=I({experimental:z(j(),z(j(),qf()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:I({listChanged:N().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:F(hv).optional().describe(`Display modes the app supports.`)});I({method:V(`ui/notifications/initialized`),params:I({}).optional()}),I({csp:bv.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:xv.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:j().optional().describe(`Dedicated origin for view sandbox.
103
103
 
104
104
  Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
105
105
 
@@ -99,7 +99,7 @@ Maps to Permission Policy \`microphone\` feature.`),geolocation:I({}).optional()
99
99
 
100
100
  Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:I({}).optional().describe(`Request clipboard write access.
101
101
 
102
- Maps to Permission Policy \`clipboard-write\` feature.`)});I({method:V(`ui/notifications/size-changed`),params:I({width:M().optional().describe(`New width in pixels.`),height:M().optional().describe(`New height in pixels.`)})});var xv=I({method:V(`ui/notifications/tool-input`),params:I({arguments:z(j(),P().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Sv=I({method:V(`ui/notifications/tool-input-partial`),params:I({arguments:z(j(),P().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),Cv=I({method:V(`ui/notifications/tool-cancelled`),params:I({reason:j().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),wv=I({fonts:j().optional()}),Tv=I({variables:hv.optional().describe(`CSS variables for theming the app.`),css:wv.optional().describe(`CSS blocks that apps can inject.`)}),Ev=I({method:V(`ui/resource-teardown`),params:I({})});z(j(),P());var Dv=I({text:I({}).optional().describe(`Host supports text content blocks.`),image:I({}).optional().describe(`Host supports image content blocks.`),audio:I({}).optional().describe(`Host supports audio content blocks.`),resource:I({}).optional().describe(`Host supports resource content blocks.`),resourceLink:I({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:I({}).optional().describe(`Host supports structured content.`)});I({method:V(`ui/notifications/request-teardown`),params:I({}).optional()});var Ov=I({experimental:I({}).optional().describe(`Experimental features (structure TBD).`),openLinks:I({}).optional().describe(`Host supports opening external URLs.`),downloadFile:I({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:I({listChanged:N().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:I({listChanged:N().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:I({}).optional().describe(`Host accepts log messages.`),sandbox:I({permissions:bv.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:yv.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:Dv.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:Dv.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:I({tools:I({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),kv=I({experimental:I({}).optional().describe(`Experimental features (structure TBD).`),tools:I({listChanged:N().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:F(mv).optional().describe(`Display modes the app supports.`)});I({method:V(`ui/notifications/initialized`),params:I({}).optional()}),I({csp:yv.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:bv.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:j().optional().describe(`Dedicated origin for view sandbox.
102
+ Maps to Permission Policy \`clipboard-write\` feature.`)});I({method:V(`ui/notifications/size-changed`),params:I({width:M().optional().describe(`New width in pixels.`),height:M().optional().describe(`New height in pixels.`)})});var xv=I({method:V(`ui/notifications/tool-input`),params:I({arguments:z(j(),P().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Sv=I({method:V(`ui/notifications/tool-input-partial`),params:I({arguments:z(j(),P().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),Cv=I({method:V(`ui/notifications/tool-cancelled`),params:I({reason:j().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),wv=I({fonts:j().optional()}),Tv=I({variables:hv.optional().describe(`CSS variables for theming the app.`),css:wv.optional().describe(`CSS blocks that apps can inject.`)}),Ev=I({method:V(`ui/resource-teardown`),params:I({})});z(j(),P());var Dv=I({text:I({}).optional().describe(`Host supports text content blocks.`),image:I({}).optional().describe(`Host supports image content blocks.`),audio:I({}).optional().describe(`Host supports audio content blocks.`),resource:I({}).optional().describe(`Host supports resource content blocks.`),resourceLink:I({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:I({}).optional().describe(`Host supports structured content.`)});I({method:V(`ui/notifications/request-teardown`),params:I({}).optional()});var Ov=I({experimental:z(j(),z(j(),qf()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:I({}).optional().describe(`Host supports opening external URLs.`),downloadFile:I({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:I({listChanged:N().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:I({listChanged:N().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:I({}).optional().describe(`Host accepts log messages.`),sandbox:I({permissions:bv.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:yv.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:Dv.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:Dv.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:I({tools:I({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),kv=I({experimental:z(j(),z(j(),qf()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:I({listChanged:N().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:F(mv).optional().describe(`Display modes the app supports.`)});I({method:V(`ui/notifications/initialized`),params:I({}).optional()}),I({csp:yv.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:bv.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:j().optional().describe(`Dedicated origin for view sandbox.
103
103
 
104
104
  Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
105
105
 
@@ -99,7 +99,7 @@ Maps to Permission Policy \`microphone\` feature.`),geolocation:I({}).optional()
99
99
 
100
100
  Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:I({}).optional().describe(`Request clipboard write access.
101
101
 
102
- Maps to Permission Policy \`clipboard-write\` feature.`)});I({method:V(`ui/notifications/size-changed`),params:I({width:M().optional().describe(`New width in pixels.`),height:M().optional().describe(`New height in pixels.`)})});var xv=I({method:V(`ui/notifications/tool-input`),params:I({arguments:z(j(),P().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Sv=I({method:V(`ui/notifications/tool-input-partial`),params:I({arguments:z(j(),P().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),Cv=I({method:V(`ui/notifications/tool-cancelled`),params:I({reason:j().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),wv=I({fonts:j().optional()}),Tv=I({variables:hv.optional().describe(`CSS variables for theming the app.`),css:wv.optional().describe(`CSS blocks that apps can inject.`)}),Ev=I({method:V(`ui/resource-teardown`),params:I({})});z(j(),P());var Dv=I({text:I({}).optional().describe(`Host supports text content blocks.`),image:I({}).optional().describe(`Host supports image content blocks.`),audio:I({}).optional().describe(`Host supports audio content blocks.`),resource:I({}).optional().describe(`Host supports resource content blocks.`),resourceLink:I({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:I({}).optional().describe(`Host supports structured content.`)});I({method:V(`ui/notifications/request-teardown`),params:I({}).optional()});var Ov=I({experimental:I({}).optional().describe(`Experimental features (structure TBD).`),openLinks:I({}).optional().describe(`Host supports opening external URLs.`),downloadFile:I({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:I({listChanged:N().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:I({listChanged:N().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:I({}).optional().describe(`Host accepts log messages.`),sandbox:I({permissions:bv.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:yv.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:Dv.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:Dv.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:I({tools:I({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),kv=I({experimental:I({}).optional().describe(`Experimental features (structure TBD).`),tools:I({listChanged:N().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:F(mv).optional().describe(`Display modes the app supports.`)});I({method:V(`ui/notifications/initialized`),params:I({}).optional()}),I({csp:yv.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:bv.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:j().optional().describe(`Dedicated origin for view sandbox.
102
+ Maps to Permission Policy \`clipboard-write\` feature.`)});I({method:V(`ui/notifications/size-changed`),params:I({width:M().optional().describe(`New width in pixels.`),height:M().optional().describe(`New height in pixels.`)})});var xv=I({method:V(`ui/notifications/tool-input`),params:I({arguments:z(j(),P().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Sv=I({method:V(`ui/notifications/tool-input-partial`),params:I({arguments:z(j(),P().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),Cv=I({method:V(`ui/notifications/tool-cancelled`),params:I({reason:j().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),wv=I({fonts:j().optional()}),Tv=I({variables:hv.optional().describe(`CSS variables for theming the app.`),css:wv.optional().describe(`CSS blocks that apps can inject.`)}),Ev=I({method:V(`ui/resource-teardown`),params:I({})});z(j(),P());var Dv=I({text:I({}).optional().describe(`Host supports text content blocks.`),image:I({}).optional().describe(`Host supports image content blocks.`),audio:I({}).optional().describe(`Host supports audio content blocks.`),resource:I({}).optional().describe(`Host supports resource content blocks.`),resourceLink:I({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:I({}).optional().describe(`Host supports structured content.`)});I({method:V(`ui/notifications/request-teardown`),params:I({}).optional()});var Ov=I({experimental:z(j(),z(j(),qf()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:I({}).optional().describe(`Host supports opening external URLs.`),downloadFile:I({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:I({listChanged:N().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:I({listChanged:N().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:I({}).optional().describe(`Host accepts log messages.`),sandbox:I({permissions:bv.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:yv.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:Dv.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:Dv.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:I({tools:I({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),kv=I({experimental:z(j(),z(j(),qf()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:I({listChanged:N().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:F(mv).optional().describe(`Display modes the app supports.`)});I({method:V(`ui/notifications/initialized`),params:I({}).optional()}),I({csp:yv.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:bv.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:j().optional().describe(`Dedicated origin for view sandbox.
103
103
 
104
104
  Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
105
105
 
@@ -99,7 +99,7 @@ Maps to Permission Policy \`microphone\` feature.`),geolocation:I({}).optional()
99
99
 
100
100
  Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:I({}).optional().describe(`Request clipboard write access.
101
101
 
102
- Maps to Permission Policy \`clipboard-write\` feature.`)});I({method:V(`ui/notifications/size-changed`),params:I({width:M().optional().describe(`New width in pixels.`),height:M().optional().describe(`New height in pixels.`)})});var xv=I({method:V(`ui/notifications/tool-input`),params:I({arguments:z(j(),P().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Sv=I({method:V(`ui/notifications/tool-input-partial`),params:I({arguments:z(j(),P().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),Cv=I({method:V(`ui/notifications/tool-cancelled`),params:I({reason:j().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),wv=I({fonts:j().optional()}),Tv=I({variables:hv.optional().describe(`CSS variables for theming the app.`),css:wv.optional().describe(`CSS blocks that apps can inject.`)}),Ev=I({method:V(`ui/resource-teardown`),params:I({})});z(j(),P());var Dv=I({text:I({}).optional().describe(`Host supports text content blocks.`),image:I({}).optional().describe(`Host supports image content blocks.`),audio:I({}).optional().describe(`Host supports audio content blocks.`),resource:I({}).optional().describe(`Host supports resource content blocks.`),resourceLink:I({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:I({}).optional().describe(`Host supports structured content.`)});I({method:V(`ui/notifications/request-teardown`),params:I({}).optional()});var Ov=I({experimental:I({}).optional().describe(`Experimental features (structure TBD).`),openLinks:I({}).optional().describe(`Host supports opening external URLs.`),downloadFile:I({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:I({listChanged:N().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:I({listChanged:N().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:I({}).optional().describe(`Host accepts log messages.`),sandbox:I({permissions:bv.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:yv.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:Dv.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:Dv.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:I({tools:I({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),kv=I({experimental:I({}).optional().describe(`Experimental features (structure TBD).`),tools:I({listChanged:N().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:F(mv).optional().describe(`Display modes the app supports.`)});I({method:V(`ui/notifications/initialized`),params:I({}).optional()}),I({csp:yv.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:bv.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:j().optional().describe(`Dedicated origin for view sandbox.
102
+ Maps to Permission Policy \`clipboard-write\` feature.`)});I({method:V(`ui/notifications/size-changed`),params:I({width:M().optional().describe(`New width in pixels.`),height:M().optional().describe(`New height in pixels.`)})});var xv=I({method:V(`ui/notifications/tool-input`),params:I({arguments:z(j(),P().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Sv=I({method:V(`ui/notifications/tool-input-partial`),params:I({arguments:z(j(),P().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),Cv=I({method:V(`ui/notifications/tool-cancelled`),params:I({reason:j().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),wv=I({fonts:j().optional()}),Tv=I({variables:hv.optional().describe(`CSS variables for theming the app.`),css:wv.optional().describe(`CSS blocks that apps can inject.`)}),Ev=I({method:V(`ui/resource-teardown`),params:I({})});z(j(),P());var Dv=I({text:I({}).optional().describe(`Host supports text content blocks.`),image:I({}).optional().describe(`Host supports image content blocks.`),audio:I({}).optional().describe(`Host supports audio content blocks.`),resource:I({}).optional().describe(`Host supports resource content blocks.`),resourceLink:I({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:I({}).optional().describe(`Host supports structured content.`)});I({method:V(`ui/notifications/request-teardown`),params:I({}).optional()});var Ov=I({experimental:z(j(),z(j(),qf()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:I({}).optional().describe(`Host supports opening external URLs.`),downloadFile:I({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:I({listChanged:N().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:I({listChanged:N().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:I({}).optional().describe(`Host accepts log messages.`),sandbox:I({permissions:bv.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:yv.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:Dv.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:Dv.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:I({tools:I({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),kv=I({experimental:z(j(),z(j(),qf()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:I({listChanged:N().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:F(mv).optional().describe(`Display modes the app supports.`)});I({method:V(`ui/notifications/initialized`),params:I({}).optional()}),I({csp:yv.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:bv.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:j().optional().describe(`Dedicated origin for view sandbox.
103
103
 
104
104
  Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
105
105
 
@@ -99,7 +99,7 @@ Maps to Permission Policy \`microphone\` feature.`),geolocation:I({}).optional()
99
99
 
100
100
  Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:I({}).optional().describe(`Request clipboard write access.
101
101
 
102
- Maps to Permission Policy \`clipboard-write\` feature.`)});I({method:V(`ui/notifications/size-changed`),params:I({width:M().optional().describe(`New width in pixels.`),height:M().optional().describe(`New height in pixels.`)})});var xv=I({method:V(`ui/notifications/tool-input`),params:I({arguments:z(j(),P().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Sv=I({method:V(`ui/notifications/tool-input-partial`),params:I({arguments:z(j(),P().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),Cv=I({method:V(`ui/notifications/tool-cancelled`),params:I({reason:j().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),wv=I({fonts:j().optional()}),Tv=I({variables:hv.optional().describe(`CSS variables for theming the app.`),css:wv.optional().describe(`CSS blocks that apps can inject.`)}),Ev=I({method:V(`ui/resource-teardown`),params:I({})});z(j(),P());var Dv=I({text:I({}).optional().describe(`Host supports text content blocks.`),image:I({}).optional().describe(`Host supports image content blocks.`),audio:I({}).optional().describe(`Host supports audio content blocks.`),resource:I({}).optional().describe(`Host supports resource content blocks.`),resourceLink:I({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:I({}).optional().describe(`Host supports structured content.`)});I({method:V(`ui/notifications/request-teardown`),params:I({}).optional()});var Ov=I({experimental:I({}).optional().describe(`Experimental features (structure TBD).`),openLinks:I({}).optional().describe(`Host supports opening external URLs.`),downloadFile:I({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:I({listChanged:N().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:I({listChanged:N().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:I({}).optional().describe(`Host accepts log messages.`),sandbox:I({permissions:bv.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:yv.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:Dv.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:Dv.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:I({tools:I({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),kv=I({experimental:I({}).optional().describe(`Experimental features (structure TBD).`),tools:I({listChanged:N().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:F(mv).optional().describe(`Display modes the app supports.`)});I({method:V(`ui/notifications/initialized`),params:I({}).optional()}),I({csp:yv.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:bv.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:j().optional().describe(`Dedicated origin for view sandbox.
102
+ Maps to Permission Policy \`clipboard-write\` feature.`)});I({method:V(`ui/notifications/size-changed`),params:I({width:M().optional().describe(`New width in pixels.`),height:M().optional().describe(`New height in pixels.`)})});var xv=I({method:V(`ui/notifications/tool-input`),params:I({arguments:z(j(),P().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Sv=I({method:V(`ui/notifications/tool-input-partial`),params:I({arguments:z(j(),P().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),Cv=I({method:V(`ui/notifications/tool-cancelled`),params:I({reason:j().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),wv=I({fonts:j().optional()}),Tv=I({variables:hv.optional().describe(`CSS variables for theming the app.`),css:wv.optional().describe(`CSS blocks that apps can inject.`)}),Ev=I({method:V(`ui/resource-teardown`),params:I({})});z(j(),P());var Dv=I({text:I({}).optional().describe(`Host supports text content blocks.`),image:I({}).optional().describe(`Host supports image content blocks.`),audio:I({}).optional().describe(`Host supports audio content blocks.`),resource:I({}).optional().describe(`Host supports resource content blocks.`),resourceLink:I({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:I({}).optional().describe(`Host supports structured content.`)});I({method:V(`ui/notifications/request-teardown`),params:I({}).optional()});var Ov=I({experimental:z(j(),z(j(),qf()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:I({}).optional().describe(`Host supports opening external URLs.`),downloadFile:I({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:I({listChanged:N().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:I({listChanged:N().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:I({}).optional().describe(`Host accepts log messages.`),sandbox:I({permissions:bv.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:yv.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:Dv.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:Dv.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:I({tools:I({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),kv=I({experimental:z(j(),z(j(),qf()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:I({listChanged:N().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:F(mv).optional().describe(`Display modes the app supports.`)});I({method:V(`ui/notifications/initialized`),params:I({}).optional()}),I({csp:yv.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:bv.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:j().optional().describe(`Dedicated origin for view sandbox.
103
103
 
104
104
  Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
105
105
 
@@ -99,7 +99,7 @@ Maps to Permission Policy \`microphone\` feature.`),geolocation:I({}).optional()
99
99
 
100
100
  Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:I({}).optional().describe(`Request clipboard write access.
101
101
 
102
- Maps to Permission Policy \`clipboard-write\` feature.`)});I({method:V(`ui/notifications/size-changed`),params:I({width:M().optional().describe(`New width in pixels.`),height:M().optional().describe(`New height in pixels.`)})});var xv=I({method:V(`ui/notifications/tool-input`),params:I({arguments:z(j(),P().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Sv=I({method:V(`ui/notifications/tool-input-partial`),params:I({arguments:z(j(),P().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),Cv=I({method:V(`ui/notifications/tool-cancelled`),params:I({reason:j().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),wv=I({fonts:j().optional()}),Tv=I({variables:hv.optional().describe(`CSS variables for theming the app.`),css:wv.optional().describe(`CSS blocks that apps can inject.`)}),Ev=I({method:V(`ui/resource-teardown`),params:I({})});z(j(),P());var Dv=I({text:I({}).optional().describe(`Host supports text content blocks.`),image:I({}).optional().describe(`Host supports image content blocks.`),audio:I({}).optional().describe(`Host supports audio content blocks.`),resource:I({}).optional().describe(`Host supports resource content blocks.`),resourceLink:I({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:I({}).optional().describe(`Host supports structured content.`)});I({method:V(`ui/notifications/request-teardown`),params:I({}).optional()});var Ov=I({experimental:I({}).optional().describe(`Experimental features (structure TBD).`),openLinks:I({}).optional().describe(`Host supports opening external URLs.`),downloadFile:I({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:I({listChanged:N().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:I({listChanged:N().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:I({}).optional().describe(`Host accepts log messages.`),sandbox:I({permissions:bv.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:yv.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:Dv.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:Dv.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:I({tools:I({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),kv=I({experimental:I({}).optional().describe(`Experimental features (structure TBD).`),tools:I({listChanged:N().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:F(mv).optional().describe(`Display modes the app supports.`)});I({method:V(`ui/notifications/initialized`),params:I({}).optional()}),I({csp:yv.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:bv.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:j().optional().describe(`Dedicated origin for view sandbox.
102
+ Maps to Permission Policy \`clipboard-write\` feature.`)});I({method:V(`ui/notifications/size-changed`),params:I({width:M().optional().describe(`New width in pixels.`),height:M().optional().describe(`New height in pixels.`)})});var xv=I({method:V(`ui/notifications/tool-input`),params:I({arguments:z(j(),P().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Sv=I({method:V(`ui/notifications/tool-input-partial`),params:I({arguments:z(j(),P().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),Cv=I({method:V(`ui/notifications/tool-cancelled`),params:I({reason:j().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),wv=I({fonts:j().optional()}),Tv=I({variables:hv.optional().describe(`CSS variables for theming the app.`),css:wv.optional().describe(`CSS blocks that apps can inject.`)}),Ev=I({method:V(`ui/resource-teardown`),params:I({})});z(j(),P());var Dv=I({text:I({}).optional().describe(`Host supports text content blocks.`),image:I({}).optional().describe(`Host supports image content blocks.`),audio:I({}).optional().describe(`Host supports audio content blocks.`),resource:I({}).optional().describe(`Host supports resource content blocks.`),resourceLink:I({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:I({}).optional().describe(`Host supports structured content.`)});I({method:V(`ui/notifications/request-teardown`),params:I({}).optional()});var Ov=I({experimental:z(j(),z(j(),qf()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:I({}).optional().describe(`Host supports opening external URLs.`),downloadFile:I({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:I({listChanged:N().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:I({listChanged:N().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:I({}).optional().describe(`Host accepts log messages.`),sandbox:I({permissions:bv.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:yv.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:Dv.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:Dv.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:I({tools:I({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),kv=I({experimental:z(j(),z(j(),qf()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:I({listChanged:N().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:F(mv).optional().describe(`Display modes the app supports.`)});I({method:V(`ui/notifications/initialized`),params:I({}).optional()}),I({csp:yv.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:bv.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:j().optional().describe(`Dedicated origin for view sandbox.
103
103
 
104
104
  Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
105
105