skybridge 0.0.0-dev.eb83d69 → 0.0.0-dev.ec2fe3c
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 +1 -0
- package/dist/cli/use-nodemon.js +14 -6
- package/dist/cli/use-nodemon.js.map +1 -1
- package/dist/commands/start.js +4 -9
- package/dist/commands/start.js.map +1 -1
- package/dist/server/express.d.ts +5 -0
- package/dist/server/express.js +61 -0
- package/dist/server/express.js.map +1 -0
- package/dist/server/server.d.ts +11 -1
- package/dist/server/server.js +67 -5
- package/dist/server/server.js.map +1 -1
- package/dist/server/templateHelper.d.ts +1 -0
- package/dist/server/templateHelper.js.map +1 -1
- package/dist/server/templates/development.hbs +2 -0
- package/dist/server/widgetsDevServer.js +5 -0
- package/dist/server/widgetsDevServer.js.map +1 -1
- package/dist/test/utils.d.ts +223 -3
- package/dist/test/widget.test.js +16 -10
- package/dist/test/widget.test.js.map +1 -1
- package/dist/web/bridges/apps-sdk/adaptor.js +9 -3
- package/dist/web/bridges/apps-sdk/adaptor.js.map +1 -1
- package/dist/web/bridges/apps-sdk/bridge.d.ts +5 -1
- package/dist/web/bridges/apps-sdk/types.d.ts +8 -6
- package/dist/web/bridges/apps-sdk/types.js.map +1 -1
- package/dist/web/bridges/mcp-app/adaptor.js +8 -5
- package/dist/web/bridges/mcp-app/adaptor.js.map +1 -1
- package/dist/web/create-store.test.js +3 -3
- package/dist/web/create-store.test.js.map +1 -1
- package/dist/web/data-llm.test.js +10 -8
- package/dist/web/data-llm.test.js.map +1 -1
- package/dist/web/hooks/use-widget-state.test.js +7 -6
- package/dist/web/hooks/use-widget-state.test.js.map +1 -1
- package/dist/web/plugin/plugin.js +9 -9
- package/dist/web/plugin/plugin.js.map +1 -1
- package/dist/web/proxy.js +0 -1
- package/dist/web/proxy.js.map +1 -1
- package/package.json +17 -16
package/README.md
CHANGED
|
@@ -124,6 +124,7 @@ Explore production-ready examples:
|
|
|
124
124
|
| **Ecommerce Carousel** | Product carousel with cart, localization, and modals | [Try Demo](https://ecommerce.skybridge.tech/try) | [View Code](https://github.com/alpic-ai/skybridge/tree/main/examples/ecom-carousel) |
|
|
125
125
|
| **Everything** | Comprehensive playground showcasing all hooks and features | [Try Demo](https://everything.skybridge.tech/try) | [View Code](https://github.com/alpic-ai/skybridge/tree/main/examples/everything) |
|
|
126
126
|
| **Productivity** | Data visualization dashboard demonstrating Skybridge capabilities for MCP Apps | [Try Demo](https://productivity.skybridge.tech/try) | [View Code](https://github.com/alpic-ai/skybridge/tree/main/examples/productivity) |
|
|
127
|
+
| **Manifest Starter** | Starter app with Manifest UI agentic components out-of-the-box | [Try Demo](https://manifest-ui.skybridge.tech/try) | [View Code](https://github.com/alpic-ai/skybridge/tree/main/examples/manifest-ui) |
|
|
127
128
|
|
|
128
129
|
See all examples in the [Showcase](https://docs.skybridge.tech/showcase) or browse the [examples/](examples/) directory.
|
|
129
130
|
|
package/dist/cli/use-nodemon.js
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
import nodemonOriginal from "nodemon";
|
|
2
4
|
import { useEffect, useState } from "react";
|
|
3
5
|
const nodemon = nodemonOriginal;
|
|
4
6
|
export function useNodemon(env) {
|
|
5
7
|
const [messages, setMessages] = useState([]);
|
|
6
8
|
useEffect(() => {
|
|
7
|
-
nodemon
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const configFile = resolve(process.cwd(), "nodemon.json");
|
|
10
|
+
const config = existsSync(configFile)
|
|
11
|
+
? {
|
|
12
|
+
configFile,
|
|
13
|
+
}
|
|
14
|
+
: {
|
|
15
|
+
watch: ["server/src"],
|
|
16
|
+
ext: "ts,json",
|
|
17
|
+
exec: "tsx server/src/index.ts",
|
|
18
|
+
};
|
|
19
|
+
nodemon({ ...config, env, stdout: false });
|
|
12
20
|
const handleStdoutData = (chunk) => {
|
|
13
21
|
const message = chunk.toString().trim();
|
|
14
22
|
if (message) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-nodemon.js","sourceRoot":"","sources":["../../src/cli/use-nodemon.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"use-nodemon.js","sourceRoot":"","sources":["../../src/cli/use-nodemon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,eAAe,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG5C,MAAM,OAAO,GAAG,eAAkC,CAAC;AAOnD,MAAM,UAAU,UAAU,CAAC,GAAsB;IAC/C,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAiB,EAAE,CAAC,CAAC;IAE7D,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC,CAAC;QAE1D,MAAM,MAAM,GAAG,UAAU,CAAC,UAAU,CAAC;YACnC,CAAC,CAAC;gBACE,UAAU;aACX;YACH,CAAC,CAAC;gBACE,KAAK,EAAE,CAAC,YAAY,CAAC;gBACrB,GAAG,EAAE,SAAS;gBACd,IAAI,EAAE,yBAAyB;aAChC,CAAC;QAEN,OAAO,CAAC,EAAE,GAAG,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;QAE3C,MAAM,gBAAgB,GAAG,CAAC,KAAa,EAAE,EAAE;YACzC,MAAM,OAAO,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC;YACxC,IAAI,OAAO,EAAE,CAAC;gBACZ,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE,CA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AI,CAAC,IAAI,CAAC,EAAE,CAAC;YACnF,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;gBACpB,GAAG,IAAI;gBACP,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE;aAC1C,CAAC,CAAC;YACH,mBAAmB,EAAE,CAAC;YACtB,mBAAmB,EAAE,CAAC;QACxB,CAAC,CAAC,CAAC;QAEH,OAAO,GAAG,EAAE;YACV,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;gBACnB,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;YAC/C,CAAC;YACD,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;gBACnB,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;YAC/C,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAEV,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/dist/commands/start.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
import { existsSync } from "node:fs";
|
|
3
2
|
import { resolve } from "node:path";
|
|
4
3
|
import { Command } from "@oclif/core";
|
|
5
|
-
import { Box, render, Text } from "ink";
|
|
6
|
-
import { Header } from "../cli/header.js";
|
|
7
4
|
import { runCommand } from "../cli/run-command.js";
|
|
8
5
|
export default class Start extends Command {
|
|
9
6
|
static description = "Start production server";
|
|
@@ -20,14 +17,12 @@ export default class Start extends Command {
|
|
|
20
17
|
console.error("");
|
|
21
18
|
process.exit(1);
|
|
22
19
|
}
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
console.log(`\x1b[36m\x1b[1m⛰ Welcome to Skybridge\x1b[0m \x1b[36mv${this.config.version}\x1b[0m`);
|
|
21
|
+
console.log(`Server running at: \x1b[32m\x1b[1mhttp://localhost:3000/mcp\x1b[0m`);
|
|
22
|
+
await runCommand("node dist/index.js", {
|
|
23
|
+
stdio: ["ignore", "inherit", "inherit"],
|
|
25
24
|
env: { ...process.env, NODE_ENV: "production" },
|
|
26
25
|
});
|
|
27
|
-
const App = () => {
|
|
28
|
-
return (_jsxs(Box, { flexDirection: "column", padding: 1, marginLeft: 1, children: [_jsx(Header, { version: this.config.version }), _jsxs(Box, { children: [_jsx(Text, { children: "Server running at: " }), _jsx(Text, { color: "green", bold: true, children: "http://localhost:3000/mcp" })] })] }));
|
|
29
|
-
};
|
|
30
|
-
render(_jsx(App, {}), { exitOnCtrlC: true, patchConsole: false });
|
|
31
26
|
}
|
|
32
27
|
}
|
|
33
28
|
//# sourceMappingURL=start.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start.js","sourceRoot":"","sources":["../../src/commands/start.
|
|
1
|
+
{"version":3,"file":"start.js","sourceRoot":"","sources":["../../src/commands/start.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,OAAO;IACxC,MAAM,CAAU,WAAW,GAAG,yBAAyB,CAAC;IACxD,MAAM,CAAU,QAAQ,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAC/C,MAAM,CAAU,KAAK,GAAG,EAAE,CAAC;IAEpB,KAAK,CAAC,GAAG;QACd,OAAO,CAAC,KAAK,EAAE,CAAC;QAEhB,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,eAAe,CAAC,CAAC;QACzD,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC1B,OAAO,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;YAClD,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAClB,OAAO,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;YAClD,OAAO,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;YACnC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAClB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QAED,OAAO,CAAC,GAAG,CACT,0DAA0D,IAAI,CAAC,MAAM,CAAC,OAAO,SAAS,CACvF,CAAC;QACF,OAAO,CAAC,GAAG,CACT,oEAAoE,CACrE,CAAC;QAEF,MAAM,UAAU,CAAC,oBAAoB,EAAE;YACrC,KAAK,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC;YACvC,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,QAAQ,EAAE,YAAY,EAAE;SAChD,CAAC,CAAC;IACL,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
3
|
+
import cors from "cors";
|
|
4
|
+
import express from "express";
|
|
5
|
+
export async function createServer({ server, }) {
|
|
6
|
+
const app = express();
|
|
7
|
+
app.use(express.json());
|
|
8
|
+
const env = process.env.NODE_ENV || "development";
|
|
9
|
+
if (env !== "production") {
|
|
10
|
+
const { devtoolsStaticServer } = await import("@skybridge/devtools");
|
|
11
|
+
app.use(await devtoolsStaticServer());
|
|
12
|
+
const { widgetsDevServer } = await import("./widgetsDevServer.js");
|
|
13
|
+
app.use(await widgetsDevServer());
|
|
14
|
+
}
|
|
15
|
+
if (env === "production") {
|
|
16
|
+
const assetsPath = path.join(process.cwd(), "dist", "assets");
|
|
17
|
+
app.use("/assets", cors());
|
|
18
|
+
app.use("/assets", express.static(assetsPath));
|
|
19
|
+
}
|
|
20
|
+
app.use("/mcp", mcpMiddleware(server));
|
|
21
|
+
return app;
|
|
22
|
+
}
|
|
23
|
+
const mcpMiddleware = (server) => {
|
|
24
|
+
return async (req, res, _next) => {
|
|
25
|
+
if (req.method !== "POST") {
|
|
26
|
+
res.writeHead(405).end(JSON.stringify({
|
|
27
|
+
jsonrpc: "2.0",
|
|
28
|
+
error: {
|
|
29
|
+
code: -32000,
|
|
30
|
+
message: "Method not allowed.",
|
|
31
|
+
},
|
|
32
|
+
id: null,
|
|
33
|
+
}));
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
try {
|
|
37
|
+
const transport = new StreamableHTTPServerTransport({
|
|
38
|
+
sessionIdGenerator: undefined,
|
|
39
|
+
});
|
|
40
|
+
res.on("close", () => {
|
|
41
|
+
transport.close();
|
|
42
|
+
});
|
|
43
|
+
await server.connect(transport);
|
|
44
|
+
await transport.handleRequest(req, res, req.body);
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
console.error("Error handling MCP request:", error);
|
|
48
|
+
if (!res.headersSent) {
|
|
49
|
+
res.status(500).json({
|
|
50
|
+
jsonrpc: "2.0",
|
|
51
|
+
error: {
|
|
52
|
+
code: -32603,
|
|
53
|
+
message: "Internal server error",
|
|
54
|
+
},
|
|
55
|
+
id: null,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=express.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"express.js","sourceRoot":"","sources":["../../src/server/express.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AACnG,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,OAAO,MAAM,SAAS,CAAC;AA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G,CACpB,IAAI,CAAC,SAAS,CAAC;gBACb,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE;oBACL,IAAI,EAAE,CAAC,KAAK;oBACZ,OAAO,EAAE,qBAAqB;iBAC/B;gBACD,EAAE,EAAE,IAAI;aACT,CAAC,CACH,CAAC;YACF,OAAO;QACT,CAAC;QAED,IAAI,CAAC;YACH,MAAM,SAAS,GAAG,IAAI,6BAA6B,CAAC;gBAClD,kBAAkB,EAAE,SAAS;aAC9B,CAAC,CAAC;YAEH,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;gBACnB,SAAS,CAAC,KAAK,EAAE,CAAC;YACpB,CAAC,CAAC,CAAC;YAEH,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;YAChC,MAAM,SAAS,CAAC,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;QACpD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,KAAK,CAAC,CAAC;YACpD,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;gBACrB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;oBACnB,OAAO,EAAE,KAAK;oBACd,KAAK,EAAE;wBACL,IAAI,EAAE,CAAC,KAAK;wBACZ,OAAO,EAAE,uBAAuB;qBACjC;oBACD,EAAE,EAAE,IAAI;iBACT,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/server/server.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { McpServer as McpServerBase, type RegisteredTool } from "@modelcontextpr
|
|
|
3
3
|
import type { AnySchema, SchemaOutput, ZodRawShapeCompat } from "@modelcontextprotocol/sdk/server/zod-compat.js";
|
|
4
4
|
import type { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js";
|
|
5
5
|
import type { CallToolResult, Resource, ServerNotification, ServerRequest, ToolAnnotations } from "@modelcontextprotocol/sdk/types.js";
|
|
6
|
+
import type { RequestHandler } from "express";
|
|
6
7
|
export type ToolDef<TInput = unknown, TOutput = unknown, TResponseMetadata = unknown> = {
|
|
7
8
|
input: TInput;
|
|
8
9
|
output: TOutput;
|
|
@@ -67,7 +68,11 @@ type ShapeOutput<Shape extends ZodRawShapeCompat> = Simplify<{
|
|
|
67
68
|
}>;
|
|
68
69
|
type AddTool<TTools, TName extends string, TInput extends ZodRawShapeCompat, TOutput, TResponseMetadata = unknown> = McpServer<TTools & {
|
|
69
70
|
[K in TName]: ToolDef<ShapeOutput<TInput>, TOutput, TResponseMetadata>;
|
|
70
|
-
}
|
|
71
|
+
}> & {
|
|
72
|
+
use(...handlers: RequestHandler[]): AddTool<TTools, TName, TInput, TOutput, TResponseMetadata>;
|
|
73
|
+
use(path: string, ...handlers: RequestHandler[]): AddTool<TTools, TName, TInput, TOutput, TResponseMetadata>;
|
|
74
|
+
run(): Promise<void>;
|
|
75
|
+
};
|
|
71
76
|
type ToolConfig<TInput extends ZodRawShapeCompat | AnySchema> = {
|
|
72
77
|
title?: string;
|
|
73
78
|
description?: string;
|
|
@@ -81,6 +86,11 @@ type ToolHandler<TInput extends ZodRawShapeCompat, TReturn extends {
|
|
|
81
86
|
} = CallToolResult> = (args: ShapeOutput<TInput>, extra: RequestHandlerExtra<ServerRequest, ServerNotification>) => TReturn | Promise<TReturn>;
|
|
82
87
|
export declare class McpServer<TTools extends Record<string, ToolDef> = Record<never, ToolDef>> extends McpServerBase {
|
|
83
88
|
readonly $types: McpServerTypes<TTools>;
|
|
89
|
+
private express?;
|
|
90
|
+
private customMiddleware;
|
|
91
|
+
use(...handlers: RequestHandler[]): this;
|
|
92
|
+
use(path: string, ...handlers: RequestHandler[]): this;
|
|
93
|
+
run(): Promise<void>;
|
|
84
94
|
registerWidget<TName extends string, TInput extends ZodRawShapeCompat, TReturn extends {
|
|
85
95
|
content: CallToolResult["content"];
|
|
86
96
|
}>(name: TName, resourceConfig: McpServerOriginalResourceConfig, toolConfig: McpServerOriginalToolConfig & {
|
package/dist/server/server.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import crypto from "node:crypto";
|
|
1
2
|
import { readFileSync } from "node:fs";
|
|
3
|
+
import http from "node:http";
|
|
2
4
|
import path from "node:path";
|
|
3
5
|
import { McpServer as McpServerBase, } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
4
6
|
import { mergeWith, union } from "es-toolkit";
|
|
7
|
+
import { createServer } from "./express.js";
|
|
5
8
|
import { templateHelper } from "./templateHelper.js";
|
|
6
9
|
const mergeWithUnion = (target, source) => {
|
|
7
10
|
return mergeWith(target, source, (targetVal, sourceVal) => {
|
|
@@ -11,6 +14,48 @@ const mergeWithUnion = (target, source) => {
|
|
|
11
14
|
});
|
|
12
15
|
};
|
|
13
16
|
export class McpServer extends McpServerBase {
|
|
17
|
+
express;
|
|
18
|
+
customMiddleware = [];
|
|
19
|
+
use(pathOrHandler, ...handlers) {
|
|
20
|
+
if (typeof pathOrHandler === "string") {
|
|
21
|
+
this.customMiddleware.push({
|
|
22
|
+
path: pathOrHandler,
|
|
23
|
+
handlers,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
this.customMiddleware.push({
|
|
28
|
+
handlers: [pathOrHandler, ...handlers],
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
return this;
|
|
32
|
+
}
|
|
33
|
+
async run() {
|
|
34
|
+
if (!this.express) {
|
|
35
|
+
this.express = await createServer({
|
|
36
|
+
server: this,
|
|
37
|
+
});
|
|
38
|
+
for (const middleware of this.customMiddleware) {
|
|
39
|
+
if (middleware.path) {
|
|
40
|
+
this.express.use(middleware.path, ...middleware.handlers);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
this.express.use(...middleware.handlers);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const express = this.express;
|
|
48
|
+
return new Promise((resolve, reject) => {
|
|
49
|
+
const server = http.createServer(express);
|
|
50
|
+
server.on("error", (error) => {
|
|
51
|
+
console.error("Failed to start server:", error);
|
|
52
|
+
reject(error);
|
|
53
|
+
});
|
|
54
|
+
server.listen(3000, () => {
|
|
55
|
+
resolve();
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
}
|
|
14
59
|
registerWidget(name, resourceConfig, toolConfig, toolCallback) {
|
|
15
60
|
const userMeta = resourceConfig._meta;
|
|
16
61
|
const toolMeta = {
|
|
@@ -76,6 +121,8 @@ export class McpServer extends McpServerBase {
|
|
|
76
121
|
widgetConfig,
|
|
77
122
|
resourceConfig,
|
|
78
123
|
});
|
|
124
|
+
// @ts-expect-error - For backwards compatibility with Claude current implementation of the specs
|
|
125
|
+
toolMeta["ui/resourceUri"] = widgetConfig.uri;
|
|
79
126
|
toolMeta.ui = { resourceUri: widgetConfig.uri };
|
|
80
127
|
}
|
|
81
128
|
this.registerTool(name, {
|
|
@@ -93,8 +140,12 @@ export class McpServer extends McpServerBase {
|
|
|
93
140
|
this.registerResource(name, widgetUri, { ...resourceConfig, _meta: resourceConfig._meta }, async (uri, extra) => {
|
|
94
141
|
const isProduction = process.env.NODE_ENV === "production";
|
|
95
142
|
const useForwardedHost = process.env.SKYBRIDGE_USE_FORWARDED_HOST === "true";
|
|
96
|
-
const
|
|
97
|
-
|
|
143
|
+
const isClaude = extra?.requestInfo?.headers?.["user-agent"] === "Claude-User";
|
|
144
|
+
const hostFromHeaders = extra?.requestInfo?.headers?.["x-forwarded-host"] ??
|
|
145
|
+
extra?.requestInfo?.headers?.host;
|
|
146
|
+
const useExternalHost = isProduction || useForwardedHost || isClaude;
|
|
147
|
+
const serverUrl = useExternalHost
|
|
148
|
+
? `https://${hostFromHeaders}`
|
|
98
149
|
: "http://localhost:3000";
|
|
99
150
|
const html = isProduction
|
|
100
151
|
? templateHelper.renderProduction({
|
|
@@ -106,13 +157,24 @@ export class McpServer extends McpServerBase {
|
|
|
106
157
|
: templateHelper.renderDevelopment({
|
|
107
158
|
hostType,
|
|
108
159
|
serverUrl,
|
|
160
|
+
useLocalNetworkAccess: !useExternalHost,
|
|
109
161
|
widgetName: name,
|
|
110
162
|
});
|
|
111
|
-
const
|
|
163
|
+
const connectDomains = [serverUrl];
|
|
164
|
+
if (!isProduction) {
|
|
165
|
+
const VITE_HMR_WEBSOCKET_DEFAULT_URL = "ws://localhost:24678";
|
|
166
|
+
connectDomains.push(VITE_HMR_WEBSOCKET_DEFAULT_URL);
|
|
167
|
+
}
|
|
112
168
|
const contentMeta = buildContentMeta({
|
|
113
169
|
resourceDomains: [serverUrl],
|
|
114
|
-
connectDomains
|
|
115
|
-
domain:
|
|
170
|
+
connectDomains,
|
|
171
|
+
domain: isClaude
|
|
172
|
+
? `${crypto
|
|
173
|
+
.createHash("sha256")
|
|
174
|
+
.update(`https://${hostFromHeaders}/mcp`)
|
|
175
|
+
.digest("hex")
|
|
176
|
+
.slice(0, 32)}.claudemcpcontent.com`
|
|
177
|
+
: serverUrl,
|
|
116
178
|
baseUriDomains: [serverUrl],
|
|
117
179
|
});
|
|
118
180
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/server/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,IAAI,MAAM,WAAW,CAAC;AAK7B,OAAO,EACL,SAAS,IAAI,aAAa,GAG3B,MAAM,yCAAyC,CAAC;AAcjD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/server/server.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,IAAI,M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AAC,YAAY,CAAC,aAAa,CAAC,CAAC;QAClD,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;CACF;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC"}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
window.__vite_plugin_react_preamble_installed__ = true;
|
|
7
7
|
</script>
|
|
8
8
|
<script type="module" src="{{serverUrl}}/@vite/client"></script>
|
|
9
|
+
{{#if useLocalNetworkAccess}}
|
|
9
10
|
<script type="module">
|
|
10
11
|
// Checks for browser support and shows error if local network access is denied
|
|
11
12
|
(async () => {
|
|
@@ -59,6 +60,7 @@
|
|
|
59
60
|
}
|
|
60
61
|
})();
|
|
61
62
|
</script>
|
|
63
|
+
{{/if}}
|
|
62
64
|
<div id="root"></div>
|
|
63
65
|
<script type="module" id="dev-widget-entry">
|
|
64
66
|
import('{{serverUrl}}/src/widgets/{{widgetName}}');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widgetsDevServer.js","sourceRoot":"","sources":["../../src/server/widgetsDevServer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,OAAO,EAAE,EAAe,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AAEnF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,IAAqB,EAAE;IAC1D,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAEhC,MAAM,EAAE,YAAY,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,GAChE,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC;IAEvB,kFAAkF;IAClF,gFAAgF;IAChF,+FAA+F;IAC/F,IAAI,UAAU,GAAG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AAO,EAAE,CAAC,OAAO,EAAE,kBAAkB,CAAC;SACvC;QACD,OAAO,EAAE;YACP,GAAG,WAAW;YACd,2BAA2B,CAAC,EAAE,eAAe,EAAE,uBAAuB,EAAE,CAAC;SAC1E;KACF,CAAC,CAAC;IAEH,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;IACnB,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IAElC,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
|
package/dist/test/utils.d.ts
CHANGED
|
@@ -94,7 +94,183 @@ export declare function createTestServer(): McpServer<Record<never, import("../s
|
|
|
94
94
|
processedAt: number;
|
|
95
95
|
region: string;
|
|
96
96
|
}>;
|
|
97
|
-
}
|
|
97
|
+
}> & {
|
|
98
|
+
use(...handlers: import("express").RequestHandler[]): McpServer<Record<never, import("../server/server.js").ToolDef<unknown, unknown, unknown>> & {
|
|
99
|
+
"search-voyage": import("../server/server.js").ToolDef<{
|
|
100
|
+
destination: string;
|
|
101
|
+
departureDate?: string | undefined;
|
|
102
|
+
maxPrice?: number | undefined;
|
|
103
|
+
}, {
|
|
104
|
+
results: {
|
|
105
|
+
id: string;
|
|
106
|
+
name: string;
|
|
107
|
+
price: number;
|
|
108
|
+
}[];
|
|
109
|
+
totalCount: number;
|
|
110
|
+
}, unknown>;
|
|
111
|
+
} & {
|
|
112
|
+
"get-trip-details": import("../server/server.js").ToolDef<{
|
|
113
|
+
tripId: string;
|
|
114
|
+
}, {
|
|
115
|
+
name: string;
|
|
116
|
+
description: string;
|
|
117
|
+
images: string[];
|
|
118
|
+
}, unknown>;
|
|
119
|
+
} & {
|
|
120
|
+
"no-input-widget": import("../server/server.js").ToolDef<{}, {}, unknown>;
|
|
121
|
+
} & {
|
|
122
|
+
"inferred-output-widget": import("../server/server.js").ToolDef<{
|
|
123
|
+
query: string;
|
|
124
|
+
}, {
|
|
125
|
+
inferredResults: {
|
|
126
|
+
id: string;
|
|
127
|
+
score: number;
|
|
128
|
+
}[];
|
|
129
|
+
inferredCount: number;
|
|
130
|
+
}, unknown>;
|
|
131
|
+
} & {
|
|
132
|
+
"calculate-price": import("../server/server.js").ToolDef<{
|
|
133
|
+
tripId: string;
|
|
134
|
+
passengers: number;
|
|
135
|
+
}, {
|
|
136
|
+
totalPrice: number;
|
|
137
|
+
currency: string;
|
|
138
|
+
}, unknown>;
|
|
139
|
+
} & {
|
|
140
|
+
"inferred-tool": import("../server/server.js").ToolDef<{
|
|
141
|
+
itemId: string;
|
|
142
|
+
}, {
|
|
143
|
+
itemDetails: {
|
|
144
|
+
name: string;
|
|
145
|
+
available: boolean;
|
|
146
|
+
};
|
|
147
|
+
fetchedAt: string;
|
|
148
|
+
}, unknown>;
|
|
149
|
+
} & {
|
|
150
|
+
"widget-with-metadata": import("../server/server.js").ToolDef<{
|
|
151
|
+
resourceId: string;
|
|
152
|
+
}, {
|
|
153
|
+
data: {
|
|
154
|
+
id: string;
|
|
155
|
+
loaded: boolean;
|
|
156
|
+
};
|
|
157
|
+
}, {
|
|
158
|
+
requestId: string;
|
|
159
|
+
timestamp: number;
|
|
160
|
+
cached: boolean;
|
|
161
|
+
}>;
|
|
162
|
+
} & {
|
|
163
|
+
"tool-with-metadata": import("../server/server.js").ToolDef<{
|
|
164
|
+
query: string;
|
|
165
|
+
}, {
|
|
166
|
+
results: string[];
|
|
167
|
+
}, {
|
|
168
|
+
executionTime: number;
|
|
169
|
+
source: string;
|
|
170
|
+
}>;
|
|
171
|
+
} & {
|
|
172
|
+
"widget-with-mixed-returns": import("../server/server.js").ToolDef<{
|
|
173
|
+
shouldSucceed: boolean;
|
|
174
|
+
}, {
|
|
175
|
+
error: string;
|
|
176
|
+
data?: undefined;
|
|
177
|
+
} | {
|
|
178
|
+
data: string;
|
|
179
|
+
error?: undefined;
|
|
180
|
+
}, {
|
|
181
|
+
processedAt: number;
|
|
182
|
+
region: string;
|
|
183
|
+
}>;
|
|
184
|
+
}> & /*elided*/ any;
|
|
185
|
+
use(path: string, ...handlers: import("express").RequestHandler[]): McpServer<Record<never, import("../server/server.js").ToolDef<unknown, unknown, unknown>> & {
|
|
186
|
+
"search-voyage": import("../server/server.js").ToolDef<{
|
|
187
|
+
destination: string;
|
|
188
|
+
departureDate?: string | undefined;
|
|
189
|
+
maxPrice?: number | undefined;
|
|
190
|
+
}, {
|
|
191
|
+
results: {
|
|
192
|
+
id: string;
|
|
193
|
+
name: string;
|
|
194
|
+
price: number;
|
|
195
|
+
}[];
|
|
196
|
+
totalCount: number;
|
|
197
|
+
}, unknown>;
|
|
198
|
+
} & {
|
|
199
|
+
"get-trip-details": import("../server/server.js").ToolDef<{
|
|
200
|
+
tripId: string;
|
|
201
|
+
}, {
|
|
202
|
+
name: string;
|
|
203
|
+
description: string;
|
|
204
|
+
images: string[];
|
|
205
|
+
}, unknown>;
|
|
206
|
+
} & {
|
|
207
|
+
"no-input-widget": import("../server/server.js").ToolDef<{}, {}, unknown>;
|
|
208
|
+
} & {
|
|
209
|
+
"inferred-output-widget": import("../server/server.js").ToolDef<{
|
|
210
|
+
query: string;
|
|
211
|
+
}, {
|
|
212
|
+
inferredResults: {
|
|
213
|
+
id: string;
|
|
214
|
+
score: number;
|
|
215
|
+
}[];
|
|
216
|
+
inferredCount: number;
|
|
217
|
+
}, unknown>;
|
|
218
|
+
} & {
|
|
219
|
+
"calculate-price": import("../server/server.js").ToolDef<{
|
|
220
|
+
tripId: string;
|
|
221
|
+
passengers: number;
|
|
222
|
+
}, {
|
|
223
|
+
totalPrice: number;
|
|
224
|
+
currency: string;
|
|
225
|
+
}, unknown>;
|
|
226
|
+
} & {
|
|
227
|
+
"inferred-tool": import("../server/server.js").ToolDef<{
|
|
228
|
+
itemId: string;
|
|
229
|
+
}, {
|
|
230
|
+
itemDetails: {
|
|
231
|
+
name: string;
|
|
232
|
+
available: boolean;
|
|
233
|
+
};
|
|
234
|
+
fetchedAt: string;
|
|
235
|
+
}, unknown>;
|
|
236
|
+
} & {
|
|
237
|
+
"widget-with-metadata": import("../server/server.js").ToolDef<{
|
|
238
|
+
resourceId: string;
|
|
239
|
+
}, {
|
|
240
|
+
data: {
|
|
241
|
+
id: string;
|
|
242
|
+
loaded: boolean;
|
|
243
|
+
};
|
|
244
|
+
}, {
|
|
245
|
+
requestId: string;
|
|
246
|
+
timestamp: number;
|
|
247
|
+
cached: boolean;
|
|
248
|
+
}>;
|
|
249
|
+
} & {
|
|
250
|
+
"tool-with-metadata": import("../server/server.js").ToolDef<{
|
|
251
|
+
query: string;
|
|
252
|
+
}, {
|
|
253
|
+
results: string[];
|
|
254
|
+
}, {
|
|
255
|
+
executionTime: number;
|
|
256
|
+
source: string;
|
|
257
|
+
}>;
|
|
258
|
+
} & {
|
|
259
|
+
"widget-with-mixed-returns": import("../server/server.js").ToolDef<{
|
|
260
|
+
shouldSucceed: boolean;
|
|
261
|
+
}, {
|
|
262
|
+
error: string;
|
|
263
|
+
data?: undefined;
|
|
264
|
+
} | {
|
|
265
|
+
data: string;
|
|
266
|
+
error?: undefined;
|
|
267
|
+
}, {
|
|
268
|
+
processedAt: number;
|
|
269
|
+
region: string;
|
|
270
|
+
}>;
|
|
271
|
+
}> & /*elided*/ any;
|
|
272
|
+
run(): Promise<void>;
|
|
273
|
+
};
|
|
98
274
|
export declare function createMinimalTestServer(): McpServer<Record<never, import("../server/server.js").ToolDef<unknown, unknown, unknown>> & {
|
|
99
275
|
"search-voyage": import("../server/server.js").ToolDef<{
|
|
100
276
|
destination: string;
|
|
@@ -103,7 +279,27 @@ export declare function createMinimalTestServer(): McpServer<Record<never, impor
|
|
|
103
279
|
id: string;
|
|
104
280
|
}[];
|
|
105
281
|
}, unknown>;
|
|
106
|
-
}
|
|
282
|
+
}> & {
|
|
283
|
+
use(...handlers: import("express").RequestHandler[]): McpServer<Record<never, import("../server/server.js").ToolDef<unknown, unknown, unknown>> & {
|
|
284
|
+
"search-voyage": import("../server/server.js").ToolDef<{
|
|
285
|
+
destination: string;
|
|
286
|
+
}, {
|
|
287
|
+
results: {
|
|
288
|
+
id: string;
|
|
289
|
+
}[];
|
|
290
|
+
}, unknown>;
|
|
291
|
+
}> & /*elided*/ any;
|
|
292
|
+
use(path: string, ...handlers: import("express").RequestHandler[]): McpServer<Record<never, import("../server/server.js").ToolDef<unknown, unknown, unknown>> & {
|
|
293
|
+
"search-voyage": import("../server/server.js").ToolDef<{
|
|
294
|
+
destination: string;
|
|
295
|
+
}, {
|
|
296
|
+
results: {
|
|
297
|
+
id: string;
|
|
298
|
+
}[];
|
|
299
|
+
}, unknown>;
|
|
300
|
+
}> & /*elided*/ any;
|
|
301
|
+
run(): Promise<void>;
|
|
302
|
+
};
|
|
107
303
|
export declare function createInterfaceTestServer(): McpServer<Record<never, import("../server/server.js").ToolDef<unknown, unknown, unknown>> & {
|
|
108
304
|
"interface-widget": import("../server/server.js").ToolDef<{
|
|
109
305
|
id: string;
|
|
@@ -114,7 +310,31 @@ export declare function createInterfaceTestServer(): McpServer<Record<never, imp
|
|
|
114
310
|
processedBy: string;
|
|
115
311
|
version: number;
|
|
116
312
|
}>;
|
|
117
|
-
}
|
|
313
|
+
}> & {
|
|
314
|
+
use(...handlers: import("express").RequestHandler[]): McpServer<Record<never, import("../server/server.js").ToolDef<unknown, unknown, unknown>> & {
|
|
315
|
+
"interface-widget": import("../server/server.js").ToolDef<{
|
|
316
|
+
id: string;
|
|
317
|
+
}, {
|
|
318
|
+
itemName: string;
|
|
319
|
+
quantity: number;
|
|
320
|
+
}, {
|
|
321
|
+
processedBy: string;
|
|
322
|
+
version: number;
|
|
323
|
+
}>;
|
|
324
|
+
}> & /*elided*/ any;
|
|
325
|
+
use(path: string, ...handlers: import("express").RequestHandler[]): McpServer<Record<never, import("../server/server.js").ToolDef<unknown, unknown, unknown>> & {
|
|
326
|
+
"interface-widget": import("../server/server.js").ToolDef<{
|
|
327
|
+
id: string;
|
|
328
|
+
}, {
|
|
329
|
+
itemName: string;
|
|
330
|
+
quantity: number;
|
|
331
|
+
}, {
|
|
332
|
+
processedBy: string;
|
|
333
|
+
version: number;
|
|
334
|
+
}>;
|
|
335
|
+
}> & /*elided*/ any;
|
|
336
|
+
run(): Promise<void>;
|
|
337
|
+
};
|
|
118
338
|
/**
|
|
119
339
|
* Mock extra parameter for resource callback
|
|
120
340
|
*/
|