@yemi33/minions 0.1.138 → 0.1.139

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.139 (2026-04-01)
4
+
5
+ ### Dashboard
6
+ - dashboard/js/render-pipelines.js
7
+
3
8
  ## 0.1.138 (2026-04-01)
4
9
 
5
10
  ### Dashboard
@@ -19,7 +19,7 @@ function renderPipelines(pipelines) {
19
19
  const lastRun = (p.runs || []).slice(-1)[0];
20
20
  const statusColor = activeRun ? 'var(--blue)' : lastRun?.status === 'completed' ? 'var(--green)' : lastRun?.status === 'failed' ? 'var(--red)' : 'var(--muted)';
21
21
  const statusLabel = activeRun ? 'Running' : lastRun ? (lastRun.status === 'completed' ? 'Completed' : lastRun.status === 'failed' ? 'Failed' : lastRun.status) : 'Never run';
22
- const trigger = p.trigger?.cron ? 'Cron: ' + p.trigger.cron : 'Manual';
22
+ const trigger = p.trigger?.cron ? _cronToHuman(p.trigger.cron) : 'Manual';
23
23
 
24
24
  // Stage flow visualization
25
25
  var stageFlow = (p.stages || []).map(function(s) {
@@ -52,7 +52,7 @@ function openPipelineDetail(id) {
52
52
  // Status + actions
53
53
  var activeRun = (p.runs || []).find(function(r) { return r.status === 'running'; });
54
54
  html += '<div style="display:flex;justify-content:space-between;align-items:center">' +
55
- '<span style="font-size:10px;color:var(--muted)">' + (p.trigger?.cron ? 'Cron: ' + p.trigger.cron : 'Manual trigger') + '</span>' +
55
+ '<span style="font-size:10px;color:var(--muted)">' + (p.trigger?.cron ? escHtml(_cronToHuman(p.trigger.cron)) + ' <span style="opacity:0.6">(' + escHtml(p.trigger.cron) + ', ' + escHtml(Intl.DateTimeFormat().resolvedOptions().timeZone) + ')</span>' : 'Manual trigger') + '</span>' +
56
56
  '<div style="display:flex;gap:6px">' +
57
57
  (activeRun ? '' : '<button class="pr-pager-btn" style="font-size:9px;padding:2px 8px;color:var(--green);border-color:var(--green)" onclick="_triggerPipeline(\'' + escHtml(id) + '\',this)">Run Now</button>') +
58
58
  '<button class="pr-pager-btn" style="font-size:9px;padding:2px 8px" onclick="_togglePipelineEnabled(\'' + escHtml(id) + '\',' + !p.enabled + ',this)">' + (p.enabled !== false ? 'Disable' : 'Enable') + '</button>' +
@@ -142,13 +142,52 @@ async function _deletePipelineConfirm(id) {
142
142
 
143
143
  function openCreatePipelineModal() {
144
144
  var inputStyle = 'display:block;width:100%;margin-top:4px;padding:6px 8px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--text);font-size:var(--text-md);font-family:inherit';
145
+ var pillStyle = 'display:inline-block;padding:4px 10px;margin:2px;border:1px solid var(--border);border-radius:12px;cursor:pointer;font-size:11px;color:var(--text);background:var(--bg);user-select:none;transition:all 0.15s';
146
+ var linkStyle = 'font-size:10px;color:var(--blue);cursor:pointer;text-decoration:underline;margin-right:8px';
147
+ var tz = Intl.DateTimeFormat().resolvedOptions().timeZone;
148
+
149
+ // Hour options (0-23)
150
+ var hourOpts = '';
151
+ for (var h = 0; h < 24; h++) hourOpts += '<option value="' + h + '"' + (h === 9 ? ' selected' : '') + '>' + String(h).padStart(2, '0') + '</option>';
152
+ // Minute options (0, 5, 10, ..., 55)
153
+ var minOpts = '';
154
+ for (var m = 0; m <= 55; m += 5) minOpts += '<option value="' + m + '"' + (m === 0 ? ' selected' : '') + '>' + String(m).padStart(2, '0') + '</option>';
155
+
156
+ var dayOrder = [0, 1, 2, 3, 4, 5, 6];
157
+ var dayLabels = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
158
+ var dayPills = dayOrder.map(function(d) {
159
+ var active = d >= 1 && d <= 5; // default weekdays
160
+ return '<span class="sched-day-pill' + (active ? ' active' : '') + '" data-day="' + d + '" ' +
161
+ 'style="' + pillStyle + (active ? ';background:var(--blue);color:#fff;border-color:var(--blue)' : '') + '" ' +
162
+ 'onclick="_toggleDayPill(this);_updatePlCronPreview()">' + dayLabels[d] + '</span>';
163
+ }).join('');
145
164
 
146
165
  document.getElementById('modal-title').textContent = 'New Pipeline';
147
166
  document.getElementById('modal-body').innerHTML =
148
167
  '<div style="display:flex;flex-direction:column;gap:10px">' +
149
168
  '<label style="color:var(--text);font-size:var(--text-md)">ID<input id="pl-id" style="' + inputStyle + '" placeholder="e.g. daily-audit-cycle"></label>' +
150
169
  '<label style="color:var(--text);font-size:var(--text-md)">Title<input id="pl-title" style="' + inputStyle + '" placeholder="e.g. Daily audit and improvement cycle"></label>' +
151
- '<label style="color:var(--text);font-size:var(--text-md)">Trigger (cron, optional)<input id="pl-cron" style="' + inputStyle + '" placeholder="e.g. 0 9 * (9am daily) — leave empty for manual"></label>' +
170
+ '<div>' +
171
+ '<div style="display:flex;align-items:center;gap:8px;margin-bottom:6px">' +
172
+ '<label style="color:var(--text);font-size:var(--text-md);margin:0">Schedule</label>' +
173
+ '<label style="font-size:11px;color:var(--muted);cursor:pointer"><input type="checkbox" id="pl-use-cron" checked onchange="_updatePlCronPreview()" style="accent-color:var(--blue)"> Enable automatic trigger</label>' +
174
+ '</div>' +
175
+ '<div id="pl-cron-picker">' +
176
+ '<div style="display:flex;gap:8px;align-items:center">' +
177
+ '<select id="pl-pick-hour" style="' + inputStyle + ';width:auto;display:inline-block" onchange="_updatePlCronPreview()">' + hourOpts + '</select>' +
178
+ '<span style="color:var(--muted)">:</span>' +
179
+ '<select id="pl-pick-minute" style="' + inputStyle + ';width:auto;display:inline-block" onchange="_updatePlCronPreview()">' + minOpts + '</select>' +
180
+ '<span style="font-size:10px;color:var(--muted)">' + escHtml(tz) + '</span>' +
181
+ '</div>' +
182
+ '<div style="margin-top:8px">' + dayPills + '</div>' +
183
+ '<div style="margin-top:6px">' +
184
+ '<span style="' + linkStyle + '" onclick="_quickSelectDays(\'all\');_updatePlCronPreview()">Every day</span>' +
185
+ '<span style="' + linkStyle + '" onclick="_quickSelectDays(\'weekdays\');_updatePlCronPreview()">Weekdays</span>' +
186
+ '<span style="' + linkStyle + '" onclick="_quickSelectDays(\'weekends\');_updatePlCronPreview()">Weekends</span>' +
187
+ '</div>' +
188
+ '<div id="pl-cron-preview" style="margin-top:4px;font-size:11px;color:var(--blue)"></div>' +
189
+ '</div>' +
190
+ '</div>' +
152
191
  '<label style="color:var(--text);font-size:var(--text-md)">Stages (JSON array)<textarea id="pl-stages" rows="10" style="' + inputStyle + ';resize:vertical;font-family:Consolas,monospace" placeholder=\'[{"id":"audit","type":"task","title":"Audit codebase","taskType":"explore"},{"id":"discuss","type":"meeting","title":"Discuss findings","dependsOn":["audit"],"participants":["all"]}]\'></textarea></label>' +
153
192
  '<div style="display:flex;justify-content:flex-end;gap:8px;margin-top:4px">' +
154
193
  '<button onclick="closeModal()" class="pr-pager-btn">Cancel</button>' +
@@ -156,12 +195,30 @@ function openCreatePipelineModal() {
156
195
  '</div>' +
157
196
  '</div>';
158
197
  document.getElementById('modal').classList.add('open');
198
+ _updatePlCronPreview();
199
+ }
200
+
201
+ function _updatePlCronPreview() {
202
+ var useCron = document.getElementById('pl-use-cron')?.checked;
203
+ var pickerEl = document.getElementById('pl-cron-picker');
204
+ if (pickerEl) pickerEl.style.opacity = useCron ? '1' : '0.4';
205
+ if (pickerEl) pickerEl.style.pointerEvents = useCron ? '' : 'none';
206
+ if (!useCron) { window._plComputedCron = ''; var prev = document.getElementById('pl-cron-preview'); if (prev) prev.textContent = 'Manual trigger only'; return; }
207
+ var hour = parseInt(document.getElementById('pl-pick-hour')?.value || '9', 10);
208
+ var minute = parseInt(document.getElementById('pl-pick-minute')?.value || '0', 10);
209
+ var days = [];
210
+ document.querySelectorAll('.sched-day-pill').forEach(function(btn) { if (btn.classList.contains('active')) days.push(parseInt(btn.dataset.day, 10)); });
211
+ var cron = _pickerToCron(hour, minute, days);
212
+ window._plComputedCron = cron;
213
+ var prev = document.getElementById('pl-cron-preview');
214
+ if (prev) prev.textContent = cron ? '\u2192 ' + _cronToHuman(cron) : '(select at least one day)';
159
215
  }
160
216
 
161
217
  async function _submitCreatePipeline() {
162
218
  var id = document.getElementById('pl-id')?.value?.trim();
163
219
  var title = document.getElementById('pl-title')?.value?.trim();
164
- var cron = document.getElementById('pl-cron')?.value?.trim();
220
+ var useCron = document.getElementById('pl-use-cron')?.checked;
221
+ var cron = useCron ? (window._plComputedCron || '') : '';
165
222
  var stagesRaw = document.getElementById('pl-stages')?.value?.trim();
166
223
  if (!id || !title) { alert('ID and title required'); return; }
167
224
  var stages;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.138",
3
+ "version": "0.1.139",
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"