blun-king-cli 9.1.273 → 9.1.275

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.
@@ -13,7 +13,9 @@ const TELEGRAM_SUBJECT_RE = /^\d{1,32}$/u;
13
13
  const TELEGRAM_CHAT_RE = /^-?\d{1,32}$/u;
14
14
 
15
15
  function autoGraphEnabled(env) {
16
- return /^(?:1|true)$/iu.test(String(env.BLUN_IDENTITY_AUTO_GRAPH ?? '').trim());
16
+ const configured = String(env.BLUN_IDENTITY_AUTO_GRAPH ?? '').trim();
17
+ if (configured) return /^(?:1|true)$/iu.test(configured);
18
+ return personalityContextEnabled(env);
17
19
  }
18
20
 
19
21
  function safeId(value) {
@@ -87,7 +89,16 @@ function cleanText(value, maxChars = 240) {
87
89
 
88
90
  function cleanList(value, maxItems = 5) {
89
91
  if (!Array.isArray(value)) return [];
90
- return value.map((item) => cleanText(item, 160)).filter(Boolean).slice(0, maxItems);
92
+ const unique = [];
93
+ const seen = new Set();
94
+ for (const item of value) {
95
+ const text = cleanText(item, 160);
96
+ if (!text || seen.has(text)) continue;
97
+ seen.add(text);
98
+ unique.push(text);
99
+ if (unique.length >= maxItems) break;
100
+ }
101
+ return unique;
91
102
  }
92
103
 
93
104
  function addField(lines, label, value) {
@@ -4,12 +4,15 @@ const crypto = require('node:crypto');
4
4
  const fs = require('node:fs');
5
5
  const os = require('node:os');
6
6
  const path = require('node:path');
7
+ const { personalityContextEnabled } = require('./personality-mode.cjs');
7
8
 
8
9
  const SAFE_ID_RE = /^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/u;
9
10
  const ALLOWED_KINDS = new Set(['first_interaction']);
10
11
 
11
12
  function enabled(env) {
12
- return /^(?:1|true)$/iu.test(String(env.BLUN_IDENTITY_JOURNAL ?? '').trim());
13
+ const configured = String(env.BLUN_IDENTITY_JOURNAL ?? '').trim();
14
+ if (configured) return /^(?:1|true)$/iu.test(configured);
15
+ return personalityContextEnabled(env);
13
16
  }
14
17
 
15
18
  function safeId(value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blun-king-cli",
3
- "version": "9.1.273",
3
+ "version": "9.1.275",
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": {