@cachly-dev/mcp-server 0.10.258 → 0.10.260

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.
@@ -1 +1 @@
1
- import{createHash as s}from"node:crypto";let i="";function p(e,n){const t=String(e??"").trim(),r=String(n??"").trim();i=t?r?`${t}/${r}`:t:""}function a(){return i}function o(e){const n=e.split(".");if(n.length!==3)return"";try{const t=Buffer.from(n[1].replace(/-/g,"+").replace(/_/g,"/"),"base64").toString("utf8"),r=JSON.parse(t).sub;return typeof r=="string"?r.slice(0,64):""}catch{return""}}function g(e=process.env){const n=String(e.CACHLY_AGENT??"").trim()||i||"unbekannt",t=String(e.CACHLY_JWT??"").trim();let r;if(t){const c=o(t);r=c?`sub:${c}`:`key:${s("sha256").update(t).digest("hex").slice(0,12)}`}return{agent:n,...r?{principal:r}:{},via:"mcp"}}function f(e,n){const t=[];return e&&t.push(`@${e}`),n?.agent&&n.agent!=="unbekannt"&&t.push(`via ${n.agent}`),n?.principal&&t.push(n.principal),t.length>0?`\u{1F464} **Source:** ${t.join(" \xB7 ")}`:"\u{1F464} **Source:** Urheber unbekannt"}export{a as clientKennungFuerTests,g as ermittleQuelle,f as quelleZeile,p as setzeClientKennung};
1
+ import{createHash as o}from"node:crypto";import{istMehrmandant as c,mandantKontext as u}from"./remote-zugang.js";let s="";function g(e,n){if(c())return;const t=String(e??"").trim(),r=String(n??"").trim();s=t?r?`${t}/${r}`:t:""}function l(){return s}function a(e){const n=e.split(".");if(n.length!==3)return"";try{const t=Buffer.from(n[1].replace(/-/g,"+").replace(/_/g,"/"),"base64").toString("utf8"),r=JSON.parse(t).sub;return typeof r=="string"?r.slice(0,64):""}catch{return""}}function m(e=process.env){if(c()){const i=u();return{agent:"mcp-http",...i?{principal:`key:${i.schluesselHash.slice(0,12)}`}:{},via:"mcp"}}const n=String(e.CACHLY_AGENT??"").trim()||s||"unbekannt",t=String(e.CACHLY_JWT??"").trim();let r;if(t){const i=a(t);r=i?`sub:${i}`:`key:${o("sha256").update(t).digest("hex").slice(0,12)}`}return{agent:n,...r?{principal:r}:{},via:"mcp"}}function h(e,n){const t=[];return e&&t.push(`@${e}`),n?.agent&&n.agent!=="unbekannt"&&t.push(`via ${n.agent}`),n?.principal&&t.push(n.principal),t.length>0?`\u{1F464} **Source:** ${t.join(" \xB7 ")}`:"\u{1F464} **Source:** Urheber unbekannt"}export{l as clientKennungFuerTests,m as ermittleQuelle,h as quelleZeile,g as setzeClientKennung};