tmcp 1.15.4 → 1.15.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +9 -16
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tmcp",
3
- "version": "1.15.4",
3
+ "version": "1.15.5",
4
4
  "description": "The main tmcp library",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/index.js CHANGED
@@ -205,11 +205,6 @@ export class McpServer {
205
205
  */
206
206
  #client_info_map = new Map();
207
207
 
208
- /**
209
- * @type {Map<string|undefined, string>}
210
- */
211
- #negotiated_protocol_versions = new Map();
212
-
213
208
  /**
214
209
  * @type {Map<string|undefined, LoggingLevel>}
215
210
  */
@@ -250,12 +245,6 @@ export class McpServer {
250
245
  validated_initialize.protocolVersion,
251
246
  );
252
247
 
253
- // Store negotiated protocol version
254
- this.#negotiated_protocol_versions.set(
255
- session_id,
256
- negotiated_version,
257
- );
258
-
259
248
  // Store client capabilities
260
249
  this.#client_capabilities_map.set(
261
250
  session_id,
@@ -1192,11 +1181,15 @@ export class McpServer {
1192
1181
 
1193
1182
  const sessions = [];
1194
1183
 
1195
- for (let [session_id, session_log_level] of this.#session_log_levels) {
1196
- // Check if the current log level should be sent based on severity
1197
- if (this.#should_log(level, session_log_level)) {
1198
- sessions.push(session_id);
1199
- }
1184
+ const current_session_level = this.#session_log_levels.get(
1185
+ this.#session_id,
1186
+ );
1187
+
1188
+ if (
1189
+ current_session_level &&
1190
+ this.#should_log(level, current_session_level)
1191
+ ) {
1192
+ sessions.push(this.#session_id);
1200
1193
  }
1201
1194
 
1202
1195
  if (sessions.length === 0) return;