blun-king-cli 9.1.582 → 9.1.583

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/blun.mjs +18 -9
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 9.1.583 - 2026-09-08
2
+
3
+ - FetchURL now passes caller cancellation through the tool and both fetch providers to the HTTP request.
4
+ - An aborted managed fetch no longer starts a local fallback, and a late provider result cannot become source evidence after cancellation.
5
+ - Normal fetch failures still allow the existing fallback. No new timeout is introduced; Telegram routing and model requests are unchanged.
6
+
7
+
1
8
  # 9.1.582 - 2026-09-08
2
9
 
3
10
  - 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.
package/blun.mjs CHANGED
@@ -265663,9 +265663,11 @@ var init_fetch_url = __esmMin((() => {
265663
265663
  execute: (ctx) => this.execution(args, ctx)
265664
265664
  };
265665
265665
  }
265666
- async execution(args, { toolCallId }) {
265666
+ async execution(args, { toolCallId, signal }) {
265667
265667
  try {
265668
- const { content, kind } = await this.fetcher.fetch(args.url, { toolCallId });
265668
+ signal?.throwIfAborted();
265669
+ const { content, kind } = await this.fetcher.fetch(args.url, { toolCallId, signal });
265670
+ signal?.throwIfAborted();
265669
265671
  return formatResearchPage({ ...args, content, kind });
265670
265672
  } catch (error) {
265671
265673
  const msg = error instanceof Error ? error.message : String(error);
@@ -315114,11 +315116,13 @@ var init_local_fetch_url = __esmMin((() => {
315114
315116
  this.maxBytes = options.maxBytes ?? DEFAULT_MAX_BYTES;
315115
315117
  this.allowPrivateAddresses = options.allowPrivateAddresses ?? false;
315116
315118
  }
315117
- async fetch(url, _options) {
315119
+ async fetch(url, options) {
315120
+ options?.signal?.throwIfAborted();
315118
315121
  assertSafeFetchTarget(url, this.allowPrivateAddresses);
315119
315122
  const response = await this.fetchImpl(url, {
315120
315123
  method: "GET",
315121
- headers: { "User-Agent": this.userAgent }
315124
+ headers: { "User-Agent": this.userAgent },
315125
+ signal: options?.signal
315122
315126
  });
315123
315127
  if (response.status >= 400) {
315124
315128
  await response.body?.cancel().catch(() => {});
@@ -315195,18 +315199,21 @@ var init_blun_fetch_url = __esmMin((() => {
315195
315199
  this.fetchImpl = options.fetchImpl ?? globalThis.fetch.bind(globalThis);
315196
315200
  }
315197
315201
  async fetch(url, options) {
315202
+ const signal = options?.signal;
315203
+ signal?.throwIfAborted();
315198
315204
  try {
315199
315205
  return {
315200
- content: await this.fetchViaBlun(url, options?.toolCallId),
315206
+ content: await this.fetchViaBlun(url, options?.toolCallId, signal),
315201
315207
  kind: "extracted"
315202
315208
  };
315203
315209
  } catch {
315210
+ signal?.throwIfAborted();
315204
315211
  return this.localFallback.fetch(url, options ?? {});
315205
315212
  }
315206
315213
  }
315207
- async fetchViaBlun(url, toolCallId) {
315214
+ async fetchViaBlun(url, toolCallId, signal) {
315208
315215
  const bodyJson = JSON.stringify({ url });
315209
- const response = await this.post(bodyJson, toolCallId);
315216
+ const response = await this.post(bodyJson, toolCallId, signal);
315210
315217
  if (response.status !== 200) {
315211
315218
  let detail = "";
315212
315219
  try {
@@ -315216,8 +315223,9 @@ var init_blun_fetch_url = __esmMin((() => {
315216
315223
  }
315217
315224
  return response.text();
315218
315225
  }
315219
- async post(bodyJson, toolCallId) {
315226
+ async post(bodyJson, toolCallId, signal) {
315220
315227
  const accessToken = await this.resolveApiKey();
315228
+ signal?.throwIfAborted();
315221
315229
  return this.fetchImpl(this.baseUrl, {
315222
315230
  method: "POST",
315223
315231
  headers: {
@@ -315228,7 +315236,8 @@ var init_blun_fetch_url = __esmMin((() => {
315228
315236
  ...toolCallId !== void 0 && toolCallId.length > 0 ? { "X-Msh-Tool-Call-Id": toolCallId } : {},
315229
315237
  ...this.customHeaders
315230
315238
  },
315231
- body: bodyJson
315239
+ body: bodyJson,
315240
+ signal
315232
315241
  });
315233
315242
  }
315234
315243
  async resolveApiKey() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blun-king-cli",
3
- "version": "9.1.582",
3
+ "version": "9.1.583",
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": {