@cachly-dev/mcp-server 0.10.283 → 0.10.285

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.
@@ -0,0 +1,4 @@
1
+ import{cachlyUrl as d}from"./cachly-url.js";import{apiFehler as u}from"./rolle.js";import{readInstanceId as y,readSavedApiKey as g,saveInstanceId as h}from"./credentials.js";const $="cky_trial_";function E(t){return t.startsWith($)}const f="leer_abgeraeumt",s="npx @cachly-dev/mcp-server@latest setup";function x(t){if(!t||typeof t!="object")return null;const e=t,n=typeof e.instance?.id=="string"?e.instance.id:typeof e.instance_id=="string"?e.instance_id:"";if(!n)return null;const r=typeof e.instance?.name=="string"&&e.instance.name?e.instance.name:void 0;return{id:n,...r?{name:r}:{},neu:e.created!==!1}}function _(t,e,n){return!e||g(n)!==n.apiKey||y(n)!==t?!1:(h(e,n),!0)}let o=null,c=!1;const i=new Map;function k(){o=null,c=!1,i.clear()}function I(t){return i.has(t)}function T(t,e){i.set(t,e)}function v(t){return i.get(t)}function S(){return c?!1:(c=!0,!0)}function F(t){return o||(o=(async()=>{try{const e=x(await t());return e?{ok:!0,...e}:{ok:!1,status:0,detail:"unexpected answer"}}catch(e){const n=u(e),r=e instanceof Error?e.message:String(e);return{ok:!1,status:n.status??0,detail:r}}})()),o}function l(t){return t.name?`"${t.name}" (${t.id})`:t.id}function R(t,e,n,r){const a=r===f,p=e.neu?a?`Your trial Brain was removed because it stayed empty and unused for 14 days. cachly created a new, empty Brain for you (${l(e)}). Nothing was lost: the old one had no saved lessons.`:`Your trial Brain ${t} no longer exists. cachly created a new, empty Brain for you (${l(e)}).`:`Your trial Brain ${t} no longer exists${a?" (removed after 14 days empty and unused)":""}. Your account already has another Brain, ${l(e)}, and cachly uses that one now.`,m=n==="umgebung"?` Your setup pins the old id in CACHLY_BRAIN_INSTANCE_ID and cachly did not change it: set it to ${e.id}, or this notice comes back at the next start.`:"";return`
2
+
3
+ ---
4
+ cachly: ${p}${m}`}function b(t){return`The Brain ${t} no longer exists in your account. Pick another one at ${d("/instances","instance-error")} or run setup again (${s}).`}function W(t,e,n){const a=`The trial Brain ${t} no longer exists${n===f?" (removed after 14 days empty and unused)":""}, and cachly could not create a new one`;return e.status===401||e.status===403?`${a}: this key may not create Brains. Sign in once (free, no credit card): ${s}`:e.status===400||e.status===402?`${a}: your plan's Brain limit is reached. Free a Brain or upgrade at ${d("/instances","instance-error")}, or run ${s}.`:`${a} (${e.status?`API answered ${e.status}`:"no answer from the API"}). Try again later, or run ${s}.`}function Y(t){return u(t).grund}function N(t){return u(t).status===404}export{f as GRUND_LEER_ABGERAEUMT,s as SETUP_BEFEHL,$ as SOFORT_TEST_PRAEFIX,k as _brainWegZuruecksetzen,_ as ersetzeInstanceId,Y as grundAusFehler,v as grundWeg,R as hinweisErsetzt,N as ist404,I as istBekanntWeg,E as istSofortTestSchluessel,F as legeEinmalAn,x as leseAutoAntwort,W as meldungAnlegenFehlt,b as meldungRegistriert,T as merkeWeg,S as nimmHinweisEinmal};