@yemi33/minions 0.1.805 → 0.1.807

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.805 (2026-04-10)
3
+ ## 0.1.807 (2026-04-10)
4
4
 
5
5
  ### Features
6
6
  - configurable ignored comment authors — auto-filtered, never trigger fixes
@@ -9,6 +9,8 @@
9
9
  - cap review→fix cycles at evalMaxIterations (default 3)
10
10
 
11
11
  ### Fixes
12
+ - ADO build query filters by source branch (not all org builds)
13
+ - adoFetch supports method/body for PATCH requests (auto-complete)
12
14
  - prevent false [process-exit] detection from tool result content
13
15
  - allow PRD item retry when work item is missing (closes #781) (#807)
14
16
  - handle force-pushed dep branches on retry (closes #738) (#806)
@@ -27,7 +29,6 @@
27
29
  - 5 bugs from comprehensive audit
28
30
  - stale ADO build detection + merge conflict auto-fix for both platforms
29
31
  - don't overwrite reviewStatus when platform vote hasn't propagated
30
- - don't overwrite approval with 'waiting' when platform API lags
31
32
 
32
33
  ## 0.1.782 (2026-04-10)
33
34
 
package/engine/ado.js CHANGED
@@ -60,22 +60,26 @@ async function getAdoToken() {
60
60
  return null;
61
61
  }
62
62
 
63
- async function adoFetch(url, token, _retryCount = 0) {
63
+ async function adoFetch(url, token, opts = {}) {
64
+ const _retryCount = typeof opts === 'number' ? opts : (opts._retryCount || 0); // backward compat
65
+ const method = (typeof opts === 'object' && opts.method) || 'GET';
66
+ const body = (typeof opts === 'object' && opts.body) || undefined;
64
67
  const MAX_RETRIES = 1;
65
68
  const res = await fetch(url, {
69
+ method,
66
70
  headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' },
67
71
  signal: AbortSignal.timeout(30000),
72
+ body,
68
73
  });
69
- if (!res.ok) throw new Error(`ADO API ${res.status}: ${res.statusText}`);
74
+ if (!res.ok) throw new Error(`ADO API ${method} ${res.status}: ${res.statusText}`);
70
75
  const text = await res.text();
71
76
  if (!text || text.trimStart().startsWith('<')) {
72
- // Invalidate cached token — it's likely expired
73
77
  _adoTokenCache = { token: null, expiresAt: 0 };
74
78
  if (_retryCount < MAX_RETRIES) {
75
79
  const freshToken = await getAdoToken();
76
80
  if (freshToken) {
77
81
  log('info', 'ADO token expired mid-session — refreshed and retrying');
78
- return adoFetch(url, freshToken, _retryCount + 1);
82
+ return adoFetch(url, freshToken, { ...opts, _retryCount: _retryCount + 1 });
79
83
  }
80
84
  }
81
85
  throw new Error(`ADO returned HTML instead of JSON (likely auth redirect) for ${url.split('?')[0]}`);
@@ -362,10 +366,12 @@ async function pollPrStatus(config) {
362
366
 
363
367
  if (mergeCommitId) {
364
368
  try {
365
- // Find builds where sourceVersion matches the PR's merge commit
366
- const buildsUrl = `${orgBase}/${project.adoProject}/_apis/build/builds?$top=10&api-version=7.1`;
369
+ // Find builds for this PR filter by source branch to avoid scanning all org builds
370
+ const sourceBranch = prData.sourceRefName || '';
371
+ const branchFilter = sourceBranch ? `&branchName=${encodeURIComponent(sourceBranch)}` : '';
372
+ const buildsUrl = `${orgBase}/${project.adoProject}/_apis/build/builds?$top=10${branchFilter}&api-version=7.1`;
367
373
  const buildsData = await adoFetch(buildsUrl, token);
368
- // Only match builds against the current merge commit — sourceBranch match catches stale builds
374
+ // Match by exact merge commit — only current builds, not stale
369
375
  const prBuilds = (buildsData?.value || []).filter(b => b.sourceVersion === mergeCommitId);
370
376
 
371
377
  if (prBuilds.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.805",
3
+ "version": "0.1.807",
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"