@link-assistant/hive-mind 2.12.0 → 2.12.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 +14 -0
- package/package.json +4 -1
- package/src/claude.connection.lib.mjs +209 -0
- package/src/claude.lib.mjs +6 -202
- package/src/codex.lib.mjs +0 -128
- package/src/github-rate-limit.lib.mjs +3 -0
- package/src/github-url-parser.lib.mjs +255 -0
- package/src/github.lib.mjs +22 -343
- package/src/hive.mjs +0 -152
- package/src/interactive-mode.lib.mjs +0 -43
- package/src/isolation-runner.lib.mjs +14 -174
- package/src/limits.lib.mjs +0 -89
- package/src/models/index.mjs +0 -15
- package/src/session-monitor.lib.mjs +14 -172
- package/src/solve.auto-merge.lib.mjs +70 -164
- package/src/solve.mjs +31 -193
- package/src/solve.repository.lib.mjs +0 -83
- package/src/solve.results.lib.mjs +0 -90
- package/src/solve.session.lib.mjs +52 -19
- package/src/solve.tool-uncommitted.lib.mjs +22 -0
- package/src/telegram-bot.mjs +0 -66
- package/src/telegram-merge-queue.lib.mjs +3 -155
- package/src/telegram-solve-queue.lib.mjs +9 -168
- package/src/use-m-bootstrap.lib.mjs +6 -5
- package/src/use-with-retry.lib.mjs +128 -2
package/src/models/index.mjs
CHANGED
|
@@ -43,7 +43,6 @@ const formalAiProviderModelAliases = {
|
|
|
43
43
|
[FORMAL_AI_MODEL_ALIAS]: FORMAL_AI_PROVIDER_MODEL_ID,
|
|
44
44
|
[FORMAL_AI_PROVIDER_MODEL_ID]: FORMAL_AI_PROVIDER_MODEL_ID,
|
|
45
45
|
};
|
|
46
|
-
|
|
47
46
|
// Claude models (Anthropic API)
|
|
48
47
|
// Updated for Opus 4.5/4.6/4.7/4.8/5, Sonnet 4.6/5, and Fable 5 / Mythos 5 support
|
|
49
48
|
// (Issue #1221, Issue #1238, Issue #1329, Issue #1433, Issue #1620, Issue #1832, Issue #1875, Issue #2003, Issue #2096)
|
|
@@ -198,7 +197,6 @@ export const getLatestCodexGenerationAliases = (models = codexModels) => {
|
|
|
198
197
|
|
|
199
198
|
return latestCompleteGeneration?.[1] || {};
|
|
200
199
|
};
|
|
201
|
-
|
|
202
200
|
const getCodexModelVariants = () => {
|
|
203
201
|
const bareModels = [...new Set(Object.values(codexModels).map(modelId => modelId.replace(OPENAI_MODEL_PREFIX_PATTERN, '')))];
|
|
204
202
|
const aliases = getLatestCodexGenerationAliases();
|
|
@@ -311,7 +309,6 @@ export const freeToBaseModelMap = {
|
|
|
311
309
|
// These extend the base maps with full model ID identity entries for validation
|
|
312
310
|
// (e.g., 'claude-sonnet-4-5-20250929' → 'claude-sonnet-4-5-20250929')
|
|
313
311
|
// so that full model IDs are also accepted as valid inputs
|
|
314
|
-
|
|
315
312
|
export const CLAUDE_MODELS = {
|
|
316
313
|
...claudeModels,
|
|
317
314
|
'claude-fable-5': 'claude-fable-5', // Fable 5 full ID (Issue #1875)
|
|
@@ -432,7 +429,6 @@ export const getModelMapForTool = tool => {
|
|
|
432
429
|
export const getDefaultModelForTool = tool => {
|
|
433
430
|
return defaultModels[tool] || defaultModels.claude;
|
|
434
431
|
};
|
|
435
|
-
|
|
436
432
|
let cachedInstalledCodexModelsPromise = null;
|
|
437
433
|
// Issue #2027: With gpt-5.6-sol as the preferred default, the fallback chain is only
|
|
438
434
|
// consulted when Sol is absent from the local catalog. Issue #2037 (review): order by
|
|
@@ -506,7 +502,6 @@ export const mapModelForTool = (tool, model) => {
|
|
|
506
502
|
return model;
|
|
507
503
|
}
|
|
508
504
|
};
|
|
509
|
-
|
|
510
505
|
/**
|
|
511
506
|
* Validate if a model is compatible with a tool
|
|
512
507
|
* @param {string} tool - The tool name (claude, agent, opencode, codex, qwen, gemini)
|
|
@@ -607,7 +602,6 @@ export const validateToolModelCompatibility = (tool, model) => {
|
|
|
607
602
|
};
|
|
608
603
|
|
|
609
604
|
// ─── MODEL VALIDATION FUNCTIONS ──────────────────────────────────────────────
|
|
610
|
-
|
|
611
605
|
/**
|
|
612
606
|
* Get the model map for a given tool (validation-extended version with full ID entries)
|
|
613
607
|
* @param {string} tool - The tool name ('claude', 'opencode', 'codex', 'agent', 'qwen', 'gemini')
|
|
@@ -713,7 +707,6 @@ export const findSimilarModels = (input, validModels, maxSuggestions = 3, maxDis
|
|
|
713
707
|
.sort((a, b) => a.distance - b.distance)
|
|
714
708
|
.slice(0, maxSuggestions)
|
|
715
709
|
.map(({ model }) => model);
|
|
716
|
-
|
|
717
710
|
return suggestions;
|
|
718
711
|
};
|
|
719
712
|
|
|
@@ -767,7 +760,6 @@ export const supports1mContext = (model, tool = 'claude') => {
|
|
|
767
760
|
|
|
768
761
|
return false;
|
|
769
762
|
};
|
|
770
|
-
|
|
771
763
|
/**
|
|
772
764
|
* Validate a model name against the available models for a tool
|
|
773
765
|
* Supports [1m] suffix for 1 million token context (Issue #1221)
|
|
@@ -827,7 +819,6 @@ export const validateModelName = (model, tool = 'claude') => {
|
|
|
827
819
|
if (suggestions.length > 0) {
|
|
828
820
|
message += `\n Did you mean: ${suggestions.map(s => `"${s}"`).join(', ')}?`;
|
|
829
821
|
}
|
|
830
|
-
|
|
831
822
|
message += `\n Available models for ${tool}: ${shortNames.join(', ')}`;
|
|
832
823
|
|
|
833
824
|
if (tool === 'claude') {
|
|
@@ -886,7 +877,6 @@ export const validateClaudeSubAgentModelName = model => {
|
|
|
886
877
|
mappedModel: normalized,
|
|
887
878
|
};
|
|
888
879
|
}
|
|
889
|
-
|
|
890
880
|
return validation;
|
|
891
881
|
};
|
|
892
882
|
|
|
@@ -950,7 +940,6 @@ export const validateAndExitOnInvalidClaudeSubAgentModel = async (model, tool =
|
|
|
950
940
|
|
|
951
941
|
if (!result.valid) {
|
|
952
942
|
await log(`❌ Invalid --sub-agent-model: ${result.message}`, { level: 'error' });
|
|
953
|
-
|
|
954
943
|
if (exitFn) {
|
|
955
944
|
await exitFn(1, 'Invalid sub-agent model name');
|
|
956
945
|
} else {
|
|
@@ -1049,7 +1038,6 @@ export const fetchModelInfoForComment = async modelId => {
|
|
|
1049
1038
|
if (!apiData) return null;
|
|
1050
1039
|
|
|
1051
1040
|
const lookupId = modelId.includes('/') ? modelId.split('/').pop() : modelId;
|
|
1052
|
-
|
|
1053
1041
|
if (apiData.anthropic?.models?.[lookupId]) {
|
|
1054
1042
|
const modelInfo = { ...apiData.anthropic.models[lookupId] };
|
|
1055
1043
|
modelInfo.provider = apiData.anthropic.name || 'Anthropic';
|
|
@@ -1153,7 +1141,6 @@ export const buildModelInfoString = ({ requestedModel = null, tool = null, prici
|
|
|
1153
1141
|
if (!hasRequested && !hasModelsUsed && !hasModelInfo && !hasPricingModel) return '';
|
|
1154
1142
|
|
|
1155
1143
|
let info = '\n\n### \uD83E\uDD16 **Models used:**';
|
|
1156
|
-
|
|
1157
1144
|
if (tool) {
|
|
1158
1145
|
info += `\n- Tool: ${getToolDisplayName(tool)}`;
|
|
1159
1146
|
}
|
|
@@ -1240,7 +1227,6 @@ export const buildModelInfoString = ({ requestedModel = null, tool = null, prici
|
|
|
1240
1227
|
|
|
1241
1228
|
return info;
|
|
1242
1229
|
};
|
|
1243
|
-
|
|
1244
1230
|
/**
|
|
1245
1231
|
* Resolve the full model ID from a user-provided alias using the model mapping.
|
|
1246
1232
|
* @param {string|null} requestedModel - The model alias (e.g., "opus", "sonnet")
|
|
@@ -1341,7 +1327,6 @@ export const getModelInfoForComment = async ({ requestedModel = null, tool = nul
|
|
|
1341
1327
|
}
|
|
1342
1328
|
|
|
1343
1329
|
const firstModelInfo = modelsUsed.length > 0 ? modelsUsed[0].modelInfo : null;
|
|
1344
|
-
|
|
1345
1330
|
return buildModelInfoString({
|
|
1346
1331
|
requestedModel,
|
|
1347
1332
|
tool,
|