promptgraph-mcp 2.9.35 → 2.9.36
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/commands/doctor.js +13 -0
- package/marketplace.js +4 -1
- package/package.json +1 -1
package/commands/doctor.js
CHANGED
|
@@ -2,6 +2,18 @@ import { colors, banner, success, error, info, section, table } from '../cli.js'
|
|
|
2
2
|
import chalk from 'chalk';
|
|
3
3
|
|
|
4
4
|
export default async function handler(args, bin) {
|
|
5
|
+
const fs = (await import('fs')).default;
|
|
6
|
+
const { PROMPTGRAPH_DIR } = await import('../config.js');
|
|
7
|
+
const path = (await import('path')).default;
|
|
8
|
+
|
|
9
|
+
// --reset-dead clears the dead repos list so they reappear in marketplace
|
|
10
|
+
if (args.includes('--reset-dead')) {
|
|
11
|
+
const deadFile = path.join(PROMPTGRAPH_DIR, 'dead-repos.json');
|
|
12
|
+
try { fs.writeFileSync(deadFile, '[]'); } catch {}
|
|
13
|
+
success('Dead repos list cleared — all bundles visible in marketplace again');
|
|
14
|
+
process.exit(0);
|
|
15
|
+
}
|
|
16
|
+
|
|
5
17
|
const { runDoctor } = await import('../doctor.js');
|
|
6
18
|
const spin = (await import('../cli.js')).spinner('Checking database...');
|
|
7
19
|
spin.start();
|
|
@@ -11,5 +23,6 @@ export default async function handler(args, bin) {
|
|
|
11
23
|
info(`Removed: ${r.orphanChunks} chunks, ${r.orphanRatings} ratings, ${r.orphanFromEdges + r.danglingEdges} edges`);
|
|
12
24
|
if (r.duplicatePaths > 0) info(chalk.yellow(`Warning: ${r.duplicatePaths} duplicate paths`));
|
|
13
25
|
info(chalk.gray(`Now: ${r.totalSkills} skills, ${r.totalChunks} chunks, ${r.totalEdges} edges`));
|
|
26
|
+
info(chalk.gray(` Run \`${bin} doctor --reset-dead\` to restore hidden marketplace bundles`));
|
|
14
27
|
process.exit(0);
|
|
15
28
|
}
|
package/marketplace.js
CHANGED
|
@@ -384,7 +384,10 @@ async function _execRepoInstall(bundle) {
|
|
|
384
384
|
try {
|
|
385
385
|
await importFromGitHubLight(bundle.repo_url);
|
|
386
386
|
} catch (e) {
|
|
387
|
-
|
|
387
|
+
// Only mark dead on confirmed 404 — not on validation failures or network errors
|
|
388
|
+
if (e.message && (e.message.includes('HTTP 404') || e.message.includes('not found'))) {
|
|
389
|
+
markDeadRepo(bundle.repo_url);
|
|
390
|
+
}
|
|
388
391
|
throw e;
|
|
389
392
|
}
|
|
390
393
|
const real = localSkillCount(bundle.repo_url);
|