create-skybridge 2.0.0-alpha.ff0caf0 → 2.0.0-beta.68a71cb

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-skybridge",
3
- "version": "2.0.0-alpha.ff0caf0",
3
+ "version": "2.0.0-beta.68a71cb",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Alpic",
@@ -48,7 +48,8 @@ This command starts:
48
48
 
49
49
  ```
50
50
  ├── src/
51
- │ ├── server.ts # Server entry point
51
+ │ ├── index.ts # Entry point (starts the app)
52
+ │ ├── server.ts # App definition (tools, views)
52
53
  │ └── helpers.ts # Shared utilities
53
54
  ├── vite.config.ts
54
55
  ├── alpic.json # Deployment config
@@ -12,11 +12,12 @@
12
12
  "deploy": "alpic deploy"
13
13
  },
14
14
  "dependencies": {
15
- "skybridge": "^2.0.0-alpha.ff0caf0",
15
+ "skybridge": "^2.0.0-beta.68a71cb",
16
16
  "vite": "^8.1.5"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@skybridge/devtools": "^1.2.7",
20
+ "@skybridge/vite-plugin": "^2.0.0-beta.68a71cb",
20
21
  "@types/node": "^24.13.3",
21
22
  "alpic": "^1.155.0",
22
23
  "tsx": "^4.23.1",
@@ -0,0 +1,3 @@
1
+ import { app } from "./server.js";
2
+
3
+ export default await app.run();
@@ -1,16 +1,15 @@
1
- import { McpServer } from "skybridge/server";
1
+ import { Skybridge } from "skybridge/server";
2
2
 
3
- const server = new McpServer(
3
+ // Register tools with `server.registerTool(...)`.
4
+ // Docs: https://docs.skybridge.tech/api-reference/register-tool
5
+
6
+ export const app = new Skybridge(
4
7
  {
5
8
  name: "skybridge-blank",
6
9
  version: "0.0.1",
10
+ capabilities: {},
7
11
  },
8
- { capabilities: {} },
12
+ (server) => server,
9
13
  );
10
14
 
11
- // Register tools with `server.registerTool(...)`.
12
- // Docs: https://docs.skybridge.tech/api-reference/register-tool
13
-
14
- export default await server.run();
15
-
16
- export type AppType = typeof server;
15
+ export type AppType = typeof app;
@@ -1,4 +1,4 @@
1
- import { skybridge } from "skybridge/vite";
1
+ import { skybridge } from "@skybridge/vite-plugin";
2
2
  import { defineConfig } from "vite";
3
3
 
4
4
  export default defineConfig({
@@ -48,7 +48,8 @@ This command starts:
48
48
 
49
49
  ```
50
50
  ├── src/
51
- │ ├── server.ts # Server entry point
51
+ │ ├── index.ts # Entry point (starts the app)
52
+ │ ├── server.ts # App definition (tools, views)
52
53
  │ ├── views/ # React components (one per view)
53
54
  │ ├── components/ # Shared UI components
54
55
  │ ├── helpers.ts # Shared utilities
@@ -16,7 +16,7 @@
16
16
  "lucide-react": "^1.25.0",
17
17
  "react": "^19.2.7",
18
18
  "react-dom": "^19.2.7",
19
- "skybridge": "^2.0.0-alpha.ff0caf0",
19
+ "skybridge": "^2.0.0-beta.68a71cb",
20
20
  "sonner": "^2.0.7",
21
21
  "tw-animate-css": "^1.4.0",
22
22
  "vite": "^8.1.5",
@@ -24,6 +24,7 @@
24
24
  },
