diff --git a/clavis/clavis-vault/cmd/clavitor/web/index.html b/clavis/clavis-vault/cmd/clavitor/web/index.html
index ebfcc05..c1d6742 100644
--- a/clavis/clavis-vault/cmd/clavitor/web/index.html
+++ b/clavis/clavis-vault/cmd/clavitor/web/index.html
@@ -499,6 +499,7 @@
'' +
'' +
'
' +
'
' +
'
' +
@@ -542,6 +543,7 @@
entries = await api('GET', '/api/entries');
history.replaceState({list: true}, '', '/app/');
renderEntryList();
+ loadAgentWidget(); // Load agents count
if (autoImport && entries.length === 0) {
location.href = '/app/import.html';
}
@@ -554,6 +556,26 @@
}
}
+ async function loadAgentWidget() {
+ try {
+ var agents = await api('GET', '/api/agents');
+ var widget = document.getElementById('agentWidget');
+ if (!agents || agents.length === 0) {
+ widget.classList.add('hidden');
+ return;
+ }
+ var active = agents.filter(function(a) { return a.status === 'active'; }).length;
+ widget.innerHTML = '
' +
+ '🤖' +
+ '' + active + ' active agent' + (active !== 1 ? 's' : '') + '' +
+ 'Click to manage' +
+ '
';
+ widget.classList.remove('hidden');
+ } catch(e) {
+ // Silently fail - agents not critical
+ }
+ }
+
function domainFrom(url) {
try { return new URL(url).hostname.replace(/^www\./, ''); } catch(e) { return url; }
}
@@ -1311,18 +1333,78 @@
'
' +
'No custom scopes found. Create entries with scopes first.
';
+ return;
+ }
+ var html = '';
+ availableScopes.forEach(function(scope) {
+ html += '' +
'
Agent Created
' +
- '
' + escapeHtml(result.name) + ' — scope ' + escapeHtml(result.scope) + '
' +
+ '
' + escapeHtml(result.name) + ' — scopes: ' + escapeHtml(result.scopes) + '
' +
'
Copy this token now. It will never be shown again.
' +
'
' +
- escapeHtml(result.token) +
+ escapeHtml(result.credential) +
'
' +
'
Click to copy. Use this token as the Bearer in CLI: clavitor-cli init <token>
' +
'
' +
@@ -1377,7 +1470,6 @@
'' +
'
' +
'
' +