loopengine 0.4.10 → 0.4.11

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.
@@ -985,8 +985,9 @@ ${renderMarkdownScript}
985
985
  // header and list. Every link to a workflow lands here.
986
986
  var pageParams = new URLSearchParams(location.search);
987
987
  var workflowPageId = pageParams.get('tab') === 'workflows' && pageParams.get('workflow') || null;
988
- // Evidence and Changes became Audit and Improve: old links still open.
989
- var OLD_TABS = { evidence: 'audit', changes: 'audit' };
988
+ // Older tab names still open their tab: Evidence, Changes and Audit are
989
+ // Activity now, Improve is Evaluation.
990
+ var OLD_TABS = { evidence: 'activity', changes: 'activity', audit: 'activity', improve: 'evaluation' };
990
991
  if (workflowPageId && pageParams.get('wtab')) workflowTabs[workflowPageId] = OLD_TABS[pageParams.get('wtab')] || pageParams.get('wtab');
991
992
  // A case's page, with a back link to here.
992
993
  function caseHref(runId) {
@@ -1143,7 +1144,7 @@ ${renderMarkdownScript}
1143
1144
  '<details class="wf-health-more"><summary>By version of its instructions</summary><div class="wf-health-table"><table><thead><tr><th>Version</th><th>Runs</th><th>Failed</th><th>Approved</th><th>Changed or denied</th><th>Questions per run</th><th>Used unedited</th><th>Time</th><th>Cost per run</th></tr></thead><tbody>' + rows + '</tbody></table></div></details>';
1144
1145
  }
1145
1146
 
1146
- // The Audit tab's summary: the workflow's last 30 days in sentences, the
1147
+ // The Activity tab's summary: the workflow's last 30 days in sentences, the
1147
1148
  // same as the Audit page's.
1148
1149
  function loadAuditSummary(card, base) {
1149
1150
  var box = card.querySelector('.wf-audit-summary');
@@ -1154,7 +1155,7 @@ ${renderMarkdownScript}
1154
1155
  .catch(function (err) { box.innerHTML = '<p class="error">Could not load its summary: ' + escapeHtml(err.message) + '</p>'; });
1155
1156
  }
1156
1157
 
1157
- // The Audit tab's latest few settings changes, with what changed.
1158
+ // The Activity tab's latest few settings changes, with what changed.
1158
1159
  function loadLatestChanges(card, name) {
1159
1160
  var box = card.querySelector('.wf-changes-latest');
1160
1161
  if (!box) return;
@@ -1398,10 +1399,10 @@ ${renderMarkdownScript}
1398
1399
  }
1399
1400
  var REFERENCE_CRIT = { id: 'reference', text: 'Matches the good result: the same facts and decisions', kind: 'reference' };
1400
1401
 
1401
- // The Audit tab: what happened and whether it can be trusted. The same
1402
+ // The Activity tab: what happened and whether it can be trusted. The same
1402
1403
  // summary as the Audit page's, its health over 30 days, its latest runs
1403
1404
  // and changes, and the way to the report and the full log.
