@cachly-dev/mcp-server 0.5.44 → 0.5.46

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cachly-dev/mcp-server",
3
- "version": "0.5.44",
3
+ "version": "0.5.46",
4
4
  "mcpName": "io.github.cachly-dev/mcp-server",
5
5
  "description": "AI memory brain for Claude Code, Cursor, Copilot & Windsurf — persistent sessions, lessons learned, semantic search, team brain. 51 MCP tools.",
6
6
  "type": "module",
package/src/index.ts CHANGED
@@ -708,6 +708,192 @@ const CROSS_LINGUAL_MAP = new Map<string, string[]>([
708
708
  ['תמונה', ['image']],
709
709
  ['סיסמה', ['password']],
710
710
  ['הרשאה', ['permission']],
711
+
712
+ // ── European languages → English ─────────────────────────────────────────
713
+ // German (Deutsch) → English
714
+ ['fehler', ['error', 'err']],
715
+ ['absturz', ['crash', 'panic']],
716
+ ['bug', ['bug', 'issue']], // same word, keep for completeness
717
+ ['beheben', ['fix', 'bugfix']],
718
+ ['behoben', ['fix', 'fixed']],
719
+ ['lösung', ['solution', 'fix']],
720
+ ['bauen', ['build']],
721
+ ['testen', ['test']],
722
+ ['authentifizierung',['auth', 'authentication']],
723
+ ['konfiguration', ['config', 'configuration']],
724
+ ['einstellungen', ['config', 'settings']],
725
+ ['installieren', ['install']],
726
+ ['installiert', ['install', 'installed']],
727
+ ['aktualisieren', ['update', 'upgrade']],
728
+ ['aktualisierung', ['update', 'upgrade']],
729
+ ['protokoll', ['log']],
730
+ ['protokolle', ['log', 'logs']],
731
+ ['abbild', ['image']],
732
+ ['knoten', ['node']],
733
+ ['dienst', ['service']],
734
+ ['sicherung', ['backup']],
735
+ ['überwachung', ['monitor', 'monitoring']],
736
+ ['verbindung', ['connection', 'conn']],
737
+ ['warteschlange', ['queue']],
738
+ ['leistung', ['performance']],
739
+ ['speicher', ['memory', 'storage']],
740
+ ['debuggen', ['debug', 'debugging']],
741
+ ['neustart', ['restart', 'reboot']],
742
+ ['berechtigung', ['permission', 'access']],
743
+ ['berechtigungen', ['permission', 'access', 'acl']],
744
+ ['netzwerk', ['network']],
745
+ ['datenbank', ['database', 'db']],
746
+ ['bereitstellen', ['deploy', 'deployment']],
747
+ ['bereitstellung', ['deploy', 'deployment']],
748
+ // 'container' and 'server' are the same in German/French/Spanish/Italian/Portuguese
749
+ ['kaputt', ['broken', 'error', 'crash']],
750
+ ['funktioniert', ['works', 'working']],
751
+ ['geht nicht', ['not working', 'broken', 'error']],
752
+ ['schlüssel', ['key', 'token', 'secret']],
753
+ ['zertifikat', ['certificate', 'cert', 'ssl', 'tls']],
754
+ ['umgebung', ['environment', 'env']],
755
+ ['variablen', ['variables', 'env', 'environment']],
756
+ ['aufgabe', ['task', 'job']],
757
+ ['wartung', ['maintenance']],
758
+ ['speicherleck', ['memory leak', 'memory']],
759
+ ['schnittstelle', ['interface', 'api']],
760
+
761
+ // French (Français) → English
762
+ ['erreur', ['error', 'err']],
763
+ ['réparer', ['fix']],
764
+ ['correction', ['fix', 'bugfix']],
765
+ ['construire', ['build']],
766
+ ['tester', ['test']],
767
+ ['authentification',['auth', 'authentication']],
768
+ ['configuration', ['config', 'configuration']],
769
+ ['installer', ['install']],
770
+ ['installation', ['install']],
771
+ ['mettre', ['update', 'upgrade']],
772
+ ['journal', ['log', 'logs']],
773
+ ['nœud', ['node']],
774
+ ['sauvegarde', ['backup']],
775
+ ['surveiller', ['monitor', 'monitoring']],
776
+ ['connexion', ['connection']],
777
+ ['mémoire', ['memory']],
778
+ ['déboguer', ['debug']],
779
+ ['redémarrer', ['restart', 'reboot']],
780
+ ['réseau', ['network']],
781
+ ['base de données', ['database', 'db']],
782
+ ['déployer', ['deploy']],
783
+ ['déploiement', ['deploy', 'deployment']],
784
+ ['clé', ['key', 'token']],
785
+ ['certificat', ['certificate', 'cert', 'ssl']],
786
+ ['environnement', ['environment', 'env']],
787
+ ['panne', ['crash', 'outage', 'failure']],
788
+ ['plantage', ['crash', 'panic']],
789
+ ['interface', ['interface', 'api']],
790
+ ['performances', ['performance']],
791
+ ['stockage', ['storage', 'disk']],
792
+ ['file attente', ['queue']],
793
+
794
+ // Spanish (Español) → English
795
+ ['arreglar', ['fix']],
796
+ ['corrección', ['fix', 'bugfix']],
797
+ ['construir', ['build']],
798
+ ['probar', ['test']],
799
+ ['autenticación', ['auth', 'authentication']],
800
+ ['configuración', ['config', 'configuration']],
801
+ ['instalar', ['install']],
802
+ ['actualizar', ['update', 'upgrade']],
803
+ ['actualización', ['update', 'upgrade']],
804
+ ['registro', ['log', 'registry']],
805
+ ['nodo', ['node']],
806
+ ['servicio', ['service']],
807
+ ['contraseña', ['password']],
808
+ ['copia de seguridad',['backup']],
809
+ ['respaldo', ['backup']],
810
+ ['monitorear', ['monitor']],
811
+ ['monitoreo', ['monitoring']],
812
+ ['conexión', ['connection']],
813
+ ['rendimiento', ['performance']],
814
+ ['memoria', ['memory']],
815
+ ['depurar', ['debug']],
816
+ ['fallo', ['crash', 'failure', 'error']],
817
+ ['caída', ['crash', 'outage']],
818
+ ['reiniciar', ['restart', 'reboot']],
819
+ ['permiso', ['permission']],
820
+ ['permisos', ['permission', 'access']],
821
+ ['red', ['network']],
822
+ ['base de datos', ['database', 'db']],
823
+ ['desplegar', ['deploy']],
824
+ ['despliegue', ['deploy', 'deployment']],
825
+ ['clave', ['key', 'token', 'secret']],
826
+ ['certificado', ['certificate', 'cert', 'ssl']],
827
+ ['entorno', ['environment', 'env']],
828
+ ['cola', ['queue']],
829
+ ['interfaz', ['interface', 'api']],
830
+ ['imagen', ['image']],
831
+
832
+ // Italian (Italiano) → English
833
+ ['errore', ['error', 'err']],
834
+ ['correggere', ['fix']],
835
+ ['costruire', ['build']],
836
+ ['testare', ['test']],
837
+ ['autenticazione', ['auth', 'authentication']],
838
+ ['configurazione', ['config', 'configuration']],
839
+ ['installare', ['install']],
840
+ ['aggiornare', ['update', 'upgrade']],
841
+ ['aggiornamento', ['update', 'upgrade']],
842
+ ['registro', ['log']],
843
+ ['nodo', ['node']],
844
+ ['servizio', ['service']],
845
+ ['password', ['password']],
846
+ ['backup', ['backup']],
847
+ ['monitorare', ['monitor']],
848
+ ['connessione', ['connection']],
849
+ ['prestazioni', ['performance']],
850
+ ['memoria', ['memory']],
851
+ ['debug', ['debug']],
852
+ ['arresto anomalo', ['crash']],
853
+ ['riavviare', ['restart']],
854
+ ['permesso', ['permission']],
855
+ ['rete', ['network']],
856
+ ['database', ['database', 'db']],
857
+ ['distribuire', ['deploy']],
858
+ ['distribuzione', ['deploy', 'deployment']],
859
+ ['chiave', ['key', 'token', 'secret']],
860
+ ['certificato', ['certificate', 'cert']],
861
+ ['ambiente', ['environment', 'env']],
862
+ ['coda', ['queue']],
863
+ ['immagine', ['image']],
864
+
865
+ // Portuguese (Português) → English
866
+ ['erro', ['error', 'err']],
867
+ ['corrigir', ['fix']],
868
+ ['construir', ['build']],
869
+ ['testar', ['test']],
870
+ ['autenticação', ['auth', 'authentication']],
871
+ ['configuração', ['config', 'configuration']],
872
+ ['instalar', ['install']],
873
+ ['atualizar', ['update', 'upgrade']],
874
+ ['atualização', ['update', 'upgrade']],
875
+ ['registro', ['log']],
876
+ ['nó', ['node']],
877
+ ['serviço', ['service']],
878
+ ['senha', ['password']],
879
+ ['cópia de segurança',['backup']],
880
+ ['monitorar', ['monitor']],
881
+ ['conexão', ['connection']],
882
+ ['desempenho', ['performance']],
883
+ ['memória', ['memory']],
884
+ ['depurar', ['debug']],
885
+ ['falha', ['crash', 'failure', 'error']],
886
+ ['reiniciar', ['restart']],
887
+ ['permissão', ['permission']],
888
+ ['rede', ['network']],
889
+ ['banco de dados', ['database', 'db']],
890
+ ['implantar', ['deploy']],
891
+ ['implantação', ['deploy', 'deployment']],
892
+ ['chave', ['key', 'token', 'secret']],
893
+ ['certificado', ['certificate', 'cert']],
894
+ ['ambiente', ['environment', 'env']],
895
+ ['fila', ['queue']],
896
+ ['imagem', ['image']],
711
897
  ]);
