loopengine 0.4.9 → 0.4.10
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/web/agents-config-page.js +20 -16
- package/package.json +1 -1
|
@@ -210,6 +210,9 @@ export const agentsConfigPageHtml = `<!doctype html>
|
|
|
210
210
|
.wf-crit-rate { font-variant-numeric: tabular-nums; }
|
|
211
211
|
.wf-case-standins { margin: 0; font-size: 12.5px; color: var(--ink-muted); }
|
|
212
212
|
.wf-panel { min-width: 0; }
|
|
213
|
+
.wf-section { display: grid; gap: 10px; min-width: 0; }
|
|
214
|
+
.wf-panel > .wf-section + .wf-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
|
|
215
|
+
.wf-section .wf-sub { margin: 0; }
|
|
213
216
|
.wf-run-lines, .wf-cand-list, .wf-change-list { min-width: 0; }
|
|
214
217
|
.wf-run-line, .wf-run-link { min-width: 0; overflow: hidden; }
|
|
215
218
|
.wf-run-lines, .wf-cand-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
|
|
@@ -1400,12 +1403,13 @@ ${renderMarkdownScript}
|
|
|
1400
1403
|
// and changes, and the way to the report and the full log.
|
|
1401
1404
|
function workflowAuditHtml(w, runsHtml, name) {
|
|
1402
1405
|
var auditHref = '/audit?agent=' + encodeURIComponent(name) + '&workflow=' + encodeURIComponent(w.id);
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
'<
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
(workflowPageId ? '<
|
|
1406
|
+
var loading = '<p class="hint" style="margin:0">Loading' + String.fromCharCode(8230) + '</p>';
|
|
1407
|
+
return (workflowPageId ? '<section class="wf-section wf-audit-summary">' + loading + '</section>' : '') +
|
|
1408
|
+
(workflowPageId ? '<section class="wf-section wf-health">' + loading + '</section>' : '') +
|
|
1409
|
+
'<section class="wf-section"><h4 class="wf-sub">Latest runs</h4>' +
|
|
1410
|
+
(runsHtml ? '<ul class="wf-run-lines">' + runsHtml + '</ul>' : '<p class="hint" style="margin:0">No runs yet.</p>') + '</section>' +
|
|
1411
|
+
(workflowPageId ? '<section class="wf-section"><h4 class="wf-sub">Latest changes</h4><div class="wf-changes-latest">' + loading + '</div></section>' : '') +
|
|
1412
|
+
(workflowPageId ? '<section class="wf-section"><div class="wf-audit-tools"><a class="primary" href="/agents/' + encodeURIComponent(name) + '/workflows/' + encodeURIComponent(w.id) + '/audit/report">Open the report</a><a href="' + auditHref + '">See everything in Audit ' + String.fromCharCode(8594) + '</a></div></section>' : '');
|
|
1409
1413
|
}
|
|
1410
1414
|
|
|
1411
1415
|
// The Improve tab: the checklist, the eval cases (suggested from real
|
|
@@ -1470,14 +1474,14 @@ ${renderMarkdownScript}
|
|
|
1470
1474
|
: '<p class="wf-eval-last"><strong>Last evaluation: ' + escapeHtml(new Date(round.at).toLocaleDateString(undefined, { month: 'short', day: 'numeric' })) + (round.briefVersion ? ', version ' + round.briefVersion + ' of its instructions' : '') + '</strong>' +
|
|
1471
1475
|
(checked ? String.fromCharCode(8212) + ' ' + round.allPassed + ' of ' + round.cases.length + ' cases passed every checklist item.' : '') +
|
|
1472
1476
|
' <details class="wf-eval-details"><summary>Details</summary>Ran with ' + escapeHtml(round.model) + DOT + 'judged by ' + escapeHtml(round.judge) + DOT + escapeHtml(new Date(round.at).toLocaleString()) + '</details></p>';
|
|
1473
|
-
return critSection +
|
|
1474
|
-
'<h4 class="wf-sub">Eval cases' + (evals.cases.length ? ' (' + evals.cases.length + ')' : '') + '</h4>' +
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1477
|
+
return '<section class="wf-section">' + critSection + '</section>' +
|
|
1478
|
+
'<section class="wf-section"><h4 class="wf-sub">Eval cases' + (evals.cases.length ? ' (' + evals.cases.length + ')' : '') + '</h4>' +
|
|
1479
|
+
'<p class="hint" style="margin:0">Real runs saved to check every change against.</p>' +
|
|
1480
|
+
(cases ? '<ul class="wf-cases">' + cases + '</ul>' : '<p class="hint" style="margin:0">None yet: add suggested ones below, or save any run from its case page.</p>') +
|
|
1481
|
+
'<div class="wf-evals-bar"><button type="button" class="wf-evals-run"' + (!evals.cases.length || running ? ' disabled' : '') + '>' + (running ? 'Evaluating ' + running.done + ' of ' + running.total + String.fromCharCode(8230) : 'Evaluate') + '</button>' +
|
|
1482
|
+
'<span class="hint">Runs every eval case again with the current instructions and checks each result against the checklist. Nothing is sent, refunded or submitted.</span></div>' +
|
|
1483
|
+
lastLine + '</section>' +
|
|
1484
|
+
(workflowPageId ? '<section class="wf-section"><h4 class="wf-sub">Suggested eval cases</h4><div class="wf-candidates"><p class="hint" style="margin:0">Looking through its runs' + String.fromCharCode(8230) + '</p></div></section>' : '');
|
|
1481
1485
|
}
|
|
1482
1486
|
|
|
1483
1487
|
// Worth testing: runs from the last 30 days that would make good eval
|
|
@@ -1492,12 +1496,12 @@ ${renderMarkdownScript}
|
|
|
1492
1496
|
.then(function (data) {
|
|
1493
1497
|
var list = data.candidates || [];
|
|
1494
1498
|
if (!list.length) { box.innerHTML = '<p class="hint" style="margin:0">Nothing new to suggest from the last 30 days.</p>'; return; }
|
|
1495
|
-
box.innerHTML = '<p class="hint" style="margin:0 0 6px">
|
|
1499
|
+
box.innerHTML = '<p class="hint" style="margin:0 0 6px">Runs from the last 30 days worth adding, best first: where a person denied or changed what it did, a bad result, a question it asked, or a typical good run. Open one to read it in full first.</p><ul class="wf-cand-list">' + list.map(function (c) {
|
|
1496
1500
|
var why = WHY[c.why] || ['', c.why];
|
|
1497
1501
|
return '<li><span class="le-pill ' + why[0] + '">' + why[1] + '</span>' +
|
|
1498
1502
|
'<span class="wf-cand-text"><strong>' + escapeHtml(c.detail) + '</strong><span class="hint">' + escapeHtml(new Date(c.at).toLocaleDateString(undefined, { month: 'short', day: 'numeric' })) + (c.inputs ? DOT + escapeHtml(c.inputs) : '') + '</span></span>' +
|
|
1499
1503
|
'<a class="wf-link" href="' + caseHref(c.runId) + '">Open</a>' +
|
|
1500
|
-
'<button type="button" class="wf-link wf-save-case" data-run="' + escapeHtml(c.runId) + '">
|
|
1504
|
+
'<button type="button" class="wf-link wf-save-case" data-run="' + escapeHtml(c.runId) + '">Add as eval case</button></li>';
|
|
1501
1505
|
}).join('') + '</ul>';
|
|
1502
1506
|
})
|
|
1503
1507
|
.catch(function (err) { box.innerHTML = '<p class="error">Could not look through its runs: ' + escapeHtml(err.message) + '</p>'; });
|