sunpeak 0.19.2 → 0.19.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/README.md +6 -4
  2. package/bin/commands/dev.mjs +1 -1
  3. package/bin/commands/inspect.mjs +1 -1
  4. package/bin/commands/new.mjs +9 -5
  5. package/bin/commands/start.mjs +3 -1
  6. package/bin/commands/test-init.mjs +478 -76
  7. package/bin/commands/test.mjs +357 -4
  8. package/bin/lib/eval/eval-reporter.mjs +105 -0
  9. package/bin/lib/eval/eval-runner.mjs +310 -0
  10. package/bin/lib/eval/eval-types.d.mts +168 -0
  11. package/bin/lib/eval/eval-vitest-plugin.mjs +158 -0
  12. package/bin/lib/eval/model-registry.mjs +73 -0
  13. package/bin/lib/sandbox-server.mjs +5 -2
  14. package/bin/sunpeak.js +1 -0
  15. package/dist/chatgpt/index.cjs +1 -1
  16. package/dist/chatgpt/index.js +1 -1
  17. package/dist/claude/index.cjs +1 -1
  18. package/dist/claude/index.js +1 -1
  19. package/dist/host/chatgpt/index.cjs +1 -1
  20. package/dist/host/chatgpt/index.js +1 -1
  21. package/dist/index.cjs +134 -124
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.d.ts +3 -1
  24. package/dist/index.js +71 -62
  25. package/dist/index.js.map +1 -1
  26. package/dist/inspector/index.cjs +1 -1
  27. package/dist/inspector/index.js +1 -1
  28. package/dist/{inspector-Cdo5BK2D.js → inspector-D5DckQuU.js} +236 -98
  29. package/dist/inspector-D5DckQuU.js.map +1 -0
  30. package/dist/{inspector-8nPV2A-z.cjs → inspector-jY9O18z9.cjs} +237 -99
  31. package/dist/inspector-jY9O18z9.cjs.map +1 -0
  32. package/dist/mcp/index.cjs +237 -140
  33. package/dist/mcp/index.cjs.map +1 -1
  34. package/dist/mcp/index.d.ts +1 -1
  35. package/dist/mcp/index.js +230 -134
  36. package/dist/mcp/index.js.map +1 -1
  37. package/dist/mcp/production-server.d.ts +31 -0
  38. package/dist/{protocol-C7kTcBr_.cjs → protocol-C8pFDmcy.cjs} +8194 -8187
  39. package/dist/protocol-C8pFDmcy.cjs.map +1 -0
  40. package/dist/{protocol-BfAACnv0.js → protocol-CRqiPTLT.js} +8186 -8185
  41. package/dist/protocol-CRqiPTLT.js.map +1 -0
  42. package/dist/{use-app-CfP9VypY.js → use-app-Bfargfa3.js} +194 -94
  43. package/dist/use-app-Bfargfa3.js.map +1 -0
  44. package/dist/{use-app-CzcYw1Kz.cjs → use-app-CbsBEmwv.cjs} +254 -148
  45. package/dist/use-app-CbsBEmwv.cjs.map +1 -0
  46. package/package.json +27 -3
  47. package/template/README.md +17 -7
  48. package/template/_gitignore +2 -0
  49. package/template/dist/albums/albums.html +15 -15
  50. package/template/dist/albums/albums.json +1 -1
  51. package/template/dist/carousel/carousel.html +19 -19
  52. package/template/dist/carousel/carousel.json +1 -1
  53. package/template/dist/map/map.html +14 -14
  54. package/template/dist/map/map.json +1 -1
  55. package/template/dist/review/review.html +11 -11
  56. package/template/dist/review/review.json +1 -1
  57. package/template/node_modules/.bin/vitest +2 -2
  58. package/template/node_modules/.vite/deps/_metadata.json +3 -3
  59. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps.js +192 -91
  60. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps.js.map +1 -1
  61. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_app-bridge.js +231 -92
  62. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_app-bridge.js.map +1 -1
  63. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_react.js +208 -105
  64. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_react.js.map +1 -1
  65. package/template/node_modules/.vite-mcp/deps/_metadata.json +25 -25
  66. package/template/node_modules/.vite-mcp/deps/{protocol-B_qKkui_.js → protocol-BqGB4zBx.js} +45 -45
  67. package/template/node_modules/.vite-mcp/deps/protocol-BqGB4zBx.js.map +1 -0
  68. package/template/node_modules/.vite-mcp/deps/vitest.js +7 -7
  69. package/template/node_modules/.vite-mcp/deps/vitest.js.map +1 -1
  70. package/template/tests/e2e/visual.spec.ts-snapshots/albums-dark-chatgpt-darwin.png +0 -0
  71. package/template/tests/e2e/visual.spec.ts-snapshots/albums-dark-claude-darwin.png +0 -0
  72. package/template/tests/e2e/visual.spec.ts-snapshots/albums-fullscreen-chatgpt-darwin.png +0 -0
  73. package/template/tests/e2e/visual.spec.ts-snapshots/albums-fullscreen-claude-darwin.png +0 -0
  74. package/template/tests/e2e/visual.spec.ts-snapshots/albums-light-chatgpt-darwin.png +0 -0
  75. package/template/tests/e2e/visual.spec.ts-snapshots/albums-light-claude-darwin.png +0 -0
  76. package/template/tests/e2e/visual.spec.ts-snapshots/albums-page-light-chatgpt-darwin.png +0 -0
  77. package/template/tests/e2e/visual.spec.ts-snapshots/albums-page-light-claude-darwin.png +0 -0
  78. package/template/tests/evals/.env.example +5 -0
  79. package/template/tests/evals/albums.eval.ts +28 -0
  80. package/template/tests/evals/carousel.eval.ts +26 -0
  81. package/template/tests/evals/eval.config.ts +26 -0
  82. package/template/tests/evals/map.eval.ts +23 -0
  83. package/template/tests/evals/review.eval.ts +48 -0
  84. package/dist/inspector-8nPV2A-z.cjs.map +0 -1
  85. package/dist/inspector-Cdo5BK2D.js.map +0 -1
  86. package/dist/protocol-BfAACnv0.js.map +0 -1
  87. package/dist/protocol-C7kTcBr_.cjs.map +0 -1
  88. package/dist/use-app-CfP9VypY.js.map +0 -1
  89. package/dist/use-app-CzcYw1Kz.cjs.map +0 -1
  90. package/template/node_modules/.vite-mcp/deps/protocol-B_qKkui_.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { $ as literal, C as ListPromptsResultSchema, D as ListResourcesResultSchema, E as ListResourcesRequestSchema, F as ReadResourceRequestSchema, H as ToolListChangedNotificationSchema, I as ReadResourceResultSchema, L as RequestIdSchema, N as PingRequestSchema, P as PromptListChangedNotificationSchema, Q as boolean, R as ResourceLinkSchema, S as ListPromptsRequestSchema, T as ListResourceTemplatesResultSchema, U as ToolSchema, X as _undefined, Z as array, _ as ImplementationSchema, a as CallToolResultSchema, at as unknown, b as JSONRPCMessageSchema, et as number, i as CallToolRequestSchema, it as union, j as LoggingMessageNotificationSchema, nt as record, p as EmbeddedResourceSchema, rt as string, s as ContentBlockSchema, t as Protocol, tt as object, w as ListResourceTemplatesRequestSchema, z as ResourceListChangedNotificationSchema } from "./protocol-BfAACnv0.js";
