blun-king-cli 9.1.329 → 9.1.330

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.
@@ -1,7 +1,8 @@
1
1
  'use strict';
2
2
 
3
- const IDENTITY_HEADING_RE = /(?:soul|seele|who i am|how i am|wie ich|wer ich|personality|persoenlichkeit|persönlichkeit|voice|stimme|values|werte|relationship|beziehung|relationships|odnos|ko sam|kakav sam|preferences|vorlieben|goals|ziele)/iu;
4
- const PROJECTION_MARKER = '... (soul projected from the complete unchanged source file)';
3
+ const IDENTITY_HEADING_RE = /(?:identity|identit(?:a|ä)t|character|charakter|soul|seele|who i am|how i am|wie ich|wer ich|personality|persoenlichkeit|persönlichkeit|voice|stimme|values|werte|relationship|beziehung|relationships|odnos|ko sam|kakav sam|preferences|vorlieben|goals|ziele|history|geschichte|journal|trust|vertrauen|repair|reparatur|ritual|insider|memory|erinnerung|curiosity|neugier|attention|aufmerksamkeit|boundaries|grenzen)/iu;
4
+ const OPERATIONAL_HEADING_RE = /(?:current\s+tasks?|aktuelle\s+auftr(?:a|ä)ge|auftr(?:a|ä)ge|assignments?|lane|zust(?:a|ä)ndigkeit|permissions?|berechtigungen?|rechte|qa(?:\s|-)*gate|quality\s+gate|tool(?:s|ing)?|werkzeuge?|commands?|befehle?|verification|verifikation|checks?|pr(?:u|ü)fung(?:en)?|incident|vorfall|errors?|fehler|logs?|runtime|console|konsole|mcp|cron|hooks?|updates?|deploy|release|build|workflow|prozess|how\s+to\s+work|arbeitsweise|when\s+to\s+answer|antwortregeln?|rules?|regeln?|evidence|beleg|image\s+recognition|bilderkennung)/iu;
5
+ const PROJECTION_MARKER = '... (identity projection from the complete unchanged soul source)';
5
6
 
6
7
  function splitSoul(text) {
7
8
  const matches = [...text.matchAll(/^##\s+.+$/gmu)];
@@ -16,6 +17,7 @@ function splitSoul(text) {
16
17
  heading: newline === -1 ? raw : raw.slice(0, newline).trimEnd(),
17
18
  body: newline === -1 ? '' : raw.slice(newline + 1).trim(),
18
19
  identity: IDENTITY_HEADING_RE.test(match[0]),
20
+ operational: OPERATIONAL_HEADING_RE.test(match[0]),
19
21
  index,
20
22
  };
21
23
  });
@@ -41,15 +43,17 @@ function allocateBodies(sections, budget) {
41
43
  function projectSoulText(value, maxChars = 4000) {
42
44
  const text = typeof value === 'string' ? value : '';
43
45
  const limit = Number.isFinite(maxChars) ? Math.max(0, Math.floor(maxChars)) : 4000;
44
- if (text.length <= limit) return text;
45
46
  if (limit === 0) return '';
46
47
 
47
48
  const { preamble, sections } = splitSoul(text);
49
+ const hasOperationalSections = sections.some((section) => section.operational);
50
+ if (text.length <= limit && !hasOperationalSections) return text;
48
51
  if (sections.length === 0) return `${text.slice(0, Math.max(0, limit - 1)).trimEnd()}…`.slice(0, limit);
49
52
 
53
+ const contextualSections = sections.filter((section) => !section.operational);
50
54
  const ordered = [
51
- ...sections.filter((section) => section.identity),
52
- ...sections.filter((section) => !section.identity),
55
+ ...contextualSections.filter((section) => section.identity),
56
+ ...contextualSections.filter((section) => !section.identity),
53
57
  ];
54
58
  const separatorCost = Math.max(0, ordered.length) * 2;
55
59
  const headingCost = ordered.reduce((sum, section) => sum + section.heading.length + 1, 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blun-king-cli",
3
- "version": "9.1.329",
3
+ "version": "9.1.330",
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": {