@yemi33/minions 0.1.12 → 0.1.14

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.
Files changed (37) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/dashboard/js/command-center.js +377 -0
  3. package/dashboard/js/command-history.js +70 -0
  4. package/dashboard/js/command-input.js +268 -0
  5. package/dashboard/js/command-parser.js +129 -0
  6. package/dashboard/js/detail-panel.js +98 -0
  7. package/dashboard/js/live-stream.js +69 -0
  8. package/dashboard/js/modal-qa.js +309 -0
  9. package/dashboard/js/modal.js +131 -0
  10. package/dashboard/js/refresh.js +59 -0
  11. package/dashboard/js/render-agents.js +44 -0
  12. package/dashboard/js/render-dispatch.js +171 -0
  13. package/dashboard/js/render-inbox.js +163 -0
  14. package/dashboard/js/render-kb.js +125 -0
  15. package/dashboard/js/render-other.js +181 -0
  16. package/dashboard/js/render-plans.js +536 -0
  17. package/dashboard/js/render-prd.js +688 -0
  18. package/dashboard/js/render-prs.js +94 -0
  19. package/dashboard/js/render-schedules.js +158 -0
  20. package/dashboard/js/render-skills.js +89 -0
  21. package/dashboard/js/render-work-items.js +219 -0
  22. package/dashboard/js/settings.js +155 -0
  23. package/dashboard/js/state.js +84 -0
  24. package/dashboard/js/utils.js +39 -0
  25. package/dashboard/layout.html +123 -0
  26. package/dashboard/pages/engine.html +12 -0
  27. package/dashboard/pages/home.html +31 -0
  28. package/dashboard/pages/inbox.html +17 -0
  29. package/dashboard/pages/plans.html +4 -0
  30. package/dashboard/pages/prd.html +5 -0
  31. package/dashboard/pages/prs.html +4 -0
  32. package/dashboard/pages/schedule.html +10 -0
  33. package/dashboard/pages/work.html +5 -0
  34. package/dashboard/styles.css +598 -0
  35. package/dashboard-build.js +52 -0
  36. package/dashboard.js +44 -1
  37. package/package.json +1 -1
@@ -0,0 +1,52 @@
1
+ /**
2
+ * dashboard-build.js — Standalone dashboard HTML assembler for testing.
3
+ * Exports buildDashboardHtml() so unit tests can verify assembly.
4
+ */
5
+ const fs = require('fs');
6
+ const path = require('path');
7
+ const shared = require('./engine/shared');
8
+ const { safeRead } = shared;
9
+
10
+ const MINIONS_DIR = __dirname;
11
+
12
+ function buildDashboardHtml() {
13
+ const dashDir = path.join(MINIONS_DIR, 'dashboard');
14
+ const layoutPath = path.join(dashDir, 'layout.html');
15
+
16
+ if (!fs.existsSync(layoutPath)) {
17
+ return safeRead(path.join(MINIONS_DIR, 'dashboard.html')) || '';
18
+ }
19
+
20
+ const layout = safeRead(layoutPath);
21
+ const css = safeRead(path.join(dashDir, 'styles.css'));
22
+
23
+ const pages = ['home', 'work', 'prd', 'prs', 'plans', 'inbox', 'schedule', 'engine'];
24
+ let pageHtml = '';
25
+ for (const p of pages) {
26
+ const content = safeRead(path.join(dashDir, 'pages', p + '.html'));
27
+ const activeClass = p === 'home' ? ' active' : '';
28
+ pageHtml += ` <div class="page${activeClass}" id="page-${p}">\n${content}\n </div>\n\n`;
29
+ }
30
+
31
+ const jsFiles = [
32
+ 'utils', 'state', 'detail-panel', 'live-stream',
33
+ 'render-agents', 'render-dispatch', 'render-work-items', 'render-prd',
34
+ 'render-prs', 'render-plans', 'render-inbox', 'render-kb', 'render-skills',
35
+ 'render-other', 'render-schedules',
36
+ 'command-parser', 'command-input', 'command-center', 'command-history',
37
+ 'modal', 'modal-qa', 'settings', 'refresh'
38
+ ];
39
+ let jsHtml = '';
40
+ for (const f of jsFiles) {
41
+ const content = safeRead(path.join(dashDir, 'js', f + '.js'));
42
+ jsHtml += `\n// ─── ${f}.js ────────────────────────────────────────\n${content}\n`;
43
+ }
44
+
45
+ // Use function replacer to avoid $ special patterns in String.replace
46
+ return layout
47
+ .replace('/* __CSS__ */', () => css)
48
+ .replace('<!-- __PAGES__ -->', () => pageHtml)
49
+ .replace('/* __JS__ */', () => jsHtml);
50
+ }
51
+
52
+ module.exports = { buildDashboardHtml };
package/dashboard.js CHANGED
@@ -49,7 +49,50 @@ function resolvePlanPath(file) {
49
49
  return active;
50
50
  }
