@link-assistant/hive-mind 0.46.1 → 0.47.0
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 +10 -15
- package/README.md +42 -8
- package/package.json +16 -3
- package/src/agent.lib.mjs +49 -70
- package/src/agent.prompts.lib.mjs +6 -20
- package/src/buildUserMention.lib.mjs +4 -17
- package/src/claude-limits.lib.mjs +15 -15
- package/src/claude.lib.mjs +617 -626
- package/src/claude.prompts.lib.mjs +7 -22
- package/src/codex.lib.mjs +39 -71
- package/src/codex.prompts.lib.mjs +6 -20
- package/src/config.lib.mjs +3 -16
- package/src/contributing-guidelines.lib.mjs +5 -18
- package/src/exit-handler.lib.mjs +4 -4
- package/src/git.lib.mjs +7 -7
- package/src/github-issue-creator.lib.mjs +17 -17
- package/src/github-linking.lib.mjs +8 -33
- package/src/github.batch.lib.mjs +20 -16
- package/src/github.graphql.lib.mjs +18 -18
- package/src/github.lib.mjs +89 -91
- package/src/hive.config.lib.mjs +50 -50
- package/src/hive.mjs +1293 -1296
- package/src/instrument.mjs +7 -11
- package/src/interactive-mode.lib.mjs +112 -138
- package/src/lenv-reader.lib.mjs +1 -6
- package/src/lib.mjs +36 -45
- package/src/lino.lib.mjs +2 -2
- package/src/local-ci-checks.lib.mjs +15 -14
- package/src/memory-check.mjs +52 -60
- package/src/model-mapping.lib.mjs +25 -32
- package/src/model-validation.lib.mjs +31 -31
- package/src/opencode.lib.mjs +37 -62
- package/src/opencode.prompts.lib.mjs +7 -21
- package/src/protect-branch.mjs +14 -15
- package/src/review.mjs +28 -27
- package/src/reviewers-hive.mjs +64 -69
- package/src/sentry.lib.mjs +13 -10
- package/src/solve.auto-continue.lib.mjs +48 -38
- package/src/solve.auto-pr.lib.mjs +111 -69
- package/src/solve.branch-errors.lib.mjs +17 -46
- package/src/solve.branch.lib.mjs +16 -23
- package/src/solve.config.lib.mjs +263 -261
- package/src/solve.error-handlers.lib.mjs +21 -79
- package/src/solve.execution.lib.mjs +10 -18
- package/src/solve.feedback.lib.mjs +25 -46
- package/src/solve.mjs +59 -60
- package/src/solve.preparation.lib.mjs +10 -36
- package/src/solve.repo-setup.lib.mjs +4 -19
- package/src/solve.repository.lib.mjs +37 -37
- package/src/solve.results.lib.mjs +32 -46
- package/src/solve.session.lib.mjs +7 -22
- package/src/solve.validation.lib.mjs +19 -17
- package/src/solve.watch.lib.mjs +20 -33
- package/src/start-screen.mjs +24 -24
- package/src/task.mjs +38 -44
- package/src/telegram-bot.mjs +125 -121
- package/src/telegram-top-command.lib.mjs +32 -48
- package/src/usage-limit.lib.mjs +9 -13
- package/src/version-info.lib.mjs +1 -1
- package/src/version.lib.mjs +1 -1
- package/src/youtrack/solve.youtrack.lib.mjs +3 -8
- package/src/youtrack/youtrack-sync.mjs +8 -14
- package/src/youtrack/youtrack.lib.mjs +26 -28
package/src/hive.config.lib.mjs
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// when only the yargs configuration is needed (e.g., in telegram-bot.mjs)
|
|
4
4
|
// This module has no heavy dependencies to allow fast loading for --help
|
|
5
5
|
|
|
6
|
-
export const createYargsConfig =
|
|
6
|
+
export const createYargsConfig = yargsInstance => {
|
|
7
7
|
return yargsInstance
|
|
8
|
-
.command('$0 [github-url]', 'Monitor GitHub issues and create PRs',
|
|
8
|
+
.command('$0 [github-url]', 'Monitor GitHub issues and create PRs', yargs => {
|
|
9
9
|
yargs.positional('github-url', {
|
|
10
10
|
type: 'string',
|
|
11
|
-
description: 'GitHub organization, repository, or user URL to monitor (or GitHub repo URL when using --youtrack-mode)'
|
|
11
|
+
description: 'GitHub organization, repository, or user URL to monitor (or GitHub repo URL when using --youtrack-mode)',
|
|
12
12
|
});
|
|
13
13
|
})
|
|
14
14
|
.usage('Usage: $0 <github-url> [options]')
|
|
@@ -32,247 +32,247 @@ export const createYargsConfig = (yargsInstance) => {
|
|
|
32
32
|
type: 'string',
|
|
33
33
|
description: 'GitHub label to monitor for issues',
|
|
34
34
|
default: 'help wanted',
|
|
35
|
-
alias: 't'
|
|
35
|
+
alias: 't',
|
|
36
36
|
})
|
|
37
37
|
.option('all-issues', {
|
|
38
38
|
type: 'boolean',
|
|
39
39
|
description: 'Process all open issues regardless of labels',
|
|
40
40
|
default: false,
|
|
41
|
-
alias: 'a'
|
|
41
|
+
alias: 'a',
|
|
42
42
|
})
|
|
43
43
|
.option('skip-issues-with-prs', {
|
|
44
44
|
type: 'boolean',
|
|
45
45
|
description: 'Skip issues that already have open pull requests',
|
|
46
46
|
default: false,
|
|
47
|
-
alias: 's'
|
|
47
|
+
alias: 's',
|
|
48
48
|
})
|
|
49
49
|
.option('concurrency', {
|
|
50
50
|
type: 'number',
|
|
51
51
|
description: 'Number of concurrent solve instances',
|
|
52
52
|
default: 2,
|
|
53
|
-
alias: 'c'
|
|
53
|
+
alias: 'c',
|
|
54
54
|
})
|
|
55
55
|
.option('pull-requests-per-issue', {
|
|
56
56
|
type: 'number',
|
|
57
57
|
description: 'Number of pull requests to generate per issue',
|
|
58
58
|
default: 1,
|
|
59
|
-
alias: 'p'
|
|
59
|
+
alias: 'p',
|
|
60
60
|
})
|
|
61
61
|
.option('model', {
|
|
62
62
|
type: 'string',
|
|
63
63
|
description: 'Model to use for solve (opus, sonnet, haiku, haiku-3-5, haiku-3, or any model ID supported by the tool)',
|
|
64
64
|
alias: 'm',
|
|
65
|
-
default: 'sonnet'
|
|
65
|
+
default: 'sonnet',
|
|
66
66
|
})
|
|
67
67
|
.option('interval', {
|
|
68
68
|
type: 'number',
|
|
69
69
|
description: 'Polling interval in seconds',
|
|
70
70
|
default: 300, // 5 minutes
|
|
71
|
-
alias: 'i'
|
|
71
|
+
alias: 'i',
|
|
72
72
|
})
|
|
73
73
|
.option('max-issues', {
|
|
74
74
|
type: 'number',
|
|
75
75
|
description: 'Maximum number of issues to process (0 = unlimited)',
|
|
76
|
-
default: 0
|
|
76
|
+
default: 0,
|
|
77
77
|
})
|
|
78
78
|
.option('dry-run', {
|
|
79
79
|
type: 'boolean',
|
|
80
80
|
description: 'List issues that would be processed without actually processing them',
|
|
81
|
-
default: false
|
|
81
|
+
default: false,
|
|
82
82
|
})
|
|
83
83
|
.option('skip-tool-connection-check', {
|
|
84
84
|
type: 'boolean',
|
|
85
85
|
description: 'Skip tool connection check (useful in CI environments). Does NOT skip model validation.',
|
|
86
|
-
default: false
|
|
86
|
+
default: false,
|
|
87
87
|
})
|
|
88
88
|
.option('skip-tool-check', {
|
|
89
89
|
type: 'boolean',
|
|
90
90
|
description: 'Alias for --skip-tool-connection-check (deprecated, use --skip-tool-connection-check instead)',
|
|
91
91
|
default: false,
|
|
92
|
-
hidden: true
|
|
92
|
+
hidden: true,
|
|
93
93
|
})
|
|
94
94
|
.option('skip-claude-check', {
|
|
95
95
|
type: 'boolean',
|
|
96
96
|
description: 'Alias for --skip-tool-connection-check (deprecated)',
|
|
97
97
|
default: false,
|
|
98
|
-
hidden: true
|
|
98
|
+
hidden: true,
|
|
99
99
|
})
|
|
100
100
|
.option('tool-connection-check', {
|
|
101
101
|
type: 'boolean',
|
|
102
102
|
description: 'Perform tool connection check (enabled by default, use --no-tool-connection-check to skip). Does NOT affect model validation.',
|
|
103
103
|
default: true,
|
|
104
|
-
hidden: true
|
|
104
|
+
hidden: true,
|
|
105
105
|
})
|
|
106
106
|
.option('tool-check', {
|
|
107
107
|
type: 'boolean',
|
|
108
108
|
description: 'Alias for --tool-connection-check (deprecated)',
|
|
109
109
|
default: true,
|
|
110
|
-
hidden: true
|
|
110
|
+
hidden: true,
|
|
111
111
|
})
|
|
112
112
|
.option('tool', {
|
|
113
113
|
type: 'string',
|
|
114
114
|
description: 'AI tool to use for solving issues',
|
|
115
115
|
choices: ['claude', 'opencode', 'agent'],
|
|
116
|
-
default: 'claude'
|
|
116
|
+
default: 'claude',
|
|
117
117
|
})
|
|
118
118
|
.option('verbose', {
|
|
119
119
|
type: 'boolean',
|
|
120
120
|
description: 'Enable verbose logging',
|
|
121
121
|
alias: 'v',
|
|
122
|
-
default: false
|
|
122
|
+
default: false,
|
|
123
123
|
})
|
|
124
124
|
.option('once', {
|
|
125
125
|
type: 'boolean',
|
|
126
126
|
description: 'Run once and exit instead of continuous monitoring',
|
|
127
|
-
default: false
|
|
127
|
+
default: false,
|
|
128
128
|
})
|
|
129
129
|
.option('min-disk-space', {
|
|
130
130
|
type: 'number',
|
|
131
131
|
description: 'Minimum required disk space in MB (default: 500)',
|
|
132
|
-
default: 500
|
|
132
|
+
default: 500,
|
|
133
133
|
})
|
|
134
134
|
.option('auto-cleanup', {
|
|
135
135
|
type: 'boolean',
|
|
136
136
|
description: 'Automatically clean temporary directories (/tmp/* /var/tmp/*) when finished successfully',
|
|
137
|
-
default: false
|
|
137
|
+
default: false,
|
|
138
138
|
})
|
|
139
139
|
.option('fork', {
|
|
140
140
|
type: 'boolean',
|
|
141
|
-
description:
|
|
141
|
+
description: "Fork the repository if you don't have write access",
|
|
142
142
|
alias: 'f',
|
|
143
|
-
default: false
|
|
143
|
+
default: false,
|
|
144
144
|
})
|
|
145
145
|
.option('auto-fork', {
|
|
146
146
|
type: 'boolean',
|
|
147
147
|
description: 'Automatically fork public repos without write access (passed to solve command)',
|
|
148
|
-
default: true
|
|
148
|
+
default: true,
|
|
149
149
|
})
|
|
150
150
|
.option('attach-logs', {
|
|
151
151
|
type: 'boolean',
|
|
152
152
|
description: 'Upload the solution draft log file to the Pull Request on completion (⚠️ WARNING: May expose sensitive data)',
|
|
153
|
-
default: false
|
|
153
|
+
default: false,
|
|
154
154
|
})
|
|
155
155
|
.option('project-number', {
|
|
156
156
|
type: 'number',
|
|
157
157
|
description: 'GitHub Project number to monitor',
|
|
158
|
-
alias: 'pn'
|
|
158
|
+
alias: 'pn',
|
|
159
159
|
})
|
|
160
160
|
.option('project-owner', {
|
|
161
161
|
type: 'string',
|
|
162
162
|
description: 'GitHub Project owner (organization or user)',
|
|
163
|
-
alias: 'po'
|
|
163
|
+
alias: 'po',
|
|
164
164
|
})
|
|
165
165
|
.option('project-status', {
|
|
166
166
|
type: 'string',
|
|
167
167
|
description: 'Project status column to monitor (e.g., "Ready", "To Do")',
|
|
168
168
|
alias: 'ps',
|
|
169
|
-
default: 'Ready'
|
|
169
|
+
default: 'Ready',
|
|
170
170
|
})
|
|
171
171
|
.option('project-mode', {
|
|
172
172
|
type: 'boolean',
|
|
173
173
|
description: 'Enable project-based monitoring instead of label-based',
|
|
174
174
|
alias: 'pm',
|
|
175
|
-
default: false
|
|
175
|
+
default: false,
|
|
176
176
|
})
|
|
177
177
|
.option('youtrack-mode', {
|
|
178
178
|
type: 'boolean',
|
|
179
179
|
description: 'Enable YouTrack mode instead of GitHub issues',
|
|
180
|
-
default: false
|
|
180
|
+
default: false,
|
|
181
181
|
})
|
|
182
182
|
.option('youtrack-stage', {
|
|
183
183
|
type: 'string',
|
|
184
|
-
description: 'Override YouTrack stage to monitor (overrides YOUTRACK_STAGE env var)'
|
|
184
|
+
description: 'Override YouTrack stage to monitor (overrides YOUTRACK_STAGE env var)',
|
|
185
185
|
})
|
|
186
186
|
.option('youtrack-project', {
|
|
187
187
|
type: 'string',
|
|
188
|
-
description: 'Override YouTrack project code (overrides YOUTRACK_PROJECT_CODE env var)'
|
|
188
|
+
description: 'Override YouTrack project code (overrides YOUTRACK_PROJECT_CODE env var)',
|
|
189
189
|
})
|
|
190
190
|
.option('target-branch', {
|
|
191
191
|
type: 'string',
|
|
192
192
|
description: 'Target branch for pull requests (defaults to repository default branch)',
|
|
193
|
-
alias: 'tb'
|
|
193
|
+
alias: 'tb',
|
|
194
194
|
})
|
|
195
195
|
.option('log-dir', {
|
|
196
196
|
type: 'string',
|
|
197
197
|
description: 'Directory to save log files (defaults to current working directory)',
|
|
198
|
-
alias: 'l'
|
|
198
|
+
alias: 'l',
|
|
199
199
|
})
|
|
200
200
|
.option('auto-continue', {
|
|
201
201
|
type: 'boolean',
|
|
202
202
|
description: 'Pass --auto-continue to solve for each issue (continues with existing PRs instead of creating new ones)',
|
|
203
|
-
default: true
|
|
203
|
+
default: true,
|
|
204
204
|
})
|
|
205
205
|
.option('think', {
|
|
206
206
|
type: 'string',
|
|
207
207
|
description: 'Thinking level: low (Think.), medium (Think hard.), high (Think harder.), max (Ultrathink.)',
|
|
208
208
|
choices: ['low', 'medium', 'high', 'max'],
|
|
209
|
-
default: undefined
|
|
209
|
+
default: undefined,
|
|
210
210
|
})
|
|
211
211
|
.option('prompt-plan-sub-agent', {
|
|
212
212
|
type: 'boolean',
|
|
213
213
|
description: 'Encourage AI to use Plan sub-agent for initial planning (only works with --tool claude)',
|
|
214
|
-
default: false
|
|
214
|
+
default: false,
|
|
215
215
|
})
|
|
216
216
|
.option('sentry', {
|
|
217
217
|
type: 'boolean',
|
|
218
218
|
description: 'Enable Sentry error tracking and monitoring (use --no-sentry to disable)',
|
|
219
|
-
default: true
|
|
219
|
+
default: true,
|
|
220
220
|
})
|
|
221
221
|
.option('watch', {
|
|
222
222
|
type: 'boolean',
|
|
223
223
|
description: 'Monitor continuously for feedback and auto-restart when detected (stops when PR is merged)',
|
|
224
224
|
alias: 'w',
|
|
225
|
-
default: false
|
|
225
|
+
default: false,
|
|
226
226
|
})
|
|
227
227
|
.option('issue-order', {
|
|
228
228
|
type: 'string',
|
|
229
229
|
description: 'Order issues by publication date: "asc" (oldest first) or "desc" (newest first)',
|
|
230
230
|
alias: 'o',
|
|
231
231
|
default: 'asc',
|
|
232
|
-
choices: ['asc', 'desc']
|
|
232
|
+
choices: ['asc', 'desc'],
|
|
233
233
|
})
|
|
234
234
|
.option('prefix-fork-name-with-owner-name', {
|
|
235
235
|
type: 'boolean',
|
|
236
236
|
description: 'Prefix fork name with original owner name (e.g., "owner-repo" instead of "repo"). Useful when forking repositories with same name from different owners.',
|
|
237
|
-
default: true
|
|
237
|
+
default: true,
|
|
238
238
|
})
|
|
239
239
|
.option('interactive-mode', {
|
|
240
240
|
type: 'boolean',
|
|
241
241
|
description: '[EXPERIMENTAL] Post Claude output as PR comments in real-time. Only supported for --tool claude.',
|
|
242
|
-
default: false
|
|
242
|
+
default: false,
|
|
243
243
|
})
|
|
244
244
|
.option('prompt-explore-sub-agent', {
|
|
245
245
|
type: 'boolean',
|
|
246
246
|
description: 'Encourage Claude to use Explore sub-agent for codebase exploration. Only supported for --tool claude.',
|
|
247
|
-
default: false
|
|
247
|
+
default: false,
|
|
248
248
|
})
|
|
249
249
|
.option('prompt-general-purpose-sub-agent', {
|
|
250
250
|
type: 'boolean',
|
|
251
251
|
description: 'Prompt AI to use general-purpose sub agents for processing large tasks with multiple files/folders. Only supported for --tool claude.',
|
|
252
|
-
default: false
|
|
252
|
+
default: false,
|
|
253
253
|
})
|
|
254
254
|
.option('tokens-budget-stats', {
|
|
255
255
|
type: 'boolean',
|
|
256
256
|
description: '[EXPERIMENTAL] Show detailed token budget statistics including context window usage and ratios. Only supported for --tool claude.',
|
|
257
|
-
default: false
|
|
257
|
+
default: false,
|
|
258
258
|
})
|
|
259
259
|
.option('prompt-issue-reporting', {
|
|
260
260
|
type: 'boolean',
|
|
261
261
|
description: 'Enable automatic issue creation for spotted bugs/errors not related to main task. Issues will include reproducible examples, workarounds, and fix suggestions. Works for both current and third-party repositories. Only supported for --tool claude.',
|
|
262
|
-
default: false
|
|
262
|
+
default: false,
|
|
263
263
|
})
|
|
264
264
|
.option('prompt-case-studies', {
|
|
265
265
|
type: 'boolean',
|
|
266
266
|
description: 'Create comprehensive case study documentation for the issue including logs, analysis, timeline, root cause investigation, and proposed solutions. Organizes findings into ./docs/case-studies/issue-{id}/ directory. Only supported for --tool claude.',
|
|
267
|
-
default: false
|
|
267
|
+
default: false,
|
|
268
268
|
})
|
|
269
269
|
.parserConfiguration({
|
|
270
270
|
'boolean-negation': true,
|
|
271
271
|
'strip-dashed': false,
|
|
272
272
|
'strip-aliased': false,
|
|
273
|
-
'populate--': false
|
|
273
|
+
'populate--': false,
|
|
274
274
|
})
|
|
275
|
-
.showHelpOnFail(false)
|
|
275
|
+
.showHelpOnFail(false) // Don't show help on validation failures
|
|
276
276
|
.strict()
|
|
277
277
|
.help('h')
|
|
278
278
|
.alias('h', 'help');
|