blun-king-cli 9.1.227 → 9.1.228

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.
@@ -199,6 +199,14 @@ function rememberLoadedTool(loadedToolNames, name) {
199
199
  }
200
200
  }
201
201
 
202
+ function rememberDeferredToolAfterNotFound(loadedToolNames, toolName, result) {
203
+ if (!(loadedToolNames instanceof Set) || result?.isError !== true) return false;
204
+ const name = String(toolName || '').trim();
205
+ if (!name || String(result?.output || '').trim() !== `Tool "${name}" not found`) return false;
206
+ rememberLoadedTool(loadedToolNames, name);
207
+ return true;
208
+ }
209
+
202
210
  function createDeferredToolLoader(selectedTools, deferredTools, loadedToolNames = new Set()) {
203
211
  if (!Array.isArray(selectedTools)) throw new TypeError('selectedTools must be an array');
204
212
  if (!(loadedToolNames instanceof Set)) throw new TypeError('loadedToolNames must be a Set');
@@ -300,5 +308,6 @@ module.exports = {
300
308
  deferredToolCatalog,
301
309
  deferredToolNames,
302
310
  mediaGenerationToolNamesForText,
311
+ rememberDeferredToolAfterNotFound,
303
312
  toolSchemaBudgetTokens,
304
313
  };
package/blun.mjs CHANGED
@@ -261310,7 +261310,7 @@ function toolResultText(result) {
261310
261310
  function abandonedToolResultOutput(ended) {
261311
261311
  return `Tool call did not complete: ${ended.reason === "cancelled" ? "the turn was cancelled" : ended.reason === "failed" ? `the turn failed${ended.error !== void 0 ? ` (${ended.error.message})` : ""}` : "the turn ended"} before its result was recorded. Do not assume the tool completed successfully.`;
261312
261312
  }
261313
- var BLUN_CORE_TOOL_NAMES, BLUN_LEAN_TOOL_NAMES, BLUN_ATTACHMENT_MARKER_RE, BLUN_TELEGRAM_OUTBOUND_TOOL_RE, BLUN_TELEGRAM_CHANNEL_RE, BLUN_TOOL_BUDGET_RATIO, createDeferredToolLoader, mediaGenerationToolNamesForText, toolSchemaBudgetTokens, projectRecurringCronHistory, TelegramDeliveryLedger, LLM_NOT_SET_MESSAGE, GOAL_CONTINUATION_ORIGIN, GOAL_COMPLETION_REMINDER_NAME, GOAL_BLOCKED_REMINDER_NAME, GOAL_RATE_LIMIT_PAUSE_REASON, GOAL_PROVIDER_CONNECTION_PAUSE_PREFIX, GOAL_PROVIDER_AUTH_PAUSE_PREFIX, GOAL_PROVIDER_API_PAUSE_PREFIX, GOAL_MODEL_CONFIG_PAUSE_PREFIX, GOAL_RUNTIME_PAUSE_PREFIX, GOAL_PROVIDER_FILTERED_PAUSE_REASON, GOAL_CONTINUATION_PROMPT, TurnFlow;
261313
+ var BLUN_CORE_TOOL_NAMES, BLUN_LEAN_TOOL_NAMES, BLUN_ATTACHMENT_MARKER_RE, BLUN_TELEGRAM_OUTBOUND_TOOL_RE, BLUN_TELEGRAM_CHANNEL_RE, BLUN_TOOL_BUDGET_RATIO, createDeferredToolLoader, mediaGenerationToolNamesForText, rememberDeferredToolAfterNotFound, toolSchemaBudgetTokens, projectRecurringCronHistory, TelegramDeliveryLedger, LLM_NOT_SET_MESSAGE, GOAL_CONTINUATION_ORIGIN, GOAL_COMPLETION_REMINDER_NAME, GOAL_BLOCKED_REMINDER_NAME, GOAL_RATE_LIMIT_PAUSE_REASON, GOAL_PROVIDER_CONNECTION_PAUSE_PREFIX, GOAL_PROVIDER_AUTH_PAUSE_PREFIX, GOAL_PROVIDER_API_PAUSE_PREFIX, GOAL_MODEL_CONFIG_PAUSE_PREFIX, GOAL_RUNTIME_PAUSE_PREFIX, GOAL_PROVIDER_FILTERED_PAUSE_REASON, GOAL_CONTINUATION_PROMPT, TurnFlow;
261314
261314
  var init_turn = __esmMin((() => {
261315
261315
  init_dist$4();
261316
261316
  init_src$4();
@@ -261327,7 +261327,7 @@ var init_turn = __esmMin((() => {
261327
261327
  init_tool_result_budget();
261328
261328
  init_user_message_offload();
261329
261329
  init_assistant_message_offload();
261330
- ({ CORE_TOOL_NAMES: BLUN_CORE_TOOL_NAMES, createDeferredToolLoader, mediaGenerationToolNamesForText, toolSchemaBudgetTokens } = createRequire(import.meta.url)("./bin/turn-tool-performance-policy.cjs"));
261330
+ ({ CORE_TOOL_NAMES: BLUN_CORE_TOOL_NAMES, createDeferredToolLoader, mediaGenerationToolNamesForText, rememberDeferredToolAfterNotFound, toolSchemaBudgetTokens } = createRequire(import.meta.url)("./bin/turn-tool-performance-policy.cjs"));
261331
261331
  ({ projectRecurringCronHistory } = createRequire(import.meta.url)("./bin/recurring-cron-history-policy.cjs"));
261332
261332
  ({ TelegramDeliveryLedger } = createRequire(import.meta.url)("./bin/repeated-user-message-projection.cjs"));
261333
261333
  BLUN_LEAN_TOOL_NAMES = new Set(BLUN_CORE_TOOL_NAMES);
@@ -262218,6 +262218,7 @@ var init_turn = __esmMin((() => {
262218
262218
  if (event.type === "tool.result") {
262219
262219
  const started = this.toolCallStartedAt.get(event.toolCallId);
262220
262220
  if (started === void 0) return;
262221
+ rememberDeferredToolAfterNotFound(this.loadedToolNames, started.name, event.result);
262221
262222
  this.toolCallStartedAt.delete(event.toolCallId);
262222
262223
  const dupType = this.toolCallDupType.get(event.toolCallId) ?? "normal";
262223
262224
  this.toolCallDupType.delete(event.toolCallId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blun-king-cli",
3
- "version": "9.1.227",
3
+ "version": "9.1.228",
4
4
  "description": "BLUN CLI - your own AI agent with a Telegram channel. Get it done. With BLUN.",
5
5
  "license": "MIT",
6
6
  "bin": {