create-skybridge 0.0.0-dev.b0a1d24 → 0.0.0-dev.b10f764
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 -64
- package/dist/index.test.js +11 -1
- package/package.json +8 -7
- package/template/AGENTS.md +1 -0
- package/template/README.md +39 -19
- package/template/_gitignore +5 -0
- package/template/alpic.json +1 -2
- package/template/node_modules/.bin/alpic +21 -0
- package/template/node_modules/.bin/sb +21 -0
- package/template/node_modules/.bin/skybridge +21 -0
- 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 +17 -25
- package/template/server/src/index.ts +62 -39
- package/template/tsconfig.json +9 -19
- package/template/web/src/helpers.ts +1 -1
- package/template/web/src/index.css +127 -6
- package/template/web/src/widgets/magic-8-ball.tsx +9 -6
- package/template/web/vite.config.ts +2 -2
- package/template/node_modules/.bin/mcp-inspector +0 -21
- package/template/node_modules/.bin/nodemon +0 -21
- package/template/node_modules/.bin/shx +0 -21
- package/template/nodemon.json +0 -5
- package/template/server/src/middleware.ts +0 -54
- package/template/server/src/server.ts +0 -61
- package/template/tsconfig.server.json +0 -11
- package/template-ecom/README.md +0 -86
- package/template-ecom/alpic.json +0 -4
- package/template-ecom/nodemon.json +0 -5
- package/template-ecom/package.json +0 -40
- package/template-ecom/server/src/index.ts +0 -39
- package/template-ecom/server/src/middleware.ts +0 -54
- package/template-ecom/server/src/server.ts +0 -73
- package/template-ecom/tsconfig.json +0 -23
- package/template-ecom/tsconfig.server.json +0 -11
- package/template-ecom/web/src/helpers.ts +0 -4
- package/template-ecom/web/src/index.css +0 -178
- package/template-ecom/web/src/widgets/ecom-carousel.tsx +0 -109
- package/template-ecom/web/vite.config.ts +0 -15
package/dist/index.js
CHANGED
|
@@ -3,12 +3,9 @@ import fs from "node:fs";
|
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
import * as prompts from "@clack/prompts";
|
|
6
|
+
import { downloadTemplate } from "giget";
|
|
6
7
|
import mri from "mri";
|
|
7
8
|
const defaultProjectName = "skybridge-project";
|
|
8
|
-
const templates = [
|
|
9
|
-
{ value: "default", label: "a minimal implementation" },
|
|
10
|
-
{ value: "ecom", label: "a functional ecommerce carousel" },
|
|
11
|
-
];
|
|
12
9
|
// prettier-ignore
|
|
13
10
|
const helpMessage = `\
|
|
14
11
|
Usage: create-skybridge [OPTION]... [DIRECTORY]
|
|
@@ -17,28 +14,32 @@ Create a new Skybridge project by copying the starter template.
|
|
|
17
14
|
|
|
18
15
|
Options:
|
|
19
16
|
-h, --help show this help message
|
|
17
|
+
--repo <uri> use a git repository instead of the built-in template
|
|
20
18
|
--overwrite remove existing files in target directory
|
|
21
19
|
--immediate install dependencies and start development server
|
|
22
|
-
--template <template> use a specific template
|
|
23
20
|
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
Repository URI formats:
|
|
22
|
+
github:user/repo
|
|
23
|
+
gitlab:user/repo/subdirectory
|
|
24
|
+
bitbucket:user/repo#branch
|
|
26
25
|
|
|
27
26
|
Examples:
|
|
28
27
|
create-skybridge my-app
|
|
28
|
+
create-skybridge my-app --repo github:alpic-ai/skybridge/examples/ecom-carousel
|
|
29
29
|
create-skybridge . --overwrite --immediate
|
|
30
30
|
`;
|
|
31
31
|
export async function init(args = process.argv.slice(2)) {
|
|
32
32
|
const argv = mri(args, {
|
|
33
33
|
boolean: ["help", "overwrite", "immediate"],
|
|
34
|
-
|
|
34
|
+
string: ["repo"],
|
|
35
|
+
alias: { h: "help" },
|
|
35
36
|
});
|
|
36
37
|
const argTargetDir = argv._[0]
|
|
37
38
|
? sanitizeTargetDir(String(argv._[0]))
|
|
38
39
|
: undefined;
|
|
40
|
+
const argRepo = argv.repo;
|
|
39
41
|
const argOverwrite = argv.overwrite;
|
|
40
42
|
const argImmediate = argv.immediate;
|
|
41
|
-
const argTemplate = argv.template;
|
|
42
43
|
const help = argv.help;
|
|
43
44
|
if (help) {
|
|
44
45
|
console.log(helpMessage);
|
|
@@ -55,7 +56,7 @@ export async function init(args = process.argv.slice(2)) {
|
|
|
55
56
|
defaultValue: defaultProjectName,
|
|
56
57
|
placeholder: defaultProjectName,
|
|
57
58
|
validate: (value) => {
|
|
58
|
-
return value
|
|
59
|
+
return !value || sanitizeTargetDir(value).length > 0
|
|
59
60
|
? undefined
|
|
60
61
|
: "Invalid project name";
|
|
61
62
|
},
|
|
@@ -69,31 +70,7 @@ export async function init(args = process.argv.slice(2)) {
|
|
|
69
70
|
targetDir = defaultProjectName;
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
|
-
// 2.
|
|
73
|
-
let templatePath = "../template";
|
|
74
|
-
if (!argTemplate && interactive) {
|
|
75
|
-
let message = "Please choose a template:";
|
|
76
|
-
const hasInvalidTemplate = argTemplate && !templates.some((t) => t.value === argTemplate);
|
|
77
|
-
if (hasInvalidTemplate) {
|
|
78
|
-
message = `${argTemplate} is not a valid template. Please choose one of the following:`;
|
|
79
|
-
}
|
|
80
|
-
const template = await prompts.select({
|
|
81
|
-
message,
|
|
82
|
-
options: templates.map((t) => ({
|
|
83
|
-
value: t.value,
|
|
84
|
-
label: `${t.value}: ${t.label}`,
|
|
85
|
-
})),
|
|
86
|
-
});
|
|
87
|
-
if (prompts.isCancel(template)) {
|
|
88
|
-
return cancel();
|
|
89
|
-
}
|
|
90
|
-
switch (template) {
|
|
91
|
-
case "ecom":
|
|
92
|
-
templatePath = "../template-ecom";
|
|
93
|
-
break;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
// 3. Handle directory if exist and not empty
|
|
73
|
+
// 2. Handle directory if exist and not empty
|
|
97
74
|
if (fs.existsSync(targetDir) && !isEmpty(targetDir)) {
|
|
98
75
|
let overwrite = argOverwrite ? "yes" : undefined;
|
|
99
76
|
if (!overwrite) {
|
|
@@ -128,40 +105,81 @@ export async function init(args = process.argv.slice(2)) {
|
|
|
128
105
|
emptyDir(targetDir);
|
|
129
106
|
break;
|
|
130
107
|
case "no":
|
|
131
|
-
|
|
132
|
-
|
|
108
|
+
prompts.log.error("Target directory is not empty.");
|
|
109
|
+
process.exit(1);
|
|
133
110
|
}
|
|
134
111
|
}
|
|
135
112
|
const root = path.join(process.cwd(), targetDir);
|
|
136
|
-
//
|
|
137
|
-
prompts.log.step(`Copying template...`);
|
|
113
|
+
// 3. Download from repo or copy template
|
|
138
114
|
try {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
.
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
prompts.log.success(`Project created in ${root}`);
|
|
115
|
+
if (argRepo) {
|
|
116
|
+
prompts.log.step(`Downloading ${argRepo}...`);
|
|
117
|
+
await downloadTemplate(argRepo, { dir: root });
|
|
118
|
+
prompts.log.success(`Project created in ${root}`);
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
prompts.log.step(`Copying template...`);
|
|
122
|
+
const templateDir = fileURLToPath(new URL("../template", import.meta.url));
|
|
123
|
+
// Copy template to target directory
|
|
124
|
+
fs.cpSync(templateDir, root, {
|
|
125
|
+
recursive: true,
|
|
126
|
+
filter: (src) => [".npmrc"].every((file) => !src.endsWith(file)),
|
|
127
|
+
});
|
|
128
|
+
// Rename _gitignore to .gitignore
|
|
129
|
+
fs.renameSync(path.join(root, "_gitignore"), path.join(root, ".gitignore"));
|
|
130
|
+
prompts.log.success(`Project created in ${root}`);
|
|
131
|
+
}
|
|
157
132
|
}
|
|
158
133
|
catch (error) {
|
|
159
|
-
prompts.log.error("Failed to
|
|
134
|
+
prompts.log.error("Failed to create project from template");
|
|
135
|
+
console.error(error);
|
|
136
|
+
process.exit(1);
|
|
137
|
+
}
|
|
138
|
+
// Update project name in package.json
|
|
139
|
+
const pkgPath = path.join(root, "package.json");
|
|
140
|
+
if (!fs.existsSync(pkgPath)) {
|
|
141
|
+
prompts.log.error("No package.json found in project");
|
|
142
|
+
process.exit(1);
|
|
143
|
+
}
|
|
144
|
+
try {
|
|
145
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf-8"));
|
|
146
|
+
pkg.name = path.basename(root);
|
|
147
|
+
fs.writeFileSync(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`);
|
|
148
|
+
}
|
|
149
|
+
catch (error) {
|
|
150
|
+
prompts.log.error("Failed to update project name in package.json");
|
|
160
151
|
console.error(error);
|
|
161
152
|
process.exit(1);
|
|
162
153
|
}
|
|
163
154
|
const userAgent = process.env.npm_config_user_agent;
|
|
164
155
|
const pkgManager = userAgent?.split(" ")[0]?.split("/")[0] || "npm";
|
|
156
|
+
// 4. Ask about skills installation (installed by default)
|
|
157
|
+
let skill = true;
|
|
158
|
+
if (interactive) {
|
|
159
|
+
const skillsResult = await prompts.confirm({
|
|
160
|
+
message: "Install the coding agents skills? (recommended)",
|
|
161
|
+
initialValue: true,
|
|
162
|
+
});
|
|
163
|
+
if (prompts.isCancel(skillsResult)) {
|
|
164
|
+
return cancel();
|
|
165
|
+
}
|
|
166
|
+
skill = skillsResult;
|
|
167
|
+
}
|
|
168
|
+
if (skill) {
|
|
169
|
+
run([
|
|
170
|
+
...getPkgExecCmd(pkgManager, "skills"),
|
|
171
|
+
"add",
|
|
172
|
+
"alpic-ai/skybridge",
|
|
173
|
+
"-s",
|
|
174
|
+
"chatgpt-app-builder",
|
|
175
|
+
...(interactive
|
|
176
|
+
? []
|
|
177
|
+
: ["--yes", "-a", "universal", "-a", "claude-code"]),
|
|
178
|
+
], {
|
|
179
|
+
stdio: "inherit",
|
|
180
|
+
cwd: targetDir,
|
|
181
|
+
});
|
|
182
|
+
}
|
|
165
183
|
// 5. Ask about immediate installation
|
|
166
184
|
let immediate = argImmediate;
|
|
167
185
|
if (immediate === undefined) {
|
|
@@ -234,18 +252,37 @@ function sanitizeTargetDir(targetDir) {
|
|
|
234
252
|
// Remove leading/trailing slashes
|
|
235
253
|
.replace(/^\/+|\/+$/g, ""));
|
|
236
254
|
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
return
|
|
255
|
+
// Skip user's SPEC.md and IDE/agent preferences (.idea, .claude, etc.)
|
|
256
|
+
function isSkippedEntry(entry) {
|
|
257
|
+
return ((entry.name.startsWith(".") && entry.isDirectory()) ||
|
|
258
|
+
entry.name === "SPEC.md");
|
|
259
|
+
}
|
|
260
|
+
function isEmpty(dirPath) {
|
|
261
|
+
const entries = fs.readdirSync(dirPath, { withFileTypes: true });
|
|
262
|
+
return entries.every(isSkippedEntry);
|
|
240
263
|
}
|
|
241
264
|
function emptyDir(dir) {
|
|
242
265
|
if (!fs.existsSync(dir)) {
|
|
243
266
|
return;
|
|
244
267
|
}
|
|
245
|
-
for (const
|
|
246
|
-
if (
|
|
268
|
+
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
269
|
+
if (isSkippedEntry(entry)) {
|
|
247
270
|
continue;
|
|
248
271
|
}
|
|
249
|
-
fs.rmSync(path.
|
|
272
|
+
fs.rmSync(path.join(dir, entry.name), { recursive: true, force: true });
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
function getPkgExecCmd(pkgManager, cmd) {
|
|
276
|
+
switch (pkgManager) {
|
|
277
|
+
case "yarn":
|
|
278
|
+
return ["yarn", "dlx", cmd];
|
|
279
|
+
case "pnpm":
|
|
280
|
+
return ["pnpm", "dlx", cmd];
|
|
281
|
+
case "bun":
|
|
282
|
+
return ["bunx", cmd];
|
|
283
|
+
case "deno":
|
|
284
|
+
return ["deno", "run", "-A", `npm:${cmd}`];
|
|
285
|
+
default:
|
|
286
|
+
return ["npx", "--yes", cmd];
|
|
250
287
|
}
|
|
251
288
|
}
|
package/dist/index.test.js
CHANGED
|
@@ -14,10 +14,20 @@ describe("create-skybridge", () => {
|
|
|
14
14
|
force: true,
|
|
15
15
|
});
|
|
16
16
|
});
|
|
17
|
-
it("should
|
|
17
|
+
it("should copy the template", { timeout: 10000 }, async () => {
|
|
18
18
|
const name = `../../${tempDirName}//project$`;
|
|
19
19
|
await init([name]);
|
|
20
20
|
await fs.access(path.join(process.cwd(), tempDirName, "project", ".gitignore"));
|
|
21
21
|
expect(fs.access(path.join(process.cwd(), tempDirName, "project", ".npmrc"))).rejects.toThrowError();
|
|
22
22
|
});
|
|
23
|
+
it("should download template from repo", { timeout: 10000 }, async () => {
|
|
24
|
+
const name = `../../${tempDirName}//project$`;
|
|
25
|
+
await init([
|
|
26
|
+
name,
|
|
27
|
+
"--repo",
|
|
28
|
+
"github:alpic-ai/skybridge/examples/ecom-carousel",
|
|
29
|
+
]);
|
|
30
|
+
await fs.access(path.join(process.cwd(), tempDirName, "project", ".gitignore"));
|
|
31
|
+
expect(fs.access(path.join(process.cwd(), tempDirName, "project", ".npmrc"))).rejects.toThrowError();
|
|
32
|
+
});
|
|
23
33
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-skybridge",
|
|
3
|
-
"version": "0.0.0-dev.
|
|
3
|
+
"version": "0.0.0-dev.b10f764",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Alpic",
|
|
@@ -14,22 +14,23 @@
|
|
|
14
14
|
"files": [
|
|
15
15
|
"index.js",
|
|
16
16
|
"dist",
|
|
17
|
-
"template"
|
|
18
|
-
"template-ecom"
|
|
17
|
+
"template"
|
|
19
18
|
],
|
|
20
19
|
"dependencies": {
|
|
21
|
-
"@clack/prompts": "^
|
|
20
|
+
"@clack/prompts": "^1.1.0",
|
|
21
|
+
"giget": "^3.2.0",
|
|
22
22
|
"mri": "^1.2.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"typescript": "^
|
|
26
|
-
"vitest": "^4.
|
|
25
|
+
"typescript": "^6.0.2",
|
|
26
|
+
"vitest": "^4.1.4"
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
|
-
"build": "tsc
|
|
29
|
+
"build": "tsc",
|
|
30
30
|
"test": "pnpm run test:unit && pnpm run test:type && pnpm run test:format",
|
|
31
31
|
"test:unit": "vitest run",
|
|
32
32
|
"test:type": "tsc --noEmit",
|
|
33
|
+
"format": "biome check --write --error-on-warnings",
|
|
33
34
|
"test:format": "biome ci"
|
|
34
35
|
}
|
|
35
36
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
This is a ChatGPT/MCP app built with Skybridge. ALWAYS use the `chatgpt-app-builder` skill when planning or updating the codebase.
|
package/template/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Skybridge Starter
|
|
2
2
|
|
|
3
|
-
A minimal TypeScript template for building
|
|
3
|
+
A minimal TypeScript template for building MCP and ChatGPT Apps with the [Skybridge](https://docs.skybridge.tech/home) framework.
|
|
4
4
|
|
|
5
5
|
## Getting Started
|
|
6
6
|
|
|
7
7
|
### Prerequisites
|
|
8
8
|
|
|
9
9
|
- Node.js 24+
|
|
10
|
-
- HTTP tunnel such as [
|
|
10
|
+
- HTTP tunnel such as [Alpic tunnel](https://docs.alpic.ai/cli/tunnel) if you want to test with remote MCP hosts like ChatGPT or Claude.ai.
|
|
11
11
|
|
|
12
12
|
### Local Development
|
|
13
13
|
|
|
@@ -37,41 +37,61 @@ pnpm dev
|
|
|
37
37
|
bun dev
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
This command starts
|
|
40
|
+
This command starts:
|
|
41
|
+
- Your MCP server at `http://localhost:3000/mcp`.
|
|
42
|
+
- Skybridge DevTools UI at `http://localhost:3000/`.
|
|
41
43
|
|
|
42
|
-
|
|
43
|
-
- a React application on Vite HMR dev server (the UI elements to be displayed in ChatGPT)
|
|
44
|
+
#### 3. Project structure
|
|
44
45
|
|
|
45
|
-
#### 3. Connect to ChatGPT
|
|
46
|
-
|
|
47
|
-
- ChatGPT requires connectors to be publicly accessible. To expose your server on the Internet, run:
|
|
48
|
-
```bash
|
|
49
|
-
ngrok http 3000
|
|
50
46
|
```
|
|
51
|
-
|
|
47
|
+
├── server/
|
|
48
|
+
│ └── src/
|
|
49
|
+
│ └── index.ts # Server entry point
|
|
50
|
+
├── web/
|
|
51
|
+
│ ├── src/
|
|
52
|
+
│ │ ├── widgets/ # React components (one per widget)
|
|
53
|
+
│ │ ├── helpers.ts # Shared utilities
|
|
54
|
+
│ │ └── index.css # Global styles
|
|
55
|
+
│ └── vite.config.ts
|
|
56
|
+
├── alpic.json # Deployment config
|
|
57
|
+
├── nodemon.json # Dev server config
|
|
58
|
+
└── package.json
|
|
59
|
+
```
|
|
52
60
|
|
|
53
61
|
### Create your first widget
|
|
54
62
|
|
|
55
63
|
#### 1. Add a new widget
|
|
56
64
|
|
|
57
|
-
- Register a widget in `server/server.ts` with a unique name (e.g., `my-widget`)
|
|
58
|
-
- Create a matching React component at `web/src/widgets/my-widget.tsx`. The file name must match the widget name exactly
|
|
65
|
+
- Register a widget in `server/src/server.ts` with a unique name (e.g., `my-widget`) using [`registerWidget`](https://docs.skybridge.tech/api-reference/register-widget)
|
|
66
|
+
- Create a matching React component at `web/src/widgets/my-widget.tsx`. **The file name must match the widget name exactly**.
|
|
59
67
|
|
|
60
68
|
#### 2. Edit widgets with Hot Module Replacement (HMR)
|
|
61
69
|
|
|
62
|
-
Edit and save components in `web/src/widgets/` — changes appear instantly
|
|
70
|
+
Edit and save components in `web/src/widgets/` — changes will appear instantly inside your App.
|
|
63
71
|
|
|
64
72
|
#### 3. Edit server code
|
|
65
73
|
|
|
66
|
-
Modify files in `server/` and
|
|
74
|
+
Modify files in `server/` and refresh the connection with your testing MCP Client to see the changes.
|
|
75
|
+
|
|
76
|
+
### Testing your App
|
|
77
|
+
|
|
78
|
+
You can test your App locally by using our DevTools UI on `localhost:3000` while running the `pnpm dev` command.
|
|
79
|
+
|
|
80
|
+
To test your app with other MCP Clients like ChatGPT, Claude or VSCode, see [Testing Your App](https://docs.skybridge.tech/quickstart/test-your-app).
|
|
81
|
+
|
|
67
82
|
|
|
68
83
|
## Deploy to Production
|
|
69
84
|
|
|
70
|
-
|
|
71
|
-
- In ChatGPT, navigate to **Settings → Connectors → Create** and add your MCP server URL (e.g., `https://your-app-name.alpic.live`)
|
|
85
|
+
Skybridge is infrastructure vendor agnostic, and your app can be deployed on any cloud platform supporting MCP.
|
|
72
86
|
|
|
73
|
-
|
|
87
|
+
The simplest way to deploy your App in minutes is [Alpic](https://alpic.ai/).
|
|
88
|
+
1. Create an account on [Alpic platform](https://app.alpic.ai/).
|
|
89
|
+
2. Connect your GitHub repository to automatically deploy at each commit.
|
|
90
|
+
3. Use your remote App URL to connect it to MCP Clients, or use the Alpic Playground to easily test your App.
|
|
74
91
|
|
|
92
|
+
## Resources
|
|
93
|
+
- [Skybridge Documentation](https://docs.skybridge.tech/)
|
|
75
94
|
- [Apps SDK Documentation](https://developers.openai.com/apps-sdk)
|
|
95
|
+
- [MCP Apps Documentation](https://github.com/modelcontextprotocol/ext-apps/tree/main)
|
|
76
96
|
- [Model Context Protocol Documentation](https://modelcontextprotocol.io/)
|
|
77
97
|
- [Alpic Documentation](https://docs.alpic.ai/)
|
package/template/alpic.json
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
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/alpic@1.104.1_@opentelemetry+api@1.9.0_arktype@2.1.27_rxjs@7.8.2_typescript@6.0.2/node_modules/alpic/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/alpic@1.104.1_@opentelemetry+api@1.9.0_arktype@2.1.27_rxjs@7.8.2_typescript@6.0.2/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/alpic@1.104.1_@opentelemetry+api@1.9.0_arktype@2.1.27_rxjs@7.8.2_typescript@6.0.2/node_modules/alpic/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/alpic@1.104.1_@opentelemetry+api@1.9.0_arktype@2.1.27_rxjs@7.8.2_typescript@6.0.2/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/../alpic/bin/run.js" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../alpic/bin/run.js" "$@"
|
|
21
|
+
fi
|
|
@@ -0,0 +1,21 @@
|
|
|
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/skybridge@0.35.14_@modelcontextprotocol+sdk@1.29.0_zod@4.3.6__@skybridge+devtools@0.35._9ddb2dfa56e61c7e1e71871404a50ada/node_modules/skybridge/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.35.14_@modelcontextprotocol+sdk@1.29.0_zod@4.3.6__@skybridge+devtools@0.35._9ddb2dfa56e61c7e1e71871404a50ada/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/skybridge@0.35.14_@modelcontextprotocol+sdk@1.29.0_zod@4.3.6__@skybridge+devtools@0.35._9ddb2dfa56e61c7e1e71871404a50ada/node_modules/skybridge/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.35.14_@modelcontextprotocol+sdk@1.29.0_zod@4.3.6__@skybridge+devtools@0.35._9ddb2dfa56e61c7e1e71871404a50ada/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/../skybridge/bin/run.js" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../skybridge/bin/run.js" "$@"
|
|
21
|
+
fi
|
|
@@ -0,0 +1,21 @@
|
|
|
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/skybridge@0.35.14_@modelcontextprotocol+sdk@1.29.0_zod@4.3.6__@skybridge+devtools@0.35._9ddb2dfa56e61c7e1e71871404a50ada/node_modules/skybridge/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.35.14_@modelcontextprotocol+sdk@1.29.0_zod@4.3.6__@skybridge+devtools@0.35._9ddb2dfa56e61c7e1e71871404a50ada/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/skybridge@0.35.14_@modelcontextprotocol+sdk@1.29.0_zod@4.3.6__@skybridge+devtools@0.35._9ddb2dfa56e61c7e1e71871404a50ada/node_modules/skybridge/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.35.14_@modelcontextprotocol+sdk@1.29.0_zod@4.3.6__@skybridge+devtools@0.35._9ddb2dfa56e61c7e1e71871404a50ada/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/../skybridge/bin/run.js" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../skybridge/bin/run.js" "$@"
|
|
21
|
+
fi
|
|
@@ -10,9 +10,9 @@ case `uname` in
|
|
|
10
10
|
esac
|
|
11
11
|
|
|
12
12
|
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@
|
|
13
|
+
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@6.0.2/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules"
|
|
14
14
|
else
|
|
15
|
-
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@
|
|
15
|
+
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@6.0.2/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
16
|
fi
|
|
17
17
|
if [ -x "$basedir/node" ]; then
|
|
18
18
|
exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@"
|
|
@@ -10,9 +10,9 @@ case `uname` in
|
|
|
10
10
|
esac
|
|
11
11
|
|
|
12
12
|
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@
|
|
13
|
+
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@6.0.2/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules"
|
|
14
14
|
else
|
|
15
|
-
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@
|
|
15
|
+
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@6.0.2/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
16
|
fi
|
|
17
17
|
if [ -x "$basedir/node" ]; then
|
|
18
18
|
exec "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@"
|
|
@@ -10,9 +10,9 @@ case `uname` in
|
|
|
10
10
|
esac
|
|
11
11
|
|
|
12
12
|
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/
|
|
13
|
+
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/tsx@4.21.0/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules"
|
|
14
14
|
else
|
|
15
|
-
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/
|
|
15
|
+
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/tsx@4.21.0/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
16
|
fi
|
|
17
17
|
if [ -x "$basedir/node" ]; then
|
|
18
18
|
exec "$basedir/node" "$basedir/../tsx/dist/cli.mjs" "$@"
|
|
@@ -10,9 +10,9 @@ case `uname` in
|
|
|
10
10
|
esac
|
|
11
11
|
|
|
12
12
|
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@
|
|
13
|
+
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@8.0.3_@types+node@24.12.0_esbuild@0.27.2_jiti@2.6.1_terser@5.44.1_tsx@4.21.0_yaml@2.8.2/node_modules/vite/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@8.0.3_@types+node@24.12.0_esbuild@0.27.2_jiti@2.6.1_terser@5.44.1_tsx@4.21.0_yaml@2.8.2/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules"
|
|
14
14
|
else
|
|
15
|
-
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@
|
|
15
|
+
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@8.0.3_@types+node@24.12.0_esbuild@0.27.2_jiti@2.6.1_terser@5.44.1_tsx@4.21.0_yaml@2.8.2/node_modules/vite/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@8.0.3_@types+node@24.12.0_esbuild@0.27.2_jiti@2.6.1_terser@5.44.1_tsx@4.21.0_yaml@2.8.2/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
16
|
fi
|
|
17
17
|
if [ -x "$basedir/node" ]; then
|
|
18
18
|
exec "$basedir/node" "$basedir/../vite/bin/vite.js" "$@"
|
package/template/package.json
CHANGED
|
@@ -5,38 +5,30 @@
|
|
|
5
5
|
"description": "Alpic MCP Server Template",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"dev": "
|
|
9
|
-
"build": "
|
|
10
|
-
"start": "
|
|
11
|
-
"
|
|
12
|
-
"server:build": "tsc -p tsconfig.server.json",
|
|
13
|
-
"server:start": "node server/dist/index.js",
|
|
14
|
-
"web:build": "tsc -b web && vite build -c web/vite.config.ts",
|
|
15
|
-
"web:preview": "vite preview -c web/vite.config.ts"
|
|
8
|
+
"dev": "skybridge dev",
|
|
9
|
+
"build": "skybridge build",
|
|
10
|
+
"start": "skybridge start",
|
|
11
|
+
"deploy": "alpic deploy"
|
|
16
12
|
},
|
|
17
13
|
"dependencies": {
|
|
18
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
19
|
-
"
|
|
20
|
-
"react": "^19.2.
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"zod": "^4.3.5"
|
|
14
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
15
|
+
"react": "^19.2.4",
|
|
16
|
+
"react-dom": "^19.2.4",
|
|
17
|
+
"skybridge": ">=0.35.14 <1.0.0",
|
|
18
|
+
"vite": "^8.0.3",
|
|
19
|
+
"zod": "^4.3.6"
|
|
25
20
|
},
|
|
26
21
|
"devDependencies": {
|
|
27
|
-
"@
|
|
28
|
-
"@
|
|
29
|
-
"@types/
|
|
30
|
-
"@types/react": "^19.2.7",
|
|
22
|
+
"@skybridge/devtools": ">=0.35.14 <1.0.0",
|
|
23
|
+
"@types/react": "^19.2.14",
|
|
24
|
+
"@types/node": "^24.12.0",
|
|
31
25
|
"@types/react-dom": "^19.2.3",
|
|
32
|
-
"@vitejs/plugin-react": "^
|
|
33
|
-
"
|
|
34
|
-
"shx": "^0.4.0",
|
|
26
|
+
"@vitejs/plugin-react": "^6.0.1",
|
|
27
|
+
"alpic": "^1.104.1",
|
|
35
28
|
"tsx": "^4.21.0",
|
|
36
|
-
"typescript": "^
|
|
29
|
+
"typescript": "^6.0.2"
|
|
37
30
|
},
|
|
38
|
-
"workspaces": [],
|
|
39
31
|
"engines": {
|
|
40
|
-
"node": ">=24.
|
|
32
|
+
"node": ">=24.14.1"
|
|
41
33
|
}
|
|
42
34
|
}
|