51
51
 
52
- const HTML_RAW = safeRead(path.join(MINIONS_DIR, 'dashboard.html')) || '';
52
+ // Assemble dashboard HTML from fragments (or fall back to monolith)
53
+ function buildDashboardHtml() {
54
+ const dashDir = path.join(MINIONS_DIR, 'dashboard');
55
+ const layoutPath = path.join(dashDir, 'layout.html');
56
+
57
+ // Fall back to monolith if fragments don't exist
58
+ if (!fs.existsSync(layoutPath)) {
59
+ return safeRead(path.join(MINIONS_DIR, 'dashboard.html')) || '';
60
+ }
61
+
62
+ const layout = safeRead(layoutPath);
63
+ const css = safeRead(path.join(dashDir, 'styles.css'));
64
+
65
+ // Assemble page fragments
66
+ const pages = ['home', 'work', 'prd', 'prs', 'plans', 'inbox', 'schedule', 'engine'];
67
+ let pageHtml = '';
68
+ for (const p of pages) {
69
+ const content = safeRead(path.join(dashDir, 'pages', p + '.html'));
70
+ const activeClass = p === 'home' ? ' active' : '';
71
+ pageHtml += ` <div class="page${activeClass}" id="page-${p}">\n${content}\n </div>\n\n`;
72
+ }
73
+
74
+ // Assemble JS modules (order matters: utils → state → renderers → commands → refresh)
75
+ const jsFiles = [
76
+ 'utils', 'state', 'detail-panel', 'live-stream',
77
+ 'render-agents', 'render-dispatch', 'render-work-items', 'render-prd',
78
+ 'render-prs', 'render-plans', 'render-inbox', 'render-kb', 'render-skills',
79
+ 'render-other', 'render-schedules',
80
+ 'command-parser', 'command-input', 'command-center', 'command-history',
81
+ 'modal', 'modal-qa', 'settings', 'refresh'
82
+ ];
83
+ let jsHtml = '';
84
+ for (const f of jsFiles) {
85
+ const content = safeRead(path.join(dashDir, 'js', f + '.js'));
86
+ jsHtml += `\n// ─── ${f}.js ────────────────────────────────────────\n${content}\n`;
87
+ }
88
+
89
+ return layout
90
+ .replace('/* __CSS__ */', () => css)
91
+ .replace('<!-- __PAGES__ -->', () => pageHtml)
92
+ .replace('/* __JS__ */', () => jsHtml);
93
+ }
94
+
95
+ const HTML_RAW = buildDashboardHtml();
53
96
  const HTML = HTML_RAW.replace('Minions Mission Control', `Minions Mission Control — ${projectNames}`);
54
97
  const HTML_GZ = zlib.gzipSync(HTML);
55
98
  const HTML_ETAG = '"' + require('crypto').createHash('md5').update(HTML).digest('hex') + '"';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
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"