@cxyhhhhh/openclaw-qqbot 2.0.0-dev.202607091957 → 2.0.0-dev.202607092101

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/dist/index.cjs CHANGED
@@ -31,9 +31,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
31
31
  ));
32
32
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
33
33
 
34
- // node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/constants.js
34
+ // node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/constants.js
35
35
  var require_constants = __commonJS({
36
- "node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/constants.js"(exports2, module2) {
36
+ "node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/constants.js"(exports2, module2) {
37
37
  "use strict";
38
38
  var BINARY_TYPES = ["nodebuffer", "arraybuffer", "fragments"];
39
39
  var hasBlob = typeof Blob !== "undefined";
@@ -54,9 +54,9 @@ var require_constants = __commonJS({
54
54
  }
55
55
  });
56
56
 
57
- // node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/buffer-util.js
57
+ // node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/buffer-util.js
58
58
  var require_buffer_util = __commonJS({
59
- "node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/buffer-util.js"(exports2, module2) {
59
+ "node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/buffer-util.js"(exports2, module2) {
60
60
  "use strict";
61
61
  var { EMPTY_BUFFER } = require_constants();
62
62
  var FastBuffer = Buffer[Symbol.species];
@@ -129,9 +129,9 @@ var require_buffer_util = __commonJS({
129
129
  }
130
130
  });
131
131
 
132
- // node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/limiter.js
132
+ // node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/limiter.js
133
133
  var require_limiter = __commonJS({
134
- "node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/limiter.js"(exports2, module2) {
134
+ "node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/limiter.js"(exports2, module2) {
135
135
  "use strict";
136
136
  var kDone = /* @__PURE__ */ Symbol("kDone");
137
137
  var kRun = /* @__PURE__ */ Symbol("kRun");
@@ -179,9 +179,9 @@ var require_limiter = __commonJS({
179
179
  }
180
180
  });
181
181
 
182
- // node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/permessage-deflate.js
182
+ // node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/permessage-deflate.js
183
183
  var require_permessage_deflate = __commonJS({
184
- "node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/permessage-deflate.js"(exports2, module2) {
184
+ "node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/permessage-deflate.js"(exports2, module2) {
185
185
  "use strict";
186
186
  var zlib = require("zlib");
187
187
  var bufferUtil = require_buffer_util();
@@ -562,9 +562,9 @@ var require_permessage_deflate = __commonJS({
562
562
  }
563
563
  });
564
564
 
565
- // node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/validation.js
565
+ // node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/validation.js
566
566
  var require_validation = __commonJS({
567
- "node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/validation.js"(exports2, module2) {
567
+ "node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/validation.js"(exports2, module2) {
568
568
  "use strict";
569
569
  var { isUtf8 } = require("buffer");
570
570
  var { hasBlob } = require_constants();
@@ -763,9 +763,9 @@ var require_validation = __commonJS({
763
763
  }
764
764
  });
765
765
 
766
- // node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/receiver.js
766
+ // node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/receiver.js
767
767
  var require_receiver = __commonJS({
768
- "node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/receiver.js"(exports2, module2) {
768
+ "node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/receiver.js"(exports2, module2) {
769
769
  "use strict";
770
770
  var { Writable } = require("stream");
771
771
  var PerMessageDeflate2 = require_permessage_deflate();
@@ -798,6 +798,10 @@ var require_receiver = __commonJS({
798
798
  * extensions
799
799
  * @param {Boolean} [options.isServer=false] Specifies whether to operate in
800
800
  * client or server mode
801
+ * @param {Number} [options.maxBufferedChunks=0] The maximum number of
802
+ * buffered data chunks
803
+ * @param {Number} [options.maxFragments=0] The maximum number of message
804
+ * fragments
801
805
  * @param {Number} [options.maxPayload=0] The maximum allowed message length
802
806
  * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
803
807
  * not to skip UTF-8 validation for text and close messages
@@ -808,6 +812,8 @@ var require_receiver = __commonJS({
808
812
  this._binaryType = options.binaryType || BINARY_TYPES[0];
809
813
  this._extensions = options.extensions || {};
810
814
  this._isServer = !!options.isServer;
815
+ this._maxBufferedChunks = options.maxBufferedChunks | 0;
816
+ this._maxFragments = options.maxFragments | 0;
811
817
  this._maxPayload = options.maxPayload | 0;
812
818
  this._skipUTF8Validation = !!options.skipUTF8Validation;
813
819
  this[kWebSocket] = void 0;
@@ -837,6 +843,18 @@ var require_receiver = __commonJS({
837
843
  */
838
844
  _write(chunk, encoding, cb) {
839
845
  if (this._opcode === 8 && this._state == GET_INFO) return cb();
846
+ if (this._maxBufferedChunks > 0 && this._buffers.length >= this._maxBufferedChunks) {
847
+ cb(
848
+ this.createError(
849
+ RangeError,
850
+ "Too many buffered chunks",
851
+ false,
852
+ 1008,
853
+ "WS_ERR_TOO_MANY_BUFFERED_PARTS"
854
+ )
855
+ );
856
+ return;
857
+ }
840
858
  this._bufferedBytes += chunk.length;
841
859
  this._buffers.push(chunk);
842
860
  this.startLoop(cb);
@@ -1166,6 +1184,17 @@ var require_receiver = __commonJS({
1166
1184
  return;
1167
1185
  }
1168
1186
  if (data.length) {
1187
+ if (this._maxFragments > 0 && this._fragments.length >= this._maxFragments) {
1188
+ const error = this.createError(
1189
+ RangeError,
1190
+ "Too many message fragments",
1191
+ false,
1192
+ 1008,
1193
+ "WS_ERR_TOO_MANY_BUFFERED_PARTS"
1194
+ );
1195
+ cb(error);
1196
+ return;
1197
+ }
1169
1198
  this._messageLength = this._totalPayloadLength;
1170
1199
  this._fragments.push(data);
1171
1200
  }
@@ -1195,6 +1224,17 @@ var require_receiver = __commonJS({
1195
1224
  cb(error);
1196
1225
  return;
1197
1226
  }
1227
+ if (this._maxFragments > 0 && this._fragments.length >= this._maxFragments) {
1228
+ const error = this.createError(
1229
+ RangeError,
1230
+ "Too many message fragments",
1231
+ false,
1232
+ 1008,
1233
+ "WS_ERR_TOO_MANY_BUFFERED_PARTS"
1234
+ );
1235
+ cb(error);
1236
+ return;
1237
+ }
1198
1238
  this._fragments.push(buf);
1199
1239
  }
1200
1240
  this.dataMessage(cb);
@@ -1355,9 +1395,9 @@ var require_receiver = __commonJS({
1355
1395
  }
1356
1396
  });
1357
1397
 
1358
- // node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/sender.js
1398
+ // node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/sender.js
1359
1399
  var require_sender = __commonJS({
1360
- "node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/sender.js"(exports2, module2) {
1400
+ "node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/sender.js"(exports2, module2) {
1361
1401
  "use strict";
1362
1402
  var { Duplex } = require("stream");
1363
1403
  var { randomFillSync } = require("crypto");
@@ -1848,9 +1888,9 @@ var require_sender = __commonJS({
1848
1888
  }
1849
1889
  });
1850
1890
 
1851
- // node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/event-target.js
1891
+ // node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/event-target.js
1852
1892
  var require_event_target = __commonJS({
1853
- "node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/event-target.js"(exports2, module2) {
1893
+ "node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/event-target.js"(exports2, module2) {
1854
1894
  "use strict";
1855
1895
  var { kForOnEventAttribute, kListener } = require_constants();
1856
1896
  var kCode = /* @__PURE__ */ Symbol("kCode");
@@ -2077,9 +2117,9 @@ var require_event_target = __commonJS({
2077
2117
  }
2078
2118
  });
2079
2119
 
2080
- // node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/extension.js
2120
+ // node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/extension.js
2081
2121
  var require_extension = __commonJS({
2082
- "node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/extension.js"(exports2, module2) {
2122
+ "node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/extension.js"(exports2, module2) {
2083
2123
  "use strict";
2084
2124
  var { tokenChars } = require_validation();
2085
2125
  function push(dest, name, elem) {
@@ -2230,9 +2270,9 @@ var require_extension = __commonJS({
2230
2270
  }
2231
2271
  });
2232
2272
 
2233
- // node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/websocket.js
2273
+ // node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket.js
2234
2274
  var require_websocket = __commonJS({
2235
- "node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/websocket.js"(exports2, module2) {
2275
+ "node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket.js"(exports2, module2) {
2236
2276
  "use strict";
2237
2277
  var EventEmitter = require("events");
2238
2278
  var https3 = require("https");
@@ -2401,6 +2441,10 @@ var require_websocket = __commonJS({
2401
2441
  * multiple times in the same tick
2402
2442
  * @param {Function} [options.generateMask] The function used to generate the
2403
2443
  * masking key
2444
+ * @param {Number} [options.maxBufferedChunks=0] The maximum number of
2445
+ * buffered data chunks
2446
+ * @param {Number} [options.maxFragments=0] The maximum number of message
2447
+ * fragments
2404
2448
  * @param {Number} [options.maxPayload=0] The maximum allowed message size
2405
2449
  * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
2406
2450
  * not to skip UTF-8 validation for text and close messages
@@ -2412,6 +2456,8 @@ var require_websocket = __commonJS({
2412
2456
  binaryType: this.binaryType,
2413
2457
  extensions: this._extensions,
2414
2458
  isServer: this._isServer,
2459
+ maxBufferedChunks: options.maxBufferedChunks,
2460
+ maxFragments: options.maxFragments,
2415
2461
  maxPayload: options.maxPayload,
2416
2462
  skipUTF8Validation: options.skipUTF8Validation
2417
2463
  });
@@ -2711,6 +2757,8 @@ var require_websocket = __commonJS({
2711
2757
  autoPong: true,
2712
2758
  closeTimeout: CLOSE_TIMEOUT,
2713
2759
  protocolVersion: protocolVersions[1],
2760
+ maxBufferedChunks: 1024 * 1024,
2761
+ maxFragments: 128 * 1024,
2714
2762
  maxPayload: 100 * 1024 * 1024,
2715
2763
  skipUTF8Validation: false,
2716
2764
  perMessageDeflate: true,
@@ -2953,6 +3001,8 @@ var require_websocket = __commonJS({
2953
3001
  websocket.setSocket(socket, head, {
2954
3002
  allowSynchronousEvents: opts.allowSynchronousEvents,
2955
3003
  generateMask: opts.generateMask,
3004
+ maxBufferedChunks: opts.maxBufferedChunks,
3005
+ maxFragments: opts.maxFragments,
2956
3006
  maxPayload: opts.maxPayload,
2957
3007
  skipUTF8Validation: opts.skipUTF8Validation
2958
3008
  });
@@ -3116,9 +3166,9 @@ var require_websocket = __commonJS({
3116
3166
  }
3117
3167
  });
3118
3168
 
3119
- // node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/stream.js
3169
+ // node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/stream.js
3120
3170
  var require_stream = __commonJS({
3121
- "node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/stream.js"(exports2, module2) {
3171
+ "node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/stream.js"(exports2, module2) {
3122
3172
  "use strict";
3123
3173
  var WebSocket2 = require_websocket();
3124
3174
  var { Duplex } = require("stream");
@@ -3214,9 +3264,9 @@ var require_stream = __commonJS({
3214
3264
  }
3215
3265
  });
3216
3266
 
3217
- // node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/subprotocol.js
3267
+ // node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/subprotocol.js
3218
3268
  var require_subprotocol = __commonJS({
3219
- "node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/subprotocol.js"(exports2, module2) {
3269
+ "node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/subprotocol.js"(exports2, module2) {
3220
3270
  "use strict";
3221
3271
  var { tokenChars } = require_validation();
3222
3272
  function parse(header) {
@@ -3259,9 +3309,9 @@ var require_subprotocol = __commonJS({
3259
3309
  }
3260
3310
  });
3261
3311
 
3262
- // node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/websocket-server.js
3312
+ // node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket-server.js
3263
3313
  var require_websocket_server = __commonJS({
3264
- "node_modules/.pnpm/ws@8.20.1/node_modules/ws/lib/websocket-server.js"(exports2, module2) {
3314
+ "node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket-server.js"(exports2, module2) {
3265
3315
  "use strict";
3266
3316
  var EventEmitter = require("events");
3267
3317
  var http2 = require("http");
@@ -3295,6 +3345,10 @@ var require_websocket_server = __commonJS({
3295
3345
  * called
3296
3346
  * @param {Function} [options.handleProtocols] A hook to handle protocols
3297
3347
  * @param {String} [options.host] The hostname where to bind the server
3348
+ * @param {Number} [options.maxBufferedChunks=1048576] The maximum number of
3349
+ * buffered data chunks
3350
+ * @param {Number} [options.maxFragments=131072] The maximum number of message
3351
+ * fragments
3298
3352
  * @param {Number} [options.maxPayload=104857600] The maximum allowed message
3299
3353
  * size
3300
3354
  * @param {Boolean} [options.noServer=false] Enable no server mode
@@ -3316,6 +3370,8 @@ var require_websocket_server = __commonJS({
3316
3370
  options = {
3317
3371
  allowSynchronousEvents: true,
3318
3372
  autoPong: true,
3373
+ maxBufferedChunks: 1024 * 1024,
3374
+ maxFragments: 128 * 1024,
3319
3375
  maxPayload: 100 * 1024 * 1024,
3320
3376
  skipUTF8Validation: false,
3321
3377
  perMessageDeflate: false,
@@ -3595,6 +3651,8 @@ var require_websocket_server = __commonJS({
3595
3651
  socket.removeListener("error", socketOnError);
3596
3652
  ws.setSocket(socket, head, {
3597
3653
  allowSynchronousEvents: this.options.allowSynchronousEvents,
3654
+ maxBufferedChunks: this.options.maxBufferedChunks,
3655
+ maxFragments: this.options.maxFragments,
3598
3656
  maxPayload: this.options.maxPayload,
3599
3657
  skipUTF8Validation: this.options.skipUTF8Validation
3600
3658
  });
@@ -5015,11 +5073,11 @@ var import_node_os = __toESM(require("os"), 1);
5015
5073
  // src/outbound/outbound-service.ts
5016
5074
  var path3 = __toESM(require("path"), 1);
5017
5075
 
5018
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/QQBot.js
5076
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/QQBot.js
5019
5077
  var fs3 = __toESM(require("fs"), 1);
5020
5078
  var path = __toESM(require("path"), 1);
5021
5079
 
5022
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/middleware/types.js
5080
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/middleware/types.js
5023
5081
  function resolvePolicy(ctx, path22, explicit, defaultValue) {
5024
5082
  if (explicit !== void 0 && explicit !== null) {
5025
5083
  return explicit;
@@ -5095,7 +5153,7 @@ function createMiddlewareContext(params) {
5095
5153
  return ctx;
5096
5154
  }
5097
5155
 
5098
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/types.js
5156
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/types.js
5099
5157
  var ApiError = class extends Error {
5100
5158
  httpStatus;
5101
5159
  path;
@@ -5128,7 +5186,7 @@ var StreamContentType = {
5128
5186
  MARKDOWN: "markdown"
5129
5187
  };
5130
5188
 
5131
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/utils/format.js
5189
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/utils/format.js
5132
5190
  function formatErrorMessage(err) {
5133
5191
  if (err instanceof Error) {
5134
5192
  let formatted = err.message || err.name || "Error";
@@ -5175,7 +5233,7 @@ function formatFileSize(bytes) {
5175
5233
  return `${(bytes / 1024 / 1024 / 1024).toFixed(2)} GB`;
5176
5234
  }
5177
5235
 
5178
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/api/api-client.js
5236
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/api/api-client.js
5179
5237
  var DEFAULT_BASE_URL = "https://api.sgroup.qq.com";
5180
5238
  var DEFAULT_TIMEOUT_MS = 3e4;
5181
5239
  var FILE_UPLOAD_TIMEOUT_MS = 12e4;
@@ -5270,12 +5328,12 @@ var ApiClient = class {
5270
5328
  }
5271
5329
  };
5272
5330
 
5273
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/api/media-chunked.js
5331
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/api/media-chunked.js
5274
5332
  var crypto = __toESM(require("crypto"), 1);
5275
5333
  var fs = __toESM(require("fs"), 1);
5276
5334
  var https = __toESM(require("https"), 1);
5277
5335
 
5278
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/api/retry.js
5336
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/api/retry.js
5279
5337
  async function withRetry(fn, policy, persistentPolicy, logger) {
5280
5338
  let lastError = null;
5281
5339
  for (let attempt = 0; attempt <= policy.maxRetries; attempt++) {
@@ -5367,7 +5425,7 @@ function buildPartFinishPersistentPolicy(retryTimeoutMs, retryableCodes = PART_F
5367
5425
  var PART_FINISH_RETRYABLE_CODES = /* @__PURE__ */ new Set([40093001]);
5368
5426
  var UPLOAD_PREPARE_FALLBACK_CODE = 40093002;
5369
5427
 
5370
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/api/routes.js
5428
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/api/routes.js
5371
5429
  function messagePath(scope, targetId) {
5372
5430
  return scope === "c2c" ? `/v2/users/${targetId}/messages` : `/v2/groups/${targetId}/messages`;
5373
5431
  }
@@ -5404,7 +5462,7 @@ function getNextMsgSeq(_msgId) {
5404
5462
  return (timePart ^ random) % 65536;
5405
5463
  }
5406
5464
 
5407
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/api/media-chunked.js
5465
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/api/media-chunked.js
5408
5466
  var UploadDailyLimitExceededError = class extends Error {
5409
5467
  filePath;
5410
5468
  fileSize;
@@ -5663,7 +5721,7 @@ function sleep2(ms) {
5663
5721
  return new Promise((resolve2) => setTimeout(resolve2, ms));
5664
5722
  }
5665
5723
 
5666
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/api/media.js
5724
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/api/media.js
5667
5725
  var fs2 = __toESM(require("fs"), 1);
5668
5726
  var MediaApi = class {
5669
5727
  client;
@@ -5744,7 +5802,7 @@ var MediaApi = class {
5744
5802
  }
5745
5803
  };
5746
5804
 
5747
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/api/messages.js
5805
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/api/messages.js
5748
5806
  var MessageApi = class {
5749
5807
  client;
5750
5808
  tokenManager;
@@ -5932,7 +5990,7 @@ var MessageApi = class {
5932
5990
  }
5933
5991
  };
5934
5992
 
5935
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/api/token.js
5993
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/api/token.js
5936
5994
  var DEFAULT_TOKEN_BASE_URL = "https://bots.qq.com";
5937
5995
  var TOKEN_PATH = "/app/getAppAccessToken";
5938
5996
  var TokenManager = class {
@@ -6108,7 +6166,7 @@ var TokenManager = class {
6108
6166
  }
6109
6167
  };
6110
6168
 
6111
- // node_modules/.pnpm/ws@8.20.1/node_modules/ws/wrapper.mjs
6169
+ // node_modules/.pnpm/ws@8.21.0/node_modules/ws/wrapper.mjs
6112
6170
  var import_stream = __toESM(require_stream(), 1);
6113
6171
  var import_extension = __toESM(require_extension(), 1);
6114
6172
  var import_permessage_deflate = __toESM(require_permessage_deflate(), 1);
@@ -6119,7 +6177,7 @@ var import_websocket = __toESM(require_websocket(), 1);
6119
6177
  var import_websocket_server = __toESM(require_websocket_server(), 1);
6120
6178
  var wrapper_default = import_websocket.default;
6121
6179
 
6122
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/gateway/codec.js
6180
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/gateway/codec.js
6123
6181
  function decodeGatewayMessageData(data) {
6124
6182
  if (typeof data === "string") {
6125
6183
  return data;
@@ -6146,7 +6204,7 @@ function readOptionalMessageSceneExt(event) {
6146
6204
  return scene?.ext;
6147
6205
  }
6148
6206
 
6149
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/gateway/constants.js
6207
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/gateway/constants.js
6150
6208
  var INTENTS = {
6151
6209
  GUILDS: 1 << 0,
6152
6210
  GUILD_MEMBERS: 1 << 1,
@@ -6219,7 +6277,7 @@ var GatewayEvent = {
6219
6277
  MESSAGE_REACTION_REMOVE: "MESSAGE_REACTION_REMOVE"
6220
6278
  };
6221
6279
 
6222
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/gateway/event-dispatcher.js
6280
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/gateway/event-dispatcher.js
6223
6281
  var REF_INDEX_KEY = "msg_idx";
6224
6282
  function parseRefIndices(ext, msgType, msgElements) {
6225
6283
  let refMsgIdx;
@@ -6360,7 +6418,7 @@ function dispatchEvent(eventType, data, _accountId, _log) {
6360
6418
  return { action: "raw", type: eventType, data };
6361
6419
  }
6362
6420
 
6363
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/gateway/reconnect.js
6421
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/gateway/reconnect.js
6364
6422
  var ReconnectState = class {
6365
6423
  accountId;
6366
6424
  log;
@@ -6471,7 +6529,7 @@ var ReconnectState = class {
6471
6529
  }
6472
6530
  };
6473
6531
 
6474
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/gateway/gateway-connection.js
6532
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/gateway/gateway-connection.js
6475
6533
  var GatewayConnection = class {
6476
6534
  isAborted = false;
6477
6535
  currentWs = null;
@@ -6729,7 +6787,7 @@ function previewPayload(data) {
6729
6787
  }
6730
6788
  }
6731
6789
 
6732
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/transport/webhook-verify.js
6790
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/transport/webhook-verify.js
6733
6791
  var crypto2 = __toESM(require("crypto"), 1);
6734
6792
  function deriveSeed(botSecret) {
6735
6793
  let seed = botSecret;
@@ -6781,7 +6839,7 @@ function signValidationResponse(params) {
6781
6839
  };
6782
6840
  }
6783
6841
 
6784
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/transport/webhook-server-node.js
6842
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/transport/webhook-server-node.js
6785
6843
  var http = __toESM(require("http"), 1);
6786
6844
  var NodeHttpWebhookServer = class {
6787
6845
  server = null;
@@ -6829,7 +6887,7 @@ var NodeHttpWebhookServer = class {
6829
6887
  }
6830
6888
  };
6831
6889
 
6832
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/transport/webhook.js
6890
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/transport/webhook.js
6833
6891
  var OP_DISPATCH = 0;
6834
6892
  var OP_HTTP_CALLBACK_ACK = 12;
6835
6893
  var OP_VALIDATION = 13;
@@ -6973,7 +7031,7 @@ function getHeader(headers, key) {
6973
7031
  return val;
6974
7032
  }
6975
7033
 
6976
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/utils/file-utils.js
7034
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/utils/file-utils.js
6977
7035
  var MAX_UPLOAD_SIZE = 20 * 1024 * 1024;
6978
7036
  var CHUNKED_UPLOAD_MAX_SIZE = 100 * 1024 * 1024;
6979
7037
  var LARGE_FILE_THRESHOLD = 5 * 1024 * 1024;
@@ -6991,7 +7049,7 @@ function sanitizeFileName(name) {
6991
7049
  return cleaned || "file";
6992
7050
  }
6993
7051
 
6994
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/utils/upload-cache.js
7052
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/utils/upload-cache.js
6995
7053
  var crypto3 = __toESM(require("crypto"), 1);
6996
7054
  var MAX_CACHE_SIZE = 500;
6997
7055
  function computeFileHash(data) {
@@ -7056,7 +7114,7 @@ var UploadCache = class {
7056
7114
  }
7057
7115
  };
7058
7116
 
7059
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/streaming.js
7117
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/streaming.js
7060
7118
  var DEFAULT_THROTTLE_MS = 500;
7061
7119
  var MIN_THROTTLE_MS = 300;
7062
7120
  var MAX_FLUSH_RETRIES = 3;
@@ -7224,7 +7282,7 @@ var StreamSession = class {
7224
7282
  }
7225
7283
  };
7226
7284
 
7227
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/QQBot.js
7285
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/QQBot.js
7228
7286
  var MsgType = {
7229
7287
  /** Plain text. */
7230
7288
  TEXT: 0,
@@ -7912,7 +7970,7 @@ var QQBot = class {
7912
7970
  }
7913
7971
  };
7914
7972
 
7915
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/middleware/message-filter.js
7973
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/middleware/message-filter.js
7916
7974
  function messageFilter(options = {}) {
7917
7975
  const skipSelfEcho = options.skipSelfEcho ?? true;
7918
7976
  const dedupOpts = options.dedup !== false ? { windowMs: 5e3, maxSize: 1e3, ...options.dedup ?? {} } : null;
@@ -7950,7 +8008,7 @@ function messageFilter(options = {}) {
7950
8008
  };
7951
8009
  }
7952
8010
 
7953
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/middleware/content-sanitizer.js
8011
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/middleware/content-sanitizer.js
7954
8012
  function contentSanitizer(options = {}) {
7955
8013
  const { stripBotMention = true, stripAllMentions = false, collapseWhitespace = false, parseFaceTags: parseFaceTags2 = false, transform } = options;
7956
8014
  return async (ctx, next) => {
@@ -8045,7 +8103,7 @@ function faceToEmoji(id) {
8045
8103
  return map[id];
8046
8104
  }
8047
8105
 
8048
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/middleware/rate-limiter.js
8106
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/middleware/rate-limiter.js
8049
8107
  var SlidingWindow = class {
8050
8108
  buckets = /* @__PURE__ */ new Map();
8051
8109
  max;
@@ -8099,11 +8157,11 @@ function rateLimiter(options = {}) {
8099
8157
  };
8100
8158
  }
8101
8159
 
8102
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/middleware/concurrency-guard.js
8160
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/middleware/concurrency-guard.js
8103
8161
  function concurrencyGuard(options = {}) {
8104
8162
  const strategy = options.strategy ?? "queue";
8105
8163
  const maxQueue = options.maxQueue ?? 3;
8106
- const { onDrop, onMerge, onDispatch } = options;
8164
+ const { onDrop, onMerge, onDispatch, urgentPredicate } = options;
8107
8165
  const locks = /* @__PURE__ */ new Map();
8108
8166
  function getState(key) {
8109
8167
  let s = locks.get(key);
@@ -8156,6 +8214,15 @@ function concurrencyGuard(options = {}) {
8156
8214
  state.mergeBuffer = [];
8157
8215
  state.mergeWaiters = [];
8158
8216
  }
8217
+ if (urgentPredicate?.(ctx)) {
8218
+ ctx.log.debug?.(`[concurrency:merge] urgent for ${key}`);
8219
+ for (const w2 of state.mergeWaiters)
8220
+ w2.resolve();
8221
+ state.mergeBuffer.length = 0;
8222
+ state.mergeWaiters.length = 0;
8223
+ await next();
8224
+ return;
8225
+ }
8159
8226
  if (state.mergeBuffer.length >= maxQueue) {
8160
8227
  ctx.log.debug?.(`[concurrency:merge] buffer full (${maxQueue}), drop for ${key}`);
8161
8228
  await onDrop?.(ctx);
@@ -8303,7 +8370,7 @@ function concurrencyGuard(options = {}) {
8303
8370
  return guard;
8304
8371
  }
8305
8372
 
8306
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/middleware/mention-gate.js
8373
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/middleware/mention-gate.js
8307
8374
  function detectMentionInContent(content, appId) {
8308
8375
  if (!content || !appId)
8309
8376
  return false;
@@ -8359,7 +8426,7 @@ function mentionGate(options = {}) {
8359
8426
  };
8360
8427
  }
8361
8428
 
8362
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/middleware/quote-ref.js
8429
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/middleware/quote-ref.js
8363
8430
  var MemoryRefIndexStore = class {
8364
8431
  map = /* @__PURE__ */ new Map();
8365
8432
  maxSize;
@@ -8477,7 +8544,7 @@ function buildText(content, attachments) {
8477
8544
  return parts.join("\n") || "[empty message]";
8478
8545
  }
8479
8546
 
8480
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/middleware/envelope-formatter.js
8547
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/middleware/envelope-formatter.js
8481
8548
  function envelopeFormatter(options = {}) {
8482
8549
  const { historyLimit = 5, includeQuote = true, includeSender = true, format } = options;
8483
8550
  return async (ctx, next) => {
@@ -8549,7 +8616,7 @@ ${parts.join("\n")}
8549
8616
  return sections.join("\n\n");
8550
8617
  }
8551
8618
 
8552
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/middleware/slash-command.js
8619
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/middleware/slash-command.js
8553
8620
  function slashCommand(options = {}) {
8554
8621
  const prefixes = options.prefixes ?? ["/"];
8555
8622
  const catchErrors = options.catchErrors ?? true;
@@ -8701,7 +8768,7 @@ async function sendCommandResult(ctx, result) {
8701
8768
  }
8702
8769
  }
8703
8770
 
8704
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/middleware/history-buffer.js
8771
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/middleware/history-buffer.js
8705
8772
  var MemoryHistoryStore = class {
8706
8773
  buffers = /* @__PURE__ */ new Map();
8707
8774
  append(groupKey, entry, limit) {
@@ -8766,7 +8833,7 @@ function historyBuffer(options = {}) {
8766
8833
  return m3;
8767
8834
  }
8768
8835
 
8769
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/middleware/typing-indicator.js
8836
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/middleware/typing-indicator.js
8770
8837
  var DEFAULT_DURATION_SEC = 60;
8771
8838
  var DEFAULT_KEEPALIVE_INTERVAL_MS = 5e4;
8772
8839
  function typingIndicator(options = {}) {
@@ -8803,7 +8870,7 @@ function typingIndicator(options = {}) {
8803
8870
  };
8804
8871
  }
8805
8872
 
8806
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/middleware/error-handler.js
8873
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/middleware/error-handler.js
8807
8874
  var DEFAULT_FORMAT = (err) => {
8808
8875
  if (err instanceof ApiError) {
8809
8876
  if (err.bizMessage)
@@ -8841,7 +8908,7 @@ function errorHandler(options = {}) {
8841
8908
  };
8842
8909
  }
8843
8910
 
8844
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/storage/kv-store.js
8911
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/storage/kv-store.js
8845
8912
  var import_node_fs = __toESM(require("fs"), 1);
8846
8913
  var import_node_path = __toESM(require("path"), 1);
8847
8914
  var FileKVStore = class {
@@ -8951,7 +9018,7 @@ var FileKVStore = class {
8951
9018
  }
8952
9019
  };
8953
9020
 
8954
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/storage/session-adapter.js
9021
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/storage/session-adapter.js
8955
9022
  function kvSessionPersistence(opts) {
8956
9023
  const prefix = opts.prefix ?? "qqbot:session:";
8957
9024
  const key = `${prefix}${opts.accountId}`;
@@ -9178,7 +9245,7 @@ var import_node_path2 = __toESM(require("path"), 1);
9178
9245
  var import_node_fs2 = __toESM(require("fs"), 1);
9179
9246
  var _cachedOpenclawVersion;
9180
9247
  function getPackageVersion() {
9181
- return true ? "2.0.0-dev.202607091957" : "unknown";
9248
+ return true ? "2.0.0-dev.202607092101" : "unknown";
9182
9249
  }
9183
9250
  function getOpenclawVersion(runtimeVersion) {
9184
9251
  if (_cachedOpenclawVersion) return _cachedOpenclawVersion;
@@ -11377,10 +11444,10 @@ function buildCommandList(account, opts) {
11377
11444
  // src/middleware/attachment.ts
11378
11445
  var path17 = __toESM(require("path"), 1);
11379
11446
 
11380
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/utils/reply-limiter.js
11447
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/utils/reply-limiter.js
11381
11448
  var DEFAULT_TTL_MS = 60 * 60 * 1e3;
11382
11449
 
11383
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/utils/media-tags.js
11450
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/utils/media-tags.js
11384
11451
  var VALID_TAGS = ["qqimg", "qqvoice", "qqvideo", "qqfile", "qqmedia"];
11385
11452
  var TAG_ALIASES = {
11386
11453
  qq_img: "qqimg",
@@ -11429,30 +11496,30 @@ var SELF_CLOSING_TAG_REGEX = new RegExp("`?" + LEFT_BRACKET + "\\s*(" + TAG_NAME
11429
11496
  var FUZZY_MEDIA_TAG_REGEX = new RegExp("`?" + LEFT_BRACKET + "\\s*(" + TAG_NAME_PATTERN + ")\\s*" + RIGHT_BRACKET + `["']?\\s*([^<\uFF1C<\uFF1E>"'\`]+?)\\s*["']?` + LEFT_BRACKET + "\\s*/?\\s*(?:" + TAG_NAME_PATTERN + ")\\s*" + RIGHT_BRACKET + "`?", "gi");
11430
11497
  var MULTILINE_TAG_CLEANUP = new RegExp("(" + LEFT_BRACKET + "\\s*(?:" + TAG_NAME_PATTERN + ")\\s*" + RIGHT_BRACKET + ")([\\s\\S]*?)(" + LEFT_BRACKET + "\\s*/?\\s*(?:" + TAG_NAME_PATTERN + ")\\s*" + RIGHT_BRACKET + ")", "gi");
11431
11498
 
11432
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/utils/ref-index-store.js
11499
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/utils/ref-index-store.js
11433
11500
  var import_node_fs6 = __toESM(require("fs"), 1);
11434
11501
  var DEFAULT_TTL_MS2 = 7 * 24 * 60 * 60 * 1e3;
11435
11502
 
11436
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/utils/session-store.js
11503
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/utils/session-store.js
11437
11504
  var import_node_fs7 = __toESM(require("fs"), 1);
11438
11505
  var import_node_path7 = __toESM(require("path"), 1);
11439
11506
  var DEFAULT_EXPIRE_MS = 5 * 60 * 1e3;
11440
11507
 
11441
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/utils/text-parsing.js
11508
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/utils/text-parsing.js
11442
11509
  var MAX_FACE_EXT_BYTES = 64 * 1024;
11443
11510
 
11444
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/utils/media-source.js
11511
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/utils/media-source.js
11445
11512
  var fs14 = __toESM(require("fs"), 1);
11446
11513
 
11447
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/utils/image-size.js
11514
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/utils/image-size.js
11448
11515
  var import_node_buffer = require("buffer");
11449
11516
 
11450
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/utils/ffmpeg.js
11517
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/utils/ffmpeg.js
11451
11518
  var import_node_child_process = require("child_process");
11452
11519
  var fs15 = __toESM(require("fs"), 1);
11453
11520
  var path13 = __toESM(require("path"), 1);
11454
11521
 
11455
- // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607081646/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/utils/audio.js
11522
+ // node_modules/.pnpm/@cxyhhhhh+qqbot-nodejs@1.0.2-dev.202607092059/node_modules/@cxyhhhhh/qqbot-nodejs/dist/protocol/utils/audio.js
11456
11523
  var import_node_child_process2 = require("child_process");
11457
11524
  var fs16 = __toESM(require("fs"), 1);
11458
11525
  var path14 = __toESM(require("path"), 1);
@@ -12281,6 +12348,10 @@ function setupMiddlewares(bot, account, opts) {
12281
12348
  bot.use(concurrencyGuard({
12282
12349
  strategy: "merge",
12283
12350
  maxQueue: 50,
12351
+ /** 紧急指令(/stop)跳过排队,立即处理 */
12352
+ urgentPredicate: (ctx) => {
12353
+ return (ctx.message.content ?? "").trim() === "/stop";
12354
+ },
12284
12355
  onMerge: (buffered) => {
12285
12356
  const last = buffered[buffered.length - 1];
12286
12357
  if (buffered.length === 1) return last;