blun-king-cli 9.1.637 → 9.1.639

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 CHANGED
@@ -1,3 +1,13 @@
1
+ ## 9.1.639
2
+
3
+ - Telegram entfernt jedes exakte Silent-Token aus ausgehenden Texten; leerer Rest wird unterdrückt.
4
+ - Strg+S erkennt fragmentierte Tastensequenzen mit eingeschobenen Terminalantworten.
5
+ - Ein ausdrücklich angeforderter Warteschlangen-Flush wird nach der Kompaktierung eines laufenden Turns fortgesetzt.
6
+
7
+ ## 9.1.638
8
+
9
+ - Die Größenwarnung der Anweisungsdatei erscheint in der Konsole nicht mehr
10
+
1
11
  ## 9.1.637 – Telegram-Stillemarker im Sendepfad
2
12
 
3
13
  - `reply` und `edit_message` sowie die direkten Konsolen- und Brückenfallbacks senden nichts, wenn der Text nach `trim()` ausschließlich `[[BLUN_TELEGRAM_SILENT]]` enthält; der Aufruf meldet `unterdrückt`.
package/blun.mjs CHANGED
@@ -379760,6 +379760,18 @@ function extractCompleteSequences(buffer) {
379760
379760
  let pos = 0;
379761
379761
  while (pos < buffer.length) {
379762
379762
  const remaining = buffer.slice(pos);
379763
+ // Keep an interrupted keyboard CSI while delivering an embedded terminal reply.
379764
+ const nestedEscape = remaining.indexOf(ESC$1, 2);
379765
+ if (nestedEscape > 1 && /^\x1b\[[0-9:;]*$/.test(remaining.slice(0, nestedEscape))) {
379766
+ const nested = remaining.slice(nestedEscape);
379767
+ const reply = nested.match(/^\x1b\[(?:8;\d+;\d+t|\?[\d;]*[cu])/);
379768
+ if (reply !== null) {
379769
+ sequences.push(reply[0]);
379770
+ buffer = buffer.slice(0, pos) + remaining.slice(0, nestedEscape) + nested.slice(reply[0].length);
379771
+ continue;
379772
+ }
379773
+ if (/^\x1b(?:\[(?:\?[\d;]*|8(?:;\d*){0,2})?)?$/.test(nested)) return { sequences, remainder: remaining };
379774
+ }
379763
379775
  if (remaining.startsWith(ESC$1)) {
379764
379776
  let seqEnd = 1;
379765
379777
  while (seqEnd <= remaining.length) {
@@ -379874,7 +379886,7 @@ var init_stdin_buffer = __esmMin((() => {
379874
379886
  if (this.buffer.length > 0) this.timeout = setTimeout(() => {
379875
379887
  const flushed = this.flush();
379876
379888
  for (const sequence of flushed) this.emitDataSequence(sequence);
379877
- }, this.timeoutMs);
379889
+ }, this.buffer.startsWith(`${ESC$1}[`) ? Math.max(this.timeoutMs, 100) : this.timeoutMs);
379878
379890
  }
379879
379891
  emitDataSequence(sequence) {
379880
379892
  const rawCodepoint = sequence.length === 1 ? sequence.codePointAt(0) : void 0;
@@ -536028,6 +536040,7 @@ var init_session_event_handler = __esmMin((() => {
536028
536040
  }));
536029
536041
  }
536030
536042
  handleSessionWarning(event) {
536043
+ if (event.code === "agents-md-oversized") return;
536031
536044
  this.host.showStatus(uiText("sessionEvent.warning", { message: event.message }), "warning");
536032
536045
  }
536033
536046
  renderMcpServerStatus(server) {
@@ -536294,7 +536307,7 @@ var init_session_event_handler = __esmMin((() => {
536294
536307
  });
536295
536308
  this.host.resetLivePane();
536296
536309
  this.host.requestQueueDrain();
536297
- } else this.host.setAppState({ isCompacting: false });
536310
+ } else { this.host.setAppState({ isCompacting: false }); this.host.steerQueueFlushPrefix(); }
536298
536311
  }
536299
536312
  handleBackgroundTaskEvent(event) {
536300
536313
  const { state } = this.host;
@@ -542715,7 +542728,10 @@ function isGroupSuppressed(text, _contextOnly) {
542715
542728
  return isGroupNoiseReply(text);
542716
542729
  }
542717
542730
  async function sendReplyFallback(chatId, text, contextOnly = false, requireDelivery = false, progress) {
542718
- if (typeof text === "string" && text.trim() === "[[BLUN_TELEGRAM_SILENT]]") return true;
542731
+ if (typeof text === "string") {
542732
+ text = text.split("[[BLUN_TELEGRAM_SILENT]]").join("");
542733
+ if (text.trim().length === 0) return true;
542734
+ }
542719
542735
  if (isGroupChat(chatId) && isGroupSuppressed(text, contextOnly)) {
542720
542736
  try {
542721
542737
  appendFileSync(outboxPath(), `${JSON.stringify({
@@ -544685,6 +544701,7 @@ var init_blun_tui = __esmMin((() => {
544685
544701
  const warnings = await session.getSessionWarnings();
544686
544702
  if (this.session !== session) return;
544687
544703
  for (const warning of warnings) {
544704
+ if (warning.code === "agents-md-oversized") continue;
544688
544705
  const severity = warning.severity === "error" ? "error" : "warning";
544689
544706
  this.showStatus(uiText("blunTui.warning", { warning: warning.message }), severity);
544690
544707
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blun-king-cli",
3
- "version": "9.1.637",
3
+ "version": "9.1.639",
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": {
@@ -68029,7 +68029,10 @@ function scrubSecrets(text) {
68029
68029
  * log it to outbox.jsonl as kind "reply-fallback". Returns true on success.
68030
68030
  */
68031
68031
  async function sendReplyFallback(chatId, rawText) {
68032
- if (typeof rawText === "string" && rawText.trim() === "[[BLUN_TELEGRAM_SILENT]]") return true;
68032
+ if (typeof rawText === "string") {
68033
+ rawText = rawText.split("[[BLUN_TELEGRAM_SILENT]]").join("");
68034
+ if (rawText.trim().length === 0) return true;
68035
+ }
68033
68036
  const token = botToken();
68034
68037
  if (token === void 0) return false;
68035
68038
  if (isGroupChat(chatId) && isGroupNoiseReply(rawText)) {
@@ -73600,7 +73600,10 @@ async function runTool(api, token, name, args) {
73600
73600
  case "download_attachment": return runDownload(api, token, args["file_id"]);
73601
73601
  case "edit_message": {
73602
73602
  const chatId = resolveAllowedChatId(args["chat_id"]);
73603
- if (typeof args["text"] === "string" && args["text"].trim() === "[[BLUN_TELEGRAM_SILENT]]") return "unterdrückt";
73603
+ if (typeof args["text"] === "string") {
73604
+ args = { ...args, text: args["text"].split("[[BLUN_TELEGRAM_SILENT]]").join("") };
73605
+ if (args["text"].trim().length === 0) return "unterdrückt";
73606
+ }
73604
73607
  assertTelegramLanguageReleased(args["text"], args["release_token"]);
73605
73608
  const parseMode = args["format"] === "markdownv2" ? "MarkdownV2" : void 0;
73606
73609
  const edited = await api.editMessageText(chatId, Number(args["message_id"]), args["text"], parseMode !== void 0 ? { parse_mode: parseMode } : void 0);
@@ -73649,8 +73652,8 @@ function isRecentDuplicate(chatId, text) {
73649
73652
  }
73650
73653
  async function runReply(api, args) {
73651
73654
  const chatId = resolveAllowedChatId(args["chat_id"]);
73652
- const text = args["text"];
73653
- if (typeof text === "string" && text.trim() === "[[BLUN_TELEGRAM_SILENT]]") return "unterdrückt";
73655
+ const text = typeof args["text"] === "string" ? args["text"].split("[[BLUN_TELEGRAM_SILENT]]").join("") : args["text"];
73656
+ if (typeof text === "string" && text.trim().length === 0) return "unterdrückt";
73654
73657
  const replyTo = args["reply_to"] !== null && args["reply_to"] !== void 0 ? Number(args["reply_to"]) : void 0;
73655
73658
  const files = args["files"] ?? [];
73656
73659
  const parseMode = args["format"] === "markdownv2" ? "MarkdownV2" : void 0;