@yemi33/minions 0.1.1720 → 0.1.1722

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.1722 (2026-05-05)
4
+
5
+ ### Other
6
+ - Improve schedule run now feedback
7
+
8
+ ## 0.1.1721 (2026-05-05)
9
+
10
+ ### Fixes
11
+ - gate PR-derived dispatch on provider polling for both ADO and GitHub
12
+
3
13
  ## 0.1.1720 (2026-05-04)
4
14
 
5
15
  ### Features
@@ -547,7 +547,15 @@ async function toggleScheduleEnabled(id, enabled) {
547
547
  }
548
548
 
549
549
  async function runScheduleNow(id, btn) {
550
- if (btn) { btn.textContent = 'Running...'; btn.style.pointerEvents = 'none'; btn.style.opacity = '0.6'; }
550
+ if (btn && btn.disabled) return;
551
+ if (btn) {
552
+ btn.dataset.origText = btn.textContent;
553
+ btn.disabled = true;
554
+ btn.setAttribute('aria-busy', 'true');
555
+ btn.textContent = 'Running...';
556
+ btn.style.pointerEvents = 'none';
557
+ btn.style.opacity = '0.6';
558
+ }
551
559
  try {
552
560
  const res = await fetch('/api/schedules/run-now', {
553
561
  method: 'POST', headers: { 'Content-Type': 'application/json' },
@@ -562,8 +570,16 @@ async function runScheduleNow(id, btn) {
562
570
  }
563
571
  } catch (e) {
564
572
  showToast('cmd-toast', 'Run error: ' + e.message, false);
573
+ } finally {
574
+ if (btn) {
575
+ btn.disabled = false;
576
+ btn.removeAttribute('aria-busy');
577
+ btn.textContent = btn.dataset.origText || 'Run now';
578
+ delete btn.dataset.origText;
579
+ btn.style.pointerEvents = '';
580
+ btn.style.opacity = '';
581
+ }
565
582
  }
566
- if (btn) { btn.textContent = 'Run now'; btn.style.pointerEvents = ''; btn.style.opacity = ''; }
567
583
  }
568
584
 
569
585
  async function deleteSchedule(id) {
@@ -94,17 +94,17 @@ async function openSettings() {
94
94
  '<h3 style="font-size:13px;color:var(--blue);margin-bottom:8px">PR Polling &amp; Dispatch Gates</h3>' +
95
95
  '<div style="border:1px solid var(--border);border-radius:6px;padding:10px 12px;margin-bottom:16px">' +
96
96
  '<div style="display:flex;flex-direction:column;gap:6px;margin-bottom:10px">' +
97
- settingsToggle('ADO Polling', 'set-adoPollEnabled', e.adoPollEnabled !== false, 'Keeps ADO PR build results, votes, and comments fresh each tick the two fix gates below are silently inert when this is off') +
98
- '<div style="margin-left:20px;padding-left:10px;border-left:2px solid var(--border);display:flex;flex-direction:column;gap:4px">' +
99
- settingsToggle('Auto-fix Builds', 'set-autoFixBuilds', e.autoFixBuilds !== false, 'Dispatch gate: auto-fix agent when build fails (downstream of ADO Polling)') +
100
- settingsToggle('Auto-fix Conflicts', 'set-autoFixConflicts', e.autoFixConflicts !== false, 'Dispatch gate: auto-fix agent when merge conflict detected (downstream of ADO Polling)') +
101
- settingsToggle('Auto-review PRs', 'set-autoReviewPrs', e.autoReviewPrs !== false, 'Dispatch gate: review agent for newly opened agent PRs (throttle-aware)') +
102
- settingsToggle('Auto-re-review PRs', 'set-autoReReviewPrs', e.autoReReviewPrs !== false, 'Dispatch gate: review agent after a fix push is awaiting re-review (throttle-aware)') +
103
- settingsToggle('Auto-fix Review Feedback', 'set-autoFixReviewFeedback', e.autoFixReviewFeedback !== false, 'Dispatch gate: fix agent for minions changes-requested verdicts (throttle-aware)') +
104
- settingsToggle('Auto-fix Human Comments', 'set-autoFixHumanComments', e.autoFixHumanComments !== false, 'Dispatch gate: fix agent for actionable human PR comments (throttle-aware)') +
105
- '</div>' +
97
+ settingsToggle('ADO Polling', 'set-adoPollEnabled', e.adoPollEnabled !== false, 'Keeps ADO PR build results, votes, and comments fresh each tick; ADO PR dispatch gates are inert when this is off') +
98
+ settingsToggle('GitHub Polling', 'set-ghPollEnabled', e.ghPollEnabled !== false, 'Keeps GitHub PR build results, votes, and comments fresh each tick; GitHub PR dispatch gates are inert when this is off') +
99
+ '</div>' +
100
+ '<div style="margin-top:10px;padding-top:10px;border-top:1px solid var(--border);display:flex;flex-direction:column;gap:4px">' +
101
+ settingsToggle('Auto-fix Builds', 'set-autoFixBuilds', e.autoFixBuilds !== false, 'Shared dispatch gate: auto-fix agent when a PR build fails; also requires that PR provider polling is enabled') +
102
+ settingsToggle('Auto-fix Conflicts', 'set-autoFixConflicts', e.autoFixConflicts !== false, 'Shared dispatch gate: auto-fix agent when a PR merge conflict is detected; also requires that PR provider polling is enabled') +
103
+ settingsToggle('Auto-review PRs', 'set-autoReviewPrs', e.autoReviewPrs !== false, 'Shared dispatch gate: review agent for newly opened agent PRs; also requires that PR provider polling is enabled') +
104
+ settingsToggle('Auto-re-review PRs', 'set-autoReReviewPrs', e.autoReReviewPrs !== false, 'Shared dispatch gate: review agent after a fix push is awaiting re-review; also requires that PR provider polling is enabled') +
105
+ settingsToggle('Auto-fix Review Feedback', 'set-autoFixReviewFeedback', e.autoFixReviewFeedback !== false, 'Shared dispatch gate: fix agent for minions changes-requested verdicts; also requires that PR provider polling is enabled') +
106
+ settingsToggle('Auto-fix Human Comments', 'set-autoFixHumanComments', e.autoFixHumanComments !== false, 'Shared dispatch gate: fix agent for actionable human PR comments; also requires that PR provider polling is enabled') +
106
107
  '</div>' +
107
- settingsToggle('GitHub Polling', 'set-ghPollEnabled', e.ghPollEnabled !== false, 'Keeps GitHub PR build results, votes, and comments fresh each tick (reconciliation always runs regardless)') +
108
108
  '<div style="display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px">' +
109
109
  settingsField('PR Status Poll Frequency', 'set-prPollStatusEvery', e.prPollStatusEvery ?? e.adoPollStatusEvery ?? 12, 'ticks', 'Poll PR build/review/merge status every N ticks for both ADO and GitHub (~12 min at default tick rate)') +
110
110
  settingsField('PR Comments Poll Frequency', 'set-prPollCommentsEvery', e.prPollCommentsEvery ?? e.adoPollCommentsEvery ?? 12, 'ticks', 'Poll PR human comments every N ticks for both ADO and GitHub (~12 min at default tick rate)') +
@@ -37,7 +37,7 @@ Before scanning, the engine materializes plans and specs into project work items
37
37
  | `_mergeConflict: true` | Route to author for conflict resolution | `fix` |
38
38
  Skips PRs where `status !== "active"`.
39
39
 
40
- Inside `discoverFromPrs()`, `evalLoop` / `evalMaxIterations` only gate the minion review loop: initial minion reviews, minion re-reviews, and minion review-feedback fixes. Human-feedback fixes are evaluated outside that gate, build failures use the separate `maxBuildFixAttempts` cap, and merge conflicts use the separate `autoFixConflicts` gate. Conflict fixes are additionally gated by `!fixDispatched`, so an earlier successful human/review/build fix dispatch in the same PR discovery pass suppresses the conflict fix until a later pass.
40
+ Inside `discoverFromPrs()`, ADO and GitHub projects first resolve their own provider poll gate (`adoPollEnabled` or `ghPollEnabled`). PR-derived automation is inert when that provider's polling is off, so cached build, vote, conflict, and comment state cannot trigger new dispatches. The shared dispatch toggles (`autoReviewPrs`, `autoReReviewPrs`, `autoFixReviewFeedback`, `autoFixHumanComments`, `autoFixBuilds`, and `autoFixConflicts`) apply to both providers. `evalLoop` gates the minion review loop: initial minion reviews, minion re-reviews, and minion review-feedback fixes. Human-feedback fixes are evaluated outside `evalLoop`. Conflict fixes are additionally gated by `!fixDispatched`, so an earlier successful human/review/build fix dispatch in the same PR discovery pass suppresses the conflict fix until a later pass.
41
41
 
42
42
  ### Source 2: PRD Gap Analysis (via `materializePlansAsWorkItems`)
43
43
 
@@ -54,7 +54,7 @@ When multiple problems coexist, earlier triggers get the first chance to enqueue
54
54
 
55
55
  ### C. Build failures (`buildStatus === 'failing'`)
56
56
 
57
- - Gate: `buildFixAttempts < maxBuildFixAttempts` (default 3) + grace period expired
57
+ - Gate: provider polling enabled (`adoPollEnabled` or `ghPollEnabled`) + `autoFixBuilds` + `buildStatus === 'failing'` + grace period expired
58
58
  - **Grace period** (`_buildFixPushedAt`): after fix dispatches, waits `buildFixGracePeriod` (default 10min, configurable in `ENGINE_DEFAULTS`) for CI to run before re-dispatching. Cleared when poller detects build status transition (CI actually ran).
59
59
  - **Error logs**: GitHub fetches annotations (failures only, not warnings) + Actions job log (always). ADO queries builds API directly (not status checks), fetches build timeline → failed task logs (up to 10 per build, up to 10 failing pipelines).
60
60
  - **Build-fix escalation**: after 3 failed attempts, writes an inbox alert, sets `buildFixEscalated = true`, and stops *only this trigger* (auto-dispatch for build fixes). The counter resets when the build recovers. Independent of `_evalEscalated`.
@@ -63,7 +63,7 @@ When multiple problems coexist, earlier triggers get the first chance to enqueue
63
63
 
64
64
  ### D. Merge conflicts (`_mergeConflict`)
65
65
 
66
- - Gate: `autoFixConflicts` + `status === 'active'` + `_mergeConflict` + `!fixDispatched`
66
+ - Gate: provider polling enabled (`adoPollEnabled` or `ghPollEnabled`) + `autoFixConflicts` + `status === 'active'` + `_mergeConflict` + `!fixDispatched`
67
67
  - Routes to the PR author to resolve target-branch conflicts
68
68
  - Runs after review, human, and build triggers; if any earlier trigger enqueued a fix for this PR, the conflict fix waits for a later discovery pass
69
69
 
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "runtime": "copilot",
3
3
  "models": null,
4
- "cachedAt": "2026-05-04T23:05:59.485Z"
4
+ "cachedAt": "2026-05-05T07:20:48.344Z"
5
5
  }
package/engine.js CHANGED
@@ -2450,7 +2450,7 @@ async function discoverFromPrs(config, project) {
2450
2450
  // awaiting a stale-vote re-review or has build-fix retries escalated.
2451
2451
  const humanFixKey = `human-fix-${project?.name || 'default'}-${prDisplayId}`;
2452
2452
  const hasCoalescedFeedback = (dispatchCooldowns.get(humanFixKey)?.pendingContexts || []).length > 0;
2453
- if (autoFixHumanComments && (pr.humanFeedback?.pendingFix || hasCoalescedFeedback) && !fixDispatched) {
2453
+ if (pollEnabled && autoFixHumanComments && (pr.humanFeedback?.pendingFix || hasCoalescedFeedback) && !fixDispatched) {
2454
2454
  const key = humanFixKey;
2455
2455
  let staleCoalesced = [];
2456
2456
  const alreadyDispatched = isAlreadyDispatched(key);
@@ -2544,9 +2544,9 @@ async function discoverFromPrs(config, project) {
2544
2544
  if (item) { newWork.push(item); }
2545
2545
  }
2546
2546
 
2547
- // PRs with changes requested → route back to author for fix
2548
- // Gate on evalLoopEnabled — the review→fix cycle is the eval loop
2549
- if (evalLoopEnabled && autoFixReviewFeedback && reviewStatus === 'changes-requested' && !awaitingReReview && !fixDispatched) {
2547
+ // PRs with changes requested → route back to author for fix.
2548
+ // Gate on evalLoopEnabled and provider polling — the review→fix cycle depends on fresh vote state.
2549
+ if (evalLoopEnabled && pollEnabled && autoFixReviewFeedback && reviewStatus === 'changes-requested' && !awaitingReReview && !fixDispatched) {
2550
2550
  const key = `fix-${project?.name || 'default'}-${prDisplayId}`;
2551
2551
  if (fixThrottled || isAlreadyDispatched(key) || isOnCooldown(key, cooldownMs)) continue;
2552
2552
  const agentId = resolveAgent('fix', config, { authorAgent: pr.agent });
@@ -2571,7 +2571,7 @@ async function discoverFromPrs(config, project) {
2571
2571
  if (Date.now() - new Date(pr._buildFixPushedAt).getTime() < gracePeriodMs) continue;
2572
2572
  }
2573
2573
  const autoFixBuilds = config.engine?.autoFixBuilds ?? ENGINE_DEFAULTS.autoFixBuilds;
2574
- if (autoFixBuilds && pr.status === PR_STATUS.ACTIVE && pr.buildStatus === 'failing') {
2574
+ if (pollEnabled && autoFixBuilds && pr.status === PR_STATUS.ACTIVE && pr.buildStatus === 'failing') {
2575
2575
  const key = `build-fix-${project?.name || 'default'}-${prDisplayId}`;
2576
2576
  if (fixThrottled || isAlreadyDispatched(key) || isOnCooldown(key, cooldownMs)) continue;
2577
2577
 
@@ -2661,9 +2661,9 @@ async function discoverFromPrs(config, project) {
2661
2661
  }
2662
2662
  }
2663
2663
 
2664
- // PRs with merge conflicts — dispatch fix to resolve (gated by autoFixConflicts)
2664
+ // PRs with merge conflicts — dispatch fix to resolve (gated by provider polling + autoFixConflicts)
2665
2665
  const autoFixConflicts = config.engine?.autoFixConflicts ?? ENGINE_DEFAULTS.autoFixConflicts;
2666
- if (autoFixConflicts && pr.status === PR_STATUS.ACTIVE && pr._mergeConflict && !fixDispatched) {
2666
+ if (pollEnabled && autoFixConflicts && pr.status === PR_STATUS.ACTIVE && pr._mergeConflict && !fixDispatched) {
2667
2667
  const key = `conflict-fix-${project?.name || 'default'}-${prDisplayId}`;
2668
2668
  // Suppress re-dispatch for 10 min after last attempt — ADO/GitHub recomputes
2669
2669
  // mergeStatus asynchronously (1–5 min lag), so the flag may stay set even after
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.1720",
3
+ "version": "0.1.1722",
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"