sunpeak 0.10.1 → 0.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -57,7 +57,7 @@ sunpeak is an npm package consisting of:
57
57
  2. **The `sunpeak` framework** (`./template`). Next.js for ChatGPT Apps. This templated npm package includes:
58
58
  1. Project scaffold - Complete development setup with build, test, and mcp tooling, including the sunpeak library.
59
59
  2. UI components - Production-ready components following ChatGPT design guidelines and using OpenAI apps-sdk-ui React components.
60
- 3. Convention over configuration - Create UIs (resources) by simply creating a `src/resources/NAME-resource.tsx` React file and `src/resources/NAME-resource.json` metadata file.
60
+ 3. Convention over configuration - Create UIs (resources) by simply creating a `src/resources/NAME/NAME-resource.tsx` React file and `src/resources/NAME/NAME-resource.json` metadata file.
61
61
  3. **The `sunpeak` CLI** (`./bin`). Commands for managing ChatGPT Apps. Includes a client for the [sunpeak Resource Repository](https://app.sunpeak.ai/) (ECR for ChatGPT Apps). The repository helps you & your CI/CD decouple your App from your client-agnostic MCP server:
62
62
  1. Tag your app builds with version numbers and environment names (like `v1.0.0` and `prod`)
63
63
  2. `push` built Apps to a central location
@@ -68,7 +68,7 @@ Note that each `sunpeak` component can be used in isolation if preferred, though
68
68
  ## Example Component
69
69
 
70
70
  ```tsx
71
- import { Card } from '../card';
71
+ import { Card } from './components';
72
72
 
73
73
  export function MCPResource() {
74
74
  return (
@@ -1 +1 @@
1
- {"version":3,"file":"entry.cjs","sources":["../../src/mcp/entry.ts"],"sourcesContent":["#!/usr/bin/env node\n/**\n * Internal MCP server entry point\n * This is run by nodemon or directly to start the MCP server\n *\n * Auto-discovers simulations and resources by file naming convention:\n * - resources/{resource}/{resource}-{tool}-simulation.json (e.g., resources/albums/albums-show-simulation.json)\n * - resources/{resource}/{resource}-resource.json\n */\nimport { runMCPServer, type SimulationWithDist } from './index.js';\nimport path from 'path';\nimport { existsSync, readFileSync, readdirSync } from 'fs';\nimport type { Resource } from '@modelcontextprotocol/sdk/types.js';\n\n// Determine project root (where this is being run from)\nconst projectRoot = process.cwd();\n\nasync function startServer() {\n // Read package.json for app metadata\n const pkgPath = path.join(projectRoot, 'package.json');\n const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));\n\n // Auto-discover resources and simulations from subdirectories\n const resourcesDir = path.join(projectRoot, 'src/resources');\n const resourceDirs = readdirSync(resourcesDir, { withFileTypes: true }).filter((entry) =>\n entry.isDirectory()\n );\n\n const resourcesMap = new Map<string, Resource>();\n const simulations: SimulationWithDist[] = [];\n\n for (const entry of resourceDirs) {\n const resourceKey = entry.name;\n const resourceDir = path.join(resourcesDir, resourceKey);\n const resourcePath = path.join(resourceDir, `${resourceKey}-resource.json`);\n\n // Skip directories without a resource file\n if (!existsSync(resourcePath)) {\n continue;\n }\n\n // Load resource\n const resource = JSON.parse(readFileSync(resourcePath, 'utf-8')) as Resource;\n resourcesMap.set(resourceKey, resource);\n\n // Discover simulation files in the same directory\n const dirFiles = readdirSync(resourceDir);\n for (const file of dirFiles) {\n if (file.endsWith('-simulation.json')) {\n // Extract simulation key from filename: 'albums-show-simulation.json' -> 'albums-show'\n const simulationKey = file.replace(/-simulation\\.json$/, '');\n const simulationPath = path.join(resourceDir, file);\n const simulation = JSON.parse(readFileSync(simulationPath, 'utf-8'));\n\n simulations.push({\n ...simulation,\n name: simulationKey,\n distPath: path.join(projectRoot, `dist/${resourceKey}/${resourceKey}.js`),\n resource,\n });\n }\n }\n }\n\n runMCPServer({\n name: pkg.name || 'Sunpeak',\n version: pkg.version || '0.1.0',\n simulations,\n port: 6766,\n });\n}\n\nstartServer().catch((error) => {\n console.error('Failed to start MCP server:', error);\n process.exit(1);\n});\n"],"names":["readFileSync","readdirSync","existsSync","runMCPServer"],"mappings":";;;;;AAeA,MAAM,cAAc,QAAQ,IAAA;AAE5B,eAAe,cAAc;AAE3B,QAAM,UAAU,KAAK,KAAK,aAAa,cAAc;AACrD,QAAM,MAAM,KAAK,MAAMA,GAAAA,aAAa,SAAS,OAAO,CAAC;AAGrD,QAAM,eAAe,KAAK,KAAK,aAAa,eAAe;AAC3D,QAAM,eAAeC,GAAAA,YAAY,cAAc,EAAE,eAAe,KAAA,CAAM,EAAE;AAAA,IAAO,CAAC,UAC9E,MAAM,YAAA;AAAA,EAAY;AAGpB,QAAM,mCAAmB,IAAA;AACzB,QAAM,cAAoC,CAAA;AAE1C,aAAW,SAAS,cAAc;AAChC,UAAM,cAAc,MAAM;AAC1B,UAAM,cAAc,KAAK,KAAK,cAAc,WAAW;AACvD,UAAM,eAAe,KAAK,KAAK,aAAa,GAAG,WAAW,gBAAgB;AAG1E,QAAI,CAACC,GAAAA,WAAW,YAAY,GAAG;AAC7B;AAAA,IACF;AAGA,UAAM,WAAW,KAAK,MAAMF,GAAAA,aAAa,cAAc,OAAO,CAAC;AAC/D,iBAAa,IAAI,aAAa,QAAQ;AAGtC,UAAM,WAAWC,GAAAA,YAAY,WAAW;AACxC,eAAW,QAAQ,UAAU;AAC3B,UAAI,KAAK,SAAS,kBAAkB,GAAG;AAErC,cAAM,gBAAgB,KAAK,QAAQ,sBAAsB,EAAE;AAC3D,cAAM,iBAAiB,KAAK,KAAK,aAAa,IAAI;AAClD,cAAM,aAAa,KAAK,MAAMD,GAAAA,aAAa,gBAAgB,OAAO,CAAC;AAEnE,oBAAY,KAAK;AAAA,UACf,GAAG;AAAA,UACH,MAAM;AAAA,UACN,UAAU,KAAK,KAAK,aAAa,QAAQ,WAAW,IAAI,WAAW,KAAK;AAAA,UACxE;AAAA,QAAA,CACD;AAAA,MACH;AAAA,IACF;AAAA,EACF;AAEAG,sBAAa;AAAA,IACX,MAAM,IAAI,QAAQ;AAAA,IAClB,SAAS,IAAI,WAAW;AAAA,IACxB;AAAA,IACA,MAAM;AAAA,EAAA,CACP;AACH;AAEA,cAAc,MAAM,CAAC,UAAU;AAC7B,UAAQ,MAAM,+BAA+B,KAAK;AAClD,UAAQ,KAAK,CAAC;AAChB,CAAC;"}
1
+ {"version":3,"file":"entry.cjs","sources":["../../src/mcp/entry.ts"],"sourcesContent":["#!/usr/bin/env node\n/**\n * Internal MCP server entry point\n * This is run by nodemon or directly to start the MCP server\n *\n * Auto-discovers simulations and resources by file naming convention:\n * - resources/{resource}/{resource}-{scenario}-simulation.json (e.g., resources/albums/albums-show-simulation.json)\n * - resources/{resource}/{resource}-resource.json\n */\nimport { runMCPServer, type SimulationWithDist } from './index.js';\nimport path from 'path';\nimport { existsSync, readFileSync, readdirSync } from 'fs';\nimport type { Resource } from '@modelcontextprotocol/sdk/types.js';\n\n// Determine project root (where this is being run from)\nconst projectRoot = process.cwd();\n\nasync function startServer() {\n // Read package.json for app metadata\n const pkgPath = path.join(projectRoot, 'package.json');\n const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));\n\n // Auto-discover resources and simulations from subdirectories\n const resourcesDir = path.join(projectRoot, 'src/resources');\n const resourceDirs = readdirSync(resourcesDir, { withFileTypes: true }).filter((entry) =>\n entry.isDirectory()\n );\n\n const resourcesMap = new Map<string, Resource>();\n const simulations: SimulationWithDist[] = [];\n\n for (const entry of resourceDirs) {\n const resourceKey = entry.name;\n const resourceDir = path.join(resourcesDir, resourceKey);\n const resourcePath = path.join(resourceDir, `${resourceKey}-resource.json`);\n\n // Skip directories without a resource file\n if (!existsSync(resourcePath)) {\n continue;\n }\n\n // Load resource\n const resource = JSON.parse(readFileSync(resourcePath, 'utf-8')) as Resource;\n resourcesMap.set(resourceKey, resource);\n\n // Discover simulation files in the same directory\n const dirFiles = readdirSync(resourceDir);\n for (const file of dirFiles) {\n if (file.endsWith('-simulation.json')) {\n // Extract simulation key from filename: 'albums-show-simulation.json' -> 'albums-show'\n const simulationKey = file.replace(/-simulation\\.json$/, '');\n const simulationPath = path.join(resourceDir, file);\n const simulation = JSON.parse(readFileSync(simulationPath, 'utf-8'));\n\n simulations.push({\n ...simulation,\n name: simulationKey,\n distPath: path.join(projectRoot, `dist/${resourceKey}/${resourceKey}.js`),\n resource,\n });\n }\n }\n }\n\n runMCPServer({\n name: pkg.name || 'Sunpeak',\n version: pkg.version || '0.1.0',\n simulations,\n port: 6766,\n });\n}\n\nstartServer().catch((error) => {\n console.error('Failed to start MCP server:', error);\n process.exit(1);\n});\n"],"names":["readFileSync","readdirSync","existsSync","runMCPServer"],"mappings":";;;;;AAeA,MAAM,cAAc,QAAQ,IAAA;AAE5B,eAAe,cAAc;AAE3B,QAAM,UAAU,KAAK,KAAK,aAAa,cAAc;AACrD,QAAM,MAAM,KAAK,MAAMA,GAAAA,aAAa,SAAS,OAAO,CAAC;AAGrD,QAAM,eAAe,KAAK,KAAK,aAAa,eAAe;AAC3D,QAAM,eAAeC,GAAAA,YAAY,cAAc,EAAE,eAAe,KAAA,CAAM,EAAE;AAAA,IAAO,CAAC,UAC9E,MAAM,YAAA;AAAA,EAAY;AAGpB,QAAM,mCAAmB,IAAA;AACzB,QAAM,cAAoC,CAAA;AAE1C,aAAW,SAAS,cAAc;AAChC,UAAM,cAAc,MAAM;AAC1B,UAAM,cAAc,KAAK,KAAK,cAAc,WAAW;AACvD,UAAM,eAAe,KAAK,KAAK,aAAa,GAAG,WAAW,gBAAgB;AAG1E,QAAI,CAACC,GAAAA,WAAW,YAAY,GAAG;AAC7B;AAAA,IACF;AAGA,UAAM,WAAW,KAAK,MAAMF,GAAAA,aAAa,cAAc,OAAO,CAAC;AAC/D,iBAAa,IAAI,aAAa,QAAQ;AAGtC,UAAM,WAAWC,GAAAA,YAAY,WAAW;AACxC,eAAW,QAAQ,UAAU;AAC3B,UAAI,KAAK,SAAS,kBAAkB,GAAG;AAErC,cAAM,gBAAgB,KAAK,QAAQ,sBAAsB,EAAE;AAC3D,cAAM,iBAAiB,KAAK,KAAK,aAAa,IAAI;AAClD,cAAM,aAAa,KAAK,MAAMD,GAAAA,aAAa,gBAAgB,OAAO,CAAC;AAEnE,oBAAY,KAAK;AAAA,UACf,GAAG;AAAA,UACH,MAAM;AAAA,UACN,UAAU,KAAK,KAAK,aAAa,QAAQ,WAAW,IAAI,WAAW,KAAK;AAAA,UACxE;AAAA,QAAA,CACD;AAAA,MACH;AAAA,IACF;AAAA,EACF;AAEAG,sBAAa;AAAA,IACX,MAAM,IAAI,QAAQ;AAAA,IAClB,SAAS,IAAI,WAAW;AAAA,IACxB;AAAA,IACA,MAAM;AAAA,EAAA,CACP;AACH;AAEA,cAAc,MAAM,CAAC,UAAU;AAC7B,UAAQ,MAAM,+BAA+B,KAAK;AAClD,UAAQ,KAAK,CAAC;AAChB,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"entry.js","sources":["../../src/mcp/entry.ts"],"sourcesContent":["#!/usr/bin/env node\n/**\n * Internal MCP server entry point\n * This is run by nodemon or directly to start the MCP server\n *\n * Auto-discovers simulations and resources by file naming convention:\n * - resources/{resource}/{resource}-{tool}-simulation.json (e.g., resources/albums/albums-show-simulation.json)\n * - resources/{resource}/{resource}-resource.json\n */\nimport { runMCPServer, type SimulationWithDist } from './index.js';\nimport path from 'path';\nimport { existsSync, readFileSync, readdirSync } from 'fs';\nimport type { Resource } from '@modelcontextprotocol/sdk/types.js';\n\n// Determine project root (where this is being run from)\nconst projectRoot = process.cwd();\n\nasync function startServer() {\n // Read package.json for app metadata\n const pkgPath = path.join(projectRoot, 'package.json');\n const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));\n\n // Auto-discover resources and simulations from subdirectories\n const resourcesDir = path.join(projectRoot, 'src/resources');\n const resourceDirs = readdirSync(resourcesDir, { withFileTypes: true }).filter((entry) =>\n entry.isDirectory()\n );\n\n const resourcesMap = new Map<string, Resource>();\n const simulations: SimulationWithDist[] = [];\n\n for (const entry of resourceDirs) {\n const resourceKey = entry.name;\n const resourceDir = path.join(resourcesDir, resourceKey);\n const resourcePath = path.join(resourceDir, `${resourceKey}-resource.json`);\n\n // Skip directories without a resource file\n if (!existsSync(resourcePath)) {\n continue;\n }\n\n // Load resource\n const resource = JSON.parse(readFileSync(resourcePath, 'utf-8')) as Resource;\n resourcesMap.set(resourceKey, resource);\n\n // Discover simulation files in the same directory\n const dirFiles = readdirSync(resourceDir);\n for (const file of dirFiles) {\n if (file.endsWith('-simulation.json')) {\n // Extract simulation key from filename: 'albums-show-simulation.json' -> 'albums-show'\n const simulationKey = file.replace(/-simulation\\.json$/, '');\n const simulationPath = path.join(resourceDir, file);\n const simulation = JSON.parse(readFileSync(simulationPath, 'utf-8'));\n\n simulations.push({\n ...simulation,\n name: simulationKey,\n distPath: path.join(projectRoot, `dist/${resourceKey}/${resourceKey}.js`),\n resource,\n });\n }\n }\n }\n\n runMCPServer({\n name: pkg.name || 'Sunpeak',\n version: pkg.version || '0.1.0',\n simulations,\n port: 6766,\n });\n}\n\nstartServer().catch((error) => {\n console.error('Failed to start MCP server:', error);\n process.exit(1);\n});\n"],"names":[],"mappings":";;;;AAeA,MAAM,cAAc,QAAQ,IAAA;AAE5B,eAAe,cAAc;AAE3B,QAAM,UAAU,KAAK,KAAK,aAAa,cAAc;AACrD,QAAM,MAAM,KAAK,MAAM,aAAa,SAAS,OAAO,CAAC;AAGrD,QAAM,eAAe,KAAK,KAAK,aAAa,eAAe;AAC3D,QAAM,eAAe,YAAY,cAAc,EAAE,eAAe,KAAA,CAAM,EAAE;AAAA,IAAO,CAAC,UAC9E,MAAM,YAAA;AAAA,EAAY;AAGpB,QAAM,mCAAmB,IAAA;AACzB,QAAM,cAAoC,CAAA;AAE1C,aAAW,SAAS,cAAc;AAChC,UAAM,cAAc,MAAM;AAC1B,UAAM,cAAc,KAAK,KAAK,cAAc,WAAW;AACvD,UAAM,eAAe,KAAK,KAAK,aAAa,GAAG,WAAW,gBAAgB;AAG1E,QAAI,CAAC,WAAW,YAAY,GAAG;AAC7B;AAAA,IACF;AAGA,UAAM,WAAW,KAAK,MAAM,aAAa,cAAc,OAAO,CAAC;AAC/D,iBAAa,IAAI,aAAa,QAAQ;AAGtC,UAAM,WAAW,YAAY,WAAW;AACxC,eAAW,QAAQ,UAAU;AAC3B,UAAI,KAAK,SAAS,kBAAkB,GAAG;AAErC,cAAM,gBAAgB,KAAK,QAAQ,sBAAsB,EAAE;AAC3D,cAAM,iBAAiB,KAAK,KAAK,aAAa,IAAI;AAClD,cAAM,aAAa,KAAK,MAAM,aAAa,gBAAgB,OAAO,CAAC;AAEnE,oBAAY,KAAK;AAAA,UACf,GAAG;AAAA,UACH,MAAM;AAAA,UACN,UAAU,KAAK,KAAK,aAAa,QAAQ,WAAW,IAAI,WAAW,KAAK;AAAA,UACxE;AAAA,QAAA,CACD;AAAA,MACH;AAAA,IACF;AAAA,EACF;AAEA,eAAa;AAAA,IACX,MAAM,IAAI,QAAQ;AAAA,IAClB,SAAS,IAAI,WAAW;AAAA,IACxB;AAAA,IACA,MAAM;AAAA,EAAA,CACP;AACH;AAEA,cAAc,MAAM,CAAC,UAAU;AAC7B,UAAQ,MAAM,+BAA+B,KAAK;AAClD,UAAQ,KAAK,CAAC;AAChB,CAAC;"}
1
+ {"version":3,"file":"entry.js","sources":["../../src/mcp/entry.ts"],"sourcesContent":["#!/usr/bin/env node\n/**\n * Internal MCP server entry point\n * This is run by nodemon or directly to start the MCP server\n *\n * Auto-discovers simulations and resources by file naming convention:\n * - resources/{resource}/{resource}-{scenario}-simulation.json (e.g., resources/albums/albums-show-simulation.json)\n * - resources/{resource}/{resource}-resource.json\n */\nimport { runMCPServer, type SimulationWithDist } from './index.js';\nimport path from 'path';\nimport { existsSync, readFileSync, readdirSync } from 'fs';\nimport type { Resource } from '@modelcontextprotocol/sdk/types.js';\n\n// Determine project root (where this is being run from)\nconst projectRoot = process.cwd();\n\nasync function startServer() {\n // Read package.json for app metadata\n const pkgPath = path.join(projectRoot, 'package.json');\n const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));\n\n // Auto-discover resources and simulations from subdirectories\n const resourcesDir = path.join(projectRoot, 'src/resources');\n const resourceDirs = readdirSync(resourcesDir, { withFileTypes: true }).filter((entry) =>\n entry.isDirectory()\n );\n\n const resourcesMap = new Map<string, Resource>();\n const simulations: SimulationWithDist[] = [];\n\n for (const entry of resourceDirs) {\n const resourceKey = entry.name;\n const resourceDir = path.join(resourcesDir, resourceKey);\n const resourcePath = path.join(resourceDir, `${resourceKey}-resource.json`);\n\n // Skip directories without a resource file\n if (!existsSync(resourcePath)) {\n continue;\n }\n\n // Load resource\n const resource = JSON.parse(readFileSync(resourcePath, 'utf-8')) as Resource;\n resourcesMap.set(resourceKey, resource);\n\n // Discover simulation files in the same directory\n const dirFiles = readdirSync(resourceDir);\n for (const file of dirFiles) {\n if (file.endsWith('-simulation.json')) {\n // Extract simulation key from filename: 'albums-show-simulation.json' -> 'albums-show'\n const simulationKey = file.replace(/-simulation\\.json$/, '');\n const simulationPath = path.join(resourceDir, file);\n const simulation = JSON.parse(readFileSync(simulationPath, 'utf-8'));\n\n simulations.push({\n ...simulation,\n name: simulationKey,\n distPath: path.join(projectRoot, `dist/${resourceKey}/${resourceKey}.js`),\n resource,\n });\n }\n }\n }\n\n runMCPServer({\n name: pkg.name || 'Sunpeak',\n version: pkg.version || '0.1.0',\n simulations,\n port: 6766,\n });\n}\n\nstartServer().catch((error) => {\n console.error('Failed to start MCP server:', error);\n process.exit(1);\n});\n"],"names":[],"mappings":";;;;AAeA,MAAM,cAAc,QAAQ,IAAA;AAE5B,eAAe,cAAc;AAE3B,QAAM,UAAU,KAAK,KAAK,aAAa,cAAc;AACrD,QAAM,MAAM,KAAK,MAAM,aAAa,SAAS,OAAO,CAAC;AAGrD,QAAM,eAAe,KAAK,KAAK,aAAa,eAAe;AAC3D,QAAM,eAAe,YAAY,cAAc,EAAE,eAAe,KAAA,CAAM,EAAE;AAAA,IAAO,CAAC,UAC9E,MAAM,YAAA;AAAA,EAAY;AAGpB,QAAM,mCAAmB,IAAA;AACzB,QAAM,cAAoC,CAAA;AAE1C,aAAW,SAAS,cAAc;AAChC,UAAM,cAAc,MAAM;AAC1B,UAAM,cAAc,KAAK,KAAK,cAAc,WAAW;AACvD,UAAM,eAAe,KAAK,KAAK,aAAa,GAAG,WAAW,gBAAgB;AAG1E,QAAI,CAAC,WAAW,YAAY,GAAG;AAC7B;AAAA,IACF;AAGA,UAAM,WAAW,KAAK,MAAM,aAAa,cAAc,OAAO,CAAC;AAC/D,iBAAa,IAAI,aAAa,QAAQ;AAGtC,UAAM,WAAW,YAAY,WAAW;AACxC,eAAW,QAAQ,UAAU;AAC3B,UAAI,KAAK,SAAS,kBAAkB,GAAG;AAErC,cAAM,gBAAgB,KAAK,QAAQ,sBAAsB,EAAE;AAC3D,cAAM,iBAAiB,KAAK,KAAK,aAAa,IAAI;AAClD,cAAM,aAAa,KAAK,MAAM,aAAa,gBAAgB,OAAO,CAAC;AAEnE,oBAAY,KAAK;AAAA,UACf,GAAG;AAAA,UACH,MAAM;AAAA,UACN,UAAU,KAAK,KAAK,aAAa,QAAQ,WAAW,IAAI,WAAW,KAAK;AAAA,UACxE;AAAA,QAAA,CACD;AAAA,MACH;AAAA,IACF;AAAA,EACF;AAEA,eAAa;AAAA,IACX,MAAM,IAAI,QAAQ;AAAA,IAClB,SAAS,IAAI,WAAW;AAAA,IACxB;AAAA,IACA,MAAM;AAAA,EAAA,CACP;AACH;AAEA,cAAc,MAAM,CAAC,UAAU;AAC7B,UAAQ,MAAM,+BAA+B,KAAK;AAClD,UAAQ,KAAK,CAAC;AAChB,CAAC;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sunpeak",
3
- "version": "0.10.1",
3
+ "version": "0.10.3",
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,7 +4,7 @@
4
4
  * This file bootstraps the ChatGPT simulator for development
5
5
  *
6
6
  * Auto-discovers simulations and resources by file naming convention:
7
- * - resources/{resource}/{resource}-{tool}-simulation.json (e.g., resources/albums/albums-show-simulation.json)
7
+ * - resources/{resource}/{resource}-{scenario}-simulation.json (e.g., resources/albums/albums-show-simulation.json)
8
8
  * - resources/{resource}/{resource}-resource.json
9
9
  * - resources/{resource}/{Resource}Resource component (PascalCase)
10
10
  */
@@ -101,11 +101,11 @@ To add a new UI (MCP Resource), create a new directory under `src/resources/` wi
101
101
 
102
102
  ```
103
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)
104
+ ├── NAME-resource.tsx # React component (required)
105
+ ├── NAME-resource.json # Resource metadata (required)
106
+ ├── NAME-resource.test.tsx # Unit tests (optional)
107
+ ├── NAME-SCENARIO-simulation.json # Simulation data (optional)
108
+ └── components/ # UI components (optional)
109
109
  ```
110
110
 
111
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`.
@@ -12,5 +12,5 @@
12
12
  ]
