@syke1/mcp-server 1.8.5 → 1.8.6

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
@@ -147,7 +147,7 @@ async function main() {
147
147
  };
148
148
  process.on("SIGINT", shutdown);
149
149
  process.on("SIGTERM", shutdown);
150
- const server = new index_js_1.Server({ name: "syke", version: "1.8.5" }, { capabilities: { tools: {} } });
150
+ const server = new index_js_1.Server({ name: "syke", version: "1.8.6" }, { capabilities: { tools: {} } });
151
151
  // List tools
152
152
  server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => ({
153
153
  tools: [
@@ -656,9 +656,9 @@ async function main() {
656
656
  });
657
657
  const data = await res.json();
658
658
  const latest = data["dist-tags"]?.latest;
659
- if (latest && latest !== "1.8.5") {
659
+ if (latest && latest !== "1.8.6") {
660
660
  const [lM, lm, lp] = latest.split(".").map(Number);
661
- const [cM, cm, cp] = [1, 8, 5];
661
+ const [cM, cm, cp] = [1, 8, 6];
662
662
  if (lM > cM || (lM === cM && lm > cm) || (lM === cM && lm === cm && lp > cp)) {
663
663
  console.error(`[syke] Update available: v${latest}. Run: npx @syke1/mcp-server@latest`);
664
664
  }
@@ -667,17 +667,21 @@ async function main() {
667
667
  catch { }
668
668
  })();
669
669
  let fileCache = null;
670
+ let graphLoadTimeMs = 0;
670
671
  if (currentProjectRoot) {
671
672
  const detectedLangs = (0, plugin_1.detectLanguages)(currentProjectRoot).map(p => p.name).join(", ") || "none";
672
673
  console.error(`[syke] Project root: ${currentProjectRoot}`);
673
674
  console.error(`[syke] Detected languages: ${detectedLangs}`);
674
675
  console.error(`[syke] Package name: ${currentPackageName}`);
676
+ const startTime = performance.now();
675
677
  const { graph, contentMap } = await (0, graph_1.buildGraphAsync)(currentProjectRoot, currentPackageName, getMaxFiles());
676
678
  // Initialize file cache from pre-read content (no re-reading files)
677
679
  fileCache = new file_cache_1.FileCache(currentProjectRoot);
678
680
  fileCache.initializeFromContentMap(contentMap);
679
681
  fileCache.setGraph(graph); // Enable incremental graph updates on file changes
680
682
  fileCache.startWatching();
683
+ graphLoadTimeMs = Math.round(performance.now() - startTime);
684
+ console.error(`[syke] Total load time: ${graphLoadTimeMs}ms`);
681
685
  }
682
686
  // Web server handle (set after server starts)
683
687
  let webServerHandle = null;
@@ -784,7 +788,9 @@ async function main() {
784
788
  activeProvider: (0, provider_1.getProviderName)(),
785
789
  forced,
786
790
  };
787
- });
791
+ },
792
+ // getGraphLoadTimeMs
793
+ () => graphLoadTimeMs);
788
794
  webServerHandle = { setFileCache: setWebFileCache };