25
25
  "devDependencies": {
26
26
  "@skybridge/devtools": "^1.2.7",
27
+ "@skybridge/vite-plugin": "^2.0.0-beta.68a71cb",
27
28
  "@tailwindcss/vite": "^4.3.3",
28
29
  "@types/node": "^24.13.3",
29
30
  "@types/react": "^19.2.17",
@@ -0,0 +1,3 @@
1
+ import { app } from "./server.js";
2
+
3
+ export default await app.run();
@@ -1,94 +1,95 @@
1
- import { McpServer } from "skybridge/server";
1
+ import { Skybridge } from "skybridge/server";
2
2
  import { z } from "zod";
3
3
 
4
- const server = new McpServer(
4
+ export const app = new Skybridge(
5
5
  {
6
6
  name: "alpic-openai-app",
7
7
  version: "0.0.1",
8
+ capabilities: {},
8
9
  },
9
- { capabilities: {} },
10
- )
11
- .registerTool(
12
- {
13
- name: "start",
14
- description: "Onboard Skybridge",
15
- inputSchema: {
16
- name: z.string().optional().describe("The user name."),
17
- },
18
- annotations: {
19
- title: "Start Skybridge onboarding",
20
- readOnlyHint: true,
21
- destructiveHint: false,
22
- openWorldHint: false,
23
- },
24
- _meta: {
25
- "openai/toolInvocation/invoking": "Starting the Skybridge onboarding…",
26
- "openai/toolInvocation/invoked": "Onboarding ready.",
27
- },
28
- view: {
29
- component: "onboarding",
30
- // Replace with the URL your widget will be served from in production.
31
- domain: "https://skybridge.tech",
32
- description: "Onboarding deck",
33
- csp: {
34
- resourceDomains: [
35
- "https://fonts.googleapis.com",
36
- "https://fonts.gstatic.com",
37
- ],
38
- redirectDomains: ["https://docs.skybridge.tech"],
10
+ (server) =>
11
+ server
12
+ .registerTool(
13
+ {
14
+ name: "start",
15
+ description: "Onboard Skybridge",
16
+ inputSchema: {
17
+ name: z.string().optional().describe("The user name."),
18
+ },
19
+ annotations: {
20
+ title: "Start Skybridge onboarding",
21
+ readOnlyHint: true,
22
+ destructiveHint: false,
23
+ openWorldHint: false,
24
+ },
25
+ _meta: {
26
+ "openai/toolInvocation/invoking":
27
+ "Starting the Skybridge onboarding…",
28
+ "openai/toolInvocation/invoked": "Onboarding ready.",
29
+ },
30
+ view: {
31
+ component: "onboarding",
32
+ // Replace with the URL your widget will be served from in production.
33
+ domain: "https://skybridge.tech",
34
+ description: "Onboarding deck",
35
+ csp: {
36
+ resourceDomains: [
37
+ "https://fonts.googleapis.com",
38
+ "https://fonts.gstatic.com",
39
+ ],
40
+ redirectDomains: ["https://docs.skybridge.tech"],
41
+ },
42
+ },
39
43
  },
40
- },
41
- },
42
- async ({ name }) => {
43
- return {
44
- structuredContent: { name },
45
- content: [{ type: "text", text: `User name: ${name ?? "friend"}` }],
46
- isError: false,
47
- };
48
- },
49
- )
50
- .registerTool(
51
- {
52
- name: "get-fortune-cookie",
53
- description: "Get fortune cookie",
54
- annotations: {
55
- title: "Get a fortune cookie",
56
- readOnlyHint: true,
57
- destructiveHint: false,
58
- openWorldHint: false,
59
- },
60
- _meta: {
61
- "openai/toolInvocation/invoking": "Cracking open a fortune cookie…",
62
- "openai/toolInvocation/invoked": "Fortune revealed.",
63
- },
64
- },
65
- async () => {
66
- const predictions = [
67
- "A pleasant surprise is waiting for you.",
68
- "Your hard work will soon pay off.",
69
- "An unexpected friendship will brighten your week.",
70
- "The best is yet to come.",
71
- "A small step today leads to a giant leap tomorrow.",
72
- "Trust your instincts: they are sharper than you think.",
73
- "Adventure awaits just around the corner.",
74
- "A long-forgotten idea will return with great success.",
75
- "Kindness given today will be returned threefold.",
76
- "Something you lost will soon be found.",
77
- ];
78
- const prediction =
79
- predictions[Math.floor(Math.random() * predictions.length)];
80
-
81
- // simulate backend work
82
- await new Promise((resolve) => setTimeout(resolve, 1000));
44
+ async ({ name }) => {
45
+ return {
46
+ structuredContent: { name },
47
+ content: [{ type: "text", text: `User name: ${name ?? "friend"}` }],
48
+ isError: false,
49
+ };
50
+ },
51
+ )
52
+ .registerTool(
53
+ {
54
+ name: "get-fortune-cookie",
55
+ description: "Get fortune cookie",
56
+ annotations: {
57
+ title: "Get a fortune cookie",
58
+ readOnlyHint: true,
59
+ destructiveHint: false,
60
+ openWorldHint: false,
61
+ },
62
+ _meta: {
63
+ "openai/toolInvocation/invoking": "Cracking open a fortune cookie…",
64
+ "openai/toolInvocation/invoked": "Fortune revealed.",
65
+ },
66
+ },
67
+ async () => {
68
+ const predictions = [
69
+ "A pleasant surprise is waiting for you.",
70
+ "Your hard work will soon pay off.",
71
+ "An unexpected friendship will brighten your week.",
72
+ "The best is yet to come.",
73
+ "A small step today leads to a giant leap tomorrow.",
74
+ "Trust your instincts: they are sharper than you think.",
75
+ "Adventure awaits just around the corner.",
76
+ "A long-forgotten idea will return with great success.",
77
+ "Kindness given today will be returned threefold.",
78
+ "Something you lost will soon be found.",
79
+ ];
80
+ const prediction =
81
+ predictions[Math.floor(Math.random() * predictions.length)];
83
82
 
84
- return {
85
- structuredContent: { prediction },
86
- content: [{ type: "text", text: prediction }],
87
- isError: false,
88
- };
89
- },
90
- );
83
+ // simulate backend work
84
+ await new Promise((resolve) => setTimeout(resolve, 1000));
91
85
 
92
- export default await server.run();
86
+ return {
87
+ structuredContent: { prediction },
88
+ content: [{ type: "text", text: prediction }],
89
+ isError: false,
90
+ };
91
+ },
92
+ ),
93
+ );
93
94
 
94
- export type AppType = typeof server;
95
+ export type AppType = typeof app;
@@ -1,7 +1,7 @@
1
1
  import path from "node:path";
2
+ import { skybridge } from "@skybridge/vite-plugin";
2
3
  import tailwindcss from "@tailwindcss/vite";
3
4
  import react from "@vitejs/plugin-react";
4
- import { skybridge } from "skybridge/vite";
5
5
  import { defineConfig } from "vite";
6
6
 
7
7
  export default defineConfig({
@@ -48,7 +48,8 @@ This command starts:
48
48
 
49
49
  ```
50
50
  ├── src/
51
- │ ├── server.ts # Server entry point
51
+ │ ├── index.ts # Entry point (starts the app)
52
+ │ ├── server.ts # App definition (tools, views)
52
53
  │ └── helpers.ts # Shared utilities
53
54
  ├── vite.config.ts
54
55
  ├── alpic.json # Deployment config
@@ -16,13 +16,14 @@
16
16
  "dependencies": {
17
17
  "react": "^19.2.4",
18
18
  "react-dom": "^19.2.4",
19
- "skybridge": "^2.0.0-alpha.ff0caf0",
19
+ "skybridge": "^2.0.0-beta.68a71cb",
20
20
  "vite": "^8.1.3",
21
21
  "zod": "^4.4.3"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@ladle/react": "^5.1.1",
25
25
  "@skybridge/devtools": "^1.2.4",
26
+ "@skybridge/vite-plugin": "^2.0.0-beta.68a71cb",
26
27
  "@types/node": "^24.13.2",
27
28
  "@types/react": "^19.2.14",
28
29
  "@types/react-dom": "^19.2.3",
@@ -0,0 +1,3 @@
1
+ import { app } from "./server.js";
2
+
3
+ export default await app.run();
@@ -1,5 +1,5 @@
1
1
  import { existsSync } from "node:fs";
2
- import { McpServer } from "skybridge/server";
2
+ import { Skybridge } from "skybridge/server";
3
3
  import { CAROUSEL_RANGE, MIN_SEARCH_ITERATIONS } from "./config.js";
4
4
  import {
5
5
  renderCarouselDefinition,
@@ -15,13 +15,11 @@ if (existsSync(".env")) {
15
15
  process.loadEnvFile();
16
16
  }
17
17
 
18
- const server = new McpServer(
18
+ export const app = new Skybridge(
19
19
  {
20
20
  // @todo: name and version your app.
21
21
  name: "skybridge-ecom",
22
22
  version: "0.0.1",
23
- },
24
- {
25
23
  // @todo: adapt this server-wide prompt to your catalog.
26
24
  instructions: `\
27
25
  Two phases:
@@ -34,10 +32,10 @@ once the carousel renders.
34
32
  RENDER: After curating, call render-carousel with the chosen product IDs (aim for ${CAROUSEL_RANGE}). \
35
33
  Speak once it renders, then recommend products in carousel order.`,
36
34
  },
37
- )
38
- .registerTool(searchProductsDefinition, searchProductsHandler)
39
- .registerTool(renderCarouselDefinition, renderCarouselHandler);
40
-
41
- export default await server.run();
35
+ (server) =>
36
+ server
37
+ .registerTool(searchProductsDefinition, searchProductsHandler)
38
+ .registerTool(renderCarouselDefinition, renderCarouselHandler),
39
+ );
42
40
 
43
- export type AppType = typeof server;
41
+ export type AppType = typeof app;
@@ -1,6 +1,6 @@
1
+ import { skybridge } from "@skybridge/vite-plugin";
1
2
  import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin";
2
3
  import react from "@vitejs/plugin-react";
3
- import { skybridge } from "skybridge/vite";
4
4
  import { defineConfig, type PluginOption } from "vite";
5
5
 
6
6
  export default defineConfig({