@yemi33/minions 0.1.1018 → 0.1.1020
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 +21 -0
- package/engine/github.js +19 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.1020 (2026-04-16)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
- route implement items to dedicated implement playbook (#1115)
|
|
7
|
+
|
|
8
|
+
### Fixes
|
|
9
|
+
- add maxBuffer to all GitHub CLI spawns + paginate PR list (#1130)
|
|
10
|
+
- replace undefined PROJECTS with config.projects in checkWatches (#1108)
|
|
11
|
+
- write permission for publish workflow
|
|
12
|
+
- run tests inline and post check runs for publish PRs
|
|
13
|
+
|
|
14
|
+
## 0.1.1019 (2026-04-16)
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
- route implement items to dedicated implement playbook (#1115)
|
|
18
|
+
|
|
19
|
+
### Fixes
|
|
20
|
+
- replace undefined PROJECTS with config.projects in checkWatches (#1108)
|
|
21
|
+
- write permission for publish workflow
|
|
22
|
+
- run tests inline and post check runs for publish PRs
|
|
23
|
+
|
|
3
24
|
## 0.1.1018 (2026-04-16)
|
|
4
25
|
|
|
5
26
|
### Features
|
package/engine/github.js
CHANGED
|
@@ -20,6 +20,11 @@ function engine() {
|
|
|
20
20
|
let _dispatch = null;
|
|
21
21
|
function dispatchModule() { if (!_dispatch) _dispatch = require('./dispatch'); return _dispatch; }
|
|
22
22
|
|
|
23
|
+
// ─── Constants ──────────────────────────────────────────────────────────────
|
|
24
|
+
|
|
25
|
+
// 10 MB — prevents maxBuffer exceeded errors on repos with many open PRs.
|
|
26
|
+
// Node.js default is 1 MB which overflows when GitHub API returns 100+ PR objects.
|
|
27
|
+
const GH_MAX_BUFFER = 10 * 1024 * 1024;
|
|
23
28
|
// ─── Helpers ────────────────────────────────────────────────────────────────
|
|
24
29
|
|
|
25
30
|
function isGitHub(project) {
|
|
@@ -83,11 +88,16 @@ const isGhThrottled = () => _ghThrottle.isThrottled();
|
|
|
83
88
|
/** Returns a snapshot of the current GitHub throttle state. */
|
|
84
89
|
const getGhThrottleState = () => _ghThrottle.getState();
|
|
85
90
|
|
|
86
|
-
/** Run a `gh api` call and parse JSON result. Returns null on failure.
|
|
87
|
-
|
|
91
|
+
/** Run a `gh api` call and parse JSON result. Returns null on failure.
|
|
92
|
+
* @param {string} endpoint - API endpoint (e.g. '/pulls?state=open')
|
|
93
|
+
* @param {string} slug - owner/repo slug
|
|
94
|
+
* @param {object} [opts] - Options: { paginate: boolean, timeout: number }
|
|
95
|
+
*/
|
|
96
|
+
async function ghApi(endpoint, slug, opts = {}) {
|
|
88
97
|
try {
|
|
89
|
-
const
|
|
90
|
-
const
|
|
98
|
+
const paginateFlag = opts.paginate ? ' --paginate' : '';
|
|
99
|
+
const cmd = `gh api${paginateFlag} "repos/${slug}${endpoint}"`;
|
|
100
|
+
const result = await execAsync(cmd, { timeout: opts.timeout || 30000, encoding: 'utf-8', maxBuffer: GH_MAX_BUFFER });
|
|
91
101
|
const parsed = JSON.parse(result);
|
|
92
102
|
_ghThrottle.recordSuccess();
|
|
93
103
|
return parsed;
|
|
@@ -152,7 +162,7 @@ async function fetchGhBuildErrorLog(slug, failedRuns) {
|
|
|
152
162
|
// Always fetch job log — annotations alone often lack test failure details
|
|
153
163
|
try {
|
|
154
164
|
const cmd = `gh api "repos/${slug}/actions/jobs/${run.id}/logs" 2>&1`;
|
|
155
|
-
const result = await execAsync(cmd, { timeout: 15000, encoding: 'utf-8' });
|
|
165
|
+
const result = await execAsync(cmd, { timeout: 15000, encoding: 'utf-8', maxBuffer: GH_MAX_BUFFER });
|
|
156
166
|
if (result && !result.includes('Not Found')) {
|
|
157
167
|
logParts.push(`--- ${run.name || 'Check'} (log) ---\n${result}`);
|
|
158
168
|
}
|
|
@@ -471,7 +481,7 @@ async function pollPrStatus(config) {
|
|
|
471
481
|
if (autoComplete) {
|
|
472
482
|
try {
|
|
473
483
|
const mergeMethod = ['squash', 'merge', 'rebase'].includes(config.engine?.prMergeMethod) ? config.engine.prMergeMethod : 'squash';
|
|
474
|
-
await execAsync(`gh pr merge ${prNum} --${mergeMethod} --repo ${slug} --delete-branch`, { timeout: 30000, encoding: 'utf-8' });
|
|
484
|
+
await execAsync(`gh pr merge ${prNum} --${mergeMethod} --repo ${slug} --delete-branch`, { timeout: 30000, encoding: 'utf-8', maxBuffer: GH_MAX_BUFFER });
|
|
475
485
|
pr._autoCompleted = true;
|
|
476
486
|
log('info', `Auto-completed PR ${pr.id}: builds green + review approved → merged (${mergeMethod})`);
|
|
477
487
|
updated = true;
|
|
@@ -612,8 +622,8 @@ async function reconcilePrs(config) {
|
|
|
612
622
|
} catch { continue; }
|
|
613
623
|
}
|
|
614
624
|
|
|
615
|
-
// Fetch open PRs
|
|
616
|
-
const prsData = await ghApi('/pulls?state=open&per_page=100', slug);
|
|
625
|
+
// Fetch open PRs — paginate to handle repos with >100 open PRs
|
|
626
|
+
const prsData = await ghApi('/pulls?state=open&per_page=100', slug, { paginate: true, timeout: 60000 });
|
|
617
627
|
if (!prsData || !Array.isArray(prsData)) {
|
|
618
628
|
recordSlugFailure(slug);
|
|
619
629
|
continue;
|
|
@@ -760,4 +770,5 @@ module.exports = {
|
|
|
760
770
|
resetSlugBackoff,
|
|
761
771
|
_ghPollBackoff,
|
|
762
772
|
_ghThrottle, // exported for testing
|
|
773
|
+
GH_MAX_BUFFER, // exported for testing
|
|
763
774
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1020",
|
|
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"
|