promptgraph-mcp 2.6.7 → 2.6.8

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.
@@ -91,6 +91,10 @@ export default async function handler(args, bin) {
91
91
  const r = await installBundle(item.id);
92
92
  if (r?.error) throw new Error(r.error);
93
93
  installedSet.add(item.id);
94
+ // Update skill count on the bundle object to reflect real survivors
95
+ const { getCachedCount: getCount } = await import('../bundle-counts.js');
96
+ const cached = getCount(item.repo_url);
97
+ if (cached !== null) item.skillCount = cached;
94
98
  } else {
95
99
  const r = await installSkill(item.code || item.id);
96
100
  if (r?.error) throw new Error(r.error);
package/github-import.js CHANGED
@@ -580,7 +580,7 @@ export async function importFromGitHub(repoUrl) {
580
580
 
581
581
  await classifierCleanup(dest);
582
582
 
583
- // Update skill count cache with real survivor count
583
+ // Count survivors after all cleanup
584
584
  const realCount = globSync(`${dest}/**/*.md`).length;
585
585
  const cacheKey = url.replace(/\.git$/, '');
586
586
  const cachePath = path.join(PROMPTGRAPH_DIR, 'skill-counts.json');
@@ -591,6 +591,11 @@ export async function importFromGitHub(repoUrl) {
591
591
  fs.writeFileSync(cachePath, JSON.stringify(cache, null, 2));
592
592
  } catch {}
593
593
 
594
+ if (realCount < 1) {
595
+ fs.rmSync(dest, { recursive: true, force: true });
596
+ throw new Error(`No valid skills in repo — all files were filtered out`);
597
+ }
598
+
594
599
  const { dir: localDir, label: localLabel } = detectSkillsDirLocal(dest);
595
600
  // Prefer the known skillsSubdir (from API detection or sparse patterns) as the
596
601
  // canonical skills directory — it's more accurate than local heuristics for
@@ -609,8 +614,6 @@ export async function importFromGitHub(repoUrl) {
609
614
  console.log(`Full clone: scanning ${label} (${mdFiles.length} .md files)`);
610
615
  }
611
616
 
612
- if (mdFiles.length < 1) console.warn('Warning: no .md files found');
613
-
614
617
  const config = loadConfig();
615
618
  const repoSource = `github:${repoName}`;
616
619
  if (!config.sources.find(s => s.dir === skillsDir)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "promptgraph-mcp",
3
- "version": "2.6.7",
3
+ "version": "2.6.8",
4
4
  "files": [
5
5
  "*.js",
6
6
  "commands/",