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.
- package/README.md +3 -3
- package/bin/commands/build.mjs +22 -5
- package/bin/commands/deploy.mjs +108 -0
- package/bin/commands/login.mjs +217 -0
- package/bin/commands/logout.mjs +87 -0
- package/bin/commands/pull.mjs +254 -0
- package/bin/commands/push.mjs +347 -0
- package/bin/sunpeak.js +85 -2
- package/dist/mcp/entry.cjs +2 -2
- package/dist/mcp/entry.cjs.map +1 -1
- package/dist/mcp/entry.js +2 -2
- package/dist/mcp/entry.js.map +1 -1
- package/dist/mcp/index.cjs +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/{server-CQGbJWbk.cjs → server-BOYwNazb.cjs} +25 -26
- package/dist/{server-CQGbJWbk.cjs.map → server-BOYwNazb.cjs.map} +1 -1
- package/dist/{server-DGCvp1RA.js → server-C6vMGV6H.js} +25 -26
- package/dist/{server-DGCvp1RA.js.map → server-C6vMGV6H.js.map} +1 -1
- package/package.json +1 -1
- package/template/.sunpeak/dev.tsx +8 -10
- package/template/README.md +4 -4
- package/template/dist/albums.json +15 -0
- package/template/dist/carousel.json +15 -0
- package/template/dist/counter.json +10 -0
- package/template/dist/map.json +19 -0
- package/template/index.html +1 -1
- package/template/node_modules/.vite/deps/_metadata.json +19 -19
- package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/template/src/components/map/map-view.test.tsx +146 -0
- package/template/src/components/map/place-card.test.tsx +76 -0
- package/template/src/components/map/place-carousel.test.tsx +84 -0
- package/template/src/components/map/place-inspector.test.tsx +91 -0
- package/template/src/components/map/place-list.test.tsx +97 -0
- package/template/src/resources/albums-resource.json +12 -0
- package/template/src/resources/carousel-resource.json +12 -0
- package/template/src/resources/counter-resource.json +9 -0
- package/template/src/resources/map-resource.json +13 -0
- package/template/src/simulations/albums-simulation.ts +3 -15
- package/template/src/simulations/carousel-simulation.ts +3 -15
- package/template/src/simulations/counter-simulation.ts +3 -15
- package/template/src/simulations/map-simulation.ts +5 -28
- package/template/src/simulations/widget-config.ts +0 -42
- /package/template/dist/{chatgpt/albums.js → albums.js} +0 -0
- /package/template/dist/{chatgpt/carousel.js → carousel.js} +0 -0
- /package/template/dist/{chatgpt/counter.js → counter.js} +0 -0
- /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
|
|
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: '
|
|
134
|
-
description: '
|
|
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 -
|
|
148
|
-
|
|
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
|
|
File without changes
|
|
File without changes
|