sunpeak 0.9.10 → 0.10.1

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 (95) hide show
  1. package/bin/commands/build.mjs +56 -30
  2. package/bin/commands/deploy.mjs +17 -17
  3. package/bin/commands/push.mjs +115 -64
  4. package/bin/lib/patterns.mjs +40 -0
  5. package/bin/sunpeak.js +50 -106
  6. package/dist/chatgpt/index.cjs +1 -1
  7. package/dist/chatgpt/index.js +1 -1
  8. package/dist/index.cjs +150 -12
  9. package/dist/index.cjs.map +1 -1
  10. package/dist/index.js +167 -29
  11. package/dist/index.js.map +1 -1
  12. package/dist/lib/discovery.d.ts +76 -13
  13. package/dist/mcp/entry.cjs +24 -27
  14. package/dist/mcp/entry.cjs.map +1 -1
  15. package/dist/mcp/entry.js +25 -28
  16. package/dist/mcp/entry.js.map +1 -1
  17. package/dist/{simulator-url-wBi-pko3.js → simulator-url-BZBcq5tc.js} +9 -16
  18. package/dist/{simulator-url-wBi-pko3.js.map → simulator-url-BZBcq5tc.js.map} +1 -1
  19. package/dist/{simulator-url-oevkxbU4.cjs → simulator-url-D4tFBjeu.cjs} +10 -17
  20. package/dist/{simulator-url-oevkxbU4.cjs.map → simulator-url-D4tFBjeu.cjs.map} +1 -1
  21. package/package.json +1 -1
  22. package/template/.sunpeak/dev.tsx +5 -5
  23. package/template/README.md +54 -50
  24. package/template/dist/{albums.json → albums/albums.json} +1 -1
  25. package/template/dist/{carousel.json → carousel/carousel.json} +1 -1
  26. package/template/dist/{map.json → map/map.json} +1 -1
  27. package/template/dist/{review.json → review/review.json} +1 -1
  28. package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_SegmentedControl.js +4 -4
  29. package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Select.js +6 -6
  30. package/template/node_modules/.vite/deps/_metadata.json +25 -25
  31. package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
  32. package/template/src/resources/{albums-resource.test.tsx → albums/albums-resource.test.tsx} +1 -1
  33. package/template/src/resources/{albums-resource.tsx → albums/albums-resource.tsx} +1 -1
  34. package/template/src/resources/albums/albums-show-simulation.json +131 -0
  35. package/template/src/{components/album → resources/albums/components}/album-card.tsx +1 -1
  36. package/template/src/{components/album → resources/albums/components}/album-carousel.tsx +1 -1
  37. package/template/src/{components/album → resources/albums/components}/film-strip.tsx +1 -1
  38. package/template/src/{components/album → resources/albums/components}/fullscreen-viewer.tsx +1 -1
  39. package/template/src/resources/{carousel-resource.test.tsx → carousel/carousel-resource.test.tsx} +1 -1
  40. package/template/src/resources/{carousel-resource.tsx → carousel/carousel-resource.tsx} +1 -1
  41. package/template/src/resources/carousel/carousel-show-simulation.json +68 -0
  42. package/template/src/{components/carousel → resources/carousel/components}/card.tsx +1 -1
  43. package/template/src/{components/carousel → resources/carousel/components}/carousel.tsx +1 -1
  44. package/template/src/resources/index.ts +5 -5
  45. package/template/src/{components/map → resources/map/components}/map-view.tsx +1 -1
  46. package/template/src/{components/map → resources/map/components}/map.tsx +1 -1
  47. package/template/src/{components/map → resources/map/components}/place-card.tsx +1 -1
  48. package/template/src/{components/map → resources/map/components}/place-carousel.tsx +1 -1
  49. package/template/src/{components/map → resources/map/components}/place-inspector.tsx +1 -1
  50. package/template/src/{components/map → resources/map/components}/place-list.tsx +1 -1
  51. package/template/src/resources/{map-resource.test.tsx → map/map-resource.test.tsx} +1 -1
  52. package/template/src/resources/{map-resource.tsx → map/map-resource.tsx} +1 -1
  53. package/template/src/resources/map/map-show-simulation.json +123 -0
  54. package/template/src/resources/review/review-diff-simulation.json +80 -0
  55. package/template/src/resources/review/review-post-simulation.json +56 -0
  56. package/template/src/resources/review/review-purchase-simulation.json +88 -0
  57. package/dist/discovery-a4WId9PC.cjs +0 -125
  58. package/dist/discovery-a4WId9PC.cjs.map +0 -1
  59. package/dist/discovery-ft3cd2dW.js +0 -126
  60. package/dist/discovery-ft3cd2dW.js.map +0 -1
  61. package/template/src/components/index.ts +0 -3
  62. package/template/src/simulations/index.ts +0 -16
  63. /package/template/{src/simulations → dist/albums}/albums-show-simulation.json +0 -0
  64. /package/template/dist/{albums.js → albums/albums.js} +0 -0
  65. /package/template/{src/simulations → dist/carousel}/carousel-show-simulation.json +0 -0
  66. /package/template/dist/{carousel.js → carousel/carousel.js} +0 -0
  67. /package/template/{src/simulations → dist/map}/map-show-simulation.json +0 -0
  68. /package/template/dist/{map.js → map/map.js} +0 -0
  69. /package/template/{src/simulations → dist/review}/review-diff-simulation.json +0 -0
  70. /package/template/{src/simulations → dist/review}/review-post-simulation.json +0 -0
  71. /package/template/{src/simulations → dist/review}/review-purchase-simulation.json +0 -0
  72. /package/template/dist/{review.js → review/review.js} +0 -0
  73. /package/template/src/resources/{albums-resource.json → albums/albums-resource.json} +0 -0
  74. /package/template/src/{components/album → resources/albums/components}/album-card.test.tsx +0 -0
  75. /package/template/src/{components/album → resources/albums/components}/album-carousel.test.tsx +0 -0
  76. /package/template/src/{components/album → resources/albums/components}/albums.test.tsx +0 -0
  77. /package/template/src/{components/album → resources/albums/components}/albums.tsx +0 -0
  78. /package/template/src/{components/album → resources/albums/components}/film-strip.test.tsx +0 -0
  79. /package/template/src/{components/album → resources/albums/components}/fullscreen-viewer.test.tsx +0 -0
  80. /package/template/src/{components/album → resources/albums/components}/index.ts +0 -0
  81. /package/template/src/resources/{carousel-resource.json → carousel/carousel-resource.json} +0 -0
  82. /package/template/src/{components/carousel → resources/carousel/components}/card.test.tsx +0 -0
  83. /package/template/src/{components/carousel → resources/carousel/components}/carousel.test.tsx +0 -0
  84. /package/template/src/{components/carousel → resources/carousel/components}/index.ts +0 -0
  85. /package/template/src/{components/map → resources/map/components}/index.ts +0 -0
  86. /package/template/src/{components/map → resources/map/components}/map-view.test.tsx +0 -0
  87. /package/template/src/{components/map → resources/map/components}/place-card.test.tsx +0 -0
  88. /package/template/src/{components/map → resources/map/components}/place-carousel.test.tsx +0 -0
  89. /package/template/src/{components/map → resources/map/components}/place-inspector.test.tsx +0 -0
  90. /package/template/src/{components/map → resources/map/components}/place-list.test.tsx +0 -0
  91. /package/template/src/{components/map → resources/map/components}/types.ts +0 -0
  92. /package/template/src/resources/{map-resource.json → map/map-resource.json} +0 -0
  93. /package/template/src/resources/{review-resource.json → review/review-resource.json} +0 -0
  94. /package/template/src/resources/{review-resource.test.tsx → review/review-resource.test.tsx} +0 -0
  95. /package/template/src/resources/{review-resource.tsx → review/review-resource.tsx} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sunpeak",
