sunpeak 0.18.9 → 0.18.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +12 -0
  2. package/bin/commands/inspect.mjs +4 -1
  3. package/bin/lib/sandbox-server.mjs +12 -1
  4. package/dist/chatgpt/index.cjs +1 -1
  5. package/dist/chatgpt/index.js +1 -1
  6. package/dist/claude/index.cjs +1 -1
  7. package/dist/claude/index.js +1 -1
  8. package/dist/host/chatgpt/index.cjs +1 -1
  9. package/dist/host/chatgpt/index.js +1 -1
  10. package/dist/index.cjs +93 -93
  11. package/dist/index.cjs.map +1 -1
  12. package/dist/index.js +54 -54
  13. package/dist/index.js.map +1 -1
  14. package/dist/inspector/hosts.d.ts +12 -0
  15. package/dist/inspector/index.cjs +1 -1
  16. package/dist/inspector/index.js +1 -1
  17. package/dist/{inspector-CTMccsz9.cjs → inspector-8nPV2A-z.cjs} +93 -51
  18. package/dist/inspector-8nPV2A-z.cjs.map +1 -0
  19. package/dist/{inspector-DkS75JCk.js → inspector-Cdo5BK2D.js} +92 -50
  20. package/dist/inspector-Cdo5BK2D.js.map +1 -0
  21. package/dist/mcp/index.cjs +67 -62
  22. package/dist/mcp/index.cjs.map +1 -1
  23. package/dist/mcp/index.js +61 -56
  24. package/dist/mcp/index.js.map +1 -1
  25. package/dist/{protocol-DJmRaBzO.js → protocol-BfAACnv0.js} +14 -9
  26. package/dist/{protocol-DJmRaBzO.js.map → protocol-BfAACnv0.js.map} +1 -1
  27. package/dist/{protocol-jbxhzcnS.cjs → protocol-C7kTcBr_.cjs} +14 -9
  28. package/dist/{protocol-jbxhzcnS.cjs.map → protocol-C7kTcBr_.cjs.map} +1 -1
  29. package/dist/style.css +36 -1
  30. package/dist/{use-app-BNbz1uzj.js → use-app-CfP9VypY.js} +107 -56
  31. package/dist/use-app-CfP9VypY.js.map +1 -0
  32. package/dist/{use-app-Dqh20JPP.cjs → use-app-CzcYw1Kz.cjs} +165 -114
  33. package/dist/use-app-CzcYw1Kz.cjs.map +1 -0
  34. package/package.json +3 -3
  35. package/template/README.md +12 -0
  36. package/template/dist/albums/albums.html +16 -15
  37. package/template/dist/albums/albums.json +1 -1
  38. package/template/dist/carousel/carousel.html +20 -19
  39. package/template/dist/carousel/carousel.json +1 -1
  40. package/template/dist/map/map.html +7 -6
  41. package/template/dist/map/map.json +1 -1
  42. package/template/dist/review/review.html +6 -5
  43. package/template/dist/review/review.json +1 -1
  44. package/template/node_modules/.vite/deps/_metadata.json +3 -3
  45. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps.js +49 -49
  46. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps.js.map +1 -1
  47. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_app-bridge.js +49 -49
  48. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_app-bridge.js.map +1 -1
  49. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_react.js +89 -89
  50. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_react.js.map +1 -1
  51. package/template/node_modules/.vite-mcp/deps/_metadata.json +24 -24
  52. package/template/node_modules/.vite-mcp/deps/{protocol-CTflwIfG.js → protocol-B_qKkui_.js} +14 -9
  53. package/template/node_modules/.vite-mcp/deps/protocol-B_qKkui_.js.map +1 -0
  54. package/template/src/resources/carousel/carousel.test.tsx +16 -2
  55. package/template/src/resources/carousel/carousel.tsx +42 -14
  56. package/template/src/resources/carousel/components/carousel.tsx +20 -0
  57. package/template/src/resources/carousel/components/index.ts +1 -0
  58. package/template/src/resources/carousel/components/place-detail.tsx +153 -0
  59. package/template/tests/e2e/carousel.spec.ts +125 -0
  60. package/template/tests/live/carousel.spec.ts +2 -2
  61. package/template/tests/simulations/show-carousel.json +54 -5
  62. package/dist/inspector-CTMccsz9.cjs.map +0 -1
  63. package/dist/inspector-DkS75JCk.js.map +0 -1
  64. package/dist/use-app-BNbz1uzj.js.map +0 -1
  65. package/dist/use-app-Dqh20JPP.cjs.map +0 -1
  66. package/template/node_modules/.vite-mcp/deps/protocol-CTflwIfG.js.map +0 -1
