blun-king-cli 9.1.356 → 9.1.357
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.
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function joinSystemPrompt(base, append) {
|
|
4
|
+
if (append.length === 0) return base;
|
|
5
|
+
return base.length === 0 ? append : `${base}\n\n${append}`;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
function createEffectiveSystemPromptResolver(joinPrompts = joinSystemPrompt) {
|
|
9
|
+
if (typeof joinPrompts !== 'function') {
|
|
10
|
+
throw new TypeError('joinPrompts must be a function');
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let initialized = false;
|
|
14
|
+
let cachedBase = '';
|
|
15
|
+
let cachedAppend = '';
|
|
16
|
+
let cachedPrompt = '';
|
|
17
|
+
|
|
18
|
+
return function resolveEffectiveSystemPrompt(base, append) {
|
|
19
|
+
if (initialized && base === cachedBase && append === cachedAppend) {
|
|
20
|
+
return cachedPrompt;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
cachedPrompt = joinPrompts(base, append);
|
|
24
|
+
cachedBase = base;
|
|
25
|
+
cachedAppend = append;
|
|
26
|
+
initialized = true;
|
|
27
|
+
return cachedPrompt;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
module.exports = {
|
|
32
|
+
createEffectiveSystemPromptResolver,
|
|
33
|
+
};
|
package/blun.mjs
CHANGED
|
@@ -265004,7 +265004,7 @@ var init_llm_request_logger = __esmMin((() => {
|
|
|
265004
265004
|
function normalizeRuntimeSystemPromptAppend(value) {
|
|
265005
265005
|
return value?.trim().slice(0, 16e3) ?? "";
|
|
265006
265006
|
}
|
|
265007
|
-
var PINNED_MODEL_ALIASES, resolveProviderIdleTimeoutMs, capCompletionBudgetForAdaptiveEffort, capTurnCompletionTokens, selectThinkingEffortForBufferedSteer, selectThinkingEffortForWorkStep, selectThinkingEffortForTurn, Agent$1;
|
|
265007
|
+
var PINNED_MODEL_ALIASES, createEffectiveSystemPromptResolver, resolveProviderIdleTimeoutMs, capCompletionBudgetForAdaptiveEffort, capTurnCompletionTokens, selectThinkingEffortForBufferedSteer, selectThinkingEffortForWorkStep, selectThinkingEffortForTurn, Agent$1;
|
|
265008
265008
|
var init_agent = __esmMin((() => {
|
|
265009
265009
|
init_dist$6();
|
|
265010
265010
|
init_config$4();
|
|
@@ -265041,6 +265041,7 @@ var init_agent = __esmMin((() => {
|
|
|
265041
265041
|
init_goal$1();
|
|
265042
265042
|
init_session_loop();
|
|
265043
265043
|
init_error_memory();
|
|
265044
|
+
({ createEffectiveSystemPromptResolver } = createRequire(import.meta.url)("./bin/effective-system-prompt-cache-policy.cjs"));
|
|
265044
265045
|
({ resolveProviderIdleTimeoutMs } = createRequire(import.meta.url)("./bin/provider-idle-timeout-policy.cjs"));
|
|
265045
265046
|
({ capCompletionBudgetForAdaptiveEffort, capTurnCompletionTokens, selectThinkingEffortForBufferedSteer, selectThinkingEffortForWorkStep, selectThinkingEffortForTurn } = createRequire(import.meta.url)("./bin/turn-thinking-policy.cjs"));
|
|
265046
265047
|
PINNED_MODEL_ALIASES = new Set(["king-blun", "pruefstand"]);
|
|
@@ -265098,6 +265099,7 @@ var init_agent = __esmMin((() => {
|
|
|
265098
265099
|
allowModelFallback = true;
|
|
265099
265100
|
personalMemoryHostCapabilityEnabled = false;
|
|
265100
265101
|
runtimeSystemPromptAppend = "";
|
|
265102
|
+
resolveEffectiveSystemPrompt = createEffectiveSystemPromptResolver();
|
|
265101
265103
|
systemPromptContextProvider;
|
|
265102
265104
|
systemPromptTimestamp = new Date();
|
|
265103
265105
|
systemPromptContextFingerprint = "";
|
|
@@ -265264,9 +265266,7 @@ var init_agent = __esmMin((() => {
|
|
|
265264
265266
|
this.emitStatusUpdated();
|
|
265265
265267
|
}
|
|
265266
265268
|
get effectiveSystemPrompt() {
|
|
265267
|
-
|
|
265268
|
-
if (this.runtimeSystemPromptAppend.length === 0) return base;
|
|
265269
|
-
return base.length === 0 ? this.runtimeSystemPromptAppend : `${base}\n\n${this.runtimeSystemPromptAppend}`;
|
|
265269
|
+
return this.resolveEffectiveSystemPrompt(this.config.systemPrompt, this.runtimeSystemPromptAppend);
|
|
265270
265270
|
}
|
|
265271
265271
|
get fastConversationSystemPrompt() {
|
|
265272
265272
|
return [personaSystemBlock(), soulSystemBlock(), identitySystemBlock(), naturalPresenceSystemBlock(), conductSystemBlock(), `## Fast conversation mode
|