sunpeak 0.20.42 → 0.20.49

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 (74) hide show
  1. package/bin/commands/inspect.mjs +142 -40
  2. package/bin/commands/test-init.mjs +2 -0
  3. package/bin/lib/eval/eval-runner.mjs +4 -0
  4. package/bin/lib/eval/model-registry.mjs +3 -6
  5. package/bin/lib/inspect/inspect-config.d.mts +8 -0
  6. package/bin/lib/inspect/inspect-config.mjs +9 -0
  7. package/bin/lib/inspect/inspect-server.d.mts +2 -0
  8. package/bin/lib/test/test-config.d.mts +6 -0
  9. package/bin/lib/test/test-config.mjs +11 -0
  10. package/bin/sunpeak.js +1 -0
  11. package/dist/chatgpt/index.cjs +1 -1
  12. package/dist/chatgpt/index.js +1 -1
  13. package/dist/claude/index.cjs +1 -1
  14. package/dist/claude/index.js +1 -1
  15. package/dist/hooks/tool-data-store.d.ts +26 -0
  16. package/dist/hooks/use-tool-data.d.ts +3 -9
  17. package/dist/host/chatgpt/index.cjs +1 -1
  18. package/dist/host/chatgpt/index.js +1 -1
  19. package/dist/index.cjs +36 -22
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.js +36 -22
  22. package/dist/index.js.map +1 -1
  23. package/dist/inspector/index.cjs +1 -1
  24. package/dist/inspector/index.js +1 -1
  25. package/dist/{inspector-DOmiG64-.cjs → inspector-BGnxpdOn.cjs} +46 -20
  26. package/dist/inspector-BGnxpdOn.cjs.map +1 -0
  27. package/dist/{inspector-C6n8zap3.js → inspector-DvduUVNG.js} +46 -20
  28. package/dist/inspector-DvduUVNG.js.map +1 -0
  29. package/dist/lib/utils.d.ts +8 -7
  30. package/dist/mcp/index.cjs +6 -4
  31. package/dist/mcp/index.cjs.map +1 -1
  32. package/dist/mcp/index.js +6 -4
  33. package/dist/mcp/index.js.map +1 -1
  34. package/dist/mcp/server.d.ts +12 -1
  35. package/dist/{use-app-Duar2Ipu.js → use-app-CmrLc3wz.js} +63 -2
  36. package/dist/use-app-CmrLc3wz.js.map +1 -0
  37. package/dist/{use-app-DUdnDLP5.cjs → use-app-fizR-zbu.cjs} +63 -2
  38. package/dist/use-app-fizR-zbu.cjs.map +1 -0
  39. package/package.json +9 -9
  40. package/template/dist/albums/albums.html +2 -2
  41. package/template/dist/albums/albums.json +1 -1
  42. package/template/dist/carousel/carousel.html +2 -2
  43. package/template/dist/carousel/carousel.json +1 -1
  44. package/template/dist/map/map.html +3 -3
  45. package/template/dist/map/map.json +1 -1
  46. package/template/dist/review/review.html +2 -2
  47. package/template/dist/review/review.json +1 -1
  48. package/template/node_modules/.bin/tsc +2 -2
  49. package/template/node_modules/.bin/tsserver +2 -2
  50. package/template/node_modules/.bin/vitest +2 -2
  51. package/template/node_modules/.vite/deps/_metadata.json +3 -3
  52. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps.js +1 -1
  53. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps.js.map +1 -1
  54. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_app-bridge.js +1 -1
  55. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_app-bridge.js.map +1 -1
  56. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_react.js +1 -1
  57. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_react.js.map +1 -1
  58. package/template/node_modules/.vite-mcp/deps/_metadata.json +23 -23
  59. package/template/node_modules/.vite-mcp/deps/vitest.js +7 -7
  60. package/template/node_modules/.vite-mcp/deps/vitest.js.map +1 -1
  61. package/template/package.json +1 -1
  62. package/template/tests/e2e/visual.spec.ts-snapshots/albums-dark-chatgpt-linux.png +0 -0
  63. package/template/tests/e2e/visual.spec.ts-snapshots/albums-dark-claude-linux.png +0 -0
  64. package/template/tests/e2e/visual.spec.ts-snapshots/albums-fullscreen-chatgpt-darwin.png +0 -0
  65. package/template/tests/e2e/visual.spec.ts-snapshots/albums-fullscreen-chatgpt-linux.png +0 -0
  66. package/template/tests/e2e/visual.spec.ts-snapshots/albums-fullscreen-claude-darwin.png +0 -0
  67. package/template/tests/e2e/visual.spec.ts-snapshots/albums-fullscreen-claude-linux.png +0 -0
  68. package/template/tests/e2e/visual.spec.ts-snapshots/albums-light-chatgpt-linux.png +0 -0
  69. package/template/tests/e2e/visual.spec.ts-snapshots/albums-light-claude-linux.png +0 -0
  70. package/template/tsconfig.json +2 -0
  71. package/dist/inspector-C6n8zap3.js.map +0 -1
  72. package/dist/inspector-DOmiG64-.cjs.map +0 -1
  73. package/dist/use-app-DUdnDLP5.cjs.map +0 -1
  74. package/dist/use-app-Duar2Ipu.js.map +0 -1
