@link-assistant/hive-mind 0.42.0 → 0.42.2
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 +30 -0
- package/package.json +1 -1
- package/src/hive.mjs +23 -23
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @link-assistant/hive-mind
|
|
2
2
|
|
|
3
|
+
## 0.42.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- dca5bed: Make --auto-continue enabled by default
|
|
8
|
+
|
|
9
|
+
- Changed default value from false to true for --auto-continue in both hive and solve commands
|
|
10
|
+
- Smart handling of -s (--skip-issues-with-prs) flag interaction:
|
|
11
|
+
- When -s is used, auto-continue is automatically disabled to avoid conflicts
|
|
12
|
+
- Explicit --auto-continue with -s shows proper error message
|
|
13
|
+
- Users can still use --no-auto-continue to explicitly disable
|
|
14
|
+
- This improves user experience as users typically want to continue working on existing PRs
|
|
15
|
+
|
|
16
|
+
Fixes #454
|
|
17
|
+
|
|
18
|
+
## 0.42.1
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- acd70a9: Add Lean runtime preinstallation support via elan
|
|
23
|
+
|
|
24
|
+
- Install elan (Lean version manager) with stable toolchain in all deployment environments
|
|
25
|
+
- Add Lean/elan to PATH in Dockerfile, .gitpod.Dockerfile, coolify/Dockerfile
|
|
26
|
+
- Add installation verification for elan, lean, and lake commands
|
|
27
|
+
- Add CI checks to verify Lean installation in Docker builds
|
|
28
|
+
|
|
3
29
|
## 0.42.0
|
|
4
30
|
|
|
5
31
|
### Minor Changes
|
|
@@ -14,6 +40,10 @@
|
|
|
14
40
|
|
|
15
41
|
Fixes #737
|
|
16
42
|
|
|
43
|
+
### Patch Changes
|
|
44
|
+
|
|
45
|
+
- d42d221: Add Perl runtime installation support via Perlbrew to Ubuntu 24 server installation script and Docker environment with CI verification
|
|
46
|
+
|
|
17
47
|
## 0.41.10
|
|
18
48
|
|
|
19
49
|
### Patch Changes
|
package/package.json
CHANGED
package/src/hive.mjs
CHANGED
|
@@ -22,11 +22,9 @@ if (earlyArgs.includes('--help') || earlyArgs.includes('-h')) {
|
|
|
22
22
|
const yargs = yargsModule.default || yargsModule;
|
|
23
23
|
const { hideBin } = await use('yargs@17.7.2/helpers');
|
|
24
24
|
const rawArgs = hideBin(process.argv);
|
|
25
|
-
|
|
26
25
|
// Reuse createYargsConfig from shared module to avoid duplication
|
|
27
26
|
const { createYargsConfig } = await import('./hive.config.lib.mjs');
|
|
28
27
|
const helpYargs = createYargsConfig(yargs(rawArgs)).version(false);
|
|
29
|
-
|
|
30
28
|
// Show help and exit
|
|
31
29
|
helpYargs.showHelp();
|
|
32
30
|
process.exit(0);
|
|
@@ -48,7 +46,6 @@ export { createYargsConfig } from './hive.config.lib.mjs';
|
|
|
48
46
|
import { fileURLToPath } from 'url';
|
|
49
47
|
const isDirectExecution = process.argv[1] === fileURLToPath(import.meta.url) ||
|
|
50
48
|
(process.argv[1] && (process.argv[1].includes('/hive') || process.argv[1].endsWith('hive')));
|
|
51
|
-
|
|
52
49
|
if (isDirectExecution) {
|
|
53
50
|
console.log('🐝 Hive Mind - AI-powered issue solver');
|
|
54
51
|
console.log(' Initializing...');
|
|
@@ -63,7 +60,6 @@ const withTimeout = (promise, timeoutMs, operation) => {
|
|
|
63
60
|
)
|
|
64
61
|
]);
|
|
65
62
|
};
|
|
66
|
-
|
|
67
63
|
// Use use-m to dynamically import modules for cross-runtime compatibility
|
|
68
64
|
if (typeof use === 'undefined') {
|
|
69
65
|
try {
|
|
@@ -157,7 +153,6 @@ async function fetchIssuesFromRepositories(owner, scope, monitorTag, fetchAllIss
|
|
|
157
153
|
return graphqlResult.issues;
|
|
158
154
|
}
|
|
159
155
|
}
|
|
160
|
-
|
|
161
156
|
// Strategy 2: Fallback to gh api --paginate approach (comprehensive but slower)
|
|
162
157
|
await log(' 📋 Using gh api --paginate approach for comprehensive coverage...', { verbose: true });
|
|
163
158
|
|
|
@@ -170,18 +165,15 @@ async function fetchIssuesFromRepositories(owner, scope, monitorTag, fetchAllIss
|
|
|
170
165
|
} else {
|
|
171
166
|
repoListCmd = `gh api users/${owner}/repos --paginate --jq '.[] | {name: .name, owner: .owner.login, isArchived: .archived}'`;
|
|
172
167
|
}
|
|
173
|
-
|
|
174
168
|
await log(' 📋 Fetching repository list (using --paginate for unlimited pagination)...', { verbose: true });
|
|
175
169
|
await log(` 🔎 Command: ${repoListCmd}`, { verbose: true });
|
|
176
170
|
|
|
177
171
|
// Add delay for rate limiting
|
|
178
172
|
await new Promise(resolve => setTimeout(resolve, 2000));
|
|
179
|
-
|
|
180
173
|
const { stdout: repoOutput } = await execAsync(repoListCmd, { encoding: 'utf8', env: process.env });
|
|
181
174
|
// Parse the output line by line, as gh api with --jq outputs one JSON object per line
|
|
182
175
|
const repoLines = repoOutput.trim().split('\n').filter(line => line.trim());
|
|
183
176
|
const allRepositories = repoLines.map(line => JSON.parse(line));
|
|
184
|
-
|
|
185
177
|
await log(` 📊 Found ${allRepositories.length} repositories`);
|
|
186
178
|
|
|
187
179
|
// Filter repositories to only include those owned by the target user/org
|
|
@@ -190,30 +182,24 @@ async function fetchIssuesFromRepositories(owner, scope, monitorTag, fetchAllIss
|
|
|
190
182
|
return repoOwner === owner;
|
|
191
183
|
});
|
|
192
184
|
const unownedCount = allRepositories.length - ownedRepositories.length;
|
|
193
|
-
|
|
194
185
|
if (unownedCount > 0) {
|
|
195
186
|
await log(` ⏭️ Skipping ${unownedCount} repository(ies) not owned by ${owner}`);
|
|
196
187
|
}
|
|
197
|
-
|
|
198
188
|
// Filter out archived repositories from owned repositories
|
|
199
189
|
const repositories = ownedRepositories.filter(repo => !repo.isArchived);
|
|
200
190
|
const archivedCount = ownedRepositories.length - repositories.length;
|
|
201
|
-
|
|
202
191
|
if (archivedCount > 0) {
|
|
203
192
|
await log(` ⏭️ Skipping ${archivedCount} archived repository(ies)`);
|
|
204
193
|
}
|
|
205
|
-
|
|
206
194
|
await log(` ✅ Processing ${repositories.length} non-archived repositories owned by ${owner}`);
|
|
207
195
|
|
|
208
196
|
let collectedIssues = [];
|
|
209
197
|
let processedRepos = 0;
|
|
210
|
-
|
|
211
198
|
// Process repositories in batches to avoid overwhelming the API
|
|
212
199
|
for (const repo of repositories) {
|
|
213
200
|
try {
|
|
214
201
|
const repoName = repo.name;
|
|
215
202
|
const ownerName = repo.owner?.login || owner;
|
|
216
|
-
|
|
217
203
|
await log(` 🔍 Fetching issues from ${ownerName}/${repoName}...`, { verbose: true });
|
|
218
204
|
|
|
219
205
|
// Build the appropriate issue list command
|
|
@@ -223,7 +209,6 @@ async function fetchIssuesFromRepositories(owner, scope, monitorTag, fetchAllIss
|
|
|
223
209
|
} else {
|
|
224
210
|
issueCmd = `gh issue list --repo ${ownerName}/${repoName} --state open --label "${monitorTag}" --json url,title,number,createdAt`;
|
|
225
211
|
}
|
|
226
|
-
|
|
227
212
|
// Add delay between repository requests
|
|
228
213
|
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
229
214
|
|
|
@@ -488,13 +473,26 @@ if (argv.projectMode) {
|
|
|
488
473
|
const tool = argv.tool || 'claude';
|
|
489
474
|
await validateAndExitOnInvalidModel(argv.model, tool, safeExit);
|
|
490
475
|
|
|
491
|
-
//
|
|
492
|
-
if
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
476
|
+
// Handle -s (--skip-issues-with-prs) and --auto-continue interaction
|
|
477
|
+
// Detect if user explicitly passed --auto-continue or --no-auto-continue
|
|
478
|
+
const hasExplicitAutoContinue = rawArgs.includes('--auto-continue');
|
|
479
|
+
const hasExplicitNoAutoContinue = rawArgs.includes('--no-auto-continue');
|
|
480
|
+
|
|
481
|
+
if (argv.skipIssuesWithPrs) {
|
|
482
|
+
// If user explicitly passed --auto-continue with -s, that's a conflict
|
|
483
|
+
if (hasExplicitAutoContinue) {
|
|
484
|
+
await log('❌ Conflicting options: --skip-issues-with-prs and --auto-continue cannot be used together', { level: 'error' });
|
|
485
|
+
await log(' --skip-issues-with-prs: Skips issues that have any open PRs', { level: 'error' });
|
|
486
|
+
await log(' --auto-continue: Continues with existing PRs instead of creating new ones', { level: 'error' });
|
|
487
|
+
await log(` 📁 Full log file: ${absoluteLogPath}`, { level: 'error' });
|
|
488
|
+
await safeExit(1, 'Error occurred');
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
// If user didn't explicitly set auto-continue, disable it when -s is used
|
|
492
|
+
// This is because -s means "skip issues with PRs" which conflicts with auto-continue
|
|
493
|
+
if (!hasExplicitNoAutoContinue) {
|
|
494
|
+
argv.autoContinue = false;
|
|
495
|
+
}
|
|
498
496
|
}
|
|
499
497
|
|
|
500
498
|
// Helper function to check GitHub permissions - moved to github.lib.mjs
|
|
@@ -751,7 +749,7 @@ async function worker(workerId) {
|
|
|
751
749
|
const dryRunFlag = argv.dryRun ? ' --dry-run' : '';
|
|
752
750
|
const skipToolConnectionCheckFlag = (argv.skipToolConnectionCheck || argv.toolConnectionCheck === false) ? ' --skip-tool-connection-check' : '';
|
|
753
751
|
const toolFlag = argv.tool ? ` --tool ${argv.tool}` : '';
|
|
754
|
-
const autoContinueFlag = argv.autoContinue ? ' --auto-continue' : '';
|
|
752
|
+
const autoContinueFlag = argv.autoContinue ? ' --auto-continue' : ' --no-auto-continue';
|
|
755
753
|
const thinkFlag = argv.think ? ` --think ${argv.think}` : '';
|
|
756
754
|
const promptPlanSubAgentFlag = argv.promptPlanSubAgent ? ' --prompt-plan-sub-agent' : '';
|
|
757
755
|
const noSentryFlag = !argv.sentry ? ' --no-sentry' : '';
|
|
@@ -794,6 +792,8 @@ async function worker(workerId) {
|
|
|
794
792
|
}
|
|
795
793
|
if (argv.autoContinue) {
|
|
796
794
|
args.push('--auto-continue');
|
|
795
|
+
} else {
|
|
796
|
+
args.push('--no-auto-continue');
|
|
797
797
|
}
|
|
798
798
|
if (argv.think) {
|
|
799
799
|
args.push('--think', argv.think);
|