1
+ import { $ as ToolListChangedNotificationSchema, A as JSONRPCMessageSchema, B as ListToolsResultSchema, C as EmbeddedResourceSchema, D as ImplementationSchema, F as ListResourceTemplatesResultSchema, G as PromptListChangedNotificationSchema, H as LoggingMessageNotificationSchema, I as ListResourcesRequestSchema, J as RequestIdSchema, K as ReadResourceRequestSchema, L as ListResourcesResultSchema, M as ListPromptsRequestSchema, N as ListPromptsResultSchema, P as ListResourceTemplatesRequestSchema, W as PingRequestSchema, X as ResourceListChangedNotificationSchema, Y as ResourceLinkSchema, _ as ContentBlockSchema, ct as array, dt as number, et as ToolSchema, ft as object, gt as unknown, h as CallToolResultSchema, ht as union, lt as boolean, m as CallToolRequestSchema, mt as string, pt as record, q as ReadResourceResultSchema, st as _undefined, t as Protocol, ut as literal } from "./protocol-CRqiPTLT.js";
2
2
  import * as React from "react";
3
3
  import { useCallback, useEffect, useMemo, useRef, useState } from "react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -808,12 +808,68 @@ registerHostShell({
808
808
  }`
809
809
  });
810
810
  //#endregion
811
- //#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/app-bridge.js
812
- var G = "2026-01-26", m = union([literal("light"), literal("dark")]).describe("Color theme preference for the host environment."), W = union([
811
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+ext-apps@1.5.0_@modelcontextprotocol+sdk@1.29.0_zod@4.3.6__react-_f4871531d9cf52c692eb6edc1ee416ef/node_modules/@modelcontextprotocol/ext-apps/dist/src/app-bridge.js
812
+ var j = class extends Protocol {
813
+ _registeredMethods = /* @__PURE__ */ new Set();
814
+ _eventSlots = /* @__PURE__ */ new Map();
815
+ onEventDispatch(X, Y) {}
816
+ _ensureEventSlot(X) {
817
+ let Y = this._eventSlots.get(X);
818
+ if (!Y) {
819
+ let Z = this.eventSchemas[X];
820
+ if (!Z) throw Error(`Unknown event: ${String(X)}`);
821
+ Y = { listeners: [] }, this._eventSlots.set(X, Y);
822
+ let $ = Z.shape.method.value;
823
+ this._registeredMethods.add($);
824
+ let J = Y;
825
+ super.setNotificationHandler(Z, (K) => {
826
+ let N = K.params;
827
+ this.onEventDispatch(X, N), J.onHandler?.(N);
828
+ for (let W of [...J.listeners]) W(N);
829
+ });
830
+ }
831
+ return Y;
832
+ }
833
+ setEventHandler(X, Y) {
834
+ let Z = this._ensureEventSlot(X);
835
+ if (Z.onHandler && Y) console.warn(`[MCP Apps] on${String(X)} handler replaced. Use addEventListener("${String(X)}", …) to add multiple listeners without replacing.`);
836
+ Z.onHandler = Y;
837
+ }
838
+ getEventHandler(X) {
839
+ return this._eventSlots.get(X)?.onHandler;
840
+ }
841
+ addEventListener(X, Y) {
842
+ this._ensureEventSlot(X).listeners.push(Y);
843
+ }
844
+ removeEventListener(X, Y) {
845
+ let Z = this._eventSlots.get(X);
846
+ if (!Z) return;
847
+ let $ = Z.listeners.indexOf(Y);
848
+ if ($ !== -1) Z.listeners.splice($, 1);
849
+ }
850
+ setRequestHandler = (X, Y) => {
851
+ this._assertMethodNotRegistered(X, "setRequestHandler"), super.setRequestHandler(X, Y);
852
+ };
853
+ setNotificationHandler = (X, Y) => {
854
+ this._assertMethodNotRegistered(X, "setNotificationHandler"), super.setNotificationHandler(X, Y);
855
+ };
856
+ warnIfRequestHandlerReplaced(X, Y, Z) {
857
+ if (Y && Z) console.warn(`[MCP Apps] ${X} handler replaced. Previous handler will no longer be called.`);
858
+ }
859
+ replaceRequestHandler = (X, Y) => {
860
+ let Z = X.shape.method.value;
861
+ this._registeredMethods.add(Z), super.setRequestHandler(X, Y);
862
+ };
863
+ _assertMethodNotRegistered(X, Y) {
864
+ let Z = X.shape.method.value;
865
+ if (this._registeredMethods.has(Z)) throw Error(`Handler for "${Z}" already registered (via ${Y}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);
866
+ this._registeredMethods.add(Z);
867
+ }
868
+ }, G = "2026-01-26", p = union([literal("light"), literal("dark")]).describe("Color theme preference for the host environment."), D = union([
813
869
  literal("inline"),
814
870
  literal("fullscreen"),
815
871
  literal("pip")
816
- ]).describe("Display mode for UI presentation."), OQ = record(union([
872
+ ]).describe("Display mode for UI presentation."), AQ = record(union([
817
873
  literal("--color-background-primary"),
818
874
  literal("--color-background-secondary"),
819
875
  literal("--color-background-tertiary"),
@@ -908,17 +964,17 @@ Individual style keys are optional - hosts may provide any subset of these value
908
964
  Values are strings containing CSS values (colors, sizes, font stacks, etc.).
909
965
 
910
966
  Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
911
- for compatibility with Zod schema generation. Both are functionally equivalent for validation.`), V = object({
967
+ for compatibility with Zod schema generation. Both are functionally equivalent for validation.`), A = object({
912
968
  method: literal("ui/open-link"),
913
969
  params: object({ url: string().describe("URL to open in the host's browser") })
914
970
  });
915
971
  object({ isError: boolean().optional().describe("True if the host failed to open the URL (e.g., due to security policy).") }).passthrough();
916
972
  object({ isError: boolean().optional().describe("True if the download failed (e.g., user cancelled or host denied).") }).passthrough();
917
973
  object({ isError: boolean().optional().describe("True if the host rejected or failed to deliver the message.") }).passthrough();
918
- var L = object({
974
+ var T = object({
919
975
  method: literal("ui/notifications/sandbox-proxy-ready"),
920
976
  params: object({})
921
- }), N = object({
977
+ }), B = object({
922
978
  connectDomains: array(string()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).
923
979
 
924
980
  - Maps to CSP \`connect-src\` directive
@@ -926,12 +982,12 @@ var L = object({
926
982
  resourceDomains: array(string()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),
927
983
  frameDomains: array(string()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),
928
984
  baseUriDomains: array(string()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")
929
- }), j = object({
985
+ }), E = object({
930
986
  camera: object({}).optional().describe("Request camera access.\n\nMaps to Permission Policy `camera` feature."),
931
987
  microphone: object({}).optional().describe("Request microphone access.\n\nMaps to Permission Policy `microphone` feature."),
932
988
  geolocation: object({}).optional().describe("Request geolocation access.\n\nMaps to Permission Policy `geolocation` feature."),
933
989
  clipboardWrite: object({}).optional().describe("Request clipboard write access.\n\nMaps to Permission Policy `clipboard-write` feature.")
934
- }), P = object({
990
+ }), w = object({
935
991
  method: literal("ui/notifications/size-changed"),
936
992
  params: object({
937
993
  width: number().optional().describe("New width in pixels."),
@@ -950,25 +1006,25 @@ object({
950
1006
  method: literal("ui/notifications/tool-cancelled"),
951
1007
  params: object({ reason: string().optional().describe("Optional reason for the cancellation (e.g., \"user action\", \"timeout\").") })
952
1008
  });
953
- var p = object({ fonts: string().optional() }), c = object({
954
- variables: OQ.optional().describe("CSS variables for theming the app."),
955
- css: p.optional().describe("CSS blocks that apps can inject.")
1009
+ var n = object({ fonts: string().optional() }), c = object({
1010
+ variables: AQ.optional().describe("CSS variables for theming the app."),
1011
+ css: n.optional().describe("CSS blocks that apps can inject.")
956
1012
  });
957
1013
  object({
958
1014
  method: literal("ui/resource-teardown"),
959
1015
  params: object({})
960
1016
  });
961
- var H = record(string(), unknown()), O = object({
1017
+ var g = record(string(), unknown()), I = object({
962
1018
  text: object({}).optional().describe("Host supports text content blocks."),
963
1019
  image: object({}).optional().describe("Host supports image content blocks."),
964
1020
  audio: object({}).optional().describe("Host supports audio content blocks."),
965
1021
  resource: object({}).optional().describe("Host supports resource content blocks."),
966
1022
  resourceLink: object({}).optional().describe("Host supports resource link content blocks."),
967
1023
  structuredContent: object({}).optional().describe("Host supports structured content.")
968
- }), M = object({
1024
+ }), C = object({
969
1025
  method: literal("ui/notifications/request-teardown"),
970
1026
  params: object({}).optional()
971
- }), n = object({
1027
+ }), r = object({
972
1028
  experimental: object({}).optional().describe("Experimental features (structure TBD)."),
973
1029
  openLinks: object({}).optional().describe("Host supports opening external URLs."),
974
1030
  downloadFile: object({}).optional().describe("Host supports file downloads via ui/download-file."),
@@ -976,22 +1032,22 @@ var H = record(string(), unknown()), O = object({
976
1032
  serverResources: object({ listChanged: boolean().optional().describe("Host supports resources/list_changed notifications.") }).optional().describe("Host can proxy resource reads to the MCP server."),
977
1033
  logging: object({}).optional().describe("Host accepts log messages."),
978
1034
  sandbox: object({
979
- permissions: j.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),
980
- csp: N.optional().describe("CSP domains approved by the host.")
1035
+ permissions: E.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),
1036
+ csp: B.optional().describe("CSP domains approved by the host.")
981
1037
  }).optional().describe("Sandbox configuration applied by the host."),
982
- updateModelContext: O.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),
983
- message: O.optional().describe("Host supports receiving content messages (ui/message) from the view.")
984
- }), i = object({
1038
+ updateModelContext: I.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),
1039
+ message: I.optional().describe("Host supports receiving content messages (ui/message) from the view.")
1040
+ }), l = object({
985
1041
  experimental: object({}).optional().describe("Experimental features (structure TBD)."),
986
1042
  tools: object({ listChanged: boolean().optional().describe("App supports tools/list_changed notifications.") }).optional().describe("App exposes MCP-style tools that the host can call."),
987
- availableDisplayModes: array(W).optional().describe("Display modes the app supports.")
988
- }), v = object({
1043
+ availableDisplayModes: array(D).optional().describe("Display modes the app supports.")
1044
+ }), S = object({
989
1045
  method: literal("ui/notifications/initialized"),
990
1046
  params: object({}).optional()
991
1047
  });
992
1048
  object({
993
- csp: N.optional().describe("Content Security Policy configuration for UI resources."),
994
- permissions: j.optional().describe("Sandbox permissions requested by the UI resource."),
1049
+ csp: B.optional().describe("Content Security Policy configuration for UI resources."),
1050
+ permissions: E.optional().describe("Sandbox permissions requested by the UI resource."),
995
1051
  domain: string().optional().describe(`Dedicated origin for view sandbox.
996
1052
 
997
1053
  Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
@@ -1009,23 +1065,23 @@ Boolean requesting whether a visible border and background is provided by the ho
1009
1065
  - \`false\`: request no visible border + background
1010
1066
  - omitted: host decides border`)
1011
1067
  });
1012
- var E = object({
1068
+ var _ = object({
1013
1069
  method: literal("ui/request-display-mode"),
1014
- params: object({ mode: W.describe("The display mode being requested.") })
1070
+ params: object({ mode: D.describe("The display mode being requested.") })
1015
1071
  });
1016
- object({ mode: W.describe("The display mode that was actually set. May differ from requested if not supported.") }).passthrough();
1017
- var l = union([literal("model"), literal("app")]).describe("Tool visibility scope - who can access the tool.");
1072
+ object({ mode: D.describe("The display mode that was actually set. May differ from requested if not supported.") }).passthrough();
1073
+ var o = union([literal("model"), literal("app")]).describe("Tool visibility scope - who can access the tool.");
1018
1074
  object({
1019
1075
  resourceUri: string().optional(),
1020
- visibility: array(l).optional().describe(`Who can access this tool. Default: ["model", "app"]
1076
+ visibility: array(o).optional().describe(`Who can access this tool. Default: ["model", "app"]
1021
1077
  - "model": Tool visible to and callable by the agent
1022
1078
  - "app": Tool callable by the app from this server only`)
1023
1079
  });
1024
1080
  object({ mimeTypes: array(string()).optional().describe("Array of supported MIME types for UI resources.\nMust include `\"text/html;profile=mcp-app\"` for MCP Apps support.") });
1025
- var C = object({
1081
+ var f = object({
1026
1082
  method: literal("ui/download-file"),
1027
1083
  params: object({ contents: array(union([EmbeddedResourceSchema, ResourceLinkSchema])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.") })
1028
- }), S = object({
1084
+ }), y = object({
1029
1085
  method: literal("ui/message"),
1030
1086
  params: object({
1031
1087
  role: literal("user").describe("Message role, currently only \"user\" is supported."),
@@ -1037,23 +1093,23 @@ object({
1037
1093
  params: object({
1038
1094
  html: string().describe("HTML content to load into the inner iframe."),
1039
1095
  sandbox: string().optional().describe("Optional override for the inner iframe's sandbox attribute."),
1040
- csp: N.optional().describe("CSP configuration from resource metadata."),
1041
- permissions: j.optional().describe("Sandbox permissions from resource metadata.")
1096
+ csp: B.optional().describe("CSP configuration from resource metadata."),
1097
+ permissions: E.optional().describe("Sandbox permissions from resource metadata.")
1042
1098
  })
1043
1099
  });
1044
1100
  object({
1045
1101
  method: literal("ui/notifications/tool-result"),
1046
1102
  params: CallToolResultSchema.describe("Standard MCP tool execution result.")
1047
1103
  });
1048
- var y = object({
1104
+ var x = object({
1049
1105
  toolInfo: object({
1050
1106
  id: RequestIdSchema.optional().describe("JSON-RPC id of the tools/call request."),
1051
1107
  tool: ToolSchema.describe("Tool definition including name, inputSchema, etc.")
1052
1108
  }).optional().describe("Metadata of the tool call that instantiated this App."),
1053
- theme: m.optional().describe("Current color theme preference."),
1109
+ theme: p.optional().describe("Current color theme preference."),
1054
1110
  styles: c.optional().describe("Style configuration for theming the app."),
1055
- displayMode: W.optional().describe("How the UI is currently displayed."),
1056
- availableDisplayModes: array(W).optional().describe("Display modes the host supports."),
1111
+ displayMode: D.optional().describe("How the UI is currently displayed."),
1112
+ availableDisplayModes: array(D).optional().describe("Display modes the host supports."),
1057
1113
  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
1058
1114
  container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),
1059
1115
  locale: string().optional().describe("User's language and region preference in BCP 47 format."),
@@ -1077,29 +1133,29 @@ container holding the app. Specify either width or maxWidth, and either height o
1077
1133
  }).passthrough();
1078
1134
  object({
1079
1135
  method: literal("ui/notifications/host-context-changed"),
1080
- params: y.describe("Partial context update containing only changed fields.")
1136
+ params: x.describe("Partial context update containing only changed fields.")
1081
1137
  });
1082
- var f = object({
1138
+ var d = object({
1083
1139
  method: literal("ui/update-model-context"),
1084
1140
  params: object({
1085
1141
  content: array(ContentBlockSchema).optional().describe("Context content blocks (text, image, etc.)."),
1086
1142
  structuredContent: record(string(), unknown().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")
1087
1143
  })
1088
- }), d = object({
1144
+ }), b = object({
1089
1145
  method: literal("ui/initialize"),
1090
1146
  params: object({
1091
1147
  appInfo: ImplementationSchema.describe("App identification (name and version)."),
1092
- appCapabilities: i.describe("Features and capabilities this app provides."),
1148
+ appCapabilities: l.describe("Features and capabilities this app provides."),
1093
1149
  protocolVersion: string().describe("Protocol version this app supports.")
1094
1150
  })
1095
1151
  });
1096
1152
  object({
1097
1153
  protocolVersion: string().describe("Negotiated protocol version string (e.g., \"2025-11-21\")."),
1098
1154
  hostInfo: ImplementationSchema.describe("Host application identification and version."),
1099
- hostCapabilities: n.describe("Features and capabilities provided by the host."),
1100
- hostContext: y.describe("Rich context about the host environment.")
1155
+ hostCapabilities: r.describe("Features and capabilities provided by the host."),
1156
+ hostContext: x.describe("Rich context about the host environment.")
1101
1157
  }).passthrough();
1102
- var D = class {
1158
+ var z = class {
1103
1159
  eventTarget;
1104
1160
  eventSource;
1105
1161
  messageListener;
@@ -1134,21 +1190,28 @@ var D = class {
1134
1190
  setProtocolVersion;
1135
1191
  };
1136
1192
  var lQ = [G];
1137
- var rQ = class extends Protocol {
1193
+ var oQ = class extends j {
1138
1194
  _client;
1139
1195
  _hostInfo;
1140
1196
  _capabilities;
1141
1197
  _appCapabilities;
1142
1198
  _hostContext = {};
1143
1199
  _appInfo;
1200
+ eventSchemas = {
1201
+ sizechange: w,
1202
+ sandboxready: T,
1203
+ initialized: S,
1204
+ requestteardown: C,
1205
+ loggingmessage: LoggingMessageNotificationSchema
1206
+ };
1144
1207
  constructor(X, Y, Z, $) {
1145
1208
  super($);
1146
1209
  this._client = X;
1147
1210
  this._hostInfo = Y;
1148
1211
  this._capabilities = Z;
1149
- this._hostContext = $?.hostContext || {}, this.setRequestHandler(d, (J) => this._oninitialize(J)), this.setRequestHandler(PingRequestSchema, (J, K) => {
1212
+ this._hostContext = $?.hostContext || {}, this.setRequestHandler(b, (J) => this._oninitialize(J)), this.setRequestHandler(PingRequestSchema, (J, K) => {
1150
1213
  return this.onping?.(J.params, K), {};
1151
- }), this.setRequestHandler(E, (J) => {
1214
+ }), this.replaceRequestHandler(_, (J) => {
1152
1215
  return { mode: this._hostContext.displayMode ?? "inline" };
1153
1216
  });
1154
1217
  }
@@ -1159,51 +1222,94 @@ var rQ = class extends Protocol {
1159
1222
  return this._appInfo;
1160
1223
  }
1161
1224
  onping;
1225
+ get onsizechange() {
1226
+ return this.getEventHandler("sizechange");
1227
+ }
1162
1228
  set onsizechange(X) {
1163
- this.setNotificationHandler(P, (Y) => X(Y.params));
1229
+ this.setEventHandler("sizechange", X);
1230
+ }
1231
+ get onsandboxready() {
1232
+ return this.getEventHandler("sandboxready");
1164
1233
  }
1165
1234
  set onsandboxready(X) {
1166
- this.setNotificationHandler(L, (Y) => X(Y.params));
1235
+ this.setEventHandler("sandboxready", X);
1236
+ }
1237
+ get oninitialized() {
1238
+ return this.getEventHandler("initialized");
1167
1239
  }
1168
1240
  set oninitialized(X) {
1169
- this.setNotificationHandler(v, (Y) => X(Y.params));
1241
+ this.setEventHandler("initialized", X);
1242
+ }
1243
+ _onmessage;
1244
+ get onmessage() {
1245
+ return this._onmessage;
1170
1246
  }
1171
1247
  set onmessage(X) {
1172
- this.setRequestHandler(S, async (Y, Z) => {
1173
- return X(Y.params, Z);
1248
+ this.warnIfRequestHandlerReplaced("onmessage", this._onmessage, X), this._onmessage = X, this.replaceRequestHandler(y, async (Y, Z) => {
1249
+ if (!this._onmessage) throw Error("No onmessage handler set");
1250
+ return this._onmessage(Y.params, Z);
1174
1251
  });
1175
1252
  }
1253
+ _onopenlink;
1254
+ get onopenlink() {
1255
+ return this._onopenlink;
1256
+ }
1176
1257
  set onopenlink(X) {
1177
- this.setRequestHandler(V, async (Y, Z) => {
1178
- return X(Y.params, Z);
1258
+ this.warnIfRequestHandlerReplaced("onopenlink", this._onopenlink, X), this._onopenlink = X, this.replaceRequestHandler(A, async (Y, Z) => {
1259
+ if (!this._onopenlink) throw Error("No onopenlink handler set");
1260
+ return this._onopenlink(Y.params, Z);
1179
1261
  });
1180
1262
  }
1263
+ _ondownloadfile;
1264
+ get ondownloadfile() {
1265
+ return this._ondownloadfile;
1266
+ }
1181
1267
  set ondownloadfile(X) {
1182
- this.setRequestHandler(C, async (Y, Z) => {
1183
- return X(Y.params, Z);
1268
+ this.warnIfRequestHandlerReplaced("ondownloadfile", this._ondownloadfile, X), this._ondownloadfile = X, this.replaceRequestHandler(f, async (Y, Z) => {
1269
+ if (!this._ondownloadfile) throw Error("No ondownloadfile handler set");
1270
+ return this._ondownloadfile(Y.params, Z);
1184
1271
  });
1185
1272
  }
1273
+ get onrequestteardown() {
1274
+ return this.getEventHandler("requestteardown");
1275
+ }
1186
1276
  set onrequestteardown(X) {
1187
- this.setNotificationHandler(M, (Y) => X(Y.params));
1277
+ this.setEventHandler("requestteardown", X);
1278
+ }
1279
+ _onrequestdisplaymode;
1280
+ get onrequestdisplaymode() {
1281
+ return this._onrequestdisplaymode;
1188
1282
  }
1189
1283
  set onrequestdisplaymode(X) {
1190
- this.setRequestHandler(E, async (Y, Z) => {
1191
- return X(Y.params, Z);
1284
+ this.warnIfRequestHandlerReplaced("onrequestdisplaymode", this._onrequestdisplaymode, X), this._onrequestdisplaymode = X, this.replaceRequestHandler(_, async (Y, Z) => {
1285
+ if (!this._onrequestdisplaymode) throw Error("No onrequestdisplaymode handler set");
1286
+ return this._onrequestdisplaymode(Y.params, Z);
1192
1287
  });
1193
1288
  }
1289
+ get onloggingmessage() {
1290
+ return this.getEventHandler("loggingmessage");
1291
+ }
1194
1292
  set onloggingmessage(X) {
1195
- this.setNotificationHandler(LoggingMessageNotificationSchema, async (Y) => {
1196
- X(Y.params);
1197
- });
1293
+ this.setEventHandler("loggingmessage", X);
1294
+ }
1295
+ _onupdatemodelcontext;
1296
+ get onupdatemodelcontext() {
1297
+ return this._onupdatemodelcontext;
1198
1298
  }
1199
1299
  set onupdatemodelcontext(X) {
1200
- this.setRequestHandler(f, async (Y, Z) => {
1201
- return X(Y.params, Z);
1300
+ this.warnIfRequestHandlerReplaced("onupdatemodelcontext", this._onupdatemodelcontext, X), this._onupdatemodelcontext = X, this.replaceRequestHandler(d, async (Y, Z) => {
1301
+ if (!this._onupdatemodelcontext) throw Error("No onupdatemodelcontext handler set");
1302
+ return this._onupdatemodelcontext(Y.params, Z);
1202
1303
  });
1203
1304
  }
1305
+ _oncalltool;
1306
+ get oncalltool() {
1307
+ return this._oncalltool;
1308
+ }
1204
1309
  set oncalltool(X) {
1205
- this.setRequestHandler(CallToolRequestSchema, async (Y, Z) => {
1206
- return X(Y.params, Z);
1310
+ this.warnIfRequestHandlerReplaced("oncalltool", this._oncalltool, X), this._oncalltool = X, this.replaceRequestHandler(CallToolRequestSchema, async (Y, Z) => {
1311
+ if (!this._oncalltool) throw Error("No oncalltool handler set");
1312
+ return this._oncalltool(Y.params, Z);
1207
1313
  });
1208
1314
  }
1209
1315
  sendToolListChanged(X = {}) {
@@ -1212,19 +1318,34 @@ var rQ = class extends Protocol {
1212
1318
  params: X
1213
1319
  });
1214
1320
  }
1321
+ _onlistresources;
1322
+ get onlistresources() {
1323
+ return this._onlistresources;
1324
+ }
1215
1325
  set onlistresources(X) {
1216
- this.setRequestHandler(ListResourcesRequestSchema, async (Y, Z) => {
1217
- return X(Y.params, Z);
1326
+ this.warnIfRequestHandlerReplaced("onlistresources", this._onlistresources, X), this._onlistresources = X, this.replaceRequestHandler(ListResourcesRequestSchema, async (Y, Z) => {
1327
+ if (!this._onlistresources) throw Error("No onlistresources handler set");
1328
+ return this._onlistresources(Y.params, Z);
1218
1329
  });
1219
1330
  }
1331
+ _onlistresourcetemplates;
1332
+ get onlistresourcetemplates() {
1333
+ return this._onlistresourcetemplates;
1334
+ }
1220
1335
  set onlistresourcetemplates(X) {
1221
- this.setRequestHandler(ListResourceTemplatesRequestSchema, async (Y, Z) => {
1222
- return X(Y.params, Z);
1336
+ this.warnIfRequestHandlerReplaced("onlistresourcetemplates", this._onlistresourcetemplates, X), this._onlistresourcetemplates = X, this.replaceRequestHandler(ListResourceTemplatesRequestSchema, async (Y, Z) => {
1337
+ if (!this._onlistresourcetemplates) throw Error("No onlistresourcetemplates handler set");
1338
+ return this._onlistresourcetemplates(Y.params, Z);
1223
1339
  });
1224
1340
  }
1341
+ _onreadresource;
1342
+ get onreadresource() {
1343
+ return this._onreadresource;
1344
+ }
1225
1345
  set onreadresource(X) {
1226
- this.setRequestHandler(ReadResourceRequestSchema, async (Y, Z) => {
1227
- return X(Y.params, Z);
1346
+ this.warnIfRequestHandlerReplaced("onreadresource", this._onreadresource, X), this._onreadresource = X, this.replaceRequestHandler(ReadResourceRequestSchema, async (Y, Z) => {
1347
+ if (!this._onreadresource) throw Error("No onreadresource handler set");
1348
+ return this._onreadresource(Y.params, Z);
1228
1349
  });
1229
1350
  }
1230
1351
  sendResourceListChanged(X = {}) {
@@ -1233,9 +1354,14 @@ var rQ = class extends Protocol {
1233
1354
  params: X
1234
1355
  });
1235
1356
  }
1357
+ _onlistprompts;
1358
+ get onlistprompts() {
1359
+ return this._onlistprompts;
1360
+ }
1236
1361
  set onlistprompts(X) {
1237
- this.setRequestHandler(ListPromptsRequestSchema, async (Y, Z) => {
1238
- return X(Y.params, Z);
1362
+ this.warnIfRequestHandlerReplaced("onlistprompts", this._onlistprompts, X), this._onlistprompts = X, this.replaceRequestHandler(ListPromptsRequestSchema, async (Y, Z) => {
1363
+ if (!this._onlistprompts) throw Error("No onlistprompts handler set");
1364
+ return this._onlistprompts(Y.params, Z);
1239
1365
  });
1240
1366
  }
1241
1367
  sendPromptListChanged(X = {}) {
@@ -1269,7 +1395,7 @@ var rQ = class extends Protocol {
1269
1395
  let Y = {}, Z = !1;
1270
1396
  for (let $ of Object.keys(X)) {
1271
1397
  let J = this._hostContext[$], K = X[$];
1272
- if (oQ(J, K)) continue;
1398
+ if (tQ(J, K)) continue;
1273
1399
  Y[$] = K, Z = !0;
1274
1400
  }
1275
1401
  if (Z) this._hostContext = X, this.sendHostContextChange(Y);
@@ -1314,9 +1440,21 @@ var rQ = class extends Protocol {
1314
1440
  return this.request({
1315
1441
  method: "ui/resource-teardown",
1316
1442
  params: X
1317
- }, H, Y);
1443
+ }, g, Y);
1318
1444
  }
1319
1445
  sendResourceTeardown = this.teardownResource;
1446
+ callTool(X, Y) {
1447
+ return this.request({
1448
+ method: "tools/call",
1449
+ params: X
1450
+ }, CallToolResultSchema, Y);
1451
+ }
1452
+ listTools(X, Y) {
1453
+ return this.request({
1454
+ method: "tools/list",
1455
+ params: X
1456
+ }, ListToolsResultSchema, Y);
1457
+ }
1320
1458
  async connect(X) {
1321
1459
  if (this.transport) throw Error("AppBridge is already connected. Call close() before connecting again.");
1322
1460
  if (this._client) {
@@ -1360,7 +1498,7 @@ var rQ = class extends Protocol {
1360
1498
  return super.connect(X);
1361
1499
  }
1362
1500
  };
1363
- function oQ(X, Y) {
1501
+ function tQ(X, Y) {
1364
1502
  return JSON.stringify(X) === JSON.stringify(Y);
1365
1503
  }
1366
1504
  //#endregion
@@ -1398,7 +1536,7 @@ var McpAppHost = class {
1398
1536
  constructor(options = {}) {
1399
1537
  this.options = options;
1400
1538
  this._prevDisplayMode = options.hostContext?.displayMode;
1401
- this.bridge = new rQ(null, options.hostInfo ?? DEFAULT_HOST_INFO, options.hostCapabilities ?? DEFAULT_HOST_CAPABILITIES, { hostContext: options.hostContext });
1539
+ this.bridge = new oQ(null, options.hostInfo ?? DEFAULT_HOST_INFO, options.hostCapabilities ?? DEFAULT_HOST_CAPABILITIES, { hostContext: options.hostContext });
1402
1540
  this.bridge.oninitialized = () => {
1403
1541
  this._initialized = true;
1404
1542
  if (this._pendingToolInput) {
@@ -1498,7 +1636,7 @@ var McpAppHost = class {
1498
1636
  console.log(`%c[MCP ↑]%c app → host: %c${label}`, "color:#6ee7b7", "color:inherit", "color:#93c5fd", data);
1499
1637
  };
1500
1638
  window.addEventListener("message", this._messageListener);
1501
- const transport = new D(contentWindow, contentWindow);
1639
+ const transport = new z(contentWindow, contentWindow);
1502
1640
  await this.bridge.connect(transport);
1503
1641
  }
1504
1642
  /**
@@ -3857,7 +3995,7 @@ function Inspector({ children, simulations: initialSimulations = {}, appName = "
3857
3995
  onChange: setProdResources,
3858
3996
  label: "Prod Resources",
3859
3997
  tooltip: "Load resources from dist/ builds instead of HMR",
3860
- docsPath: "api-reference/cli/dev#prod-tools-and-prod-resources-flags"
3998
+ docsPath: "app-framework/cli/dev#prod-tools-and-prod-resources-flags"
3861
3999
  }),
3862
4000
  hasTools && /* @__PURE__ */ jsxs("div", {
3863
4001
  className: "grid grid-cols-2 gap-2",
@@ -3865,7 +4003,7 @@ function Inspector({ children, simulations: initialSimulations = {}, appName = "
3865
4003
  children: [/* @__PURE__ */ jsx(SidebarControl, {
3866
4004
  label: "Tool",
3867
4005
  tooltip: "Tool to inspect",
3868
- docsPath: "api-reference/cli/dev",
4006
+ docsPath: "app-framework/cli/dev",
3869
4007
  "data-testid": "tool-selector",
3870
4008
  children: /* @__PURE__ */ jsx(SidebarSelect, {
3871
4009
  value: selectedToolName,
@@ -3879,7 +4017,7 @@ function Inspector({ children, simulations: initialSimulations = {}, appName = "
3879
4017
  })
3880
4018
  }), /* @__PURE__ */ jsx(SidebarControl, {
3881
4019
  label: selectedToolInfo && selectedToolInfo.fixtureSimNames.length > 0 ? "Simulation" : /* @__PURE__ */ jsx("a", {
3882
- href: `${DOCS_BASE_URL}/api-reference/simulations/simulation`,
4020
+ href: `${DOCS_BASE_URL}/testing/simulations`,
3883
4021
  target: "_blank",
3884
4022
  rel: "noopener noreferrer",
3885
4023
  className: "no-underline transition-colors",
@@ -3893,7 +4031,7 @@ function Inspector({ children, simulations: initialSimulations = {}, appName = "
3893
4031
  children: "Simulation"
3894
4032
  }),
3895
4033
  tooltip: selectedToolInfo && selectedToolInfo.fixtureSimNames.length > 0 ? "Test fixture with mock data" : "Create simulations for faster testing",
3896
- docsPath: "api-reference/simulations/simulation",
4034
+ docsPath: "testing/simulations",
3897
4035
  "data-testid": "simulation-selector",
3898
4036
  children: /* @__PURE__ */ jsx(SidebarSelect, {
3899
4037
  value: activeSimulationName ?? "__none__",
@@ -3913,7 +4051,7 @@ function Inspector({ children, simulations: initialSimulations = {}, appName = "
3913
4051
  children: [registeredHosts.length > 1 && /* @__PURE__ */ jsx(SidebarControl, {
3914
4052
  label: "Host",
3915
4053
  tooltip: "Host runtime to simulate",
3916
- docsPath: "api-reference/functions/host-detection",
4054
+ docsPath: "app-framework/functions/host-detection",
3917
4055
  children: /* @__PURE__ */ jsx(SidebarSelect, {
3918
4056
  value: state.activeHost,
3919
4057
  onChange: (value) => state.setActiveHost(value),
@@ -3925,7 +4063,7 @@ function Inspector({ children, simulations: initialSimulations = {}, appName = "
3925
4063
  }), /* @__PURE__ */ jsx(SidebarControl, {
3926
4064
  label: "Width",
3927
4065
  tooltip: "Chat width",
3928
- docsPath: "api-reference/simulations/inspector",
4066
+ docsPath: "testing/inspector",
3929
4067
  children: /* @__PURE__ */ jsx(SidebarSelect, {
3930
4068
  value: state.screenWidth,
3931
4069
  onChange: (value) => state.setScreenWidth(value),
@@ -3954,7 +4092,7 @@ function Inspector({ children, simulations: initialSimulations = {}, appName = "
3954
4092
  label: "Host Context",
3955
4093
  defaultCollapsed: false,
3956
4094
  tooltip: "Host-provided environment",
3957
- docsPath: "api-reference/hooks/use-host-context",
4095
+ docsPath: "app-framework/hooks/use-host-context",
3958
4096
  children: /* @__PURE__ */ jsxs("div", {
3959
4097
  className: "space-y-1",
3960
4098
  children: [
@@ -3963,7 +4101,7 @@ function Inspector({ children, simulations: initialSimulations = {}, appName = "
3963
4101
  children: [/* @__PURE__ */ jsx(SidebarControl, {
3964
4102
  label: "Theme",
3965
4103
  tooltip: "Host color theme",
3966
- docsPath: "api-reference/hooks/use-theme",
4104
+ docsPath: "app-framework/hooks/use-theme",
3967
4105
  children: /* @__PURE__ */ jsx(SidebarToggle, {
3968
4106
  value: state.theme,
3969
4107
  onChange: (value) => state.setTheme(value),
@@ -3978,7 +4116,7 @@ function Inspector({ children, simulations: initialSimulations = {}, appName = "
3978
4116
  }), /* @__PURE__ */ jsx(SidebarControl, {
3979
4117
  label: "Locale",
3980
4118
  tooltip: "BCP 47 language tag",
3981
- docsPath: "api-reference/hooks/use-locale",
4119
+ docsPath: "app-framework/hooks/use-locale",
3982
4120
  children: /* @__PURE__ */ jsx(SidebarInput, {
3983
4121
  applyOnBlur: true,
3984
4122
  value: state.locale,
@@ -3990,7 +4128,7 @@ function Inspector({ children, simulations: initialSimulations = {}, appName = "
3990
4128
  /* @__PURE__ */ jsx(SidebarControl, {
3991
4129
  label: "Display Mode",
3992
4130
  tooltip: "Host resource rendering paradigm",
3993
- docsPath: "api-reference/hooks/use-display-mode",
4131
+ docsPath: "app-framework/hooks/use-display-mode",
3994
4132
  children: /* @__PURE__ */ jsx(SidebarToggle, {
3995
4133
  value: state.displayMode,
3996
4134
  onChange: (value) => state.setDisplayMode(value),
@@ -4017,7 +4155,7 @@ function Inspector({ children, simulations: initialSimulations = {}, appName = "
4017
4155
  children: /* @__PURE__ */ jsx(SidebarControl, {
4018
4156
  label: "Platform",
4019
4157
  tooltip: "End user device platform",
4020
- docsPath: "api-reference/hooks/use-platform",
4158
+ docsPath: "app-framework/hooks/use-platform",
4021
4159
  children: /* @__PURE__ */ jsx(SidebarSelect, {
4022
4160
  value: state.platform,
4023
4161
  onChange: (value) => {
@@ -4055,7 +4193,7 @@ function Inspector({ children, simulations: initialSimulations = {}, appName = "
4055
4193
  children: /* @__PURE__ */ jsx(SidebarControl, {
4056
4194
  label: "Capabilities",
4057
4195
  tooltip: "End user device capabilities",
4058
- docsPath: "api-reference/hooks/use-device-capabilities",
4196
+ docsPath: "app-framework/hooks/use-device-capabilities",
4059
4197
  children: /* @__PURE__ */ jsxs("div", {
4060
4198
  className: "flex gap-2",
4061
4199
  children: [/* @__PURE__ */ jsx(SidebarCheckbox, {
@@ -4074,7 +4212,7 @@ function Inspector({ children, simulations: initialSimulations = {}, appName = "
4074
4212
  /* @__PURE__ */ jsx(SidebarControl, {
4075
4213
  label: "Time Zone",
4076
4214
  tooltip: "End user IANA time zone",
4077
- docsPath: "api-reference/hooks/use-time-zone",
4215
+ docsPath: "app-framework/hooks/use-time-zone",
4078
4216
  children: /* @__PURE__ */ jsx(SidebarInput, {
4079
4217
  applyOnBlur: true,
4080
4218
  value: state.timeZone,
@@ -4085,7 +4223,7 @@ function Inspector({ children, simulations: initialSimulations = {}, appName = "
4085
4223
  /* @__PURE__ */ jsx(SidebarControl, {
4086
4224
  label: "Container Dimensions",
4087
4225
  tooltip: "Host-enforced size constraints (px)",
4088
- docsPath: "api-reference/hooks/use-viewport",
4226
+ docsPath: "app-framework/hooks/use-viewport",
4089
4227
  children: /* @__PURE__ */ jsxs("div", {
4090
4228
  className: "grid grid-cols-4 gap-1",
4091
4229
  children: [
@@ -4135,7 +4273,7 @@ function Inspector({ children, simulations: initialSimulations = {}, appName = "
4135
4273
  /* @__PURE__ */ jsx(SidebarControl, {
4136
4274
  label: "Safe Area Insets",
4137
4275
  tooltip: "Device safe area padding (px)",
4138
- docsPath: "api-reference/hooks/use-safe-area",
4276
+ docsPath: "app-framework/hooks/use-safe-area",
4139
4277
  children: /* @__PURE__ */ jsxs("div", {
4140
4278
  className: "grid grid-cols-4 gap-1",
4141
4279
  children: [
@@ -4217,7 +4355,7 @@ function Inspector({ children, simulations: initialSimulations = {}, appName = "
4217
4355
  label: "App Context",
4218
4356
  defaultCollapsed: true,
4219
4357
  tooltip: "App-provided context shared with the model",
4220
- docsPath: "api-reference/hooks/use-app-state",
4358
+ docsPath: "app-framework/hooks/use-app-state",
4221
4359
  children: /* @__PURE__ */ jsx(SidebarTextarea, {
4222
4360
  value: state.modelContextJson,
4223
4361
  onChange: (json) => state.validateJSON(json, state.setModelContextJson, state.setModelContextError),
@@ -4233,7 +4371,7 @@ function Inspector({ children, simulations: initialSimulations = {}, appName = "
4233
4371
  label: "Tool Input (JSON)",
4234
4372
  defaultCollapsed: false,
4235
4373
  tooltip: "Arguments passed to the tool",
4236
- docsPath: "api-reference/hooks/use-tool-data",
4374
+ docsPath: "app-framework/hooks/use-tool-data",
4237
4375
  children: /* @__PURE__ */ jsx(SidebarTextarea, {
4238
4376
  value: state.toolInputJson,
4239
4377
  onChange: (json) => state.validateJSON(json, state.setToolInputJson, state.setToolInputError),
@@ -4247,7 +4385,7 @@ function Inspector({ children, simulations: initialSimulations = {}, appName = "
4247
4385
  label: "Tool Result (JSON)",
4248
4386
  defaultCollapsed: false,
4249
4387
  tooltip: "Structured content returned by the tool",
4250
- docsPath: "api-reference/hooks/use-tool-data",
4388
+ docsPath: "app-framework/hooks/use-tool-data",
4251
4389
  "data-testid": "tool-result-section",
4252
4390
  children: /* @__PURE__ */ jsx(SidebarTextarea, {
4253
4391
  value: state.toolResultJson,
@@ -4278,4 +4416,4 @@ function Inspector({ children, simulations: initialSimulations = {}, appName = "
4278
4416
  //#endregion
4279
4417
  export { DEFAULT_STYLE_VARIABLES as S, McpAppHost as _, SidebarControl as a, getRegisteredHosts as b, SidebarTextarea as c, ThemeProvider as d, useThemeContext as f, extractResourceCSP as g, IframeResource as h, SidebarCollapsibleControl as i, SidebarToggle as l, useInspectorState as m, resolveServerToolResult as n, SidebarInput as o, useMcpConnection as p, SidebarCheckbox as r, SidebarSelect as s, Inspector as t, SimpleSidebar as u, SCREEN_WIDTHS as v, registerHostShell as x, getHostShell as y };
4280
4418
 
4281
- //# sourceMappingURL=inspector-Cdo5BK2D.js.map
4419
+ //# sourceMappingURL=inspector-D5DckQuU.js.map