3
- "version": "0.9.10",
3
+ "version": "0.10.1",
4
4
  "description": "The ChatGPT App framework. Quickstart, build, & test your ChatGPT App locally!",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -4,9 +4,9 @@
4
4
  * This file bootstraps the ChatGPT simulator for development
5
5
  *
6
6
  * Auto-discovers simulations and resources by file naming convention:
7
- * - simulations/{resource}-{tool}-simulation.json (e.g., albums-show-simulation.json)
8
- * - resources/{resource}-resource.json
9
- * - resources/{Resource}Resource component (PascalCase)
7
+ * - resources/{resource}/{resource}-{tool}-simulation.json (e.g., resources/albums/albums-show-simulation.json)
8
+ * - resources/{resource}/{resource}-resource.json
9
+ * - resources/{resource}/{Resource}Resource component (PascalCase)
10
10
  */
11
11
  import { StrictMode } from 'react';
12
12
  import { createRoot } from 'react-dom/client';
@@ -16,8 +16,8 @@ import '../src/styles/globals.css';
16
16
 
17
17
  // Build simulations from discovered files
18
18
  const simulations = buildDevSimulations({
19
- simulationModules: import.meta.glob('../src/simulations/*-simulation.json', { eager: true }),
20
- resourceModules: import.meta.glob('../src/resources/*-resource.json', { eager: true }),
19
+ simulationModules: import.meta.glob('../src/resources/*/*-simulation.json', { eager: true }),
20
+ resourceModules: import.meta.glob('../src/resources/*/*-resource.json', { eager: true }),
21
21
  resourceComponents: resourceComponents as Record<string, React.ComponentType>,
22
22
  });
23
23
 
@@ -16,48 +16,34 @@ That's it! Edit the resource files in [./src/resources/](./src/resources/) to bu
16
16
  ## Commands
17
17
 
