@link-assistant/hive-mind 1.73.3 → 1.73.4

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,11 @@
1
1
  # @link-assistant/hive-mind
2
2
 
3
+ ## 1.73.4
4
+
5
+ ### Patch Changes
6
+
7
+ - bfdc3fe: Add support for Claude Opus 4.8 (issue #1832). The bare `opus` alias for the `claude` tool now resolves to `claude-opus-4-8`, and the explicit `opus-4-8` / `claude-opus-4-8` aliases (plus their `[1m]` variants for the 1M-token context window) are accepted everywhere existing Opus aliases are. All earlier aliases keep working unchanged — `opus-4-7` / `claude-opus-4-7`, `opus-4-6` / `claude-opus-4-6`, `opus-4-5`, `sonnet`, `haiku`, and `opusplan` continue to map to the same model IDs as before. The `--fallback-model` default chain for the `claude` tool extends to `opus`/`opus-4-8` → `opus-4-7` → `opus-4-6`; the `--think xhigh`/`max` levels remain supported (4.8 shares Opus 4.7's effort surface and adaptive-only thinking, so Claude Code never emits `MAX_THINKING_TOKENS` for it); `--show-thinking-content` still opts into thinking output on 4.8 the same way it does on 4.7. Adds the deep case study under `docs/case-studies/issue-1832/` (covering the requirements, solution plan, and verification matrix) and `tests/test-opus-48-model-support.mjs` (175 assertions) alongside the existing 4.7 regression test. The English `docs/CONFIGURATION.md` row text is left unchanged in this PR to keep all four language siblings in sync; the case study is the authoritative user-facing documentation for the 4.8 behavior.
8
+
3
9
  ## 1.73.3
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@link-assistant/hive-mind",
3
- "version": "1.73.3",
3
+ "version": "1.73.4",
4
4
  "description": "AI-powered issue solver and hive mind for collaborative problem solving",
5
5
  "main": "src/hive.mjs",
6
6
  "type": "module",
@@ -177,7 +177,7 @@ export const DEFAULT_MAX_THINKING_BUDGET = 31999;
177
177
  export const DEFAULT_MAX_THINKING_BUDGET_OPUS_46 = parseIntWithDefault('HIVE_MIND_MAX_THINKING_BUDGET_OPUS_46', 31999);
178
178
 
179
179
  /**
180
- * Check if a model is Opus 4.6 or later (Issue #1221, updated in Issue #1238)
180
+ * Check if a model is Opus 4.6 or later (Issue #1221, updated in Issue #1238, Issue #1832)
181
181
  * @param {string} model - The model name or ID
182
182
  * @returns {boolean} True if the model is Opus 4.6 or later
183
183
  */
@@ -185,22 +185,22 @@ export const isOpus46OrLater = model => {
185
185
  if (!model) return false;
186
186
  const normalizedModel = model.toLowerCase();
187
187
  // Check for explicit opus-4-6 or later versions, or opusplan (Issue #1223)
188
- // Note: The 'opus' alias now maps to Opus 4.7 (Issue #1620), so we also check for the alias directly
188
+ // Note: The 'opus' alias now maps to Opus 4.8 (Issue #1832), so we also check for the alias directly
189
189
  // opusplan uses Opus for planning, so it should get Opus-level settings
190
- return normalizedModel === 'opus' || normalizedModel === 'opusplan' || normalizedModel.includes('opus-4-6') || normalizedModel.includes('opus-4-7') || normalizedModel.includes('opus-5');
190
+ return normalizedModel === 'opus' || normalizedModel === 'opusplan' || normalizedModel.includes('opus-4-6') || normalizedModel.includes('opus-4-7') || normalizedModel.includes('opus-4-8') || normalizedModel.includes('opus-5');
191
191
  };
192
192
 
193
193
  const isOpus47 = model => {
194
194
  if (!model) return false;
195
195
  const normalizedModel = model.toLowerCase();
196
- // 'opus' alias now maps to Opus 4.7 (Issue #1620)
196
+ // 'opus' alias now maps to Opus 4.8 (Issue #1832), which inherits 4.7 behaviour
197
197
  // opusplan uses Opus for planning, so it gets Opus-level settings
198
- return normalizedModel === 'opus' || normalizedModel === 'opusplan' || normalizedModel.includes('opus-4-7');
198
+ return normalizedModel === 'opus' || normalizedModel === 'opusplan' || normalizedModel.includes('opus-4-7') || normalizedModel.includes('opus-4-8');
199
199
  };
200
200
 
201
201
  /**
202
- * Check if a model is Opus 4.7 or later (Issue #1620)
203
- * These models use Opus 4.7+ adaptive thinking behavior.
202
+ * Check if a model is Opus 4.7 or later (Issue #1620, Issue #1832)
203
+ * These models use Opus 4.7+ adaptive thinking behavior (also applies to Opus 4.8).
204
204
  * @param {string} model - The model name or ID
205
205
  * @returns {boolean} True if the model is Opus 4.7 or later
206
206
  */
@@ -210,6 +210,22 @@ export const isOpus47OrLater = model => {
210
210
  return isOpus47(model) || normalizedModel.includes('opus-5');
211
211
  };
212
212
 
213
+ /**
214
+ * Check if a model is Opus 4.8 or later (Issue #1832)
215
+ * Opus 4.8 inherits all Opus 4.7 API constraints (adaptive thinking only, no sampling
216
+ * params) and adds new features such as mid-conversation system messages, refusal stop
217
+ * details, and fast mode. These are not exposed through Claude Code today, but this
218
+ * helper enables finer-grained control for future wiring.
219
+ * @param {string} model - The model name or ID
220
+ * @returns {boolean} True if the model is Opus 4.8 or later
221
+ */
222
+ export const isOpus48OrLater = model => {
223
+ if (!model) return false;
224
+ const normalizedModel = model.toLowerCase();
225
+ // 'opus' alias now maps to Opus 4.8 (Issue #1832)
226
+ return normalizedModel === 'opus' || normalizedModel === 'opusplan' || normalizedModel.includes('opus-4-8') || normalizedModel.includes('opus-5');
227
+ };
228
+
213
229
  const isOpus45 = model => {
214
230
  if (!model) return false;
215
231
  const m = model.toLowerCase();
@@ -247,7 +263,7 @@ export const supportsEffortLevel = model => {
247
263
 
248
264
  /**
249
265
  * Check if a model supports the xhigh effort level.
250
- * Official docs list xhigh only for Claude Opus 4.7.
266
+ * Official docs list xhigh for Claude Opus 4.7 and Opus 4.8 (Issue #1832).
251
267
  * @param {string} model - The model name or ID
252
268
  * @returns {boolean} True if the model supports xhigh effort
253
269
  */
@@ -336,8 +352,10 @@ export const tokensToThinkingLevel = getTokensToThinkingLevel(DEFAULT_MAX_THINKI
336
352
  export const OPUS_46_EFFORT_LEVELS = ['low', 'medium', 'high', 'max'];
337
353
 
338
354
  /**
339
- * Valid effort levels for Opus 4.7 (Issue #1620)
340
- * Opus 4.7 supports the additional 'xhigh' level.
355
+ * Valid effort levels for Opus 4.7 and Opus 4.8 (Issue #1620, Issue #1832)
356
+ * Both models support the additional 'xhigh' level.
357
+ * Opus 4.8 keeps the same effort level set; the default effort level is 'high'
358
+ * (enforced by Claude Code itself, not by this module).
341
359
  * See: https://platform.claude.com/docs/en/build-with-claude/effort
342
360
  * @type {string[]}
343
361
  */
@@ -438,12 +456,13 @@ export const getClaudeEnv = (options = {}) => {
438
456
  MCP_TOOL_TIMEOUT: String(claudeCode.mcpToolTimeout),
439
457
  });
440
458
 
441
- // Opus 4.7+ always uses adaptive thinking — MAX_THINKING_TOKENS has no effect (Issue #1620)
459
+ // Opus 4.7+ always uses adaptive thinking — MAX_THINKING_TOKENS has no effect (Issue #1620, Issue #1832)
460
+ // Opus 4.8 inherits this constraint: adaptive thinking is the only thinking mode.
442
461
  // For Opus 4.6 and earlier, MAX_THINKING_TOKENS controls extended thinking (Claude Code >= 2.1.12)
443
462
  // Default is 0 (thinking disabled) per Issue #1238.
444
463
  const opus47 = options.model && isOpus47OrLater(options.model);
445
464
  if (opus47) {
446
- // Remove any inherited MAX_THINKING_TOKENS from process.env — Opus 4.7 ignores it
465
+ // Remove any inherited MAX_THINKING_TOKENS from process.env — Opus 4.7+ ignores it
447
466
  delete env.MAX_THINKING_TOKENS;
448
467
  } else {
449
468
  env.MAX_THINKING_TOKENS = String(options.thinkingBudget ?? 0);
@@ -467,8 +486,9 @@ export const getClaudeEnv = (options = {}) => {
467
486
  }
468
487
  }
469
488
 
470
- // Opus 4.7 omits thinking content by default; opt in with --show-thinking-content (Issue #1620)
489
+ // Opus 4.7+ omits thinking content by default; opt in with --show-thinking-content (Issue #1620, Issue #1832)
471
490
  // Sets CLAUDE_CODE_SHOW_THINKING=1 which Claude Code uses to request display: "summarized"
491
+ // Applies to Opus 4.8 as well, which inherits Opus 4.7 thinking display behaviour.
472
492
  if (options.showThinkingContent) {
473
493
  env.CLAUDE_CODE_SHOW_THINKING = '1';
474
494
  }
@@ -28,23 +28,25 @@ const execFileAsync = promisify(execFile);
28
28
  // ─── MODEL DATA ──────────────────────────────────────────────────────────────
29
29
 
30
30
  // Claude models (Anthropic API)
31
- // Updated for Opus 4.5/4.6/4.7 and Sonnet 4.6 support (Issue #1221, Issue #1238, Issue #1329, Issue #1433, Issue #1620)
31
+ // Updated for Opus 4.5/4.6/4.7/4.8 and Sonnet 4.6 support (Issue #1221, Issue #1238, Issue #1329, Issue #1433, Issue #1620, Issue #1832)
32
32
  export const claudeModels = {
33
33
  sonnet: 'claude-sonnet-4-6', // Sonnet 4.6 (default, Issue #1329)
34
- opus: 'claude-opus-4-7', // Opus 4.7 (Issue #1620)
34
+ opus: 'claude-opus-4-8', // Opus 4.8 (Issue #1832)
35
35
  haiku: 'claude-haiku-4-5-20251001', // Haiku 4.5
36
36
  'haiku-3-5': 'claude-3-5-haiku-20241022', // Haiku 3.5
37
37
  'haiku-3': 'claude-3-haiku-20240307', // Haiku 3
38
38
  opusplan: 'opusplan', // Special mode: Opus for planning, Sonnet for execution (Issue #1223)
39
39
  // Shorter version aliases (Issue #1221, Issue #1329 - PR comment feedback)
40
40
  'sonnet-4-6': 'claude-sonnet-4-6', // Sonnet 4.6 short alias (Issue #1329)
41
- 'opus-4-7': 'claude-opus-4-7', // Opus 4.7 short alias (Issue #1620)
41
+ 'opus-4-8': 'claude-opus-4-8', // Opus 4.8 short alias (Issue #1832)
42
+ 'opus-4-7': 'claude-opus-4-7', // Opus 4.7 short alias (backward compatibility)
42
43
  'opus-4-6': 'claude-opus-4-6', // Opus 4.6 short alias (backward compatibility)
43
44
  'opus-4-5': 'claude-opus-4-5-20251101', // Opus 4.5 short alias
44
45
  'sonnet-4-5': 'claude-sonnet-4-5-20250929', // Sonnet 4.5 short alias (backward compatibility)
45
46
  'haiku-4-5': 'claude-haiku-4-5-20251001', // Haiku 4.5 short alias
46
- // Version aliases for backward compatibility (Issue #1221, Issue #1329, Issue #1620)
47
- 'claude-opus-4-7': 'claude-opus-4-7', // Opus 4.7 (Issue #1620)
47
+ // Version aliases for backward compatibility (Issue #1221, Issue #1329, Issue #1620, Issue #1832)
48
+ 'claude-opus-4-8': 'claude-opus-4-8', // Opus 4.8 (Issue #1832)
49
+ 'claude-opus-4-7': 'claude-opus-4-7', // Opus 4.7 (backward compatibility)
48
50
  'claude-sonnet-4-6': 'claude-sonnet-4-6', // Sonnet 4.6 (Issue #1329)
49
51
  'claude-opus-4-6': 'claude-opus-4-6', // Opus 4.6 (backward compatibility)
50
52
  'claude-opus-4-5': 'claude-opus-4-5-20251101', // Opus 4.5
@@ -175,9 +177,10 @@ export const defaultModels = {
175
177
  gemini: 'flash',
176
178
  };
177
179
 
178
- // Models that support 1M token context window via [1m] suffix (Issue #1221, Issue #1238, Issue #1329)
180
+ // Models that support 1M token context window via [1m] suffix (Issue #1221, Issue #1238, Issue #1329, Issue #1832)
179
181
  // See: https://code.claude.com/docs/en/model-config
180
182
  export const MODELS_SUPPORTING_1M_CONTEXT = [
183
+ 'claude-opus-4-8', // Opus 4.8 (Issue #1832)
181
184
  'claude-opus-4-7', // Opus 4.7 (Issue #1620)
182
185
  'claude-opus-4-6',
183
186
  'claude-opus-4-5-20251101',
@@ -186,7 +189,8 @@ export const MODELS_SUPPORTING_1M_CONTEXT = [
186
189
  'claude-sonnet-4-5',
187
190
  'sonnet', // Now maps to Sonnet 4.6 (Issue #1329)
188
191
  'sonnet-4-6', // Short alias (Issue #1329)
189
- 'opus', // Now maps to Opus 4.7 (Issue #1620)
192
+ 'opus', // Now maps to Opus 4.8 (Issue #1832)
193
+ 'opus-4-8', // Short alias (Issue #1832)
190
194
  'opus-4-7', // Short alias (Issue #1620)
191
195
  'opus-4-6', // Short alias (Issue #1221 - PR comment feedback)
192
196
  'opus-4-5', // Short alias (Issue #1238)
@@ -216,6 +220,7 @@ export const freeToBaseModelMap = {
216
220
 
217
221
  export const CLAUDE_MODELS = {
218
222
  ...claudeModels,
223
+ 'claude-opus-4-8': 'claude-opus-4-8', // Opus 4.8 full ID (Issue #1832)
219
224
  'claude-opus-4-7': 'claude-opus-4-7', // Opus 4.7 full ID (Issue #1620)
220
225
  'claude-sonnet-4-5-20250929': 'claude-sonnet-4-5-20250929',
221
226
  'claude-opus-4-5-20251101': 'claude-opus-4-5-20251101',
@@ -989,6 +994,7 @@ export const resolveModelId = (requestedModel, tool) => {
989
994
 
990
995
  export const defaultFallbackModels = {
991
996
  claude: {
997
+ 'claude-opus-4-8': 'opus-4-7',
992
998
  'claude-opus-4-7': 'opus-4-6',
993
999
  },
994
1000
  codex: {
@@ -285,7 +285,7 @@ export const SOLVE_OPTION_DEFINITIONS = {
285
285
  },
286
286
  think: {
287
287
  type: 'string',
288
- 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/max=31999) and to CLAUDE_CODE_EFFORT_LEVEL when supported. Opus 4.7 supports xhigh and max; Opus 4.6/Sonnet 4.6/Mythos support max; Opus 4.5 uses high for xhigh/max. For Codex, mapped to reasoning effort (off=none, low=low, medium=medium, high=high, xhigh/max=xhigh).',
288
+ 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/max=31999) and to CLAUDE_CODE_EFFORT_LEVEL when supported. Opus 4.8/4.7 support xhigh and max; Opus 4.6/Sonnet 4.6/Mythos support max; Opus 4.5 uses high for xhigh/max. For Codex, mapped to reasoning effort (off=none, low=low, medium=medium, high=high, xhigh/max=xhigh).',
289
289
  choices: ['off', 'low', 'medium', 'high', 'xhigh', 'max'],
290
290
  default: undefined,
291
291
  },
@@ -316,12 +316,12 @@ export const SOLVE_OPTION_DEFINITIONS = {
316
316
  },
317
317
  'fallback-model': {
318
318
  type: 'string',
319
- description: 'Fallback model to switch to on model capacity/overload errors. When supported, retries resume the same session with this model. Defaults: claude opus/opus-4-7 -> opus-4-6; codex gpt-5.5 -> gpt-5.4; all others unset.',
319
+ description: 'Fallback model to switch to on model capacity/overload errors. When supported, retries resume the same session with this model. Defaults: claude opus/opus-4-8 -> opus-4-7; claude opus-4-7 -> opus-4-6; codex gpt-5.5 -> gpt-5.4; all others unset.',
320
320
  default: undefined,
321
321
  },
322
322
  'show-thinking-content': {
323
323
  type: 'boolean',
324
- description: 'Show thinking content in Claude responses. Opus 4.7 omits thinking content by default; this option opts in to receive summarized thinking blocks. Disabled by default. Only affects --tool claude.',
324
+ description: 'Show thinking content in Claude responses. Opus 4.7+ omits thinking content by default (applies to Opus 4.8 as well); this option opts in to receive summarized thinking blocks. Disabled by default. Only affects --tool claude.',
325
325
  default: false,
326
326
  },
327
327
  'prompt-plan-sub-agent': {