skybridge 0.0.0-dev.f29d75c → 0.0.0-dev.f2e1f92
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 +9 -5
- package/dist/cli/detect-port.d.ts +18 -0
- package/dist/cli/detect-port.js +61 -0
- package/dist/cli/detect-port.js.map +1 -0
- package/dist/cli/use-nodemon.d.ts +1 -0
- package/dist/cli/use-nodemon.js +10 -3
- package/dist/cli/use-nodemon.js.map +1 -1
- package/dist/commands/dev.d.ts +1 -0
- package/dist/commands/dev.js +12 -1
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/start.d.ts +3 -1
- package/dist/commands/start.js +23 -4
- package/dist/commands/start.js.map +1 -1
- package/dist/server/const.d.ts +1 -0
- package/dist/server/const.js +2 -0
- package/dist/server/const.js.map +1 -0
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js.map +1 -1
- package/dist/server/middleware.d.ts +124 -0
- package/dist/server/middleware.js +93 -0
- package/dist/server/middleware.js.map +1 -0
- package/dist/server/middleware.test-d.d.ts +1 -0
- package/dist/server/middleware.test-d.js +75 -0
- package/dist/server/middleware.test-d.js.map +1 -0
- package/dist/server/middleware.test.d.ts +1 -0
- package/dist/server/middleware.test.js +383 -0
- package/dist/server/middleware.test.js.map +1 -0
- package/dist/server/server.d.ts +43 -1
- package/dist/server/server.js +80 -16
- package/dist/server/server.js.map +1 -1
- package/dist/server/widgetsDevServer.js +8 -2
- package/dist/server/widgetsDevServer.js.map +1 -1
- package/dist/web/bridges/apps-sdk/adaptor.d.ts +4 -4
- package/dist/web/bridges/apps-sdk/adaptor.js +8 -13
- package/dist/web/bridges/apps-sdk/adaptor.js.map +1 -1
- package/dist/web/bridges/apps-sdk/bridge.d.ts +1 -1
- package/dist/web/bridges/apps-sdk/index.d.ts +1 -1
- package/dist/web/bridges/apps-sdk/index.js.map +1 -1
- package/dist/web/bridges/apps-sdk/types.d.ts +8 -5
- package/dist/web/bridges/apps-sdk/types.js.map +1 -1
- package/dist/web/bridges/mcp-app/adaptor.d.ts +6 -4
- package/dist/web/bridges/mcp-app/adaptor.js +33 -39
- package/dist/web/bridges/mcp-app/adaptor.js.map +1 -1
- package/dist/web/bridges/mcp-app/bridge.d.ts +13 -30
- package/dist/web/bridges/mcp-app/bridge.js +43 -201
- package/dist/web/bridges/mcp-app/bridge.js.map +1 -1
- package/dist/web/bridges/mcp-app/use-mcp-app-context.d.ts +5 -3
- package/dist/web/bridges/mcp-app/use-mcp-app-context.js +2 -2
- package/dist/web/bridges/mcp-app/use-mcp-app-context.js.map +1 -1
- package/dist/web/bridges/mcp-app/use-mcp-app-context.test.js +1 -41
- package/dist/web/bridges/mcp-app/use-mcp-app-context.test.js.map +1 -1
- package/dist/web/bridges/types.d.ts +7 -3
- package/dist/web/create-store.test.js +7 -2
- package/dist/web/create-store.test.js.map +1 -1
- package/dist/web/data-llm.test.js +2 -1
- package/dist/web/data-llm.test.js.map +1 -1
- package/dist/web/hooks/index.d.ts +1 -1
- package/dist/web/hooks/index.js.map +1 -1
- package/dist/web/hooks/test/utils.js +4 -0
- package/dist/web/hooks/test/utils.js.map +1 -1
- package/dist/web/hooks/use-display-mode.d.ts +3 -3
- package/dist/web/hooks/use-display-mode.js.map +1 -1
- package/dist/web/hooks/use-display-mode.test-d.d.ts +1 -0
- package/dist/web/hooks/use-display-mode.test-d.js +8 -0
- package/dist/web/hooks/use-display-mode.test-d.js.map +1 -0
- package/dist/web/hooks/use-layout.test.js +3 -3
- package/dist/web/hooks/use-layout.test.js.map +1 -1
- package/dist/web/hooks/use-open-external.d.ts +3 -1
- package/dist/web/hooks/use-open-external.js +1 -1
- package/dist/web/hooks/use-open-external.js.map +1 -1
- package/dist/web/hooks/use-open-external.test.js +26 -11
- package/dist/web/hooks/use-open-external.test.js.map +1 -1
- package/dist/web/hooks/use-set-open-in-app-url.test.js +5 -11
- package/dist/web/hooks/use-set-open-in-app-url.test.js.map +1 -1
- package/dist/web/hooks/use-tool-info.test.js +1 -1
- package/dist/web/hooks/use-tool-info.test.js.map +1 -1
- package/dist/web/hooks/use-user.test.js +1 -1
- package/dist/web/hooks/use-user.test.js.map +1 -1
- package/dist/web/hooks/use-widget-state.test.js +2 -0
- package/dist/web/hooks/use-widget-state.test.js.map +1 -1
- package/dist/web/plugin/plugin.js +8 -0
- package/dist/web/plugin/plugin.js.map +1 -1
- package/dist/web/plugin/validate-widget.d.ts +5 -0
- package/dist/web/plugin/validate-widget.js +27 -0
- package/dist/web/plugin/validate-widget.js.map +1 -0
- package/dist/web/plugin/validate-widget.test.d.ts +1 -0
- package/dist/web/plugin/validate-widget.test.js +42 -0
- package/dist/web/plugin/validate-widget.test.js.map +1 -0
- package/package.json +13 -13
package/README.md
CHANGED
|
@@ -120,11 +120,15 @@ Explore production-ready examples:
|
|
|
120
120
|
|
|
121
121
|
| Example | Description | Demo | Code |
|
|
122
122
|
|------------------------|----------------------------------------------------------------------------------|-----------------------------------------------------|-------------------------------------------------------------------------------------|
|
|
123
|
-
| **Capitals Explorer**
|
|
124
|
-
| **Ecommerce Carousel**
|
|
125
|
-
| **Everything**
|
|
126
|
-
| **
|
|
127
|
-
| **
|
|
123
|
+
| **Capitals Explorer** | Interactive world map with geolocation and Wikipedia integration | [Try Demo](https://capitals.skybridge.tech/try) | [View Code](https://github.com/alpic-ai/skybridge/tree/main/examples/capitals) |
|
|
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
|
+
| **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
|
+
| **Investigation Game** | Interactive murder mystery game with multi-screen gameplay and dynamic story progression | [Try Demo](https://investigation-game.skybridge.tech/try) | [View Code](https://github.com/alpic-ai/skybridge/tree/main/examples/investigation-game) |
|
|
127
|
+
| **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) |
|
|
128
|
+
| **Time's Up** | Word-guessing party game where the user gives hints and the AI tries to guess the secret word | [Try Demo](https://times-up.skybridge.tech/try) | [View Code](https://github.com/alpic-ai/skybridge/tree/main/examples/times-up) |
|
|
129
|
+
| **Auth — Clerk** | Full OAuth authentication with Clerk and personalized coffee shop search | — | [View Code](https://github.com/alpic-ai/skybridge/tree/main/examples/auth-clerk) |
|
|
130
|
+
| **Auth — WorkOS AuthKit** | Full OAuth authentication with WorkOS AuthKit and personalized coffee shop search | — | [View Code](https://github.com/alpic-ai/skybridge/tree/main/examples/auth-workos) |
|
|
131
|
+
| **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) |
|
|
128
132
|
|
|
129
133
|
See all examples in the [Showcase](https://docs.skybridge.tech/showcase) or browse the [examples/](examples/) directory.
|
|
130
134
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare function resolvePort(flagPort?: number): Promise<{
|
|
2
|
+
port: number;
|
|
3
|
+
fallback: boolean;
|
|
4
|
+
envWarning?: undefined;
|
|
5
|
+
} | {
|
|
6
|
+
port: number;
|
|
7
|
+
fallback: boolean;
|
|
8
|
+
envWarning: string;
|
|
9
|
+
}>;
|
|
10
|
+
/**
|
|
11
|
+
* Returns the given port if available, otherwise lets the OS
|
|
12
|
+
* pick a free port via `listen(0)`.
|
|
13
|
+
*
|
|
14
|
+
* @param host - Bind address for the check. Pass `"localhost"` for
|
|
15
|
+
* services that bind to 127.0.0.1 (e.g. Vite HMR). Omit for
|
|
16
|
+
* services that bind to all interfaces (e.g. the HTTP server).
|
|
17
|
+
*/
|
|
18
|
+
export declare function detectAvailablePort(startPort: number, host?: string): Promise<number>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import net from "node:net";
|
|
2
|
+
const DEFAULT_PORT = 3000;
|
|
3
|
+
export async function resolvePort(flagPort) {
|
|
4
|
+
if (flagPort && flagPort > 1) {
|
|
5
|
+
return { port: flagPort, fallback: false };
|
|
6
|
+
}
|
|
7
|
+
const rawEnv = process.env.PORT;
|
|
8
|
+
if (rawEnv) {
|
|
9
|
+
const parsed = Number(rawEnv);
|
|
10
|
+
if (Number.isInteger(parsed) && parsed > 0) {
|
|
11
|
+
return { port: parsed, fallback: false };
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
port: await detectAvailablePort(DEFAULT_PORT),
|
|
15
|
+
fallback: false,
|
|
16
|
+
envWarning: `Invalid PORT="${rawEnv}", ignoring and using default`,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
const port = await detectAvailablePort(DEFAULT_PORT);
|
|
20
|
+
return { port, fallback: port !== DEFAULT_PORT };
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Returns the given port if available, otherwise lets the OS
|
|
24
|
+
* pick a free port via `listen(0)`.
|
|
25
|
+
*
|
|
26
|
+
* @param host - Bind address for the check. Pass `"localhost"` for
|
|
27
|
+
* services that bind to 127.0.0.1 (e.g. Vite HMR). Omit for
|
|
28
|
+
* services that bind to all interfaces (e.g. the HTTP server).
|
|
29
|
+
*/
|
|
30
|
+
export async function detectAvailablePort(startPort, host) {
|
|
31
|
+
const available = await isPortAvailable(startPort, host);
|
|
32
|
+
if (available) {
|
|
33
|
+
return startPort;
|
|
34
|
+
}
|
|
35
|
+
return new Promise((resolve, reject) => {
|
|
36
|
+
const server = net.createServer();
|
|
37
|
+
server.once("error", reject);
|
|
38
|
+
server.once("listening", () => {
|
|
39
|
+
const addr = server.address();
|
|
40
|
+
if (addr && typeof addr === "object") {
|
|
41
|
+
const { port } = addr;
|
|
42
|
+
server.close(() => resolve(port));
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
server.close(() => reject(new Error("Failed to detect available port")));
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
server.listen(0, host);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function isPortAvailable(port, host) {
|
|
52
|
+
return new Promise((resolve) => {
|
|
53
|
+
const server = net.createServer();
|
|
54
|
+
server.once("error", () => resolve(false));
|
|
55
|
+
server.once("listening", () => {
|
|
56
|
+
server.close(() => resolve(true));
|
|
57
|
+
});
|
|
58
|
+
server.listen(port, host);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=detect-port.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detect-port.js","sourceRoot":"","sources":["../../src/cli/detect-port.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,UAAU,CAAC;AAE3B,MAAM,YAAY,GAAG,IAAI,CAAC;AAE1B,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,QAAiB;IACjD,IAAI,QAAQ,IAAI,QAAQ,GAAG,CAAC,EAAE,CAAC;QAC7B,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC7C,CAAC;IAED,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;IAChC,IAAI,MAAM,EAAE,CAAC;QACX,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;QAC9B,IAAI,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;QAC3C,CAAC;QACD,OAAO;YACL,IAAI,EAAE,MAAM,mBAAmB,CAAC,YAAY,CAAC;YAC7C,QAAQ,EAAE,KAAK;YACf,UAAU,EAAE,iBAAiB,MAAM,+BAA+B;SACnE,CAAC;IACJ,CA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AM,GAAG,GAAG,CAAC,YAAY,EAAE,CAAC;QAElC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;QAC3C,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE;YAC5B,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/cli/use-nodemon.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
1
2
|
import { existsSync } from "node:fs";
|
|
2
3
|
import { resolve } from "node:path";
|
|
3
4
|
import nodemonOriginal from "nodemon";
|
|
@@ -20,13 +21,19 @@ export function useNodemon(env) {
|
|
|
20
21
|
const handleStdoutData = (chunk) => {
|
|
21
22
|
const message = chunk.toString().trim();
|
|
22
23
|
if (message) {
|
|
23
|
-
setMessages((prev) => [
|
|
24
|
+
setMessages((prev) => [
|
|
25
|
+
...prev,
|
|
26
|
+
{ id: randomUUID(), text: message, type: "log" },
|
|
27
|
+
]);
|
|
24
28
|
}
|
|
25
29
|
};
|
|
26
30
|
const handleStderrData = (chunk) => {
|
|
27
31
|
const message = chunk.toString().trim();
|
|
28
32
|
if (message) {
|
|
29
|
-
setMessages((prev) => [
|
|
33
|
+
setMessages((prev) => [
|
|
34
|
+
...prev,
|
|
35
|
+
{ id: randomUUID(), text: message, type: "error" },
|
|
36
|
+
]);
|
|
30
37
|
}
|
|
31
38
|
};
|
|
32
39
|
const setupStdoutListener = () => {
|
|
@@ -49,7 +56,7 @@ export function useNodemon(env) {
|
|
|
49
56
|
const restartMessage = `Server restarted due to file changes: ${files.join(", ")}`;
|
|
50
57
|
setMessages((prev) => [
|
|
51
58
|
...prev,
|
|
52
|
-
{ text: restartMessage, type: "restart" },
|
|
59
|
+
{ id: randomUUID(), text: restartMessage, type: "restart" },
|
|
53
60
|
]);
|
|
54
61
|
setupStdoutListener();
|
|
55
62
|
setupStderrListener();
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
1
|
+
{"version":3,"file":"use-nodemon.js","sourceRoot":"","sources":["../../src/cli/use-nodemon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,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;AAQnD,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;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4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
+
port: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
6
7
|
"use-forwarded-host": import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
8
|
};
|
|
8
9
|
run(): Promise<void>;
|
package/dist/commands/dev.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Command, Flags } from "@oclif/core";
|
|
3
3
|
import { Box, render, Text } from "ink";
|
|
4
|
+
import { resolvePort } from "../cli/detect-port.js";
|
|
4
5
|
import { Header } from "../cli/header.js";
|
|
5
6
|
import { useNodemon } from "../cli/use-nodemon.js";
|
|
6
7
|
import { useTypeScriptCheck } from "../cli/use-typescript-check.js";
|
|
@@ -8,14 +9,24 @@ export default class Dev extends Command {
|
|
|
8
9
|
static description = "Start development server";
|
|
9
10
|
static examples = ["skybridge"];
|
|
10
11
|
static flags = {
|
|
12
|
+
port: Flags.integer({
|
|
13
|
+
char: "p",
|
|
14
|
+
description: "Port to run the server on",
|
|
15
|
+
min: 1,
|
|
16
|
+
}),
|
|
11
17
|
"use-forwarded-host": Flags.boolean({
|
|
12
18
|
description: "Uses the forwarded host header to construct widget URLs instead of localhost, useful when accessing the dev server through a tunnel (e.g., ngrok)",
|
|
13
19
|
}),
|
|
14
20
|
};
|
|
15
21
|
async run() {
|
|
16
22
|
const { flags } = await this.parse(Dev);
|
|
23
|
+
const { port, fallback, envWarning } = await resolvePort(flags.port);
|
|
24
|
+
if (envWarning) {
|
|
25
|
+
this.warn(envWarning);
|
|
26
|
+
}
|
|
17
27
|
const env = {
|
|
18
28
|
...process.env,
|
|
29
|
+
__PORT: String(port),
|
|
19
30
|
...(flags["use-forwarded-host"]
|
|
20
31
|
? { SKYBRIDGE_USE_FORWARDED_HOST: "true" }
|
|
21
32
|
: {}),
|
|
@@ -23,7 +34,7 @@ export default class Dev extends Command {
|
|
|
23
34
|
const App = () => {
|
|
24
35
|
const tsErrors = useTypeScriptCheck();
|
|
25
36
|
const messages = useNodemon(env);
|
|
26
|
-
return (_jsxs(Box, { flexDirection: "column", padding: 1, marginLeft: 1, children: [_jsx(Header, { version: this.config.version }),
|
|
37
|
+
return (_jsxs(Box, { flexDirection: "column", padding: 1, marginLeft: 1, children: [_jsx(Header, { version: this.config.version }), fallback && (_jsx(Box, { marginBottom: 1, children: _jsxs(Text, { color: "yellow", children: ["Port 3000 is in use, falling back to port ", port] }) })), _jsxs(Box, { marginBottom: 1, children: [_jsxs(Text, { color: "green", children: ["\u2192", " "] }), _jsxs(Text, { color: "white", bold: true, children: ["Open DevTools to test your app locally:", " "] }), _jsx(Text, { color: "green", children: `http://localhost:${port}/` })] }), _jsxs(Box, { marginBottom: 1, children: [_jsxs(Text, { color: "#20a832", children: ["\u2192", " "] }), _jsxs(Text, { children: ["MCP server running at:", " "] }), _jsx(Text, { color: "white", bold: true, children: `http://localhost:${port}/mcp` })] }), _jsx(Box, { children: _jsxs(Text, { children: [_jsxs(Text, { color: "#20a832", children: ["\u2192", " "] }), _jsxs(Text, { color: "grey", children: ["Test on ChatGPT, Claude, or any MCP client:", " "] }), _jsx(Text, { color: "white", bold: true, children: "https://docs.skybridge.tech/quickstart/test-your-app" })] }) }), _jsx(Box, { marginTop: 1, children: _jsxs(Text, { children: [_jsxs(Text, { color: "#20a832", children: ["\u2192", " "] }), _jsx(Text, { children: "If you like Skybridge, please " }), _jsxs(Text, { color: "white", bold: true, children: ["give it a star", " "] }), _jsx(Text, { children: "on GitHub: " }), _jsx(Text, { color: "white", underline: true, children: "https://github.com/alpic-ai/skybridge" }), _jsx(Text, { color: "grey", children: " \uD83D\uDE4F" })] }) }), tsErrors.length > 0 && (_jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { color: "red", bold: true, children: "\u26A0\uFE0F TypeScript errors found:" }), tsErrors.map((error) => (_jsxs(Box, { marginLeft: 2, flexDirection: "column", children: [_jsxs(Box, { children: [_jsx(Text, { color: "white", children: error.file }), _jsxs(Text, { color: "grey", children: ["(", error.line, ",", error.col, "):", " "] })] }), _jsx(Box, { marginLeft: 2, children: _jsx(Text, { color: "red", children: error.message }) })] }, `${error.file}:${error.line}:${error.col}`)))] })), messages.length > 0 && (_jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { color: "white", bold: true, children: "Logs:" }), messages.map((message) => (_jsx(Box, { marginLeft: 2, children: message.type === "restart" ? (_jsxs(_Fragment, { children: [_jsxs(Text, { color: "green", children: ["\u2713", " "] }), _jsx(Text, { color: "white", children: message.text })] })) : message.type === "error" ? (_jsx(Text, { color: "red", children: message.text })) : (_jsx(Text, { children: message.text })) }, message.id)))] }))] }));
|
|
27
38
|
};
|
|
28
39
|
render(_jsx(App, {}), { exitOnCtrlC: true, patchConsole: true });
|
|
29
40
|
}
|
package/dist/commands/dev.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.js","sourceRoot":"","sources":["../../src/commands/dev.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,OAAO;IACtC,MAAM,CAAU,WAAW,GAAG,0BAA0B,CAAC;IACzD,MAAM,CAAU,QAAQ,GAAG,CAAC,WAAW,CAAC,CAAC;IACzC,MAAM,CAAU,KAAK,GAAG;QACtB,oBAAoB,EAAE,KAAK,CAAC,OAAO,CAAC;YAClC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AAC,CACF,KAAC,IAAI,cAAE,OAAO,CAAC,IAAI,GAAQ,CAC5B,IAVO,OAAO,CAAC,EAAE,CAWd,CACP,CAAC,IACE,CACP,IACG,CACP,CAAC;QACJ,CAAC,CAAC;QAEF,MAAM,CAAC,KAAC,GAAG,KAAG,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7D,CAAC"}
|
package/dist/commands/start.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ import { Command } from "@oclif/core";
|
|
|
2
2
|
export default class Start extends Command {
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
|
-
static flags: {
|
|
5
|
+
static flags: {
|
|
6
|
+
port: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
|
+
};
|
|
6
8
|
run(): Promise<void>;
|
|
7
9
|
}
|
package/dist/commands/start.js
CHANGED
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
2
|
import { resolve } from "node:path";
|
|
3
|
-
import { Command } from "@oclif/core";
|
|
3
|
+
import { Command, Flags } from "@oclif/core";
|
|
4
|
+
import { resolvePort } from "../cli/detect-port.js";
|
|
4
5
|
import { runCommand } from "../cli/run-command.js";
|
|
5
6
|
export default class Start extends Command {
|
|
6
7
|
static description = "Start production server";
|
|
7
8
|
static examples = ["skybridge start"];
|
|
8
|
-
static flags = {
|
|
9
|
+
static flags = {
|
|
10
|
+
port: Flags.integer({
|
|
11
|
+
char: "p",
|
|
12
|
+
description: "Port to run the server on",
|
|
13
|
+
min: 1,
|
|
14
|
+
}),
|
|
15
|
+
};
|
|
9
16
|
async run() {
|
|
17
|
+
const { flags } = await this.parse(Start);
|
|
18
|
+
const { port, fallback, envWarning } = await resolvePort(flags.port);
|
|
19
|
+
if (envWarning) {
|
|
20
|
+
this.warn(envWarning);
|
|
21
|
+
}
|
|
10
22
|
console.clear();
|
|
11
23
|
const candidates = [
|
|
12
24
|
resolve(process.cwd(), "dist/server/src/index.js"),
|
|
@@ -23,10 +35,17 @@ export default class Start extends Command {
|
|
|
23
35
|
return;
|
|
24
36
|
}
|
|
25
37
|
console.log(`\x1b[36m\x1b[1m⛰ Welcome to Skybridge\x1b[0m \x1b[36mv${this.config.version}\x1b[0m`);
|
|
26
|
-
|
|
38
|
+
if (fallback) {
|
|
39
|
+
console.log(`\x1b[33mPort 3000 is in use, falling back to port ${port}\x1b[0m`);
|
|
40
|
+
}
|
|
41
|
+
console.log(`Server running at: \x1b[32m\x1b[1mhttp://localhost:${port}/mcp\x1b[0m`);
|
|
27
42
|
await runCommand(`node ${indexPath}`, {
|
|
28
43
|
stdio: ["ignore", "inherit", "inherit"],
|
|
29
|
-
env: {
|
|
44
|
+
env: {
|
|
45
|
+
...process.env,
|
|
46
|
+
NODE_ENV: "production",
|
|
47
|
+
__PORT: String(port),
|
|
48
|
+
},
|
|
30
49
|
});
|
|
31
50
|
}
|
|
32
51
|
}
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,MAAM,CAAC,OAAO,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AC,GAAG,CACT,0DAA0D,IAAI,CAAC,MAAM,CAAC,OAAO,SAAS,CACvF,CAAC;QACF,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,CAAC,GAAG,CACT,qDAAqD,IAAI,SAAS,CACnE,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,GAAG,CACT,sDAAsD,IAAI,aAAa,CACxE,CAAC;QAEF,MAAM,UAAU,CAAC,QAAQ,SAAS,EAAE,EAAE;YACpC,KAAK,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC;YACvC,GAAG,EAAE;gBACH,GAAG,OAAO,CAAC,GAAG;gBACd,QAAQ,EAAE,YAAY;gBACtB,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC;aACrB;SACF,CAAC,CAAC;IACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DEFAULT_HMR_PORT = 24678;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"const.js","sourceRoot":"","sources":["../../src/server/const.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC"}
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type { AnyToolRegistry, InferTools, ToolInput, ToolNames, ToolOutput, ToolResponseMetadata, } from "./inferUtilityTypes.js";
|
|
2
|
+
export type { McpExtra, McpMethodString, McpMiddlewareFilter, McpMiddlewareFn, McpResultFor, McpTypedMiddlewareFn, McpWildcard, } from "./middleware.js";
|
|
2
3
|
export type { McpServerTypes, ToolDef, WidgetHostType } from "./server.js";
|
|
3
4
|
export { McpServer } from "./server.js";
|
|
4
5
|
export { widgetsDevServer } from "./widgetsDevServer.js";
|
package/dist/server/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import type { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
2
|
+
import type { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js";
|
|
3
|
+
import type { CallToolResult, CancelTaskResult, ClientNotification, ClientRequest, CompleteResult, EmptyResult, GetPromptResult, GetTaskPayloadResult, GetTaskResult, InitializeResult, ListPromptsResult, ListResourcesResult, ListResourceTemplatesResult, ListTasksResult, ListToolsResult, ReadResourceResult, ServerNotification, ServerRequest, ServerResult } from "@modelcontextprotocol/sdk/types.js";
|
|
4
|
+
/**
|
|
5
|
+
* The `extra` context object provided by the MCP SDK to request handlers.
|
|
6
|
+
*/
|
|
7
|
+
export type McpExtra = RequestHandlerExtra<ServerRequest, ServerNotification>;
|
|
8
|
+
/**
|
|
9
|
+
* A single MCP middleware function following the onion model.
|
|
10
|
+
* Call `next()` to invoke the next middleware or the final handler.
|
|
11
|
+
* For notifications, `extra` is `undefined` (SDK does not provide extra context)
|
|
12
|
+
* and `next()` resolves to `undefined`.
|
|
13
|
+
*/
|
|
14
|
+
export type McpMiddlewareFn = (request: {
|
|
15
|
+
method: string;
|
|
16
|
+
params: Record<string, unknown>;
|
|
17
|
+
}, extra: McpExtra | undefined, next: () => Promise<unknown>) => Promise<unknown> | unknown;
|
|
18
|
+
/**
|
|
19
|
+
* MCP methods the server handles (incoming from client).
|
|
20
|
+
*/
|
|
21
|
+
export type McpMethodString = ClientRequest["method"] | ClientNotification["method"];
|
|
22
|
+
/** Extract params type for a specific MCP method from SDK unions. */
|
|
23
|
+
export type McpRequestParams<M extends string> = Extract<ClientRequest, {
|
|
24
|
+
method: M;
|
|
25
|
+
}> extends {
|
|
26
|
+
params: infer P;
|
|
27
|
+
} ? P : Extract<ClientNotification, {
|
|
28
|
+
method: M;
|
|
29
|
+
}> extends {
|
|
30
|
+
params: infer P;
|
|
31
|
+
} ? P : Record<string, unknown>;
|
|
32
|
+
/** Resolve extra type: McpExtra for requests, undefined for notifications. */
|
|
33
|
+
export type McpExtraFor<M extends string> = M extends ClientRequest["method"] ? McpExtra : M extends ClientNotification["method"] ? undefined : McpExtra | undefined;
|
|
34
|
+
/** Maps each MCP request method to its SDK result type. */
|
|
35
|
+
interface McpResultMap {
|
|
36
|
+
ping: EmptyResult;
|
|
37
|
+
initialize: InitializeResult;
|
|
38
|
+
"tools/list": ListToolsResult;
|
|
39
|
+
"tools/call": CallToolResult;
|
|
40
|
+
"resources/list": ListResourcesResult;
|
|
41
|
+
"resources/templates/list": ListResourceTemplatesResult;
|
|
42
|
+
"resources/read": ReadResourceResult;
|
|
43
|
+
"resources/subscribe": EmptyResult;
|
|
44
|
+
"resources/unsubscribe": EmptyResult;
|
|
45
|
+
"prompts/list": ListPromptsResult;
|
|
46
|
+
"prompts/get": GetPromptResult;
|
|
47
|
+
"completion/complete": CompleteResult;
|
|
48
|
+
"logging/setLevel": EmptyResult;
|
|
49
|
+
"tasks/get": GetTaskResult;
|
|
50
|
+
"tasks/result": GetTaskPayloadResult;
|
|
51
|
+
"tasks/list": ListTasksResult;
|
|
52
|
+
"tasks/cancel": CancelTaskResult;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Map an MCP method string to its corresponding result type.
|
|
56
|
+
* For request methods, resolves to the specific SDK result type.
|
|
57
|
+
* For wildcard patterns (e.g. `"tools/*"`), resolves to the union of matching result types.
|
|
58
|
+
* For notification methods, resolves to `undefined`.
|
|
59
|
+
* For unknown/unmatched methods, falls back to `ServerResult`.
|
|
60
|
+
*/
|
|
61
|
+
export type McpResultFor<M extends string> = M extends keyof McpResultMap ? McpResultMap[M] : M extends `${infer Prefix}/*` ? [McpResultMap[keyof McpResultMap & `${Prefix}/${string}`]] extends [never] ? M extends ToWildcard<ClientNotification["method"]> ? undefined : ServerResult : McpResultMap[keyof McpResultMap & `${Prefix}/${string}`] : M extends ClientNotification["method"] ? undefined : ServerResult;
|
|
62
|
+
/** Typed middleware fn for a specific method — narrows params, extra, and next() result. */
|
|
63
|
+
export type McpTypedMiddlewareFn<M extends string> = (request: {
|
|
64
|
+
method: M;
|
|
65
|
+
params: McpRequestParams<M>;
|
|
66
|
+
}, extra: McpExtraFor<M>, next: () => Promise<McpResultFor<M>>) => Promise<unknown> | unknown;
|
|
67
|
+
/** Extracts `"prefix/*"` from `"prefix/anything"` — distributive over unions. */
|
|
68
|
+
type ToWildcard<T extends string> = T extends `${infer Prefix}/${string}` ? `${Prefix}/*` : never;
|
|
69
|
+
/** Wildcard prefixes derived from method strings (e.g. `"tools/*"` from `"tools/call"`). */
|
|
70
|
+
export type McpWildcard = ToWildcard<McpMethodString>;
|
|
71
|
+
/** Category keywords matching all requests or all notifications. */
|
|
72
|
+
type McpCategory = "request" | "notification";
|
|
73
|
+
/**
|
|
74
|
+
* A single filter pattern for MCP middleware:
|
|
75
|
+
* - Exact method: `"tools/call"`
|
|
76
|
+
* - Wildcard: `"tools/*"`
|
|
77
|
+
* - Category: `"request"` | `"notification"`
|
|
78
|
+
* - Escape hatch: arbitrary string via `string & {}`
|
|
79
|
+
*/
|
|
80
|
+
type McpMiddlewareFilterPattern = McpMethodString | McpWildcard | McpCategory | (string & {});
|
|
81
|
+
/**
|
|
82
|
+
* Filter determining which MCP methods a middleware applies to.
|
|
83
|
+
* A single pattern or an array of patterns (OR logic).
|
|
84
|
+
*/
|
|
85
|
+
export type McpMiddlewareFilter = McpMiddlewareFilterPattern | McpMiddlewareFilterPattern[];
|
|
86
|
+
/**
|
|
87
|
+
* Internal entry stored for each registered middleware.
|
|
88
|
+
* `filter: null` means catch-all (matches everything).
|
|
89
|
+
*/
|
|
90
|
+
export type McpMiddlewareEntry = {
|
|
91
|
+
filter: McpMiddlewareFilter | null;
|
|
92
|
+
handler: McpMiddlewareFn;
|
|
93
|
+
};
|
|
94
|
+
type HandlerMap = Map<string, (...args: unknown[]) => Promise<unknown>>;
|
|
95
|
+
/**
|
|
96
|
+
* Extract the TS-private `_requestHandlers` and `_notificationHandlers` maps
|
|
97
|
+
* from the SDK's `Server` (extends `Protocol`). These are runtime-accessible
|
|
98
|
+
* but declared `private` in TypeScript.
|
|
99
|
+
*
|
|
100
|
+
* Validates with `instanceof Map` so an incompatible SDK version fails fast
|
|
101
|
+
* instead of silently breaking.
|
|
102
|
+
*/
|
|
103
|
+
export declare function getHandlerMaps(server: Server): {
|
|
104
|
+
requestHandlers: HandlerMap;
|
|
105
|
+
notificationHandlers: HandlerMap;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Check if a single filter pattern matches a given method.
|
|
109
|
+
*
|
|
110
|
+
* - Exact: `"tools/call"` matches only `"tools/call"`
|
|
111
|
+
* - Wildcard: `"tools/*"` matches any method starting with `"tools/"`
|
|
112
|
+
* - Category `"request"`: matches when `isNotification` is false
|
|
113
|
+
* - Category `"notification"`: matches when `isNotification` is true
|
|
114
|
+
*/
|
|
115
|
+
export declare function matchesFilter(method: string, filter: string, isNotification: boolean): boolean;
|
|
116
|
+
/**
|
|
117
|
+
* Build an onion-model middleware chain for a specific method.
|
|
118
|
+
*
|
|
119
|
+
* Filters `entries` to those matching `method`, then composes them
|
|
120
|
+
* so the first registered middleware is the outermost layer.
|
|
121
|
+
* `next()` is guarded against multiple calls within a single middleware.
|
|
122
|
+
*/
|
|
123
|
+
export declare function buildMiddlewareChain(method: string, isNotification: boolean, originalHandler: (...args: unknown[]) => Promise<unknown>, entries: McpMiddlewareEntry[]): (...args: unknown[]) => Promise<unknown>;
|
|
124
|
+
export {};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extract the TS-private `_requestHandlers` and `_notificationHandlers` maps
|
|
3
|
+
* from the SDK's `Server` (extends `Protocol`). These are runtime-accessible
|
|
4
|
+
* but declared `private` in TypeScript.
|
|
5
|
+
*
|
|
6
|
+
* Validates with `instanceof Map` so an incompatible SDK version fails fast
|
|
7
|
+
* instead of silently breaking.
|
|
8
|
+
*/
|
|
9
|
+
export function getHandlerMaps(server) {
|
|
10
|
+
const obj = server;
|
|
11
|
+
if (!("_requestHandlers" in obj && obj._requestHandlers instanceof Map) ||
|
|
12
|
+
!("_notificationHandlers" in obj && obj._notificationHandlers instanceof Map)) {
|
|
13
|
+
throw new Error("Incompatible MCP SDK version: expected _requestHandlers and _notificationHandlers on Server");
|
|
14
|
+
}
|
|
15
|
+
return {
|
|
16
|
+
requestHandlers: obj._requestHandlers,
|
|
17
|
+
notificationHandlers: obj._notificationHandlers,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Check if a single filter pattern matches a given method.
|
|
22
|
+
*
|
|
23
|
+
* - Exact: `"tools/call"` matches only `"tools/call"`
|
|
24
|
+
* - Wildcard: `"tools/*"` matches any method starting with `"tools/"`
|
|
25
|
+
* - Category `"request"`: matches when `isNotification` is false
|
|
26
|
+
* - Category `"notification"`: matches when `isNotification` is true
|
|
27
|
+
*/
|
|
28
|
+
export function matchesFilter(method, filter, isNotification) {
|
|
29
|
+
if (filter === "request") {
|
|
30
|
+
return !isNotification;
|
|
31
|
+
}
|
|
32
|
+
if (filter === "notification") {
|
|
33
|
+
return isNotification;
|
|
34
|
+
}
|
|
35
|
+
if (filter.endsWith("/*")) {
|
|
36
|
+
const prefix = filter.slice(0, -1); // "tools/*" → "tools/"
|
|
37
|
+
return method.startsWith(prefix);
|
|
38
|
+
}
|
|
39
|
+
return method === filter;
|
|
40
|
+
}
|
|
41
|
+
function matchesAnyFilter(method, filter, isNotification) {
|
|
42
|
+
if (filter === null) {
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
if (typeof filter === "string") {
|
|
46
|
+
return matchesFilter(method, filter, isNotification);
|
|
47
|
+
}
|
|
48
|
+
return filter.some((pattern) => matchesFilter(method, pattern, isNotification));
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Build an onion-model middleware chain for a specific method.
|
|
52
|
+
*
|
|
53
|
+
* Filters `entries` to those matching `method`, then composes them
|
|
54
|
+
* so the first registered middleware is the outermost layer.
|
|
55
|
+
* `next()` is guarded against multiple calls within a single middleware.
|
|
56
|
+
*/
|
|
57
|
+
export function buildMiddlewareChain(method, isNotification, originalHandler, entries) {
|
|
58
|
+
const applicable = entries.filter((entry) => matchesAnyFilter(method, entry.filter, isNotification));
|
|
59
|
+
if (applicable.length === 0) {
|
|
60
|
+
return originalHandler;
|
|
61
|
+
}
|
|
62
|
+
return (...args) => {
|
|
63
|
+
const rawRequest = args[0];
|
|
64
|
+
// SDK calls request handlers as handler(request, extra) but
|
|
65
|
+
// notification handlers as handler(notification) — no extra arg.
|
|
66
|
+
const extra = isNotification ? undefined : args[1];
|
|
67
|
+
const mcpRequest = {
|
|
68
|
+
method,
|
|
69
|
+
params: rawRequest?.params ?? {},
|
|
70
|
+
};
|
|
71
|
+
let index = 0;
|
|
72
|
+
const executeLayer = () => {
|
|
73
|
+
const entry = applicable[index++];
|
|
74
|
+
if (!entry) {
|
|
75
|
+
if (rawRequest) {
|
|
76
|
+
rawRequest.params = mcpRequest.params;
|
|
77
|
+
}
|
|
78
|
+
return originalHandler(...args);
|
|
79
|
+
}
|
|
80
|
+
let nextCalled = false;
|
|
81
|
+
const next = () => {
|
|
82
|
+
if (nextCalled) {
|
|
83
|
+
throw new Error(`next() called multiple times in middleware for "${method}"`);
|
|
84
|
+
}
|
|
85
|
+
nextCalled = true;
|
|
86
|
+
return executeLayer();
|
|
87
|
+
};
|
|
88
|
+
return Promise.resolve(entry.handler(mcpRequest, extra, next));
|
|
89
|
+
};
|
|
90
|
+
return executeLayer();
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=middleware.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"middleware.js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