@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.
@@ -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({instance_id:'${instance_id}',source:'ci_outcome',payload:{`);
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:'/api/v1/cls/ingest',method:'POST',`);
377
- lines.push(` headers:{'Content-Type':'application/json','Authorization':'Bearer \$CACHLY_JWT',`);
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(` CACHLY_JWT: \${{ secrets.CACHLY_JWT }}`);
382
+ lines.push(` CACHLY_CACHE_TOKEN: \${{ secrets.CACHLY_CACHE_TOKEN }}`);
382
383
  lines.push('```');
383
384
  lines.push('');
384
385
  }
@@ -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
- let items = Object.values(all)
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));
@@ -109,7 +109,9 @@ export async function handleTeamTool(
109
109
  file_paths: file_paths ?? [],
110
110
  commands: commands ?? [],
111
111
  tags: [...(tags ?? []), 'team'],
112
- timestamp: new Date().toISOString(),
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_\-]{8,}/g, '[token]')
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