sunpeak 0.13.12 → 0.14.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 CHANGED
@@ -24,8 +24,7 @@ Quickstart, build, test, and ship your Claude or ChatGPT App!
24
24
  [Demo (Video)](https://cdn.sunpeak.ai/sunpeak-demo-prod.mp4) ~
25
25
  [Discord (NEW)](https://discord.gg/FB2QNXqRnw) ~
26
26
  [Documentation](https://docs.sunpeak.ai/) ~
27
- [GitHub](https://github.com/Sunpeak-AI/sunpeak) ~
28
- [Resource Repository](https://app.sunpeak.ai/)
27
+ [GitHub](https://github.com/Sunpeak-AI/sunpeak)
29
28
 
30
29
  <div align="center">
31
30
  <a href="https://docs.sunpeak.ai/library/chatgpt-simulator">
@@ -80,22 +79,12 @@ my-app/
80
79
 
81
80
  ### The `sunpeak` CLI
82
81
 
83
- Commands for managing MCP Apps. Includes a client for the [sunpeak Resource Repository](https://app.sunpeak.ai/). The repository helps you & your CI/CD decouple your App from your client-agnostic MCP server while also providing a hosted runtime to collaborate, demo, and share your MCP Apps.
82
+ Commands for managing MCP Apps:
84
83
 
85
- Think Docker Hub for MCP Apps:
86
-
87
- <div align="center">
88
- <a href="https://docs.sunpeak.ai/library/chatgpt-simulator">
89
- <picture>
90
- <img alt="ChatGPT Resource Repository" src="https://cdn.sunpeak.ai/blog/storybook-for-chatgpt-apps.png">
91
- </picture>
92
- </a>
93
- </div>
94
-
95
- 1. Tag your app builds with version numbers and environment names (like `v1.0.0` and `prod`)
96
- 2. `sunpeak push` built Apps to a central location
97
- 3. `sunpeak pull` built Apps to be run in different environments, like your production MCP server.
98
- 4. Share your fully-functional demo Apps with teammates, prospects, and strangers!
84
+ - `sunpeak new [name] [resources]` - Create a new project
85
+ - `sunpeak dev` - Start dev server with MCP endpoint and live simulator
86
+ - `sunpeak build` - Build resources for production
87
+ - `sunpeak upgrade` - Upgrade sunpeak to latest version
99
88
 
100
89
  ## Example App
101
90
 
@@ -77,7 +77,7 @@ export async function dev(projectRoot = process.cwd(), args = []) {
77
77
  const tailwindcss = tailwindPlugin.default;
78
78
 
79
79
  // Parse port from args or use default
80
- let port = parseInt(process.env.PORT || '6767');
80
+ let port = parseInt(process.env.PORT || '3000');
81
81
  const portArgIndex = args.findIndex(arg => arg === '--port' || arg === '-p');
82
82
  if (portArgIndex !== -1 && args[portArgIndex + 1]) {
83
83
  port = parseInt(args[portArgIndex + 1]);
@@ -285,7 +285,7 @@ if (import.meta.hot) {
285
285
  name: pkg.name || 'Sunpeak',
286
286
  version: pkg.version || '0.1.0',
287
287
  simulations,
288
- port: 6766,
288
+ port: 8000,
289
289
  ...(mcpViteServer && { viteServer: mcpViteServer }),
290
290
  });
291
291
 
package/bin/sunpeak.js CHANGED
@@ -37,17 +37,7 @@ function getVersion() {
37
37
  }
38
38
 
39
39
  // Commands that don't require a package.json
40
- const standaloneCommands = [
41
- 'new',
42
- 'login',
43
- 'logout',
44
- 'push',
45
- 'pull',
46
- 'deploy',
47
- 'upgrade',
48
- 'help',
49
- undefined,
50
- ];
40
+ const standaloneCommands = ['new', 'upgrade', 'help', undefined];
51
41
 
52
42
  if (command && !standaloneCommands.includes(command)) {
53
43
  checkPackageJson();
@@ -75,41 +65,6 @@ function getVersion() {
75
65
  }
76
66
  break;
77
67
 
78
- case 'login':
79
- {
80
- const { login } = await import(join(COMMANDS_DIR, 'login.mjs'));
81
- await login();
82
- }
83
- break;
84
-
85
- case 'logout':
86
- {
87
- const { logout } = await import(join(COMMANDS_DIR, 'logout.mjs'));
88
- await logout();
89
- }
90
- break;
91
-
92
- case 'push':
93
- {
94
- const { push, parseArgs } = await import(join(COMMANDS_DIR, 'push.mjs'));
95
- await push(process.cwd(), parseArgs(args));
96
- }
97
- break;
98
-
99
- case 'pull':
100
- {
101
- const { pull, parseArgs } = await import(join(COMMANDS_DIR, 'pull.mjs'));
102
- await pull(process.cwd(), parseArgs(args));
103
- }
104
- break;
105
-
106
- case 'deploy':
107
- {
108
- const { deploy, parseArgs } = await import(join(COMMANDS_DIR, 'deploy.mjs'));
109
- await deploy(process.cwd(), parseArgs(args));
110
- }
111
- break;
112
-
113
68
  case 'upgrade':
114
69
  {
115
70
  const { upgrade } = await import(join(COMMANDS_DIR, 'upgrade.mjs'));
@@ -136,18 +91,11 @@ Usage:
136
91
  sunpeak dev Start dev server + MCP endpoint
137
92
  --no-begging Suppress GitHub star message
138
93
  sunpeak build Build resources
139
- sunpeak login Log in to Sunpeak
140
- sunpeak logout Log out of Sunpeak
141
- sunpeak push Push resources to repository
142
- sunpeak pull Pull resources from repository
143
- sunpeak deploy Push resources with "prod" tag
144
94
  sunpeak upgrade Upgrade sunpeak to latest version
145
95
  sunpeak --version Show version number
146
96
 
147
97
  Resources: ${resources.join(', ')} (comma/space separated)
148
98
  Example: sunpeak new my-app "${resources.slice(0, 2).join(',')}"
149
-
150
- For more information, visit: https://sunpeak.ai/
151
99
  `);
152
100
  }
153
101
  break;
@@ -0,0 +1 @@
1
+ export {};
@@ -14213,7 +14213,7 @@ function readResourceHtmlProd(distPath) {
14213
14213
  function getViteResourceHtml(srcPath) {
14214
14214
  const fileName = srcPath.split("/").pop()?.replace(/-resource\.tsx$/, "") ?? "";
14215
14215
  const componentName = fileName.split("-").map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join("") + "Resource";
14216
- const devServerUrl = "http://localhost:6766";
14216
+ const devServerUrl = "http://localhost:8000";
14217
14217
  const entryParams = new URLSearchParams({ src: srcPath, component: componentName });
14218
14218
  const virtualModuleUrl = `${devServerUrl}/@id/virtual:sunpeak-entry?${entryParams.toString()}`;
14219
14219
  return `<!DOCTYPE html>
@@ -14258,7 +14258,7 @@ function getResourceHtml(simulation, viteMode) {
14258
14258
  }
14259
14259
  return readResourceHtmlProd(simulation.distPath);
14260
14260
  }
14261
- const DEV_SERVER_URL = "http://localhost:6766";
14261
+ const DEV_SERVER_URL = "http://localhost:8000";
14262
14262
  const HMR_WS_URL = "ws://localhost:24678";
14263
14263
  function injectViteCSP(existingMeta) {
14264
14264
  const meta = existingMeta ?? {};
@@ -14433,8 +14433,8 @@ async function handlePostMessage(req, res, url) {
14433
14433
  }
14434
14434
  }
14435
14435
  function runMCPServer(config) {
14436
- const portEnv = Number(process.env.PORT ?? 6766);
14437
- const port = config.port ?? (Number.isFinite(portEnv) ? portEnv : 6766);
14436
+ const portEnv = Number(process.env.PORT ?? 8e3);
14437
+ const port = config.port ?? (Number.isFinite(portEnv) ? portEnv : 8e3);
14438
14438
  const { simulations } = config;
14439
14439
  const viteServer = config.viteServer;
14440
14440
  const viteMode = !!viteServer;