promptgraph-mcp 2.2.2 → 2.2.4

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/index.js +17 -1
  2. package/package.json +1 -1
  3. package/tui.js +11 -8
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
- console.log(' ' + chalk.bold.white(`${totalSkills} skills indexed`) + chalk.gray(` · ${cfg.sources.length} sources`));
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "promptgraph-mcp",
3
- "version": "2.2.2",
3
+ "version": "2.2.4",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "bin": {
package/tui.js CHANGED
@@ -75,7 +75,7 @@ function filterItems(items, query, tab) {
75
75
 
76
76
  function render(state, installedSet = new Set()) {
77
77
  const { cols, rows } = termSize();
78
- const HEADER_ROWS = 5;
78
+ const HEADER_ROWS = 4;
79
79
  const FOOTER_ROWS = 3;
80
80
  const LIST_ROWS = rows - HEADER_ROWS - FOOTER_ROWS;
81
81
  const NAME_W = Math.max(20, Math.floor(cols * 0.28));
@@ -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(HOME);
88
+ write('\x1b[H\x1b[J'); // go home + clear to end (no flicker vs full CLEAR)
89
89
 
90
90
  // ── header ─────────────────────────────────────────────────────────────────
91
91
  // Row 1: title bar
@@ -113,14 +113,13 @@ function render(state, installedSet = new Set()) {
113
113
  : dim(query ? query : 'type / to search, Tab to switch view');
114
114
  write(searchLabel + searchVal + CLEAR_EOL + '\n');
115
115
 
116
- // Row 4: status / separator
116
+ // Row 4: separator (with optional status inline)
117
117
  if (status) {
118
- const msg = status.ok ? green(' ' + status.msg) : red(' ' + status.msg);
119
- write(msg + CLEAR_EOL + '\n');
118
+ const msg = status.ok ? green(' ' + status.msg) : red(' ' + status.msg);
119
+ write(dim('─'.repeat(4)) + msg + CLEAR_EOL + '\n');
120
120
  } else {
121
121
  write(dim('─'.repeat(cols)) + CLEAR_EOL + '\n');
122
122
  }
123
- write(dim('─'.repeat(cols)) + CLEAR_EOL + '\n');
124
123
 
125
124
  // ── list ───────────────────────────────────────────────────────────────────
126
125
  let lastCat = null;
@@ -150,8 +149,12 @@ function render(state, installedSet = new Set()) {
150
149
  const nameStr = truncate(item.name, NAME_W);
151
150
  const namePad = nameStr.padEnd(NAME_W);
152
151
  const nameCol = selected ? white.bold(namePad) : white(namePad);
153
- const extra = item.type === 'bundle'
154
- ? (item.skillCount ? blue((item.skillCount + ' sk').padEnd(8)) : blue('GitHub '))
152
+ const extra = item.type === 'bundle'
153
+ ? item.skillCount
154
+ ? blue((item.skillCount + ' sk').padEnd(8))
155
+ : item.repo_url
156
+ ? blue('GitHub ')
157
+ : dim(((item.skills?.length || 0) + ' sk').padEnd(8))
155
158
  : dim((item.code || '').padEnd(8));
156
159
  const desc = dim(truncate(item.description, Math.max(10, DESC_W)));
157
160