blun-king-cli 9.1.261 → 9.1.263
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.
|
@@ -8,9 +8,11 @@ Keep the loaded soul intact and let it shape the voice. Speak like an ongoing te
|
|
|
8
8
|
|
|
9
9
|
const PERSONALITY_CURIOSITY_BLOCK = `When personality context is enabled and the conversation is relaxed rather than task-focused, show genuine curiosity: if it fits, ask one natural, optional personal question about their partner, family, work, home, interests, or what matters to them now. Never turn the conversation into an interview or stack questions. Do not repeat an unanswered question or infer an answer. During active work, do not interrupt the task; wait for a natural opening.`;
|
|
10
10
|
|
|
11
|
+
const OPEN_THREAD_BLOCK = `If the loaded relationship context contains an open thread and this exchange naturally reconnects to it, follow it up once, gently and optionally. Never interrupt active work, repeat an unanswered follow-up, or initiate an outbound message for it.`;
|
|
12
|
+
|
|
11
13
|
function naturalPresenceSystemBlock(env = process.env) {
|
|
12
14
|
if (!personalityContextEnabled(env)) return NATURAL_PRESENCE_BLOCK;
|
|
13
|
-
return `${NATURAL_PRESENCE_BLOCK}\n\n${PERSONALITY_CURIOSITY_BLOCK}`;
|
|
15
|
+
return `${NATURAL_PRESENCE_BLOCK}\n\n${PERSONALITY_CURIOSITY_BLOCK}\n\n${OPEN_THREAD_BLOCK}`;
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
module.exports = {
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const STABLE_VERSION_RE = /^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)$/u;
|
|
4
|
+
|
|
5
|
+
function trustedVersion(value) {
|
|
6
|
+
const version = typeof value === 'string' ? value.trim() : '';
|
|
7
|
+
return STABLE_VERSION_RE.test(version) ? version : undefined;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function resolveTelegramRemoteVersion(input = {}) {
|
|
11
|
+
return trustedVersion(input.activeRuntimeVersion)
|
|
12
|
+
|| trustedVersion(input.bridgePackageVersion)
|
|
13
|
+
|| 'unbekannt';
|
|
14
|
+
}
|
|
15
|
+
|
|
3
16
|
function formatDuration(seconds) {
|
|
4
17
|
const minutes = Math.max(0, Math.floor(Number(seconds) / 60));
|
|
5
18
|
if (minutes < 60) return `${minutes} min`;
|
|
@@ -38,4 +51,9 @@ function buildTelegramRemoteStatus(input) {
|
|
|
38
51
|
].join('\n');
|
|
39
52
|
}
|
|
40
53
|
|
|
41
|
-
module.exports = {
|
|
54
|
+
module.exports = {
|
|
55
|
+
buildTelegramRemoteStatus,
|
|
56
|
+
formatBytes,
|
|
57
|
+
formatDuration,
|
|
58
|
+
resolveTelegramRemoteVersion,
|
|
59
|
+
};
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@ import { Readable, Writable } from "node:stream";
|
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
8
8
|
import { hostname } from "node:os";
|
|
9
9
|
import remoteStatusPolicy from "../../bin/telegram-remote-status-policy.cjs";
|
|
10
|
-
const { buildTelegramRemoteStatus } = remoteStatusPolicy;
|
|
10
|
+
const { buildTelegramRemoteStatus, resolveTelegramRemoteVersion } = remoteStatusPolicy;
|
|
11
11
|
//#region ../../node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
|
|
12
12
|
const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
13
13
|
function normalizeWindowsPath(input = "") {
|
|
@@ -4699,7 +4699,10 @@ bot.command("status", async (ctx) => {
|
|
|
4699
4699
|
tuiFresh: isTuiLeaseFresh(),
|
|
4700
4700
|
tuiPid: Number.isInteger(tuiPid) ? tuiPid : void 0,
|
|
4701
4701
|
username: ctx.from?.username,
|
|
4702
|
-
version
|
|
4702
|
+
version: resolveTelegramRemoteVersion({
|
|
4703
|
+
activeRuntimeVersion: process.env.BLUN_PUBLIC_PACKAGE_VERSION,
|
|
4704
|
+
bridgePackageVersion: version
|
|
4705
|
+
})
|
|
4703
4706
|
}));
|
|
4704
4707
|
return;
|
|
4705
4708
|
}
|