@cachly-dev/mcp-server 0.5.47 → 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 +65 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +89 -42
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,7 +517,7 @@ 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', 'bereitstellen', 'bereitstellung', 'déployer', 'déploiement', 'desplegar', 'despliegue', 'distribuire', 'distribuzione', 'implantar', 'implantação']],
|
|
520
|
+
['deploy', ['デプロイ', '部署', '배포', 'deployment', 'deploying', 'نشر', 'bereitstellen', 'bereitstellung', 'déployer', 'déploiement', 'desplegar', 'despliegue', 'distribuire', 'distribuzione', 'implantar', 'implantação']],
|
|
511
521
|
['deployment', ['デプロイ', '部署', '배포', 'deploy', 'bereitstellung', 'déploiement', 'despliegue', 'distribuzione', 'implantação']],
|
|
512
522
|
['container', ['コンテナ', '容器', '컨테이너', 'docker']],
|
|
513
523
|
['server', ['サーバー', 'サーバ', '服务器', '서버', 'سيرفر', 'שרת']],
|
|
@@ -519,6 +529,7 @@ const CROSS_LINGUAL_MAP = new Map([
|
|
|
519
529
|
['build', ['ビルド', '构建', '빌드', 'بناء', 'בנייה', 'bauen', 'construire', 'construir', 'costruire']],
|
|
520
530
|
['test', ['テスト', '测试', '테스트', 'اختبار', 'בדיקה', 'testen', 'tester', 'probar', 'testare', 'testar']],
|
|
521
531
|
['auth', ['認証', '认证', '인증', 'authentication', 'login', 'oauth', 'مصادقة', 'אימות', 'authentifizierung', 'authentification', 'autenticación', 'autenticazione', 'autenticação']],
|
|
532
|
+
['authentication', ['auth', 'مصادقة', 'אימות', '認証', '认证', '인증', 'login', 'oauth']],
|
|
522
533
|
['kubernetes', ['クベルネテス', 'k8s', 'kube']],
|
|
523
534
|
['network', ['ネットワーク', '网络', '네트워크', 'شبكة', 'רשת', 'netzwerk', 'réseau', 'red', 'rete', 'rede']],
|
|
524
535
|
['timeout', ['タイムアウト', '超时', '타임아웃', 'مهلة']],
|
|
@@ -557,7 +568,7 @@ const CROSS_LINGUAL_MAP = new Map([
|
|
|
557
568
|
['ci', ['pipeline', 'github actions', 'gitlab', 'jenkins', 'build']],
|
|
558
569
|
['cd', ['deploy', 'deployment', 'release']],
|
|
559
570
|
['debug', ['デバッグ', '调试', '디버그', 'debugging', 'breakpoint', 'تصحيح', 'איתור באגים', 'debuggen', 'déboguer', 'depurar']],
|
|
560
|
-
['crash', ['クラッシュ', '崩溃', '크래시', 'panic', 'segfault', 'انهيار', 'absturz', 'panne', 'plantage', 'caída', 'falha']],
|
|
571
|
+
['crash', ['クラッシュ', '崩溃', '크래시', 'panic', 'segfault', 'انهيار', 'קריסה', 'absturz', 'panne', 'plantage', 'caída', 'falha']],
|
|
561
572
|
['restart', ['再起動', '重启', '재시작', 'reboot', 'إعادة تشغيل', 'הפעלה מחדש', 'neustart', 'redémarrer', 'reiniciar', 'riavviare']],
|
|
562
573
|
['permission', ['権限', '权限', '권한', 'access', 'acl', 'chmod', 'صلاحية', 'הרשאה', 'berechtigung', 'berechtigungen', 'permiso', 'permesso', 'permissão']],
|
|
563
574
|
// Japanese katakana → English
|
|
@@ -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']],
|