@cachly-dev/mcp-server 0.10.139 → 0.10.141
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/README.md +19 -5
- package/dist/src/bench/cachly-bench.js +2 -2
- package/dist/src/brand-wachhund.js +2 -0
- package/dist/src/doctor.js +2 -2
- package/dist/src/ersetzung-vorschlag.js +1 -0
- package/dist/src/etiketten.js +1 -0
- package/dist/src/handlers/advanced.js +10 -10
- package/dist/src/handlers/brain.js +63 -63
- package/dist/src/index.js +98 -97
- package/dist/src/rangfolge-stellschrauben.js +1 -1
- package/dist/src/rangfolge.js +1 -1
- package/dist/src/recall-trichter.js +1 -0
- package/dist/src/stdin-ende.js +1 -0
- package/dist/src/tools.js +2 -2
- package/dist/src/utils.js +1 -1
- package/dist/src/werkzeug-auswahl.js +2 -0
- package/dist/src/zeit-normalisieren.js +1 -1
- package/dist/src/zulassung-und-urteil.js +1 -0
- package/glama.json +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
const E=75,o=.5,t=.7,L=1,_=.35,G=.
|
|
1
|
+
const E=75,o=.5,t=.7,L=1,_=.35,N=.35,G=.05,S=1;export{G as ABLEHN_ABSTAND,N as CKG_BELEG_SCHWELLE,o as EINGANG_SCHWELLE,t as EINGANG_SORTIER_GEWICHT,S as SELTENHEIT_LAENGE_B,_ as SINN_BELEG_SCHWELLE,E as SINN_TOPF,L as WORT_BELEG_SCHWELLE};
|
package/dist/src/rangfolge.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{kosinus as
|
|
1
|
+
import{kosinus as f}from"./bedeutung.js";function p(n){return new Set(n.toLowerCase().replace(/ä/g,"ae").replace(/ö/g,"oe").replace(/ü/g,"ue").replace(/ß/g,"ss").split(/[^a-z0-9]+/).filter(e=>e.length>3))}function k(n){return n}class z{df=new Map;anzahl=0;mittlereWortzahl=1;constructor(e){this.anzahl=e.length;let o=0;for(const s of e){const i=new Set;for(const l of p(s)){const r=l;i.add(r),this.df.set(r,(this.df.get(r)??0)+1)}o+=i.size}this.mittlereWortzahl=e.length>0?Math.max(1,o/e.length):1}wert(e){return Math.log((this.anzahl+1)/((this.df.get(e)??0)+1))}deckung(e,o){let s=0,i=0;for(const t of e){const a=this.wert(t);s+=a,o.has(t)&&(i+=a)}const l=s>0?i/s:0;if(l===0)return 0;const r=1-m+m*o.size/this.mittlereWortzahl;return r>0?l/r:l}besterZeuge(e,o){let s=0;const i=Math.log(this.anzahl+1);if(i<=0)return 0;for(const l of e){if(!o.has(l))continue;const r=this.wert(l)/i;r>s&&(s=r)}return s}}function u(n){const e=n.filter(t=>Number.isFinite(t)&&t>-2);if(e.length===0)return n.map(()=>0);let o=1/0,s=-1/0;for(const t of e)t<o&&(o=t),t>s&&(s=t);if(s===o)return n.map(()=>.5);const i=n.map(t=>Number.isFinite(t)&&t>-2?(t-o)/(s-o):-1);let l=0;for(const t of i)t>=0&&(l+=t);const r=l/e.length;return i.map(t=>t>=0?t:r)}function d(n,e,o=.25){if(e.length===0)return n;const s=n.length,i=new Array(s).fill(0);for(const l of e)if(l.length===s)for(let r=0;r<s;r++)i[r]+=l[r]/e.length;return n.map((l,r)=>(1-o)*l+o*i[r])}const c={text:1,thema:0,rueckkopplung:.3,seltenheit:1.3,zeuge:.5};import{ABLEHN_ABSTAND as h,SELTENHEIT_LAENGE_B as m}from"./rangfolge-stellschrauben.js";function S(n){return n===null||n>=h?null:"\u2696\uFE0F **Kein klarer Bester** \u2014 Platz 1 liegt nur "+n.toFixed(2)+` Punkte vor Platz 2 (Schwelle ${h}). Bei so knappem Abstand ist die Reihenfolge ein Ratespiel: gemessen treffen solche Antworten 6- bis 9-mal h\xE4ufiger daneben als sonst. Die Treffer unten sind das N\xE4chstliegende, kein Befund.`}function T(n,e=c){const o=u(n.map(t=>t.naeheText)),s=u(n.map(t=>t.naeheThema)),i=u(n.map(t=>t.naeheRueckkopplung)),l=u(n.map(t=>t.besterZeuge??0)),r=e.zeuge??0;return n.map((t,a)=>e.text*o[a]+e.thema*s[a]+e.rueckkopplung*i[a]+e.seltenheit*t.seltenheitsDeckung+r*l[a])}function A(n,e=c,o=.3){const s=u(n.map(r=>r.naeheText)),i=u(n.map(r=>r.naeheThema)),l=u(n.map(r=>r.naeheRueckkopplung));return n.map((r,t)=>e.text*Math.log(o+s[t])+e.thema*Math.log(o+i[t])+e.rueckkopplung*Math.log(o+l[t])+e.seltenheit*Math.log(o+r.seltenheitsDeckung))}function E(n,e){return n&&e&&e.length>0?f(n,e):-2}export{h as ABLEHN_ABSTAND,c as GEWICHTE,z as Seltenheit,T as bewerteTopf,A as bewerteTopfStreng,k as grobStamm,p as inhaltsWoerter,S as knapperSiegSatz,E as naeheOderLuecke,d as reichereAn,u as spreizeImTopf};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{inhaltsWoerter as m,grobStamm as p}from"./rangfolge.js";import{themenNaehe as f}from"./ersetzung-vorschlag.js";const k=500,g=24*3600*1e3;function E(e){return`cachly:stats:suchprotokoll:${e}`}function F(e){return`cachly:stats:recall-trichter:${e}`}function l(e){return new Set([...m(e)].map(p))}function S(e,r){const n=l(e),s=l(r);if(n.size===0||s.size===0)return 0;let o=0;for(const i of n)s.has(i)&&o++;return o/(n.size+s.size-o)}function w(e,r,n){return f(e,n.topic)>=.5?!0:S(r,n.what_worked??"")>=.3}function x(e,r){return f(r.frage,e)>=.5}function N(e,r,n,s,o=Date.now()){const i=s.filter(t=>t.topic!==e&&w(e,r,t));if(i.length===0)return"ohne-vorwissen";const u=n.filter(t=>{const c=Date.parse(t.ts);return Number.isFinite(c)&&o-c<=g&&x(e,t)});if(u.length===0)return"nicht-gesucht";const h=new Set(i.map(t=>t.topic));let a=!1;for(const t of u)for(const c of t.geliefert){if(h.has(c))return"anwendung";a=!0}return a?"ranking":"nominierung"}export{k as SUCH_DECKEL,g as SUCH_FENSTER_MS,N as klassifiziereFehlschlag,E as suchProtokollSchluessel,F as trichterSchluessel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function c(e,r){let o=!1;const n=t=>{o||(o=!0,r(t))};e.once("end",()=>n("stdin-end")),e.once("close",()=>n("stdin-close")),e.on("error",()=>{e.destroy(),n("stdin-error")})}export{c as beiStdinEnde};
|