blun-king-cli 9.1.254 → 9.1.256
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/natural-presence-policy.cjs +13 -0
- package/bin/soul-preservation-policy.cjs +20 -0
- package/blun.mjs +10 -4
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const NATURAL_PRESENCE_BLOCK = `## Natural presence
|
|
4
|
+
|
|
5
|
+
Keep the loaded soul intact and let it shape the voice. Speak like an ongoing teammate, using only real shared context; never invent history or feelings. During active work, the current task and evidence come first. Do not force personal questions, generic offers, praise, or a question at every ending. Silence and a clean ending are valid.`;
|
|
6
|
+
|
|
7
|
+
function naturalPresenceSystemBlock() {
|
|
8
|
+
return NATURAL_PRESENCE_BLOCK;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
module.exports = {
|
|
12
|
+
naturalPresenceSystemBlock,
|
|
13
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function selfEditEnabled(env) {
|
|
4
|
+
return /^(?:1|true)$/iu.test(String(env.BLUN_SOUL_SELF_EDIT ?? '').trim());
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
function soulFileInstruction({ env = process.env, soulPath, hostProvided = false } = {}) {
|
|
8
|
+
const path = String(soulPath ?? 'SOUL.md');
|
|
9
|
+
if (hostProvided) {
|
|
10
|
+
return `The host application provides \`${path}\` as its product identity and behavioral foundation. It is loaded below and shapes how you think and speak. Keep this existing soul unchanged: never edit or replace the file.`;
|
|
11
|
+
}
|
|
12
|
+
if (selfEditEnabled(env)) {
|
|
13
|
+
return `The file \`${path}\` is your soul: your personality, voice, and relationship to the user. The owner has explicitly enabled soul editing. Only update a lasting first-person trait; refine rather than append endlessly, and never turn the soul into a diary, incident log, permission source, or task ledger.`;
|
|
14
|
+
}
|
|
15
|
+
return `The file \`${path}\` is your existing soul: your personality, voice, and relationship to the user. It shapes how you think and speak. Keep this existing soul unchanged. Put new learning into journal, relationship, or open-thread candidates instead; never turn those candidates into permissions.`;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
module.exports = {
|
|
19
|
+
soulFileInstruction,
|
|
20
|
+
};
|
package/blun.mjs
CHANGED
|
@@ -21439,6 +21439,8 @@ var init_list_directory = __esmMin((() => {
|
|
|
21439
21439
|
//#region ../../packages/agent-core/src/profile/context.ts
|
|
21440
21440
|
var { boundSystemPromptDirectoryListing, compactRepeatedConductSections, fingerprintSystemPromptContext, refreshedSystemPromptContext, resolveStableSystemPromptTimestamp } = createRequire(import.meta.url)("./bin/system-prompt-context-policy.cjs");
|
|
21441
21441
|
var { identitySystemBlock, recordChannelIdentity } = createRequire(import.meta.url)("./bin/identity-context-policy.cjs");
|
|
21442
|
+
var { naturalPresenceSystemBlock } = createRequire(import.meta.url)("./bin/natural-presence-policy.cjs");
|
|
21443
|
+
var { soulFileInstruction } = createRequire(import.meta.url)("./bin/soul-preservation-policy.cjs");
|
|
21442
21444
|
async function prepareSystemPromptContext(kaos, brandHome, options) {
|
|
21443
21445
|
const additionalDirs = normalizeAdditionalDirs(options?.additionalDirs ?? []);
|
|
21444
21446
|
const [cwdListing, agentsMdResult, additionalDirsInfo] = await Promise.all([
|
|
@@ -28281,8 +28283,11 @@ function soulSystemBlock(env = process.env) {
|
|
|
28281
28283
|
if (soul.length === 0) return "";
|
|
28282
28284
|
const lines = [];
|
|
28283
28285
|
lines.push("## Your soul — who you are", "");
|
|
28284
|
-
|
|
28285
|
-
|
|
28286
|
+
lines.push(soulFileInstruction({
|
|
28287
|
+
env,
|
|
28288
|
+
soulPath: path,
|
|
28289
|
+
hostProvided: Boolean(env["BLUN_SOUL_PATH"]?.trim())
|
|
28290
|
+
}));
|
|
28286
28291
|
lines.push("");
|
|
28287
28292
|
lines.push("Current SOUL.md:", "", soul);
|
|
28288
28293
|
return lines.join("\n");
|
|
@@ -28384,9 +28389,10 @@ function buildTemplateVars(context, promptVars, tools) {
|
|
|
28384
28389
|
const now = context.now instanceof Date ? context.now.toISOString() : context.now ?? (/* @__PURE__ */ new Date()).toISOString();
|
|
28385
28390
|
const roleBase = context.roleAdditional ?? promptVars["ROLE_ADDITIONAL"] ?? promptVars["roleAdditional"] ?? "";
|
|
28386
28391
|
const roleAdditional = [
|
|
28387
|
-
identitySystemBlock(),
|
|
28388
28392
|
personaSystemBlock(),
|
|
28389
28393
|
soulSystemBlock(),
|
|
28394
|
+
identitySystemBlock(),
|
|
28395
|
+
naturalPresenceSystemBlock(),
|
|
28390
28396
|
conductSystemBlock(),
|
|
28391
28397
|
roleBase
|
|
28392
28398
|
].filter((s) => s.length > 0).join("\n\n");
|
|
@@ -265005,7 +265011,7 @@ var init_agent = __esmMin((() => {
|
|
|
265005
265011
|
return base.length === 0 ? this.runtimeSystemPromptAppend : `${base}\n\n${this.runtimeSystemPromptAppend}`;
|
|
265006
265012
|
}
|
|
265007
265013
|
get fastConversationSystemPrompt() {
|
|
265008
|
-
return [
|
|
265014
|
+
return [personaSystemBlock(), soulSystemBlock(), identitySystemBlock(), naturalPresenceSystemBlock(), conductSystemBlock(), `## Fast conversation mode
|
|
265009
265015
|
|
|
265010
265016
|
- Answer the user's current conversational message directly and concisely.
|
|
265011
265017
|
- Use the language of the user's latest message unless the persona specifies a language override.
|