blun-king-cli 9.1.46 → 9.1.47
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/LIESMICH.txt +1 -1
- package/README.md +1 -1
- package/blun.mjs +16 -0
- package/package.json +1 -1
package/LIESMICH.txt
CHANGED
package/README.md
CHANGED
package/blun.mjs
CHANGED
|
@@ -75557,6 +75557,9 @@ var init_full = __esmMin((() => {
|
|
|
75557
75557
|
const estimatedProgressPercent = estimateCompactionProgressPercent(stage, estimatedStageCount);
|
|
75558
75558
|
const windowUsagePercent = estimateCompactionWindowUsagePercent(estimatedCompactionRequestTokens, compactionRequestLimit);
|
|
75559
75559
|
this.agent.log.info("compaction stage request", {
|
|
75560
|
+
requestPurpose: "compaction",
|
|
75561
|
+
toolSuppressionReason: "compaction_summary",
|
|
75562
|
+
selectedToolCount: compactionTools.length,
|
|
75560
75563
|
source: data.source,
|
|
75561
75564
|
stage,
|
|
75562
75565
|
estimatedStageCount,
|
|
@@ -259752,6 +259755,12 @@ function blunSelectTurnTools(tools, maxContextTokens) {
|
|
|
259752
259755
|
const lean = tools.filter((tool) => BLUN_LEAN_TOOL_NAMES.has(tool.name) || BLUN_LEAN_KEEP_RE.test(tool.name));
|
|
259753
259756
|
return lean.length > 0 ? lean : tools;
|
|
259754
259757
|
}
|
|
259758
|
+
function blunToolSuppressionReason(turnNeedsTools, eligibleTools, selectedTools) {
|
|
259759
|
+
if (!turnNeedsTools) return "greeting_optimization";
|
|
259760
|
+
if (eligibleTools.length === 0) return "no_eligible_tools";
|
|
259761
|
+
if (selectedTools.length < eligibleTools.length) return "context_budget_lean_set";
|
|
259762
|
+
return "none";
|
|
259763
|
+
}
|
|
259755
259764
|
function isGoalOutcomeReminderOrigin(origin) {
|
|
259756
259765
|
return origin?.kind === "system_trigger" && (origin.name === "goal_completion" || origin.name === "goal_blocked");
|
|
259757
259766
|
}
|
|
@@ -260566,6 +260575,13 @@ var init_turn = __esmMin((() => {
|
|
|
260566
260575
|
try {
|
|
260567
260576
|
const eligibleTools = blunToolsForOrigin(this.agent.injection.filterPersonalMemoryToolsForTurn(turnId, input, origin, this.agent.tools.loopTools), origin);
|
|
260568
260577
|
const selectedTools = turnNeedsTools ? blunSelectTurnTools(eligibleTools, this.agent.config.modelCapabilities?.max_context_tokens) : [];
|
|
260578
|
+
const toolSuppressionReason = blunToolSuppressionReason(turnNeedsTools, eligibleTools, selectedTools);
|
|
260579
|
+
this.agent.log.info("turn request tools", {
|
|
260580
|
+
requestPurpose: "conversation",
|
|
260581
|
+
toolSuppressionReason,
|
|
260582
|
+
eligibleToolCount: eligibleTools.length,
|
|
260583
|
+
selectedToolCount: selectedTools.length
|
|
260584
|
+
});
|
|
260569
260585
|
return (await runTurn({
|
|
260570
260586
|
turnId: String(turnId),
|
|
260571
260587
|
signal,
|