sunpeak 0.7.11 → 0.8.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.
- package/README.md +2 -1
- package/bin/commands/deploy.mjs +18 -8
- package/bin/commands/login.mjs +73 -55
- package/bin/commands/logout.mjs +26 -12
- package/bin/commands/pull.mjs +60 -39
- package/bin/commands/push.mjs +73 -49
- package/bin/commands/upgrade.mjs +203 -0
- package/bin/sunpeak.js +62 -31
- package/dist/chatgpt/chatgpt-simulator.d.ts +2 -1
- package/dist/index.cjs +9 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -12
- package/dist/index.js.map +1 -1
- package/dist/mcp/entry.cjs +41 -9
- package/dist/mcp/entry.cjs.map +1 -1
- package/dist/mcp/entry.js +42 -10
- 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-CziiHU7V.cjs → server-B9YgCQdS.cjs} +3 -2
- package/dist/{server-CziiHU7V.cjs.map → server-B9YgCQdS.cjs.map} +1 -1
- package/dist/{server-D8kyzuiq.js → server-DVmTC-SF.js} +3 -2
- package/dist/{server-D8kyzuiq.js.map → server-DVmTC-SF.js.map} +1 -1
- package/dist/types/simulation.d.ts +1 -1
- package/package.json +1 -1
- package/template/.sunpeak/dev.tsx +78 -15
- package/template/.sunpeak/vite-env.d.ts +1 -0
- package/template/README.md +6 -6
- package/template/dist/albums.json +1 -1
- package/template/dist/carousel.json +1 -1
- package/template/dist/counter.json +1 -1
- package/template/dist/map.json +1 -1
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Button.js +3 -3
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_SegmentedControl.js +1 -1
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Select.js +16 -16
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Textarea.js +3 -3
- package/template/node_modules/.vite/deps/_metadata.json +32 -32
- package/template/node_modules/.vite/deps/{chunk-N6DVYEXK.js → chunk-SPYXUHEY.js} +8 -8
- package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/template/src/components/map/map-view.test.tsx +1 -1
- package/template/src/components/map/map-view.tsx +1 -1
- package/template/src/components/map/map.tsx +1 -1
- package/template/src/components/map/place-card.test.tsx +1 -1
- package/template/src/components/map/place-card.tsx +1 -1
- package/template/src/components/map/place-carousel.test.tsx +1 -1
- package/template/src/components/map/place-carousel.tsx +1 -1
- package/template/src/components/map/place-inspector.test.tsx +1 -1
- package/template/src/components/map/place-inspector.tsx +1 -1
- package/template/src/components/map/place-list.test.tsx +1 -1
- package/template/src/components/map/place-list.tsx +1 -1
- package/template/src/components/map/types.ts +18 -0
- package/template/src/resources/index.ts +39 -4
- package/template/src/simulations/albums-show-simulation.json +131 -0
- package/template/src/simulations/carousel-show-simulation.json +68 -0
- package/template/src/simulations/counter-show-simulation.json +20 -0
- package/template/src/simulations/index.ts +17 -12
- package/template/src/simulations/map-show-simulation.json +123 -0
- package/template/src/vite-env.d.ts +1 -0
- package/template/tsconfig.json +1 -1
- package/template/src/simulations/albums-simulation.ts +0 -147
- package/template/src/simulations/carousel-simulation.ts +0 -84
- package/template/src/simulations/counter-simulation.ts +0 -34
- package/template/src/simulations/map-simulation.ts +0 -154
- /package/template/node_modules/.vite/deps/{chunk-N6DVYEXK.js.map → chunk-SPYXUHEY.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { render, screen, fireEvent } from '@testing-library/react';
|
|
2
2
|
import { describe, it, expect, vi } from 'vitest';
|
|
3
3
|
import { PlaceList } from './place-list';
|
|
4
|
-
import type { Place } from '
|
|
4
|
+
import type { Place } from './types';
|
|
5
5
|
|
|
6
6
|
describe('PlaceList', () => {
|
|
7
7
|
const mockPlaces: Place[] = [
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { Settings } from '@openai/apps-sdk-ui/components/Icon';
|
|
3
3
|
import { cn } from '../../lib/index';
|
|
4
4
|
import { PlaceCard } from './place-card';
|
|
5
|
-
import type { Place } from '
|
|
5
|
+
import type { Place } from './types';
|
|
6
6
|
|
|
7
7
|
export type PlaceListProps = {
|
|
8
8
|
places: Place[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for map components
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export interface Place {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
coords: [number, number];
|
|
9
|
+
description: string;
|
|
10
|
+
city: string;
|
|
11
|
+
rating: number;
|
|
12
|
+
price: string;
|
|
13
|
+
thumbnail: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface MapData extends Record<string, unknown> {
|
|
17
|
+
places: Place[];
|
|
18
|
+
}
|
|
@@ -1,4 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Auto-discovers and re-exports all resource components.
|
|
3
|
+
*
|
|
4
|
+
* Discovers all *-resource.tsx files and exports their component
|
|
5
|
+
* with a PascalCase name (e.g., counter-resource.tsx -> CounterResource).
|
|
6
|
+
*
|
|
7
|
+
* Supports both export styles:
|
|
8
|
+
* - Default export: export default MyComponent
|
|
9
|
+
* - Named export: export const CounterResource = ...
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
// Auto-discover all resource component files
|
|
13
|
+
const resourceModules = import.meta.glob('./*-resource.tsx', { eager: true });
|
|
14
|
+
|
|
15
|
+
// Build exports object from discovered files
|
|
16
|
+
const resources: Record<string, React.ComponentType> = {};
|
|
17
|
+
|
|
18
|
+
for (const [path, module] of Object.entries(resourceModules)) {
|
|
19
|
+
// Extract key from path: './counter-resource.tsx' -> 'counter'
|
|
20
|
+
const match = path.match(/\.\/(.+)-resource\.tsx$/);
|
|
21
|
+
const key = match?.[1];
|
|
22
|
+
if (!key) continue;
|
|
23
|
+
|
|
24
|
+
// Convert to PascalCase and append 'Resource': 'counter' -> 'CounterResource'
|
|
25
|
+
const pascalKey = key.charAt(0).toUpperCase() + key.slice(1);
|
|
26
|
+
const exportName = `${pascalKey}Resource`;
|
|
27
|
+
|
|
28
|
+
const mod = module as Record<string, unknown>;
|
|
29
|
+
|
|
30
|
+
// Try default export first, then named export matching the expected name
|
|
31
|
+
const component = mod.default ?? mod[exportName];
|
|
32
|
+
|
|
33
|
+
// Accept functions (regular components) or objects (forwardRef/memo components)
|
|
34
|
+
if (component && (typeof component === 'function' || typeof component === 'object')) {
|
|
35
|
+
resources[exportName] = component as React.ComponentType;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export default resources;
|
|
@@ -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
|
+
"toolCall": {
|
|
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
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"userMessage": "Show me popular places to visit in Austin Texas",
|
|
3
|
+
"tool": {
|
|
4
|
+
"name": "show-carousel",
|
|
5
|
+
"description": "Show popular places to visit",
|
|
6
|
+
"inputSchema": { "type": "object", "properties": {}, "additionalProperties": false },
|
|
7
|
+
"title": "Show Carousel",
|
|
8
|
+
"annotations": { "readOnlyHint": true },
|
|
9
|
+
"_meta": {
|
|
10
|
+
"openai/toolInvocation/invoking": "Loading carousel",
|
|
11
|
+
"openai/toolInvocation/invoked": "Carousel loaded",
|
|
12
|
+
"openai/widgetAccessible": true,
|
|
13
|
+
"openai/resultCanProduceWidget": true
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"toolCall": {
|
|
17
|
+
"structuredContent": {
|
|
18
|
+
"places": [
|
|
19
|
+
{
|
|
20
|
+
"id": "1",
|
|
21
|
+
"name": "Lady Bird Lake",
|
|
22
|
+
"rating": 4.5,
|
|
23
|
+
"category": "Waterfront",
|
|
24
|
+
"location": "Austin",
|
|
25
|
+
"image": "https://images.unsplash.com/photo-1520950237264-dfe336995c34?w=400&h=400&fit=crop",
|
|
26
|
+
"description": "Scenic lake perfect for kayaking, paddleboarding, and trails."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "2",
|
|
30
|
+
"name": "Texas State Capitol",
|
|
31
|
+
"rating": 4.8,
|
|
32
|
+
"category": "Historic Site",
|
|
33
|
+
"location": "Austin",
|
|
34
|
+
"image": "https://images.unsplash.com/photo-1664231978322-4d0b45c7027b?w=400&h=400&fit=crop",
|
|
35
|
+
"description": "Stunning capitol building with free tours and beautiful grounds."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "3",
|
|
39
|
+
"name": "The Paramount Theatre",
|
|
40
|
+
"rating": 4.7,
|
|
41
|
+
"category": "Architecture",
|
|
42
|
+
"location": "Austin",
|
|
43
|
+
"image": "https://images.unsplash.com/photo-1583097090970-4d3b940ea1a0?w=400&h=400&fit=crop",
|
|
44
|
+
"description": "Century-old performance and movie theatre in the heart of downtown Austin."
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"id": "4",
|
|
48
|
+
"name": "Zilker Park",
|
|
49
|
+
"rating": 4.7,
|
|
50
|
+
"category": "Park",
|
|
51
|
+
"location": "Austin",
|
|
52
|
+
"image": "https://images.unsplash.com/photo-1563828568124-f800803ba13c?w=400&h=400&fit=crop",
|
|
53
|
+
"description": "Popular park with trails, sports fields, and Barton Springs Pool."
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"id": "5",
|
|
57
|
+
"name": "South Congress Avenue",
|
|
58
|
+
"rating": 4.6,
|
|
59
|
+
"category": "Landmark",
|
|
60
|
+
"location": "Austin",
|
|
61
|
+
"image": "https://images.unsplash.com/photo-1588993608283-7f0eda4438be?w=400&h=400&fit=crop",
|
|
62
|
+
"description": "Vibrant street with unique shops, restaurants, and live music."
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
"_meta": {}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"userMessage": "Help me count something",
|
|
3
|
+
"tool": {
|
|
4
|
+
"name": "show-counter",
|
|
5
|
+
"description": "Show a simple counter tool",
|
|
6
|
+
"inputSchema": { "type": "object", "properties": {}, "additionalProperties": false },
|
|
7
|
+
"title": "Show Counter",
|
|
8
|
+
"annotations": { "readOnlyHint": true },
|
|
9
|
+
"_meta": {
|
|
10
|
+
"openai/toolInvocation/invoking": "Counting beans",
|
|
11
|
+
"openai/toolInvocation/invoked": "Beans counted",
|
|
12
|
+
"openai/widgetAccessible": true,
|
|
13
|
+
"openai/resultCanProduceWidget": true
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"toolCall": {
|
|
17
|
+
"structuredContent": null,
|
|
18
|
+
"_meta": {}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Server-safe simulation configurations
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Auto-discovers all *-simulation.json files in this directory.
|
|
5
|
+
* File naming: {resource}-{tool}-simulation.json (e.g., albums-show-simulation.json)
|
|
6
|
+
*
|
|
7
|
+
* This file can be safely imported in Node.js contexts (like MCP servers)
|
|
8
|
+
* without causing issues with CSS imports or React components.
|
|
6
9
|
*/
|
|
7
10
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import { carouselSimulation } from './carousel-simulation.js';
|
|
11
|
-
import { mapSimulation } from './map-simulation.js';
|
|
11
|
+
// Auto-discover all simulation JSON files
|
|
12
|
+
const simulationModules = import.meta.glob('./*-simulation.json', { eager: true });
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
// Build SIMULATIONS object from discovered files
|
|
15
|
+
// Key is the full name without -simulation.json suffix (e.g., 'albums-show')
|
|
16
|
+
export const SIMULATIONS = Object.fromEntries(
|
|
17
|
+
Object.entries(simulationModules).map(([path, module]) => {
|
|
18
|
+
// Extract simulation key from path: './albums-show-simulation.json' -> 'albums-show'
|
|
19
|
+
const match = path.match(/\.\/(.+)-simulation\.json$/);
|
|
20
|
+
const key = match?.[1] ?? path;
|
|
21
|
+
return [key, (module as { default: unknown }).default];
|
|
22
|
+
})
|
|
23
|
+
) as Record<string, unknown>;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
{
|
|
2
|
+
"userMessage": "Find pizza near me",
|
|
3
|
+
"tool": {
|
|
4
|
+
"name": "show-map",
|
|
5
|
+
"description": "Show the map",
|
|
6
|
+
"inputSchema": { "type": "object", "properties": {}, "additionalProperties": false },
|
|
7
|
+
"title": "Show Map",
|
|
8
|
+
"annotations": { "readOnlyHint": true },
|
|
9
|
+
"_meta": {
|
|
10
|
+
"openai/toolInvocation/invoking": "Finding pizza places",
|
|
11
|
+
"openai/toolInvocation/invoked": "Found pizza places",
|
|
12
|
+
"openai/widgetAccessible": true,
|
|
13
|
+
"openai/resultCanProduceWidget": true
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"toolCall": {
|
|
17
|
+
"structuredContent": {
|
|
18
|
+
"places": [
|
|
19
|
+
{
|
|
20
|
+
"id": "nova-slice-lab",
|
|
21
|
+
"name": "Nova Slice Lab",
|
|
22
|
+
"coords": [-122.4098, 37.8001],
|
|
23
|
+
"description": "Award-winning Neapolitan pies in North Beach.",
|
|
24
|
+
"city": "North Beach",
|
|
25
|
+
"rating": 4.8,
|
|
26
|
+
"price": "$$$",
|
|
27
|
+
"thumbnail": "https://persistent.oaistatic.com/pizzaz/pizzaz-1.png"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "midnight-marinara",
|
|
31
|
+
"name": "Midnight Marinara",
|
|
32
|
+
"coords": [-122.4093, 37.799],
|
|
33
|
+
"description": "Focaccia-style squares, late-night favorite.",
|
|
34
|
+
"city": "North Beach",
|
|
35
|
+
"rating": 4.6,
|
|
36
|
+
"price": "$",
|
|
37
|
+
"thumbnail": "https://persistent.oaistatic.com/pizzaz/pizzaz-2.png"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"id": "cinder-oven-co",
|
|
41
|
+
"name": "Cinder Oven Co.",
|
|
42
|
+
"coords": [-122.4255, 37.7613],
|
|
43
|
+
"description": "Thin-crust classics on 18th Street.",
|
|
44
|
+
"city": "Mission",
|
|
45
|
+
"rating": 4.5,
|
|
46
|
+
"price": "$$",
|
|
47
|
+
"thumbnail": "https://persistent.oaistatic.com/pizzaz/pizzaz-3.png"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"id": "neon-crust-works",
|
|
51
|
+
"name": "Neon Crust Works",
|
|
52
|
+
"coords": [-122.4388, 37.7775],
|
|
53
|
+
"description": "Deep-dish and cornmeal crust favorites.",
|
|
54
|
+
"city": "Alamo Square",
|
|
55
|
+
"rating": 4.5,
|
|
56
|
+
"price": "$$",
|
|
57
|
+
"thumbnail": "https://persistent.oaistatic.com/pizzaz/pizzaz-6.png"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"id": "luna-pie-collective",
|
|
61
|
+
"name": "Luna Pie Collective",
|
|
62
|
+
"coords": [-122.4077, 37.799],
|
|
63
|
+
"description": "Wood-fired pies and burrata in North Beach.",
|
|
64
|
+
"city": "North Beach",
|
|
65
|
+
"rating": 4.6,
|
|
66
|
+
"price": "$$",
|
|
67
|
+
"thumbnail": "https://persistent.oaistatic.com/pizzaz/pizzaz-4.png"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"id": "bricklight-deep-dish",
|
|
71
|
+
"name": "Bricklight Deep Dish",
|
|
72
|
+
"coords": [-122.4097, 37.7992],
|
|
73
|
+
"description": "Chicago-style pies from Tony Gemignani.",
|
|
74
|
+
"city": "North Beach",
|
|
75
|
+
"rating": 4.4,
|
|
76
|
+
"price": "$$$",
|
|
77
|
+
"thumbnail": "https://persistent.oaistatic.com/pizzaz/pizzaz-5.png"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"id": "garden-ember-pies",
|
|
81
|
+
"name": "Garden Ember Pies",
|
|
82
|
+
"coords": [-122.438, 37.7722],
|
|
83
|
+
"description": "Neighborhood spot with seasonal toppings.",
|
|
84
|
+
"city": "Lower Haight",
|
|
85
|
+
"rating": 4.4,
|
|
86
|
+
"price": "$$",
|
|
87
|
+
"thumbnail": "https://persistent.oaistatic.com/pizzaz/pizzaz-1.png"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"id": "atlas-fire-pizzeria",
|
|
91
|
+
"name": "Atlas Fire Pizzeria",
|
|
92
|
+
"coords": [-122.4123, 37.7899],
|
|
93
|
+
"description": "Sourdough, wood-fired pies near Nob Hill.",
|
|
94
|
+
"city": "Nob Hill",
|
|
95
|
+
"rating": 4.6,
|
|
96
|
+
"price": "$$$",
|
|
97
|
+
"thumbnail": "https://persistent.oaistatic.com/pizzaz/pizzaz-2.png"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"id": "circuit-slice-garage",
|
|
101
|
+
"name": "Circuit Slice Garage",
|
|
102
|
+
"coords": [-122.4135, 37.7805],
|
|
103
|
+
"description": "Crispy-edged Detroit-style in SoMa.",
|
|
104
|
+
"city": "SoMa",
|
|
105
|
+
"rating": 4.5,
|
|
106
|
+
"price": "$$",
|
|
107
|
+
"thumbnail": "https://persistent.oaistatic.com/pizzaz/pizzaz-3.png"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"id": "velvet-mozza-lounge",
|
|
111
|
+
"name": "Velvet Mozza Lounge",
|
|
112
|
+
"coords": [-122.4019, 37.7818],
|
|
113
|
+
"description": "Bianca pies and cocktails near Yerba Buena.",
|
|
114
|
+
"city": "Yerba Buena",
|
|
115
|
+
"rating": 4.3,
|
|
116
|
+
"price": "$$",
|
|
117
|
+
"thumbnail": "https://persistent.oaistatic.com/pizzaz/pizzaz-6.png"
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
"_meta": {}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
package/template/tsconfig.json
CHANGED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Server-safe configuration for the albums simulation.
|
|
3
|
-
* This file contains only metadata and doesn't import React components or CSS.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import albumsResourceMeta from '../resources/albums-resource.json';
|
|
7
|
-
|
|
8
|
-
const albumsData = {
|
|
9
|
-
albums: [
|
|
10
|
-
{
|
|
11
|
-
id: 'summer-escape',
|
|
12
|
-
title: 'Summer Slice',
|
|
13
|
-
cover: 'https://persistent.oaistatic.com/pizzaz/pizzaz-1.png',
|
|
14
|
-
photos: [
|
|
15
|
-
{
|
|
16
|
-
id: 's1',
|
|
17
|
-
title: 'Waves',
|
|
18
|
-
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-2.png',
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
id: 's2',
|
|
22
|
-
title: 'Palm trees',
|
|
23
|
-
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-3.png',
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
id: 's3',
|
|
27
|
-
title: 'Sunset',
|
|
28
|
-
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-6.png',
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
id: 'city-lights',
|
|
34
|
-
title: 'Pepperoni Nights',
|
|
35
|
-
cover: 'https://persistent.oaistatic.com/pizzaz/pizzaz-4.png',
|
|
36
|
-
photos: [
|
|
37
|
-
{
|
|
38
|
-
id: 'c1',
|
|
39
|
-
title: 'Downtown',
|
|
40
|
-
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-5.png',
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
id: 'c2',
|
|
44
|
-
title: 'Neon',
|
|
45
|
-
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-1.png',
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
id: 'c3',
|
|
49
|
-
title: 'Streets',
|
|
50
|
-
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-2.png',
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
id: 'into-the-woods',
|
|
56
|
-
title: 'Truffle Forest',
|
|
57
|
-
cover: 'https://persistent.oaistatic.com/pizzaz/pizzaz-3.png',
|
|
58
|
-
photos: [
|
|
59
|
-
{
|
|
60
|
-
id: 'n1',
|
|
61
|
-
title: 'Forest path',
|
|
62
|
-
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-6.png',
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
id: 'n2',
|
|
66
|
-
title: 'Misty',
|
|
67
|
-
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-4.png',
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
id: 'n3',
|
|
71
|
-
title: 'Waterfall',
|
|
72
|
-
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-5.png',
|
|
73
|
-
},
|
|
74
|
-
],
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
id: 'pizza-tour',
|
|
78
|
-
title: 'Pizza tour',
|
|
79
|
-
cover: 'https://persistent.oaistatic.com/pizzaz/pizzaz-1.png',
|
|
80
|
-
photos: [
|
|
81
|
-
{
|
|
82
|
-
id: 'tonys-pizza-napoletana',
|
|
83
|
-
title: "Tony's Pizza Napoletana",
|
|
84
|
-
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-2.png',
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
id: 'golden-boy-pizza',
|
|
88
|
-
title: 'Golden Boy Pizza',
|
|
89
|
-
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-3.png',
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
id: 'pizzeria-delfina-mission',
|
|
93
|
-
title: 'Pizzeria Delfina (Mission)',
|
|
94
|
-
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-6.png',
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
id: 'ragazza',
|
|
98
|
-
title: 'Ragazza',
|
|
99
|
-
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-4.png',
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
id: 'del-popolo',
|
|
103
|
-
title: 'Del Popolo',
|
|
104
|
-
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-5.png',
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
id: 'square-pie-guys',
|
|
108
|
-
title: 'Square Pie Guys',
|
|
109
|
-
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-1.png',
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
id: 'zero-zero',
|
|
113
|
-
title: 'Zero Zero',
|
|
114
|
-
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-2.png',
|
|
115
|
-
},
|
|
116
|
-
],
|
|
117
|
-
},
|
|
118
|
-
],
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
export const albumsSimulation = {
|
|
122
|
-
userMessage: 'Pizza time',
|
|
123
|
-
|
|
124
|
-
// MCP Tool protocol - official Tool type from MCP SDK used in ListTools response
|
|
125
|
-
tool: {
|
|
126
|
-
name: 'show-albums',
|
|
127
|
-
description: 'Show photo albums',
|
|
128
|
-
inputSchema: { type: 'object', properties: {}, additionalProperties: false } as const,
|
|
129
|
-
title: 'Show Albums',
|
|
130
|
-
annotations: { readOnlyHint: true },
|
|
131
|
-
_meta: {
|
|
132
|
-
'openai/toolInvocation/invoking': 'Loading albums',
|
|
133
|
-
'openai/toolInvocation/invoked': 'Album loaded',
|
|
134
|
-
'openai/widgetAccessible': true,
|
|
135
|
-
'openai/resultCanProduceWidget': true,
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
|
|
139
|
-
// MCP Resource protocol - imported from resource meta file
|
|
140
|
-
resource: albumsResourceMeta,
|
|
141
|
-
|
|
142
|
-
// MCP CallTool protocol - data for CallTool response
|
|
143
|
-
toolCall: {
|
|
144
|
-
structuredContent: albumsData,
|
|
145
|
-
_meta: {},
|
|
146
|
-
},
|
|
147
|
-
} as const;
|