@perkos/perkos-a2a 0.12.57 → 0.12.59

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.js CHANGED
@@ -14235,15 +14235,12 @@ var require_json = __commonJS({
14235
14235
  var JSON_SYNTAX_REGEXP = /#+/g;
14236
14236
  function json(options) {
14237
14237
  var opts = options || {};
14238
- var limit = typeof opts.limit === "undefined" || opts.limit === null ? 102400 : bytes.parse(opts.limit);
14238
+ var limit = typeof opts.limit !== "number" ? bytes.parse(opts.limit || "100kb") : opts.limit;
14239
14239
  var inflate = opts.inflate !== false;
14240
14240
  var reviver = opts.reviver;
14241
14241
  var strict = opts.strict !== false;
14242
14242
  var type = opts.type || "application/json";
14243
14243
  var verify = opts.verify || false;
14244
- if (limit === null) {
14245
- throw new TypeError('option limit "' + String(opts.limit) + '" is invalid');
14246
- }
14247
14244
  if (verify !== false && typeof verify !== "function") {
14248
14245
  throw new TypeError("option verify must be function");
14249
14246
  }
@@ -14365,12 +14362,9 @@ var require_raw = __commonJS({
14365
14362
  function raw(options) {
14366
14363
  var opts = options || {};
14367
14364
  var inflate = opts.inflate !== false;
14368
- var limit = typeof opts.limit === "undefined" || opts.limit === null ? 102400 : bytes.parse(opts.limit);
14365
+ var limit = typeof opts.limit !== "number" ? bytes.parse(opts.limit || "100kb") : opts.limit;
14369
14366
  var type = opts.type || "application/octet-stream";
14370
14367
  var verify = opts.verify || false;
14371
- if (limit === null) {
14372
- throw new TypeError('option limit "' + String(opts.limit) + '" is invalid');
14373
- }
14374
14368
  if (verify !== false && typeof verify !== "function") {
14375
14369
  throw new TypeError("option verify must be function");
14376
14370
  }
@@ -14426,12 +14420,9 @@ var require_text = __commonJS({
14426
14420
  var opts = options || {};
14427
14421
  var defaultCharset = opts.defaultCharset || "utf-8";
14428
14422
  var inflate = opts.inflate !== false;
14429
- var limit = typeof opts.limit === "undefined" || opts.limit === null ? 102400 : bytes.parse(opts.limit);
14423
+ var limit = typeof opts.limit !== "number" ? bytes.parse(opts.limit || "100kb") : opts.limit;
14430
14424
  var type = opts.type || "text/plain";
14431
14425
  var verify = opts.verify || false;
14432
- if (limit === null) {
14433
- throw new TypeError('option limit "' + String(opts.limit) + '" is invalid');
14434
- }
14435
14426
  if (verify !== false && typeof verify !== "function") {
14436
14427
  throw new TypeError("option verify must be function");
14437
14428
  }
@@ -17037,12 +17028,9 @@ var require_urlencoded = __commonJS({
17037
17028
  }
17038
17029
  var extended = opts.extended !== false;
17039
17030
  var inflate = opts.inflate !== false;
17040
- var limit = typeof opts.limit === "undefined" || opts.limit === null ? 102400 : bytes.parse(opts.limit);
17031
+ var limit = typeof opts.limit !== "number" ? bytes.parse(opts.limit || "100kb") : opts.limit;
17041
17032
  var type = opts.type || "application/x-www-form-urlencoded";
17042
17033
  var verify = opts.verify || false;
17043
- if (limit === null) {
17044
- throw new TypeError('option limit "' + String(opts.limit) + '" is invalid');
17045
- }
17046
17034
  if (verify !== false && typeof verify !== "function") {
17047
17035
  throw new TypeError("option verify must be function");
17048
17036
  }
@@ -22644,6 +22632,218 @@ var require_constants = __commonJS({
22644
22632
  }
22645
22633
  });
22646
22634
 
22635
+ // ../../../../node_modules/node-gyp-build/node-gyp-build.js
22636
+ var require_node_gyp_build = __commonJS({
22637
+ "../../../../node_modules/node-gyp-build/node-gyp-build.js"(exports, module) {
22638
+ var fs = __require("fs");
22639
+ var path = __require("path");
22640
+ var os = __require("os");
22641
+ var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require;
22642
+ var vars = process.config && process.config.variables || {};
22643
+ var prebuildsOnly = !!process.env.PREBUILDS_ONLY;
22644
+ var abi = process.versions.modules;
22645
+ var runtime = isElectron() ? "electron" : isNwjs() ? "node-webkit" : "node";
22646
+ var arch = process.env.npm_config_arch || os.arch();
22647
+ var platform = process.env.npm_config_platform || os.platform();
22648
+ var libc = process.env.LIBC || (isAlpine(platform) ? "musl" : "glibc");
22649
+ var armv = process.env.ARM_VERSION || (arch === "arm64" ? "8" : vars.arm_version) || "";
22650
+ var uv = (process.versions.uv || "").split(".")[0];
22651
+ module.exports = load;
22652
+ function load(dir) {
22653
+ return runtimeRequire(load.resolve(dir));
22654
+ }
22655
+ load.resolve = load.path = function(dir) {
22656
+ dir = path.resolve(dir || ".");
22657
+ try {
22658
+ var name = runtimeRequire(path.join(dir, "package.json")).name.toUpperCase().replace(/-/g, "_");
22659
+ if (process.env[name + "_PREBUILD"]) dir = process.env[name + "_PREBUILD"];
22660
+ } catch (err) {
22661
+ }
22662
+ if (!prebuildsOnly) {
22663
+ var release = getFirst(path.join(dir, "build/Release"), matchBuild);
22664
+ if (release) return release;
22665
+ var debug = getFirst(path.join(dir, "build/Debug"), matchBuild);
22666
+ if (debug) return debug;
22667
+ }
22668
+ var prebuild = resolve4(dir);
22669
+ if (prebuild) return prebuild;
22670
+ var nearby = resolve4(path.dirname(process.execPath));
22671
+ if (nearby) return nearby;
22672
+ var target = [
22673
+ "platform=" + platform,
22674
+ "arch=" + arch,
22675
+ "runtime=" + runtime,
22676
+ "abi=" + abi,
22677
+ "uv=" + uv,
22678
+ armv ? "armv=" + armv : "",
22679
+ "libc=" + libc,
22680
+ "node=" + process.versions.node,
22681
+ process.versions.electron ? "electron=" + process.versions.electron : "",
22682
+ typeof __webpack_require__ === "function" ? "webpack=true" : ""
22683
+ // eslint-disable-line
22684
+ ].filter(Boolean).join(" ");
22685
+ throw new Error("No native build was found for " + target + "\n loaded from: " + dir + "\n");
22686
+ function resolve4(dir2) {
22687
+ var tuples = readdirSync(path.join(dir2, "prebuilds")).map(parseTuple);
22688
+ var tuple = tuples.filter(matchTuple(platform, arch)).sort(compareTuples)[0];
22689
+ if (!tuple) return;
22690
+ var prebuilds = path.join(dir2, "prebuilds", tuple.name);
22691
+ var parsed = readdirSync(prebuilds).map(parseTags);
22692
+ var candidates = parsed.filter(matchTags(runtime, abi));
22693
+ var winner = candidates.sort(compareTags(runtime))[0];
22694
+ if (winner) return path.join(prebuilds, winner.file);
22695
+ }
22696
+ };
22697
+ function readdirSync(dir) {
22698
+ try {
22699
+ return fs.readdirSync(dir);
22700
+ } catch (err) {
22701
+ return [];
22702
+ }
22703
+ }
22704
+ function getFirst(dir, filter) {
22705
+ var files = readdirSync(dir).filter(filter);
22706
+ return files[0] && path.join(dir, files[0]);
22707
+ }
22708
+ function matchBuild(name) {
22709
+ return /\.node$/.test(name);
22710
+ }
22711
+ function parseTuple(name) {
22712
+ var arr = name.split("-");
22713
+ if (arr.length !== 2) return;
22714
+ var platform2 = arr[0];
22715
+ var architectures = arr[1].split("+");
22716
+ if (!platform2) return;
22717
+ if (!architectures.length) return;
22718
+ if (!architectures.every(Boolean)) return;
22719
+ return { name, platform: platform2, architectures };
22720
+ }
22721
+ function matchTuple(platform2, arch2) {
22722
+ return function(tuple) {
22723
+ if (tuple == null) return false;
22724
+ if (tuple.platform !== platform2) return false;
22725
+ return tuple.architectures.includes(arch2);
22726
+ };
22727
+ }
22728
+ function compareTuples(a, b) {
22729
+ return a.architectures.length - b.architectures.length;
22730
+ }
22731
+ function parseTags(file) {
22732
+ var arr = file.split(".");
22733
+ var extension2 = arr.pop();
22734
+ var tags = { file, specificity: 0 };
22735
+ if (extension2 !== "node") return;
22736
+ for (var i = 0; i < arr.length; i++) {
22737
+ var tag = arr[i];
22738
+ if (tag === "node" || tag === "electron" || tag === "node-webkit") {
22739
+ tags.runtime = tag;
22740
+ } else if (tag === "napi") {
22741
+ tags.napi = true;
22742
+ } else if (tag.slice(0, 3) === "abi") {
22743
+ tags.abi = tag.slice(3);
22744
+ } else if (tag.slice(0, 2) === "uv") {
22745
+ tags.uv = tag.slice(2);
22746
+ } else if (tag.slice(0, 4) === "armv") {
22747
+ tags.armv = tag.slice(4);
22748
+ } else if (tag === "glibc" || tag === "musl") {
22749
+ tags.libc = tag;
22750
+ } else {
22751
+ continue;
22752
+ }
22753
+ tags.specificity++;
22754
+ }
22755
+ return tags;
22756
+ }
22757
+ function matchTags(runtime2, abi2) {
22758
+ return function(tags) {
22759
+ if (tags == null) return false;
22760
+ if (tags.runtime && tags.runtime !== runtime2 && !runtimeAgnostic(tags)) return false;
22761
+ if (tags.abi && tags.abi !== abi2 && !tags.napi) return false;
22762
+ if (tags.uv && tags.uv !== uv) return false;
22763
+ if (tags.armv && tags.armv !== armv) return false;
22764
+ if (tags.libc && tags.libc !== libc) return false;
22765
+ return true;
22766
+ };
22767
+ }
22768
+ function runtimeAgnostic(tags) {
22769
+ return tags.runtime === "node" && tags.napi;
22770
+ }
22771
+ function compareTags(runtime2) {
22772
+ return function(a, b) {
22773
+ if (a.runtime !== b.runtime) {
22774
+ return a.runtime === runtime2 ? -1 : 1;
22775
+ } else if (a.abi !== b.abi) {
22776
+ return a.abi ? -1 : 1;
22777
+ } else if (a.specificity !== b.specificity) {
22778
+ return a.specificity > b.specificity ? -1 : 1;
22779
+ } else {
22780
+ return 0;
22781
+ }
22782
+ };
22783
+ }
22784
+ function isNwjs() {
22785
+ return !!(process.versions && process.versions.nw);
22786
+ }
22787
+ function isElectron() {
22788
+ if (process.versions && process.versions.electron) return true;
22789
+ if (process.env.ELECTRON_RUN_AS_NODE) return true;
22790
+ return typeof window !== "undefined" && window.process && window.process.type === "renderer";
22791
+ }
22792
+ function isAlpine(platform2) {
22793
+ return platform2 === "linux" && fs.existsSync("/etc/alpine-release");
22794
+ }
22795
+ load.parseTags = parseTags;
22796
+ load.matchTags = matchTags;
22797
+ load.compareTags = compareTags;
22798
+ load.parseTuple = parseTuple;
22799
+ load.matchTuple = matchTuple;
22800
+ load.compareTuples = compareTuples;
22801
+ }
22802
+ });
22803
+
22804
+ // ../../../../node_modules/node-gyp-build/index.js
22805
+ var require_node_gyp_build2 = __commonJS({
22806
+ "../../../../node_modules/node-gyp-build/index.js"(exports, module) {
22807
+ var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require;
22808
+ if (typeof runtimeRequire.addon === "function") {
22809
+ module.exports = runtimeRequire.addon.bind(runtimeRequire);
22810
+ } else {
22811
+ module.exports = require_node_gyp_build();
22812
+ }
22813
+ }
22814
+ });
22815
+
22816
+ // ../../../../node_modules/bufferutil/fallback.js
22817
+ var require_fallback = __commonJS({
22818
+ "../../../../node_modules/bufferutil/fallback.js"(exports, module) {
22819
+ "use strict";
22820
+ var mask = (source, mask2, output, offset, length) => {
22821
+ for (var i = 0; i < length; i++) {
22822
+ output[offset + i] = source[i] ^ mask2[i & 3];
22823
+ }
22824
+ };
22825
+ var unmask = (buffer, mask2) => {
22826
+ const length = buffer.length;
22827
+ for (var i = 0; i < length; i++) {
22828
+ buffer[i] ^= mask2[i & 3];
22829
+ }
22830
+ };
22831
+ module.exports = { mask, unmask };
22832
+ }
22833
+ });
22834
+
22835
+ // ../../../../node_modules/bufferutil/index.js
22836
+ var require_bufferutil = __commonJS({
22837
+ "../../../../node_modules/bufferutil/index.js"(exports, module) {
22838
+ "use strict";
22839
+ try {
22840
+ module.exports = require_node_gyp_build2()(__dirname);
22841
+ } catch (e) {
22842
+ module.exports = require_fallback();
22843
+ }
22844
+ }
22845
+ });
22846
+
22647
22847
  // node_modules/ws/lib/buffer-util.js
22648
22848
  var require_buffer_util = __commonJS({
22649
22849
  "node_modules/ws/lib/buffer-util.js"(exports, module) {
@@ -22704,7 +22904,7 @@ var require_buffer_util = __commonJS({
22704
22904
  };
22705
22905
  if (!process.env.WS_NO_BUFFER_UTIL) {
22706
22906
  try {
22707
- const bufferUtil = __require("bufferutil");
22907
+ const bufferUtil = require_bufferutil();
22708
22908
  module.exports.mask = function(source, mask, output, offset, length) {
22709
22909
  if (length < 48) _mask(source, mask, output, offset, length);
22710
22910
  else bufferUtil.mask(source, mask, output, offset, length);
@@ -22898,7 +23098,7 @@ var require_permessage_deflate = __commonJS({
22898
23098
  acceptAsServer(offers) {
22899
23099
  const opts = this._options;
22900
23100
  const accepted = offers.find((params) => {
22901
- if (opts.serverNoContextTakeover === false && params.server_no_context_takeover || params.server_max_window_bits && (opts.serverMaxWindowBits === false || typeof opts.serverMaxWindowBits === "number" && opts.serverMaxWindowBits > params.server_max_window_bits) || typeof opts.clientMaxWindowBits === "number" && (typeof params.client_max_window_bits === "number" ? opts.clientMaxWindowBits > params.client_max_window_bits : !params.client_max_window_bits)) {
23101
+ if (opts.serverNoContextTakeover === false && params.server_no_context_takeover || params.server_max_window_bits && (opts.serverMaxWindowBits === false || typeof opts.serverMaxWindowBits === "number" && opts.serverMaxWindowBits > params.server_max_window_bits) || typeof opts.clientMaxWindowBits === "number" && !params.client_max_window_bits) {
22902
23102
  return false;
22903
23103
  }
22904
23104
  return true;
@@ -23152,6 +23352,55 @@ var require_permessage_deflate = __commonJS({
23152
23352
  }
23153
23353
  });
23154
23354
 
23355
+ // ../../../../node_modules/utf-8-validate/fallback.js
23356
+ var require_fallback2 = __commonJS({
23357
+ "../../../../node_modules/utf-8-validate/fallback.js"(exports, module) {
23358
+ "use strict";
23359
+ function isValidUTF8(buf) {
23360
+ const len = buf.length;
23361
+ let i = 0;
23362
+ while (i < len) {
23363
+ if ((buf[i] & 128) === 0) {
23364
+ i++;
23365
+ } else if ((buf[i] & 224) === 192) {
23366
+ if (i + 1 === len || (buf[i + 1] & 192) !== 128 || (buf[i] & 254) === 192) {
23367
+ return false;
23368
+ }
23369
+ i += 2;
23370
+ } else if ((buf[i] & 240) === 224) {
23371
+ if (i + 2 >= len || (buf[i + 1] & 192) !== 128 || (buf[i + 2] & 192) !== 128 || buf[i] === 224 && (buf[i + 1] & 224) === 128 || // overlong
23372
+ buf[i] === 237 && (buf[i + 1] & 224) === 160) {
23373
+ return false;
23374
+ }
23375
+ i += 3;
23376
+ } else if ((buf[i] & 248) === 240) {
23377
+ if (i + 3 >= len || (buf[i + 1] & 192) !== 128 || (buf[i + 2] & 192) !== 128 || (buf[i + 3] & 192) !== 128 || buf[i] === 240 && (buf[i + 1] & 240) === 128 || // overlong
23378
+ buf[i] === 244 && buf[i + 1] > 143 || buf[i] > 244) {
23379
+ return false;
23380
+ }
23381
+ i += 4;
23382
+ } else {
23383
+ return false;
23384
+ }
23385
+ }
23386
+ return true;
23387
+ }
23388
+ module.exports = isValidUTF8;
23389
+ }
23390
+ });
23391
+
23392
+ // ../../../../node_modules/utf-8-validate/index.js
23393
+ var require_utf_8_validate = __commonJS({
23394
+ "../../../../node_modules/utf-8-validate/index.js"(exports, module) {
23395
+ "use strict";
23396
+ try {
23397
+ module.exports = require_node_gyp_build2()(__dirname);
23398
+ } catch (e) {
23399
+ module.exports = require_fallback2();
23400
+ }
23401
+ }
23402
+ });
23403
+
23155
23404
  // node_modules/ws/lib/validation.js
23156
23405
  var require_validation = __commonJS({
23157
23406
  "node_modules/ws/lib/validation.js"(exports, module) {
@@ -23343,7 +23592,7 @@ var require_validation = __commonJS({
23343
23592
  };
23344
23593
  } else if (!process.env.WS_NO_UTF_8_VALIDATE) {
23345
23594
  try {
23346
- const isValidUTF8 = __require("utf-8-validate");
23595
+ const isValidUTF8 = require_utf_8_validate();
23347
23596
  module.exports.isValidUTF8 = function(buf) {
23348
23597
  return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8(buf);
23349
23598
  };
@@ -23388,10 +23637,6 @@ var require_receiver = __commonJS({
23388
23637
  * extensions
23389
23638
  * @param {Boolean} [options.isServer=false] Specifies whether to operate in
23390
23639
  * client or server mode
23391
- * @param {Number} [options.maxBufferedChunks=0] The maximum number of
23392
- * buffered data chunks
23393
- * @param {Number} [options.maxFragments=0] The maximum number of message
23394
- * fragments
23395
23640
  * @param {Number} [options.maxPayload=0] The maximum allowed message length
23396
23641
  * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
23397
23642
  * not to skip UTF-8 validation for text and close messages
@@ -23402,8 +23647,6 @@ var require_receiver = __commonJS({
23402
23647
  this._binaryType = options.binaryType || BINARY_TYPES[0];
23403
23648
  this._extensions = options.extensions || {};
23404
23649
  this._isServer = !!options.isServer;
23405
- this._maxBufferedChunks = options.maxBufferedChunks | 0;
23406
- this._maxFragments = options.maxFragments | 0;
23407
23650
  this._maxPayload = options.maxPayload | 0;
23408
23651
  this._skipUTF8Validation = !!options.skipUTF8Validation;
23409
23652
  this[kWebSocket] = void 0;
@@ -23418,7 +23661,6 @@ var require_receiver = __commonJS({
23418
23661
  this._opcode = 0;
23419
23662
  this._totalPayloadLength = 0;
23420
23663
  this._messageLength = 0;
23421
- this._numFragments = 0;
23422
23664
  this._fragments = [];
23423
23665
  this._errored = false;
23424
23666
  this._loop = false;
@@ -23434,18 +23676,6 @@ var require_receiver = __commonJS({
23434
23676
  */
23435
23677
  _write(chunk, encoding, cb) {
23436
23678
  if (this._opcode === 8 && this._state == GET_INFO) return cb();
23437
- if (this._maxBufferedChunks > 0 && this._buffers.length >= this._maxBufferedChunks) {
23438
- cb(
23439
- this.createError(
23440
- RangeError,
23441
- "Too many buffered chunks",
23442
- false,
23443
- 1008,
23444
- "WS_ERR_TOO_MANY_BUFFERED_PARTS"
23445
- )
23446
- );
23447
- return;
23448
- }
23449
23679
  this._bufferedBytes += chunk.length;
23450
23680
  this._buffers.push(chunk);
23451
23681
  this.startLoop(cb);
@@ -23769,17 +23999,6 @@ var require_receiver = __commonJS({
23769
23999
  this.controlMessage(data, cb);
23770
24000
  return;
23771
24001
  }
23772
- if (this._maxFragments > 0 && ++this._numFragments > this._maxFragments) {
23773
- const error = this.createError(
23774
- RangeError,
23775
- "Too many message fragments",
23776
- false,
23777
- 1008,
23778
- "WS_ERR_TOO_MANY_BUFFERED_PARTS"
23779
- );
23780
- cb(error);
23781
- return;
23782
- }
23783
24002
  if (this._compressed) {
23784
24003
  this._state = INFLATING;
23785
24004
  this.decompress(data, cb);
@@ -23837,7 +24056,6 @@ var require_receiver = __commonJS({
23837
24056
  this._totalPayloadLength = 0;
23838
24057
  this._messageLength = 0;
23839
24058
  this._fragmented = 0;
23840
- this._numFragments = 0;
23841
24059
  this._fragments = [];
23842
24060
  if (this._opcode === 2) {
23843
24061
  let data;
@@ -25022,10 +25240,6 @@ var require_websocket = __commonJS({
25022
25240
  * multiple times in the same tick
25023
25241
  * @param {Function} [options.generateMask] The function used to generate the
25024
25242
  * masking key
25025
- * @param {Number} [options.maxBufferedChunks=0] The maximum number of
25026
- * buffered data chunks
25027
- * @param {Number} [options.maxFragments=0] The maximum number of message
25028
- * fragments
25029
25243
  * @param {Number} [options.maxPayload=0] The maximum allowed message size
25030
25244
  * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
25031
25245
  * not to skip UTF-8 validation for text and close messages
@@ -25037,8 +25251,6 @@ var require_websocket = __commonJS({
25037
25251
  binaryType: this.binaryType,
25038
25252
  extensions: this._extensions,
25039
25253
  isServer: this._isServer,
25040
- maxBufferedChunks: options.maxBufferedChunks,
25041
- maxFragments: options.maxFragments,
25042
25254
  maxPayload: options.maxPayload,
25043
25255
  skipUTF8Validation: options.skipUTF8Validation
25044
25256
  });
@@ -25338,8 +25550,6 @@ var require_websocket = __commonJS({
25338
25550
  autoPong: true,
25339
25551
  closeTimeout: CLOSE_TIMEOUT,
25340
25552
  protocolVersion: protocolVersions[1],
25341
- maxBufferedChunks: 256 * 1024,
25342
- maxFragments: 16 * 1024,
25343
25553
  maxPayload: 100 * 1024 * 1024,
25344
25554
  skipUTF8Validation: false,
25345
25555
  perMessageDeflate: true,
@@ -25582,8 +25792,6 @@ var require_websocket = __commonJS({
25582
25792
  websocket.setSocket(socket, head, {
25583
25793
  allowSynchronousEvents: opts.allowSynchronousEvents,
25584
25794
  generateMask: opts.generateMask,
25585
- maxBufferedChunks: opts.maxBufferedChunks,
25586
- maxFragments: opts.maxFragments,
25587
25795
  maxPayload: opts.maxPayload,
25588
25796
  skipUTF8Validation: opts.skipUTF8Validation
25589
25797
  });
@@ -25926,10 +26134,6 @@ var require_websocket_server = __commonJS({
25926
26134
  * called
25927
26135
  * @param {Function} [options.handleProtocols] A hook to handle protocols
25928
26136
  * @param {String} [options.host] The hostname where to bind the server
25929
- * @param {Number} [options.maxBufferedChunks=262144] The maximum number of
25930
- * buffered data chunks
25931
- * @param {Number} [options.maxFragments=16384] The maximum number of message
25932
- * fragments
25933
26137
  * @param {Number} [options.maxPayload=104857600] The maximum allowed message
25934
26138
  * size
25935
26139
  * @param {Boolean} [options.noServer=false] Enable no server mode
@@ -25951,8 +26155,6 @@ var require_websocket_server = __commonJS({
25951
26155
  options = {
25952
26156
  allowSynchronousEvents: true,
25953
26157
  autoPong: true,
25954
- maxBufferedChunks: 256 * 1024,
25955
- maxFragments: 16 * 1024,
25956
26158
  maxPayload: 100 * 1024 * 1024,
25957
26159
  skipUTF8Validation: false,
25958
26160
  perMessageDeflate: false,
@@ -26232,8 +26434,6 @@ var require_websocket_server = __commonJS({
26232
26434
  socket.removeListener("error", socketOnError);
26233
26435
  ws.setSocket(socket, head, {
26234
26436
  allowSynchronousEvents: this.options.allowSynchronousEvents,
26235
- maxBufferedChunks: this.options.maxBufferedChunks,
26236
- maxFragments: this.options.maxFragments,
26237
26437
  maxPayload: this.options.maxPayload,
26238
26438
  skipUTF8Validation: this.options.skipUTF8Validation
26239
26439
  });
@@ -27782,6 +27982,22 @@ import { readFileSync as readFileSync5 } from "node:fs";
27782
27982
  import { dirname as dirname3, resolve as resolve3 } from "node:path";
27783
27983
  import { fileURLToPath as fileURLToPath2 } from "node:url";
27784
27984
 
27985
+ // src/task-context.ts
27986
+ function perkosTaskContext(task, trustedDispatcher = process.env.PERKOS_DISPATCHER_AGENT_NAME || "perkos-ci-probe-dispatcher") {
27987
+ const metadata = task.metadata;
27988
+ if (metadata?.fromAgent !== trustedDispatcher) return void 0;
27989
+ const raw = metadata.perkosBoard;
27990
+ if (!raw || typeof raw !== "object") return void 0;
27991
+ const value = raw;
27992
+ if (typeof value.wallet !== "string" || typeof value.convId !== "string") {
27993
+ return void 0;
27994
+ }
27995
+ const wallet = value.wallet.trim().toLowerCase();
27996
+ const convId = value.convId.trim();
27997
+ if (!/^0x[0-9a-f]{40}$/.test(wallet) || !convId) return void 0;
27998
+ return { wallet, convId };
27999
+ }
28000
+
27785
28001
  // src/agentic-actions.ts
27786
28002
  var FALLBACK_AGENT_ALIASES = [
27787
28003
  ["Perkos-Claw-Tester", ["perkos-claw-tester", "openclaw", "open claw", "claw"]],
@@ -29654,6 +29870,7 @@ function isWebhookEvent(msg) {
29654
29870
  }
29655
29871
 
29656
29872
  // src/index.ts
29873
+ var warnedBoardTaskUnsupported = false;
29657
29874
  function loadedPluginVersion() {
29658
29875
  try {
29659
29876
  const manifest = JSON.parse(readFileSync5(new URL("../openclaw.plugin.json", import.meta.url), "utf8"));
@@ -30158,6 +30375,12 @@ function register(api) {
30158
30375
  });
30159
30376
  return;
30160
30377
  }
30378
+ if (!warnedBoardTaskUnsupported && perkosTaskContext(task)) {
30379
+ warnedBoardTaskUnsupported = true;
30380
+ logger.error(
30381
+ '[perkos-a2a] This is a PerkOS BOARD task, and the in-runtime plugin cannot work a board. It will be answered with a synthesized reply and the task will never move. Run the standalone bridge (perkos-a2a-agent) for this agent instead, with A2A_TOOLS_JWT_SECRET, A2A_TOOLS_API_URL and PERKOS_OWNER_WALLET set, then disable this plugin so both do not answer the same task. See the README section "Which one do you need: plugin or standalone bridge?".'
30382
+ );
30383
+ }
30161
30384
  task.artifacts.push({
30162
30385
  kind: "artifact",
30163
30386
  artifactId: randomUUID7(),