@cachly-dev/mcp-server 0.8.0 → 0.8.2

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
@@ -47,7 +47,7 @@ import { Redis } from 'ioredis';
47
47
  const API_URL = process.env.CACHLY_API_URL ?? 'https://api.cachly.dev';
48
48
  const JWT = process.env.CACHLY_JWT ?? '';
49
49
  const EMBED_MODEL = process.env.CACHLY_EMBED_MODEL ?? '';
50
- const CURRENT_VERSION = '0.8.0';
50
+ const CURRENT_VERSION = '0.8.2';
51
51
  /**
52
52
  * ┌──────────────────────────────────────────────────────────────────────┐
53
53
  * │ EMBEDDING PROVIDER — pluggable, client-side first │
@@ -5007,6 +5007,19 @@ async function handleTool(name, args) {
5007
5007
  }
5008
5008
  }
5009
5009
  catch { /* non-critical */ }
5010
+ // ── 🌍 Knowledge Commons — community stats banner ───────────────────────
5011
+ // Fetch syndication stats and show a 1-liner: total lessons + confirms + weekly growth.
5012
+ // Non-fatal: never blocks session start if the API call fails.
5013
+ try {
5014
+ const commonsStats = await apiFetch('/api/v1/syndication/stats');
5015
+ if (commonsStats.total_lessons > 0) {
5016
+ lines.push(`🌍 **Commons:** ${commonsStats.total_lessons.toLocaleString()} lessons · ` +
5017
+ `${commonsStats.total_confirms.toLocaleString()} confirms · ` +
5018
+ `+${commonsStats.added_last_7_days} this week`);
5019
+ lines.push('');
5020
+ }
5021
+ }
5022
+ catch { /* non-critical — never block session start */ }
5010
5023
  return lines.join('\n');
5011
5024
  }
5012
5025
  // ── session_end ───────────────────────────────────────────────────────────