@cachly-dev/mcp-server 0.10.47 → 0.10.55
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/.github/workflows/publish.yml +2 -2
- package/README.md +33 -5
- package/dist/__tests__/brain-flow.test.js +2 -2
- package/dist/__tests__/brain-flow.test.js.map +1 -1
- package/dist/__tests__/handlers-unit.test.js +3 -1
- package/dist/__tests__/handlers-unit.test.js.map +1 -1
- package/dist/handlers/brain.js +90 -5
- package/dist/handlers/brain.js.map +1 -1
- package/dist/handlers/fedbrain.js +6 -5
- package/dist/handlers/fedbrain.js.map +1 -1
- package/dist/handlers/roadmap.js +1 -1
- package/dist/handlers/roadmap.js.map +1 -1
- package/dist/handlers/team.js +4 -2
- package/dist/handlers/team.js.map +1 -1
- package/dist/index.js +342 -83
- package/dist/index.js.map +1 -1
- package/dist/search.js +3 -3
- package/dist/search.js.map +1 -1
- package/package.json +2 -1
- package/smithery.yaml +0 -2
- package/src/__tests__/brain-flow.test.ts +2 -2
- package/src/__tests__/handlers-unit.test.ts +2 -1
- package/src/handlers/brain.ts +90 -8
- package/src/handlers/fedbrain.ts +6 -5
- package/src/handlers/roadmap.ts +1 -1
- package/src/handlers/team.ts +4 -2
- package/src/index.ts +279 -107
- package/src/search.ts +3 -3
package/src/handlers/fedbrain.ts
CHANGED
|
@@ -363,6 +363,8 @@ export async function handleFedbrainTool(
|
|
|
363
363
|
|
|
364
364
|
if (hooksArr.includes('ci')) {
|
|
365
365
|
lines.push(`### GitHub Actions CI outcome hook`);
|
|
366
|
+
lines.push(`**Setup:** add a repo secret \`CACHLY_CACHE_TOKEN\` = your instance's cache token`);
|
|
367
|
+
lines.push(`(find it via \`get_connection_string\` — the token in the cache URL).`);
|
|
366
368
|
lines.push(`**Add at the end of each job** (after build/test steps):`);
|
|
367
369
|
lines.push('```yaml');
|
|
368
370
|
lines.push(`- name: cachly CLS — record CI outcome`);
|
|
@@ -370,15 +372,14 @@ export async function handleFedbrainTool(
|
|
|
370
372
|
lines.push(` run: |`);
|
|
371
373
|
lines.push(` node -e "`);
|
|
372
374
|
lines.push(` const r=require('https');`);
|
|
373
|
-
lines.push(` const d=JSON.stringify({
|
|
375
|
+
lines.push(` const d=JSON.stringify({source:'ci_outcome',payload:{`);
|
|
374
376
|
lines.push(` status:'\${{ job.status }}',prev_status:'unknown',job:'\${{ github.job }}',`);
|
|
375
377
|
lines.push(` context:'github-actions run \${{ github.run_number }}'}});`);
|
|
376
|
-
lines.push(` r.request({hostname:'api.cachly.dev',path:'/
|
|
377
|
-
lines.push(` headers:{'Content-Type':'application/json','
|
|
378
|
-
lines.push(` 'Content-Length':d.length}},()=>{}).end(d);`);
|
|
378
|
+
lines.push(` r.request({hostname:'api.cachly.dev',path:'/v1/cache/'+process.env.CACHLY_CACHE_TOKEN+'/cls/ingest',method:'POST',`);
|
|
379
|
+
lines.push(` headers:{'Content-Type':'application/json','Content-Length':d.length}},()=>{}).end(d);`);
|
|
379
380
|
lines.push(` " 2>/dev/null || true`);
|
|
380
381
|
lines.push(` env:`);
|
|
381
|
-
lines.push(`
|
|
382
|
+
lines.push(` CACHLY_CACHE_TOKEN: \${{ secrets.CACHLY_CACHE_TOKEN }}`);
|
|
382
383
|
lines.push('```');
|
|
383
384
|
lines.push('');
|
|
384
385
|
}
|
package/src/handlers/roadmap.ts
CHANGED
|
@@ -156,7 +156,7 @@ export async function handleRoadmapTool(
|
|
|
156
156
|
}
|
|
157
157
|
const PRIORITY_ORDER: Record<string, number> = { critical: 0, high: 1, medium: 2, low: 3 };
|
|
158
158
|
const PRIORITY_ICON: Record<string, string> = { critical: '🔴', high: '🟠', medium: '🟡', low: '🔵' };
|
|
159
|
-
|
|
159
|
+
const items = Object.values(all)
|
|
160
160
|
.map(v => JSON.parse(v as string) as Record<string, unknown>)
|
|
161
161
|
.filter(i => i.status === 'in-progress' || i.status === 'planned')
|
|
162
162
|
.filter(i => !filterTag || (i.tags as string[]).includes(filterTag));
|
package/src/handlers/team.ts
CHANGED
|
@@ -109,7 +109,9 @@ export async function handleTeamTool(
|
|
|
109
109
|
file_paths: file_paths ?? [],
|
|
110
110
|
commands: commands ?? [],
|
|
111
111
|
tags: [...(tags ?? []), 'team'],
|
|
112
|
-
|
|
112
|
+
ts: new Date().toISOString(),
|
|
113
|
+
verified_at: outcome === 'success' ? new Date().toISOString() : undefined,
|
|
114
|
+
confidence: 1.0,
|
|
113
115
|
recall_count: 0,
|
|
114
116
|
version: 2,
|
|
115
117
|
};
|
|
@@ -709,7 +711,7 @@ export async function handleTeamTool(
|
|
|
709
711
|
// Strip potential PII patterns (emails, tokens, paths)
|
|
710
712
|
const sanitized = lesson
|
|
711
713
|
.replace(/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/g, '[email]')
|
|
712
|
-
.replace(/\b(sk-|cky_live_|Bearer\s)[A-Za-z0-9_
|
|
714
|
+
.replace(/\b(sk-|cky_live_|Bearer\s)[A-Za-z0-9_-]{8,}/g, '[token]')
|
|
713
715
|
.replace(/\/Users\/[^\s/]+/g, '/Users/[user]')
|
|
714
716
|
.replace(/\/home\/[^\s/]+/g, '/home/[user]');
|
|
715
717
|
|