blun-king-cli 9.1.391 → 9.1.393
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.
- package/LIESMICH.txt +11 -9
- package/README.md +7 -7
- package/bin/blun.js +28 -43
- package/bin/core-bootstrap.js +1 -2
- package/bin/king.js +28 -43
- package/bin/launcher-runtime.js +82 -657
- package/bin/telegram-private-conversation-policy.cjs +5 -0
- package/bin/update-notice.js +22 -126
- package/blun.mjs +11 -1703
- package/package.json +1 -1
- package/release-planned-removals.json +13 -2
- package/telegram-plugin/bin/telegram-private-conversation-policy.cjs +5 -0
- package/bin/running-update-preference.cjs +0 -68
- package/bin/running-update.cjs +0 -588
package/package.json
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "9.1.
|
|
3
|
-
"removals": [
|
|
2
|
+
"version": "9.1.393",
|
|
3
|
+
"removals": [
|
|
4
|
+
{
|
|
5
|
+
"path": "package/bin/running-update.cjs",
|
|
6
|
+
"reason": "Background updater removed by owner decision; the visible manual startup picker remains.",
|
|
7
|
+
"decisionRef": "Telegram DM 5597, 5603, 5610, 5614 and 5619, 2026-08-28"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"path": "package/bin/running-update-preference.cjs",
|
|
11
|
+
"reason": "Background updater preference removed with the background updater; manual startup choices remain.",
|
|
12
|
+
"decisionRef": "Telegram DM 5597, 5603, 5610, 5614 and 5619, 2026-08-28"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
4
15
|
}
|
|
@@ -6,6 +6,10 @@ const TRAILING_WORK_PERMISSION_QUESTION = /(?:^|\r?\n\s*\r?\n)(?:kann|darf|soll)
|
|
|
6
6
|
const INTERNAL_CONTROL_MARKER = /\b(?:cron|loop|checkpoint|handoff|resume|session|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|qa gate|wartezustand|f\d+|m\d+|w\d+)\b/gu;
|
|
7
7
|
const NO_USER_VALUE = /\b(?:keine neue aktion|keine neue information|keine neue nachricht|kein neuer auftrag|kein neuer zweck|kein neuer inbound bedarf|kein offener handlungsbedarf|nichts neues zu melden|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|kein bau ohne|qa gate steht noch aus|wartezustand)\b/u;
|
|
8
8
|
|
|
9
|
+
const MEDIA_PROGRESS_MARKER = /\b(?:bildgenerierung|bildjob|generateimage|getmedia|media job|medienjob)\b/u;
|
|
10
|
+
const MEDIA_PENDING_STATE = /\b(?:auftrag wurde angenommen|job wurde angenommen|job angenommen|aufruf wurde abgesetzt|angestossen|angestoßen|processing|verarbeitung)\b/u;
|
|
11
|
+
const MEDIA_NO_RESULT = /\b(?:kein neues bild|noch kein bild|kein bild liefern|nichts angekommen|nichts neues gelandet|nicht verfuegbar|nicht verfügbar|getmedia fehlt)\b/u;
|
|
12
|
+
|
|
9
13
|
function normalize(text) {
|
|
10
14
|
return String(text ?? '')
|
|
11
15
|
.normalize('NFKC')
|
|
@@ -27,6 +31,7 @@ function isPrivateInternalStatusReply(chatId, text) {
|
|
|
27
31
|
const value = normalize(sanitized.length === 0 ? text : sanitized);
|
|
28
32
|
if (value.length === 0) return false;
|
|
29
33
|
if (sanitized.length === 0 && WORK_PERMISSION_QUESTION.test(value)) return true;
|
|
34
|
+
if (MEDIA_PROGRESS_MARKER.test(value) && MEDIA_PENDING_STATE.test(value) && MEDIA_NO_RESULT.test(value)) return true;
|
|
30
35
|
|
|
31
36
|
const internalMarkers = value.match(INTERNAL_CONTROL_MARKER) ?? [];
|
|
32
37
|
return internalMarkers.length > 0 && NO_USER_VALUE.test(value);
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const fs = require('node:fs');
|
|
4
|
-
const path = require('node:path');
|
|
5
|
-
const { randomUUID } = require('node:crypto');
|
|
6
|
-
|
|
7
|
-
const { ensurePrivateDirectory, securePrivateFile, writePrivateFile } = require('./private-paths');
|
|
8
|
-
|
|
9
|
-
const RUNNING_UPDATE_PREFERENCE_FILE = 'running-update.json';
|
|
10
|
-
const RUNNING_UPDATE_MODES = Object.freeze({
|
|
11
|
-
MANUAL: 'manual',
|
|
12
|
-
RESUME: 'resume',
|
|
13
|
-
NEW: 'new',
|
|
14
|
-
OFF: 'off',
|
|
15
|
-
});
|
|
16
|
-
const DEFAULT_RUNNING_UPDATE_MODE = RUNNING_UPDATE_MODES.RESUME;
|
|
17
|
-
const VALID_MODES = new Set(Object.values(RUNNING_UPDATE_MODES));
|
|
18
|
-
|
|
19
|
-
function preferencePath(profileHome) {
|
|
20
|
-
return path.join(path.resolve(profileHome), RUNNING_UPDATE_PREFERENCE_FILE);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function normalizeRunningUpdateMode(value) {
|
|
24
|
-
return typeof value === 'string' && VALID_MODES.has(value)
|
|
25
|
-
? value
|
|
26
|
-
: DEFAULT_RUNNING_UPDATE_MODE;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function readRunningUpdateMode(profileHome) {
|
|
30
|
-
try {
|
|
31
|
-
const filePath = preferencePath(profileHome);
|
|
32
|
-
const stat = fs.lstatSync(filePath);
|
|
33
|
-
if (!stat.isFile() || stat.isSymbolicLink() || stat.size > 16 * 1024) {
|
|
34
|
-
return DEFAULT_RUNNING_UPDATE_MODE;
|
|
35
|
-
}
|
|
36
|
-
const record = JSON.parse(fs.readFileSync(filePath, 'utf8'));
|
|
37
|
-
return normalizeRunningUpdateMode(record?.mode);
|
|
38
|
-
} catch {
|
|
39
|
-
return DEFAULT_RUNNING_UPDATE_MODE;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function writeRunningUpdateMode(profileHome, mode) {
|
|
44
|
-
if (!VALID_MODES.has(mode)) throw new Error('RUNNING_UPDATE_MODE_INVALID');
|
|
45
|
-
const home = path.resolve(profileHome);
|
|
46
|
-
const filePath = preferencePath(home);
|
|
47
|
-
const temporaryPath = path.join(home, `.${RUNNING_UPDATE_PREFERENCE_FILE}.${process.pid}.${randomUUID()}.tmp`);
|
|
48
|
-
ensurePrivateDirectory(home);
|
|
49
|
-
try {
|
|
50
|
-
writePrivateFile(temporaryPath, `${JSON.stringify({ mode })}\n`);
|
|
51
|
-
fs.renameSync(temporaryPath, filePath);
|
|
52
|
-
securePrivateFile(filePath);
|
|
53
|
-
} catch (error) {
|
|
54
|
-
fs.rmSync(temporaryPath, { force: true });
|
|
55
|
-
throw error;
|
|
56
|
-
}
|
|
57
|
-
return mode;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
module.exports = {
|
|
61
|
-
DEFAULT_RUNNING_UPDATE_MODE,
|
|
62
|
-
RUNNING_UPDATE_MODES,
|
|
63
|
-
RUNNING_UPDATE_PREFERENCE_FILE,
|
|
64
|
-
normalizeRunningUpdateMode,
|
|
65
|
-
preferencePath,
|
|
66
|
-
readRunningUpdateMode,
|
|
67
|
-
writeRunningUpdateMode,
|
|
68
|
-
};
|