blun-king-cli 9.1.580 → 9.1.582
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/bin/html-to-research-markdown.cjs +1 -0
- package/blun.mjs +25 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# 9.1.582 - 2026-09-08
|
|
2
|
+
|
|
3
|
+
- Stop oversized local page responses while reading their body, including responses without a reliable Content-Length header. Cancel the stream when received bytes exceed the existing ten MiB limit.
|
|
4
|
+
- Apply the limit to the delivered response stream after HTTP decompression and preserve UTF-8 characters split across chunks. Transport buffers and the crossing chunk may already exist; this is not an exact process-memory ceiling.
|
|
5
|
+
- Keep the research fixes from 9.1.581. Telegram delivery, incoming addressing and model timing logic are unchanged.
|
|
6
|
+
|
|
7
|
+
## 9.1.581
|
|
8
|
+
|
|
9
|
+
- Local HTML fetching now rejects extraction results that are empty after cleanup, instead of presenting a document title alone as page content.
|
|
10
|
+
- Short genuine content, visible headings, and plain-text or Markdown responses remain available. The existing extraction error path is preserved.
|
|
11
|
+
- Includes the 9.1.580 research fixes and earlier Telegram repairs unchanged. Model latency and incoming message addressing are unchanged.
|
|
12
|
+
|
|
1
13
|
## 9.1.580 - 2026-09-08
|
|
2
14
|
|
|
3
15
|
- Research collections reject impossible calendar dates and unparseable date-time
|
|
@@ -107,6 +107,7 @@ function renderRoot(root, title, safeBaseUrl) {
|
|
|
107
107
|
let markdown = createMarkdownService().turndown(root.innerHTML).trim();
|
|
108
108
|
if (markdown.length === 0) markdown = fallback;
|
|
109
109
|
markdown = markdown.replace(/\n{4,}/gu, '\n\n\n').trim();
|
|
110
|
+
if (markdown.length === 0) return '';
|
|
110
111
|
return withTitle(title, markdown);
|
|
111
112
|
}
|
|
112
113
|
|
package/blun.mjs
CHANGED
|
@@ -315127,9 +315127,32 @@ var init_local_fetch_url = __esmMin((() => {
|
|
|
315127
315127
|
const contentLengthRaw = response.headers.get("content-length");
|
|
315128
315128
|
if (contentLengthRaw !== null) {
|
|
315129
315129
|
const cl = Number(contentLengthRaw);
|
|
315130
|
-
if (Number.isFinite(cl) && cl > this.maxBytes)
|
|
315130
|
+
if (Number.isFinite(cl) && cl > this.maxBytes) {
|
|
315131
|
+
await response.body?.cancel().catch(() => {});
|
|
315132
|
+
throw new Error(`Response body too large: ${String(cl)} bytes exceeds maxBytes (${String(this.maxBytes)}).`);
|
|
315133
|
+
}
|
|
315134
|
+
}
|
|
315135
|
+
let body = "";
|
|
315136
|
+
if (response.body !== null) {
|
|
315137
|
+
const reader = response.body.getReader();
|
|
315138
|
+
const decoder = new TextDecoder();
|
|
315139
|
+
let receivedBytes = 0;
|
|
315140
|
+
try {
|
|
315141
|
+
while (true) {
|
|
315142
|
+
const { done, value } = await reader.read();
|
|
315143
|
+
if (done) break;
|
|
315144
|
+
receivedBytes += value.byteLength;
|
|
315145
|
+
if (receivedBytes > this.maxBytes) {
|
|
315146
|
+
await reader.cancel().catch(() => {});
|
|
315147
|
+
throw new Error(`Response body too large: ${String(receivedBytes)} bytes exceeds maxBytes (${String(this.maxBytes)}).`);
|
|
315148
|
+
}
|
|
315149
|
+
body += decoder.decode(value, { stream: true });
|
|
315150
|
+
}
|
|
315151
|
+
body += decoder.decode();
|
|
315152
|
+
} finally {
|
|
315153
|
+
reader.releaseLock();
|
|
315154
|
+
}
|
|
315131
315155
|
}
|
|
315132
|
-
const body = await response.text();
|
|
315133
315156
|
const actualBytes = Buffer.byteLength(body, "utf8");
|
|
315134
315157
|
if (actualBytes > this.maxBytes) throw new Error(`Response body too large: ${String(actualBytes)} bytes exceeds maxBytes (${String(this.maxBytes)}).`);
|
|
315135
315158
|
const contentType = (response.headers.get("content-type") ?? "").toLowerCase();
|