@yemi33/minions 0.1.765 → 0.1.767

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/CHANGELOG.md CHANGED
@@ -1,10 +1,14 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.765 (2026-04-10)
3
+ ## 0.1.767 (2026-04-10)
4
4
 
5
5
  ### Features
6
6
  - id/kill endpoint
7
7
 
8
+ ### Fixes
9
+ - align Agent Usage and Engine Usage table columns
10
+ - harden agent kill endpoint — use killGracefully, clean steer.md, remove dead var
11
+
8
12
  ## 0.1.764 (2026-04-10)
9
13
 
10
14
  ### Features
@@ -214,7 +214,7 @@ function renderTokenUsage(metrics) {
214
214
  var agentsWithUsage = tokenRows.filter(function(a) { return (a[1].totalCostUsd || 0) > 0; });
215
215
  if (agentsWithUsage.length > 0) {
216
216
  html += '<div style="font-size:10px;color:var(--muted);margin:12px 0 4px;font-weight:600;text-transform:uppercase;letter-spacing:0.5px">Agent Usage</div>';
217
- html += '<table class="token-agent-table"><thead><tr><th>Agent</th><th>Model</th><th>Cost</th><th>Input</th><th>Output</th><th>Cache</th><th>$/task</th></tr></thead><tbody>';
217
+ html += '<table class="token-agent-table"><thead><tr><th style="width:20%">Agent</th><th style="width:10%">Model</th><th style="width:14%">Cost</th><th style="width:14%">Input</th><th style="width:14%">Output</th><th style="width:14%">Cache</th><th style="width:14%">$/task</th></tr></thead><tbody>';
218
218
  for (const [id, m] of agentsWithUsage.sort((a, b) => (b[1].totalCostUsd || 0) - (a[1].totalCostUsd || 0))) {
219
219
  const tasks = (m.tasksCompleted || 0) + (m.tasksErrored || 0);
220
220
  const perTask = tasks > 0 ? fmtCost((m.totalCostUsd || 0) / tasks) : '-';
@@ -237,7 +237,7 @@ function renderTokenUsage(metrics) {
237
237
  if (engineEntries.length > 0) {
238
238
  const labels = { 'consolidation': 'Consolidation', 'command-center': 'Command Center', 'doc-chat': 'Doc Chat', 'kb-sweep': 'KB Sweep', 'schedule-parse': 'Schedule Parse' };
239
239
  html += '<div style="font-size:10px;color:var(--muted);margin:12px 0 4px;font-weight:600;text-transform:uppercase;letter-spacing:0.5px">Engine Usage</div>';
240
- html += '<table class="token-agent-table"><thead><tr><th>Operation</th><th>Calls</th><th>Cost</th><th>Input</th><th>Output</th><th>Cache</th><th>$/call</th></tr></thead><tbody>';
240
+ html += '<table class="token-agent-table"><thead><tr><th style="width:20%">Operation</th><th style="width:10%">Calls</th><th style="width:14%">Cost</th><th style="width:14%">Input</th><th style="width:14%">Output</th><th style="width:14%">Cache</th><th style="width:14%">$/call</th></tr></thead><tbody>';
241
241
  for (const [cat, e] of engineEntries.sort((a, b) => (b[1].costUsd || 0) - (a[1].costUsd || 0))) {
242
242
  const perCall = (e.calls || 0) > 0 ? fmtCost((e.costUsd || 0) / e.calls) : '-';
243
243
  html += '<tr>' +
package/dashboard.js CHANGED
@@ -1472,24 +1472,20 @@ const server = http.createServer(async (req, res) => {
1472
1472
  try {
1473
1473
  const pid = parseInt(shared.safeRead(pidPath) || '', 10);
1474
1474
  if (pid) {
1475
- const safePid = shared.validatePid(pid);
1476
- if (process.platform === 'win32') {
1477
- require('child_process').execFileSync('taskkill', ['/PID', String(safePid), '/F', '/T'], { stdio: 'pipe', timeout: 5000, windowsHide: true });
1478
- } else {
1479
- process.kill(safePid, 'SIGTERM');
1480
- }
1475
+ shared.validatePid(pid); // throws if not numeric
1476
+ shared.killGracefully({ pid }, 3000);
1481
1477
  }
1482
1478
  } catch { /* process already dead or no pid file */ }
1483
1479
  try { fs.unlinkSync(pidPath); } catch { /* optional */ }
1484
1480
 
1485
- // 2. Clear session.json so retry starts fresh
1481
+ // 2. Clear session.json and steer.md so retry starts fresh
1486
1482
  try { fs.unlinkSync(path.join(agentDir, 'session.json')); } catch { /* optional */ }
1483
+ try { fs.unlinkSync(path.join(agentDir, 'steer.md')); } catch { /* optional */ }
1487
1484
 
1488
1485
  // 3. Remove all active dispatch entries for this agent
1489
1486
  const dispatchPath = path.join(MINIONS_DIR, 'engine', 'dispatch.json');
1490
1487
  const removedIds = [];
1491
1488
  mutateJsonFileLocked(dispatchPath, (dp) => {
1492
- const before = (dp.active || []).length;
1493
1489
  const removed = (dp.active || []).filter(d => d.agent === agentId);
1494
1490
  removed.forEach(d => removedIds.push(d.id));
1495
1491
  dp.active = (dp.active || []).filter(d => d.agent !== agentId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.765",
3
+ "version": "0.1.767",
4
4
  "description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
5
5
  "bin": {
6
6
  "minions": "bin/minions.js"