@yemi33/minions 0.1.42 → 0.1.44

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,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.44 (2026-03-29)
4
+
5
+ ### Other
6
+ - test/unit.test.js
7
+
8
+ ## 0.1.43 (2026-03-29)
9
+
10
+ ### Engine
11
+ - engine/github.js
12
+
13
+ ### Dashboard
14
+ - dashboard.js
15
+
3
16
  ## 0.1.42 (2026-03-29)
4
17
 
5
18
  ### Dashboard
package/dashboard.js CHANGED
@@ -2935,27 +2935,15 @@ What would you like to discuss or change? When you're happy, say "approve" and I
2935
2935
 
2936
2936
  if (prs.some(p => p.id === prId || p.url === url)) return jsonReply(res, 400, { error: 'PR already tracked' });
2937
2937
 
2938
- // Auto-detect PR metadata from GitHub
2939
- let prTitle = title || '';
2940
- let prAuthor = '';
2941
- let prBranch = '';
2942
- const ghMatch = url.match(/github\.com\/([^/]+)\/([^/]+)\/pull\/(\d+)/);
2943
- if (ghMatch && !prTitle) {
2944
- try {
2945
- const { execSync } = require('child_process');
2946
- const json = execSync(`gh pr view ${ghMatch[3]} --repo ${ghMatch[1]}/${ghMatch[2]} --json title,author,headRefName`, { encoding: 'utf8', timeout: 10000, windowsHide: true });
2947
- const data = JSON.parse(json);
2948
- prTitle = data.title || prTitle;
2949
- prAuthor = data.author?.login || '';
2950
- prBranch = data.headRefName || '';
2951
- } catch {}
2952
- }
2953
-
2938
+ // Save minimal entry the existing pollPrStatus (ado.js/github.js) will
2939
+ // fetch title, author, branch, build status, and review status on next poll cycle (~6 min).
2940
+ // For auto-observe PRs, status='active' makes pollPrStatus process them.
2941
+ // For context-only PRs, status='linked' skips polling but shows in agent context.
2954
2942
  prs.push({
2955
2943
  id: prId,
2956
- title: (prTitle || 'Linked PR #' + prNum).slice(0, 120),
2957
- agent: prAuthor || 'human',
2958
- branch: prBranch,
2944
+ title: (title || 'PR #' + prNum + ' (polling...)').slice(0, 120),
2945
+ agent: 'human',
2946
+ branch: '',
2959
2947
  reviewStatus: autoObserve ? 'pending' : 'none',
2960
2948
  status: autoObserve ? 'active' : 'linked',
2961
2949
  created: new Date().toISOString().slice(0, 10),
package/engine/github.js CHANGED
@@ -76,6 +76,39 @@ async function forEachActiveGhPr(config, callback) {
76
76
  }
77
77
  }
78
78
 
79
+ // Also poll manually-linked PRs from central pull-requests.json (extract slug from URL)
80
+ const centralPath = path.join(MINIONS_DIR, 'pull-requests.json');
81
+ const centralPrs = safeJson(centralPath) || [];
82
+ const activeCentral = centralPrs.filter(pr => pr.status === 'active' && pr.url);
83
+ let centralUpdated = 0;
84
+ for (const pr of activeCentral) {
85
+ const ghMatch = pr.url.match(/github\.com\/([^/]+\/[^/]+)\/pull\/(\d+)/);
86
+ if (!ghMatch) continue;
87
+ const slug = ghMatch[1];
88
+ const prNum = ghMatch[2];
89
+ try {
90
+ const updated = await callback(null, pr, prNum, slug);
91
+ if (updated) {
92
+ // Also update title/author/branch if still placeholder
93
+ if (pr.title.includes('polling...') || pr.agent === 'human') {
94
+ const prData = ghApi(`/pulls/${prNum}`, slug);
95
+ if (prData) {
96
+ if (pr.title.includes('polling...')) pr.title = (prData.title || pr.title).slice(0, 120);
97
+ if (pr.agent === 'human' && prData.user?.login) pr.agent = prData.user.login;
98
+ if (!pr.branch && prData.head?.ref) pr.branch = prData.head.ref;
99
+ }
100
+ }
101
+ centralUpdated++;
102
+ }
103
+ } catch (err) {
104
+ try { engine().log('warn', `GitHub: failed to poll central PR ${pr.id}: ${err.message}`); } catch {}
105
+ }
106
+ }
107
+ if (centralUpdated > 0) {
108
+ safeWrite(centralPath, centralPrs);
109
+ totalUpdated += centralUpdated;
110
+ }
111
+
79
112
  return totalUpdated;
80
113
  }
81
114
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.42",
3
+ "version": "0.1.44",
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"