@link-assistant/hive-mind 2.2.1 → 2.2.3

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,17 @@
1
1
  # @link-assistant/hive-mind
2
2
 
3
+ ## 2.2.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 37303d7: Stop auto-restarting for stale failed check-runs when GitHub reports the pull request as clean and mergeable
8
+
9
+ ## 2.2.2
10
+
11
+ ### Patch Changes
12
+
13
+ - f9f30d6: Treat an omitted `--think` option as `--think off` across tools, using a zero budget or the lowest supported effort when reasoning cannot be disabled.
14
+
3
15
  ## 2.2.1
4
16
 
5
17
  ### Patch Changes
package/README.hi.md CHANGED
@@ -173,6 +173,7 @@ claude
173
173
  # Use /config command and set:
174
174
  # Reduce motion true # Will save your ssh trafic, and make Claude Code more responsive (less latency)
175
175
  # Thinking mode false # Anthropic models perform better and cheaper without thinking
176
+ # `--think` न देने पर Hive Mind इसे `--think off` मानता है।
176
177
  # Model haiku # chepear for connection testing manually
177
178
  # Claude in Chrome enabled by default false # No need for Chrome support on server
178
179
 
@@ -346,11 +347,11 @@ solve <issue-url> [options]
346
347
 
347
348
  **सबसे अधिक उपयोग किए जाने वाले विकल्प:**
348
349
 
349
- | विकल्प | संक्षिप्त | विवरण | डिफ़ॉल्ट |
350
- | --------------- | --------- | --------------------------------------------- | ---------- |
351
- | `--model` | `-m` | उपयोग करने वाला AI मॉडल (sonnet, opus, haiku) | sonnet |
352
- | `--think` | | सोचने का स्तर (low, medium, high, max) | - |
353
- | `--base-branch` | `-b` | PR के लिए टार्गेट ब्रांच | (डिफ़ॉल्ट) |
350
+ | विकल्प | संक्षिप्त | विवरण | डिफ़ॉल्ट |
351
+ | --------------- | --------- | --------------------------------------------------------- | ---------- |
352
+ | `--model` | `-m` | उपयोग करने वाला AI मॉडल (sonnet, opus, haiku) | sonnet |
353
+ | `--think` | | सोचने का स्तर (off, low, medium, high, xhigh, ultra, max) | off |
354
+ | `--base-branch` | `-b` | PR के लिए टार्गेट ब्रांच | (डिफ़ॉल्ट) |
354
355
 
355
356
  **अन्य उपयोगी विकल्प:**
356
357
 
@@ -372,12 +373,12 @@ hive <github-url> [options]
372
373
 
373
374
  **सबसे अधिक उपयोग किए जाने वाले विकल्प:**
374
375
 
375
- | विकल्प | संक्षिप्त | विवरण | डिफ़ॉल्ट |
376
- | -------------- | --------- | --------------------------------------------- | -------- |
377
- | `--model` | `-m` | उपयोग करने वाला AI मॉडल (sonnet, opus, haiku) | sonnet |
378
- | `--think` | | सोचने का स्तर (low, medium, high, max) | - |
379
- | `--all-issues` | `-a` | सभी इश्यू निगरानी करें (लेबल अनदेखा करें) | false |
380
- | `--once` | | एकल रन (लगातार निगरानी न करें) | false |
376
+ | विकल्प | संक्षिप्त | विवरण | डिफ़ॉल्ट |
377
+ | -------------- | --------- | --------------------------------------------------------- | -------- |
378
+ | `--model` | `-m` | उपयोग करने वाला AI मॉडल (sonnet, opus, haiku) | sonnet |
379
+ | `--think` | | सोचने का स्तर (off, low, medium, high, xhigh, ultra, max) | off |
380
+ | `--all-issues` | `-a` | सभी इश्यू निगरानी करें (लेबल अनदेखा करें) | false |
381
+ | `--once` | | एकल रन (लगातार निगरानी न करें) | false |
381
382
 
382
383
  **अन्य उपयोगी विकल्प:**
383
384
 
package/README.md CHANGED
@@ -507,15 +507,15 @@ Free Models via Kilo Gateway (with --tool agent):
507
507
 
508
508
  Current tool defaults in Hive Mind:
509
509
 