package/dist/mcp/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { a as __toESM, i as __toCommonJS, n as __esmMin, r as __exportAll, t as __commonJSMin } from "../chunk-D6g4UhsZ.js";
2
- import { $ as literal, A as LoggingLevelSchema, B as SUPPORTED_PROTOCOL_VERSIONS, E as ListResourcesRequestSchema, F as ReadResourceRequestSchema, G as assertCompleteRequestResourceTemplate, J as isJSONRPCRequest, K as isInitializeRequest, L as RequestIdSchema, M as McpError, O as ListRootsResultSchema, Q as boolean, R as ResourceLinkSchema, S as ListPromptsRequestSchema, U as ToolSchema, V as SetLevelRequestSchema, W as assertCompleteRequestPrompt, X as _undefined, Y as isJSONRPCResultResponse, Z as array, _ as ImplementationSchema, a as CallToolResultSchema, at as unknown, b as JSONRPCMessageSchema, c as CreateMessageResultSchema, ct as getParseErrorMessage, dt as isZ4Schema, et as number, f as ElicitResultSchema, ft as normalizeObjectSchema, g as GetPromptRequestSchema, h as ErrorCode, ht as safeParseAsync, i as CallToolRequestSchema, it as union, k as ListToolsRequestSchema, l as CreateMessageResultWithToolsSchema, lt as getSchemaDescription, m as EmptyResultSchema, mt as safeParse, n as mergeCapabilities, nt as record, o as CompleteRequestSchema, ot as getLiteralValue, p as EmbeddedResourceSchema, pt as objectFromShape, q as isJSONRPCErrorResponse, r as toJsonSchemaCompat, rt as string, s as ContentBlockSchema, st as getObjectShape, t as Protocol, tt as object, u as CreateTaskResultSchema, ut as isSchemaOptional, v as InitializeRequestSchema, w as ListResourceTemplatesRequestSchema, x as LATEST_PROTOCOL_VERSION, y as InitializedNotificationSchema } from "../protocol-DJmRaBzO.js";
2
+ import { $ as literal, A as LoggingLevelSchema, B as SUPPORTED_PROTOCOL_VERSIONS, E as ListResourcesRequestSchema, F as ReadResourceRequestSchema, G as assertCompleteRequestResourceTemplate, J as isJSONRPCRequest, K as isInitializeRequest, L as RequestIdSchema, M as McpError, O as ListRootsResultSchema, Q as boolean, R as ResourceLinkSchema, S as ListPromptsRequestSchema, U as ToolSchema, V as SetLevelRequestSchema, W as assertCompleteRequestPrompt, X as _undefined, Y as isJSONRPCResultResponse, Z as array, _ as ImplementationSchema, a as CallToolResultSchema, at as unknown, b as JSONRPCMessageSchema, c as CreateMessageResultSchema, ct as getParseErrorMessage, dt as isZ4Schema, et as number, f as ElicitResultSchema, ft as normalizeObjectSchema, g as GetPromptRequestSchema, h as ErrorCode, ht as safeParseAsync, i as CallToolRequestSchema, it as union, k as ListToolsRequestSchema, l as CreateMessageResultWithToolsSchema, lt as getSchemaDescription, m as EmptyResultSchema, mt as safeParse, n as mergeCapabilities, nt as record, o as CompleteRequestSchema, ot as getLiteralValue, p as EmbeddedResourceSchema, pt as objectFromShape, q as isJSONRPCErrorResponse, r as toJsonSchemaCompat, rt as string, s as ContentBlockSchema, st as getObjectShape, t as Protocol, tt as object, u as CreateTaskResultSchema, ut as isSchemaOptional, v as InitializeRequestSchema, w as ListResourceTemplatesRequestSchema, x as LATEST_PROTOCOL_VERSION, y as InitializedNotificationSchema } from "../protocol-BfAACnv0.js";
3
3
  import { createServer } from "node:http";
