@yemi33/minions 0.1.945 → 0.1.947

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,6 +1,6 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.945 (2026-04-14)
3
+ ## 0.1.947 (2026-04-14)
4
4
 
5
5
  ### Features
6
6
  - make ADO poll frequency configurable and ungate reconcilePrs
@@ -47,6 +47,8 @@
47
47
  - prioritize error_max_turns over permission-blocked in classifyFailure (#1001)
48
48
 
49
49
  ### Other
50
+ - refactor(ado): simplify comments, fix declaration order, promote ado import
51
+ - refactor(ado): move PR enrichment fetch into fetchAdoPrMetadata helper
50
52
  - refactor: Make renderLiveChatMessage a thin wrapper over renderAgentOutput
51
53
  - test(preflight): add unit tests for findClaudeBinary, runPreflight, printPreflight, checkOrExit (#953)
52
54
  - test(meeting): add unit tests for key functions (#957)
package/dashboard.js CHANGED
@@ -21,6 +21,7 @@ const _dashboardVersion = {
21
21
  const shared = require('./engine/shared');
22
22
  const queries = require('./engine/queries');
23
23
  const teams = require('./engine/teams');
24
+ const ado = require('./engine/ado');
24
25
  const os = require('os');
25
26
 
26
27
  const { safeRead, safeReadDir, safeWrite, safeJson, safeJsonObj, safeJsonArr, safeUnlink, mutateJsonFileLocked, mutateWorkItems, getProjects: _getProjects, DONE_STATUSES, WI_STATUS, reopenWorkItem } = shared;
@@ -4228,14 +4229,7 @@ What would you like to discuss or change? When you're happy, say "approve" and I
4228
4229
  } else if (adoMatch) {
4229
4230
  const [, adoOrg, adoProj, adoRepo] = adoMatch;
4230
4231
  try {
4231
- const { getAdoToken } = require('./engine/ado');
4232
- const token = await getAdoToken();
4233
- if (token) {
4234
- const apiUrl = `https://dev.azure.com/${adoOrg}/${adoProj}/_apis/git/repositories/${adoRepo}/pullrequests/${prNum}?api-version=7.1`;
4235
- const result = await shared.execAsync(`curl -s --max-time 10 -H "Authorization: Bearer ${token}" "${apiUrl}"`, { encoding: 'utf-8', timeout: 15000, windowsHide: true });
4236
- const d = JSON.parse(result);
4237
- prData = { title: d.title, description: d.description, branch: d.sourceRefName?.replace('refs/heads/', ''), author: d.createdBy?.displayName };
4238
- }
4232
+ prData = await ado.fetchAdoPrMetadata(prNum, adoOrg, adoProj, adoRepo);
4239
4233
  } catch { /* ADO token may not be available */ }
4240
4234
  }
4241
4235
  if (!prData) return;
package/engine/ado.js CHANGED
@@ -371,19 +371,17 @@ async function pollPrStatus(config) {
371
371
 
372
372
  if (newStatus !== PR_STATUS.ACTIVE) return updated;
373
373
 
374
- // Query builds API directly — status checks (/statuses) are unreliable (stale codecoverage postbacks)
375
- // Use refs/pull/{id}/merge the synthetic merge ref ADO creates for each PR — to scope builds exactly
374
+ // Query builds API directly — /statuses is unreliable (stale codecoverage postbacks).
375
+ // refs/pull/{id}/merge scopes server-side to this PR; sourceVersion narrows to the current
376
+ // merge commit (same ref accumulates builds across all prior pushes to the PR).
376
377
  const prNumber = pr.prNumber;
378
+ const mergeCommitId = prData.lastMergeCommit?.commitId;
377
379
  let buildStatus = 'none';
378
380
  let buildFailReason = '';
379
381
  let buildStatuses = []; // for error log fetching
380
382
 
381
- const mergeCommitId = prData.lastMergeCommit?.commitId;
382
383
  if (prNumber && mergeCommitId) {
383
384
  try {
384
- // branchName=refs/pull/{id}/merge scopes server-side to this PR's builds.
385
- // sourceVersion filter then narrows to the current merge commit — a PR updated
386
- // multiple times accumulates builds on the same ref across different commits.
387
385
  const mergeRef = encodeURIComponent(`refs/pull/${prNumber}/merge`);
388
386
  const buildsUrl = `${orgBase}/${project.adoProject}/_apis/build/builds?branchName=${mergeRef}&repositoryId=${project.repositoryId}&repositoryType=TfsGit&$top=25&api-version=7.1`;
389
387
  const buildsData = await adoFetch(buildsUrl, token);
@@ -768,6 +766,20 @@ async function checkLiveReviewStatus(pr, project) {
768
766
  }
769
767
  }
770
768
 
769
+ async function fetchAdoPrMetadata(prNum, adoOrg, adoProj, adoRepo) {
770
+ const token = await getAdoToken();
771
+ if (!token) return null;
772
+ const url = `https://dev.azure.com/${adoOrg}/${adoProj}/_apis/git/repositories/${adoRepo}/pullrequests/${prNum}?api-version=7.1`;
773
+ const pr = await adoFetch(url, token);
774
+ if (!pr) return null;
775
+ return {
776
+ title: pr.title || '',
777
+ description: pr.description || '',
778
+ branch: pr.sourceRefName?.replace('refs/heads/', '') || '',
779
+ author: pr.createdBy?.displayName || '',
780
+ };
781
+ }
782
+
771
783
  module.exports = {
772
784
  getAdoToken,
773
785
  adoFetch,
@@ -777,5 +789,6 @@ module.exports = {
777
789
  checkLiveReviewStatus,
778
790
  needsAdoPollRetry,
779
791
  isAdoAuthError, // exported for testing
792
+ fetchAdoPrMetadata,
780
793
  };
781
794
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.945",
3
+ "version": "0.1.947",
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"