712
898
 
713
899
  /**
@@ -1846,6 +2032,10 @@ const TOOLS = [
1846
2032
  type: 'string',
1847
2033
  description: 'Current AI provider (e.g. "claude-code", "copilot", "cursor", "windsurf"). Shown in the briefing header and saved so the next provider can see who was last active.',
1848
2034
  },
2035
+ workspace_path: {
2036
+ type: 'string',
2037
+ description: 'Absolute path to the project root. If no session_end was found (e.g. context limit hit), reads git log to reconstruct what happened since last session.',
2038
+ },
1849
2039
  },
1850
2040
  required: ['instance_id'],
1851
2041
  },
@@ -3833,7 +4023,7 @@ async function handleTool(name: string, args: Record<string, unknown>): Promise<
3833
4023
 
3834
4024
  // ── session_start ─────────────────────────────────────────────────────────
3835
4025
  case 'session_start': {
3836
- const { instance_id, focus = '', author = '', provider = '' } = args as { instance_id: string; focus?: string; author?: string; provider?: string };
4026
+ const { instance_id, focus = '', author = '', provider = '', workspace_path = '' } = args as { instance_id: string; focus?: string; author?: string; provider?: string; workspace_path?: string };
3837
4027
  const redis = await getConnection(instance_id);
3838
4028
 
3839
4029
  // 1. Scan all best-solution lessons
@@ -3994,6 +4184,33 @@ async function handleTool(name: string, args: Record<string, unknown>): Promise<
3994
4184
  } catch { /* ignore */ }
