@yemi33/minions 0.1.65 → 0.1.66

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,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.66 (2026-03-31)
4
+
5
+ ### Dashboard
6
+ - dashboard.js
7
+ - dashboard/js/refresh.js
8
+
3
9
  ## 0.1.65 (2026-03-31)
4
10
 
5
11
  ### Engine
@@ -57,15 +57,16 @@ async function refresh() {
57
57
 
58
58
  refresh();
59
59
 
60
- // SSE status stream — real-time push, falls back to 4s polling
60
+ // SSE status stream — real-time push + hot-reload on one connection
61
+ // (avoids exhausting HTTP/1.1's 6-connection-per-origin limit)
61
62
  let _statusStream = null;
62
63
  try {
63
64
  _statusStream = new EventSource('/api/status-stream');
64
65
  _statusStream.onmessage = (e) => {
65
66
  try { _processStatusUpdate(JSON.parse(e.data)); } catch (e2) { console.error('status-stream:', e2.message); }
66
67
  };
68
+ _statusStream.addEventListener('reload', () => { location.reload(); });
67
69
  _statusStream.onerror = () => {
68
- // Fall back to polling
69
70
  if (_statusStream) { _statusStream.close(); _statusStream = null; }
70
71
  setInterval(refresh, 4000);
71
72
  };
@@ -79,10 +80,4 @@ document.querySelectorAll('.sidebar-link').forEach(link => {
79
80
  });
80
81
  switchPage(currentPage);
81
82
 
82
- // Hot-reload: auto-refresh browser when dashboard files change
83
- try {
84
- const _hotReload = new EventSource('/api/hot-reload');
85
- _hotReload.onmessage = (e) => { if (e.data === 'reload') location.reload(); };
86
- } catch { /* expected */ }
87
-
88
83
  window.MinionsRefresh = { refresh };
package/dashboard.js CHANGED
@@ -109,7 +109,11 @@ function rebuildDashboardHtml() {
109
109
  HTML_GZ = zlib.gzipSync(HTML);
110
110
  HTML_ETAG = '"' + require('crypto').createHash('md5').update(HTML).digest('hex') + '"';
111
111
  console.log(' Dashboard hot-reloaded');
112
- // Push reload to all connected browsers
112
+ // Push reload to all connected browsers via status-stream (saves a connection)
113
+ for (const res of _statusStreamClients) {
114
+ try { res.write('event: reload\ndata: reload\n\n'); } catch { _statusStreamClients.delete(res); }
115
+ }
116
+ // Legacy hot-reload clients
113
117
  for (const res of _hotReloadClients) {
114
118
  try { res.write('data: reload\n\n'); } catch { _hotReloadClients.delete(res); }
115
119
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.65",
3
+ "version": "0.1.66",
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"