promptgraph-mcp 2.2.3 → 2.2.5
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 -1
- package/package.json +1 -1
- package/tui.js +2 -2
package/index.js
CHANGED
|
@@ -96,12 +96,28 @@ if (args[0] === 'status') {
|
|
|
96
96
|
sourceCounts.set(row.source, row.n);
|
|
97
97
|
}
|
|
98
98
|
const totalSkills = db.prepare('SELECT COUNT(*) as n FROM skills').get().n;
|
|
99
|
+
const totalBundles = cfg.sources.filter(s => s.source.startsWith('github:')).length;
|
|
100
|
+
|
|
101
|
+
// Fetch marketplace totals for comparison
|
|
102
|
+
let marketSkills = 0, marketBundles = 0;
|
|
103
|
+
try {
|
|
104
|
+
const REGISTRY_URL = 'https://raw.githubusercontent.com/NeiP4n/promptgraph-registry/main/registry.json';
|
|
105
|
+
const reg = JSON.parse(await fetchText(REGISTRY_URL));
|
|
106
|
+
marketSkills = reg.skills?.length || 0;
|
|
107
|
+
marketBundles = reg.bundles?.length || 0;
|
|
108
|
+
} catch {}
|
|
99
109
|
|
|
100
110
|
console.log();
|
|
101
111
|
console.log(' ' + purple.bold('◆ PromptGraph Status'));
|
|
102
112
|
console.log(' ' + chalk.gray('─'.repeat(56)));
|
|
103
113
|
console.log();
|
|
104
|
-
|
|
114
|
+
|
|
115
|
+
// Summary row
|
|
116
|
+
const skillsLine = chalk.bold.white(`${totalSkills} skills`) +
|
|
117
|
+
(marketSkills ? chalk.gray(` / ${marketSkills} in registry`) : '');
|
|
118
|
+
const bundlesLine = chalk.bold.white(`${totalBundles} repos`) +
|
|
119
|
+
(marketBundles ? chalk.gray(` / ${marketBundles} in marketplace`) : '');
|
|
120
|
+
console.log(' ' + skillsLine + chalk.gray(' · ') + bundlesLine);
|
|
105
121
|
console.log();
|
|
106
122
|
|
|
107
123
|
// Sources grouped by type
|
package/package.json
CHANGED
package/tui.js
CHANGED
|
@@ -85,7 +85,7 @@ function render(state, installedSet = new Set()) {
|
|
|
85
85
|
const skills = items.filter(i => i.type === 'skill').length;
|
|
86
86
|
const bundles = items.filter(i => i.type === 'bundle').length;
|
|
87
87
|
|
|
88
|
-
write('\x1b[H
|
|
88
|
+
write('\x1b[H'); // go home — screen already cleared on init, just reposition
|
|
89
89
|
|
|
90
90
|
// ── header ─────────────────────────────────────────────────────────────────
|
|
91
91
|
// Row 1: title bar
|
|
@@ -225,7 +225,7 @@ export async function runTUI(allSkills, allBundles, installFn, installedSet = ne
|
|
|
225
225
|
}
|
|
226
226
|
|
|
227
227
|
// Setup terminal
|
|
228
|
-
write(HIDE + CLEAR);
|
|
228
|
+
write(HIDE + CLEAR + '\x1b[H\x1b[J');
|
|
229
229
|
readline.emitKeypressEvents(process.stdin);
|
|
230
230
|
if (process.stdin.isTTY) process.stdin.setRawMode(true);
|
|
231
231
|
|