agentflow-dashboard 0.6.0 → 0.7.0
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/{chunk-N6IN5SHX.js → chunk-GA2Y6E62.js} +861 -69
- package/dist/cli.cjs +853 -68
- package/dist/cli.js +1 -1
- package/dist/client/assets/index-BQUye2Lc.js +50 -0
- package/dist/client/assets/index-Ds_npIxI.css +1 -0
- package/dist/client/dashboard.js +3113 -0
- package/dist/client/index.html +13 -0
- package/dist/index.cjs +853 -68
- package/dist/index.js +1 -1
- package/dist/public/dashboard.js +74 -42
- package/dist/public/index.html +13 -0
- package/dist/server.cjs +853 -68
- package/dist/server.js +1 -1
- package/package.json +10 -2
- package/public/dashboard.js +74 -42
- package/public/index.html +13 -0
- package/dist/public/debug.html +0 -43
- package/public/debug.html +0 -43
package/dist/index.js
CHANGED
package/dist/public/dashboard.js
CHANGED
|
@@ -380,51 +380,83 @@ class AgentFlowDashboard {
|
|
|
380
380
|
section.style.display = '';
|
|
381
381
|
var html = '<h4>Process Health</h4>';
|
|
382
382
|
|
|
383
|
-
//
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
var
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
383
|
+
// Render all discovered services (new multi-service format)
|
|
384
|
+
var services = r.services || [];
|
|
385
|
+
if (services.length > 0) {
|
|
386
|
+
for (var si = 0; si < services.length; si++) {
|
|
387
|
+
var svc = services[si];
|
|
388
|
+
html += '<div class="ph-service">';
|
|
389
|
+
html += `<div class="ph-service-name">${escapeHtml(svc.name)}</div>`;
|
|
390
|
+
|
|
391
|
+
// PID File for this service
|
|
392
|
+
if (svc.pidFile) {
|
|
393
|
+
var pf = svc.pidFile;
|
|
394
|
+
var cls = pf.alive && pf.matchesProcess ? 'ok' : pf.stale ? 'bad' : 'warn';
|
|
395
|
+
html += '<div class="ph-row">';
|
|
396
|
+
html += '<span class="ph-label">PID File</span>';
|
|
397
|
+
html += `<span class="ph-value ${cls}">`;
|
|
398
|
+
html += pf.pid ? `PID ${pf.pid}${pf.alive ? ' (alive)' : ' (dead)'}` : 'No PID';
|
|
399
|
+
html += '</span></div>';
|
|
400
|
+
}
|
|
393
401
|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
402
|
+
// Systemd for this service
|
|
403
|
+
if (svc.systemd) {
|
|
404
|
+
var sd = svc.systemd;
|
|
405
|
+
var sdCls = sd.activeState === 'active' ? 'ok' : sd.failed ? 'bad' : 'warn';
|
|
406
|
+
html += '<div class="ph-row">';
|
|
407
|
+
html += '<span class="ph-label">Systemd</span>';
|
|
408
|
+
html += `<span class="ph-value ${sdCls}">`;
|
|
409
|
+
html +=
|
|
410
|
+
escapeHtml(sd.unit) +
|
|
411
|
+
' \u2014 ' +
|
|
412
|
+
escapeHtml(sd.activeState) +
|
|
413
|
+
' (' +
|
|
414
|
+
escapeHtml(sd.subState) +
|
|
415
|
+
')';
|
|
416
|
+
if (sd.restarts > 0) html += ` [${sd.restarts} restarts]`;
|
|
417
|
+
html += '</span></div>';
|
|
418
|
+
}
|
|
411
419
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
420
|
+
// Workers for this service
|
|
421
|
+
if (svc.workers?.workers) {
|
|
422
|
+
html += '<div class="ph-section">';
|
|
423
|
+
html += '<span class="ph-label">Workers</span>';
|
|
424
|
+
html += '<div class="process-grid">';
|
|
425
|
+
for (var i = 0; i < svc.workers.workers.length; i++) {
|
|
426
|
+
var worker = svc.workers.workers[i];
|
|
427
|
+
var statusCls = worker.alive ? 'ok' : worker.stale ? 'bad' : 'warn';
|
|
428
|
+
html += `<div class="worker-card ${statusCls}">`;
|
|
429
|
+
html += `<div class="worker-name">${escapeHtml(worker.name)}</div>`;
|
|
430
|
+
html += '<div class="worker-details">';
|
|
431
|
+
html += `<span>PID: ${worker.pid || '-'}</span>`;
|
|
432
|
+
html += `<span>${escapeHtml(worker.declaredStatus)}</span>`;
|
|
433
|
+
html += '</div></div>';
|
|
434
|
+
}
|
|
435
|
+
html += '</div></div>';
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
html += '</div>'; // .ph-service
|
|
439
|
+
}
|
|
440
|
+
} else {
|
|
441
|
+
// Fallback: legacy single-service format
|
|
442
|
+
if (r.pidFile) {
|
|
443
|
+
var pf2 = r.pidFile;
|
|
444
|
+
var cls2 = pf2.alive && pf2.matchesProcess ? 'ok' : pf2.stale ? 'bad' : 'warn';
|
|
445
|
+
html += '<div class="ph-row">';
|
|
446
|
+
html += '<span class="ph-label">PID File</span>';
|
|
447
|
+
html += `<span class="ph-value ${cls2}">`;
|
|
448
|
+
html += pf2.pid ? `PID ${pf2.pid}${pf2.alive ? ' (alive)' : ' (dead)'}` : 'No PID';
|
|
449
|
+
html += '</span></div>';
|
|
450
|
+
}
|
|
451
|
+
if (r.systemd) {
|
|
452
|
+
var sd2 = r.systemd;
|
|
453
|
+
var sdCls2 = sd2.activeState === 'active' ? 'ok' : sd2.failed ? 'bad' : 'warn';
|
|
454
|
+
html += '<div class="ph-row">';
|
|
455
|
+
html += '<span class="ph-label">Systemd</span>';
|
|
456
|
+
html += `<span class="ph-value ${sdCls2}">`;
|
|
457
|
+
html += escapeHtml(sd2.unit) + ' \u2014 ' + escapeHtml(sd2.activeState) + ' (' + escapeHtml(sd2.subState) + ')';
|
|
458
|
+
html += '</span></div>';
|
|
426
459
|
}
|
|
427
|
-
html += '</div></div>';
|
|
428
460
|
}
|
|
429
461
|
|
|
430
462
|
// Agent Services - categorize processes and build tree
|
package/dist/public/index.html
CHANGED
|
@@ -711,6 +711,19 @@
|
|
|
711
711
|
}
|
|
712
712
|
|
|
713
713
|
/* Enhanced Process Health */
|
|
714
|
+
.ph-service {
|
|
715
|
+
margin-bottom: 1rem;
|
|
716
|
+
padding: 0.6rem 0.8rem;
|
|
717
|
+
border: 1px solid var(--border-color, #30363d);
|
|
718
|
+
border-radius: 6px;
|
|
719
|
+
}
|
|
720
|
+
.ph-service-name {
|
|
721
|
+
font-weight: 600;
|
|
722
|
+
font-size: 0.95rem;
|
|
723
|
+
margin-bottom: 0.4rem;
|
|
724
|
+
color: var(--fg-primary, #e6edf3);
|
|
725
|
+
text-transform: capitalize;
|
|
726
|
+
}
|
|
714
727
|
.ph-section {
|
|
715
728
|
margin-bottom: 1rem;
|
|
716
729
|
}
|