510
- | Tool | Default model | Default reasoning behavior |
511
- | ---------- | --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
512
- | `claude` | `sonnet` | No extra thinking is requested unless you pass `--think` or `--thinking-budget` |
513
- | `codex` | `gpt-5.6-sol` preferred, with runtime fallback to local catalog (`gpt-5.5`) | Codex runs with `reasoning_effort=none` unless you pass `--think` or `--thinking-budget` |
514
- | `opencode` | `grok-code-fast-1` | No extra thinking prompt is added for the default model |
515
- | `agent` | `nemotron-3-super-free` | No extra thinking prompt is added for the default model |
516
- | `gemini` | `flash` | No extra thinking prompt is added for the default model |
517
- | `qwen` | `qwen3-coder-plus` | No extra thinking prompt is added for the default model |
518
- | `gemini` | `gemini-2.5-flash` | No extra thinking prompt is added for the default model |
510
+ | Tool | Default model | Default reasoning behavior |
511
+ | ---------- | --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
512
+ | `claude` | `sonnet` | Defaults to `--think off`: zero budget when supported, otherwise the lowest effort |
513
+ | `codex` | `gpt-5.6-sol` preferred, with runtime fallback to local catalog (`gpt-5.5`) | Defaults to `--think off`, mapped to `reasoning_effort=none` |
514
+ | `opencode` | `grok-code-fast-1` | Defaults to `--think off`; no positive thinking prompt is added |
515
+ | `agent` | `nemotron-3-super-free` | Defaults to `--think off`; no positive thinking prompt is added |
516
+ | `gemini` | `flash` | Defaults to `--think off`; no positive thinking prompt is added |
517
+ | `qwen` | `qwen3-coder-plus` | Defaults to `--think off`; no positive thinking prompt is added |
518
+ | `gemini` | `gemini-2.5-flash` | Defaults to `--think off`; no positive thinking prompt is added |
519
519
 
520
520
  See [docs/CONFIGURATION.md](./docs/CONFIGURATION.md) for the full per-tool defaults and reasoning mappings.
521
521
 
package/README.ru.md CHANGED
@@ -173,6 +173,7 @@ claude
173
173
  # Use /config command and set:
174
174
  # Reduce motion true # Will save your ssh trafic, and make Claude Code more responsive (less latency)
175
175
  # Thinking mode false # Anthropic models perform better and cheaper without thinking
176
+ # Если `--think` не указан, Hive Mind трактует это как `--think off`.
176
177
  # Model haiku # chepear for connection testing manually
177
178
  # Claude in Chrome enabled by default false # No need for Chrome support on server
178
179
 
@@ -346,11 +347,11 @@ solve <issue-url> [options]
346
347
 
347
348
  **Наиболее часто используемые параметры:**
348
349
 
349
- | Параметр | Сокр. | Описание | По умолчанию |
350
- | --------------- | ----- | -------------------------------------------- | -------------- |
351
- | `--model` | `-m` | Используемая модель ИИ (sonnet, opus, haiku) | sonnet |
352
- | `--think` | | Уровень мышления (low, medium, high, max) | - |
353
- | `--base-branch` | `-b` | Целевая ветка для PR | (по умолчанию) |
350
+ | Параметр | Сокр. | Описание | По умолчанию |
351
+ | --------------- | ----- | ------------------------------------------------------------ | -------------- |
352
+ | `--model` | `-m` | Используемая модель ИИ (sonnet, opus, haiku) | sonnet |
353
+ | `--think` | | Уровень мышления (off, low, medium, high, xhigh, ultra, max) | off |
354
+ | `--base-branch` | `-b` | Целевая ветка для PR | (по умолчанию) |
354
355
 
355
356
  **Другие полезные параметры:**
356
357
 
@@ -372,12 +373,12 @@ hive <github-url> [options]
372
373
 
373
374
  **Наиболее часто используемые параметры:**
374
375
 
