@smithery/sdk 4.1.0 → 4.2.0
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 +2 -0
- package/dist/types/index.d.ts +12 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
2
|
+
import type { Notification } from "@modelcontextprotocol/sdk/types.js";
|
|
2
3
|
import type { z } from "zod";
|
|
3
4
|
export type Session = {
|
|
4
5
|
id: string;
|
|
@@ -67,7 +68,17 @@ export type StatelessHttpContext = {
|
|
|
67
68
|
export type StatefulHttpContext = {
|
|
68
69
|
env: Record<string, string | undefined>;
|
|
69
70
|
sessions: {
|
|
70
|
-
|
|
71
|
+
/**
|
|
72
|
+
* Send a notification directly to the connected client (via `transport.send()`),
|
|
73
|
+
* bypassing the server's notification handler chain.
|
|
74
|
+
* Use this for webhook → client notification routing.
|
|
75
|
+
*/
|
|
76
|
+
notify(sessionId: string, notification: Notification): Promise<void>;
|
|
77
|
+
/**
|
|
78
|
+
* Inject a raw JSON-RPC message into the server's handler chain for processing.
|
|
79
|
+
* The server's registered request/notification handlers will be invoked.
|
|
80
|
+
*/
|
|
81
|
+
dispatch(sessionId: string, message: unknown): Promise<void>;
|
|
71
82
|
};
|
|
72
83
|
};
|
|
73
84
|
/**
|