@yemi33/minions 0.1.2133 → 0.1.2135

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.
@@ -1032,10 +1032,21 @@ function formatPrContextSuffix(pr) {
1032
1032
  // ─── Work Discovery Helpers ──────────────────────────────────────────────────
1033
1033
 
1034
1034
  function buildBaseVars(agentId, config, project) {
1035
+ // W-mq15r0cx — surface the LLM model id alongside the agent name so PR
1036
+ // comment sign-offs can stamp `<agent> · <model>` and humans can tell
1037
+ // which agent + which model authored the comment. Falls through to
1038
+ // 'unknown' (defensive only) rather than crashing or omitting the
1039
+ // field when neither agent.model nor engine.defaultModel resolves —
1040
+ // omitting would leave a dangling `· ` in the rendered sign-off.
1041
+ const resolvedModel = shared.resolveAgentModel(
1042
+ config?.agents?.[agentId] || null,
1043
+ config?.engine || null
1044
+ );
1035
1045
  return {
1036
1046
  agent_id: agentId,
1037
1047
  agent_name: config.agents[agentId]?.name || agentId,
1038
1048
  agent_role: config.agents[agentId]?.role || 'Agent',
1049
+ agent_model: resolvedModel || 'unknown',
1039
1050
  team_root: MINIONS_DIR,
1040
1051
  repo_id: project?.repositoryId || '',
1041
1052
  project_name: project?.name || 'Unknown Project',
package/engine.js CHANGED
@@ -7700,33 +7700,11 @@ async function tickInner() {
7700
7700
  } catch (err) { log('warn', `Stall detection error: ${err?.message || err}`); }
7701
7701
  }
7702
7702
 
7703
- // 3. Discover new work from sources
7704
- // Cap temp-agent creation at (maxConcurrent - activeCount) for this tick so
7705
- // temps count against maxConcurrent like named agents. Without this, a mass
7706
- // discovery pass (e.g. 20 PR build failures) would stamp a fresh temp agent
7707
- // onto every pending item regardless of concurrency cap, and those temps
7708
- // would spawn over subsequent ticks — overwhelming the OS and mass-orphaning
7709
- // the dispatches (#1209).
7710
- {
7711
- const dispatchPre = getDispatch();
7712
- const activeCountPre = (dispatchPre.active || []).length;
7713
- const maxC = resolveMaxConcurrent(config);
7714
- setTempBudget(Math.max(0, maxC - activeCountPre));
7715
- }
7716
7703
  try { pruneStalePrDispatches(config); } catch (e) { log('warn', 'prune stale PR dispatches: ' + e.message); }
7717
- let discoveryOk = true;
7718
- try { await discoverWork(config); } catch (e) { log('warn', 'discoverWork: ' + e.message); discoveryOk = false; }
7719
- if (_isTickStale(myGeneration)) return;
7720
-
7721
- // 4. Update snapshot
7722
- safe('updateSnapshot', () => updateSnapshot(config));
7723
-
7724
- if (!discoveryOk) {
7725
- log('warn', 'Skipping dispatch — discovery failed, stale data risk');
7726
- return;
7727
- }
7728
7704
 
7729
- // 5. Process pending dispatches auto-spawn agents
7705
+ // 3. Process pending dispatches before discovery. discoverWork() runs
7706
+ // pre-dispatch LLM validation for newly found work; a slow validator must not
7707
+ // starve runnable entries that are already durable in dispatch.pending.
7730
7708
  const dispatch = getDispatch();
7731
7709
  const activeCount = (dispatch.active || []).length;
7732
7710
  const maxConcurrent = resolveMaxConcurrent(config);
@@ -8017,6 +7995,31 @@ async function tickInner() {
8017
7995
  if (_isTickStale(myGeneration)) return;
8018
7996
  mutateDispatch((dp) => { dp.pending = postDispatch.pending; return dp; });
8019
7997
  }
7998
+
7999
+ // 4. Discover new work from sources. Newly discovered dispatches are eligible
8000
+ // for the next tick; existing pending work has already had its spawn chance.
8001
+ // Cap temp-agent creation at (maxConcurrent - activeCount) for this tick so
8002
+ // temps count against maxConcurrent like named agents. Without this, a mass
8003
+ // discovery pass (e.g. 20 PR build failures) would stamp a fresh temp agent
8004
+ // onto every pending item regardless of concurrency cap, and those temps
8005
+ // would spawn over subsequent ticks — overwhelming the OS and mass-orphaning
8006
+ // the dispatches (#1209).
8007
+ {
8008
+ const dispatchPre = getDispatch();
8009
+ const activeCountPre = (dispatchPre.active || []).length;
8010
+ const maxC = resolveMaxConcurrent(config);
8011
+ setTempBudget(Math.max(0, maxC - activeCountPre));
8012
+ }
8013
+ let discoveryOk = true;
8014
+ try { await discoverWork(config); } catch (e) { log('warn', 'discoverWork: ' + e.message); discoveryOk = false; }
8015
+ if (_isTickStale(myGeneration)) return;
8016
+
8017
+ // 5. Update snapshot
8018
+ safe('updateSnapshot', () => updateSnapshot(config));
8019
+
8020
+ if (!discoveryOk) {
8021
+ log('warn', 'Discovery failed after pending dispatch pass — new work may be stale until next tick');
8022
+ }
8020
8023
  }
8021
8024
 
8022
8025
  // ─── Exports (for engine/cli.js and other modules) ──────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.2133",
3
+ "version": "0.1.2135",
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"
package/playbooks/fix.md CHANGED
@@ -93,7 +93,7 @@ Do NOT remove the worktree — the engine handles cleanup automatically.
93
93
  {{pr_comment_instructions}}
94
94
  - pullRequestId: `{{pr_number}}`
95
95
  - content: Explain what was fixed, reference each review finding, include build/test status
96
- - Sign: `Fixed by Minions ({{agent_name}} — {{agent_role}})`
96
+ - Sign: `Fixed by Minions ({{agent_name}} — {{agent_role}} · {{agent_model}})`
97
97
 
98
98
  ## Resolve Review Comments
99
99
 
@@ -77,7 +77,7 @@ Your review body **MUST** start with one of these verdict lines (exactly as show
77
77
  - `VERDICT: REQUEST_CHANGES` — if there are issues that must be fixed
78
78
 
79
79
  Follow the verdict line with your detailed review findings, then sign off:
80
- - Sign: `Review by Minions ({{agent_name}} — {{agent_role}})`
80
+ - Sign: `Review by Minions ({{agent_name}} — {{agent_role}} · {{agent_model}})`
81
81
 
82
82
  Use this structure after the verdict:
83
83
 
@@ -95,7 +95,7 @@ Minimum diff to ship: <one-line description of the smallest change that would fl
95
95
  Non-blocking observations: None
96
96
  - (default to `None`; if you list any, each must be tied to an existing diff line in the form `path:line — observation`)
97
97
 
98
- Review by Minions ({{agent_name}} — {{agent_role}})
98
+ Review by Minions ({{agent_name}} — {{agent_role}} · {{agent_model}})
99
99
  ```
100
100
 
101
101
  After running the command, confirm it succeeded (check the command output for errors). If it fails, retry once.
@@ -124,8 +124,8 @@ Key rules (full detail in the template):
124
124
 
125
125
  Your task is complete when your review comment has been posted successfully with BOTH:
126
126
  - `VERDICT: APPROVE` or `VERDICT: REQUEST_CHANGES` on the first line, AND
127
- - the `Review by Minions ({{agent_name}} — {{agent_role}})` sign-off on the last line of the body
127
+ - the `Review by Minions ({{agent_name}} — {{agent_role}} · {{agent_model}})` sign-off on the last line of the body
128
128
 
129
- and the completion report has `verdict: "approved"` or `verdict: "changes-requested"`. The sign-off is what lets the engine distinguish agent reviews from human PR comments on ADO; without it the engine will queue a redundant fix-dispatch loop (W-mpbhnaim000q9ed3, Ripley on PR 5056697).
129
+ and the completion report has `verdict: "approved"` or `verdict: "changes-requested"`. The sign-off is what lets the engine distinguish agent reviews from human PR comments on ADO; without it the engine will queue a redundant fix-dispatch loop (W-mpbhnaim000q9ed3, Ripley on PR 5056697). The `· {{agent_model}}` suffix is an addition inside the existing parens (W-mq15r0cx) so humans can tell which agent + which model authored the review — the legacy `Review by Minions (` prefix is preserved so the engine's `/\bMinions\s*\(/i` matcher still recognizes both new comments (with model id) and pre-W-mq15r0cx historical comments (without).
130
130
 
131
131
  Do NOT stop before posting the review. Do NOT continue reading unrelated files after posting.