375
- | Параметр | Сокр. | Описание | По умолчанию |
376
- | -------------- | ----- | ----------------------------------------------- | ------------ |
377
- | `--model` | `-m` | Используемая модель ИИ (sonnet, opus, haiku) | sonnet |
378
- | `--think` | | Уровень мышления (low, medium, high, max) | - |
379
- | `--all-issues` | `-a` | Мониторинг всех задач (игнорировать метки) | false |
380
- | `--once` | | Одиночный запуск (без непрерывного мониторинга) | false |
376
+ | Параметр | Сокр. | Описание | По умолчанию |
377
+ | -------------- | ----- | ------------------------------------------------------------ | ------------ |
378
+ | `--model` | `-m` | Используемая модель ИИ (sonnet, opus, haiku) | sonnet |
379
+ | `--think` | | Уровень мышления (off, low, medium, high, xhigh, ultra, max) | off |
380
+ | `--all-issues` | `-a` | Мониторинг всех задач (игнорировать метки) | false |
381
+ | `--once` | | Одиночный запуск (без непрерывного мониторинга) | false |
381
382
 
382
383
  **Другие полезные параметры:**
383
384
 
package/README.zh.md CHANGED
@@ -173,6 +173,7 @@ claude
173
173
  # Use /config command and set:
174
174
  # Reduce motion true # Will save your ssh trafic, and make Claude Code more responsive (less latency)
175
175
  # Thinking mode false # Anthropic models perform better and cheaper without thinking
176
+ # 未指定 `--think` 时,Hive Mind 按 `--think off` 处理。
176
177
  # Model haiku # chepear for connection testing manually
177
178
  # Claude in Chrome enabled by default false # No need for Chrome support on server
178
179
 
@@ -346,11 +347,11 @@ solve <issue-url> [options]
346
347
 
347
348
  **最常用选项:**
348
349
 
349
- | 选项 | 简写 | 描述 | 默认值 |
350
- | --------------- | ---- | ------------------------------------- | -------- |
351
- | `--model` | `-m` | 使用的 AI 模型(sonnet、opus、haiku) | sonnet |
352
- | `--think` | | 思考级别(low、medium、high、max) | - |
353
- | `--base-branch` | `-b` | PR 的目标分支 | (默认) |
350
+ | 选项 | 简写 | 描述 | 默认值 |
351
+ | --------------- | ---- | ----------------------------------------------------- | -------- |
352
+ | `--model` | `-m` | 使用的 AI 模型(sonnet、opus、haiku) | sonnet |
353
+ | `--think` | | 思考级别(off、low、medium、high、xhigh、ultra、max) | off |
354
+ | `--base-branch` | `-b` | PR 的目标分支 | (默认) |
354
355
 
355
356
  **其他常用选项:**
356
357
 
@@ -372,12 +373,12 @@ hive <github-url> [options]
372
373
 
373
374
  **最常用选项:**
374
375
 
375
- | 选项 | 简写 | 描述 | 默认值 |
376
- | -------------- | ---- | ------------------------------------- | ------ |
377
- | `--model` | `-m` | 使用的 AI 模型(sonnet、opus、haiku) | sonnet |
378
- | `--think` | | 思考级别(low、medium、high、max) | - |
379
- | `--all-issues` | `-a` | 监控所有 Issue(忽略标签) | false |
380
- | `--once` | | 单次运行(不持续监控) | false |
376
+ | 选项 | 简写 | 描述 | 默认值 |
377
+ | -------------- | ---- | ----------------------------------------------------- | ------ |
378
+ | `--model` | `-m` | 使用的 AI 模型(sonnet、opus、haiku) | sonnet |
379
+ | `--think` | | 思考级别(off、low、medium、high、xhigh、ultra、max) | off |
380
+ | `--all-issues` | `-a` | 监控所有 Issue(忽略标签) | false |
381
+ | `--once` | | 单次运行(不持续监控) | false |
381
382
 
382
383
  **其他常用选项:**
383
384
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@link-assistant/hive-mind",
3
- "version": "2.2.1",
3
+ "version": "2.2.3",
4
4
  "description": "AI-powered issue solver and hive mind for collaborative problem solving",
5
5
  "main": "src/hive.mjs",
6
6
  "type": "module",
@@ -614,6 +614,10 @@ export const getClaudeEnv = (options = {}) => {
614
614
 
615
615
  if (effortLevel) {
616
616
  env.CLAUDE_CODE_EFFORT_LEVEL = effortLevel;
617
+ } else if (options.thinkLevel === 'off' && adaptiveThinkingOnly) {
618
+ // Issue #2032: adaptive-only models reject/ignore a zero manual-thinking budget.
619
+ // Use the lowest supported effort as the strongest safe best-effort equivalent.
620
+ env.CLAUDE_CODE_EFFORT_LEVEL = 'low';
617
621
  }
618
622
  }
