agent-discover 1.0.4 → 1.0.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/dist/ui/app.js +12 -30
- package/dist/ui/styles.css +11 -0
- package/package.json +1 -1
package/dist/ui/app.js
CHANGED
|
@@ -185,32 +185,7 @@
|
|
|
185
185
|
: 'Active'
|
|
186
186
|
: 'Inactive';
|
|
187
187
|
|
|
188
|
-
// Approval badge
|
|
189
|
-
var approval = s.approval_status || 'experimental';
|
|
190
|
-
var approvalDropdown = '';
|
|
191
|
-
if (openApprovalDropdown === s.id) {
|
|
192
|
-
approvalDropdown =
|
|
193
|
-
'<div class="approval-dropdown">' +
|
|
194
|
-
'<button class="approval-dropdown-item" onclick="window.__setApproval(' +
|
|
195
|
-
s.id +
|
|
196
|
-
", 'experimental')\">experimental</button>" +
|
|
197
|
-
'<button class="approval-dropdown-item" onclick="window.__setApproval(' +
|
|
198
|
-
s.id +
|
|
199
|
-
", 'approved')\">approved</button>" +
|
|
200
|
-
'<button class="approval-dropdown-item" onclick="window.__setApproval(' +
|
|
201
|
-
s.id +
|
|
202
|
-
", 'production')\">production</button>" +
|
|
203
|
-
'</div>';
|
|
204
|
-
}
|
|
205
|
-
var approvalBadge =
|
|
206
|
-
'<span class="approval-badge approval-' +
|
|
207
|
-
esc(approval) +
|
|
208
|
-
'" style="position:relative" onclick="window.__toggleApprovalDropdown(' +
|
|
209
|
-
s.id +
|
|
210
|
-
')">' +
|
|
211
|
-
esc(approval) +
|
|
212
|
-
approvalDropdown +
|
|
213
|
-
'</span>';
|
|
188
|
+
// Approval badge removed — not useful without automatic classification
|
|
214
189
|
|
|
215
190
|
// Combined status: active+healthy=green, active+unhealthy=red, inactive=gray
|
|
216
191
|
var healthStatus = s.health_status || 'unknown';
|
|
@@ -285,7 +260,6 @@
|
|
|
285
260
|
'<span class="server-name">' +
|
|
286
261
|
esc(s.name) +
|
|
287
262
|
'</span>' +
|
|
288
|
-
approvalBadge +
|
|
289
263
|
'</div>' +
|
|
290
264
|
'<div style="display:flex;align-items:center;gap:8px">' +
|
|
291
265
|
errorCount +
|
|
@@ -496,9 +470,9 @@
|
|
|
496
470
|
} else {
|
|
497
471
|
el.innerHTML =
|
|
498
472
|
'<div class="empty-state"><span class="material-symbols-outlined empty-icon">search_off</span><p>No results in MCP registry</p>' +
|
|
499
|
-
|
|
500
|
-
'<div class="npm-install-form">' +
|
|
501
|
-
'<input type="text" id="npm-package-input" placeholder="npm package (e.g. @modelcontextprotocol/server-everything)" />' +
|
|
473
|
+
"<a class=\"hint-link\" onclick=\"this.nextElementSibling.style.display='flex';this.style.display='none'\">Can't find it? Install from npm</a>" +
|
|
474
|
+
'<div class="npm-install-form" style="display:none">' +
|
|
475
|
+
'<input type="text" id="npm-package-input" placeholder="npm package name (e.g. @modelcontextprotocol/server-everything)" />' +
|
|
502
476
|
'<button class="btn-install" onclick="window.__installFromNpm()"><span class="material-symbols-outlined" style="font-size:14px">download</span> Install</button>' +
|
|
503
477
|
'</div></div>';
|
|
504
478
|
}
|
|
@@ -617,12 +591,20 @@
|
|
|
617
591
|
'<span class="material-symbols-outlined" style="font-size:14px">hourglass_top</span>Installing...';
|
|
618
592
|
|
|
619
593
|
var safeName = (server.name || '').replace(/\//g, '-');
|
|
594
|
+
var npmPkg = safeName;
|
|
595
|
+
// Try to derive npm package name from registry name (e.g. "io.github.user/pkg" -> "@user/pkg")
|
|
596
|
+
var parts = (server.name || '').split('/');
|
|
597
|
+
if (parts.length >= 2) {
|
|
598
|
+
npmPkg = parts[parts.length - 1];
|
|
599
|
+
}
|
|
620
600
|
fetch('/api/servers', {
|
|
621
601
|
method: 'POST',
|
|
622
602
|
headers: { 'Content-Type': 'application/json' },
|
|
623
603
|
body: JSON.stringify({
|
|
624
604
|
name: safeName,
|
|
625
605
|
description: server.description || '',
|
|
606
|
+
command: 'npx',
|
|
607
|
+
args: ['-y', server.name || npmPkg],
|
|
626
608
|
source: 'registry',
|
|
627
609
|
tags: ['marketplace'],
|
|
628
610
|
}),
|
package/dist/ui/styles.css
CHANGED
|
@@ -483,6 +483,17 @@ body {
|
|
|
483
483
|
margin-top: 4px;
|
|
484
484
|
}
|
|
485
485
|
|
|
486
|
+
.hint-link {
|
|
487
|
+
color: var(--accent);
|
|
488
|
+
cursor: pointer;
|
|
489
|
+
font-size: 13px;
|
|
490
|
+
margin-top: 8px;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
.hint-link:hover {
|
|
494
|
+
text-decoration: underline;
|
|
495
|
+
}
|
|
496
|
+
|
|
486
497
|
.npm-install-form {
|
|
487
498
|
display: flex;
|
|
488
499
|
gap: 8px;
|
package/package.json
CHANGED