@cachly-dev/mcp-server 0.5.46 → 0.5.48
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.d.ts +2 -0
- package/dist/index.js +88 -41
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +112 -65
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ declare function katakanaToRomaji(kata: string): string;
|
|
|
14
14
|
/**
|
|
15
15
|
* Arabic light stemmer — strips definite article and common prefix particles.
|
|
16
16
|
* Handles: ال (al-), و (wa-), ب (bi-), ل (li-), ف (fa-), ك (ka-).
|
|
17
|
+
* Runs iteratively (max 3 passes) so compound prefixes like فال- are fully
|
|
18
|
+
* resolved: فالخطأ → الخطأ → خطأ.
|
|
17
19
|
* Only strips when the result is still ≥ 3 chars to avoid over-stemming.
|
|
18
20
|
*/
|
|
19
21
|
declare function arabicLightStem(word: string): string;
|
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.5.
|
|
50
|
+
const CURRENT_VERSION = '0.5.48';
|
|
51
51
|
/**
|
|
52
52
|
* ┌──────────────────────────────────────────────────────────────────────┐
|
|
53
53
|
* │ EMBEDDING PROVIDER — pluggable, client-side first │
|
|
@@ -490,14 +490,24 @@ function katakanaToRomaji(kata) {
|
|
|
490
490
|
/**
|
|
491
491
|
* Arabic light stemmer — strips definite article and common prefix particles.
|
|
492
492
|
* Handles: ال (al-), و (wa-), ب (bi-), ل (li-), ف (fa-), ك (ka-).
|
|
493
|
+
* Runs iteratively (max 3 passes) so compound prefixes like فال- are fully
|
|
494
|
+
* resolved: فالخطأ → الخطأ → خطأ.
|
|
493
495
|
* Only strips when the result is still ≥ 3 chars to avoid over-stemming.
|
|
494
496
|
*/
|
|
495
497
|
function arabicLightStem(word) {
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
498
|
+
let result = word;
|
|
499
|
+
for (let i = 0; i < 3; i++) {
|
|
500
|
+
const prev = result;
|
|
501
|
+
if (result.startsWith('ال') && result.length > 4) {
|
|
502
|
+
result = result.slice(2);
|
|
503
|
+
}
|
|
504
|
+
else if (result.length > 3 && 'وبلفك'.includes(result[0]) && RTL_RE.test(result[1])) {
|
|
505
|
+
result = result.slice(1);
|
|
506
|
+
}
|
|
507
|
+
if (result === prev)
|
|
508
|
+
break; // stable — no more prefixes to strip
|
|
509
|
+
}
|
|
510
|
+
return result;
|
|
501
511
|
}
|
|
502
512
|
// ── Cross-lingual tech term dictionary ────────────────────────────────────────
|
|
503
513
|
// Maps tokens (English, Japanese katakana, Chinese, Korean, Arabic, Hebrew)
|
|
@@ -507,43 +517,44 @@ function arabicLightStem(word) {
|
|
|
507
517
|
// Keys must be lowercase. CJK values will be bigram-expanded at use time.
|
|
508
518
|
const CROSS_LINGUAL_MAP = new Map([
|
|
509
519
|
// English → all
|
|
510
|
-
['deploy', ['デプロイ', '部署', '배포', 'deployment', 'deploying']],
|
|
511
|
-
['deployment', ['デプロイ', '部署', '배포', 'deploy']],
|
|
520
|
+
['deploy', ['デプロイ', '部署', '배포', 'deployment', 'deploying', 'نشر', 'bereitstellen', 'bereitstellung', 'déployer', 'déploiement', 'desplegar', 'despliegue', 'distribuire', 'distribuzione', 'implantar', 'implantação']],
|
|
521
|
+
['deployment', ['デプロイ', '部署', '배포', 'deploy', 'bereitstellung', 'déploiement', 'despliegue', 'distribuzione', 'implantação']],
|
|
512
522
|
['container', ['コンテナ', '容器', '컨테이너', 'docker']],
|
|
513
523
|
['server', ['サーバー', 'サーバ', '服务器', '서버', 'سيرفر', 'שרת']],
|
|
514
|
-
['database', ['データベース', '数据库', '데이터베이스', 'db', 'قاعدة البيانات']],
|
|
524
|
+
['database', ['データベース', '数据库', '데이터베이스', 'db', 'قاعدة البيانات', 'datenbank', 'base de données', 'base de datos', 'banco de dados']],
|
|
515
525
|
['cache', ['キャッシュ', '缓存', '캐시', 'كاش', 'מטמון']],
|
|
516
|
-
['error', ['エラー', '错误', '오류', 'خطأ', 'שגיאה', 'exception', 'err']],
|
|
526
|
+
['error', ['エラー', '错误', '오류', 'خطأ', 'שגיאה', 'exception', 'err', 'fehler', 'erreur', 'fallo', 'errore', 'erro']],
|
|
517
527
|
['bug', ['バグ', '缺陷', '버그', 'issue', 'defect', 'خلل']],
|
|
518
|
-
['fix', ['修正', '修复', '수정', 'bugfix', 'patch', 'hotfix', 'إصلاح', 'תיקון']],
|
|
519
|
-
['build', ['ビルド', '构建', '빌드', 'بناء', 'בנייה']],
|
|
520
|
-
['test', ['テスト', '测试', '테스트', 'اختبار', 'בדיקה']],
|
|
521
|
-
['auth', ['認証', '认证', '인증', 'authentication', 'login', 'oauth', 'مصادقة', 'אימות']],
|
|
528
|
+
['fix', ['修正', '修复', '수정', 'bugfix', 'patch', 'hotfix', 'إصلاح', 'תיקון', 'beheben', 'behoben', 'réparer', 'correction', 'arreglar', 'corrección', 'correggere', 'corrigir']],
|
|
529
|
+
['build', ['ビルド', '构建', '빌드', 'بناء', 'בנייה', 'bauen', 'construire', 'construir', 'costruire']],
|
|
530
|
+
['test', ['テスト', '测试', '테스트', 'اختبار', 'בדיקה', 'testen', 'tester', 'probar', 'testare', 'testar']],
|
|
531
|
+
['auth', ['認証', '认证', '인증', 'authentication', 'login', 'oauth', 'مصادقة', 'אימות', 'authentifizierung', 'authentification', 'autenticación', 'autenticazione', 'autenticação']],
|
|
532
|
+
['authentication', ['auth', 'مصادقة', 'אימות', '認証', '认证', '인증', 'login', 'oauth']],
|
|
522
533
|
['kubernetes', ['クベルネテス', 'k8s', 'kube']],
|
|
523
|
-
['network', ['ネットワーク', '网络', '네트워크', 'شبكة', 'רשת']],
|
|
534
|
+
['network', ['ネットワーク', '网络', '네트워크', 'شبكة', 'רשת', 'netzwerk', 'réseau', 'red', 'rete', 'rede']],
|
|
524
535
|
['timeout', ['タイムアウト', '超时', '타임아웃', 'مهلة']],
|
|
525
|
-
['memory', ['メモリ', '内存', '메모리', 'ram', 'ذاكرة', 'זיכרון']],
|
|
526
|
-
['config', ['設定', '配置', '설정', 'configuration', 'settings', 'conf', 'إعدادات', 'הגדרות']],
|
|
527
|
-
['install', ['インストール', '安装', '설치', 'تثبيت', 'התקנה']],
|
|
528
|
-
['update', ['アップデート', '更新', '업데이트', 'upgrade', 'تحديث', 'עדכון']],
|
|
529
|
-
['log', ['ログ', '日志', '로그', 'logging', 'سجل', 'יומן']],
|
|
536
|
+
['memory', ['メモリ', '内存', '메모리', 'ram', 'ذاكرة', 'זיכרון', 'speicher', 'mémoire', 'memoria', 'memória']],
|
|
537
|
+
['config', ['設定', '配置', '설정', 'configuration', 'settings', 'conf', 'إعدادات', 'הגדרות', 'konfiguration', 'einstellungen', 'configuración', 'configurazione', 'configuração']],
|
|
538
|
+
['install', ['インストール', '安装', '설치', 'تثبيت', 'התקנה', 'installieren', 'installer', 'instalar', 'installare']],
|
|
539
|
+
['update', ['アップデート', '更新', '업데이트', 'upgrade', 'تحديث', 'עדכון', 'aktualisieren', 'aktualisierung', 'actualizar', 'aggiornare', 'atualizar']],
|
|
540
|
+
['log', ['ログ', '日志', '로그', 'logging', 'سجل', 'יומן', 'protokoll', 'protokolle', 'journal', 'registro']],
|
|
530
541
|
['port', ['ポート', '端口', '포트', 'منفذ', 'פורט']],
|
|
531
542
|
['file', ['ファイル', '文件', '파일', 'ملف', 'קובץ']],
|
|
532
|
-
['image', ['イメージ', '镜像', '이미지', 'صورة', 'תמונה']],
|
|
543
|
+
['image', ['イメージ', '镜像', '이미지', 'صورة', 'תמונה', 'abbild', 'imagen', 'imagem']],
|
|
533
544
|
['volume', ['ボリューム', '卷', '볼륨']],
|
|
534
545
|
['cluster', ['クラスター', '集群', '클러스터']],
|
|
535
546
|
['node', ['ノード', '节点', '노드']],
|
|
536
|
-
['service', ['サービス', '服务', '서비스', 'svc', 'خدمة', 'שירות']],
|
|
547
|
+
['service', ['サービス', '服务', '서비스', 'svc', 'خدمة', 'שירות', 'dienst', 'servicio', 'servizio', 'serviço']],
|
|
537
548
|
['certificate', ['証明書', '证书', '인증서', 'cert', 'ssl', 'tls', 'شهادة', 'תעודה']],
|
|
538
549
|
['password', ['パスワード', '密码', '비밀번호', 'passwd', 'pwd', 'كلمة المرور', 'סיסמה']],
|
|
539
550
|
['token', ['トークン', '令牌', '토큰', 'jwt', 'secret', 'رمز', 'אסימון']],
|
|
540
551
|
['health', ['ヘルス', '健康', '헬스', 'healthcheck', 'probe', 'صحة']],
|
|
541
552
|
['migration', ['マイグレーション', '迁移', '마이그레이션', 'migrate', 'هجرة']],
|
|
542
|
-
['backup', ['バックアップ', '备份', '백업', 'نسخ احتياطي', 'גיבוי']],
|
|
543
|
-
['monitor', ['モニター', '监控', '모니터링', 'monitoring', 'metrics', 'alert', 'مراقبة', 'ניטור']],
|
|
544
|
-
['performance', ['パフォーマンス', '性能', '성능', 'latency', 'throughput']],
|
|
545
|
-
['connection', ['接続', '连接', '연결', 'conn', 'socket', 'اتصال', 'חיבור']],
|
|
546
|
-
['queue', ['キュー', '队列', '큐', 'طابور']],
|
|
553
|
+
['backup', ['バックアップ', '备份', '백업', 'نسخ احتياطي', 'גיבוי', 'sicherung', 'sauvegarde', 'respaldo', 'cópia de segurança']],
|
|
554
|
+
['monitor', ['モニター', '监控', '모니터링', 'monitoring', 'metrics', 'alert', 'مراقبة', 'ניטור', 'überwachung', 'surveiller', 'monitoreo', 'monitorare', 'monitorar']],
|
|
555
|
+
['performance', ['パフォーマンス', '性能', '성능', 'latency', 'throughput', 'leistung', 'performances', 'rendimiento', 'prestazioni', 'desempenho']],
|
|
556
|
+
['connection', ['接続', '连接', '연결', 'conn', 'socket', 'اتصال', 'חיבור', 'verbindung', 'connexion', 'conexión', 'connessione', 'conexão']],
|
|
557
|
+
['queue', ['キュー', '队列', '큐', 'طابور', 'warteschlange', 'file d\'attente', 'cola', 'coda', 'fila']],
|
|
547
558
|
['redis', ['レディス', '레디스']],
|
|
548
559
|
['nginx', ['エンジンエックス']],
|
|
549
560
|
['linux', ['リナックス', 'لينكس']],
|
|
@@ -556,10 +567,10 @@ const CROSS_LINGUAL_MAP = new Map([
|
|
|
556
567
|
['git', ['version control', 'repo', 'repository', 'commit', 'push', 'pull']],
|
|
557
568
|
['ci', ['pipeline', 'github actions', 'gitlab', 'jenkins', 'build']],
|
|
558
569
|
['cd', ['deploy', 'deployment', 'release']],
|
|
559
|
-
['debug', ['デバッグ', '调试', '디버그', 'debugging', 'breakpoint', 'تصحيح', 'איתור באגים']],
|
|
560
|
-
['crash', ['クラッシュ', '崩溃', '크래시', 'panic', 'segfault', 'انهيار']],
|
|
561
|
-
['restart', ['再起動', '重启', '재시작', 'reboot', 'إعادة تشغيل', 'הפעלה מחדש']],
|
|
562
|
-
['permission', ['権限', '权限', '권한', 'access', 'acl', 'chmod', 'صلاحية', 'הרשאה']],
|
|
570
|
+
['debug', ['デバッグ', '调试', '디버그', 'debugging', 'breakpoint', 'تصحيح', 'איתור באגים', 'debuggen', 'déboguer', 'depurar']],
|
|
571
|
+
['crash', ['クラッシュ', '崩溃', '크래시', 'panic', 'segfault', 'انهيار', 'קריסה', 'absturz', 'panne', 'plantage', 'caída', 'falha']],
|
|
572
|
+
['restart', ['再起動', '重启', '재시작', 'reboot', 'إعادة تشغيل', 'הפעלה מחדש', 'neustart', 'redémarrer', 'reiniciar', 'riavviare']],
|
|
573
|
+
['permission', ['権限', '权限', '권한', 'access', 'acl', 'chmod', 'صلاحية', 'הרשאה', 'berechtigung', 'berechtigungen', 'permiso', 'permesso', 'permissão']],
|
|
563
574
|
// Japanese katakana → English
|
|
564
575
|
['デプロイ', ['deploy', 'deployment']],
|
|
565
576
|
['コンテナ', ['container', 'docker']],
|
|
@@ -662,39 +673,75 @@ const CROSS_LINGUAL_MAP = new Map([
|
|
|
662
673
|
['إصلاح', ['fix']],
|
|
663
674
|
['بناء', ['build']],
|
|
664
675
|
['اختبار', ['test']],
|
|
665
|
-
['مصادقة', ['auth']],
|
|
666
|
-
['إعدادات', ['config']],
|
|
676
|
+
['مصادقة', ['auth', 'authentication']],
|
|
677
|
+
['إعدادات', ['config', 'configuration']],
|
|
667
678
|
['تثبيت', ['install']],
|
|
668
|
-
['تحديث', ['update']],
|
|
679
|
+
['تحديث', ['update', 'upgrade']],
|
|
669
680
|
['سجل', ['log']],
|
|
670
681
|
['صورة', ['image']],
|
|
671
682
|
['خدمة', ['service']],
|
|
672
683
|
['نسخ احتياطي', ['backup']],
|
|
673
|
-
['مراقبة', ['monitor']],
|
|
684
|
+
['مراقبة', ['monitor', 'monitoring']],
|
|
674
685
|
['اتصال', ['connection']],
|
|
675
686
|
['ذاكرة', ['memory']],
|
|
676
|
-
['تصحيح', ['debug']],
|
|
687
|
+
['تصحيح', ['debug', 'debugging']],
|
|
677
688
|
['شبكة', ['network']],
|
|
689
|
+
// Additional Arabic → English (covering blog post examples + common terms)
|
|
690
|
+
['نشر', ['deploy', 'deployment']],
|
|
691
|
+
['انهيار', ['crash', 'panic']],
|
|
692
|
+
['طابور', ['queue']],
|
|
693
|
+
['رمز', ['token', 'secret']],
|
|
694
|
+
['كاش', ['cache']],
|
|
695
|
+
['منفذ', ['port']],
|
|
696
|
+
['سيرفر', ['server']],
|
|
697
|
+
['قاعدة البيانات', ['database', 'db']],
|
|
698
|
+
['إعادة تشغيل', ['restart', 'reboot']],
|
|
699
|
+
['صلاحية', ['permission', 'access']],
|
|
700
|
+
['تطبيق', ['application', 'app']],
|
|
701
|
+
['مفتاح', ['key', 'token', 'secret']],
|
|
702
|
+
['واجهة برمجية', ['api', 'interface']],
|
|
703
|
+
['فحص الصحة', ['healthcheck', 'health']],
|
|
704
|
+
['حاوية', ['container', 'docker']],
|
|
705
|
+
['عقدة', ['node']],
|
|
706
|
+
['سرعة', ['performance', 'speed']],
|
|
707
|
+
['قرص', ['disk', 'storage']],
|
|
708
|
+
['خادم', ['server']],
|
|
709
|
+
['برنامج', ['application', 'software', 'app']],
|
|
678
710
|
// Hebrew → English
|
|
679
711
|
['שגיאה', ['error']],
|
|
680
712
|
['תיקון', ['fix']],
|
|
681
713
|
['בנייה', ['build']],
|
|
682
714
|
['בדיקה', ['test']],
|
|
683
|
-
['אימות', ['auth']],
|
|
684
|
-
['הגדרות', ['config']],
|
|
715
|
+
['אימות', ['auth', 'authentication']],
|
|
716
|
+
['הגדרות', ['config', 'configuration']],
|
|
685
717
|
['התקנה', ['install']],
|
|
686
|
-
['עדכון', ['update']],
|
|
718
|
+
['עדכון', ['update', 'upgrade']],
|
|
687
719
|
['יומן', ['log']],
|
|
688
720
|
['שרת', ['server']],
|
|
689
721
|
['שירות', ['service']],
|
|
690
722
|
['גיבוי', ['backup']],
|
|
691
|
-
['ניטור', ['monitor']],
|
|
723
|
+
['ניטור', ['monitor', 'monitoring']],
|
|
692
724
|
['חיבור', ['connection']],
|
|
693
725
|
['זיכרון', ['memory']],
|
|
694
726
|
['רשת', ['network']],
|
|
695
727
|
['תמונה', ['image']],
|
|
696
728
|
['סיסמה', ['password']],
|
|
697
|
-
['הרשאה', ['permission']],
|
|
729
|
+
['הרשאה', ['permission', 'access']],
|
|
730
|
+
// Additional Hebrew → English (covering blog post examples + common terms)
|
|
731
|
+
['קריסה', ['crash', 'panic']],
|
|
732
|
+
['תור', ['queue']],
|
|
733
|
+
['מטמון', ['cache']],
|
|
734
|
+
['אסימון', ['token', 'secret']],
|
|
735
|
+
['פורט', ['port']],
|
|
736
|
+
['איתור באגים', ['debug', 'debugging']],
|
|
737
|
+
['הפעלה מחדש', ['restart', 'reboot']],
|
|
738
|
+
['מיכל', ['container', 'docker']],
|
|
739
|
+
['יישום', ['application', 'app']],
|
|
740
|
+
['מפתח', ['key', 'token', 'secret']],
|
|
741
|
+
['בדיקת תקינות', ['healthcheck', 'health']],
|
|
742
|
+
['ממשק תכנות', ['api', 'interface']],
|
|
743
|
+
['ביצועים', ['performance']],
|
|
744
|
+
['אחסון', ['storage', 'disk']],
|
|
698
745
|
// ── European languages → English ─────────────────────────────────────────
|
|
699
746
|
// German (Deutsch) → English
|
|
700
747
|
['fehler', ['error', 'err']],
|