18
18
  ```bash
19
- sunpeak dev # Start development server
20
- sunpeak build # Build all resources for production
21
- sunpeak mcp # Start MCP server with auto-reload
22
- pnpm test # Run tests with Vitest
19
+ # Core commands:
20
+ pnpm test # Run tests with Vitest.
21
+ pnpm test:e2e # Run end-to-end tests with Playwright.
22
+ sunpeak dev # Start development server.
23
+ sunpeak build # Build all resources for production.
24
+ sunpeak mcp # Start MCP server for ChatGPT testing with mock data.
25
+
26
+ # sunpeak repository (think ECR for ChatGPT Apps):
27
+ sunpeak login # Authenticate with the sunpeak repository.
28
+ sunpeak push # Push built resources to the sunpeak repository.
29
+ sunpeak pull # Pull built resources from the sunpeak repository (for your prod MCP server).
23
30
  ```
24
31
 
25
32
  The template includes a minimal test setup with Vitest. You can add additional tooling (linting, formatting, type-checking) as needed for your project.
26
33
 
27
- ### Customization
34
+ ## Project Structure
28
35
 
29
- **Do not customize (required by `sunpeak` commands):**
36
+ - `src/resources/` - Directory containing all your MCP Resources (ChatGPT App UIs).
37
+ - Each resource is a subdirectory containing all files for that resource.
38
+ - Example: `src/resources/albums/` contains:
39
+ - `albums-resource.tsx` - The React component.
40
+ - `albums-resource.json` - Resource metadata (name, title, description, etc.).
41
+ - `albums-resource.test.tsx` - Unit tests for the resource.
42
+ - `albums-show-simulation.json` - Simulation data for testing.
43
+ - `components/` - UI components used by the resource.
44
+ - `tests/e2e/` - Directory containing end-to-end Playwright tests for each resource. Uses the ChatGPTSimulator to test your resources render properly with any state (tool calls, saved state, dark mode, pip display mode, etc.).
30
45
 
31
- - `src/resources/` - Resource files must be here
32
- - `src/simulations/` - Simulation files must be here
33
- - Resource file naming: `*-resource.tsx` (e.g., `review-resource.tsx`)
34
- - Simulation file naming: `*-simulation.json` (e.g., `review-purchase-simulation.json`)
35
- - `src/index-resource.tsx` - Build template (must have `// RESOURCE_IMPORT` and `// RESOURCE_MOUNT` comments)
36
-
37
- **You can customize:**
38
-
39
- - Package.json scripts - Add your own tooling (lint, format, typecheck, etc.)
40
- - Component structure within `src/components/`
41
- - Package manager (pnpm, npm, or yarn auto-detected)
42
- - Pretty much everything else!
43
-
44
- ## Testing
45
-
46
- ### Testing Locally
47
-
48
- Run the test suite:
49
-
50
- ```bash
51
- pnpm test
52
- ```
53
-
54
- For manual QA of the UI:
55
-
56
- ```bash
57
- sunpeak dev
58
- ```
59
-
60
- ### Testing in ChatGPT
46
+ ## Testing in ChatGPT
61
47
 
62
48
  Test your app directly in ChatGPT using the built-in MCP server:
63
49
 
@@ -83,28 +69,46 @@ Build your app for production:
83
69
  sunpeak build
