@skybridge/devtools 0.0.0-dev.eccf09b → 0.0.0-dev.ecef0e2
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/assets/index-Cf7N7CBv.css +2 -0
- package/dist/assets/index-DRYaliNz.js +190 -0
- package/dist/deploy-router.d.ts +12 -0
- package/dist/deploy-router.js +291 -0
- package/dist/deploy-router.js.map +1 -0
- package/dist/devtoolsStaticServer.d.ts +2 -2
- package/dist/devtoolsStaticServer.js +20 -2
- package/dist/devtoolsStaticServer.js.map +1 -1
- package/dist/favicon.ico +0 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.html +2 -2
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/skybridge.svg +15 -0
- package/package.json +55 -46
- package/dist/assets/index-BS8tKQug.css +0 -1
- package/dist/assets/index-FF38xwir.js +0 -183
- package/dist/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
- package/dist/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
- package/dist/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- package/dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- package/dist/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Alpic } from "@alpic-ai/sdk";
|
|
2
|
+
import { type Router } from "express";
|
|
3
|
+
/**
|
|
4
|
+
* Dev-only router that drives the devtools Deploy button. Runs `@alpic-ai/sdk`
|
|
5
|
+
* in-process (no CLI spawning): `/status` is a plain request, deploy progress
|
|
6
|
+
* streams over SSE at `/events`.
|
|
7
|
+
*
|
|
8
|
+
* ponytail: deploy state + subscriber set are per-router-instance (closure
|
|
9
|
+
* scoped). The dev server mounts one router for one project, so a single
|
|
10
|
+
* in-flight deploy is fine; no change needed unless it ever hosts several.
|
|
11
|
+
*/
|
|
12
|
+
export declare function createDeployRouter(alpicOverride?: Alpic): Router;
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { Alpic, } from "@alpic-ai/sdk";
|
|
4
|
+
import express, {} from "express";
|
|
5
|
+
// `collecting`/`collected` share step 1, so there are 4 numbered steps.
|
|
6
|
+
const TOTAL_STEPS = 4;
|
|
7
|
+
const PHASE_STEPS = {
|
|
8
|
+
collecting: { step: 1, label: "Collecting files" },
|
|
9
|
+
collected: { step: 1, label: "Collecting files" },
|
|
10
|
+
uploading: { step: 2, label: "Uploading source" },
|
|
11
|
+
triggering: { step: 3, label: "Triggering deployment" },
|
|
12
|
+
deploying: { step: 4, label: "Deploying" },
|
|
13
|
+
};
|
|
14
|
+
const phaseText = (type) => {
|
|
15
|
+
const { step, label } = PHASE_STEPS[type];
|
|
16
|
+
return `${step}/${TOTAL_STEPS} ${label}`;
|
|
17
|
+
};
|
|
18
|
+
const configPath = () => join(process.cwd(), ".alpic", "project.json");
|
|
19
|
+
function loadConfig() {
|
|
20
|
+
const path = configPath();
|
|
21
|
+
if (!existsSync(path)) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
return JSON.parse(readFileSync(path, "utf8"));
|
|
25
|
+
}
|
|
26
|
+
function saveConfig(cfg) {
|
|
27
|
+
mkdirSync(join(process.cwd(), ".alpic"), { recursive: true });
|
|
28
|
+
writeFileSync(configPath(), JSON.stringify(cfg, null, 2));
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Dev-only router that drives the devtools Deploy button. Runs `@alpic-ai/sdk`
|
|
32
|
+
* in-process (no CLI spawning): `/status` is a plain request, deploy progress
|
|
33
|
+
* streams over SSE at `/events`.
|
|
34
|
+
*
|
|
35
|
+
* ponytail: deploy state + subscriber set are per-router-instance (closure
|
|
36
|
+
* scoped). The dev server mounts one router for one project, so a single
|
|
37
|
+
* in-flight deploy is fine; no change needed unless it ever hosts several.
|
|
38
|
+
*/
|
|
39
|
+
export function createDeployRouter(alpicOverride) {
|
|
40
|
+
const router = express.Router();
|
|
41
|
+
// Lazy: `new Alpic()` reads server-side env at construction, so defer it to
|
|
42
|
+
// the first request rather than mount time (keeps createApp test-safe).
|
|
43
|
+
let alpicInstance = alpicOverride;
|
|
44
|
+
const alpic = () => {
|
|
45
|
+
alpicInstance ??= new Alpic();
|
|
46
|
+
return alpicInstance;
|
|
47
|
+
};
|
|
48
|
+
let state = { status: "idle" };
|
|
49
|
+
let deployGeneration = 0;
|
|
50
|
+
const subscribers = new Set();
|
|
51
|
+
const write = (res, s) => {
|
|
52
|
+
res.write(`event: state\ndata: ${JSON.stringify(s)}\n\n`);
|
|
53
|
+
};
|
|
54
|
+
const setState = (s) => {
|
|
55
|
+
state = s;
|
|
56
|
+
for (const res of subscribers) {
|
|
57
|
+
write(res, s);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const runDeploy = async (environmentId, teamId) => {
|
|
61
|
+
// Each deploy claims a generation; a newer deploy supersedes older ones so
|
|
62
|
+
// a redeploy can ignore an in-flight deployment's late state updates.
|
|
63
|
+
const generation = ++deployGeneration;
|
|
64
|
+
const startedAt = Date.now();
|
|
65
|
+
const apply = (s) => {
|
|
66
|
+
if (generation === deployGeneration) {
|
|
67
|
+
setState(s);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
apply({
|
|
71
|
+
status: "deploying",
|
|
72
|
+
phase: phaseText("collecting"),
|
|
73
|
+
startedAt,
|
|
74
|
+
deploymentPageUrl: null,
|
|
75
|
+
});
|
|
76
|
+
let pageUrl = null;
|
|
77
|
+
try {
|
|
78
|
+
const result = await alpic().deployments.deploy({
|
|
79
|
+
environmentId,
|
|
80
|
+
teamId,
|
|
81
|
+
onProgress: (event) => {
|
|
82
|
+
if (event.type === "deploying" && event.deploymentPageUrl) {
|
|
83
|
+
pageUrl = event.deploymentPageUrl;
|
|
84
|
+
}
|
|
85
|
+
apply({
|
|
86
|
+
status: "deploying",
|
|
87
|
+
phase: phaseText(event.type),
|
|
88
|
+
startedAt,
|
|
89
|
+
deploymentPageUrl: pageUrl,
|
|
90
|
+
});
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
if (result.status === "deployed") {
|
|
94
|
+
apply({
|
|
95
|
+
status: "deployed",
|
|
96
|
+
deploymentId: result.deploymentId,
|
|
97
|
+
mcpServerUrl: result.mcpServerUrl,
|
|
98
|
+
deploymentPageUrl: result.deploymentPageUrl,
|
|
99
|
+
domains: result.domains,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
apply({
|
|
104
|
+
status: "failed",
|
|
105
|
+
message: `Deployment ${result.status}.`,
|
|
106
|
+
deploymentPageUrl: result.deploymentPageUrl,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
catch (err) {
|
|
111
|
+
apply({
|
|
112
|
+
status: "failed",
|
|
113
|
+
message: err instanceof Error ? err.message : "Deployment failed",
|
|
114
|
+
deploymentPageUrl: pageUrl,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
router.get("/__skybridge/deploy/status", async (_req, res) => {
|
|
119
|
+
try {
|
|
120
|
+
const whoami = await alpic().whoami();
|
|
121
|
+
if (whoami.method === "unauthenticated") {
|
|
122
|
+
res.json({ state: "signedOut" });
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
const teams = await alpic().api.teams.list.v1();
|
|
126
|
+
const team = teams[0];
|
|
127
|
+
if (!team) {
|
|
128
|
+
res.json({ state: "noTeam" });
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
const cfg = loadConfig();
|
|
132
|
+
if (!cfg) {
|
|
133
|
+
res.json({ state: "needsProject", teams, defaultTeamId: team.id });
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
let project;
|
|
137
|
+
try {
|
|
138
|
+
project = await alpic().api.projects.get.v1({
|
|
139
|
+
projectId: cfg.projectId,
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
catch {
|
|
143
|
+
// Stale config: linked project deleted/inaccessible — fall back to first deploy.
|
|
144
|
+
res.json({
|
|
145
|
+
state: "needsProject",
|
|
146
|
+
teams,
|
|
147
|
+
defaultTeamId: team.id,
|
|
148
|
+
staleConfig: true,
|
|
149
|
+
});
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
// Surface the live URL + deployment page so the persistent "Deployed"
|
|
153
|
+
// view renders on load (not only after a fresh deploy). A git-driven
|
|
154
|
+
// latest deploy (commit/author set) means the last deploy came from a
|
|
155
|
+
// connected repo, not this local button — expose its details so the UI
|
|
156
|
+
// can inform + warn before redeploying over it.
|
|
157
|
+
// ponytail: git vs local is the only distinction the API exposes; CLI and
|
|
158
|
+
// devtools local deploys are indistinguishable.
|
|
159
|
+
let lastDeployGit = null;
|
|
160
|
+
let lastDeployStatus;
|
|
161
|
+
let lastDeployStartedAt;
|
|
162
|
+
let mcpServerUrl;
|
|
163
|
+
let deploymentPageUrl = null;
|
|
164
|
+
if (cfg.environmentId) {
|
|
165
|
+
try {
|
|
166
|
+
const latest = await alpic().deployments.getLatestForEnvironment(cfg.environmentId);
|
|
167
|
+
if (latest.sourceCommitId !== null) {
|
|
168
|
+
lastDeployGit = {
|
|
169
|
+
ref: latest.sourceRef,
|
|
170
|
+
commitMessage: latest.sourceCommitMessage,
|
|
171
|
+
author: latest.authorUsername,
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
lastDeployStatus = latest.status;
|
|
175
|
+
lastDeployStartedAt = latest.startedAt?.getTime();
|
|
176
|
+
deploymentPageUrl = latest.deploymentPageUrl;
|
|
177
|
+
if (latest.status === "deployed") {
|
|
178
|
+
const environment = await alpic().api.environments.get.v1({
|
|
179
|
+
environmentId: cfg.environmentId,
|
|
180
|
+
});
|
|
181
|
+
mcpServerUrl = environment.mcpServerUrl;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
catch {
|
|
185
|
+
// no deployments yet — leave defaults
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
res.json({
|
|
189
|
+
state: "ready",
|
|
190
|
+
team,
|
|
191
|
+
project: { id: project.id, name: project.name },
|
|
192
|
+
environmentId: cfg.environmentId,
|
|
193
|
+
lastDeployGit,
|
|
194
|
+
lastDeployStatus,
|
|
195
|
+
lastDeployStartedAt,
|
|
196
|
+
mcpServerUrl,
|
|
197
|
+
deploymentPageUrl,
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
catch (err) {
|
|
201
|
+
res.status(502).json({
|
|
202
|
+
state: "error",
|
|
203
|
+
message: err instanceof Error ? err.message : "Alpic API unavailable",
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
router.post("/__skybridge/deploy/project", async (req, res) => {
|
|
208
|
+
if (state.status === "deploying") {
|
|
209
|
+
res.status(409).json({ message: "A deployment is already in progress." });
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
const name = typeof req.body?.name === "string" ? req.body.name.trim() : "";
|
|
213
|
+
const teamId = typeof req.body?.teamId === "string" ? req.body.teamId : "";
|
|
214
|
+
if (!name || !teamId) {
|
|
215
|
+
res.status(400).json({ message: "name and teamId are required." });
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
try {
|
|
219
|
+
const existing = await alpic().api.projects.list.v1({ teamId });
|
|
220
|
+
if (existing.some((p) => p.name === name)) {
|
|
221
|
+
res
|
|
222
|
+
.status(409)
|
|
223
|
+
.json({ message: `A project named "${name}" already exists.` });
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
const created = await alpic().api.projects.create.v1({
|
|
227
|
+
name,
|
|
228
|
+
teamId,
|
|
229
|
+
runtime: "node24",
|
|
230
|
+
});
|
|
231
|
+
const productionEnv = created.productionEnvironment;
|
|
232
|
+
if (!productionEnv) {
|
|
233
|
+
res.status(500).json({
|
|
234
|
+
message: "Project created without a Production environment.",
|
|
235
|
+
});
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
const team = (await alpic().api.teams.list.v1()).find((t) => t.id === teamId);
|
|
239
|
+
saveConfig({
|
|
240
|
+
projectId: created.id,
|
|
241
|
+
teamId: created.teamId,
|
|
242
|
+
teamName: team?.name,
|
|
243
|
+
projectName: created.name,
|
|
244
|
+
environmentId: productionEnv.id,
|
|
245
|
+
environmentName: productionEnv.name,
|
|
246
|
+
});
|
|
247
|
+
res.status(202).json({ ok: true });
|
|
248
|
+
void runDeploy(productionEnv.id, created.teamId);
|
|
249
|
+
}
|
|
250
|
+
catch (err) {
|
|
251
|
+
res.status(502).json({
|
|
252
|
+
message: err instanceof Error ? err.message : "Failed to create project",
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
router.post("/__skybridge/deploy/login", async (_req, res) => {
|
|
257
|
+
try {
|
|
258
|
+
await alpic().auth.login();
|
|
259
|
+
res.json({ ok: true });
|
|
260
|
+
}
|
|
261
|
+
catch (err) {
|
|
262
|
+
res.status(502).json({
|
|
263
|
+
message: err instanceof Error ? err.message : "Sign-in failed",
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
router.post("/__skybridge/deploy", (_req, res) => {
|
|
268
|
+
// No in-progress guard: a redeploy intentionally supersedes any running
|
|
269
|
+
// deployment (runDeploy's generation guard drops the old one's updates).
|
|
270
|
+
const cfg = loadConfig();
|
|
271
|
+
if (!cfg?.environmentId) {
|
|
272
|
+
res.status(409).json({ message: "No linked project to redeploy." });
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
res.status(202).json({ ok: true });
|
|
276
|
+
void runDeploy(cfg.environmentId, cfg.teamId);
|
|
277
|
+
});
|
|
278
|
+
router.get("/__skybridge/deploy/events", (req, res) => {
|
|
279
|
+
res.setHeader("Content-Type", "text/event-stream");
|
|
280
|
+
res.setHeader("Cache-Control", "no-cache, no-transform");
|
|
281
|
+
res.setHeader("Connection", "keep-alive");
|
|
282
|
+
res.flushHeaders?.();
|
|
283
|
+
write(res, state);
|
|
284
|
+
subscribers.add(res);
|
|
285
|
+
req.on("close", () => {
|
|
286
|
+
subscribers.delete(res);
|
|
287
|
+
});
|
|
288
|
+
});
|
|
289
|
+
return router;
|
|
290
|
+
}
|
|
291
|
+
//# sourceMappingURL=deploy-router.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy-router.js","sourceRoot":"","sources":["../src/deploy-router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,KAAK,GAIN,MAAM,eAAe,CAAC;AACvB,OAAO,OAAO,EAAE,EAAe,MAAM,SAAS,CAAC;AAW/C,wEAAwE;AACxE,MAAM,WAAW,GAAG,CAAC,CAAC;AACtB,MAAM,WAAW,GAGb;IACF,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,kBAAkB,EAAE;IAClD,SAAS,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,kBAAkB,EAAE;IACjD,SAAS,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,kBAAkB,EAAE;IACjD,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,uBAAuB,EAAE;IACvD,SAAS,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE;CAC3C,CAAC;AACF,MAAM,SAAS,GAAG,CAAC,IAAyB,EAAU,EAAE;IACtD,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;IAC1C,OAAO,GAAG,I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CAAC,eAAe,EAAE,wBAAwB,CAAC,CAAC;QACzD,GAAG,CAAC,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;QAC1C,GAAG,CAAC,YAAY,EAAE,EAAE,CAAC;QACrB,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAClB,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACrB,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;YACnB,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -9,8 +9,8 @@ import { type Router } from "express";
|
|
|
9
9
|
*
|
|
10
10
|
* if (env.NODE_ENV !== "production") {
|
|
11
11
|
* app.use(await devtoolsStaticServer(server));
|
|
12
|
-
* app.use(await
|
|
13
|
-
* ^^^^^^^^ Make sure to install the devtoolsStaticServer before the
|
|
12
|
+
* app.use(await viewsDevServer());
|
|
13
|
+
* ^^^^^^^^ Make sure to install the devtoolsStaticServer before the viewsDevServer
|
|
14
14
|
* }
|
|
15
15
|
*/
|
|
16
16
|
export declare const devtoolsStaticServer: () => Promise<Router>;
|
|
@@ -2,6 +2,20 @@ import path from "node:path";
|
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
3
|
import cors from "cors";
|
|
4
4
|
import express, {} from "express";
|
|
5
|
+
import { createDeployRouter } from "./deploy-router.js";
|
|
6
|
+
const detectPackageManager = () => {
|
|
7
|
+
const userAgent = process.env.npm_config_user_agent ?? "";
|
|
8
|
+
if (userAgent.startsWith("pnpm")) {
|
|
9
|
+
return "pnpm";
|
|
10
|
+
}
|
|
11
|
+
if (userAgent.startsWith("yarn")) {
|
|
12
|
+
return "yarn";
|
|
13
|
+
}
|
|
14
|
+
if (userAgent.startsWith("bun")) {
|
|
15
|
+
return "bun";
|
|
16
|
+
}
|
|
17
|
+
return "npm";
|
|
18
|
+
};
|
|
5
19
|
/**
|
|
6
20
|
* Serve the built devtools React app
|
|
7
21
|
* This router serves static files from the devtools's dist directory.
|
|
@@ -12,14 +26,18 @@ import express, {} from "express";
|
|
|
12
26
|
*
|
|
13
27
|
* if (env.NODE_ENV !== "production") {
|
|
14
28
|
* app.use(await devtoolsStaticServer(server));
|
|
15
|
-
* app.use(await
|
|
16
|
-
* ^^^^^^^^ Make sure to install the devtoolsStaticServer before the
|
|
29
|
+
* app.use(await viewsDevServer());
|
|
30
|
+
* ^^^^^^^^ Make sure to install the devtoolsStaticServer before the viewsDevServer
|
|
17
31
|
* }
|
|
18
32
|
*/
|
|
19
33
|
export const devtoolsStaticServer = async () => {
|
|
20
34
|
const router = express.Router();
|
|
21
35
|
const distDir = path.dirname(fileURLToPath(import.meta.url));
|
|
22
36
|
router.use(cors());
|
|
37
|
+
router.get("/__skybridge/devtools/project", (_req, res) => {
|
|
38
|
+
res.json({ packageManager: detectPackageManager() });
|
|
39
|
+
});
|
|
40
|
+
router.use(createDeployRouter());
|
|
23
41
|
router.use(express.static(distDir));
|
|
24
42
|
router.get("/", (_req, res, next) => {
|
|
25
43
|
const indexHtmlPath = path.join(distDir, "index.html");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devtoolsStaticServer.js","sourceRoot":"","sources":["../src/devtoolsStaticServer.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,OAAO,EAAE,EAAe,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"devtoolsStaticServer.js","sourceRoot":"","sources":["../src/devtoolsStaticServer.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,IAAI,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IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAClC,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QACvD,GAAG,CAAC,QAAQ,CAAC,aAAa,EAAE,CAAC,KAAK,EAAE,EAAE;YACpC,IAAI,KAAK,EAAE,CAAC;gBACV,IAAI,CAAC,KAAK,CAAC,CAAC;YACd,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
|
package/dist/favicon.ico
CHANGED
|
Binary file
|
package/dist/index.d.ts
CHANGED
package/dist/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Skybridge MCP devtools</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-DRYaliNz.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-Cf7N7CBv.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"></div>
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<svg width="90" height="90" viewBox="0 0 90 90" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_3933_970)">
|
|
3
|
+
<mask id="mask0_3933_970" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="90" height="90">
|
|
4
|
+
<path d="M90 0H0V90H90V0Z" fill="white"/>
|
|
5
|
+
</mask>
|
|
6
|
+
<g mask="url(#mask0_3933_970)">
|
|
7
|
+
<path d="M17.2704 89.9987C37.5976 24.3967 65.182 12.9084 89.9996 35.3807V84.1606C89.9996 87.3849 87.3858 89.9987 84.1615 89.9987H17.2704ZM84.1615 0C87.3858 0 89.9996 2.6139 89.9996 5.83819V30.9146C52.0566 -5.26767 14.9006 31.2366 0.000976562 57.6768V5.83819C0.00104114 2.6139 2.61486 2.23904e-08 5.83917 0H84.1615Z" fill="black"/>
|
|
8
|
+
</g>
|
|
9
|
+
</g>
|
|
10
|
+
<defs>
|
|
11
|
+
<clipPath id="clip0_3933_970">
|
|
12
|
+
<rect width="90" height="90" fill="white"/>
|
|
13
|
+
</clipPath>
|
|
14
|
+
</defs>
|
|
15
|
+
</svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skybridge/devtools",
|
|
3
|
-
"version": "0.0.0-dev.
|
|
3
|
+
"version": "0.0.0-dev.ecef0e2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,65 +16,74 @@
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@
|
|
20
|
-
"@
|
|
21
|
-
"@microlink/react-json-view": "^1.27.1",
|
|
22
|
-
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
23
|
-
"@rjsf/core": "^6.2.5",
|
|
24
|
-
"@rjsf/shadcn": "^6.2.5",
|
|
25
|
-
"@rjsf/utils": "^6.2.5",
|
|
26
|
-
"@rjsf/validator-ajv8": "^6.2.5",
|
|
27
|
-
"@tanstack/react-query": "^5.90.20",
|
|
28
|
-
"ahooks": "^3.9.6",
|
|
29
|
-
"class-variance-authority": "^0.7.1",
|
|
30
|
-
"clsx": "^2.1.1",
|
|
31
|
-
"cmdk": "^1.1.1",
|
|
19
|
+
"@alpic-ai/sdk": "^1.145.0",
|
|
20
|
+
"@t3-oss/env-core": "^0.13.11",
|
|
32
21
|
"cors": "^2.8.6",
|
|
33
22
|
"express": "^5.2.1",
|
|
34
|
-
"
|
|
35
|
-
"lodash-es": "^4.17.23",
|
|
36
|
-
"lucide-react": "^0.563.0",
|
|
37
|
-
"motion": "^12.34.0",
|
|
38
|
-
"nuqs": "^2.8.8",
|
|
39
|
-
"react": "^19.2.4",
|
|
40
|
-
"react-dom": "^19.2.4",
|
|
41
|
-
"react-resizable-panels": "^4.6.2",
|
|
42
|
-
"shadcn": "^3.8.4",
|
|
43
|
-
"shiki": "^3.22.0",
|
|
44
|
-
"tailwind-merge": "^3.4.0",
|
|
45
|
-
"tailwindcss": "^4.1.18",
|
|
46
|
-
"tailwindcss-animate": "^1.0.7",
|
|
47
|
-
"tw-animate-css": "^1.4.0",
|
|
48
|
-
"zustand": "^5.0.11",
|
|
49
|
-
"skybridge": "0.0.0-dev.eccf09b"
|
|
23
|
+
"zod": "^4.3.5"
|
|
50
24
|
},
|
|
51
25
|
"devDependencies": {
|
|
52
|
-
"@
|
|
53
|
-
"@
|
|
26
|
+
"@alpic-ai/ui": "^1.116.0",
|
|
27
|
+
"@base-ui/react": "^1.3.0",
|
|
28
|
+
"@fontsource-variable/jetbrains-mono": "^5.2.8",
|
|
29
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
30
|
+
"@playwright/test": "^1.49.0",
|
|
31
|
+
"@radix-ui/react-accordion": "^1.2.12",
|
|
32
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
33
|
+
"@rjsf/core": "^6.4.2",
|
|
34
|
+
"@rjsf/shadcn": "^6.4.2",
|
|
35
|
+
"@rjsf/utils": "^6.4.2",
|
|
36
|
+
"@rjsf/validator-ajv8": "^6.4.2",
|
|
37
|
+
"@tailwindcss/vite": "^4.2.2",
|
|
38
|
+
"@tanstack/react-query": "^5.95.2",
|
|
54
39
|
"@total-typescript/tsconfig": "^1.0.4",
|
|
55
40
|
"@types/cors": "^2.8.19",
|
|
56
41
|
"@types/express": "^5.0.6",
|
|
57
42
|
"@types/lodash-es": "^4.17.12",
|
|
58
|
-
"@types/react": "^19.2.
|
|
43
|
+
"@types/react": "^19.2.14",
|
|
59
44
|
"@types/react-dom": "^19.2.3",
|
|
60
|
-
"@
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
45
|
+
"@types/react-syntax-highlighter": "^15.5.13",
|
|
46
|
+
"@vitejs/plugin-react": "^6.0.1",
|
|
47
|
+
"ahooks": "^3.9.7",
|
|
48
|
+
"autoprefixer": "^10.4.27",
|
|
49
|
+
"class-variance-authority": "^0.7.1",
|
|
50
|
+
"clsx": "^2.1.1",
|
|
51
|
+
"cmdk": "^1.1.1",
|
|
52
|
+
"framer-motion": "^12.38.0",
|
|
53
|
+
"lodash-es": "^4.17.23",
|
|
54
|
+
"lucide-react": "^1.7.0",
|
|
55
|
+
"motion": "^12.38.0",
|
|
56
|
+
"nuqs": "^2.8.9",
|
|
57
|
+
"postcss": "^8.5.8",
|
|
58
|
+
"react": "^19.2.4",
|
|
59
|
+
"react-dom": "^19.2.4",
|
|
60
|
+
"react-resizable-panels": "^4.11.0",
|
|
61
|
+
"react-syntax-highlighter": "^16.1.1",
|
|
62
|
+
"shadcn": "^4.1.1",
|
|
63
|
+
"shiki": "^4.0.2",
|
|
64
|
+
"tailwind-merge": "^3.5.0",
|
|
65
|
+
"tailwindcss": "^4.2.2",
|
|
66
|
+
"tailwindcss-animate": "^1.0.7",
|
|
67
|
+
"tsx": "^4.21.0",
|
|
68
|
+
"tw-animate-css": "^1.4.0",
|
|
69
|
+
"typescript": "~6.0.2",
|
|
70
|
+
"vite": "^8.0.3",
|
|
71
|
+
"vitest": "^4.1.4",
|
|
72
|
+
"zustand": "^5.0.12",
|
|
73
|
+
"skybridge": "0.0.0-dev.ecef0e2"
|
|
70
74
|
},
|
|
71
75
|
"scripts": {
|
|
72
76
|
"dev": "vite",
|
|
73
77
|
"build": "tsc -b && vite build && pnpm run build:server",
|
|
74
78
|
"build:server": "tsc -p tsconfig.server.json",
|
|
75
|
-
"test": "pnpm run test:
|
|
76
|
-
"
|
|
79
|
+
"test": "pnpm run test:format && pnpm run test:types && pnpm run test:unit",
|
|
80
|
+
"format": "biome check --write --error-on-warnings",
|
|
77
81
|
"test:format": "biome ci",
|
|
78
|
-
"
|
|
82
|
+
"test:types": "tsc --noEmit -p e2e/tsconfig.json",
|
|
83
|
+
"test:unit": "vitest run",
|
|
84
|
+
"preview": "vite preview",
|
|
85
|
+
"e2e:fixture": "tsx ./e2e/fixtures/server.ts",
|
|
86
|
+
"test:e2e": "playwright test --config e2e/playwright.config.ts",
|
|
87
|
+
"test:e2e:install": "playwright install --with-deps chromium"
|
|
79
88
|
}
|
|
80
89
|
}
|