13
13
  }
14
14
  },
15
- "uri": "ui://albums-mkd2axzd"
15
+ "uri": "ui://albums-mkd2wyc7"
16
16
  }
@@ -12,5 +12,5 @@
12
12
  ]
13
13
  }
14
14
  },
15
- "uri": "ui://carousel-mkd2axzd"
15
+ "uri": "ui://carousel-mkd2wyc7"
16
16
  }
@@ -18,5 +18,5 @@
18
18
  ]
19
19
  }
20
20
  },
21
- "uri": "ui://map-mkd2axzd"
21
+ "uri": "ui://map-mkd2wyc7"
22
22
  }
@@ -12,5 +12,5 @@
12
12
  ]
13
13
  }
14
14
  },
15
- "uri": "ui://review-mkd2axzd"
15
+ "uri": "ui://review-mkd2wyc7"
16
16
  }
@@ -2,13 +2,13 @@ import {
2
2
  Button,
3
3
  ButtonLink,
4
4
  CopyButton
5
- } from "./chunk-N6DVYEXK.js";
6
- import "./chunk-JAGHY6H6.js";
5
+ } from "./chunk-LVZJNEGE.js";
6
+ import "./chunk-UM3ZGDFR.js";
7
7
  import "./chunk-QPJAV452.js";
