create-skybridge 0.0.0-dev.d20f258 → 0.0.0-dev.d22f69f
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/dist/index.js +101 -28
- package/dist/index.test.js +13 -1
- package/package.json +7 -6
- package/template/.dockerignore +4 -0
- package/template/AGENTS.md +1 -0
- package/template/Dockerfile +53 -0
- package/template/README.md +38 -21
- package/template/_gitignore +2 -1
- package/template/node_modules/.bin/alpic +21 -0
- package/template/node_modules/.bin/sb +2 -2
- package/template/node_modules/.bin/skybridge +2 -2
- package/template/node_modules/.bin/tsc +2 -2
- package/template/node_modules/.bin/tsserver +2 -2
- package/template/node_modules/.bin/tsx +2 -2
- package/template/node_modules/.bin/vite +2 -2
- package/template/package.json +21 -18
- package/template/src/helpers.ts +4 -0
- package/template/src/index.css +59 -0
- package/template/src/server.ts +77 -0
- package/template/src/views/components/doc-link.tsx +22 -0
- package/template/src/views/components/doc.tsx +21 -0
- package/template/src/views/components/nav.tsx +31 -0
- package/template/src/views/components/progress.tsx +35 -0
- package/template/src/views/components/steps/outro.tsx +68 -0
- package/template/src/views/components/steps/state.tsx +47 -0
- package/template/src/views/components/steps/tool-call.tsx +53 -0
- package/template/src/views/components/steps/tool-output.tsx +40 -0
- package/template/src/views/images/mascot/beret.png +0 -0
- package/template/src/views/images/mascot/chapka.png +0 -0
- package/template/src/views/images/mascot/cowboy-hat.png +0 -0
- package/template/src/views/images/mascot/fez.png +0 -0
- package/template/src/views/images/mascot/jester-hat.png +0 -0
- package/template/src/views/images/mascot/mitre.png +0 -0
- package/template/src/views/images/mascot/non-la.png +0 -0
- package/template/src/views/images/mascot/original.png +0 -0
- package/template/src/views/images/mascot/propeller-beanie.png +0 -0
- package/template/src/views/images/mascot/ski-mask.png +0 -0
- package/template/src/views/images/mascot/sombrero.png +0 -0
- package/template/src/views/images/mascot/top-hat.png +0 -0
- package/template/src/views/images/mascot/viking-helmet.png +0 -0
- package/template/src/views/onboarding.tsx +63 -0
- package/template/src/views/use-mascot.ts +60 -0
- package/template/src/vite-manifest.d.ts +4 -0
- package/template/tsconfig.json +7 -19
- package/template/vite.config.ts +14 -0
- package/template/node_modules/.bin/mcp-inspector +0 -21
- package/template/node_modules/.bin/nodemon +0 -21
- package/template/server/src/server.ts +0 -61
- package/template/tsconfig.server.json +0 -11
- package/template/web/src/helpers.ts +0 -4
- package/template/web/src/index.css +0 -151
- package/template/web/src/widgets/magic-8-ball.tsx +0 -24
- package/template/web/vite.config.ts +0 -15
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_4be4554909ca0a790f3ece65616617d1/node_modules/@modelcontextprotocol/inspector/cli/build/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_4be4554909ca0a790f3ece65616617d1/node_modules/@modelcontextprotocol/inspector/cli/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_4be4554909ca0a790f3ece65616617d1/node_modules/@modelcontextprotocol/inspector/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_4be4554909ca0a790f3ece65616617d1/node_modules/@modelcontextprotocol/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_4be4554909ca0a790f3ece65616617d1/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_4be4554909ca0a790f3ece65616617d1/node_modules/@modelcontextprotocol/inspector/cli/build/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_4be4554909ca0a790f3ece65616617d1/node_modules/@modelcontextprotocol/inspector/cli/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_4be4554909ca0a790f3ece65616617d1/node_modules/@modelcontextprotocol/inspector/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_4be4554909ca0a790f3ece65616617d1/node_modules/@modelcontextprotocol/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_4be4554909ca0a790f3ece65616617d1/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../@modelcontextprotocol/inspector/cli/build/cli.js" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../@modelcontextprotocol/inspector/cli/build/cli.js" "$@"
|
|
21
|
-
fi
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/nodemon@3.1.11/node_modules/nodemon/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/nodemon@3.1.11/node_modules/nodemon/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/nodemon@3.1.11/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/nodemon@3.1.11/node_modules/nodemon/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/nodemon@3.1.11/node_modules/nodemon/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/nodemon@3.1.11/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../nodemon/bin/nodemon.js" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../nodemon/bin/nodemon.js" "$@"
|
|
21
|
-
fi
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { McpServer } from "skybridge/server";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
|
|
4
|
-
const Answers = [
|
|
5
|
-
"As I see it, yes",
|
|
6
|
-
"Don't count on it",
|
|
7
|
-
"It is certain",
|
|
8
|
-
"It is decidedly so",
|
|
9
|
-
"Most likely",
|
|
10
|
-
"My reply is no",
|
|
11
|
-
"My sources say no",
|
|
12
|
-
"Outlook good",
|
|
13
|
-
"Outlook not so good",
|
|
14
|
-
"Signs point to yes",
|
|
15
|
-
"Very doubtful",
|
|
16
|
-
"Without a doubt",
|
|
17
|
-
"Yes definitely",
|
|
18
|
-
"Yes",
|
|
19
|
-
"You may rely on it",
|
|
20
|
-
];
|
|
21
|
-
|
|
22
|
-
const server = new McpServer(
|
|
23
|
-
{
|
|
24
|
-
name: "alpic-openai-app",
|
|
25
|
-
version: "0.0.1",
|
|
26
|
-
},
|
|
27
|
-
{ capabilities: {} },
|
|
28
|
-
).registerWidget(
|
|
29
|
-
"magic-8-ball",
|
|
30
|
-
{
|
|
31
|
-
description: "Magic 8 Ball",
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
description: "For fortune-telling or seeking advice.",
|
|
35
|
-
inputSchema: {
|
|
36
|
-
question: z.string().describe("The user question."),
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
async ({ question }) => {
|
|
40
|
-
try {
|
|
41
|
-
// deterministic answer
|
|
42
|
-
const hash = question
|
|
43
|
-
.split("")
|
|
44
|
-
.reduce((acc, char) => acc + char.charCodeAt(0), 0);
|
|
45
|
-
const answer = Answers[hash % Answers.length];
|
|
46
|
-
return {
|
|
47
|
-
structuredContent: { answer },
|
|
48
|
-
content: [],
|
|
49
|
-
isError: false,
|
|
50
|
-
};
|
|
51
|
-
} catch (error) {
|
|
52
|
-
return {
|
|
53
|
-
content: [{ type: "text", text: `Error: ${error}` }],
|
|
54
|
-
isError: true,
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
);
|
|
59
|
-
|
|
60
|
-
export default server;
|
|
61
|
-
export type AppType = typeof server;
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@1,600&display=swap");
|
|
2
|
-
|
|
3
|
-
.container {
|
|
4
|
-
display: flex;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
align-items: center;
|
|
7
|
-
height: 100%;
|
|
8
|
-
padding: 1rem;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.ball {
|
|
12
|
-
background: radial-gradient(
|
|
13
|
-
circle at 30% 30%,
|
|
14
|
-
#454565 0%,
|
|
15
|
-
#1c1c30 40%,
|
|
16
|
-
#0a0a10 100%
|
|
17
|
-
);
|
|
18
|
-
border-radius: 50%;
|
|
19
|
-
width: 12rem;
|
|
20
|
-
height: 12rem;
|
|
21
|
-
display: flex;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
align-items: center;
|
|
24
|
-
justify-content: center;
|
|
25
|
-
font-family: monospace;
|
|
26
|
-
text-align: center;
|
|
27
|
-
position: relative;
|
|
28
|
-
box-shadow:
|
|
29
|
-
0 10px 30px rgba(0, 0, 0, 0.5),
|
|
30
|
-
0 5px 15px rgba(0, 0, 0, 0.3),
|
|
31
|
-
inset 0 -20px 40px rgba(0, 0, 0, 0.6);
|
|
32
|
-
animation:
|
|
33
|
-
float 3s ease-in-out infinite,
|
|
34
|
-
colorShift 15s ease-in-out infinite;
|
|
35
|
-
transition: transform 0.3s ease;
|
|
36
|
-
cursor: pointer;
|
|
37
|
-
border: 1px solid rgba(30, 30, 50, 0.6);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.ball:hover {
|
|
41
|
-
transform: scale(1.05) translateY(-8px);
|
|
42
|
-
animation: colorShift 15s ease-in-out infinite;
|
|
43
|
-
box-shadow:
|
|
44
|
-
0 20px 50px rgba(0, 0, 0, 0.6),
|
|
45
|
-
0 10px 25px rgba(0, 0, 0, 0.4),
|
|
46
|
-
inset 0 -20px 40px rgba(0, 0, 0, 0.6);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
@keyframes float {
|
|
50
|
-
0%,
|
|
51
|
-
100% {
|
|
52
|
-
transform: translateY(0);
|
|
53
|
-
}
|
|
54
|
-
50% {
|
|
55
|
-
transform: translateY(-8px);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
@keyframes colorShift {
|
|
60
|
-
0%,
|
|
61
|
-
100% {
|
|
62
|
-
background: radial-gradient(
|
|
63
|
-
circle at 30% 30%,
|
|
64
|
-
#454565 0%,
|
|
65
|
-
#1c1c30 40%,
|
|
66
|
-
#0a0a10 100%
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
25% {
|
|
70
|
-
background: radial-gradient(
|
|
71
|
-
circle at 30% 30%,
|
|
72
|
-
#3f4a65 0%,
|
|
73
|
-
#181e30 40%,
|
|
74
|
-
#090a10 100%
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
50% {
|
|
78
|
-
background: radial-gradient(
|
|
79
|
-
circle at 30% 30%,
|
|
80
|
-
#3a5065 0%,
|
|
81
|
-
#152230 40%,
|
|
82
|
-
#080a10 100%
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
75% {
|
|
86
|
-
background: radial-gradient(
|
|
87
|
-
circle at 30% 30%,
|
|
88
|
-
#3f4a65 0%,
|
|
89
|
-
#181e30 40%,
|
|
90
|
-
#090a10 100%
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.ball::before {
|
|
96
|
-
content: "";
|
|
97
|
-
position: absolute;
|
|
98
|
-
top: 8%;
|
|
99
|
-
left: 20%;
|
|
100
|
-
width: 30%;
|
|
101
|
-
height: 20%;
|
|
102
|
-
background: radial-gradient(
|
|
103
|
-
ellipse,
|
|
104
|
-
rgba(255, 255, 255, 0.3) 0%,
|
|
105
|
-
transparent 70%
|
|
106
|
-
);
|
|
107
|
-
border-radius: 50%;
|
|
108
|
-
pointer-events: none;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.ball::after {
|
|
112
|
-
content: "";
|
|
113
|
-
position: absolute;
|
|
114
|
-
bottom: 8%;
|
|
115
|
-
right: 25%;
|
|
116
|
-
width: 25%;
|
|
117
|
-
height: 10%;
|
|
118
|
-
background: radial-gradient(
|
|
119
|
-
ellipse,
|
|
120
|
-
rgba(255, 255, 255, 0.1) 0%,
|
|
121
|
-
transparent 70%
|
|
122
|
-
);
|
|
123
|
-
border-radius: 50%;
|
|
124
|
-
pointer-events: none;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.question {
|
|
128
|
-
font-size: clamp(0.5rem, 2vw, 0.75rem);
|
|
129
|
-
color: lightgrey;
|
|
130
|
-
max-width: 90%;
|
|
131
|
-
word-wrap: break-word;
|
|
132
|
-
overflow-wrap: break-word;
|
|
133
|
-
text-align: center;
|
|
134
|
-
line-height: 1.3;
|
|
135
|
-
font-style: italic;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.answer {
|
|
139
|
-
font-family: "Playfair Display", serif;
|
|
140
|
-
font-style: italic;
|
|
141
|
-
font-size: 1.25rem;
|
|
142
|
-
font-weight: 600;
|
|
143
|
-
margin-top: 0.5rem;
|
|
144
|
-
color: #7dd3fc;
|
|
145
|
-
text-shadow: 0 0 10px rgba(125, 211, 252, 0.5);
|
|
146
|
-
max-width: 90%;
|
|
147
|
-
word-wrap: break-word;
|
|
148
|
-
overflow-wrap: break-word;
|
|
149
|
-
text-align: center;
|
|
150
|
-
line-height: 1.3;
|
|
151
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import "@/index.css";
|
|
2
|
-
|
|
3
|
-
import { mountWidget } from "skybridge/web";
|
|
4
|
-
import { useToolInfo } from "../helpers";
|
|
5
|
-
|
|
6
|
-
function Magic8Ball() {
|
|
7
|
-
const { input, output } = useToolInfo<"magic-8-ball">();
|
|
8
|
-
if (!output) {
|
|
9
|
-
return <div>Shaking...</div>;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
return (
|
|
13
|
-
<div className="container">
|
|
14
|
-
<div className="ball">
|
|
15
|
-
<div className="question">{input.question}</div>
|
|
16
|
-
<div className="answer">{output.answer}</div>
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export default Magic8Ball;
|
|
23
|
-
|
|
24
|
-
mountWidget(<Magic8Ball />);
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import react from "@vitejs/plugin-react";
|
|
3
|
-
import { skybridge } from "skybridge/web";
|
|
4
|
-
import { defineConfig, type PluginOption } from "vite";
|
|
5
|
-
|
|
6
|
-
// https://vite.dev/config/
|
|
7
|
-
export default defineConfig({
|
|
8
|
-
plugins: [skybridge() as PluginOption, react()],
|
|
9
|
-
root: __dirname,
|
|
10
|
-
resolve: {
|
|
11
|
-
alias: {
|
|
12
|
-
"@": path.resolve(__dirname, "./src"),
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
});
|