blun-king-cli 9.1.164 → 9.1.165
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/turn-thinking-policy.cjs +10 -0
- package/blun.mjs +3 -3
- package/package.json +1 -1
|
@@ -8,6 +8,7 @@ const STATUS_ONLY_CHECK_IN = /(?:\bstandabfrage\b|\bstatusabfrage\b|\bkurzes?\s+
|
|
|
8
8
|
const STATUS_FOLLOW_UP_ACTION = /\b(?:aendere|arbeite|baue|build|change|delete|deploy|deploye|fahr|fix|fixe|implement|implementiere|install|installiere|loesche|mach|patch|pruefe|repariere|run|schreibe|setze|start|starte|stop|stoppe|test|teste|write)\b/iu;
|
|
9
9
|
const LIGHTWEIGHT_STEER = /\b(?:cool|danke|dankeschoen|gute arbeit|passt|perfekt|stolz|super|freut mich)\b/iu;
|
|
10
10
|
const ADAPTIVE_LOW_COMPLETION_TOKENS = 8192;
|
|
11
|
+
const STANDARD_TURN_MAX_COMPLETION_TOKENS = 24_576;
|
|
11
12
|
|
|
12
13
|
function selectThinkingEffortForTurn(text, originKind) {
|
|
13
14
|
if (originKind !== "user") return undefined;
|
|
@@ -52,6 +53,13 @@ function capCompletionBudgetForAdaptiveEffort(budget, thinkingEffort) {
|
|
|
52
53
|
};
|
|
53
54
|
}
|
|
54
55
|
|
|
56
|
+
function capTurnCompletionTokens(maxOutputSize) {
|
|
57
|
+
if (!Number.isFinite(maxOutputSize) || maxOutputSize <= 0) {
|
|
58
|
+
return STANDARD_TURN_MAX_COMPLETION_TOKENS;
|
|
59
|
+
}
|
|
60
|
+
return Math.min(Math.floor(maxOutputSize), STANDARD_TURN_MAX_COMPLETION_TOKENS);
|
|
61
|
+
}
|
|
62
|
+
|
|
55
63
|
function selectThinkingEffortForBufferedSteer(text, originKind) {
|
|
56
64
|
const classified = selectThinkingEffortForTurn(text, originKind);
|
|
57
65
|
if (classified !== undefined) return classified;
|
|
@@ -73,7 +81,9 @@ module.exports = {
|
|
|
73
81
|
ACTIONABLE_PROMPT,
|
|
74
82
|
ADAPTIVE_LOW_COMPLETION_TOKENS,
|
|
75
83
|
EXPLICIT_THINKING_INTENT,
|
|
84
|
+
STANDARD_TURN_MAX_COMPLETION_TOKENS,
|
|
76
85
|
capCompletionBudgetForAdaptiveEffort,
|
|
86
|
+
capTurnCompletionTokens,
|
|
77
87
|
selectThinkingEffortForBufferedSteer,
|
|
78
88
|
selectThinkingEffortForWorkStep,
|
|
79
89
|
selectThinkingEffortForTurn,
|
package/blun.mjs
CHANGED
|
@@ -264540,7 +264540,7 @@ var init_llm_request_logger = __esmMin((() => {
|
|
|
264540
264540
|
function normalizeRuntimeSystemPromptAppend(value) {
|
|
264541
264541
|
return value?.trim().slice(0, 16e3) ?? "";
|
|
264542
264542
|
}
|
|
264543
|
-
var PINNED_MODEL_ALIASES, resolveProviderIdleTimeoutMs, capCompletionBudgetForAdaptiveEffort, selectThinkingEffortForBufferedSteer, selectThinkingEffortForWorkStep, selectThinkingEffortForTurn, Agent$1;
|
|
264543
|
+
var PINNED_MODEL_ALIASES, resolveProviderIdleTimeoutMs, capCompletionBudgetForAdaptiveEffort, capTurnCompletionTokens, selectThinkingEffortForBufferedSteer, selectThinkingEffortForWorkStep, selectThinkingEffortForTurn, Agent$1;
|
|
264544
264544
|
var init_agent = __esmMin((() => {
|
|
264545
264545
|
init_dist$6();
|
|
264546
264546
|
init_config$4();
|
|
@@ -264578,7 +264578,7 @@ var init_agent = __esmMin((() => {
|
|
|
264578
264578
|
init_session_loop();
|
|
264579
264579
|
init_error_memory();
|
|
264580
264580
|
({ resolveProviderIdleTimeoutMs } = createRequire(import.meta.url)("./bin/provider-idle-timeout-policy.cjs"));
|
|
264581
|
-
({ capCompletionBudgetForAdaptiveEffort, selectThinkingEffortForBufferedSteer, selectThinkingEffortForWorkStep, selectThinkingEffortForTurn } = createRequire(import.meta.url)("./bin/turn-thinking-policy.cjs"));
|
|
264581
|
+
({ capCompletionBudgetForAdaptiveEffort, capTurnCompletionTokens, selectThinkingEffortForBufferedSteer, selectThinkingEffortForWorkStep, selectThinkingEffortForTurn } = createRequire(import.meta.url)("./bin/turn-thinking-policy.cjs"));
|
|
264582
264582
|
PINNED_MODEL_ALIASES = new Set(["king-blun", "pruefstand"]);
|
|
264583
264583
|
Agent$1 = class {
|
|
264584
264584
|
type;
|
|
@@ -264769,7 +264769,7 @@ var init_agent = __esmMin((() => {
|
|
|
264769
264769
|
const provider = thinkingEffort === void 0 ? runtimeModel.provider : runtimeModel.provider.withThinking(thinkingEffort);
|
|
264770
264770
|
const loopControl = this.blunConfig?.loopControl;
|
|
264771
264771
|
const completionBudgetConfig = resolveCompletionBudget({
|
|
264772
|
-
maxOutputSize: runtimeModel.maxOutputSize,
|
|
264772
|
+
maxOutputSize: capTurnCompletionTokens(runtimeModel.maxOutputSize),
|
|
264773
264773
|
reservedContextSize: loopControl?.reservedContextSize
|
|
264774
264774
|
});
|
|
264775
264775
|
return new KosongLLM({
|