blun-king-cli 9.1.504 → 9.1.506
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/CHANGELOG.md +12 -0
- package/LIESMICH.txt +12 -1
- package/README.md +7 -1
- package/bin/telegram-queue-handoff-policy.cjs +49 -0
- package/blun.mjs +19 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 9.1.506 - 2026-08-30
|
|
4
|
+
|
|
5
|
+
- Removes completed TodoList entries from the visible TUI immediately, matching the already-pruned persistent Todo store while retaining every unfinished item.
|
|
6
|
+
- Runs automatic TodoList maintenance with a dedicated 546-character system prompt instead of appending the full work prompt measured at roughly 19,000 characters.
|
|
7
|
+
- Preserves the full work prompt and ordinary tool catalogue on the following step, with regressions covering Todo lifecycle, maintenance isolation, and tool restoration.
|
|
8
|
+
|
|
9
|
+
## 9.1.505 - 2026-08-30
|
|
10
|
+
|
|
11
|
+
- Preserves Telegram messages that arrive after a TUI claims channel ownership but before the delayed channel activation finishes.
|
|
12
|
+
- Captures the queue boundary at ownership start, keeps a valid durable checkpoint authoritative, and consumes a replaced queue from byte zero.
|
|
13
|
+
- Adds a regression for the measured update handoff where message 63456 arrived after ownership began and was skipped one second later as historical backlog.
|
|
14
|
+
|
|
3
15
|
## 9.1.504 - 2026-08-30
|
|
4
16
|
|
|
5
17
|
- Starts an automatically queued Telegram message as a fresh model turn when King is idle instead of waiting forever for an already active turn.
|
package/LIESMICH.txt
CHANGED
|
@@ -9,7 +9,7 @@ Installation
|
|
|
9
9
|
------------
|
|
10
10
|
Die geprüfte Version exakt global installieren:
|
|
11
11
|
|
|
12
|
-
npm install -g blun-king-cli@9.1.
|
|
12
|
+
npm install -g blun-king-cli@9.1.506
|
|
13
13
|
|
|
14
14
|
Start
|
|
15
15
|
-----
|
|
@@ -65,10 +65,21 @@ geschriebenen Entwurf zu löschen. Das gilt auch bei
|
|
|
65
65
|
Autovervollständigung, Geistervorschlägen, Bash-Eingabe und einer offenen
|
|
66
66
|
Mehrzeileneingabe.
|
|
67
67
|
|
|
68
|
+
Version 9.1.506 entfernt erledigte TodoList-Punkte sofort aus der sichtbaren
|
|
69
|
+
TUI und verwendet fuer den automatischen Wartungszug einen eigenstaendigen,
|
|
70
|
+
546 Zeichen langen Systemprompt statt des rund 19.000 Zeichen langen
|
|
71
|
+
Arbeits-Systemprompts. Der nachfolgende Arbeitsschritt behaelt weiterhin den
|
|
72
|
+
vollstaendigen Prompt und Werkzeugkatalog.
|
|
73
|
+
|
|
68
74
|
Version 9.1.504 startet eine automatisch eingereihte Telegram-Nachricht im
|
|
69
75
|
Leerlauf als neuen Modellzug. Sie wartet damit nicht mehr auf einen bereits
|
|
70
76
|
laufenden Zug, der im Leerlauf definitionsgemaess nie entstehen kann.
|
|
71
77
|
|
|
78
|
+
Version 9.1.505 bewahrt Telegram-Nachrichten, die waehrend der kurzen
|
|
79
|
+
Kanal-Uebergabe nach dem Eigentumsanspruch, aber vor der Aktivierung eintreffen.
|
|
80
|
+
Der Startstand der Queue wird eingefroren; nur der bereits davor vorhandene
|
|
81
|
+
Altbestand darf ohne gueltigen Checkpoint uebersprungen werden.
|
|
82
|
+
|
|
72
83
|
Version 9.1.503 ergaenzt die isolierte Wartungsnachricht um das vom Anbieterpfad
|
|
73
84
|
erwartete leere toolCalls-Feld. Dadurch erreicht der Wartungsschritt das Modell,
|
|
74
85
|
statt in der Nachrichten-Normalisierung mit einem TypeError abzubrechen.
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ Voraussetzung ist Node.js 24.15 oder neuer. Die geprüfte Version wird exakt
|
|
|
9
9
|
installiert:
|
|
10
10
|
|
|
11
11
|
```powershell
|
|
12
|
-
npm install -g blun-king-cli@9.1.
|
|
12
|
+
npm install -g blun-king-cli@9.1.506
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Reproduzierbares Staging und Packen
|
|
@@ -81,6 +81,12 @@ konkurrierenden Start zurückgewiesen und bleiben an der Spitze der
|
|
|
81
81
|
FIFO-Warteschlange. Für diesen normalen Wartestatus erscheint kein
|
|
82
82
|
`turn.agent_busy`-Fehler.
|
|
83
83
|
|
|
84
|
+
Version 9.1.506 entfernt erledigte TodoList-Punkte sofort aus der sichtbaren
|
|
85
|
+
TUI und verwendet fuer den automatischen Wartungszug einen eigenstaendigen,
|
|
86
|
+
546 Zeichen langen Systemprompt statt des rund 19.000 Zeichen langen
|
|
87
|
+
Arbeits-Systemprompts. Der nachfolgende Arbeitsschritt behaelt weiterhin den
|
|
88
|
+
vollstaendigen Prompt und Werkzeugkatalog.
|
|
89
|
+
|
|
84
90
|
Version 9.1.504 startet eine automatisch eingereihte Telegram-Nachricht im
|
|
85
91
|
Leerlauf als neuen Modellzug. Sie wartet damit nicht mehr auf einen bereits
|
|
86
92
|
laufenden Zug, der im Leerlauf definitionsgemäß nie entstehen kann.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function queueFileIdentity(stats) {
|
|
4
|
+
if (!stats) return '';
|
|
5
|
+
return `${stats.dev}:${stats.ino}:${stats.birthtimeMs}`;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
function captureTelegramQueueBaseline(stats) {
|
|
9
|
+
const fileId = queueFileIdentity(stats);
|
|
10
|
+
const offset = Number(stats?.size);
|
|
11
|
+
if (!fileId || !Number.isSafeInteger(offset) || offset < 0) {
|
|
12
|
+
return { fileId: '', offset: 0 };
|
|
13
|
+
}
|
|
14
|
+
return { fileId, offset };
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function validCheckpoint(checkpoint, queueFileId, queueSize) {
|
|
18
|
+
return checkpoint?.version === 1
|
|
19
|
+
&& checkpoint.fileId === queueFileId
|
|
20
|
+
&& Number.isSafeInteger(checkpoint.offset)
|
|
21
|
+
&& checkpoint.offset >= 0
|
|
22
|
+
&& checkpoint.offset <= queueSize;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function resolveTelegramQueueActivationOffset(input) {
|
|
26
|
+
const queueFileId = String(input?.queueFileId ?? '');
|
|
27
|
+
const queueSize = Number(input?.queueSize);
|
|
28
|
+
const baseline = input?.baseline;
|
|
29
|
+
if (!queueFileId || !Number.isSafeInteger(queueSize) || queueSize < 0) {
|
|
30
|
+
return { offset: 0, reason: 'queue_unavailable' };
|
|
31
|
+
}
|
|
32
|
+
if (validCheckpoint(input?.checkpoint, queueFileId, queueSize)) {
|
|
33
|
+
return { offset: input.checkpoint.offset, reason: 'checkpoint' };
|
|
34
|
+
}
|
|
35
|
+
if (
|
|
36
|
+
baseline?.fileId === queueFileId
|
|
37
|
+
&& Number.isSafeInteger(baseline.offset)
|
|
38
|
+
&& baseline.offset >= 0
|
|
39
|
+
&& baseline.offset <= queueSize
|
|
40
|
+
) {
|
|
41
|
+
return { offset: baseline.offset, reason: 'ownership_baseline' };
|
|
42
|
+
}
|
|
43
|
+
return { offset: 0, reason: 'queue_replaced' };
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
module.exports = {
|
|
47
|
+
captureTelegramQueueBaseline,
|
|
48
|
+
resolveTelegramQueueActivationOffset,
|
|
49
|
+
};
|
package/blun.mjs
CHANGED
|
@@ -262799,7 +262799,7 @@ var init_turn = __esmMin((() => {
|
|
|
262799
262799
|
mode: todoMaintenanceMode,
|
|
262800
262800
|
workCallsSinceRefresh: this.agent.goalTodoPolicyState?.workCallsSinceRefresh ?? 0
|
|
262801
262801
|
});
|
|
262802
|
-
const todoSystemPrompt = buildGoalTodoMaintenanceSystemPrompt(this.agent,
|
|
262802
|
+
const todoSystemPrompt = buildGoalTodoMaintenanceSystemPrompt(this.agent, todoMaintenanceMode);
|
|
262803
262803
|
const todoMessages = buildGoalTodoMaintenanceMessages(this.agent, todoMaintenanceMode);
|
|
262804
262804
|
return {
|
|
262805
262805
|
llm: this.agent.llmForTurn("low", todoSystemPrompt),
|
|
@@ -419615,6 +419615,7 @@ var { createDirectFocusController, createDirectReplyTurnStop, enqueueTelegramDir
|
|
|
419615
419615
|
var { enqueueTelegramAddressed } = createRequire(import.meta.url)("./bin/telegram-addressed-priority.cjs");
|
|
419616
419616
|
var { enqueueTelegramBotPriority, telegramBotPriorityMessage } = createRequire(import.meta.url)("./bin/telegram-bot-priority.cjs");
|
|
419617
419617
|
var { createAddressedChannelFocusStore } = createRequire(import.meta.url)("./bin/telegram-addressed-focus.cjs");
|
|
419618
|
+
var { captureTelegramQueueBaseline, resolveTelegramQueueActivationOffset } = createRequire(import.meta.url)("./bin/telegram-queue-handoff-policy.cjs");
|
|
419618
419619
|
var { removeQueuedReloadCommands, removeQueuedSlashCommands } = createRequire(import.meta.url)("./bin/reload-queue-policy.cjs");
|
|
419619
419620
|
const MAX_BUFFERED_CONTEXT_MESSAGES = 20;
|
|
419620
419621
|
const MAX_BUFFERED_CONTEXT_CHARS = 24e3;
|
|
@@ -419928,6 +419929,7 @@ var TelegramChannelController = class {
|
|
|
419928
419929
|
offset = 0;
|
|
419929
419930
|
checkpointOffset = 0;
|
|
419930
419931
|
queueFileId = "";
|
|
419932
|
+
queueClaimBaseline = { fileId: "", offset: 0 };
|
|
419931
419933
|
remainder = Buffer.alloc(0);
|
|
419932
419934
|
pendingQueueLines = [];
|
|
419933
419935
|
started = false;
|
|
@@ -419985,6 +419987,11 @@ var TelegramChannelController = class {
|
|
|
419985
419987
|
try {
|
|
419986
419988
|
mkdirSync(this.dir, { recursive: true });
|
|
419987
419989
|
} catch {}
|
|
419990
|
+
try {
|
|
419991
|
+
this.queueClaimBaseline = captureTelegramQueueBaseline(statSync(this.queueFile));
|
|
419992
|
+
} catch {
|
|
419993
|
+
this.queueClaimBaseline = { fileId: "", offset: 0 };
|
|
419994
|
+
}
|
|
419988
419995
|
if (!this.claimOwnership()) return;
|
|
419989
419996
|
this.ownershipTimer = setInterval(() => this.checkOwnership(), this.ownershipPollMs);
|
|
419990
419997
|
this.ownershipTimer.unref();
|
|
@@ -420004,11 +420011,14 @@ var TelegramChannelController = class {
|
|
|
420004
420011
|
const stats = statSync(this.queueFile);
|
|
420005
420012
|
this.queueFileId = queueIdentity(stats);
|
|
420006
420013
|
const checkpoint = this.readQueueCheckpoint();
|
|
420007
|
-
|
|
420008
|
-
|
|
420009
|
-
|
|
420010
|
-
|
|
420011
|
-
|
|
420014
|
+
const activation = resolveTelegramQueueActivationOffset({
|
|
420015
|
+
queueFileId: this.queueFileId,
|
|
420016
|
+
queueSize: stats.size,
|
|
420017
|
+
checkpoint,
|
|
420018
|
+
baseline: this.queueClaimBaseline
|
|
420019
|
+
});
|
|
420020
|
+
this.offset = activation.offset;
|
|
420021
|
+
if (activation.reason !== "checkpoint") this.writeQueueCheckpoint(this.offset);
|
|
420012
420022
|
this.checkpointOffset = this.offset;
|
|
420013
420023
|
} catch {
|
|
420014
420024
|
this.offset = 0;
|
|
@@ -423257,7 +423267,7 @@ function goalTodoMaintenanceMode(agent) {
|
|
|
423257
423267
|
};
|
|
423258
423268
|
return progress.refreshRequired || progress.workCallsSinceRefresh >= GOAL_TODO_REFRESH_WORK_CALL_LIMIT ? "refresh" : null;
|
|
423259
423269
|
}
|
|
423260
|
-
function buildGoalTodoMaintenanceSystemPrompt(agent,
|
|
423270
|
+
function buildGoalTodoMaintenanceSystemPrompt(agent, mode) {
|
|
423261
423271
|
const todos = ideaTodos(agent);
|
|
423262
423272
|
const visibleTodoList = todos.length === 0 ? "The visible TodoList is empty." : ["Current visible TodoList:", ...todos.map((todo) => `- [${String(todo?.status ?? "pending")}] ${String(todo?.title ?? "").trim()}`)].join("\n");
|
|
423263
423273
|
const action = mode === "initial" ? "Create the visible task-specific TodoList now. Keep exactly one item in_progress and every later item pending." : "Update the visible TodoList now, before any more task work. Mark only evidenced steps done, keep the actual current step in_progress, and leave later steps pending. If the current title is stale, refine it to the concrete verified substep.";
|
|
@@ -423267,9 +423277,7 @@ ${action}
|
|
|
423267
423277
|
Call TodoList as the first and only tool. Do not call a work, search, file, shell, web, messaging, or goal tool in this step. Do not merely describe the update.
|
|
423268
423278
|
|
|
423269
423279
|
${visibleTodoList}
|
|
423270
|
-
</todo-maintenance
|
|
423271
|
-
|
|
423272
|
-
${basePrompt}`;
|
|
423280
|
+
</todo-maintenance>`;
|
|
423273
423281
|
}
|
|
423274
423282
|
function buildGoalTodoMaintenanceMessages(agent, mode) {
|
|
423275
423283
|
const goal = agent.goal.getActiveGoal();
|
|
@@ -509227,7 +509235,7 @@ var SessionEventHandler = class {
|
|
|
509227
509235
|
if (matchedCall !== void 0 && matchedCall.name === "TodoList" && !event.isError) {
|
|
509228
509236
|
const rawTodos = matchedCall.args.todos;
|
|
509229
509237
|
if (Array.isArray(rawTodos)) {
|
|
509230
|
-
const sanitized = rawTodos.filter((todo) => isTodoItemShape(todo)).map((t) => ({
|
|
509238
|
+
const sanitized = rawTodos.filter((todo) => isTodoItemShape(todo)).filter((todo) => todo.status !== "done").map((t) => ({
|
|
509231
509239
|
title: t.title,
|
|
509232
509240
|
status: t.status
|
|
509233
509241
|
}));
|