sunpeak 0.6.6 → 0.7.9

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 (46) hide show
  1. package/README.md +3 -3
  2. package/bin/commands/build.mjs +22 -5
  3. package/bin/commands/deploy.mjs +108 -0
  4. package/bin/commands/login.mjs +217 -0
  5. package/bin/commands/logout.mjs +87 -0
  6. package/bin/commands/pull.mjs +254 -0
  7. package/bin/commands/push.mjs +347 -0
  8. package/bin/sunpeak.js +85 -2
  9. package/dist/mcp/entry.cjs +2 -2
  10. package/dist/mcp/entry.cjs.map +1 -1
  11. package/dist/mcp/entry.js +2 -2
  12. package/dist/mcp/entry.js.map +1 -1
  13. package/dist/mcp/index.cjs +1 -1
  14. package/dist/mcp/index.js +1 -1
  15. package/dist/{server-CQGbJWbk.cjs → server-BOYwNazb.cjs} +25 -26
  16. package/dist/{server-CQGbJWbk.cjs.map → server-BOYwNazb.cjs.map} +1 -1
  17. package/dist/{server-DGCvp1RA.js → server-C6vMGV6H.js} +25 -26
  18. package/dist/{server-DGCvp1RA.js.map → server-C6vMGV6H.js.map} +1 -1
  19. package/package.json +1 -1
  20. package/template/.sunpeak/dev.tsx +8 -10
  21. package/template/README.md +4 -4
  22. package/template/dist/albums.json +15 -0
  23. package/template/dist/carousel.json +15 -0
  24. package/template/dist/counter.json +10 -0
  25. package/template/dist/map.json +19 -0
  26. package/template/index.html +1 -1
  27. package/template/node_modules/.vite/deps/_metadata.json +19 -19
  28. package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
  29. package/template/src/components/map/map-view.test.tsx +146 -0
  30. package/template/src/components/map/place-card.test.tsx +76 -0
  31. package/template/src/components/map/place-carousel.test.tsx +84 -0
  32. package/template/src/components/map/place-inspector.test.tsx +91 -0
  33. package/template/src/components/map/place-list.test.tsx +97 -0
  34. package/template/src/resources/albums-resource.json +12 -0
  35. package/template/src/resources/carousel-resource.json +12 -0
  36. package/template/src/resources/counter-resource.json +9 -0
  37. package/template/src/resources/map-resource.json +13 -0
  38. package/template/src/simulations/albums-simulation.ts +3 -15
  39. package/template/src/simulations/carousel-simulation.ts +3 -15
  40. package/template/src/simulations/counter-simulation.ts +3 -15
  41. package/template/src/simulations/map-simulation.ts +5 -28
  42. package/template/src/simulations/widget-config.ts +0 -42
  43. /package/template/dist/{chatgpt/albums.js → albums.js} +0 -0
  44. /package/template/dist/{chatgpt/carousel.js → carousel.js} +0 -0
  45. /package/template/dist/{chatgpt/counter.js → counter.js} +0 -0
  46. /package/template/dist/{chatgpt/map.js → map.js} +0 -0
@@ -3,7 +3,7 @@
3
3
  * This file contains only metadata and doesn't import React components or CSS.
4
4
  */
5
5
 
6
- import { defaultWidgetMeta } from './widget-config';
6
+ import mapResourceMeta from '../resources/map-resource.json';
7
7
 
8
8
  export interface Place {
9
9
  id: string;
@@ -130,13 +130,12 @@ export const mapSimulation = {
130
130
 
131
131
  // MCP Tool protocol - official Tool type from MCP SDK used in ListTools response
132
132
  tool: {
133
- name: 'find-pizza',
134
- description: 'Find pizza restaurants nearby',
133
+ name: 'show-map',
134
+ description: 'Show the map',
135
135
  inputSchema: { type: 'object', properties: {}, additionalProperties: false } as const,
136
136
  title: 'Find Pizza',
137
137
  annotations: { readOnlyHint: true },
138
138
  _meta: {
139
- 'openai/outputTemplate': 'ui://MapResource',
140
139
  'openai/toolInvocation/invoking': 'Finding pizza places',
141
140
  'openai/toolInvocation/invoked': 'Found pizza places',
142
141
  'openai/widgetAccessible': true,
@@ -144,30 +143,8 @@ export const mapSimulation = {
144
143
  },
145
144
  },
146
145
 
147
- // MCP Resource protocol - official Resource type from MCP SDK used in ListResources response
148
- // resource.name is used as the simulation identifier
149
- // resource.title is used as the simulation display label
150
- resource: {
151
- uri: 'ui://MapResource',
152
- name: 'map',
153
- title: 'Map',
154
- description: 'Pizza restaurant finder widget',
155
- mimeType: 'text/html+skybridge',
156
- _meta: {
157
- ...defaultWidgetMeta,
158
- 'openai/widgetCSP': {
159
- ...defaultWidgetMeta['openai/widgetCSP'],
160
- connect_domains: [
161
- ...defaultWidgetMeta['openai/widgetCSP'].connect_domains,
162
- 'https://api.mapbox.com',
163
- ],
164
- resource_domains: [
165
- ...defaultWidgetMeta['openai/widgetCSP'].resource_domains,
166
- 'https://api.mapbox.com',
167
- ],
168
- },
169
- },
170
- },
146
+ // MCP Resource protocol - imported from resource meta file
147
+ resource: mapResourceMeta,
171
148
 
172
149
  // MCP CallTool protocol - data for CallTool response
173
150
  toolCall: {
@@ -1,42 +0,0 @@
1
- /**
2
- * Default widget configuration for all simulations.
3
- * Individual simulations can override these values as needed.
4
- */
5
-
6
- export interface WidgetCSP {
7
- connect_domains: string[];
8
- resource_domains: string[];
9
- }
10
-
11
- export interface WidgetMeta {
12
- 'openai/widgetDomain': string;
13
- 'openai/widgetCSP': WidgetCSP;
14
- }
15
-
16
- /**
17
- * Default widget metadata that can be spread into resource._meta
18
- *
19
- * @example
20
- * // Use default configuration
21
- * resource: {
22
- * _meta: {
23
- * ...defaultWidgetMeta,
24
- * }
25
- * }
26
- *
27
- * @example
28
- * // Override specific values
29
- * resource: {
30
- * _meta: {
31
- * ...defaultWidgetMeta,
32
- * 'openai/widgetDomain': 'https://custom.domain.com',
33
- * }
34
- * }
35
- */
36
- export const defaultWidgetMeta: WidgetMeta = {
37
- 'openai/widgetDomain': 'https://sunpeak.ai', // YOUR DOMAIN HERE.
38
- 'openai/widgetCSP': {
39
- connect_domains: ['https://sunpeak.ai'], // YOUR API HERE.
40
- resource_domains: ['https://*.oaistatic.com', 'https://images.unsplash.com'], // YOUR CDN HERE (if any).
41
- },
42
- };
File without changes
File without changes