blun-king-cli 9.1.381 → 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.
- package/bin/tool-result-offload-policy.cjs +5 -0
- package/blun.mjs +4 -13
- package/package.json +1 -1
|
@@ -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
|
|
@@ -403603,13 +403600,7 @@ const BUILTIN_SLASH_COMMAND_DEFINITIONS = [
|
|
|
403603
403600
|
priority: 80,
|
|
403604
403601
|
argumentHint: "<natürlicher Auftrag>",
|
|
403605
403602
|
liveArgumentHint: loopInputHint,
|
|
403606
|
-
availability:
|
|
403607
|
-
const trimmed = args.trim();
|
|
403608
|
-
if (trimmed === "") return "always";
|
|
403609
|
-
const tokens = trimmed.split(/\s+/);
|
|
403610
|
-
const action = tokens[0]?.toLowerCase();
|
|
403611
|
-
return tokens.length === 1 && (action === "status" || action === "pause" || action === "paused" || action === "stop") ? "always" : "idle-only";
|
|
403612
|
-
}
|
|
403603
|
+
availability: "always"
|
|
403613
403604
|
},
|
|
403614
403605
|
{
|
|
403615
403606
|
name: "init",
|