@yemi33/minions 0.1.35 → 0.1.36

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,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.36 (2026-03-28)
4
+
5
+ ### Dashboard
6
+ - dashboard.js
7
+
3
8
  ## 0.1.35 (2026-03-28)
4
9
 
5
10
  ### Dashboard
package/dashboard.js CHANGED
@@ -92,11 +92,39 @@ function buildDashboardHtml() {
92
92
  .replace('/* __JS__ */', () => jsHtml);
93
93
  }
94
94
 
95
- const HTML_RAW = buildDashboardHtml();
96
- const HTML = HTML_RAW.replace('Minions Mission Control', `Minions Mission Control — ${projectNames}`);
97
- const HTML_GZ = zlib.gzipSync(HTML);
98
- const HTML_ETAG = '"' + require('crypto').createHash('md5').update(HTML).digest('hex') + '"';
95
+ let HTML_RAW = buildDashboardHtml();
96
+ let HTML = HTML_RAW.replace('Minions Mission Control', `Minions Mission Control — ${projectNames}`);
97
+ let HTML_GZ = zlib.gzipSync(HTML);
98
+ let HTML_ETAG = '"' + require('crypto').createHash('md5').update(HTML).digest('hex') + '"';
99
99
 
100
+ // Hot-reload: watch dashboard/ directory for changes and rebuild
101
+ function rebuildDashboardHtml() {
102
+ try {
103
+ const newRaw = buildDashboardHtml();
104
+ if (newRaw === HTML_RAW) return; // no changes
105
+ HTML_RAW = newRaw;
106
+ HTML = HTML_RAW.replace('Minions Mission Control', `Minions Mission Control — ${projectNames}`);
107
+ HTML_GZ = zlib.gzipSync(HTML);
108
+ HTML_ETAG = '"' + require('crypto').createHash('md5').update(HTML).digest('hex') + '"';
109
+ console.log(' Dashboard hot-reloaded');
110
+ } catch (e) { console.error(' Hot-reload error:', e.message); }
111
+ }
112
+
113
+ const dashDir = path.join(MINIONS_DIR, 'dashboard');
114
+ if (fs.existsSync(dashDir)) {
115
+ let _reloadTimer = null;
116
+ const scheduleReload = () => {
117
+ if (_reloadTimer) clearTimeout(_reloadTimer);
118
+ _reloadTimer = setTimeout(rebuildDashboardHtml, 300); // debounce 300ms
119
+ };
120
+ // Watch top-level files (styles.css, layout.html)
121
+ try { fs.watch(dashDir, scheduleReload); } catch {}
122
+ // Watch subdirectories (pages/, js/)
123
+ for (const sub of ['pages', 'js']) {
124
+ const subDir = path.join(dashDir, sub);
125
+ if (fs.existsSync(subDir)) try { fs.watch(subDir, scheduleReload); } catch {}
126
+ }
127
+ }
100
128
 
101
129
  // -- Data Collectors (most moved to engine/queries.js) --
102
130
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.35",
3
+ "version": "0.1.36",
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"