promptgraph-mcp 2.1.2 → 2.1.3
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/index.js +17 -23
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -133,44 +133,38 @@ if (args[0] === 'status') {
|
|
|
133
133
|
console.log();
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
//
|
|
136
|
+
// Marketplace skill-list bundles (installed individually, not whole repos)
|
|
137
137
|
const marketplaceDir = path.join(os.homedir(), '.claude', 'skills-store', 'marketplace');
|
|
138
138
|
const installedBundles = fs.existsSync(marketplaceDir)
|
|
139
139
|
? fs.readdirSync(marketplaceDir, { withFileTypes: true }).filter(d => d.isDirectory()).map(d => d.name)
|
|
140
140
|
: [];
|
|
141
141
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
142
|
+
if (installedBundles.length) {
|
|
143
|
+
let registryBundles = [];
|
|
144
|
+
try {
|
|
145
|
+
const REGISTRY_URL = 'https://raw.githubusercontent.com/NeiP4n/promptgraph-registry/main/registry.json';
|
|
146
|
+
const text = await fetchText(REGISTRY_URL);
|
|
147
|
+
registryBundles = JSON.parse(text).bundles || [];
|
|
148
|
+
} catch {}
|
|
149
149
|
|
|
150
|
-
|
|
151
|
-
const repoName = s.source.replace('github:', '');
|
|
152
|
-
const bundle = registryBundles.find(b => b.repo_url && repoName.toLowerCase().includes(b.id.split('-').slice(-1)[0].toLowerCase()));
|
|
153
|
-
return { repoName, bundle, source: s };
|
|
154
|
-
});
|
|
155
|
-
|
|
156
|
-
if (githubBundles.length || installedBundles.length) {
|
|
157
|
-
console.log(' ' + purple('📦 Installed bundles'));
|
|
158
|
-
for (const { repoName, bundle } of githubBundles) {
|
|
159
|
-
const n = sourceCounts.get(`github:${repoName}`) || 0;
|
|
160
|
-
const name = bundle ? chalk.white.bold(bundle.name || bundle.id) : chalk.white(repoName);
|
|
161
|
-
const cat = bundle?.category ? chalk.dim(` [${bundle.category}]`) : '';
|
|
162
|
-
console.log(` ${name}${cat} ${chalk.gray(n + ' skills')} ${chalk.blue('GitHub')}`);
|
|
163
|
-
}
|
|
150
|
+
console.log(' ' + purple('📦 Installed marketplace bundles'));
|
|
164
151
|
for (const b of installedBundles) {
|
|
165
152
|
const bundle = registryBundles.find(rb => rb.id === b);
|
|
166
153
|
const name = bundle ? chalk.white.bold(bundle.name || b) : chalk.white(b);
|
|
167
154
|
const cat = bundle?.category ? chalk.dim(` [${bundle.category}]`) : '';
|
|
168
155
|
const n = sourceCounts.get('marketplace') || 0;
|
|
169
|
-
console.log(` ${name}${cat} ${chalk.gray(n + ' skills')}
|
|
156
|
+
console.log(` ${name}${cat} ${chalk.gray(n + ' skills')}`);
|
|
170
157
|
}
|
|
171
158
|
console.log();
|
|
172
159
|
}
|
|
173
160
|
|
|
161
|
+
// Not-yet-indexed repos hint
|
|
162
|
+
const emptyRepos = githubSources.filter(s => (sourceCounts.get(s.source) || 0) === 0 && fs.existsSync(s.dir));
|
|
163
|
+
if (emptyRepos.length) {
|
|
164
|
+
console.log(' ' + chalk.yellow(`⚠ ${emptyRepos.length} repo(s) not indexed`) + chalk.gray(' → run: ') + chalk.cyan(`${bin} reindex`));
|
|
165
|
+
console.log();
|
|
166
|
+
}
|
|
167
|
+
|
|
174
168
|
console.log(
|
|
175
169
|
boxen(
|
|
176
170
|
chalk.dim('full reindex ') + chalk.cyan(`${bin} reindex`) + '\n' +
|