84
70
  ```
85
71
 
86
- This creates optimized builds in `dist/`:
72
+ This creates optimized builds in `dist/`, organized by resource:
87
73
 
88
- - `dist/albums.js`
89
- - `dist/albums.json`
90
- - `dist/review.js`
91
- - `dist/review.json`
92
- - _(One .js file per resource in src/resources/)_
93
- - _(One .json file per resource in src/resources/)_
74
+ ```bash
75
+ dist/
76
+ ├── albums/
77
+ │ ├── albums.js # Built resource component.
78
+ │ ├── albums.json # Resource metadata.
79
+ │ └── albums-show-simulation.json # Resource mock data for testing.
80
+ ├── review/
81
+ │ ├── review.js
82
+ │ ├── review.json
83
+ │ ├── review-diff-simulation.json
84
+ │ ├── review-post-simulation.json
85
+ │ └── review-purchase-simulation.json
86
+ └── ...
87
+ ```
88
+
89
+ Each resource folder contains:
94
90
 
95
- Each `.js` file is a self-contained bundle with CSS inlined. Host these files and reference them as resources in your production MCP server.
91
+ - **`.js` file**: Self-contained bundle with CSS inlined
92
+ - **`.json` file**: Resource metadata with unique `uri` for cache-busting
93
+ - **`*-simulation.json` files**: All affiliated simulation files for the resource. These are not needed for the production runtime, but are used in the sunpeak repository for testing.
96
94
 
97
- Each `.json` file is a copy of each of your resource MCP metadata files `src/resource/*-resource.json`. The copy is identical, but with a unique `uri` field added that will cache-bust earlier resource versions pre-loaded in ChatGPT.
95
+ Host these files and reference them as resources in your production MCP server.
96
+ Use the sunpeak resource repository for built-in resource hosting.
98
97
 
99
98
  ## Add a new UI (Resource)
100
99
 
101
- To add a new UI (MCP Resource), simply create the following files:
100
+ To add a new UI (MCP Resource), create a new directory under `src/resources/` with the following files:
102
101
 
103
- - `src/resources/NAME-resource.tsx`
104
- - `src/resources/NAME-resource.json`
105
- - `src/simulations/NAME-TOOLNAME-simulation.json`
102
+ ```
103
+ src/resources/NAME/
104
+ ├── NAME-resource.tsx # React component (required)
105
+ ├── NAME-resource.json # Resource metadata (required)
106
+ ├── NAME-resource.test.tsx # Unit tests (optional)
107
+ ├── NAME-TOOLNAME-simulation.json # Simulation data (optional)
108
+ └── components/ # UI components (optional)
109
+ ```
106
110
 
107
- Only the resource files are required to generate a production build and ship a UI. Create the simulation file if you want to preview your resource in `sunpeak dev` or `sunpeak mcp`.
111
+ Only the resource files (`.tsx` and `.json`) are required to generate a production build and ship a UI. Create the simulation file if you want to preview your resource in `sunpeak dev` or `sunpeak mcp`.
108
112
 
109
113
  ## Resources
110
114
 
@@ -12,5 +12,5 @@
12
12
  ]
13
13
  }
14
14
  },
15
- "uri": "ui://albums-mka2vgl6"
15
+ "uri": "ui://albums-mkd2axzd"
16
16
  }
@@ -12,5 +12,5 @@
12
12
  ]
13
13
  }
14
14
  },
15
- "uri": "ui://carousel-mka2vgl6"
15
+ "uri": "ui://carousel-mkd2axzd"
16
16
  }
@@ -18,5 +18,5 @@
18
18
  ]
19
19
  }
20
20
  },
21
- "uri": "ui://map-mka2vgl6"
21
+ "uri": "ui://map-mkd2axzd"
22
22
  }
@@ -12,5 +12,5 @@
12
12
  ]
13
13
  }
14
14
  },
15
- "uri": "ui://review-mka2vgl6"
15
+ "uri": "ui://review-mkd2axzd"
16
16
  }
@@ -1,7 +1,3 @@
1
- import {
2
- dist_exports4 as dist_exports
3
- } from "./chunk-TSEQUROC.js";
4
- import "./chunk-XZTIOEPG.js";
5
1
  import {
6
2
  useResizeObserver
7
3
  } from "./chunk-JAGHY6H6.js";
@@ -10,6 +6,10 @@ import {
10
6
  waitForAnimationFrame
11
7
  } from "./chunk-DYQDWJMS.js";
12
8
  import "./chunk-EGRHWZRV.js";
9
+ import {
10
+ dist_exports4 as dist_exports
11
+ } from "./chunk-TSEQUROC.js";
12
+ import "./chunk-XZTIOEPG.js";
13
13
  import {
14
14
  clsx_default
15
15
  } from "./chunk-CNYJBM5F.js";
@@ -1,12 +1,6 @@
1
1
  import {
2
2
  Input
3
3
  } from "./chunk-2DZGWGIP.js";
4
- import {
5
- dist_exports,
6
- dist_exports3 as dist_exports2,
7
- dist_exports5 as dist_exports3
8
- } from "./chunk-TSEQUROC.js";
9
- import "./chunk-XZTIOEPG.js";
10
4
  import {
11
5
  Button,
12
6
  LoadingIndicator,
@@ -25,6 +19,12 @@ import {
25
19
  waitForAnimationFrame
26
20
  } from "./chunk-DYQDWJMS.js";
27
21
  import "./chunk-EGRHWZRV.js";
22
+ import {
23
+ dist_exports,
24
+ dist_exports3 as dist_exports2,
25
+ dist_exports5 as dist_exports3
26
+ } from "./chunk-TSEQUROC.js";
27
+ import "./chunk-XZTIOEPG.js";
28
28
  import {
29
29
  clsx_default
30
30
  } from "./chunk-CNYJBM5F.js";
@@ -7,115 +7,115 @@
7
7
  "react": {
8
8
  "src": "../../../../node_modules/.pnpm/react@19.2.3/node_modules/react/index.js",
9
9
  "file": "react.js",
10
- "fileHash": "e9d7bd7c",
10
+ "fileHash": "978df452",
11
11
  "needsInterop": true
12
12
  },
13
13
  "react-dom": {
14
14
  "src": "../../../../node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/index.js",
15
15
  "file": "react-dom.js",
16
- "fileHash": "6077638f",
16
+ "fileHash": "739c8c96",
17
17
  "needsInterop": true
18
18
  },
19
19
  "react/jsx-dev-runtime": {
20
20
  "src": "../../../../node_modules/.pnpm/react@19.2.3/node_modules/react/jsx-dev-runtime.js",
21
21
  "file": "react_jsx-dev-runtime.js",
22
- "fileHash": "d1b53763",
22
+ "fileHash": "c6a55f8c",
23
23
  "needsInterop": true
24
24
  },
25
25
  "react/jsx-runtime": {
26
26
  "src": "../../../../node_modules/.pnpm/react@19.2.3/node_modules/react/jsx-runtime.js",
27
27
  "file": "react_jsx-runtime.js",
28
- "fileHash": "7220a079",
28
+ "fileHash": "2e3249cd",
29
29
  "needsInterop": true
30
30
  },
31
31
  "@openai/apps-sdk-ui/components/Avatar": {
32
32
  "src": "../../../../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.1_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._90324f97b7190ccfdbe40a9e8bef3385/node_modules/@openai/apps-sdk-ui/dist/es/components/Avatar/index.js",
33
33
  "file": "@openai_apps-sdk-ui_components_Avatar.js",
34
- "fileHash": "a4018122",
34
+ "fileHash": "84d35df3",
35
35
  "needsInterop": false
36
36
  },
37
37
  "@openai/apps-sdk-ui/components/Button": {
38
38
  "src": "../../../../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.1_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._90324f97b7190ccfdbe40a9e8bef3385/node_modules/@openai/apps-sdk-ui/dist/es/components/Button/index.js",
39
39
  "file": "@openai_apps-sdk-ui_components_Button.js",
40
- "fileHash": "a08e5fc7",
40
+ "fileHash": "c08d365b",
41
41
  "needsInterop": false
42
42
  },
43
43
  "@openai/apps-sdk-ui/components/Checkbox": {
44
44
  "src": "../../../../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.1_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._90324f97b7190ccfdbe40a9e8bef3385/node_modules/@openai/apps-sdk-ui/dist/es/components/Checkbox/index.js",
45
45
  "file": "@openai_apps-sdk-ui_components_Checkbox.js",
46
- "fileHash": "568a2156",
46
+ "fileHash": "b0e3c856",
47
47
  "needsInterop": false
48
48
  },
49
49
  "@openai/apps-sdk-ui/components/Icon": {
50
50
  "src": "../../../../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.1_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._90324f97b7190ccfdbe40a9e8bef3385/node_modules/@openai/apps-sdk-ui/dist/es/components/Icon/index.js",
51
51
  "file": "@openai_apps-sdk-ui_components_Icon.js",
52
- "fileHash": "870168af",
52
+ "fileHash": "25eae116",
53
53
  "needsInterop": false
54
54
  },
55
55
  "@openai/apps-sdk-ui/components/Input": {
56
56
  "src": "../../../../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.1_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._90324f97b7190ccfdbe40a9e8bef3385/node_modules/@openai/apps-sdk-ui/dist/es/components/Input/index.js",
57
57
  "file": "@openai_apps-sdk-ui_components_Input.js",
58
- "fileHash": "f6d4ad60",
58
+ "fileHash": "e06a7192",
59
59
  "needsInterop": false
60
60
  },
61
61
  "@openai/apps-sdk-ui/components/SegmentedControl": {
62
62
  "src": "../../../../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.1_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._90324f97b7190ccfdbe40a9e8bef3385/node_modules/@openai/apps-sdk-ui/dist/es/components/SegmentedControl/index.js",
63
63
  "file": "@openai_apps-sdk-ui_components_SegmentedControl.js",
64
- "fileHash": "99bd53a9",
64
+ "fileHash": "fad6e91f",
65
65
  "needsInterop": false
66
66
  },
67
67
  "@openai/apps-sdk-ui/components/Select": {
68
68
  "src": "../../../../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.1_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._90324f97b7190ccfdbe40a9e8bef3385/node_modules/@openai/apps-sdk-ui/dist/es/components/Select/index.js",
69
69
  "file": "@openai_apps-sdk-ui_components_Select.js",
70
- "fileHash": "849b8549",
70
+ "fileHash": "fb9567a2",
71
71
  "needsInterop": false
72
72
  },
73
73
  "@openai/apps-sdk-ui/components/Textarea": {
74
74
  "src": "../../../../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.1_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._90324f97b7190ccfdbe40a9e8bef3385/node_modules/@openai/apps-sdk-ui/dist/es/components/Textarea/index.js",
75
75
  "file": "@openai_apps-sdk-ui_components_Textarea.js",
76
- "fileHash": "1655679b",
76
+ "fileHash": "7281a5a0",
77
77
  "needsInterop": false
78
78
  },
79
79
  "@openai/apps-sdk-ui/theme": {
80
80
  "src": "../../../../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.1_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._90324f97b7190ccfdbe40a9e8bef3385/node_modules/@openai/apps-sdk-ui/dist/es/lib/theme.js",
81
81
  "file": "@openai_apps-sdk-ui_theme.js",
82
- "fileHash": "2d1cd0a4",
82
+ "fileHash": "8eb63021",
83
83
  "needsInterop": false
84
84
  },
85
85
  "clsx": {
86
86
  "src": "../../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs",
87
87
  "file": "clsx.js",
88
- "fileHash": "3c893bd9",
88
+ "fileHash": "c3e9c6e8",
89
89
  "needsInterop": false
90
90
  },
91
91
  "embla-carousel-react": {
92
92
  "src": "../../../../node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.2.3/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js",
93
93
  "file": "embla-carousel-react.js",
94
- "fileHash": "177240f7",
94
+ "fileHash": "2e92d16c",
95
95
  "needsInterop": false
96
96
  },
97
97
  "embla-carousel-wheel-gestures": {
98
98
  "src": "../../../../node_modules/.pnpm/embla-carousel-wheel-gestures@8.1.0_embla-carousel@8.6.0/node_modules/embla-carousel-wheel-gestures/dist/embla-carousel-wheel-gestures.esm.js",
99
99
  "file": "embla-carousel-wheel-gestures.js",
100
- "fileHash": "1a9092e3",
100
+ "fileHash": "ca493790",
101
101
  "needsInterop": false
102
102
  },
103
103
  "mapbox-gl": {
104
104
  "src": "../../../../node_modules/.pnpm/mapbox-gl@3.17.0/node_modules/mapbox-gl/dist/mapbox-gl.js",
105
105
  "file": "mapbox-gl.js",
106
- "fileHash": "4acc5784",
106
+ "fileHash": "5ba95985",
107
107
  "needsInterop": true
108
108
  },
109
109
  "react-dom/client": {
110
110
  "src": "../../../../node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/client.js",
111
111
  "file": "react-dom_client.js",
112
- "fileHash": "0d690983",
112
+ "fileHash": "4c39d1d2",
113
113
  "needsInterop": true
114
114
  },
115
115
  "tailwind-merge": {
116
116
  "src": "../../../../node_modules/.pnpm/tailwind-merge@3.4.0/node_modules/tailwind-merge/dist/bundle-mjs.mjs",
117
117
  "file": "tailwind-merge.js",
118
- "fileHash": "600e9867",
118
+ "fileHash": "88ea5519",
119
119
  "needsInterop": false
120
120
  }
121
121
  },
@@ -123,12 +123,6 @@
123
123
  "chunk-2DZGWGIP": {
124
124
  "file": "chunk-2DZGWGIP.js"
125
125
  },
126
- "chunk-TSEQUROC": {
127
- "file": "chunk-TSEQUROC.js"
128
- },
129
- "chunk-XZTIOEPG": {
130
- "file": "chunk-XZTIOEPG.js"
131
- },
132
126
  "chunk-N6DVYEXK": {
133
127
  "file": "chunk-N6DVYEXK.js"
134
128
  },
@@ -144,6 +138,12 @@
144
138
  "chunk-EGRHWZRV": {
145
139
  "file": "chunk-EGRHWZRV.js"
146
140
  },
141
+ "chunk-TSEQUROC": {
142
+ "file": "chunk-TSEQUROC.js"
143
+ },
144
+ "chunk-XZTIOEPG": {
145
+ "file": "chunk-XZTIOEPG.js"
146
+ },
147
147
  "chunk-CNYJBM5F": {
148
148
  "file": "chunk-CNYJBM5F.js"
149
149
  },
@@ -1 +1 @@
1
- {"version":"4.0.16","results":[[":src/components/album/albums.test.tsx",{"duration":324.77866399999994,"failed":false}],[":src/resources/review-resource.test.tsx",{"duration":529.694369,"failed":false}],[":src/resources/carousel-resource.test.tsx",{"duration":263.42517499999985,"failed":false}],[":src/components/map/map-view.test.tsx",{"duration":85.665119,"failed":false}],[":src/components/map/place-inspector.test.tsx",{"duration":409.3448330000001,"failed":false}],[":src/components/album/fullscreen-viewer.test.tsx",{"duration":228.8939330000003,"failed":false}],[":src/components/map/place-list.test.tsx",{"duration":147.47323099999994,"failed":false}],[":src/components/map/place-card.test.tsx",{"duration":355.5575329999999,"failed":false}],[":src/components/map/place-carousel.test.tsx",{"duration":429.1329959999998,"failed":false}],[":src/components/album/album-carousel.test.tsx",{"duration":79.22797600000013,"failed":false}],[":src/components/carousel/carousel.test.tsx",{"duration":73.47246699999982,"failed":false}],[":src/resources/albums-resource.test.tsx",{"duration":289.68861300000003,"failed":false}],[":src/resources/map-resource.test.tsx",{"duration":255.71324299999992,"failed":false}],[":src/components/album/film-strip.test.tsx",{"duration":408.4503480000001,"failed":false}],[":src/components/album/album-card.test.tsx",{"duration":321.1045839999997,"failed":false}],[":src/components/carousel/card.test.tsx",{"duration":76.67339900000002,"failed":false}]]}
1
+ {"version":"4.0.16","results":[[":src/resources/albums/components/albums.test.tsx",{"duration":312.6829419999999,"failed":false}],[":src/resources/carousel/carousel-resource.test.tsx",{"duration":266.349324,"failed":false}],[":src/resources/review/review-resource.test.tsx",{"duration":575.062723,"failed":false}],[":src/resources/map/components/place-inspector.test.tsx",{"duration":408.8364120000001,"failed":false}],[":src/resources/map/components/map-view.test.tsx",{"duration":76.36474199999998,"failed":false}],[":src/resources/albums/components/fullscreen-viewer.test.tsx",{"duration":271.794167,"failed":false}],[":src/resources/map/components/place-list.test.tsx",{"duration":147.25542700000005,"failed":false}],[":src/resources/map/components/place-card.test.tsx",{"duration":334.0843209999998,"failed":false}],[":src/resources/map/components/place-carousel.test.tsx",{"duration":402.49088800000004,"failed":false}],[":src/resources/albums/components/album-carousel.test.tsx",{"duration":83.27303100000017,"failed":false}],[":src/resources/carousel/components/carousel.test.tsx",{"duration":99.52693,"failed":false}],[":src/resources/map/map-resource.test.tsx",{"duration":291.25948700000004,"failed":false}],[":src/resources/albums/albums-resource.test.tsx",{"duration":222.6419860000001,"failed":false}],[":src/resources/albums/components/film-strip.test.tsx",{"duration":473.575382,"failed":false}],[":src/resources/albums/components/album-card.test.tsx",{"duration":399.02311299999997,"failed":false}],[":src/resources/carousel/components/card.test.tsx",{"duration":69.64156500000013,"failed":false}]]}
@@ -12,7 +12,7 @@ vi.mock('sunpeak', () => ({
12
12
  }));
13
13
 
14
14
  // Mock Albums component
15
- vi.mock('../components/album/albums', () => ({
15
+ vi.mock('./components/albums', () => ({
16
16
  Albums: () => <div data-testid="albums-component">Albums Component</div>,
17
17
  }));
18
18
 
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { useSafeArea, useMaxHeight } from 'sunpeak';
3
- import { Albums } from '../components/album/albums';
3
+ import { Albums } from './components/albums';
4
4
 
5
5
  /**
6
6
  * Production-ready Albums Resource
@@ -0,0 +1,131 @@
1
+ {
2
+ "userMessage": "Pizza time",
3
+ "tool": {
4
+ "name": "show-albums",
5
+ "description": "Show photo albums",
6
+ "inputSchema": { "type": "object", "properties": {}, "additionalProperties": false },
7
+ "title": "Show Albums",
8
+ "annotations": { "readOnlyHint": true },
9
+ "_meta": {
10
+ "openai/toolInvocation/invoking": "Loading albums",
11
+ "openai/toolInvocation/invoked": "Album loaded",
12
+ "openai/widgetAccessible": true,
13
+ "openai/resultCanProduceWidget": true
14
+ }
15
+ },
16
+ "callToolResult": {
17
+ "structuredContent": {
18
+ "albums": [
19
+ {
20
+ "id": "summer-escape",
21
+ "title": "Summer Slice",
22
+ "cover": "https://persistent.oaistatic.com/pizzaz/pizzaz-1.png",
23
+ "photos": [
24
+ {
25
+ "id": "s1",
26
+ "title": "Waves",
27
+ "url": "https://persistent.oaistatic.com/pizzaz/pizzaz-2.png"
28
+ },
29
+ {
30
+ "id": "s2",
31
+ "title": "Palm trees",
32
+ "url": "https://persistent.oaistatic.com/pizzaz/pizzaz-3.png"
33
+ },
34
+ {
35
+ "id": "s3",
36
+ "title": "Sunset",
37
+ "url": "https://persistent.oaistatic.com/pizzaz/pizzaz-6.png"
38
+ }
39
+ ]
40
+ },
41
+ {
42
+ "id": "city-lights",
43
+ "title": "Pepperoni Nights",
44
+ "cover": "https://persistent.oaistatic.com/pizzaz/pizzaz-4.png",
45
+ "photos": [
46
+ {
47
+ "id": "c1",
48
+ "title": "Downtown",
49
+ "url": "https://persistent.oaistatic.com/pizzaz/pizzaz-5.png"
50
+ },
51
+ {
52
+ "id": "c2",
53
+ "title": "Neon",
54
+ "url": "https://persistent.oaistatic.com/pizzaz/pizzaz-1.png"
55
+ },
56
+ {
57
+ "id": "c3",
58
+ "title": "Streets",
59
+ "url": "https://persistent.oaistatic.com/pizzaz/pizzaz-2.png"
60
+ }
61
+ ]
62
+ },
63
+ {
64
+ "id": "into-the-woods",
65
+ "title": "Truffle Forest",
66
+ "cover": "https://persistent.oaistatic.com/pizzaz/pizzaz-3.png",
67
+ "photos": [
68
+ {
69
+ "id": "n1",
70
+ "title": "Forest path",
71
+ "url": "https://persistent.oaistatic.com/pizzaz/pizzaz-6.png"
72
+ },
73
+ {
74
+ "id": "n2",
75
+ "title": "Misty",
76
+ "url": "https://persistent.oaistatic.com/pizzaz/pizzaz-4.png"
77
+ },
78
+ {
79
+ "id": "n3",
80
+ "title": "Waterfall",
81
+ "url": "https://persistent.oaistatic.com/pizzaz/pizzaz-5.png"
82
+ }
83
+ ]
84
+ },
85
+ {
86
+ "id": "pizza-tour",
87
+ "title": "Pizza tour",
88
+ "cover": "https://persistent.oaistatic.com/pizzaz/pizzaz-1.png",
89
+ "photos": [
90
+ {
91
+ "id": "tonys-pizza-napoletana",
92
+ "title": "Tony's Pizza Napoletana",
93
+ "url": "https://persistent.oaistatic.com/pizzaz/pizzaz-2.png"
94
+ },
95
+ {
96
+ "id": "golden-boy-pizza",
97
+ "title": "Golden Boy Pizza",
98
+ "url": "https://persistent.oaistatic.com/pizzaz/pizzaz-3.png"
99
+ },
100
+ {
101
+ "id": "pizzeria-delfina-mission",
102
+ "title": "Pizzeria Delfina (Mission)",
103
+ "url": "https://persistent.oaistatic.com/pizzaz/pizzaz-6.png"
104
+ },
105
+ {
106
+ "id": "ragazza",
107
+ "title": "Ragazza",
108
+ "url": "https://persistent.oaistatic.com/pizzaz/pizzaz-4.png"
109
+ },
110
+ {
111
+ "id": "del-popolo",
112
+ "title": "Del Popolo",
113
+ "url": "https://persistent.oaistatic.com/pizzaz/pizzaz-5.png"
114
+ },
115
+ {
116
+ "id": "square-pie-guys",
117
+ "title": "Square Pie Guys",
118
+ "url": "https://persistent.oaistatic.com/pizzaz/pizzaz-1.png"
119
+ },
120
+ {
121
+ "id": "zero-zero",
122
+ "title": "Zero Zero",
123
+ "url": "https://persistent.oaistatic.com/pizzaz/pizzaz-2.png"
124
+ }
125
+ ]
126
+ }
127
+ ]
128
+ },
129
+ "_meta": {}
130
+ }
131
+ }
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { Button } from '@openai/apps-sdk-ui/components/Button';
3
- import { cn } from '../../lib/index';
3
+ import { cn } from '../../../lib/index';
4
4
  import type { Album } from './albums';
5
5
 
6
6
  export type AlbumCardProps = {
@@ -4,7 +4,7 @@ import { WheelGesturesPlugin } from 'embla-carousel-wheel-gestures';
4
4
  import { ArrowLeft, ArrowRight } from '@openai/apps-sdk-ui/components/Icon';
5
5
  import { useWidgetState, useDisplayMode } from 'sunpeak';
6
6
  import { Button } from '@openai/apps-sdk-ui/components/Button';
7
- import { cn } from '../../lib/index';
7
+ import { cn } from '../../../lib/index';
8
8
 
9
9
  export interface AlbumCarouselState extends Record<string, unknown> {
10
10
  currentIndex?: number;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { Button } from '@openai/apps-sdk-ui/components/Button';
3
- import { cn } from '../../lib/index';
3
+ import { cn } from '../../../lib/index';
4
4
  import type { Album } from './albums';
5
5
 
6
6
  export type FilmStripProps = {
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { useSafeArea } from 'sunpeak';
3
- import { cn } from '../../lib/index';
3
+ import { cn } from '../../../lib/index';
4
4
  import { FilmStrip } from './film-strip';
5
5
  import type { Album } from './albums';
6
6
 
@@ -32,7 +32,7 @@ vi.mock('sunpeak', () => ({
32
32
  }));
33
33
 
34
34
  // Mock child components
35
- vi.mock('../components/carousel', () => ({
35
+ vi.mock('./components', () => ({
36
36
  Carousel: ({ children }: { children: React.ReactNode }) => (
37
37
  <div data-testid="carousel">{children}</div>
38
38
  ),
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { useWidgetProps, useSafeArea, useMaxHeight, useUserAgent } from 'sunpeak';
3
- import { Carousel, Card } from '../components/carousel';
3
+ import { Carousel, Card } from './components';
4
4
 
5
5
  /**
6
6
  * Production-ready Carousel Resource