8
+ import "./chunk-JAGHY6H6.js";
8
9
  import "./chunk-DYQDWJMS.js";
9
10
  import "./chunk-EGRHWZRV.js";
10
11
  import "./chunk-CNYJBM5F.js";
11
- import "./chunk-UM3ZGDFR.js";
12
12
  import "./chunk-JGVISENQ.js";
13
13
  import "./chunk-BUOVMFCD.js";
14
14
  import "./chunk-ILHRZGIS.js";
@@ -5,13 +5,21 @@ import {
5
5
  Button,
6
6
  LoadingIndicator,
7
7
  TransitionGroup
8
- } from "./chunk-N6DVYEXK.js";
8
+ } from "./chunk-LVZJNEGE.js";
9
9
  import {
10
- useTimeout
11
- } from "./chunk-JAGHY6H6.js";
10
+ Check_default,
11
+ ChevronDownVector_default,
12
+ DropdownVector_default,
13
+ Info_default,
14
+ Search_default,
15
+ X_default
16
+ } from "./chunk-UM3ZGDFR.js";
12
17
  import {
13
18
  o
14
19
  } from "./chunk-QPJAV452.js";
20
+ import {
21
+ useTimeout
22
+ } from "./chunk-JAGHY6H6.js";
15
23
  import {
16
24
  handlePressableMouseEnter,
17
25
  preventDefaultHandler,
@@ -28,14 +36,6 @@ import "./chunk-XZTIOEPG.js";
28
36
  import {
29
37
  clsx_default
30
38
  } from "./chunk-CNYJBM5F.js";
31
- import {
32
- Check_default,
33
- ChevronDownVector_default,
34
- DropdownVector_default,
35
- Info_default,
36
- Search_default,
37
- X_default
38
- } from "./chunk-UM3ZGDFR.js";
39
39
  import {
40
40
  require_jsx_runtime
41
41
  } from "./chunk-JGVISENQ.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": "978df452",
10
+ "fileHash": "fb3e79b3",
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": "739c8c96",
16
+ "fileHash": "d6a664e5",
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": "c6a55f8c",
22
+ "fileHash": "9e8e545b",
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": "2e3249cd",
28
+ "fileHash": "0c193a8a",
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": "84d35df3",
34
+ "fileHash": "f9dfeee4",
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": "c08d365b",
40
+ "fileHash": "ba413346",
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": "b0e3c856",
46
+ "fileHash": "c1ffdf3d",
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": "25eae116",
52
+ "fileHash": "6e08ea68",
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": "e06a7192",
58
+ "fileHash": "03cf3a2d",
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": "fad6e91f",
64
+ "fileHash": "d534dd11",
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": "fb9567a2",
70
+ "fileHash": "dcb8661c",
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": "7281a5a0",
76
+ "fileHash": "94fda091",
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": "8eb63021",
82
+ "fileHash": "8ff1f511",
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": "c3e9c6e8",
88
+ "fileHash": "4d883f36",
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": "2e92d16c",
94
+ "fileHash": "111f3da3",
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": "ca493790",
100
+ "fileHash": "efd9860f",
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": "5ba95985",
106
+ "fileHash": "f6794d9d",
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": "4c39d1d2",
112
+ "fileHash": "fde7f647",
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": "88ea5519",
118
+ "fileHash": "657d10b8",
119
119
  "needsInterop": false
120
120
  }