619
623
 
@@ -446,7 +446,7 @@ export async function checkPRCIStatus(owner, repo, prNumber, verbose = false) {
446
446
  * @param {string} repo - Repository name
447
447
  * @param {number} prNumber - Pull request number
448
448
  * @param {boolean} verbose - Whether to log verbose output
449
- * @returns {Promise<{mergeable: boolean, reason: string|null, terminal?: boolean}>}
449
+ * @returns {Promise<{mergeable: boolean, mergeableState?: string|null, mergeStateStatus?: string|null, reason: string|null, terminal?: boolean}>}
450
450
  */
451
451
  export async function checkPRMergeable(owner, repo, prNumber, verbose = false) {
452
452
  // Issue #1339: GitHub computes mergeability asynchronously. When mergeStateStatus is
@@ -473,7 +473,7 @@ export async function checkPRMergeable(owner, repo, prNumber, verbose = false) {
473
473
  if (verbose) {
474
474
  console.log(`[VERBOSE] /merge: PR #${prNumber} mergeability still UNKNOWN after ${MAX_UNKNOWN_RETRIES} attempts`);
475
475
  }
476
- return { mergeable: false, reason: `Merge state: UNKNOWN (GitHub could not compute mergeability after ${MAX_UNKNOWN_RETRIES} attempts)` };
476
+ return { mergeable: false, mergeableState: pr.mergeable, mergeStateStatus: pr.mergeStateStatus, reason: `Merge state: UNKNOWN (GitHub could not compute mergeability after ${MAX_UNKNOWN_RETRIES} attempts)` };
477
477
  }
478
478
 
479
479
  const mergeable = pr.mergeable === 'MERGEABLE';
@@ -505,7 +505,7 @@ export async function checkPRMergeable(owner, repo, prNumber, verbose = false) {
505
505
  console.log(`[VERBOSE] /merge: PR #${prNumber} mergeable: ${mergeable}, state: ${pr.mergeStateStatus}`);
506
506
  }
507
507
 
508
- return { mergeable, reason };
508
+ return { mergeable, mergeableState: pr.mergeable, mergeStateStatus: pr.mergeStateStatus, reason };
509
509
  } catch (error) {
510
510
  if (isTerminalGitHubEntityError(error)) {
511
511
  const terminalError = getTerminalGitHubEntityErrorMessage(error);
@@ -464,6 +464,22 @@ export const shouldResetNoRunsCounter = (ciStatus, noWorkflowRunsForCommit = fal
464
464
  return Boolean(ciStatus && ciStatus.status !== 'no_checks');
465
465
  };
466
466
 
467
+ /**
468
+ * Issue #2031: GitHub can retain a failed check-run from an older workflow run
469
+ * alongside a newer successful run for the same job and HEAD SHA. The raw
470
+ * check-run rollup then says "failure" even though GitHub's live PR state is
471
+ * CLEAN/MERGEABLE. Only this explicit pair is strong enough to override the
472
+ * rollup; every other merge state remains conservative.
473
+ */
474
+ export const isAuthoritativeCleanMergeState = mergeStatus => mergeStatus?.mergeable === true && mergeStatus?.mergeableState === 'MERGEABLE' && mergeStatus?.mergeStateStatus === 'CLEAN';
475
+
476
+ export const reconcileStaleCIBlockers = (blockers, ciStatus, mergeStatus) => {
477
+ if (ciStatus?.status !== 'failure' || !isAuthoritativeCleanMergeState(mergeStatus)) {
478
+ return blockers;
479
+ }
480
+ return blockers.filter(blocker => blocker.type !== 'ci_failure' && blocker.type !== 'ci_cancelled');
481
+ };
482
+
467
483
  export const getMergeBlockers = async (owner, repo, prNumber, verbose = false, checkCount = 1, prBranchRef = null) => {
468
484
  const blockers = [];
469
485
 
@@ -945,6 +961,16 @@ export const getMergeBlockers = async (owner, repo, prNumber, verbose = false, c
945
961
  return { blockers, ciStatus, noCiConfigured: false, noCiTriggered: false, noWorkflowRunsForCommit };
946
962
  }
947
963
 
964
+ if (ciStatus.status === 'failure' && isAuthoritativeCleanMergeState(mergeStatus)) {
965
+ const staleFailureBlockers = blockers.filter(blocker => blocker.type === 'ci_failure' || blocker.type === 'ci_cancelled');
966
+ if (staleFailureBlockers.length > 0) {
967
+ if (verbose) {
968
+ await log(`[VERBOSE] /merge: PR #${prNumber} is CLEAN/MERGEABLE according to GitHub; ignoring ${staleFailureBlockers.length} stale CI failure/cancellation blocker(s) from the raw check-run rollup`);
969
+ }
970
+ blockers.splice(0, blockers.length, ...reconcileStaleCIBlockers(blockers, ciStatus, mergeStatus));
971
+ }
972
+ }
973
+
948
974
  if (!mergeStatus.mergeable) {
949
975
  blockers.push({
950
976
  type: 'not_mergeable',
@@ -299,9 +299,9 @@ export const SOLVE_OPTION_DEFINITIONS = {
299
299
  },
300
300
  think: {
301
301
  type: 'string',
302
- description: 'Thinking level hint. For Claude, translated to --thinking-budget for Claude Code >= 2.1.12 (off=0, low=~8000, medium=~16000, high=~24000, xhigh/ultra/max=31999) and to CLAUDE_CODE_EFFORT_LEVEL when supported. Fable 5/Mythos 5/Sonnet 5/Opus 4.8/4.7 support xhigh and max; Opus 4.6/Sonnet 4.6/Mythos Preview support max; Opus 4.5 uses high for xhigh/max. `ultra` maps to the highest supported Claude effort (Claude "ultracode"-class reasoning). For Codex (GPT-5.6 Sol), mapped 1:1 to reasoning effort (off=none, low=low, medium=medium, high=high, xhigh=xhigh, ultra=ultra, max=max); GPT-5.6 keeps xhigh and adds max above it, and ultra runs the multi-agent mode paired with a rollout token budget cap. Default: no thinking level is enforced (models run as-is).',
302
+ description: 'Thinking level hint. For Claude, translated to --thinking-budget for Claude Code >= 2.1.12 (off=0, low=~8000, medium=~16000, high=~24000, xhigh/ultra/max=31999) and to CLAUDE_CODE_EFFORT_LEVEL when supported. Adaptive-only models that cannot disable thinking use their lowest effort for off. Fable 5/Mythos 5/Sonnet 5/Opus 4.8/4.7 support xhigh and max; Opus 4.6/Sonnet 4.6/Mythos Preview support max; Opus 4.5 uses high for xhigh/max. `ultra` maps to the highest supported Claude effort (Claude "ultracode"-class reasoning). For Codex (GPT-5.6 Sol), mapped 1:1 to reasoning effort (off=none, low=low, medium=medium, high=high, xhigh=xhigh, ultra=ultra, max=max); GPT-5.6 keeps xhigh and adds max above it, and ultra runs the multi-agent mode paired with a rollout token budget cap. Default: off.',
303
303
  choices: ['off', 'low', 'medium', 'high', 'xhigh', 'ultra', 'max'],
304
- default: undefined,
304
+ default: 'off',
305
305
  },
306
306
  'thinking-budget': {
307
307
  type: 'number',
@@ -843,6 +843,14 @@ export const parseArguments = async (yargs = getLinoYargsFactory(), hideBinFn =
843
843
  const modelExplicitlyProvided = rawArgs.includes('--model') || rawArgs.includes('-m') || rawArgs.includes('--worker-model');
844
844
  const fallbackModelExplicitlyProvided = rawArgs.includes('--fallback-model');
845
845
  const planModelExplicitlyProvided = rawArgs.includes('--plan-model');
846
+ const thinkExplicitlyProvided = hasRawOption(rawArgs, '--think');
847
+ const thinkingBudgetExplicitlyProvided = hasRawOption(rawArgs, '--thinking-budget');
848
+
849
+ // Issue #2032: an omitted --think is equivalent to --think off, except when
850
+ // an explicit token budget is the user's chosen reasoning control.
851
+ if (!thinkExplicitlyProvided && thinkingBudgetExplicitlyProvided) {
852
+ argv.think = undefined;
853
+ }
846
854
 
847
855
  // --plan flag expansion (Issue #1223)
848
856
  // When --plan is set, it acts as a shortcut for --plan-model opus --worker-model sonnet