blun-king-cli 9.1.329 → 9.1.331
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
|
|
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
|
-
...
|
|
52
|
-
...
|
|
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);
|
|
@@ -16,8 +16,8 @@ function isPrivateInternalStatusReply(chatId, text) {
|
|
|
16
16
|
const value = normalize(text);
|
|
17
17
|
if (value.length === 0) return false;
|
|
18
18
|
|
|
19
|
-
const exposesRuntimeControl = /\b(?:cron|loop|checkpoint|sha|tool|hook|queue|lane|inbound|outbound|arbeitsstand|arbeitsauftrag|bau freigabe|freigabe dieser lane)\b/u.test(value);
|
|
20
|
-
const announcesNoUserValue = /\b(?:keine neue aktion|keine neue information|kein neuer auftrag|kein neuer zweck|kein neuer inbound bedarf|nichts zu melden|nichts weiteres|bleibt pausiert|warte auf (?:dein|sein|ihr) (?:zeichen|go|freigabe)|ich sende nichts|wiederholen wäre spam|keine weitere nachricht)\b/u.test(value);
|
|
19
|
+
const exposesRuntimeControl = /\b(?:cron|loop|checkpoint|sha|tool|werkzeug|hook|queue|lane|inbound|outbound|arbeitsstand|arbeitsauftrag|bau freigabe|freigabe dieser lane|turn|zug|status|private nachricht|telegram nachricht|reply|verlauf|basis|f\d+|m\d+|w\d+)\b/u.test(value);
|
|
20
|
+
const announcesNoUserValue = /\b(?:keine neue aktion|keine neue information|keine neue nachricht|kein neuer auftrag|kein neuer zweck|kein neuer inbound bedarf|kein offener handlungsbedarf|nichts zu melden|nichts weiteres|bleibt pausiert|warte auf (?:dein|sein|ihr|papas) (?:zeichen|go|freigabe|antwort)|ich warte|ich sende nichts|wiederholen wäre spam|keine weitere nachricht|bereits geantwortet|bereits gesendet|kein werkzeugaufruf nötig|stand unverändert|zug läuft seit)\b/u.test(value);
|
|
21
21
|
return exposesRuntimeControl && announcesNoUserValue;
|
|
22
22
|
}
|
|
23
23
|
|