121
121
  },
@@ -123,15 +123,18 @@
123
123
  "chunk-2DZGWGIP": {
124
124
  "file": "chunk-2DZGWGIP.js"
125
125
  },
126
- "chunk-N6DVYEXK": {
127
- "file": "chunk-N6DVYEXK.js"
126
+ "chunk-LVZJNEGE": {
127
+ "file": "chunk-LVZJNEGE.js"
128
128
  },
129
- "chunk-JAGHY6H6": {
130
- "file": "chunk-JAGHY6H6.js"
129
+ "chunk-UM3ZGDFR": {
130
+ "file": "chunk-UM3ZGDFR.js"
131
131
  },
132
132
  "chunk-QPJAV452": {
133
133
  "file": "chunk-QPJAV452.js"
134
134
  },
135
+ "chunk-JAGHY6H6": {
136
+ "file": "chunk-JAGHY6H6.js"
137
+ },
135
138
  "chunk-DYQDWJMS": {
136
139
  "file": "chunk-DYQDWJMS.js"
137
140
  },
@@ -147,9 +150,6 @@
147
150
  "chunk-CNYJBM5F": {
148
151
  "file": "chunk-CNYJBM5F.js"
149
152
  },
150
- "chunk-UM3ZGDFR": {
151
- "file": "chunk-UM3ZGDFR.js"
152
- },
153
153
  "chunk-JGVISENQ": {
154
154
  "file": "chunk-JGVISENQ.js"
155
155
  },
@@ -1,9 +1,13 @@
1
1
  import {
2
- useTimeout
3
- } from "./chunk-JAGHY6H6.js";
2
+ Check_default,
3
+ Copy_default
4
+ } from "./chunk-UM3ZGDFR.js";
4
5
  import {
5
6
  o
6
7
  } from "./chunk-QPJAV452.js";
8
+ import {
9
+ useTimeout
10
+ } from "./chunk-JAGHY6H6.js";
7
11
  import {
8
12
  handlePressableMouseEnter,
9
13
  isDev,
@@ -18,10 +22,6 @@ import {
18
22
  import {
19
23
  clsx_default
20
24
  } from "./chunk-CNYJBM5F.js";
21
- import {
22
- Check_default,
23
- Copy_default
24
- } from "./chunk-UM3ZGDFR.js";
25
25
  import {
26
26
  require_jsx_runtime
27
27
  } from "./chunk-JGVISENQ.js";
@@ -625,4 +625,4 @@ export {
625
625
  ButtonLink,
626
626
  CopyButton
627
627
  };
628
- //# sourceMappingURL=chunk-N6DVYEXK.js.map
628
+ //# sourceMappingURL=chunk-LVZJNEGE.js.map
@@ -1 +1 @@
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}]]}
1
+ {"version":"4.0.16","results":[[":src/resources/review/review-resource.test.tsx",{"duration":530.608798,"failed":false}],[":src/resources/albums/components/albums.test.tsx",{"duration":348.1831809999999,"failed":false}],[":src/resources/carousel/carousel-resource.test.tsx",{"duration":272.94627400000013,"failed":false}],[":src/resources/map/components/map-view.test.tsx",{"duration":98.39371499999993,"failed":false}],[":src/resources/map/components/place-inspector.test.tsx",{"duration":417.9068080000002,"failed":false}],[":src/resources/albums/components/fullscreen-viewer.test.tsx",{"duration":274.64311,"failed":false}],[":src/resources/map/components/place-list.test.tsx",{"duration":130.8710030000002,"failed":false}],[":src/resources/map/components/place-card.test.tsx",{"duration":352.6335079999999,"failed":false}],[":src/resources/map/components/place-carousel.test.tsx",{"duration":393.43498999999997,"failed":false}],[":src/resources/albums/components/album-carousel.test.tsx",{"duration":90.04754600000001,"failed":false}],[":src/resources/carousel/components/carousel.test.tsx",{"duration":66.88647399999991,"failed":false}],[":src/resources/map/map-resource.test.tsx",{"duration":233.14745900000003,"failed":false}],[":src/resources/albums/albums-resource.test.tsx",{"duration":240.6847640000001,"failed":false}],[":src/resources/albums/components/film-strip.test.tsx",{"duration":466.9771660000001,"failed":false}],[":src/resources/albums/components/album-card.test.tsx",{"duration":293.65612699999974,"failed":false}],[":src/resources/carousel/components/card.test.tsx",{"duration":66.668365,"failed":false}]]}