mcp-chat-connect 1.3.2 → 1.3.3

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/index.js +11 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -67,12 +67,22 @@ async function apiCall(tool, args, token) {
67
67
 
68
68
  // ─── Version check ──────────────────────────────────────────────────────────
69
69
 
70
+ function isNewerVersion(latest, current) {
71
+ const l = latest.split('.').map(Number);
72
+ const c = current.split('.').map(Number);
73
+ for (let i = 0; i < 3; i++) {
74
+ if ((l[i] || 0) > (c[i] || 0)) return true;
75
+ if ((l[i] || 0) < (c[i] || 0)) return false;
76
+ }
77
+ return false;
78
+ }
79
+
70
80
  async function checkForUpdate() {
71
81
  try {
72
82
  const response = await fetch(`${MCP_CHAT_URL}/api/version`);
73
83
  if (!response.ok) return null;
74
84
  const { latest } = await response.json();
75
- if (latest && latest !== LOCAL_VERSION) {
85
+ if (latest && isNewerVersion(latest, LOCAL_VERSION)) {
76
86
  return `UPDATE AVAILABLE: You are running mcp-chat-connect v${LOCAL_VERSION}, but v${latest} is available. Run: npm install -g mcp-chat-connect`;
77
87
  }
78
88
  } catch {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-chat-connect",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "description": "MCP server with channels support for connecting Claude Code sessions to MCP Chat -- real-time team messaging for AI-assisted development",
5
5
  "main": "index.js",
6
6
  "bin": {