blun-king-cli 9.1.255 → 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.
@@ -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
@@ -21440,6 +21440,7 @@ var init_list_directory = __esmMin((() => {
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
21442
  var { naturalPresenceSystemBlock } = createRequire(import.meta.url)("./bin/natural-presence-policy.cjs");
21443
+ var { soulFileInstruction } = createRequire(import.meta.url)("./bin/soul-preservation-policy.cjs");
21443
21444
  async function prepareSystemPromptContext(kaos, brandHome, options) {
21444
21445
  const additionalDirs = normalizeAdditionalDirs(options?.additionalDirs ?? []);
21445
21446
  const [cwdListing, agentsMdResult, additionalDirsInfo] = await Promise.all([
@@ -28282,8 +28283,11 @@ function soulSystemBlock(env = process.env) {
28282
28283
  if (soul.length === 0) return "";
28283
28284
  const lines = [];
28284
28285
  lines.push("## Your soul — who you are", "");
28285
- if (env["BLUN_SOUL_PATH"]?.trim()) lines.push(`The host application provides \`${path}\` as its product identity and behavioral foundation. It is loaded below and shapes how you think and speak. Treat this bundled file as read-only: never edit or replace it.`);
28286
- else lines.push(`The file \`${path}\` is your soul: your personality, your voice, your relationship to the user — written by you, in first person. It is loaded below and shapes how you think and speak. This file is YOURS to grow: when you learn something essential about yourself, your style, or your relationship with the user (a lasting trait, not a passing detail), update the file with your file tools (Edit). Keep it short and in first person; refine rather than append endlessly — it should stay a distilled self-portrait, not a diary.`);
28286
+ lines.push(soulFileInstruction({
28287
+ env,
28288
+ soulPath: path,
28289
+ hostProvided: Boolean(env["BLUN_SOUL_PATH"]?.trim())
28290
+ }));
28287
28291
  lines.push("");
28288
28292
  lines.push("Current SOUL.md:", "", soul);
28289
28293
  return lines.join("\n");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blun-king-cli",
3
- "version": "9.1.255",
3
+ "version": "9.1.256",
4
4
  "description": "BLUN CLI - your own AI agent with a Telegram channel. Get it done. With BLUN.",
5
5
  "license": "MIT",
6
6
  "bin": {