@kya-os/mcp-i 1.6.15 → 1.6.17

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.
@@ -50,6 +50,7 @@ export declare class SessionManager {
50
50
  getSession(sessionId: string): Promise<SessionContext | null>;
51
51
  /**
52
52
  * Generate a unique session ID
53
+ * Uses mcpi_{uuid} format for MCP protocol compliance and traceability
53
54
  */
54
55
  private generateSessionId;
55
56
  /**
@@ -141,11 +141,17 @@ class SessionManager {
141
141
  }
142
142
  /**
143
143
  * Generate a unique session ID
144
+ * Uses mcpi_{uuid} format for MCP protocol compliance and traceability
144
145
  */
145
146
  generateSessionId() {
146
- const timestamp = Date.now().toString(36);
147
- const random = (0, crypto_1.randomBytes)(8).toString("hex");
148
- return `sess_${timestamp}_${random}`;
147
+ // Generate UUID v4 using crypto random bytes
148
+ const bytes = (0, crypto_1.randomBytes)(16);
149
+ // Set version (4) and variant (RFC4122)
150
+ bytes[6] = (bytes[6] & 0x0f) | 0x40;
151
+ bytes[8] = (bytes[8] & 0x3f) | 0x80;
152
+ const hex = bytes.toString("hex");
153
+ const uuid = `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20, 32)}`;
154
+ return `mcpi_${uuid}`;
149
155
  }
150
156
  /**
151
157
  * Generate a deterministic client identifier when the client