@yemi33/minions 0.1.502 → 0.1.504

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,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.504 (2026-04-07)
4
+
5
+ ### Features
6
+ - 9 live output tests + render [steering-failed] in live stream
7
+
8
+ ### Fixes
9
+ - live output reads only tail bytes from disk, increase cap to 64KB
10
+
3
11
  ## 0.1.502 (2026-04-07)
4
12
 
5
13
  ### Features
@@ -54,6 +54,13 @@ function renderLiveChatMessage(raw) {
54
54
  continue;
55
55
  }
56
56
 
57
+ // Steering failure notices
58
+ if (trimmed.startsWith('[steering-failed]')) {
59
+ const msg = trimmed.replace('[steering-failed] ', '');
60
+ el.innerHTML += '<div style="background:rgba(248,81,73,0.1);border:1px solid var(--red);color:var(--red);padding:6px 12px;border-radius:8px;margin:4px 0;font-size:11px">\u26A0 ' + escHtml(msg) + '</div>';
61
+ continue;
62
+ }
63
+
57
64
  // JSON array format (--output-format json)
58
65
  if (trimmed.startsWith('[')) {
59
66
  try {
package/dashboard.js CHANGED
@@ -1681,18 +1681,24 @@ const server = http.createServer(async (req, res) => {
1681
1681
  async function handleAgentLive(req, res, match) {
1682
1682
  const agentId = match[1];
1683
1683
  const livePath = path.join(MINIONS_DIR, 'agents', agentId, 'live-output.log');
1684
- const content = safeRead(livePath);
1685
1684
  res.setHeader('Content-Type', 'text/plain; charset=utf-8');
1686
1685
  res.setHeader('Access-Control-Allow-Origin', '*');
1687
- if (!content) {
1686
+ const params = new URL(req.url, 'http://localhost').searchParams;
1687
+ const rawTail = parseInt(params.get('tail'));
1688
+ if (params.has('tail') && isNaN(rawTail)) return jsonReply(res, 400, { error: 'tail must be a number' });
1689
+ const tailBytes = isNaN(rawTail) ? 8192 : Math.max(1, Math.min(65536, rawTail));
1690
+ // Read only the tail bytes from disk instead of entire file
1691
+ try {
1692
+ const stat = fs.statSync(livePath);
1693
+ if (stat.size === 0) { res.end('No live output. Agent may not be running.'); return; }
1694
+ const start = Math.max(0, stat.size - tailBytes);
1695
+ const buf = Buffer.alloc(Math.min(tailBytes, stat.size));
1696
+ const fd = fs.openSync(livePath, 'r');
1697
+ fs.readSync(fd, buf, 0, buf.length, start);
1698
+ fs.closeSync(fd);
1699
+ res.end(buf.toString('utf8'));
1700
+ } catch {
1688
1701
  res.end('No live output. Agent may not be running.');
1689
- } else {
1690
- // Return last N bytes via ?tail=N param (default last 8KB)
1691
- const params = new URL(req.url, 'http://localhost').searchParams;
1692
- const rawTail = parseInt(params.get('tail'));
1693
- if (params.has('tail') && isNaN(rawTail)) return jsonReply(res, 400, { error: 'tail must be a number' });
1694
- const tailBytes = isNaN(rawTail) ? 8192 : Math.max(1, Math.min(10000, rawTail));
1695
- res.end(content.length > tailBytes ? content.slice(-tailBytes) : content);
1696
1702
  }
1697
1703
  return;
1698
1704
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.502",
3
+ "version": "0.1.504",
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"