promptgraph-mcp 2.3.6 → 2.3.7

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.
Files changed (3) hide show
  1. package/github-import.js +15 -13
  2. package/package.json +1 -1
  3. package/tui.js +2 -1
package/github-import.js CHANGED
@@ -211,19 +211,21 @@ export async function importFromGitHub(repoUrl) {
211
211
  const detected = await detectSkillsDirFromAPI(ownerRepo);
212
212
  skillsSubdir = detected?.subdir || null;
213
213
 
214
- if (skillsSubdir) {
215
- console.log(`found: ${detected.label}/`);
216
- console.log(`Sparse-cloning ${url} (${skillsSubdir}/ only)...`);
217
- cloneOk = sparseClone(url, dest, skillsSubdir);
218
- if (!cloneOk) {
219
- console.log('Sparse-checkout failed, falling back to full clone...');
220
- fs.rmSync(dest, { recursive: true, force: true });
221
- cloneOk = fullClone(url, dest);
222
- skillsSubdir = null;
223
- }
224
- } else {
225
- console.log(`no subdir found, cloning root...`);
226
- cloneOk = fullClone(url, dest);
214
+ if (!skillsSubdir) {
215
+ throw new Error(
216
+ `No skill subdirectory found in ${ownerRepo}.\n` +
217
+ `Expected one of: ${SKILL_DIRS.join(', ')}\n` +
218
+ `Or any subfolder with .md files.\n` +
219
+ `Visit https://github.com/${ownerRepo} to check the repo structure.`
220
+ );
221
+ }
222
+
223
+ console.log(`found: ${detected.label}/`);
224
+ console.log(`Sparse-cloning ${url} (${skillsSubdir}/ only)...`);
225
+ cloneOk = sparseClone(url, dest, skillsSubdir);
226
+ if (!cloneOk) {
227
+ fs.rmSync(dest, { recursive: true, force: true });
228
+ throw new Error(`Sparse-checkout failed for ${url}`);
227
229
  }
228
230
 
229
231
  if (!cloneOk) throw new Error(`Clone failed for ${url}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "promptgraph-mcp",
3
- "version": "2.3.6",
3
+ "version": "2.3.7",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "bin": {
package/tui.js CHANGED
@@ -178,7 +178,8 @@ function render(state, installedSet = new Set()) {
178
178
  ? green(' ✓ installed') + dim(' ') + dim('d') + chalk.red(' remove') + dim(' ')
179
179
  : dim(' Enter') + chalk.white(' install') + dim(' ');
180
180
  write(instLabel + dim('Tab') + ' switch ' + dim('/') + ' search ' + dim('q') + ' quit' + CLEAR_EOL + '\n');
181
- write(dim(` → pg ${installCmd}`) + CLEAR_EOL + '\n');
181
+ const ghUrl = sel.repo_url ? chalk.hex('#3B82F6')(` github.com/${sel.repo_url}`) : '';
182
+ write(dim(` → pg ${installCmd}`) + ghUrl + CLEAR_EOL + '\n');
182
183
  } else if (state.confirming) {
183
184
  write(chalk.red.bold(' Remove ') + chalk.white(state.confirming.name) + chalk.red('? ') +
184
185
  chalk.white.bold('[y]') + chalk.gray('es ') + chalk.white.bold('[n]') + chalk.gray('o') + CLEAR_EOL + '\n');