3995
4185
  }
3996
4186
 
4187
+ // ── Git reconstruction — when no session_end + workspace_path given ─────
4188
+ if (workspace_path && !lastSession) {
4189
+ try {
4190
+ const { execSync } = await import('node:child_process');
4191
+ const gitLog = execSync(
4192
+ `git -C "${workspace_path}" log --oneline --format="%h %s" -15 2>/dev/null`,
4193
+ { encoding: 'utf-8', timeout: 5000 },
4194
+ ).trim();
4195
+ const gitDiff = execSync(
4196
+ `git -C "${workspace_path}" diff --stat HEAD~3 2>/dev/null || git -C "${workspace_path}" diff --stat 2>/dev/null`,
4197
+ { encoding: 'utf-8', timeout: 5000 },
4198
+ ).trim();
4199
+ if (gitLog) {
4200
+ lines.push(`🔍 **Git reconstruction** (no session_end found — reconstructed from git):`);
4201
+ for (const l of gitLog.split('\n').slice(0, 8)) lines.push(` ${l}`);
4202
+ if (gitDiff) {
4203
+ const diffLines = gitDiff.split('\n').filter(l => l.includes('|') || l.includes('changed'));
4204
+ if (diffLines.length > 0) {
4205
+ lines.push(` **Recent changes:**`);
4206
+ for (const dl of diffLines.slice(0, 5)) lines.push(` ${dl.trim()}`);
4207
+ }
4208
+ }
4209
+ lines.push('');
4210
+ }
4211
+ } catch { /* git not available or no repo — silent */ }
4212
+ }
4213
+
3997
4214
  // Last session
3998
4215
  if (lastSession) {
3999
4216
  const ago = Math.round((Date.now() - new Date(lastSession.ts).getTime()) / 60000);