@@ -2,12 +2,13 @@ import { ClassValue } from 'clsx';
2
2
  export declare function cn(...inputs: ClassValue[]): string;
3
3
  /**
4
4
  * Returns true when `icon` is safe to use as the `src` of an `<img>` rendered
5
- * inside the inspector chrome. Accepts http(s) URLs and `data:image/*` URIs
6
- * for raster image types only. SVG data URIs are rejected because they can
7
- * include `<script>`/event handlers that execute when the document parses
8
- * the inline document (the `<img>` tag itself does not run scripts in modern
9
- * browsers, but adjacent <object>/<embed>/<iframe> renders would). Anything
10
- * else (emoji, plain text, javascript:, file:, etc.) falls through to the
11
- * text-rendering path that already handles emoji icons.
5
+ * inside the inspector chrome. Accepts https URLs, local http URLs while the
6
+ * inspector itself is running locally, and `data:image/*` URIs for raster image
7
+ * types only. SVG data URIs are rejected because they can include
8
+ * `<script>`/event handlers that execute when the document parses the inline
9
+ * document (the `<img>` tag itself does not run scripts in modern browsers,
10
+ * but adjacent <object>/<embed>/<iframe> renders would). Anything else (emoji,
11
+ * plain text, javascript:, file:, etc.) falls through to the text-rendering
12
+ * path that already handles emoji icons.
12
13
  */
13
14
  export declare function isAllowedIconUrl(icon: string): boolean;
@@ -8879,7 +8879,7 @@ var StreamableHTTPServerTransport = class {
8879
8879
  }
8880
8880
  };
8881
8881
  //#endregion
8882
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+ext-apps@1.7.2_@modelcontextprotocol+sdk@1.29.0_zod@4.4.3__react-_f5b843da9146ebea748e10ad8dfce46a/node_modules/@modelcontextprotocol/ext-apps/dist/src/server/index.js
8882
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+ext-apps@1.7.3_@modelcontextprotocol+sdk@1.29.0_zod@4.4.3__react-_198afb8973c94867da191e43eebfe140/node_modules/@modelcontextprotocol/ext-apps/dist/src/server/index.js
8883
8883
  ((Z) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(Z, { get: ($, J) => (typeof require < "u" ? require : $)[J] }) : Z)(function(Z) {
8884
8884
  if (typeof require < "u") return require.apply(this, arguments);
8885
8885
  throw Error("Dynamic require of \"" + Z + "\" is not supported");
@@ -9578,6 +9578,8 @@ function createAppServer(config, simulations, viteMode) {
9578
9578
  });
9579
9579
  resourceHandles.set(resourceName, handle);
9580
9580
  }
9581
+ if (registeredToolNames.has(tool.name)) continue;
9582
+ registeredToolNames.add(tool.name);
9581
9583
  const toolInputSchema = simulation.inputSchema ? makeSchemaOptional(simulation.inputSchema) : zod.z.object({}).passthrough();
9582
9584
  const fullToolMeta = {
9583
9585
  ...toolMeta,
@@ -9689,9 +9691,9 @@ function createAppServer(config, simulations, viteMode) {
9689
9691
  });
9690
9692
  }
9691
9693
  }
9692
- const uiToolCount = simulations.filter((s) => s.resource).length;
9693
- const plainToolCount = simulations.length - uiToolCount;
9694
- console.log(`[MCP] Registered ${simulations.length} tool(s) (${uiToolCount} UI, ${plainToolCount} plain), ${registeredUriSet.size} resource(s)`);
9694
+ const uiToolCount = toolHandles.length;
9695
+ const plainToolCount = registeredToolNames.size - uiToolCount;
9696
+ console.log(`[MCP] Registered ${registeredToolNames.size} tool(s) (${uiToolCount} UI, ${plainToolCount} plain), ${registeredUriSet.size} resource(s)`);
9695
9697
  return {
9696
9698
  server: mcpServer,
9697
9699
  resourceHandles,