1404
- function workflowAuditHtml(w, runsHtml, name) {
1405
+ function workflowActivityHtml(w, runsHtml, name) {
1405
1406
  var auditHref = '/audit?agent=' + encodeURIComponent(name) + '&workflow=' + encodeURIComponent(w.id);
1406
1407
  var loading = '<p class="hint" style="margin:0">Loading' + String.fromCharCode(8230) + '</p>';
1407
1408
  return (workflowPageId ? '<section class="wf-section wf-audit-summary">' + loading + '</section>' : '') +
@@ -1412,9 +1413,9 @@ ${renderMarkdownScript}
1412
1413
  (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>' : '');
1413
1414
  }
1414
1415
 
1415
- // The Improve tab: the checklist, the eval cases (suggested from real
1416
- // runs, and saved), and Evaluate.
1417
- function workflowImproveHtml(w) {
1416
+ // The Evaluation tab: the checklist, the eval cases (saved, then
1417
+ // suggested from real runs), and Evaluate.
1418
+ function workflowEvaluationHtml(w) {
1418
1419
  var evals = w.evals || { cases: [], criteria: [], rounds: [] };
1419
1420
  var criteria = evals.criteria && evals.criteria.length ? evals.criteria : [REFERENCE_CRIT];
1420
1421
  var round = evals.rounds[0];
@@ -1580,10 +1581,10 @@ ${renderMarkdownScript}
1580
1581
  '</div>' +
1581
1582
  '</header>' +
1582
1583
  '<div class="wf-row-body wf-page-body">' +
1583
- '<div class="wf-tabs" role="tablist">' + tabBtn('brief', 'Brief') + tabBtn('audit', 'Audit') + tabBtn('improve', 'Improve') + tabBtn('triggers', 'Triggers') + tabBtn('messages', 'Messages') + tabBtn('contract', 'Contract') + '</div>' +
1584
+ '<div class="wf-tabs" role="tablist">' + tabBtn('brief', 'Brief') + tabBtn('activity', 'Activity') + tabBtn('evaluation', 'Evaluation') + tabBtn('triggers', 'Triggers') + tabBtn('messages', 'Messages') + tabBtn('contract', 'Contract') + '</div>' +
1584
1585
  panel('brief', workflowBriefHtml(w)) +
1585
- panel('audit', workflowAuditHtml(w, runs, name)) +
1586
- panel('improve', workflowImproveHtml(w)) +
1586
+ panel('activity', workflowActivityHtml(w, runs, name)) +
1587
+ panel('evaluation', workflowEvaluationHtml(w)) +
1587
1588
  panel('triggers', workflowTriggersHtml(w, name, params)) +
1588
1589
  panel('messages', workflowMessagesHtml(w, name)) +
1589
1590
  panel('contract', workflowContractHtml(w, name, params)) +
@@ -1605,13 +1606,13 @@ ${renderMarkdownScript}
1605
1606
  '<div class="wf-row-body"' + (open ? '' : ' hidden') + '>' +
1606
1607
  // What it does, in full, once it's open (the row shows just its name).
1607
1608
  (w.description && w.description !== w.title ? '<p class="wf-desc">' + escapeHtml(w.description) + '</p>' : '') +
1608
- '<div class="wf-tabs" role="tablist">' + tabBtn('brief', 'Brief') + tabBtn('audit', 'Audit') + tabBtn('improve', 'Improve') + tabBtn('contract', 'Contract') + tabBtn('triggers', 'Triggers') + tabBtn('messages', 'Messages') + '</div>' +
1609
+ '<div class="wf-tabs" role="tablist">' + tabBtn('brief', 'Brief') + tabBtn('activity', 'Activity') + tabBtn('evaluation', 'Evaluation') + tabBtn('contract', 'Contract') + tabBtn('triggers', 'Triggers') + tabBtn('messages', 'Messages') + '</div>' +
1609
1610
  panel('contract', workflowContractHtml(w, name, params)) +
1610
1611
  panel('triggers', workflowTriggersHtml(w, name, params)) +
1611
1612
  panel('messages', workflowMessagesHtml(w, name)) +
1612
1613
  panel('brief', workflowBriefHtml(w)) +
1613
- panel('audit', workflowAuditHtml(w, runs, name)) +
1614
- panel('improve', workflowImproveHtml(w)) +
1614
+ panel('activity', workflowActivityHtml(w, runs, name)) +
1615
+ panel('evaluation', workflowEvaluationHtml(w)) +
1615
1616
  '<div class="hint workflow-result"></div>' +
1616
1617
  '<div class="wf-row-foot"><span class="hint">Skill <code>' + escapeHtml(w.id) + '</code></span><button type="button" class="wf-remove workflow-forget" title="Its schedules and webhooks go; its instructions stay as a skill for Chat">Remove</button></div>' +
1617
1618
  '</div>' +
@@ -2337,7 +2338,7 @@ ${renderMarkdownScript}
2337
2338
  }
2338
2339
  if (cbtn.classList.contains('wf-crit-add')) { rows.insertAdjacentHTML('beforeend', critRowHtml({ kind: 'judge' })); return; }
2339
2340
  if (cbtn.classList.contains('wf-crit-remove')) { cbtn.closest('.wf-crit-row').remove(); return; }
2340
- if (cbtn.classList.contains('wf-crit-cancel')) { workflowTabs[id] = 'improve'; loadWorkflowsSection(name); return; }
2341
+ if (cbtn.classList.contains('wf-crit-cancel')) { workflowTabs[id] = 'evaluation'; loadWorkflowsSection(name); return; }
2341
2342
  cbtn.disabled = true;
2342
2343
  if (cbtn.classList.contains('wf-crit-draft')) {
2343
2344
  critStatus.textContent = 'Drafting from the brief' + String.fromCharCode(8230);
@@ -2355,7 +2356,7 @@ ${renderMarkdownScript}
2355
2356
  fetchJsonRetryOnce(base + '/evals/criteria', { method: 'PUT', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ criteria: list }) }).then(function (r) {
2356
2357
  cbtn.disabled = false;
2357
2358
  if (!r.ok) { critStatus.textContent = r.body.error || 'That didn' + String.fromCharCode(8217) + 't save.'; return; }
2358
- workflowTabs[id] = 'improve';
2359
+ workflowTabs[id] = 'evaluation';
2359
2360
  loadWorkflowsSection(name);
2360
2361
  });
2361
2362
  });
