blun-king-cli 9.1.110 → 9.1.111
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/blun.mjs +3 -3
- package/package.json +1 -1
package/blun.mjs
CHANGED
|
@@ -260584,12 +260584,12 @@ function blunFastConversationTools(tools, input, pendingMediaJobIds = []) {
|
|
|
260584
260584
|
* name through ToolSearch. The absolute cap prevents large context windows
|
|
260585
260585
|
* from turning every deferred schema into permanent request overhead.
|
|
260586
260586
|
*/
|
|
260587
|
-
function blunSelectTurnTools(tools, maxContextTokens, loadedToolNames) {
|
|
260587
|
+
function blunSelectTurnTools(tools, maxContextTokens, loadedToolNames, requiredToolNames = /* @__PURE__ */ new Set()) {
|
|
260588
260588
|
if (estimateTokensForTools(tools) <= toolSchemaBudgetTokens(maxContextTokens)) return {
|
|
260589
260589
|
tools,
|
|
260590
260590
|
deferredToolCount: 0
|
|
260591
260591
|
};
|
|
260592
|
-
const selected = tools.filter((tool) => BLUN_LEAN_TOOL_NAMES.has(tool.name) || loadedToolNames.has(tool.name));
|
|
260592
|
+
const selected = tools.filter((tool) => BLUN_LEAN_TOOL_NAMES.has(tool.name) || loadedToolNames.has(tool.name) || requiredToolNames.has(tool.name));
|
|
260593
260593
|
const selectedNames = new Set(selected.map((tool) => tool.name));
|
|
260594
260594
|
const deferred = tools.filter((tool) => !selectedNames.has(tool.name));
|
|
260595
260595
|
if (deferred.length > 0) selected.push(createDeferredToolLoader(selected, deferred, loadedToolNames));
|
|
@@ -261430,7 +261430,7 @@ var init_turn = __esmMin((() => {
|
|
|
261430
261430
|
const toolSelection = fastConversation ? {
|
|
261431
261431
|
tools: [...blunFastConversationTools(eligibleTools, input, pendingMediaJobIds)],
|
|
261432
261432
|
deferredToolCount: 0
|
|
261433
|
-
} : turnNeedsTools ? blunSelectTurnTools(eligibleTools, this.agent.config.modelCapabilities?.max_context_tokens, this.loadedToolNames) : {
|
|
261433
|
+
} : turnNeedsTools ? blunSelectTurnTools(eligibleTools, this.agent.config.modelCapabilities?.max_context_tokens, this.loadedToolNames, turnHasAttachment ? new Set(["mcp__plugin-telegram_telegram__download_attachment"]) : void 0) : {
|
|
261434
261434
|
tools: [],
|
|
261435
261435
|
deferredToolCount: 0
|
|
261436
261436
|
};
|