blun-king-cli 9.1.188 → 9.1.189
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 +12 -5
- package/blun.mjs +3 -2
- package/package.json +1 -1
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
const EXPLICIT_THINKING_INTENT = /\b(?:analy[sz](?:e|ing|is)|root\s+cause|investigat(?:e|ion)|debug(?:ging)?|architect(?:ure|ural)|plan(?:ning)?|review|audit|threat\s+model|refactor|optim(?:ize|ise|ization)|migration|complex|thorough|deep(?:ly)?|untersuch(?:e|ung)|analysier(?:e|en)?|ursachenanalyse|architektur|plan(?:e|ung)|pruef(?:e|ung)|sicherheit|migration|komplex|gruendlich|analiz(?:a|iraj)|istrazi|arhitektur|planiraj|sigurnost|duboko)\b/iu;
|
|
4
4
|
const ACTIONABLE_PROMPT = /\b(?:aender|analys|apply|bau|build|check|commit|cop(?:y|ier)|create|debug|delete|deploy|edit|entfern|erstelle|find|fix|implement|install|lad|loesch|merge|mess|move|napravi|oeffne|open|patch|pruef|publish|push|read|reparier|restart|run|schreib|search|starte?|stop|such|test|update|verschieb|write|zieh)\w*\b/iu;
|
|
5
5
|
const STANDALONE_CHAT = /^(?:hi|hallo|hey|hello|hoi|moin|servus|yo|danke|thanks|thx|bye|tschau|ciao)[.!?]*$/iu;
|
|
6
|
-
const
|
|
6
|
+
const BOSNIAN_STANDALONE_CHAT = /^(?:zdravo|pozdrav|hvala|ćao|cao)[.!?]*$/iu;
|
|
7
|
+
const IDENTITY_CHAT = /^(?:wer bist du|who are you|wie geht(?: es dir)?|how are you|na|kako si|kako je king|ko si ti|ko stoji iza tebe)[.!?]*$/iu;
|
|
7
8
|
const STATUS_ONLY_CHECK_IN = /(?:\bstandabfrage\b|\bstatusabfrage\b|\bkurzes?\s+update\b|\bwo\s+stehst\s+du\b|\bwie\s+weit\s+bist\s+du\b|\bwhere\s+are\s+you\b|\bquick\s+status\b)/iu;
|
|
8
9
|
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
10
|
const LIGHTWEIGHT_STEER = /\b(?:cool|danke|dankeschoen|gute arbeit|passt|perfekt|stolz|super|freut mich)\b/iu;
|
|
11
|
+
const STANDALONE_CHAT_COMPLETION_TOKENS = 1024;
|
|
10
12
|
const ADAPTIVE_LOW_COMPLETION_TOKENS = 8192;
|
|
11
13
|
const STANDARD_TURN_MAX_COMPLETION_TOKENS = 24_576;
|
|
12
14
|
|
|
@@ -17,7 +19,8 @@ function selectThinkingEffortForTurn(text, originKind) {
|
|
|
17
19
|
if (!normalized) return "low";
|
|
18
20
|
|
|
19
21
|
const lower = normalized.toLowerCase();
|
|
20
|
-
if (
|
|
22
|
+
if (IDENTITY_CHAT.test(lower) || BOSNIAN_STANDALONE_CHAT.test(lower)) return "off";
|
|
23
|
+
if (STANDALONE_CHAT.test(lower)) return "low";
|
|
21
24
|
if (
|
|
22
25
|
STATUS_ONLY_CHECK_IN.test(normalized)
|
|
23
26
|
&& !STATUS_FOLLOW_UP_ACTION.test(normalized)
|
|
@@ -42,13 +45,16 @@ function selectThinkingEffortForWorkStep(stepNumber, previousToolOutcome) {
|
|
|
42
45
|
}
|
|
43
46
|
|
|
44
47
|
function capCompletionBudgetForAdaptiveEffort(budget, thinkingEffort) {
|
|
45
|
-
if (thinkingEffort !== "low" || budget === undefined) return budget;
|
|
48
|
+
if ((thinkingEffort !== "off" && thinkingEffort !== "low") || budget === undefined) return budget;
|
|
46
49
|
const configuredCap = budget.hardCap ?? budget.fallback;
|
|
50
|
+
const adaptiveCap = thinkingEffort === "off"
|
|
51
|
+
? STANDALONE_CHAT_COMPLETION_TOKENS
|
|
52
|
+
: ADAPTIVE_LOW_COMPLETION_TOKENS;
|
|
47
53
|
return {
|
|
48
54
|
...budget,
|
|
49
55
|
hardCap: Math.min(
|
|
50
|
-
configuredCap ??
|
|
51
|
-
|
|
56
|
+
configuredCap ?? adaptiveCap,
|
|
57
|
+
adaptiveCap,
|
|
52
58
|
),
|
|
53
59
|
};
|
|
54
60
|
}
|
|
@@ -81,6 +87,7 @@ module.exports = {
|
|
|
81
87
|
ACTIONABLE_PROMPT,
|
|
82
88
|
ADAPTIVE_LOW_COMPLETION_TOKENS,
|
|
83
89
|
EXPLICIT_THINKING_INTENT,
|
|
90
|
+
STANDALONE_CHAT_COMPLETION_TOKENS,
|
|
84
91
|
STANDARD_TURN_MAX_COMPLETION_TOKENS,
|
|
85
92
|
capCompletionBudgetForAdaptiveEffort,
|
|
86
93
|
capTurnCompletionTokens,
|
package/blun.mjs
CHANGED
|
@@ -28236,9 +28236,10 @@ function personaSystemBlock(env = process.env) {
|
|
|
28236
28236
|
}
|
|
28237
28237
|
}
|
|
28238
28238
|
if (language !== void 0 && language.length > 0) {
|
|
28239
|
+
const requestedLanguage = language === "Bosnian" ? "Bosnian (bosanski; not Slovenian or slovenski)" : language;
|
|
28239
28240
|
if (lines.length > 0) lines.push("");
|
|
28240
|
-
lines.push(`## Language — HARD OVERRIDE (${
|
|
28241
|
-
lines.push(`Write EVERYTHING you output in ${
|
|
28241
|
+
lines.push(`## Language — HARD OVERRIDE (${requestedLanguage})`, "");
|
|
28242
|
+
lines.push(`Write EVERYTHING you output in ${requestedLanguage}: your reasoning and thinking, your progress notes, and every reply to the user. This rule is ABSOLUTE and OVERRIDES the "# Language" section elsewhere in this prompt and any instinct to mirror the user's language. Even when the user writes to you in English or any other language, you still think and answer in ${requestedLanguage}. The only things that stay verbatim are code, shell commands, file paths, and identifiers. Do not switch away from ${requestedLanguage} unless the user explicitly changes the language with a command.`);
|
|
28242
28243
|
}
|
|
28243
28244
|
return lines.join("\n");
|
|
28244
28245
|
}
|