@@ -2375,7 +2376,7 @@ ${renderMarkdownScript}
2375
2376
  if (request[1].body) opts.body = JSON.stringify(request[1].body);
2376
2377
  fetchJsonRetryOnce(request[0], opts).then(function (r) {
2377
2378
  if (!r.ok) { btn.disabled = false; result.textContent = r.body.error || 'That didn' + String.fromCharCode(8217) + 't work.'; return; }
2378
- workflowTabs[id] = 'improve';
2379
+ workflowTabs[id] = 'evaluation';
2379
2380
  loadWorkflowsSection(name);
2380
2381
  });
2381
2382
  });
@@ -201,7 +201,7 @@ ${consoleShellScript}
201
201
  function eventLink(e) {
202
202
  var d = e.data || {};
203
203
  if (e.run_id) return { href: '/cases/' + encodeURIComponent(e.run_id) + '?back=' + encodeURIComponent(location.pathname + location.search), text: 'Case' };
204
- if (e.workflow_id) return { href: workflowHref(e.agent, e.workflow_id, /brief version/i.test(d.label || '') || /Edited the workflow/.test(d.label || '') ? 'brief' : 'audit'), text: 'Workflow' };
204
+ if (e.workflow_id) return { href: workflowHref(e.agent, e.workflow_id, /brief version/i.test(d.label || '') || /Edited the workflow/.test(d.label || '') ? 'brief' : 'activity'), text: 'Workflow' };
205
205
  if (e.agent) return { href: '/agents/config?agent=' + encodeURIComponent(e.agent), text: 'Agent' };
206
206
  var path = String(d.path || '');
207
207
  if (path.indexOf('/config/models') === 0) return { href: '/config?section=models', text: 'Models' };
@@ -417,7 +417,7 @@ ${renderMarkdownScript}
417
417
  .then(function (r) { return r.json().then(function (b) { if (!r.ok) throw new Error(b.error || 'Could not save'); return b; }); })
418
418
  .then(function (b) {
419
419
  btn.textContent = 'Saved as an eval case';
420
- result.innerHTML = 'Saved. <a class="ib-link" href="/agents/config?agent=' + encodeURIComponent(c.agent) + '&tab=workflows&workflow=' + encodeURIComponent(c.workflowId) + '&wtab=improve">See its eval cases</a>';
420
+ result.innerHTML = 'Saved. <a class="ib-link" href="/agents/config?agent=' + encodeURIComponent(c.agent) + '&tab=workflows&workflow=' + encodeURIComponent(c.workflowId) + '&wtab=evaluation">See its eval cases</a>';
421
421
  showSuggestions(c, b.suggestions || [], b.criteria || []);
422
422
  })
423
423
  .catch(function (err) { btn.disabled = false; result.textContent = err.message; });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loopengine",
3
- "version": "0.4.10",
3
+ "version": "0.4.11",
4
4
  "type": "module",
5
5
  "description": "Runtime for tool-using AI agents with a transparent ReAct loop.",
6
6
  "license": "MIT",