@syke1/mcp-server 1.4.6 → 1.4.7

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/dist/index.js CHANGED
@@ -621,11 +621,14 @@ async function main() {
621
621
  const dashUrl = `http://localhost:${WEB_PORT}`;
622
622
  console.error(`[syke] Web dashboard: ${dashUrl}`);
623
623
  // Auto-open browser (disable with SYKE_NO_BROWSER=1)
624
+ // Delay 1s to let server fully stabilize before dashboard connects
624
625
  if (process.env.SYKE_NO_BROWSER !== "1") {
625
- const cmd = process.platform === "win32" ? `start ${dashUrl}`
626
- : process.platform === "darwin" ? `open ${dashUrl}`
627
- : `xdg-open ${dashUrl}`;
628
- (0, child_process_1.exec)(cmd, () => { });
626
+ setTimeout(() => {
627
+ const cmd = process.platform === "win32" ? `start ${dashUrl}`
628
+ : process.platform === "darwin" ? `open ${dashUrl}`
629
+ : `xdg-open ${dashUrl}`;
630
+ (0, child_process_1.exec)(cmd, () => { });
631
+ }, 1000);
629
632
  }
630
633
  });
631
634
  }
@@ -2734,11 +2734,17 @@ window.syke = {
2734
2734
  let sseSource = null;
2735
2735
  let sseReconnectTimer = null;
2736
2736
  let sseBlocked = false;
2737
+ let sseEverConnected = false; // track if SSE has ever connected successfully
2737
2738
  const realtimeLog = []; // recent events for panel
2738
2739
 
2739
2740
  async function initSSE() {
2740
2741
  if (sseSource) { sseSource.close(); sseSource = null; }
2741
2742
 
2743
+ // Show appropriate status based on whether we've connected before
2744
+ if (!sseEverConnected) {
2745
+ updateSSEStatus("CONNECTING...", "warning");
2746
+ }
2747
+
2742
2748
  // Pre-check: if Free tier, SSE will 403 — don't attempt connection
2743
2749
  try {
2744
2750
  const probe = await fetch("/api/events");
@@ -2749,7 +2755,14 @@ async function initSSE() {
2749
2755
  }
2750
2756
  // Close the successful probe connection (we'll open EventSource next)
2751
2757
  if (probe.body) probe.body.cancel().catch(() => {});
2752
- } catch(e) { /* network error, try SSE anyway */ }
2758
+ } catch(e) {
2759
+ // Server not ready yet — retry after short delay on first attempt
2760
+ if (!sseEverConnected) {
2761
+ if (sseReconnectTimer) clearTimeout(sseReconnectTimer);
2762
+ sseReconnectTimer = setTimeout(() => { initSSE(); }, 2000);
2763
+ return;
2764
+ }
2765
+ }
2753
2766
 
2754
2767
  sseSource = new EventSource("/api/events");
2755
2768
 
@@ -2757,6 +2770,7 @@ async function initSSE() {
2757
2770
  const data = JSON.parse(e.data);
2758
2771
  console.log("[SYKE:SSE] Connected, cache:", data.cacheSize, "files");
2759
2772
  healthFailCount = 0; // Reset health failures on SSE connect
2773
+ sseEverConnected = true;
2760
2774
  updateSSEStatus("LIVE", "connected");
2761
2775
  });
2762
2776
 
@@ -2949,7 +2963,7 @@ async function initSSE() {
2949
2963
  if (sseBlocked) return;
2950
2964
 
2951
2965
  sseRetryCount++;
2952
- updateSSEStatus("RECONNECTING...", "warning");
2966
+ updateSSEStatus(sseEverConnected ? "RECONNECTING..." : "CONNECTING...", "warning");
2953
2967
 
2954
2968
  // Only show offline after 5 consecutive SSE failures
2955
2969
  if (sseRetryCount >= 5) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syke1/mcp-server",
3
- "version": "1.4.6",
3
+ "version": "1.4.7",
4
4
  "mcpName": "io.github.khalomsky/syke",
5
5
  "description": "AI code impact analysis MCP server — dependency graphs, cascade detection, and a mandatory build gate for AI coding agents",
6
6
  "main": "dist/index.js",