4
4
  import { URL as URL$1 } from "node:url";
5
5
  import fs from "node:fs";
@@ -6119,7 +6119,7 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6119
6119
  exports.default = formatsPlugin;
6120
6120
  }));
6121
6121
  //#endregion
6122
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
6122
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
6123
6123
  var import_ajv = /* @__PURE__ */ __toESM(require_ajv(), 1);
6124
6124
  var import_dist = /* @__PURE__ */ __toESM(require_dist(), 1);
6125
6125
  function createDefaultAjvInstance() {
@@ -6195,7 +6195,7 @@ var AjvJsonSchemaValidator = class {
6195
6195
  }
6196
6196
  };
6197
6197
  //#endregion
6198
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
6198
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
6199
6199
  /**
6200
6200
  * Experimental server task features for MCP SDK.
6201
6201
  * WARNING: These APIs are experimental and may change without notice.
@@ -6415,7 +6415,7 @@ var ExperimentalServerTasks = class {
6415
6415
  }
6416
6416
  };
6417
6417
  //#endregion
6418
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
6418
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
6419
6419
  /**
6420
6420
  * Experimental task capability assertion helpers.
6421
6421
  * WARNING: These APIs are experimental and may change without notice.
@@ -6466,7 +6466,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
6466
6466
  }
6467
6467
  }
6468
6468
  //#endregion
6469
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
6469
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
6470
6470
  /**
6471
6471
  * An MCP server on top of a pluggable transport.
6472
6472
  *
@@ -6807,7 +6807,7 @@ var Server = class extends Protocol {
6807
6807
  }
6808
6808
  };
6809
6809
  //#endregion
6810
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
6810
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
6811
6811
  var COMPLETABLE_SYMBOL = Symbol.for("mcp.completable");
6812
6812
  /**
6813
6813
  * Checks if a schema is completable (has completion metadata).
@@ -6826,7 +6826,7 @@ var McpZodTypeKind;
6826
6826
  McpZodTypeKind["Completable"] = "McpCompletable";
6827
6827
  })(McpZodTypeKind || (McpZodTypeKind = {}));
6828
6828
  //#endregion
6829
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js
6829
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js
6830
6830
  /**
6831
6831
  * Tool name validation utilities according to SEP: Specify Format for Tool Names
6832
6832
  *
@@ -6897,7 +6897,7 @@ function validateAndWarnToolName(name) {
6897
6897
  return result.isValid;
6898
6898
  }
6899
6899
  //#endregion
6900
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js
6900
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js
6901
6901
  /**
6902
6902
  * Experimental McpServer task features for MCP SDK.
6903
6903
  * WARNING: These APIs are experimental and may change without notice.
@@ -6928,7 +6928,7 @@ var ExperimentalMcpServerTasks = class {
6928
6928
  }
6929
6929
  };
6930
6930
  //#endregion
6931
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
6931
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
6932
6932
  /**
6933
6933
  * High-level MCP server that provides a simpler API for working with resources, tools, and prompts.
6934
6934
  * For advanced usage (like sending notifications or setting custom request handlers), use the underlying
@@ -7403,7 +7403,10 @@ var McpServer = class {
7403
7403
  if (isZodRawShapeCompat(firstArg)) {
7404
7404
  inputSchema = rest.shift();
7405
7405
  if (rest.length > 1 && typeof rest[0] === "object" && rest[0] !== null && !isZodRawShapeCompat(rest[0])) annotations = rest.shift();
7406
- } else if (typeof firstArg === "object" && firstArg !== null) annotations = rest.shift();
7406
+ } else if (typeof firstArg === "object" && firstArg !== null) {
7407
+ if (Object.values(firstArg).some((v) => typeof v === "object" && v !== null)) throw new Error(`Tool ${name} expected a Zod schema or ToolAnnotations, but received an unrecognized object`);
7408
+ annotations = rest.shift();
7409
+ }
7407
7410
  }
7408
7411
  const callback = rest[0];
7409
7412
  return this._createRegisteredTool(name, void 0, description, inputSchema, outputSchema, annotations, { taskSupport: "forbidden" }, void 0, callback);
@@ -7513,11 +7516,12 @@ function isZodRawShapeCompat(obj) {
7513
7516
  }
7514
7517
  /**
7515
7518
  * Converts a provided Zod schema to a Zod object if it is a ZodRawShapeCompat,
7516
- * otherwise returns the schema as is.
7519
+ * otherwise returns the schema as is. Throws if the value is not a valid Zod schema.
7517
7520
  */
