@yemi33/minions 0.1.51 → 0.1.53

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,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.53 (2026-03-30)
4
+
5
+ ### Dashboard
6
+ - dashboard/js/render-plans.js
7
+
8
+ ## 0.1.52 (2026-03-30)
9
+
10
+ ### Dashboard
11
+ - dashboard/js/render-plans.js
12
+
3
13
  ## 0.1.51 (2026-03-30)
4
14
 
5
15
  ### Other
@@ -191,10 +191,12 @@ function renderPlans(plans) {
191
191
 
192
192
  let actions = '';
193
193
  if (needsAction) {
194
+ // Approve/Reject target the PRD .json file (not the .md plan) since the API parses it as JSON
195
+ const actionTarget = prdFile || p.file;
194
196
  actions = '<div class="plan-card-actions" onclick="event.stopPropagation()">' +
195
- '<button class="plan-btn approve" onclick="planApprove(\'' + escHtml(p.file) + '\')">Approve</button>' +
197
+ '<button class="plan-btn approve" onclick="planApprove(\'' + escHtml(actionTarget) + '\')">Approve</button>' +
196
198
  '<button class="plan-btn" style="color:var(--blue);border-color:var(--blue)" onclick="planDiscuss(\'' + escHtml(p.file) + '\')">Discuss &amp; Revise</button>' +
197
- '<button class="plan-btn reject" onclick="planReject(\'' + escHtml(p.file) + '\')">Reject</button>' +
199
+ '<button class="plan-btn reject" onclick="planReject(\'' + escHtml(actionTarget) + '\')">Reject</button>' +
198
200
  '</div>' +
199
201
  '<div id="revise-input-' + escHtml(p.file).replace(/\./g, '-') + '" style="display:none">' +
200
202
  '<textarea class="plan-feedback-input" placeholder="What should be changed? Be specific..." id="revise-feedback-' + escHtml(p.file).replace(/\./g, '-') + '"></textarea>' +
@@ -469,9 +471,14 @@ async function planView(file) {
469
471
 
470
472
  async function planApprove(file) {
471
473
  try {
472
- await fetch('/api/plans/approve', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ file }) });
473
- showToast('cmd-toast', 'Plan approved — work will begin on next engine tick', true);
474
- refreshPlans();
474
+ const res = await fetch('/api/plans/approve', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ file }) });
475
+ if (res.ok) {
476
+ showToast('cmd-toast', 'Plan approved — work will begin on next engine tick', true);
477
+ refreshPlans();
478
+ } else {
479
+ const d = await res.json().catch(() => ({}));
480
+ alert('Approve failed: ' + (d.error || 'unknown'));
481
+ }
475
482
  } catch (e) { showToast('cmd-toast', 'Error: ' + e.message, false); }
476
483
  }
477
484
 
@@ -496,10 +503,15 @@ async function planDelete(file) {
496
503
 
497
504
  async function planPause(file) {
498
505
  try {
499
- await fetch('/api/plans/pause', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ file }) });
500
- showToast('cmd-toast', 'Plan paused — no new items will be dispatched', true);
501
- refreshPlans();
502
- refresh();
506
+ const res = await fetch('/api/plans/pause', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ file }) });
507
+ if (res.ok) {
508
+ showToast('cmd-toast', 'Plan paused — no new items will be dispatched', true);
509
+ refreshPlans();
510
+ refresh();
511
+ } else {
512
+ const d = await res.json().catch(() => ({}));
513
+ alert('Pause failed: ' + (d.error || 'unknown'));
514
+ }
503
515
  } catch (e) { showToast('cmd-toast', 'Error: ' + e.message, false); }
504
516
  }
505
517
 
@@ -507,9 +519,14 @@ async function planReject(file) {
507
519
  if (!confirm('Reject this plan? It will not be executed.')) return;
508
520
  const reason = prompt('Reason for rejection (optional):') || '';
509
521
  try {
510
- await fetch('/api/plans/reject', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ file, reason }) });
511
- showToast('cmd-toast', 'Plan rejected', true);
512
- refreshPlans();
522
+ const res = await fetch('/api/plans/reject', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ file, reason }) });
523
+ if (res.ok) {
524
+ showToast('cmd-toast', 'Plan rejected', true);
525
+ refreshPlans();
526
+ } else {
527
+ const d = await res.json().catch(() => ({}));
528
+ alert('Reject failed: ' + (d.error || 'unknown'));
529
+ }
513
530
  } catch (e) { showToast('cmd-toast', 'Error: ' + e.message, false); }
514
531
  }
515
532
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.51",
3
+ "version": "0.1.53",
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"