@yemi33/minions 0.1.36 → 0.1.37

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.37 (2026-03-28)
4
+
5
+ ### Dashboard
6
+ - dashboard.js
7
+ - dashboard/js/refresh.js
8
+
3
9
  ## 0.1.36 (2026-03-28)
4
10
 
5
11
  ### Dashboard
@@ -58,3 +58,9 @@ document.querySelectorAll('.sidebar-link').forEach(link => {
58
58
  link.addEventListener('click', e => { e.preventDefault(); switchPage(link.dataset.page); });
59
59
  });
60
60
  switchPage(currentPage);
61
+
62
+ // Hot-reload: auto-refresh browser when dashboard files change
63
+ try {
64
+ const _hotReload = new EventSource('/api/hot-reload');
65
+ _hotReload.onmessage = (e) => { if (e.data === 'reload') location.reload(); };
66
+ } catch {}
package/dashboard.js CHANGED
@@ -97,7 +97,9 @@ let HTML = HTML_RAW.replace('Minions Mission Control', `Minions Mission Control
97
97
  let HTML_GZ = zlib.gzipSync(HTML);
98
98
  let HTML_ETAG = '"' + require('crypto').createHash('md5').update(HTML).digest('hex') + '"';
99
99
 
100
- // Hot-reload: watch dashboard/ directory for changes and rebuild
100
+ // Hot-reload: watch dashboard/ directory for changes, rebuild, and push reload to browsers
101
+ const _hotReloadClients = new Set();
102
+
101
103
  function rebuildDashboardHtml() {
102
104
  try {
103
105
  const newRaw = buildDashboardHtml();
@@ -107,6 +109,10 @@ function rebuildDashboardHtml() {
107
109
  HTML_GZ = zlib.gzipSync(HTML);
108
110
  HTML_ETAG = '"' + require('crypto').createHash('md5').update(HTML).digest('hex') + '"';
109
111
  console.log(' Dashboard hot-reloaded');
112
+ // Push reload to all connected browsers
113
+ for (const res of _hotReloadClients) {
114
+ try { res.write('data: reload\n\n'); } catch { _hotReloadClients.delete(res); }
115
+ }
110
116
  } catch (e) { console.error(' Hot-reload error:', e.message); }
111
117
  }
112
118
 
@@ -2811,6 +2817,12 @@ What would you like to discuss or change? When you're happy, say "approve" and I
2811
2817
  // Status & health
2812
2818
  { method: 'GET', path: '/api/status', desc: 'Full dashboard status snapshot (agents, PRDs, work items, dispatch, etc.)', handler: handleStatus },
2813
2819
  { method: 'GET', path: '/api/health', desc: 'Lightweight health check for monitoring', handler: handleHealth },
2820
+ { method: 'GET', path: '/api/hot-reload', desc: 'SSE stream for dashboard hot-reload notifications', handler: (req, res) => {
2821
+ res.writeHead(200, { 'Content-Type': 'text/event-stream', 'Cache-Control': 'no-cache', 'Connection': 'keep-alive' });
2822
+ res.write('data: connected\n\n');
2823
+ _hotReloadClients.add(res);
2824
+ req.on('close', () => _hotReloadClients.delete(res));
2825
+ }},
2814
2826
 
2815
2827
  // Work items
2816
2828
  { method: 'POST', path: '/api/work-items', desc: 'Create a new work item', params: 'title, type?, description?, priority?, project?, agent?, agents?, scope?, references?, acceptanceCriteria?', handler: handleWorkItemsCreate },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.36",
3
+ "version": "0.1.37",
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"