7518
7521
  function getZodSchemaObject(schema) {
7519
7522
  if (!schema) return;
7520
7523
  if (isZodRawShapeCompat(schema)) return objectFromShape(schema);
7524
+ if (!isZodSchemaInstance(schema)) throw new Error("inputSchema must be a Zod schema or raw shape, received an unrecognized object");
7521
7525
  return schema;
7522
7526
  }
7523
7527
  function promptArgumentsFromSchema(schema) {
@@ -7973,7 +7977,7 @@ var getRequestListener = (fetchCallback, options = {}) => {
7973
7977
  };
7974
7978
  };
7975
7979
  //#endregion
7976
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.js
7980
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.js
7977
7981
  /**
7978
7982
  * Web Standards Streamable HTTP Server Transport
7979
7983
  *
@@ -8530,7 +8534,7 @@ var WebStandardStreamableHTTPServerTransport = class {
8530
8534
  }
8531
8535
  };
8532
8536
  //#endregion
8533
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/streamableHttp.js
8537
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/streamableHttp.js
8534
8538
  /**
8535
8539
  * Node.js HTTP Streamable HTTP Server Transport
8536
8540
  *
@@ -8676,12 +8680,12 @@ var StreamableHTTPServerTransport = class {
8676
8680
  }
8677
8681
  };
8678
8682
  //#endregion
8679
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+ext-apps@1.3.1_@modelcontextprotocol+sdk@1.27.1_zod@4.3.6__react-_cd1fb28fd87e0bddd0a29eba0721855d/node_modules/@modelcontextprotocol/ext-apps/dist/src/server/index.js
8680
- var g = union([literal("light"), literal("dark")]).describe("Color theme preference for the host environment."), G = union([
8683
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+ext-apps@1.3.2_@modelcontextprotocol+sdk@1.29.0_zod@4.3.6__react-_38e5f6c50a4ca9cf3f1dffc73a60c951/node_modules/@modelcontextprotocol/ext-apps/dist/src/server/index.js
8684
+ var M = union([literal("light"), literal("dark")]).describe("Color theme preference for the host environment."), G = union([
8681
8685
  literal("inline"),
8682
8686
  literal("fullscreen"),
8683
8687
  literal("pip")
8684
- ]).describe("Display mode for UI presentation."), o = record(union([
8688
+ ]).describe("Display mode for UI presentation."), r = record(union([
8685
8689
  literal("--color-background-primary"),
8686
8690
  literal("--color-background-secondary"),
8687
8691
  literal("--color-background-tertiary"),
@@ -8821,16 +8825,16 @@ object({
8821
8825
  method: literal("ui/notifications/tool-cancelled"),
8822
8826
  params: object({ reason: string().optional().describe("Optional reason for the cancellation (e.g., \"user action\", \"timeout\").") })
8823
8827
  });
8824
- var S = object({ fonts: string().optional() }), y = object({
8825
- variables: o.optional().describe("CSS variables for theming the app."),
8826
- css: S.optional().describe("CSS blocks that apps can inject.")
8828
+ var b = object({ fonts: string().optional() }), g = object({
8829
+ variables: r.optional().describe("CSS variables for theming the app."),
8830
+ css: b.optional().describe("CSS blocks that apps can inject.")
8827
8831
  });
8828
8832
  object({
8829
8833
  method: literal("ui/resource-teardown"),
8830
8834
  params: object({})
8831
8835
  });
8832
8836
  record(string(), unknown());
8833
- var q = object({
8837
+ var z$1 = object({
8834
8838
  text: object({}).optional().describe("Host supports text content blocks."),
8835
8839
  image: object({}).optional().describe("Host supports image content blocks."),
8836
8840
  audio: object({}).optional().describe("Host supports audio content blocks."),
@@ -8842,7 +8846,7 @@ object({
8842
8846
  method: literal("ui/notifications/request-teardown"),
8843
8847
  params: object({}).optional()
8844
8848
  });
8845
- var C = object({
8849
+ var S = object({
8846
8850
  experimental: object({}).optional().describe("Experimental features (structure TBD)."),
8847
8851
  openLinks: object({}).optional().describe("Host supports opening external URLs."),
8848
8852
  downloadFile: object({}).optional().describe("Host supports file downloads via ui/download-file."),
@@ -8853,9 +8857,9 @@ var C = object({
8853
8857
  permissions: K.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),
8854
8858
  csp: B.optional().describe("CSP domains approved by the host.")
8855
8859
  }).optional().describe("Sandbox configuration applied by the host."),
8856
- updateModelContext: q.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),
8857
- message: q.optional().describe("Host supports receiving content messages (ui/message) from the view.")
8858
- }), f = object({
8860
+ updateModelContext: z$1.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),
8861
+ message: z$1.optional().describe("Host supports receiving content messages (ui/message) from the view.")
8862
+ }), y = object({
8859
8863
  experimental: object({}).optional().describe("Experimental features (structure TBD)."),
8860
8864
  tools: object({ listChanged: boolean().optional().describe("App supports tools/list_changed notifications.") }).optional().describe("App exposes MCP-style tools that the host can call."),
8861
8865
  availableDisplayModes: array(G).optional().describe("Display modes the app supports.")
@@ -8889,10 +8893,10 @@ object({
8889
8893
  params: object({ mode: G.describe("The display mode being requested.") })
8890
8894
  });
8891
8895
  object({ mode: G.describe("The display mode that was actually set. May differ from requested if not supported.") }).passthrough();
8892
- var u = union([literal("model"), literal("app")]).describe("Tool visibility scope - who can access the tool.");
8896
+ var C = union([literal("model"), literal("app")]).describe("Tool visibility scope - who can access the tool.");
8893
8897
  object({
8894
8898
  resourceUri: string().optional(),
8895
- visibility: array(u).optional().describe(`Who can access this tool. Default: ["model", "app"]
8899
+ visibility: array(C).optional().describe(`Who can access this tool. Default: ["model", "app"]
8896
8900
  - "model": Tool visible to and callable by the agent
8897
8901
  - "app": Tool callable by the app from this server only`)
8898
8902
  });
@@ -8921,13 +8925,13 @@ object({
8921
8925
  method: literal("ui/notifications/tool-result"),
8922
8926
  params: CallToolResultSchema.describe("Standard MCP tool execution result.")
8923
8927
  });
8924
- var k = object({
8928
+ var E = object({
8925
8929
  toolInfo: object({
8926
8930
  id: RequestIdSchema.optional().describe("JSON-RPC id of the tools/call request."),
8927
8931
  tool: ToolSchema.describe("Tool definition including name, inputSchema, etc.")
8928
8932
  }).optional().describe("Metadata of the tool call that instantiated this App."),
8929
- theme: g.optional().describe("Current color theme preference."),
8930
- styles: y.optional().describe("Style configuration for theming the app."),
8933
+ theme: M.optional().describe("Current color theme preference."),
8934
+ styles: g.optional().describe("Style configuration for theming the app."),
8931
8935
  displayMode: G.optional().describe("How the UI is currently displayed."),
8932
8936
  availableDisplayModes: array(G).optional().describe("Display modes the host supports."),
8933
8937
  containerDimensions: union([object({ height: number().describe("Fixed container height in pixels.") }), object({ maxHeight: union([number(), _undefined()]).optional().describe("Maximum container height in pixels.") })]).and(union([object({ width: number().describe("Fixed container width in pixels.") }), object({ maxWidth: union([number(), _undefined()]).optional().describe("Maximum container width in pixels.") })])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
@@ -8953,7 +8957,7 @@ container holding the app. Specify either width or maxWidth, and either height o
8953
8957
  }).passthrough();
8954
8958
  object({
8955
8959
  method: literal("ui/notifications/host-context-changed"),
8956
- params: k.describe("Partial context update containing only changed fields.")
8960
+ params: E.describe("Partial context update containing only changed fields.")
8957
8961
  });
8958
8962
  object({
8959
8963
  method: literal("ui/update-model-context"),
@@ -8966,45 +8970,45 @@ object({
8966
8970
  method: literal("ui/initialize"),
8967
8971
  params: object({
8968
8972
  appInfo: ImplementationSchema.describe("App identification (name and version)."),
8969
- appCapabilities: f.describe("Features and capabilities this app provides."),
8973
+ appCapabilities: y.describe("Features and capabilities this app provides."),
8970
8974
  protocolVersion: string().describe("Protocol version this app supports.")
8971
8975
  })
8972
8976
  });
8973
8977
  object({
8974
8978
  protocolVersion: string().describe("Negotiated protocol version string (e.g., \"2025-11-21\")."),
8975
8979
  hostInfo: ImplementationSchema.describe("Host application identification and version."),
8976
- hostCapabilities: C.describe("Features and capabilities provided by the host."),
8977
- hostContext: k.describe("Rich context about the host environment.")
8980
+ hostCapabilities: S.describe("Features and capabilities provided by the host."),
8981
+ hostContext: E.describe("Rich context about the host environment.")
8978
8982
  }).passthrough();
8979
- var v = "ui/resourceUri", d = "text/html;profile=mcp-app";
8980
- function hZ(Z, $, J, X) {
8981
- let D = J._meta, V = D.ui, L = D[v], W = D;
8982
- if (V?.resourceUri && !L) W = {
8983
- ...D,
8984
- [v]: V.resourceUri
8983
+ var U = "ui/resourceUri", f = "text/html;profile=mcp-app";
8984
+ function fZ(Z, $, J, X) {
8985
+ let V = J._meta, W = V.ui, L = V[U], D = V;
8986
+ if (W?.resourceUri && !L) D = {
8987
+ ...V,
8988
+ [U]: W.resourceUri
8985
8989
  };
8986
- else if (L && !V?.resourceUri) W = {
8987
- ...D,
8990
+ else if (L && !W?.resourceUri) D = {
8991
+ ...V,
8988
8992
  ui: {
8989
- ...V,
8993
+ ...W,
8990
8994
  resourceUri: L
8991
8995
  }
8992
8996
  };
8993
8997
  return Z.registerTool($, {
8994
8998
  ...J,
8995
- _meta: W
8999
+ _meta: D
8996
9000
  }, X);
8997
9001
  }
8998
- function mZ(Z, $, J, X, D) {
9002
+ function uZ(Z, $, J, X, V) {
8999
9003
  return Z.registerResource($, J, {
9000
- mimeType: d,
9004
+ mimeType: f,
9001
9005
  ...X
9002
- }, D);
9006
+ }, V);
9003
9007
  }
9004
- var IQ = "io.modelcontextprotocol/ui";
9005
- function cZ(Z) {
9008
+ var zQ = "io.modelcontextprotocol/ui";
9009
+ function dZ(Z) {
9006
9010
  if (!Z) return;
9007
- return Z.extensions?.[IQ];
9011
+ return Z.extensions?.[zQ];
9008
9012
  }
9009
9013
  //#endregion
9010
9014
  //#region src/mcp/resolve-domain.ts
@@ -9319,7 +9323,7 @@ function createAppServer(config, simulations, viteMode) {
9319
9323
  registeredUriSet.add(uri);
9320
9324
  const listMeta = viteMode ? injectViteCSP(resourceMeta) : resourceMeta;
9321
9325
  const handle = mcpServer.registerResource(resourceName, uri, {
9322
- mimeType: d,
9326
+ mimeType: f,
9323
9327
  description: resource.description,
9324
9328
  _meta: listMeta
9325
9329
  }, async (readUri, extra) => {
@@ -9338,7 +9342,7 @@ function createAppServer(config, simulations, viteMode) {
9338
9342
  console.log(`[MCP] ReadResource: ${readUri.href} → ${sizeKB}KB${servedVite ? " (vite)" : " (built)"}`);
9339
9343
  return { contents: [{
9340
9344
  uri: readUri.href,
9341
- mimeType: d,
9345
+ mimeType: f,
9342
9346
  text: content,
9343
9347
  _meta: readMeta
9344
9348
  }] };
@@ -9352,7 +9356,7 @@ function createAppServer(config, simulations, viteMode) {
9352
9356
  ...toolMeta.ui?.visibility ? { visibility: toolMeta.ui.visibility } : {}
9353
9357
  }
9354
9358
  };
9355
- const toolHandle = hZ(mcpServer, tool.name, {
9359
+ const toolHandle = fZ(mcpServer, tool.name, {
9356
9360
  description: tool.description,
9357
9361
  inputSchema: z.object({}).passthrough(),
9358
9362
  ...simulation.outputSchema ? { outputSchema: simulation.outputSchema } : {},
@@ -9554,6 +9558,7 @@ async function handleMcpRequest(req, res, config, simulations, viteMode) {
9554
9558
  console.warn(`[MCP] Accept header negotiation (expected with some clients)`);
9555
9559
  return;
9556
9560
  }
9561
+ if (error.message?.includes("Server not initialized")) return;
9557
9562
  const id = transport.sessionId;
9558
9563
  console.error(`[MCP] Transport error${id ? ` (${id.substring(0, 8)}...)` : ""}:`, error);
9559
9564
  };
@@ -9799,7 +9804,7 @@ function createProductionMcpServer(config) {
9799
9804
  if (res) {
9800
9805
  if (!registeredResources.has(res.uri)) {
9801
9806
  registeredResources.add(res.uri);
9802
- const handle = mZ(mcpServer, res.name, res.uri, {
9807
+ const handle = uZ(mcpServer, res.name, res.uri, {
9803
9808
  description: res.description,
9804
9809
  _meta: res._meta
9805
9810
  }, async () => {
@@ -9807,7 +9812,7 @@ function createProductionMcpServer(config) {
9807
9812
  const readMeta = serverUrl ? injectDefaultDomain(resolved, clientName, serverUrl) : resolved;
9808
9813
  return { contents: [{
9809
9814
  uri: res.uri,
9810
- mimeType: d,
9815
+ mimeType: f,
9811
9816
  text: res.html,
9812
9817
  _meta: readMeta
9813
9818
  }] };
@@ -9828,7 +9833,7 @@ function createProductionMcpServer(config) {
9828
9833
  }
9829
9834
  }
9830
9835
  };
9831
- hZ(mcpServer, tool.name, toolConfig, makeCallback());
9836
+ fZ(mcpServer, tool.name, toolConfig, makeCallback());
9832
9837
  } else {
9833
9838
  const cb = makeCallback();
9834
9839
  const toolConfig = {
@@ -10246,6 +10251,6 @@ function startProductionHttpServer(config, portOrOptions) {
10246
10251
  process.on("SIGINT", () => void shutdown());
10247
10252
  }
10248
10253
  //#endregion
10249
- export { IQ as EXTENSION_ID, FAVICON_BASE64, FAVICON_BUFFER, FAVICON_DATA_URI, d as RESOURCE_MIME_TYPE, v as RESOURCE_URI_META_KEY, computeChatGPTDomain, computeClaudeDomain, createHandler, createMcpHandler, createProductionMcpServer, cZ as getUiCapability, injectDefaultDomain, injectResolvedDomain, mZ as registerAppResource, hZ as registerAppTool, resolveDomain, runMCPServer, setJsonLogging, startProductionHttpServer };
10254
+ export { zQ as EXTENSION_ID, FAVICON_BASE64, FAVICON_BUFFER, FAVICON_DATA_URI, f as RESOURCE_MIME_TYPE, U as RESOURCE_URI_META_KEY, computeChatGPTDomain, computeClaudeDomain, createHandler, createMcpHandler, createProductionMcpServer, dZ as getUiCapability, injectDefaultDomain, injectResolvedDomain, uZ as registerAppResource, fZ as registerAppTool, resolveDomain, runMCPServer, setJsonLogging, startProductionHttpServer };
10250
10255
 
10251
10256
  //# sourceMappingURL=index.js.map