@cachly-dev/mcp-server 0.10.164 → 0.10.166
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/src/confidence.js +2 -1
- package/dist/src/handlers/brain.js +56 -56
- package/dist/src/search.js +1 -1
- package/glama.json +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
package/dist/src/confidence.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{createHash as
|
|
1
|
+
import{createHash as s}from"node:crypto";const i=Number(process.env.CACHLY_CONFIDENCE_WARN_DAYS??5),d=Number(process.env.CACHLY_CONFIDENCE_STALE_DAYS??10),o=.7,c=.5;function p(e){const r=e.verified_at??e.ts,t=(Date.now()-new Date(r).getTime())/864e5;return t>=d?c:t>=i?o:1-t/i*(1-o)}function m(e,r,n){if(e>=.9)return"\u2705";const t=a(n);return e>=.7?`\u26A0\uFE0F (${Math.round(r)}d old, confidence ${(e*100).toFixed(0)}% \u2014 verify before applying${t})`:`\u{1F534} STALE (${Math.round(r)}d old, confidence ${(e*100).toFixed(0)}% \u2014 likely outdated!${t})`}function a(e){const r=(e??"").trim();return!r||r.includes(`
|
|
2
|
+
`)||r.length>120?"":`, e.g. \`${r}\``}const E={deploy:{required:["commands"],hint:"deploy:* needs commands[]"},bash:{required:["commands"],hint:"bash:* needs commands[]"},infra:{required:["commands"],hint:"infra:* needs commands[] + verified on real system"},pricing:{required:[],hint:'pricing:* \u2014 add context with source (e.g. "Stripe Dashboard Apr 2026")'},stripe:{required:[],hint:"stripe:* \u2014 add context with Stripe API version"}};function f(e){return s("md5").update(e).digest("hex").slice(0,12)}export{d as CONFIDENCE_STALE_DAYS,c as CONFIDENCE_STALE_VALUE,i as CONFIDENCE_WARN_DAYS,o as CONFIDENCE_WARN_VALUE,E as STRUCTURED_TEMPLATES,p as calculateConfidence,m as confidenceBadge,f as simpleHash};
|