clementine-agent 1.18.95 → 1.18.96
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/cli/dashboard.js +61 -6
- package/package.json +1 -1
package/dist/cli/dashboard.js
CHANGED
|
@@ -10190,12 +10190,6 @@ If the tool returns nothing or errors, return an empty array \`[]\`.`,
|
|
|
10190
10190
|
sendPolicy: a.sendPolicy ?? null,
|
|
10191
10191
|
agentStatus: a.status ?? 'active',
|
|
10192
10192
|
budgetMonthlyCents: a.budgetMonthlyCents ?? 0,
|
|
10193
|
-
// Mission & persona — what the agent edit modal renders in
|
|
10194
|
-
// its single combined textarea.
|
|
10195
|
-
systemPromptBody: a.systemPromptBody ?? '',
|
|
10196
|
-
// Multi-project access list (separate from the legacy single
|
|
10197
|
-
// `project` binding above).
|
|
10198
|
-
projects: a.projects ?? [],
|
|
10199
10193
|
};
|
|
10200
10194
|
}));
|
|
10201
10195
|
}
|
|
@@ -24514,6 +24508,62 @@ async function refreshMiniDashboards() {
|
|
|
24514
24508
|
failHtml += '</div>';
|
|
24515
24509
|
}
|
|
24516
24510
|
|
|
24511
|
+
// ── Activity card (PRD §12 / 1.18.96) ──────────────────────────────
|
|
24512
|
+
// Fourth mini-dashboard card. Lite version of the PRD Agent Behavior
|
|
24513
|
+
// metrics — full per-tool / per-turn data needs Path B hooks, but
|
|
24514
|
+
// there is plenty to surface from CronRunEntry alone:
|
|
24515
|
+
// - runs/day average across the 7d window
|
|
24516
|
+
// - busiest task (highest run count)
|
|
24517
|
+
// - trigger breakdown (manual / scheduled / after / api / webhook)
|
|
24518
|
+
// The trigger bar is the most actionable signal — heavy "manual" =
|
|
24519
|
+
// automatable work; heavy "after" = chained workflows dragging cost.
|
|
24520
|
+
var runsPerDay = last7.length > 0 ? (last7.length / 7).toFixed(1) : '0';
|
|
24521
|
+
var taskCounts = {};
|
|
24522
|
+
for (var ti = 0; ti < last7.length; ti++) {
|
|
24523
|
+
var jn = last7[ti].jobName;
|
|
24524
|
+
if (!jn) continue;
|
|
24525
|
+
taskCounts[jn] = (taskCounts[jn] || 0) + 1;
|
|
24526
|
+
}
|
|
24527
|
+
var busiestTask = '—';
|
|
24528
|
+
var busiestCount = 0;
|
|
24529
|
+
Object.keys(taskCounts).forEach(function(name) {
|
|
24530
|
+
if (taskCounts[name] > busiestCount) { busiestTask = name; busiestCount = taskCounts[name]; }
|
|
24531
|
+
});
|
|
24532
|
+
var triggerOrder = ['manual', 'scheduled', 'after', 'api', 'webhook', 'other'];
|
|
24533
|
+
var triggerCounts = { manual: 0, scheduled: 0, after: 0, api: 0, webhook: 0, other: 0 };
|
|
24534
|
+
for (var tg = 0; tg < last7.length; tg++) {
|
|
24535
|
+
var trg = last7[tg].trigger;
|
|
24536
|
+
if (trg && triggerCounts[trg] !== undefined) triggerCounts[trg] += 1;
|
|
24537
|
+
else triggerCounts.other += 1;
|
|
24538
|
+
}
|
|
24539
|
+
var triggerColors = {
|
|
24540
|
+
manual: '#3b82f6',
|
|
24541
|
+
scheduled: '#10b981',
|
|
24542
|
+
after: '#f59e0b',
|
|
24543
|
+
api: '#8b5cf6',
|
|
24544
|
+
webhook: '#ec4899',
|
|
24545
|
+
other: '#6b7280'
|
|
24546
|
+
};
|
|
24547
|
+
var triggerBarHtml;
|
|
24548
|
+
if (last7.length === 0) {
|
|
24549
|
+
triggerBarHtml = '<div class="mini-fails-empty">No runs in 7d</div>';
|
|
24550
|
+
} else {
|
|
24551
|
+
triggerBarHtml = '<div class="mini-split">';
|
|
24552
|
+
var legendHtml = '<div class="mini-split-legend">';
|
|
24553
|
+
for (var tk = 0; tk < triggerOrder.length; tk++) {
|
|
24554
|
+
var key = triggerOrder[tk];
|
|
24555
|
+
var n = triggerCounts[key];
|
|
24556
|
+
if (n === 0) continue;
|
|
24557
|
+
var pctW = Math.max(2, Math.round((n / last7.length) * 100));
|
|
24558
|
+
triggerBarHtml += '<div class="mini-split-seg" style="background:' + triggerColors[key] + ';width:' + pctW + '%" title="' + key + ': ' + n + ' run' + (n === 1 ? '' : 's') + '">' + (pctW >= 14 ? key : '') + '</div>';
|
|
24559
|
+
legendHtml += '<span><span class="mini-split-legend-dot" style="background:' + triggerColors[key] + '"></span>' + key + ' ' + n + '</span>';
|
|
24560
|
+
}
|
|
24561
|
+
triggerBarHtml += '</div>' + legendHtml + '</div>';
|
|
24562
|
+
}
|
|
24563
|
+
var activitySub = last7.length === 0
|
|
24564
|
+
? 'no runs yet'
|
|
24565
|
+
: (busiestCount > 0 ? runsPerDay + ' runs/day · busiest: ' + busiestTask + ' (' + busiestCount + ')' : runsPerDay + ' runs/day');
|
|
24566
|
+
|
|
24517
24567
|
// ── Compose ────────────────────────────────────────────────────────
|
|
24518
24568
|
host.innerHTML =
|
|
24519
24569
|
'<div class="mini-card">'
|
|
@@ -24530,6 +24580,11 @@ async function refreshMiniDashboards() {
|
|
|
24530
24580
|
+ '<div class="mini-card-head"><span class="mini-card-title">Reliability · 7d</span><span class="mini-card-figure">' + totalFails7 + ' fail' + (totalFails7 === 1 ? '' : 's') + '</span></div>'
|
|
24531
24581
|
+ failHtml
|
|
24532
24582
|
+ '<div class="mini-card-sub">click a column in the run list to filter by category</div>'
|
|
24583
|
+
+ '</div>'
|
|
24584
|
+
+ '<div class="mini-card">'
|
|
24585
|
+
+ '<div class="mini-card-head"><span class="mini-card-title">Activity · 7d</span><span class="mini-card-figure">' + last7.length + ' run' + (last7.length === 1 ? '' : 's') + '</span></div>'
|
|
24586
|
+
+ triggerBarHtml
|
|
24587
|
+
+ '<div class="mini-card-sub">' + esc(activitySub) + '</div>'
|
|
24533
24588
|
+ '</div>';
|
|
24534
24589
|
}
|
|
24535
24590
|
|