@cachly-dev/mcp-server 0.10.256 → 0.10.258
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 +2 -3
- package/dist/src/ambient-cli.js +2 -2
- package/dist/src/einblendung-kern.js +1 -1
- package/dist/src/index.js +123 -123
- package/dist/src/projektdateien.js +6 -6
- package/dist/src/prompt-herkunft.js +1 -0
- package/dist/src/uninstall.js +7 -7
- package/glama.json +1 -1
- package/hooks/cachly-ambient-einblendung.mjs +25 -25
- package/package.json +1 -1
- package/server.json +2 -2
package/README.md
CHANGED
|
@@ -417,14 +417,13 @@ Manual snippets are in [Manual Setup](#manual-setup).
|
|
|
417
417
|
|---|---|---|---|---|
|
|
418
418
|
| **Claude Code** | yes | `.mcp.json` | with the plugin | Without a key: the first tool call opens the browser once to sign in |
|
|
419
419
|
| **Cursor** | yes, detected via `.cursor/` | `.cursor/mcp.json`, hooks in `.cursor/hooks.json` | no | Project-level; restart Cursor after setup. Lessons arrive with the first tool call of a turn |
|
|
420
|
-
| **Windsurf** | yes, detected via `.windsurf/` |
|
|
420
|
+
| **Windsurf** | yes, detected via `~/.codeium/windsurf` or `.windsurf/` | `~/.codeium/windsurf/mcp_config.json` | yes | The only file Windsurf reads MCP servers from; restart Windsurf after setup |
|
|
421
421
|
| **VS Code + Copilot** | yes, detected via `.vscode/` | `.vscode/mcp.json`, hooks in `.github/hooks/cachly-ambient.json` | no | Needs the VS Code MCP support or Copilot chat. Briefing at session start, lessons before each prompt |
|
|
422
422
|
| **Codex CLI** | yes, detected via `~/.codex` | `.codex/config.toml` (`[mcp_servers.cachly]`), hooks in `.codex/hooks.json` | no | Codex loads both once you trust the folder; confirm the hook once in `/hooks` |
|
|
423
423
|
| **Gemini CLI** | yes, detected via `~/.gemini` | `mcpServers.cachly` and `hooks` in `.gemini/settings.json` | no | Gemini loads both once you trust the folder. Lessons are appended to the prompt (`BeforeAgent`) |
|
|
424
|
-
| **Cline** | yes, detected via VS Code |
|
|
424
|
+
| **Cline** | yes, detected via Cline's own VS Code storage | `cline_mcp_settings.json` in VS Code's `globalStorage/saoudrizwan.claude-dev/settings/` | yes | Cline does not read `.vscode/mcp.json`; restart VS Code |
|
|
425
425
|
| **Continue.dev** | yes, detected via `.continue/` | `.continue/config.json` | no | Uses the `modelContextProtocolServers` key |
|
|
426
426
|
| **Zed** | yes, detected via `.zed/` | `.zed/settings.json` | no | Uses the `context_servers` key |
|
|
427
|
-
| **Windsurf (global)** | `autosetup --editor windsurf` | `~/.windsurf/mcp.json` | yes | Pass `--editor` to target the global config |
|
|
428
427
|
| **Any other MCP client** | `autosetup --editor claude` | `.mcp.json` | no | Standard `mcpServers` stdio format |
|
|
429
428
|
|
|
430
429
|
**Which sign-in path each case uses:**
|
package/dist/src/ambient-cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{promptEinblendung as l,holeBestand as u,sitzungsKontext as a,hookAusgabe as s,estimateTokens as f}from"./einblendung.js";function m(e){const t=(e??"").trim();if(!t)return null;try{const o=JSON.parse(t);return o&&typeof o=="object"?o:null}catch{return null}}const
|
|
2
|
-
`).map(n=>n.trim()).filter(n=>n.length>0);return{action:(o.find(n=>c.test(n))??o[0]??t).slice(0,200),outcome:"success",details:t.slice(0,500),severity:"minor"}}function
|
|
1
|
+
import{promptEinblendung as l,holeBestand as u,sitzungsKontext as a,hookAusgabe as s,estimateTokens as f,frageAusPrompt as p}from"./einblendung.js";function m(e){const t=(e??"").trim();if(!t)return null;try{const o=JSON.parse(t);return o&&typeof o=="object"?o:null}catch{return null}}const g=new Set(["Edit","Write","MultiEdit","NotebookEdit"]);function h(e){const t=e.hook_event_name??"UserPromptSubmit";if(t==="SessionStart"||t==="Stop")return null;if(t==="PreToolUse"){if(e.tool_name&&!g.has(e.tool_name))return null;const r=e.tool_input?.file_path;if(typeof r!="string"||!r.trim())return null;const n=r.trim().replace(/\\/g,"/"),i=(e.cwd??"").replace(/\\/g,"/").replace(/\/+$/,"");return i&&n.toLowerCase().startsWith(i.toLowerCase()+"/")?n.slice(i.length+1):n}return p(e.prompt??"")||null}const c=/\b(fixed|resolved|behoben|gefixt|root cause (was|is|found)|the bug was|der fehler (lag|war)|ursache (war|gefunden)|now passes|tests? (are|is|sind) (green|grün)|deployed successfully)\b/i,d=/\b(could not|couldn't|cannot|can't|unable to|not (yet )?(fixed|resolved|working)|still (fail|red|broken|not|deadlock)\w*|unknown|unclear|gave up|nicht (behoben|gefixt|gel(ö|oe)st)|konnte (ich )?(\w+ )?nicht|noch nicht|weiterhin|unklar)\b/i;function k(e){const t=(e.last_assistant_message??"").trim();if(t.length<80||!c.test(t)||d.test(t))return null;const o=t.split(`
|
|
2
|
+
`).map(n=>n.trim()).filter(n=>n.length>0);return{action:(o.find(n=>c.test(n))??o[0]??t).slice(0,200),outcome:"success",details:t.slice(0,500),severity:"minor"}}function x(e){const t=e.action.toLowerCase().replace(/[^a-z0-9:\-_\s]/g,"").trim().split(/\s+/).slice(0,4).join("-");return{topic:t?t.includes(":")?t:`auto:${t}`:"auto:stop",outcome:e.outcome,what_worked:e.action,context:e.details,severity:e.severity,source:"ambient-stop",tags:["auto-learned"]}}const S=s,w=5e3;async function v(e,t){try{const o=m(e);if(!o)return"";const r=o.hook_event_name??"UserPromptSubmit";if(!t.cfg.jwt||!t.cfg.instanceId)return"";let n="";if(r==="SessionStart"){const{lessons:i}=await u(t.cfg,{force:!0,fetchFn:t.fetchFn});n=a(i)}else{const i=h(o);if(i===null)return"";n=(await l(i,t.cfg,{nebenlauf:t.nebenlauf,abrufMs:w,leser:r!=="PreToolUse",session:o.session_id??null,protokoll:t.protokoll,ereignis:r,editor:t.editor,fetchFn:t.fetchFn})).kontext}if(!n)return"";try{t.onInject?.(f(n),r)}catch{}return s(r,n)}catch{return""}}export{w as PROMPT_ABRUF_MS,S as buildHookOutput,m as parseHookPayload,h as recallQueryFor,v as runEinblendung,x as stopLernanfrage,k as stopObservation};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Seltenheit as f,inhaltsWoerter as c,grobStamm as p,spreizeImTopf as m}from"./rangfolge.js";import{lektionsText as w}from"./seltenheitsbestand.js";import{bestandAusDokumenten as g,keywordSearchMitBestand as k}from"./search.js";import{SINN_TOPF as E,EINBLENDUNG_DECKUNG as b,EINBLENDUNG_ZEUGE as N}from"./rangfolge-stellschrauben.js";import{istMarkiert as S}from"./verdacht-marke.js";import{istTeamweit as x}from"./utils.js";import{rahmeEin as
|
|
1
|
+
import{Seltenheit as f,inhaltsWoerter as c,grobStamm as p,spreizeImTopf as m}from"./rangfolge.js";import{lektionsText as w}from"./seltenheitsbestand.js";import{bestandAusDokumenten as g,keywordSearchMitBestand as k}from"./search.js";import{SINN_TOPF as E,EINBLENDUNG_DECKUNG as b,EINBLENDUNG_ZEUGE as N}from"./rangfolge-stellschrauben.js";import{istMarkiert as S}from"./verdacht-marke.js";import{istTeamweit as x}from"./utils.js";import{rahmeEin as j,entschaerfe as B,RAHMEN_ETIKETT as C,RAHMEN_HINWEIS as F}from"./einblendung-rahmen.js";import{stopAntwort as K}from"./schreibbeleg.js";import{frageAusPrompt as v}from"./prompt-herkunft.js";const _=E,T=["topic","outcome","what_worked","what_failed","severity","confidence","recall_count","ts","endorsements"],d=new Set("the a an and or but for to of in on at is are be do does did we you i it this that with without how what why when where can could would should please just get set use using make made need bitte und oder der die das ein eine f\xFCr mit ohne wie was warum kann soll noch mal auch von den dem ist weil wenn dann doch aber alle jede jeder jedes immer wieder wird werden wurde muss beim sehr nicht".split(/\s+/)),z=["ierungen","ierung","ieren","iert","ungen","ung","heit","keit","lich","isch","ing","ed","en","er","es","e","n","s"];function y(s){for(const e of z)if(s.length-e.length>=4&&s.endsWith(e))return s.slice(0,-e.length);return s}function I(s){return[...new Set(String(s).toLowerCase().split(/[^a-z0-9]+/).filter(e=>e.length>3&&!d.has(e)).map(y).filter(e=>!d.has(e)))]}function D(s,e){let i=0;for(const o of s)e.includes(o)&&i++;return i}class L{texte;wortmengen;heuhaufen;statistik;wortbestand;platzVonSchluessel=new Map;topf;lektionen;constructor(e,{topf:i=_}={}){const o=e.filter(t=>!S(t)&&x(t));this.lektionen=o,this.topf=i,this.texte=o.map(t=>w(t)),this.wortmengen=this.texte.map(t=>new Set([...c(t)].map(p))),this.heuhaufen=this.texte.map(t=>t.toLowerCase()),this.statistik=new f(this.texte);const h=o.map((t,a)=>{const u=`cachly:lesson:best:${String(t.topic??a)}`;this.platzVonSchluessel.set(u,a);const l={};for(const n of T)t[n]!==void 0&&(l[n]=t[n]);return{key:u,content:JSON.stringify(l)}});this.wortbestand=g(h)}get groesse(){return this.lektionen.length}sortiere(e){if(!this.wortbestand)return[];const i=k(this.wortbestand,e,this.topf),o=[],h=[];for(const n of i){const r=this.platzVonSchluessel.get(n.key);r!==void 0&&(o.push(r),h.push(n.score))}if(o.length===0)return[];const t=c(e),a=I(e),u=m(h),l=m(o.map(n=>this.statistik.besterZeuge(t,this.wortmengen[n])));return o.map((n,r)=>({lektion:this.lektionen[n],punkte:u[r]+b*this.statistik.deckung(t,this.wortmengen[n])+N*l[r],belege:D(a,this.heuhaufen[n])})).sort((n,r)=>r.punkte-n.punkte||Number(r.lektion.recall_count??0)-Number(n.lektion.recall_count??0))}}export{L as Einblendbestand,T as INDEX_FELDER,C as RAHMEN_ETIKETT,F as RAHMEN_HINWEIS,_ as WORT_TOPF,B as entschaerfe,v as frageAusPrompt,j as rahmeEin,y as stammKuerzen,K as stopAntwort,I as torWoerter,D as zaehleBelege};
|