blun-king-cli 9.1.382 → 9.1.383

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.
@@ -19,6 +19,10 @@ function shouldOffloadToolResult(textLength) {
19
19
  return Number.isFinite(textLength) && textLength > TOOL_RESULT_MAX_CHARS;
20
20
  }
21
21
 
22
+ function shouldKeepFreshToolResult(toolName) {
23
+ return toolName === 'Read';
24
+ }
25
+
22
26
  function createToolResultPreview(text) {
23
27
  if (text.length <= TOOL_RESULT_PREVIEW_CHARS) return text;
24
28
 
@@ -267,5 +271,6 @@ module.exports = {
267
271
  isPersistedToolResultReference,
268
272
  selectHistoricalToolResultOffloads,
269
273
  selectToolResultBatchOffloads,
274
+ shouldKeepFreshToolResult,
270
275
  shouldOffloadToolResult,
271
276
  };
package/blun.mjs CHANGED
@@ -260587,7 +260587,7 @@ var init_tool_dedup = __esmMin((() => {
260587
260587
  //#region ../../packages/agent-core/src/agent/turn/tool-result-budget.ts
260588
260588
  async function budgetToolResultForModel(options) {
260589
260589
  const text = persistableToolResultText(options.result.output);
260590
- if (text === void 0 || !shouldOffloadToolResult(text.length)) return options.result;
260590
+ if (text === void 0 || shouldKeepFreshToolResult(options.toolName) || !shouldOffloadToolResult(text.length)) return options.result;
260591
260591
  const readSourcePath = reusableReadSourcePath(options);
260592
260592
  if (readSourcePath !== void 0) return referenceReadSourceForModel(options, text, readSourcePath);
260593
260593
  return persistToolResultForModel(options, text);
@@ -260739,7 +260739,7 @@ function renderHistoricalToolResultReference(toolName, toolCallId, text, outputP
260739
260739
  function safeToolResultFileStem(toolName, toolCallId) {
260740
260740
  return `${toolName}-${toolCallId}`.replace(/[^a-zA-Z0-9._-]+/g, "_").replace(/^_+|_+$/g, "").slice(0, 80) || "tool-result";
260741
260741
  }
260742
- var TOOL_RESULT_MAX_CHARS, TOOL_RESULT_PREVIEW_CHARS, TOOL_RESULT_RECOVERY_PAGE_LINES, TOOL_RESULT_OFFLOAD_MARKER, TOOL_RESULT_HISTORICAL_KEEP_RECENT_MESSAGES, shouldOffloadToolResult, createToolResultPreview, compactPersistedToolResultReference, compactHistoricalSuccessfulToolResults, dedupeRepeatedSuccessfulToolResults, selectToolResultBatchOffloads, selectHistoricalToolResultOffloads, buildToolResultOffloadTelemetry;
260742
+ var TOOL_RESULT_MAX_CHARS, TOOL_RESULT_PREVIEW_CHARS, TOOL_RESULT_RECOVERY_PAGE_LINES, TOOL_RESULT_OFFLOAD_MARKER, TOOL_RESULT_HISTORICAL_KEEP_RECENT_MESSAGES, shouldKeepFreshToolResult, shouldOffloadToolResult, createToolResultPreview, compactPersistedToolResultReference, compactHistoricalSuccessfulToolResults, dedupeRepeatedSuccessfulToolResults, selectToolResultBatchOffloads, selectHistoricalToolResultOffloads, buildToolResultOffloadTelemetry;
260743
260743
  var init_tool_result_budget = __esmMin((() => {
260744
260744
  init_dist$6();
260745
260745
  const toolResultOffloadPolicy = createRequire(import.meta.url)("./bin/tool-result-offload-policy.cjs");
@@ -260749,6 +260749,7 @@ var init_tool_result_budget = __esmMin((() => {
260749
260749
  TOOL_RESULT_RECOVERY_PAGE_LINES = toolResultOffloadPolicy.TOOL_RESULT_RECOVERY_PAGE_LINES;
260750
260750
  TOOL_RESULT_OFFLOAD_MARKER = toolResultOffloadPolicy.TOOL_RESULT_OFFLOAD_MARKER;
260751
260751
  TOOL_RESULT_HISTORICAL_KEEP_RECENT_MESSAGES = toolResultOffloadPolicy.TOOL_RESULT_HISTORICAL_KEEP_RECENT_MESSAGES;
260752
+ shouldKeepFreshToolResult = toolResultOffloadPolicy.shouldKeepFreshToolResult;
260752
260753
  shouldOffloadToolResult = toolResultOffloadPolicy.shouldOffloadToolResult;
260753
260754
  createToolResultPreview = toolResultOffloadPolicy.createToolResultPreview;
260754
260755
  compactPersistedToolResultReference = toolResultOffloadPolicy.compactPersistedToolResultReference;
@@ -260777,10 +260778,6 @@ var ToolResultBatchOffload = class {
260777
260778
  const recentStart = Math.max(0, history.length - TOOL_RESULT_HISTORICAL_KEEP_RECENT_MESSAGES);
260778
260779
  const historical = history.slice(0, recentStart).filter((message) => message?.role === "tool" && !tailIds.has(message.toolCallId));
260779
260780
  const candidateBatches = [{
260780
- messages: tail,
260781
- historical: false,
260782
- select: selectToolResultBatchOffloads
260783
- }, {
260784
260781
  messages: historical,
260785
260782
  historical: true,
260786
260783
  select: selectHistoricalToolResultOffloads
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blun-king-cli",
3
- "version": "9.1.382",
3
+ "version": "9.1.383",
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": {