@smithery/sdk 1.5.3 → 1.5.5

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.
@@ -0,0 +1,7 @@
1
+ export * from "./shared/config.js";
2
+ export * from "./shared/patch.js";
3
+ export * from "./client/transport.js";
4
+ export * from "./client/integrations/ai-sdk.js";
5
+ export * from "./client/integrations/wrap-error.js";
6
+ export { createStatefulServer, type StatefulServerOptions, } from "./server/stateful.js";
7
+ export * from "./server/session.js";
package/dist/index.js ADDED
@@ -0,0 +1,13 @@
1
+ // Smithery SDK – Barrel file
2
+ // Central re-exports so that `dist/index.js` & `index.d.ts` are generated.
3
+ // Update this list whenever a new top-level feature is added.
4
+ // Shared utilities
5
+ export * from "./shared/config.js";
6
+ export * from "./shared/patch.js";
7
+ // Client-side helpers
8
+ export * from "./client/transport.js";
9
+ export * from "./client/integrations/ai-sdk.js";
10
+ export * from "./client/integrations/wrap-error.js";
11
+ // Server-side helpers (selective to avoid duplicate type names)
12
+ export { createStatefulServer, } from "./server/stateful.js";
13
+ export * from "./server/session.js";
@@ -108,8 +108,8 @@ export function createStatefulServer(createMcpServer, options) {
108
108
  };
109
109
  res.json(configSchema);
110
110
  });
111
- // Reusable handler for GET and DELETE requests
112
- const handleSessionRequest = async (req, res) => {
111
+ // Handle GET requests for server-to-client notifications via SSE
112
+ app.get("/mcp", async (req, res) => {
113
113
  const sessionId = req.headers["mcp-session-id"];
114
114
  if (!sessionId || !sessionStore.get(sessionId)) {
115
115
  res.status(400).send("Invalid or expired session ID");
@@ -118,9 +118,7 @@ export function createStatefulServer(createMcpServer, options) {
118
118
  // biome-ignore lint/style/noNonNullAssertion: Not possible
119
119
  const transport = sessionStore.get(sessionId);
120
120
  await transport.handleRequest(req, res);
121
- };
122
- // Handle GET requests for server-to-client notifications via SSE
123
- app.get("/mcp", handleSessionRequest);
121
+ });
124
122
  // Handle DELETE requests for session termination
125
123
  // https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#session-management
126
124
  app.delete("/mcp", async (req, res) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithery/sdk",
3
- "version": "1.5.3",
3
+ "version": "1.5.5",
4
4
  "description": "SDK to develop with Smithery",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -26,7 +26,7 @@
26
26
  "express": "^5.1.0",
27
27
  "json-schema": "^0.4.0",
28
28
  "lodash": "^4.17.21",
29
- "okay-error": "^1.0.2",
29
+ "okay-error": "^1.0.3",
30
30
  "openai": "^4.0.0",
31
31
  "uuid": "^11.0.3",
32
32
  "zod": "^3.23.8",