789
795
  webApp.listen(WEB_PORT, () => {
790
796
  const dashUrl = `http://localhost:${WEB_PORT}`;
@@ -816,7 +822,7 @@ main().catch((err) => {
816
822
  * See: https://smithery.ai/docs/deploy#sandbox-server
817
823
  */
818
824
  function createSandboxServer() {
819
- const sandboxServer = new index_js_1.Server({ name: "syke", version: "1.8.5" }, { capabilities: { tools: {} } });
825
+ const sandboxServer = new index_js_1.Server({ name: "syke", version: "1.8.6" }, { capabilities: { tools: {} } });
820
826
  sandboxServer.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => ({
821
827
  tools: [
822
828
  {
@@ -2094,6 +2094,40 @@ function setupEventListeners() {
2094
2094
  document.getElementById("shortcuts-overlay").classList.add("hidden");
2095
2095
  });
2096
2096
 
2097
+ // Onboarding (Cortex-only)
2098
+ document.getElementById("btn-onboarding").addEventListener("click", () => {
2099
+ const modal = document.getElementById("cortex-modal");
2100
+ const planInfo = document.getElementById("cortex-plan-info");
2101
+ const upgradeLink = document.getElementById("cortex-upgrade-link");
2102
+ const plan = _currentPlan.toLowerCase();
2103
+
2104
+ if (plan === "cortex" || plan === "cortex_trial") {
2105
+ // Already on Cortex — trigger scan_project via MCP (show coming-soon notice for now)
2106
+ alert("Onboarding document generation is coming in the next update. Stay tuned!");
2107
+ return;
2108
+ }
2109
+
2110
+ // Show modal with plan-specific messaging
2111
+ if (plan === "pro" || plan === "pro_trial") {
2112
+ planInfo.textContent = "You're on Pro ($9/mo). Upgrade to Cortex for just $20/mo more.";
2113
+ upgradeLink.textContent = "UPGRADE TO CORTEX (+$20/mo)";
2114
+ } else {
2115
+ planInfo.textContent = "You're on the Free plan. Upgrade to Cortex to unlock AI-powered analysis.";
2116
+ upgradeLink.textContent = "UPGRADE TO CORTEX";
2117
+ }
2118
+ modal.classList.remove("hidden");
2119
+ });
2120
+
2121
+ document.getElementById("btn-close-cortex").addEventListener("click", () => {
2122
+ document.getElementById("cortex-modal").classList.add("hidden");
2123
+ });
2124
+
2125
+ document.getElementById("cortex-modal").addEventListener("click", (e) => {
2126
+ if (e.target.id === "cortex-modal") {
2127
+ document.getElementById("cortex-modal").classList.add("hidden");
2128
+ }
2129
+ });
2130
+
2097
2131
  // Cycles
2098
2132
  document.getElementById("btn-cycles").addEventListener("click", detectCycles);
2099
2133
  document.getElementById("btn-close-cycles").addEventListener("click", () => {
@@ -3668,10 +3702,13 @@ function hideServerOffline() {
3668
3702
  if (topbar) topbar.style.opacity = "1";
3669
3703
  }
3670
3704
 
3705
+ let _currentPlan = "free"; // track current plan for Cortex modal
3706
+
3671
3707
  async function loadProjectInfo() {
3672
3708
  try {
3673
3709
  const res = await fetch("/api/project-info");
3674
3710
  const info = await res.json();
3711
+ _currentPlan = info.plan || "free";
3675
3712
  const el = document.getElementById("current-project");
3676
3713
  if (el) {
3677
3714
  const short = info.projectRoot.length > 50
@@ -3680,6 +3717,13 @@ async function loadProjectInfo() {
3680
3717
  el.textContent = short;
3681
3718
  el.title = info.projectRoot + " | " + info.languages.join(", ") + " | " + info.fileCount + " files";
3682
3719
  }
3720
+ // Display graph load time
3721
+ const loadTimeEl = document.getElementById("stat-load-time");
3722
+ if (loadTimeEl && info.graphLoadTimeMs) {
3723
+ const ms = info.graphLoadTimeMs;
3724
+ loadTimeEl.textContent = ms >= 1000 ? (ms / 1000).toFixed(1) + "s" : ms + "ms";
3725
+ loadTimeEl.title = "Project scan + graph build time: " + ms + "ms";
3726
+ }
3683
3727
  hideServerOffline();
3684
3728
  updateLicenseBadge(info.plan, info.expiresAt);
3685
3729
  updateLicenseButton(info.plan);
@@ -35,11 +35,16 @@
35
35
  <button id="btn-change-project" class="top-btn" title="Switch project">OPEN</button>
36
36
  </div>
37
37
  <div class="top-controls">
38
+ <button id="btn-onboarding" class="top-btn cortex-btn" title="Generate onboarding document (Cortex)">ONBOARDING</button>
38
39
  <button id="btn-cycles" class="top-btn" title="Detect circular dependencies">CYCLES</button>
39
40
  <button id="btn-stats" class="top-btn" title="Toggle statistics panel">STATS</button>
40
41
  <button id="btn-shortcuts" class="top-btn" title="Keyboard shortcuts (?)">?</button>
41
42
  </div>
42
43
  <div class="stats" id="stats">
44
+ <div class="stat-block">
45
+ <span class="stat-label">LOADED</span>
46
+ <span class="stat-value" id="stat-load-time">---</span>
47
+ </div>
43
48
  <div class="stat-block">
44
49
  <span class="stat-label">NODES</span>
45
50
  <span class="stat-value" id="stat-files">---</span>
@@ -499,6 +504,21 @@
499
504
  </div>
500
505
  </div>
501
506
 
507
+ <!-- Cortex Upgrade Modal -->
508
+ <div id="cortex-modal" class="hidden">
509
+ <div class="cortex-modal-panel">
510
+ <button id="btn-close-cortex" class="cortex-close">&times;</button>
511
+ <div class="cortex-modal-icon">&#x1F9E0;</div>
512
+ <h3 class="cortex-modal-title">CORTEX REQUIRED</h3>
513
+ <p class="cortex-modal-desc">
514
+ <strong>Onboarding Document</strong> uses AI to scan your entire project and generate a comprehensive architecture guide — key files, patterns, dependencies, and team context.
515
+ </p>
516
+ <p id="cortex-plan-info" class="cortex-plan-info"></p>
517
+ <a id="cortex-upgrade-link" href="https://syke.cloud/dashboard/" target="_blank" class="cortex-upgrade-btn">UPGRADE TO CORTEX</a>
518
+ <p class="cortex-price-note">$29/mo · $249/yr · 14-day money-back guarantee</p>
519
+ </div>
520
+ </div>
521
+
502
522
  <!-- Bottom status bar -->
503
523
  <div id="bottom-bar">
504
524
  <span id="bottom-info">SYKE v--- · ---</span>
@@ -2628,6 +2628,111 @@ main {
2628
2628
  }
2629
2629
 
2630
2630
  /* ── Bottom status bar ── */
2631
+ /* ═══════════════════════════════════════════ */
2632
+ /* CORTEX BUTTON & MODAL */
2633
+ /* ═══════════════════════════════════════════ */
2634
+ .cortex-btn {
2635
+ background: linear-gradient(135deg, rgba(192, 132, 252, 0.15), rgba(0, 212, 255, 0.15)) !important;
2636
+ border: 1px solid rgba(192, 132, 252, 0.4) !important;
2637
+ color: #c084fc !important;
2638
+ position: relative;
2639
+ }
2640
+ .cortex-btn:hover {
2641
+ background: linear-gradient(135deg, rgba(192, 132, 252, 0.3), rgba(0, 212, 255, 0.3)) !important;
2642
+ border-color: rgba(192, 132, 252, 0.7) !important;
2643
+ box-shadow: 0 0 12px rgba(192, 132, 252, 0.3);
2644
+ }
2645
+
2646
+ #cortex-modal {
2647
+ position: fixed;
2648
+ inset: 0;
2649
+ z-index: 9000;
2650
+ background: rgba(0, 0, 0, 0.7);
2651
+ backdrop-filter: blur(6px);
2652
+ display: flex;
2653
+ align-items: center;
2654
+ justify-content: center;
2655
+ }
2656
+ #cortex-modal.hidden { display: none; }
2657
+
2658
+ .cortex-modal-panel {
2659
+ background: linear-gradient(160deg, #0d1b2a, #132244);
2660
+ border: 1px solid rgba(192, 132, 252, 0.3);
2661
+ border-radius: 12px;
2662
+ padding: 32px 36px;
2663
+ max-width: 420px;
2664
+ width: 90%;
2665
+ text-align: center;
2666
+ position: relative;
2667
+ box-shadow: 0 0 40px rgba(192, 132, 252, 0.15);
2668
+ }
2669
+ .cortex-close {
2670
+ position: absolute;
2671
+ top: 12px;
2672
+ right: 16px;
2673
+ background: none;
2674
+ border: none;
2675
+ color: #556677;
2676
+ font-size: 20px;
2677
+ cursor: pointer;
2678
+ }
2679
+ .cortex-close:hover { color: #fff; }
2680
+ .cortex-modal-icon {
2681
+ font-size: 36px;
2682
+ margin-bottom: 12px;
2683
+ }
2684
+ .cortex-modal-title {
2685
+ font-family: 'JetBrains Mono', monospace;
2686
+ font-size: 16px;
2687
+ color: #c084fc;
2688
+ letter-spacing: 2px;
2689
+ margin-bottom: 16px;
2690
+ }
2691
+ .cortex-modal-desc {
2692
+ font-size: 13px;
2693
+ color: #8899aa;
2694
+ line-height: 1.6;
2695
+ margin-bottom: 16px;
2696
+ }
2697
+ .cortex-modal-desc strong {
2698
+ color: #c8d6e5;
2699
+ }
2700
+ .cortex-plan-info {
2701
+ font-size: 12px;
2702
+ color: #00d4ff;
2703
+ margin-bottom: 20px;
2704
+ font-family: 'JetBrains Mono', monospace;
2705
+ }
2706
+ .cortex-upgrade-btn {
2707
+ display: inline-block;
2708
+ padding: 10px 28px;
2709
+ background: linear-gradient(135deg, #c084fc, #7c3aed);
2710
+ color: #fff;
2711
+ font-family: 'JetBrains Mono', monospace;
2712
+ font-size: 13px;
2713
+ font-weight: 600;
2714
+ letter-spacing: 1px;
2715
+ border-radius: 6px;
2716
+ text-decoration: none;
2717
+ transition: all 0.2s;
2718
+ }
2719
+ .cortex-upgrade-btn:hover {
2720
+ background: linear-gradient(135deg, #d4a5ff, #8b5cf6);
2721
+ box-shadow: 0 0 20px rgba(192, 132, 252, 0.4);
2722
+ transform: translateY(-1px);
2723
+ }
2724
+ .cortex-price-note {
2725
+ font-size: 11px;
2726
+ color: #556677;
2727
+ margin-top: 12px;
2728
+ }
2729
+
2730
+ /* Load time stat */
2731
+ #stat-load-time {
2732
+ color: #30d158;
2733
+ font-variant-numeric: tabular-nums;
2734
+ }
2735
+
2631
2736
  #bottom-bar {
2632
2737
  position: fixed;
2633
2738
  bottom: 0;
@@ -60,4 +60,4 @@ export declare function createWebServer(getGraphFn: () => DependencyGraph, initi
60
60
  success: boolean;
61
61
  activeProvider: string;
62
62
  forced: string | null;
63
- }): WebServerHandle;
63
+ }, getGraphLoadTimeMs?: () => number): WebServerHandle;
@@ -240,7 +240,7 @@ function acknowledgeWarnings() {
240
240
  function getAllWarnings() {
241
241
  return [...warningStore];
242
242
  }
243
- function createWebServer(getGraphFn, initialFileCache, switchProjectFn, getProjectRoot, getPackageName, getLicenseStatus, hasAIKeyFn, setLicenseKeyFn, setAIKeyFn, getAIInfoFn, setAIProviderFn) {
243
+ function createWebServer(getGraphFn, initialFileCache, switchProjectFn, getProjectRoot, getPackageName, getLicenseStatus, hasAIKeyFn, setLicenseKeyFn, setAIKeyFn, getAIInfoFn, setAIProviderFn, getGraphLoadTimeMs) {
244
244
  const app = (0, express_1.default)();
245
245
  app.use(express_1.default.json());
246
246
  /** Check if current license is Pro (includes pro_trial) */
@@ -842,6 +842,7 @@ function createWebServer(getGraphFn, initialFileCache, switchProjectFn, getProje
842
842
  aiProvider: aiInfo.activeProvider,
843
843
  aiKeys: aiInfo.configured,
844
844
  aiProviderForced: aiInfo.forced,
845
+ graphLoadTimeMs: getGraphLoadTimeMs ? getGraphLoadTimeMs() : 0,
845
846
  });
846
847
  });
847
848
  // POST /api/set-license-key — Set or remove license key via dashboard
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syke1/mcp-server",
3
- "version": "1.8.5",
3
+ "version": "1.8.6",
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",