@lobehub/cli 0.0.58 → 0.0.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.
Files changed (3) hide show
  1. package/dist/index.js +1024 -747
  2. package/man/man1/lh.1 +1 -1
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -9,6 +9,7 @@ import path, { basename, delimiter, dirname, isAbsolute, join, normalize, posix,
9
9
  import * as childProcess from "node:child_process";
10
10
  import { ChildProcess, execFile, execFileSync, execSync, spawn, spawnSync } from "node:child_process";
11
11
  import _w, { cwd, execArgv, execPath, hrtime, platform as platform$1 } from "node:process";
12
+ import { URL as URL$1, fileURLToPath, pathToFileURL } from "node:url";
12
13
  import { finished, pipeline } from "node:stream/promises";
13
14
  import { Duplex, PassThrough, Readable, Transform, Writable, getDefaultHighWaterMark, pipeline as pipeline$1 } from "node:stream";
14
15
  import readline, { createInterface } from "node:readline";
@@ -23,7 +24,6 @@ import { createServer as createServer$1, request as request$1 } from "node:https
23
24
  import zlib, { zstdDecompress } from "node:zlib";
24
25
  import { Buffer as Buffer$1 } from "node:buffer";
25
26
  import { aborted, callbackify, debuglog, inspect, promisify, stripVTControlCharacters } from "node:util";
26
- import { URL as URL$1, fileURLToPath, pathToFileURL } from "node:url";
27
27
  import * as net$1 from "node:net";
28
28
  import net, { BlockList, connect, createServer as createServer$2, isIP } from "node:net";
29
29
  import { spawn as spawn$1 } from "child_process";
@@ -39,50 +39,50 @@ import { AsyncLocalStorage } from "node:async_hooks";
39
39
  import { Http2ServerRequest, constants as constants$2 } from "node:http2";
40
40
 
41
41
  //#region \0rolldown/runtime.js
42
- var __create$2 = Object.create;
43
- var __defProp$2 = Object.defineProperty;
44
- var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
45
- var __getOwnPropNames$2 = Object.getOwnPropertyNames;
46
- var __getProtoOf$2 = Object.getPrototypeOf;
47
- var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
42
+ var __create = Object.create;
43
+ var __defProp = Object.defineProperty;
44
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
45
+ var __getOwnPropNames = Object.getOwnPropertyNames;
46
+ var __getProtoOf = Object.getPrototypeOf;
47
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
48
48
  var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
49
49
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
50
50
  var __exportAll = (all, no_symbols) => {
51
51
  let target = {};
52
52
  for (var name in all) {
53
- __defProp$2(target, name, {
53
+ __defProp(target, name, {
54
54
  get: all[name],
55
55
  enumerable: true
56
56
  });
57
57
  }
58
58
  if (!no_symbols) {
59
- __defProp$2(target, Symbol.toStringTag, { value: "Module" });
59
+ __defProp(target, Symbol.toStringTag, { value: "Module" });
60
60
  }
61
61
  return target;
62
62
  };
63
- var __copyProps$2 = (to, from, except, desc) => {
63
+ var __copyProps = (to, from, except, desc) => {
64
64
  if (from && typeof from === "object" || typeof from === "function") {
65
- for (var keys = __getOwnPropNames$2(from), i = 0, n = keys.length, key; i < n; i++) {
65
+ for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
66
66
  key = keys[i];
67
- if (!__hasOwnProp$2.call(to, key) && key !== except) {
68
- __defProp$2(to, key, {
67
+ if (!__hasOwnProp.call(to, key) && key !== except) {
68
+ __defProp(to, key, {
69
69
  get: ((k) => from[k]).bind(null, key),
70
- enumerable: !(desc = __getOwnPropDesc$2(from, key)) || desc.enumerable
70
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
71
71
  });
72
72
  }
73
73
  }
74
74
  }
75
75
  return to;
76
76
  };
77
- var __toESM$2 = (mod, isNodeMode, target) => (target = mod != null ? __create$2(__getProtoOf$2(mod)) : {}, __copyProps$2(isNodeMode || !mod || !mod.__esModule ? __defProp$2(target, "default", {
77
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
78
78
  value: mod,
79
79
  enumerable: true
80
80
  }) : target, mod));
81
- var __toCommonJS = (mod) => __hasOwnProp$2.call(mod, "module.exports") ? mod["module.exports"] : __copyProps$2(__defProp$2({}, "__esModule", { value: true }), mod);
81
+ var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
82
82
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
83
83
 
84
84
  //#endregion
85
- //#region ../desktop/node_modules/.pnpm/tinyexec@1.3.0/node_modules/tinyexec/dist/main.mjs
85
+ //#region node_modules/.pnpm/tinyexec@1.3.1/node_modules/tinyexec/dist/main.mjs
86
86
  const isPathLikePattern = /^path$/i;
87
87
  const defaultEnvPathInfo = {
88
88
  key: "PATH",
@@ -103,7 +103,7 @@ function getPathFromEnv(env) {
103
103
  function addNodeBinToPath(cwd, path) {
104
104
  const parts = path.value.split(delimiter);
105
105
  const nodeBinPaths = [];
106
- let currentPath = cwd;
106
+ let currentPath = typeof cwd === "string" ? cwd : fileURLToPath(cwd, { windows: false });
107
107
  let lastPath;
108
108
  do {
109
109
  nodeBinPaths.push(resolve(currentPath, "node_modules", ".bin"));
@@ -373,12 +373,12 @@ var ExecProcess = class {
373
373
  _streamOut;
374
374
  _streamErr;
375
375
  spawn() {
376
- const cwd$1 = cwd();
377
376
  const options = this._options;
378
377
  const nodeOptions = {
379
378
  ...defaultNodeOptions,
380
379
  ...options.nodeOptions
381
380
  };
381
+ const cwd$1 = nodeOptions?.cwd ?? cwd();
382
382
  const signals = [];
383
383
  this._resetState();
384
384
  if (options.timeout !== void 0) signals.push(AbortSignal.timeout(options.timeout));
@@ -422,11 +422,11 @@ function xSync(command, args, options) {
422
422
  ...defaultSyncOptions,
423
423
  ...options
424
424
  };
425
- const cwd$2 = cwd();
426
425
  const nodeOptions = {
427
- windowsHide: true,
426
+ ...defaultNodeOptions,
428
427
  ...opts.nodeOptions
429
428
  };
429
+ const cwd$2 = nodeOptions?.cwd ?? cwd();
430
430
  if (opts.timeout !== void 0) nodeOptions.timeout = opts.timeout;
431
431
  nodeOptions.env = computeEnv(cwd$2, nodeOptions.env, opts.nodePath);
432
432
  const crossResult = normalizeSpawnCommand(command, args ?? [], nodeOptions);
@@ -820,7 +820,7 @@ function stopDaemon() {
820
820
  }
821
821
 
822
822
  //#endregion
823
- //#region ../desktop/node_modules/.pnpm/commander@13.1.0/node_modules/commander/lib/error.js
823
+ //#region node_modules/.pnpm/commander@13.1.0/node_modules/commander/lib/error.js
824
824
  var require_error$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
825
825
  /**
826
826
  * CommanderError class
@@ -860,7 +860,7 @@ var require_error$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
860
860
  }));
861
861
 
862
862
  //#endregion
863
- //#region ../desktop/node_modules/.pnpm/commander@13.1.0/node_modules/commander/lib/argument.js
863
+ //#region node_modules/.pnpm/commander@13.1.0/node_modules/commander/lib/argument.js
864
864
  var require_argument = /* @__PURE__ */ __commonJSMin(((exports) => {
865
865
  const { InvalidArgumentError } = require_error$1();
866
866
  var Argument = class {
@@ -985,7 +985,7 @@ var require_argument = /* @__PURE__ */ __commonJSMin(((exports) => {
985
985
  }));
986
986
 
987
987
  //#endregion
988
- //#region ../desktop/node_modules/.pnpm/commander@13.1.0/node_modules/commander/lib/help.js
988
+ //#region node_modules/.pnpm/commander@13.1.0/node_modules/commander/lib/help.js
989
989
  var require_help = /* @__PURE__ */ __commonJSMin(((exports) => {
990
990
  const { humanReadableArgName } = require_argument();
991
991
  /**
@@ -1447,7 +1447,7 @@ var require_help = /* @__PURE__ */ __commonJSMin(((exports) => {
1447
1447
  }));
1448
1448
 
1449
1449
  //#endregion
1450
- //#region ../desktop/node_modules/.pnpm/commander@13.1.0/node_modules/commander/lib/option.js
1450
+ //#region node_modules/.pnpm/commander@13.1.0/node_modules/commander/lib/option.js
1451
1451
  var require_option$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
1452
1452
  const { InvalidArgumentError } = require_error$1();
1453
1453
  var Option = class {
@@ -1739,7 +1739,7 @@ var require_option$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
1739
1739
  }));
1740
1740
 
1741
1741
  //#endregion
1742
- //#region ../desktop/node_modules/.pnpm/commander@13.1.0/node_modules/commander/lib/suggestSimilar.js
1742
+ //#region node_modules/.pnpm/commander@13.1.0/node_modules/commander/lib/suggestSimilar.js
1743
1743
  var require_suggestSimilar = /* @__PURE__ */ __commonJSMin(((exports) => {
1744
1744
  const maxDistance = 3;
1745
1745
  function editDistance(a, b) {
@@ -1795,7 +1795,7 @@ var require_suggestSimilar = /* @__PURE__ */ __commonJSMin(((exports) => {
1795
1795
  }));
1796
1796
 
1797
1797
  //#endregion
1798
- //#region ../desktop/node_modules/.pnpm/commander@13.1.0/node_modules/commander/lib/command.js
1798
+ //#region node_modules/.pnpm/commander@13.1.0/node_modules/commander/lib/command.js
1799
1799
  var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
1800
1800
  const EventEmitter$7 = __require("node:events").EventEmitter;
1801
1801
  const childProcess$2 = __require("node:child_process");
@@ -3696,7 +3696,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
3696
3696
  }));
3697
3697
 
3698
3698
  //#endregion
3699
- //#region ../desktop/node_modules/.pnpm/commander@13.1.0/node_modules/commander/index.js
3699
+ //#region node_modules/.pnpm/commander@13.1.0/node_modules/commander/index.js
3700
3700
  var require_commander = /* @__PURE__ */ __commonJSMin(((exports) => {
3701
3701
  const { Argument } = require_argument();
3702
3702
  const { Command } = require_command();
@@ -3720,8 +3720,8 @@ var require_commander = /* @__PURE__ */ __commonJSMin(((exports) => {
3720
3720
  }));
3721
3721
 
3722
3722
  //#endregion
3723
- //#region ../desktop/node_modules/.pnpm/commander@13.1.0/node_modules/commander/esm.mjs
3724
- var import_commander = /* @__PURE__ */ __toESM$2(require_commander(), 1);
3723
+ //#region node_modules/.pnpm/commander@13.1.0/node_modules/commander/esm.mjs
3724
+ var import_commander = /* @__PURE__ */ __toESM(require_commander(), 1);
3725
3725
  const { program, createCommand, createArgument, createOption, CommanderError, InvalidArgumentError, InvalidOptionArgumentError, Command, Argument, Option, Help } = import_commander.default;
3726
3726
 
3727
3727
  //#endregion
@@ -16003,7 +16003,7 @@ var init_zod$1 = __esmMin((() => {
16003
16003
 
16004
16004
  //#endregion
16005
16005
  //#region ../../packages/types/src/agent/graph.ts
16006
- var import_ajv = /* @__PURE__ */ __toESM$2(require_ajv(), 1);
16006
+ var import_ajv = /* @__PURE__ */ __toESM(require_ajv(), 1);
16007
16007
  init_zod$1();
16008
16008
  const AGENT_GRAPH_ROOT_NODE_ID = "__root__";
16009
16009
  const AgentGraphNodeSchema = discriminatedUnion("type", [object$2({
@@ -16248,7 +16248,7 @@ const AgentGraphSchema = object$2({
16248
16248
  });
16249
16249
 
16250
16250
  //#endregion
16251
- //#region ../desktop/node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
16251
+ //#region node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
16252
16252
  var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16253
16253
  let p = process || {}, argv = p.argv || [], env = p.env || {};
16254
16254
  let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
@@ -16317,105 +16317,7 @@ var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16317
16317
  }));
16318
16318
 
16319
16319
  //#endregion
16320
- //#region ../desktop/node_modules/.pnpm/@trpc+client@11.18.0_@trpc+server@11.18.0_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/objectSpread2-BvkFp-_Y.mjs
16321
- var import_picocolors = /* @__PURE__ */ __toESM$2(require_picocolors(), 1);
16322
- var __create$1 = Object.create;
16323
- var __defProp$1 = Object.defineProperty;
16324
- var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
16325
- var __getOwnPropNames$1 = Object.getOwnPropertyNames;
16326
- var __getProtoOf$1 = Object.getPrototypeOf;
16327
- var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
16328
- var __commonJS$1 = (cb, mod) => function() {
16329
- return mod || (0, cb[__getOwnPropNames$1(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
16330
- };
16331
- var __copyProps$1 = (to, from, except, desc) => {
16332
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames$1(from), i = 0, n = keys.length, key; i < n; i++) {
16333
- key = keys[i];
16334
- if (!__hasOwnProp$1.call(to, key) && key !== except) __defProp$1(to, key, {
16335
- get: ((k) => from[k]).bind(null, key),
16336
- enumerable: !(desc = __getOwnPropDesc$1(from, key)) || desc.enumerable
16337
- });
16338
- }
16339
- return to;
16340
- };
16341
- var __toESM$1 = (mod, isNodeMode, target) => (target = mod != null ? __create$1(__getProtoOf$1(mod)) : {}, __copyProps$1(isNodeMode || !mod || !mod.__esModule ? __defProp$1(target, "default", {
16342
- value: mod,
16343
- enumerable: true
16344
- }) : target, mod));
16345
- var require_typeof$1 = __commonJS$1({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(exports, module) {
16346
- function _typeof$2(o) {
16347
- "@babel/helpers - typeof";
16348
- return module.exports = _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o$1) {
16349
- return typeof o$1;
16350
- } : function(o$1) {
16351
- return o$1 && "function" == typeof Symbol && o$1.constructor === Symbol && o$1 !== Symbol.prototype ? "symbol" : typeof o$1;
16352
- }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof$2(o);
16353
- }
16354
- module.exports = _typeof$2, module.exports.__esModule = true, module.exports["default"] = module.exports;
16355
- } });
16356
- var require_toPrimitive$1 = __commonJS$1({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(exports, module) {
16357
- var _typeof$1 = require_typeof$1()["default"];
16358
- function toPrimitive$1(t, r) {
16359
- if ("object" != _typeof$1(t) || !t) return t;
16360
- var e = t[Symbol.toPrimitive];
16361
- if (void 0 !== e) {
16362
- var i = e.call(t, r || "default");
16363
- if ("object" != _typeof$1(i)) return i;
16364
- throw new TypeError("@@toPrimitive must return a primitive value.");
16365
- }
16366
- return ("string" === r ? String : Number)(t);
16367
- }
16368
- module.exports = toPrimitive$1, module.exports.__esModule = true, module.exports["default"] = module.exports;
16369
- } });
16370
- var require_toPropertyKey$1 = __commonJS$1({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(exports, module) {
16371
- var _typeof = require_typeof$1()["default"];
16372
- var toPrimitive = require_toPrimitive$1();
16373
- function toPropertyKey$1(t) {
16374
- var i = toPrimitive(t, "string");
16375
- return "symbol" == _typeof(i) ? i : i + "";
16376
- }
16377
- module.exports = toPropertyKey$1, module.exports.__esModule = true, module.exports["default"] = module.exports;
16378
- } });
16379
- var require_defineProperty$1 = __commonJS$1({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(exports, module) {
16380
- var toPropertyKey = require_toPropertyKey$1();
16381
- function _defineProperty(e, r, t) {
16382
- return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
16383
- value: t,
16384
- enumerable: !0,
16385
- configurable: !0,
16386
- writable: !0
16387
- }) : e[r] = t, e;
16388
- }
16389
- module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
16390
- } });
16391
- var require_objectSpread2$1 = __commonJS$1({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(exports, module) {
16392
- var defineProperty = require_defineProperty$1();
16393
- function ownKeys(e, r) {
16394
- var t = Object.keys(e);
16395
- if (Object.getOwnPropertySymbols) {
16396
- var o = Object.getOwnPropertySymbols(e);
16397
- r && (o = o.filter(function(r$1) {
16398
- return Object.getOwnPropertyDescriptor(e, r$1).enumerable;
16399
- })), t.push.apply(t, o);
16400
- }
16401
- return t;
16402
- }
16403
- function _objectSpread2(e) {
16404
- for (var r = 1; r < arguments.length; r++) {
16405
- var t = null != arguments[r] ? arguments[r] : {};
16406
- r % 2 ? ownKeys(Object(t), !0).forEach(function(r$1) {
16407
- defineProperty(e, r$1, t[r$1]);
16408
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r$1) {
16409
- Object.defineProperty(e, r$1, Object.getOwnPropertyDescriptor(t, r$1));
16410
- });
16411
- }
16412
- return e;
16413
- }
16414
- module.exports = _objectSpread2, module.exports.__esModule = true, module.exports["default"] = module.exports;
16415
- } });
16416
-
16417
- //#endregion
16418
- //#region ../desktop/node_modules/.pnpm/@trpc+server@11.18.0_typescript@6.0.3/node_modules/@trpc/server/dist/observable-UMO3vUa_.mjs
16320
+ //#region node_modules/.pnpm/@trpc+server@11.19.0_typescript@6.0.3/node_modules/@trpc/server/dist/observable-DwUFSuKv.mjs
16419
16321
  /** @public */
16420
16322
  function observable(subscribe) {
16421
16323
  const self = {
@@ -16468,7 +16370,7 @@ function pipeReducer(prev, fn) {
16468
16370
  return fn(prev);
16469
16371
  }
16470
16372
  /** @internal */
16471
- function observableToPromise(observable$1) {
16373
+ function observableToPromise(observable) {
16472
16374
  const ac = new AbortController();
16473
16375
  return new Promise((resolve, reject) => {
16474
16376
  let isDone = false;
@@ -16480,7 +16382,7 @@ function observableToPromise(observable$1) {
16480
16382
  ac.signal.addEventListener("abort", () => {
16481
16383
  reject(ac.signal.reason);
16482
16384
  });
16483
- const obs$ = observable$1.subscribe({
16385
+ const obs$ = observable.subscribe({
16484
16386
  next(data) {
16485
16387
  isDone = true;
16486
16388
  resolve(data);
@@ -16498,7 +16400,7 @@ function observableToPromise(observable$1) {
16498
16400
  }
16499
16401
 
16500
16402
  //#endregion
16501
- //#region ../desktop/node_modules/.pnpm/@trpc+server@11.18.0_typescript@6.0.3/node_modules/@trpc/server/dist/observable-CUiPknO-.mjs
16403
+ //#region node_modules/.pnpm/@trpc+server@11.19.0_typescript@6.0.3/node_modules/@trpc/server/dist/observable-CSprJVOf.mjs
16502
16404
  function share(_opts) {
16503
16405
  return (source) => {
16504
16406
  let refCount = 0;
@@ -16578,7 +16480,8 @@ function behaviorSubject(initialValue) {
16578
16480
  }
16579
16481
 
16580
16482
  //#endregion
16581
- //#region ../desktop/node_modules/.pnpm/@trpc+client@11.18.0_@trpc+server@11.18.0_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/splitLink-B7Cuf2c_.mjs
16483
+ //#region node_modules/.pnpm/@trpc+client@11.19.0_@trpc+server@11.19.0_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/splitLink-BZPioDdG.mjs
16484
+ var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
16582
16485
  /** @internal */
16583
16486
  function createChain(opts) {
16584
16487
  return observable((observer) => {
@@ -16597,7 +16500,61 @@ function createChain(opts) {
16597
16500
  }
16598
16501
 
16599
16502
  //#endregion
16600
- //#region ../desktop/node_modules/.pnpm/@trpc+server@11.18.0_typescript@6.0.3/node_modules/@trpc/server/dist/codes-DagpWZLc.mjs
16503
+ //#region node_modules/.pnpm/@trpc+client@11.19.0_@trpc+server@11.19.0_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/objectSpread2-weooBxVk.mjs
16504
+ function _typeof$1(o) {
16505
+ "@babel/helpers - typeof";
16506
+ return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
16507
+ return typeof o;
16508
+ } : function(o) {
16509
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
16510
+ }, _typeof$1(o);
16511
+ }
16512
+ function toPrimitive$1(t, r) {
16513
+ if ("object" != _typeof$1(t) || !t) return t;
16514
+ var e = t[Symbol.toPrimitive];
16515
+ if (void 0 !== e) {
16516
+ var i = e.call(t, r || "default");
16517
+ if ("object" != _typeof$1(i)) return i;
16518
+ throw new TypeError("@@toPrimitive must return a primitive value.");
16519
+ }
16520
+ return ("string" === r ? String : Number)(t);
16521
+ }
16522
+ function toPropertyKey$1(t) {
16523
+ var i = toPrimitive$1(t, "string");
16524
+ return "symbol" == _typeof$1(i) ? i : i + "";
16525
+ }
16526
+ function _defineProperty$1(e, r, t) {
16527
+ return (r = toPropertyKey$1(r)) in e ? Object.defineProperty(e, r, {
16528
+ value: t,
16529
+ enumerable: !0,
16530
+ configurable: !0,
16531
+ writable: !0
16532
+ }) : e[r] = t, e;
16533
+ }
16534
+ function ownKeys$1(e, r) {
16535
+ var t = Object.keys(e);
16536
+ if (Object.getOwnPropertySymbols) {
16537
+ var o = Object.getOwnPropertySymbols(e);
16538
+ r && (o = o.filter(function(r) {
16539
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
16540
+ })), t.push.apply(t, o);
16541
+ }
16542
+ return t;
16543
+ }
16544
+ function _objectSpread2$1(e) {
16545
+ for (var r = 1; r < arguments.length; r++) {
16546
+ var t = null != arguments[r] ? arguments[r] : {};
16547
+ r % 2 ? ownKeys$1(Object(t), !0).forEach(function(r) {
16548
+ _defineProperty$1(e, r, t[r]);
16549
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function(r) {
16550
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
16551
+ });
16552
+ }
16553
+ return e;
16554
+ }
16555
+
16556
+ //#endregion
16557
+ //#region node_modules/.pnpm/@trpc+server@11.19.0_typescript@6.0.3/node_modules/@trpc/server/dist/codes-D5Ya6_Bi.mjs
16601
16558
  /**
16602
16559
  * Check that value is object
16603
16560
  * @internal
@@ -16619,7 +16576,14 @@ function emptyObject() {
16619
16576
  * For tRPC we're copying the last digits of HTTP 4XX errors.
16620
16577
  */
16621
16578
  const TRPC_ERROR_CODES_BY_KEY = {
16579
+ /**
16580
+ * Invalid JSON was received by the server.
16581
+ * An error occurred on the server while parsing the JSON text.
16582
+ */
16622
16583
  PARSE_ERROR: -32700,
16584
+ /**
16585
+ * The JSON sent is not a valid Request object.
16586
+ */
16623
16587
  BAD_REQUEST: -32600,
16624
16588
  INTERNAL_SERVER_ERROR: -32603,
16625
16589
  NOT_IMPLEMENTED: -32603,
@@ -16653,30 +16617,7 @@ const retryableRpcCodes = [
16653
16617
  ];
16654
16618
 
16655
16619
  //#endregion
16656
- //#region ../desktop/node_modules/.pnpm/@trpc+server@11.18.0_typescript@6.0.3/node_modules/@trpc/server/dist/getErrorShape-BPSzUA7W.mjs
16657
- var __create = Object.create;
16658
- var __defProp = Object.defineProperty;
16659
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
16660
- var __getOwnPropNames = Object.getOwnPropertyNames;
16661
- var __getProtoOf = Object.getPrototypeOf;
16662
- var __hasOwnProp = Object.prototype.hasOwnProperty;
16663
- var __commonJS = (cb, mod) => function() {
16664
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
16665
- };
16666
- var __copyProps = (to, from, except, desc) => {
16667
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
16668
- key = keys[i];
16669
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16670
- get: ((k) => from[k]).bind(null, key),
16671
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16672
- });
16673
- }
16674
- return to;
16675
- };
16676
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
16677
- value: mod,
16678
- enumerable: true
16679
- }) : target, mod));
16620
+ //#region node_modules/.pnpm/@trpc+server@11.19.0_typescript@6.0.3/node_modules/@trpc/server/dist/getErrorShape-B0JBUs-i.mjs
16680
16621
  const noop$3 = () => {};
16681
16622
  const freezeIfAvailable = (obj) => {
16682
16623
  if (Object.freeze) Object.freeze(obj);
@@ -16686,7 +16627,7 @@ function createInnerProxy(callback, path, memo) {
16686
16627
  const cacheKey = path.join(".");
16687
16628
  (_memo$cacheKey = memo[cacheKey]) !== null && _memo$cacheKey !== void 0 || (memo[cacheKey] = new Proxy(noop$3, {
16688
16629
  get(_obj, key) {
16689
- if (typeof key !== "string" || key === "then") return void 0;
16630
+ if (typeof key !== "string" || key === "then") return;
16690
16631
  return createInnerProxy(callback, [...path, key], memo);
16691
16632
  },
16692
16633
  apply(_1, _2, args) {
@@ -16724,99 +16665,76 @@ const createRecursiveProxy = (callback) => createInnerProxy(callback, [], emptyO
16724
16665
  */
16725
16666
  const createFlatProxy = (callback) => {
16726
16667
  return new Proxy(noop$3, { get(_obj, name) {
16727
- if (name === "then") return void 0;
16668
+ if (name === "then") return;
16728
16669
  return callback(name);
16729
16670
  } });
16730
16671
  };
16731
- var require_typeof = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(exports, module) {
16732
- function _typeof$2(o) {
16733
- "@babel/helpers - typeof";
16734
- return module.exports = _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o$1) {
16735
- return typeof o$1;
16736
- } : function(o$1) {
16737
- return o$1 && "function" == typeof Symbol && o$1.constructor === Symbol && o$1 !== Symbol.prototype ? "symbol" : typeof o$1;
16738
- }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof$2(o);
16739
- }
16740
- module.exports = _typeof$2, module.exports.__esModule = true, module.exports["default"] = module.exports;
16741
- } });
16742
- var require_toPrimitive = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(exports, module) {
16743
- var _typeof$1 = require_typeof()["default"];
16744
- function toPrimitive$1(t, r) {
16745
- if ("object" != _typeof$1(t) || !t) return t;
16746
- var e = t[Symbol.toPrimitive];
16747
- if (void 0 !== e) {
16748
- var i = e.call(t, r || "default");
16749
- if ("object" != _typeof$1(i)) return i;
16750
- throw new TypeError("@@toPrimitive must return a primitive value.");
16751
- }
16752
- return ("string" === r ? String : Number)(t);
16753
- }
16754
- module.exports = toPrimitive$1, module.exports.__esModule = true, module.exports["default"] = module.exports;
16755
- } });
16756
- var require_toPropertyKey = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(exports, module) {
16757
- var _typeof = require_typeof()["default"];
16758
- var toPrimitive = require_toPrimitive();
16759
- function toPropertyKey$1(t) {
16760
- var i = toPrimitive(t, "string");
16761
- return "symbol" == _typeof(i) ? i : i + "";
16762
- }
16763
- module.exports = toPropertyKey$1, module.exports.__esModule = true, module.exports["default"] = module.exports;
16764
- } });
16765
- var require_defineProperty = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(exports, module) {
16766
- var toPropertyKey = require_toPropertyKey();
16767
- function _defineProperty(e, r, t) {
16768
- return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
16769
- value: t,
16770
- enumerable: !0,
16771
- configurable: !0,
16772
- writable: !0
16773
- }) : e[r] = t, e;
16774
- }
16775
- module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
16776
- } });
16777
- var require_objectSpread2 = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(exports, module) {
16778
- var defineProperty = require_defineProperty();
16779
- function ownKeys(e, r) {
16780
- var t = Object.keys(e);
16781
- if (Object.getOwnPropertySymbols) {
16782
- var o = Object.getOwnPropertySymbols(e);
16783
- r && (o = o.filter(function(r$1) {
16784
- return Object.getOwnPropertyDescriptor(e, r$1).enumerable;
16785
- })), t.push.apply(t, o);
16786
- }
16787
- return t;
16672
+ function _typeof(o) {
16673
+ "@babel/helpers - typeof";
16674
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
16675
+ return typeof o;
16676
+ } : function(o) {
16677
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
16678
+ }, _typeof(o);
16679
+ }
16680
+ function toPrimitive(t, r) {
16681
+ if ("object" != _typeof(t) || !t) return t;
16682
+ var e = t[Symbol.toPrimitive];
16683
+ if (void 0 !== e) {
16684
+ var i = e.call(t, r || "default");
16685
+ if ("object" != _typeof(i)) return i;
16686
+ throw new TypeError("@@toPrimitive must return a primitive value.");
16687
+ }
16688
+ return ("string" === r ? String : Number)(t);
16689
+ }
16690
+ function toPropertyKey(t) {
16691
+ var i = toPrimitive(t, "string");
16692
+ return "symbol" == _typeof(i) ? i : i + "";
16693
+ }
16694
+ function _defineProperty(e, r, t) {
16695
+ return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
16696
+ value: t,
16697
+ enumerable: !0,
16698
+ configurable: !0,
16699
+ writable: !0
16700
+ }) : e[r] = t, e;
16701
+ }
16702
+ function ownKeys(e, r) {
16703
+ var t = Object.keys(e);
16704
+ if (Object.getOwnPropertySymbols) {
16705
+ var o = Object.getOwnPropertySymbols(e);
16706
+ r && (o = o.filter(function(r) {
16707
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
16708
+ })), t.push.apply(t, o);
16788
16709
  }
16789
- function _objectSpread2(e) {
16790
- for (var r = 1; r < arguments.length; r++) {
16791
- var t = null != arguments[r] ? arguments[r] : {};
16792
- r % 2 ? ownKeys(Object(t), !0).forEach(function(r$1) {
16793
- defineProperty(e, r$1, t[r$1]);
16794
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r$1) {
16795
- Object.defineProperty(e, r$1, Object.getOwnPropertyDescriptor(t, r$1));
16796
- });
16797
- }
16798
- return e;
16710
+ return t;
16711
+ }
16712
+ function _objectSpread2(e) {
16713
+ for (var r = 1; r < arguments.length; r++) {
16714
+ var t = null != arguments[r] ? arguments[r] : {};
16715
+ r % 2 ? ownKeys(Object(t), !0).forEach(function(r) {
16716
+ _defineProperty(e, r, t[r]);
16717
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) {
16718
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
16719
+ });
16799
16720
  }
16800
- module.exports = _objectSpread2, module.exports.__esModule = true, module.exports["default"] = module.exports;
16801
- } });
16802
- var import_objectSpread2$11 = __toESM(require_objectSpread2(), 1);
16721
+ return e;
16722
+ }
16803
16723
 
16804
16724
  //#endregion
16805
- //#region ../desktop/node_modules/.pnpm/@trpc+server@11.18.0_typescript@6.0.3/node_modules/@trpc/server/dist/tracked-DWInO6EQ.mjs
16806
- var import_defineProperty$6 = __toESM(require_defineProperty(), 1);
16807
- var import_objectSpread2$1$11 = __toESM(require_objectSpread2(), 1);
16725
+ //#region node_modules/.pnpm/@trpc+server@11.19.0_typescript@6.0.3/node_modules/@trpc/server/dist/tracked-D4jU_Hb3.mjs
16808
16726
  /** @internal */
16809
16727
  function transformResultInner(response, transformer) {
16810
16728
  if ("error" in response) {
16811
16729
  const error = transformer.deserialize(response.error);
16812
16730
  return {
16813
16731
  ok: false,
16814
- error: (0, import_objectSpread2$1$11.default)((0, import_objectSpread2$1$11.default)({}, response), {}, { error })
16732
+ error: _objectSpread2(_objectSpread2({}, response), {}, { error })
16815
16733
  };
16816
16734
  }
16817
16735
  return {
16818
16736
  ok: true,
16819
- result: (0, import_objectSpread2$1$11.default)((0, import_objectSpread2$1$11.default)({}, response.result), (!response.result.type || response.result.type === "data") && {
16737
+ result: _objectSpread2(_objectSpread2({}, response.result), (!response.result.type || response.result.type === "data") && {
16820
16738
  type: "data",
16821
16739
  data: transformer.deserialize(response.result.data)
16822
16740
  })
@@ -16842,12 +16760,9 @@ function transformResult(response, transformer) {
16842
16760
  if (result.ok && !isObject$2(result.result)) throw new TransformResultError();
16843
16761
  return result;
16844
16762
  }
16845
- var import_objectSpread2$12 = __toESM(require_objectSpread2(), 1);
16846
16763
 
16847
16764
  //#endregion
16848
- //#region ../desktop/node_modules/.pnpm/@trpc+client@11.18.0_@trpc+server@11.18.0_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/TRPCClientError-apv8gw59.mjs
16849
- var import_defineProperty$5 = __toESM$1(require_defineProperty$1(), 1);
16850
- var import_objectSpread2$10 = __toESM$1(require_objectSpread2$1(), 1);
16765
+ //#region node_modules/.pnpm/@trpc+client@11.19.0_@trpc+server@11.19.0_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/TRPCClientError-CxFRO7Js.mjs
16851
16766
  function isTRPCClientError(cause) {
16852
16767
  return cause instanceof TRPCClientError;
16853
16768
  }
@@ -16864,10 +16779,10 @@ var TRPCClientError = class TRPCClientError extends Error {
16864
16779
  var _opts$result, _opts$result2;
16865
16780
  const cause = opts === null || opts === void 0 ? void 0 : opts.cause;
16866
16781
  super(message, { cause });
16867
- (0, import_defineProperty$5.default)(this, "cause", void 0);
16868
- (0, import_defineProperty$5.default)(this, "shape", void 0);
16869
- (0, import_defineProperty$5.default)(this, "data", void 0);
16870
- (0, import_defineProperty$5.default)(this, "meta", void 0);
16782
+ _defineProperty$1(this, "cause", void 0);
16783
+ _defineProperty$1(this, "shape", void 0);
16784
+ _defineProperty$1(this, "data", void 0);
16785
+ _defineProperty$1(this, "meta", void 0);
16871
16786
  this.meta = opts === null || opts === void 0 ? void 0 : opts.meta;
16872
16787
  this.cause = cause;
16873
16788
  this.shape = opts === null || opts === void 0 || (_opts$result = opts.result) === null || _opts$result === void 0 ? void 0 : _opts$result.error;
@@ -16878,19 +16793,19 @@ var TRPCClientError = class TRPCClientError extends Error {
16878
16793
  static from(_cause, opts = {}) {
16879
16794
  const cause = _cause;
16880
16795
  if (isTRPCClientError(cause)) {
16881
- if (opts.meta) cause.meta = (0, import_objectSpread2$10.default)((0, import_objectSpread2$10.default)({}, cause.meta), opts.meta);
16796
+ if (opts.meta) cause.meta = _objectSpread2$1(_objectSpread2$1({}, cause.meta), opts.meta);
16882
16797
  return cause;
16883
16798
  }
16884
- if (isTRPCErrorResponse(cause)) return new TRPCClientError(cause.error.message, (0, import_objectSpread2$10.default)((0, import_objectSpread2$10.default)({}, opts), {}, {
16799
+ if (isTRPCErrorResponse(cause)) return new TRPCClientError(cause.error.message, _objectSpread2$1(_objectSpread2$1({}, opts), {}, {
16885
16800
  result: cause,
16886
16801
  cause: opts.cause
16887
16802
  }));
16888
- return new TRPCClientError(getMessageFromUnknownError(cause, "Unknown error"), (0, import_objectSpread2$10.default)((0, import_objectSpread2$10.default)({}, opts), {}, { cause }));
16803
+ return new TRPCClientError(getMessageFromUnknownError(cause, "Unknown error"), _objectSpread2$1(_objectSpread2$1({}, opts), {}, { cause }));
16889
16804
  }
16890
16805
  };
16891
16806
 
16892
16807
  //#endregion
16893
- //#region ../desktop/node_modules/.pnpm/@trpc+client@11.18.0_@trpc+server@11.18.0_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/unstable-internals-Bg7n9BBj.mjs
16808
+ //#region node_modules/.pnpm/@trpc+client@11.19.0_@trpc+server@11.19.0_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/unstable-internals.mjs
16894
16809
  /**
16895
16810
  * @internal
16896
16811
  */
@@ -16917,15 +16832,26 @@ function getTransformer(transformer) {
16917
16832
  }
16918
16833
 
16919
16834
  //#endregion
16920
- //#region ../desktop/node_modules/.pnpm/@trpc+client@11.18.0_@trpc+server@11.18.0_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/httpUtils-BNq9QC3d.mjs
16835
+ //#region node_modules/.pnpm/@trpc+client@11.19.0_@trpc+server@11.19.0_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/httpUtils-CB_100ND.mjs
16921
16836
  const isFunction$1 = (fn) => typeof fn === "function";
16922
16837
  function getFetch(customFetchImpl) {
16923
16838
  if (customFetchImpl) return customFetchImpl;
16924
- if (typeof window !== "undefined" && isFunction$1(window.fetch)) return window.fetch;
16839
+ if (typeof window !== "undefined" && isFunction$1(window.fetch)) return window.fetch.bind(window);
16925
16840
  if (typeof globalThis !== "undefined" && isFunction$1(globalThis.fetch)) return globalThis.fetch;
16926
16841
  throw new Error("No fetch implementation found");
16927
16842
  }
16928
- var import_objectSpread2$9 = __toESM$1(require_objectSpread2$1());
16843
+ /**
16844
+ * Like `Promise.race` but for abort signals
16845
+ *
16846
+ * Basically, a ponyfill for
16847
+ * [`AbortSignal.any`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/any_static).
16848
+ */
16849
+ function raceAbortSignals(...signals) {
16850
+ const ac = new AbortController();
16851
+ for (const signal of signals) if (signal === null || signal === void 0 ? void 0 : signal.aborted) ac.abort();
16852
+ else signal === null || signal === void 0 || signal.addEventListener("abort", () => ac.abort(), { once: true });
16853
+ return ac.signal;
16854
+ }
16929
16855
  function resolveHTTPLinkOptions(opts) {
16930
16856
  return {
16931
16857
  url: opts.url.toString(),
@@ -16961,12 +16887,12 @@ const getUrl = (opts) => {
16961
16887
  return url;
16962
16888
  };
16963
16889
  const getBody = (opts) => {
16964
- if (opts.type === "query" && opts.methodOverride !== "POST") return void 0;
16890
+ if (opts.type === "query" && opts.methodOverride !== "POST") return;
16965
16891
  const input = getInput(opts);
16966
16892
  return input !== void 0 ? JSON.stringify(input) : void 0;
16967
16893
  };
16968
16894
  const jsonHttpRequester = (opts) => {
16969
- return httpRequest((0, import_objectSpread2$9.default)((0, import_objectSpread2$9.default)({}, opts), {}, {
16895
+ return httpRequest(_objectSpread2$1(_objectSpread2$1({}, opts), {}, {
16970
16896
  contentTypeHeader: "application/json",
16971
16897
  getUrl,
16972
16898
  getBody
@@ -17006,7 +16932,7 @@ async function fetchHTTPResponse(opts) {
17006
16932
  if (Symbol.iterator in heads) return Object.fromEntries(heads);
17007
16933
  return heads;
17008
16934
  })();
17009
- const headers = (0, import_objectSpread2$9.default)((0, import_objectSpread2$9.default)((0, import_objectSpread2$9.default)({}, opts.contentTypeHeader && method !== "GET" ? { "content-type": opts.contentTypeHeader } : {}), opts.trpcAcceptHeader ? { [(_opts$trpcAcceptHeade = opts.trpcAcceptHeaderKey) !== null && _opts$trpcAcceptHeade !== void 0 ? _opts$trpcAcceptHeade : "trpc-accept"]: opts.trpcAcceptHeader } : void 0), resolvedHeaders);
16935
+ const headers = _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, opts.contentTypeHeader && method !== "GET" ? { "content-type": opts.contentTypeHeader } : {}), opts.trpcAcceptHeader ? { [(_opts$trpcAcceptHeade = opts.trpcAcceptHeaderKey) !== null && _opts$trpcAcceptHeade !== void 0 ? _opts$trpcAcceptHeade : "trpc-accept"]: opts.trpcAcceptHeader } : void 0), resolvedHeaders);
17010
16936
  return getFetch(opts.fetch)(url, {
17011
16937
  method,
17012
16938
  signal: opts.signal,
@@ -17027,20 +16953,19 @@ async function httpRequest(opts) {
17027
16953
  }
17028
16954
 
17029
16955
  //#endregion
17030
- //#region ../desktop/node_modules/.pnpm/@trpc+client@11.18.0_@trpc+server@11.18.0_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/httpLink-oiU8eqFi.mjs
16956
+ //#region node_modules/.pnpm/@trpc+client@11.19.0_@trpc+server@11.19.0_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/httpLink-Tm93WWFA.mjs
17031
16957
  function isOctetType(input) {
17032
16958
  return input instanceof Uint8Array || input instanceof Blob;
17033
16959
  }
17034
16960
  function isFormData(input) {
17035
16961
  return input instanceof FormData;
17036
16962
  }
17037
- var import_objectSpread2$8 = __toESM$1(require_objectSpread2$1(), 1);
17038
16963
  const universalRequester = (opts) => {
17039
16964
  if ("input" in opts) {
17040
16965
  const { input } = opts;
17041
16966
  if (isFormData(input)) {
17042
16967
  if (opts.type !== "mutation" && opts.methodOverride !== "POST") throw new Error("FormData is only supported for mutations");
17043
- return httpRequest((0, import_objectSpread2$8.default)((0, import_objectSpread2$8.default)({}, opts), {}, {
16968
+ return httpRequest(_objectSpread2$1(_objectSpread2$1({}, opts), {}, {
17044
16969
  contentTypeHeader: void 0,
17045
16970
  getUrl,
17046
16971
  getBody: () => input
@@ -17048,7 +16973,7 @@ const universalRequester = (opts) => {
17048
16973
  }
17049
16974
  if (isOctetType(input)) {
17050
16975
  if (opts.type !== "mutation" && opts.methodOverride !== "POST") throw new Error("Octet type input is only supported for mutations");
17051
- return httpRequest((0, import_objectSpread2$8.default)((0, import_objectSpread2$8.default)({}, opts), {}, {
16976
+ return httpRequest(_objectSpread2$1(_objectSpread2$1({}, opts), {}, {
17052
16977
  contentTypeHeader: "application/octet-stream",
17053
16978
  getUrl,
17054
16979
  getBody: () => input
@@ -17069,19 +16994,22 @@ function httpLink(opts) {
17069
16994
  const { path, input, type } = op;
17070
16995
  /* istanbul ignore if -- @preserve */
17071
16996
  if (type === "subscription") throw new Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");
17072
- const request = universalRequester((0, import_objectSpread2$8.default)((0, import_objectSpread2$8.default)({}, resolvedOpts), {}, {
16997
+ const ac = new AbortController();
16998
+ const request = universalRequester(_objectSpread2$1(_objectSpread2$1({}, resolvedOpts), {}, {
17073
16999
  type,
17074
17000
  path,
17075
17001
  input,
17076
- signal: op.signal,
17002
+ signal: raceAbortSignals(op.signal, ac.signal),
17077
17003
  headers() {
17078
17004
  if (!opts.headers) return {};
17079
17005
  if (typeof opts.headers === "function") return opts.headers({ op });
17080
17006
  return opts.headers;
17081
17007
  }
17082
17008
  }));
17009
+ let isDone = false;
17083
17010
  let meta = void 0;
17084
17011
  request.then((res) => {
17012
+ isDone = true;
17085
17013
  meta = res.meta;
17086
17014
  const transformed = transformResult(res.json, resolvedOpts.transformer.output);
17087
17015
  if (!transformed.ok) {
@@ -17094,24 +17022,19 @@ function httpLink(opts) {
17094
17022
  });
17095
17023
  observer.complete();
17096
17024
  }).catch((cause) => {
17025
+ isDone = true;
17097
17026
  observer.error(TRPCClientError.from(cause, { meta }));
17098
17027
  });
17099
- return () => {};
17028
+ return () => {
17029
+ if (!isDone) ac.abort();
17030
+ };
17100
17031
  });
17101
17032
  };
17102
17033
  };
17103
17034
  }
17104
17035
 
17105
17036
  //#endregion
17106
- //#region ../desktop/node_modules/.pnpm/@trpc+client@11.18.0_@trpc+server@11.18.0_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/httpBatchLink-CaWjh1oW.mjs
17107
- var import_objectSpread2$7 = __toESM$1(require_objectSpread2$1(), 1);
17108
-
17109
- //#endregion
17110
- //#region ../desktop/node_modules/.pnpm/@trpc+client@11.18.0_@trpc+server@11.18.0_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/loggerLink-ineCN1PO.mjs
17111
- var import_objectSpread2$6 = __toESM$1(require_objectSpread2$1(), 1);
17112
-
17113
- //#endregion
17114
- //#region ../desktop/node_modules/.pnpm/@trpc+client@11.18.0_@trpc+server@11.18.0_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/wsLink-DSf4KOdW.mjs
17037
+ //#region node_modules/.pnpm/@trpc+client@11.19.0_@trpc+server@11.19.0_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/wsLink-Bm5LKL6z.mjs
17115
17038
  /**
17116
17039
  * Get the result of a value or function that returns a value
17117
17040
  * It also optionally accepts typesafe arguments for the function
@@ -17119,7 +17042,6 @@ var import_objectSpread2$6 = __toESM$1(require_objectSpread2$1(), 1);
17119
17042
  const resultOf = (value, ...args) => {
17120
17043
  return typeof value === "function" ? value(...args) : value;
17121
17044
  };
17122
- var import_defineProperty$3 = __toESM$1(require_defineProperty$1(), 1);
17123
17045
  function withResolvers() {
17124
17046
  let resolve;
17125
17047
  let reject;
@@ -17149,8 +17071,6 @@ async function buildConnectionMessage(connectionParams, encoder) {
17149
17071
  };
17150
17072
  return encoder.encode(message);
17151
17073
  }
17152
- var import_defineProperty$2 = __toESM$1(require_defineProperty$1(), 1);
17153
- var import_defineProperty$1 = __toESM$1(require_defineProperty$1(), 1);
17154
17074
  /**
17155
17075
  * Opens a WebSocket connection asynchronously and returns a promise
17156
17076
  * that resolves when the connection is successfully established.
@@ -17214,13 +17134,13 @@ function setupPingInterval(ws, { intervalMs, pongTimeoutMs }) {
17214
17134
  var WsConnection = class WsConnection {
17215
17135
  constructor(opts) {
17216
17136
  var _opts$WebSocketPonyfi;
17217
- (0, import_defineProperty$1.default)(this, "id", ++WsConnection.connectCount);
17218
- (0, import_defineProperty$1.default)(this, "WebSocketPonyfill", void 0);
17219
- (0, import_defineProperty$1.default)(this, "urlOptions", void 0);
17220
- (0, import_defineProperty$1.default)(this, "keepAliveOpts", void 0);
17221
- (0, import_defineProperty$1.default)(this, "encoder", void 0);
17222
- (0, import_defineProperty$1.default)(this, "wsObservable", behaviorSubject(null));
17223
- (0, import_defineProperty$1.default)(this, "openPromise", null);
17137
+ _defineProperty$1(this, "id", ++WsConnection.connectCount);
17138
+ _defineProperty$1(this, "WebSocketPonyfill", void 0);
17139
+ _defineProperty$1(this, "urlOptions", void 0);
17140
+ _defineProperty$1(this, "keepAliveOpts", void 0);
17141
+ _defineProperty$1(this, "encoder", void 0);
17142
+ _defineProperty$1(this, "wsObservable", behaviorSubject(null));
17143
+ _defineProperty$1(this, "openPromise", null);
17224
17144
  this.WebSocketPonyfill = (_opts$WebSocketPonyfi = opts.WebSocketPonyfill) !== null && _opts$WebSocketPonyfi !== void 0 ? _opts$WebSocketPonyfi : WebSocket;
17225
17145
  if (!this.WebSocketPonyfill) throw new Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");
17226
17146
  this.urlOptions = opts.urlOptions;
@@ -17246,26 +17166,26 @@ var WsConnection = class WsConnection {
17246
17166
  return !!this.ws && (this.ws.readyState === this.WebSocketPonyfill.CLOSING || this.ws.readyState === this.WebSocketPonyfill.CLOSED);
17247
17167
  }
17248
17168
  async open() {
17249
- var _this = this;
17250
- if (_this.openPromise) return _this.openPromise;
17251
- _this.id = ++WsConnection.connectCount;
17252
- _this.openPromise = prepareUrl(_this.urlOptions).then((url) => new _this.WebSocketPonyfill(url)).then(async (ws) => {
17253
- _this.ws = ws;
17169
+ if (this.openPromise) return this.openPromise;
17170
+ this.id = ++WsConnection.connectCount;
17171
+ const wsPromise = prepareUrl(this.urlOptions).then((url) => new this.WebSocketPonyfill(url));
17172
+ this.openPromise = wsPromise.then(async (ws) => {
17173
+ this.ws = ws;
17254
17174
  ws.binaryType = "arraybuffer";
17255
17175
  ws.addEventListener("message", function({ data }) {
17256
17176
  if (data === "PING") this.send("PONG");
17257
17177
  });
17258
- if (_this.keepAliveOpts.enabled) setupPingInterval(ws, _this.keepAliveOpts);
17178
+ if (this.keepAliveOpts.enabled) setupPingInterval(ws, this.keepAliveOpts);
17259
17179
  ws.addEventListener("close", () => {
17260
- if (_this.ws === ws) _this.ws = null;
17180
+ if (this.ws === ws) this.ws = null;
17261
17181
  });
17262
17182
  await asyncWsOpen(ws);
17263
- if (_this.urlOptions.connectionParams) ws.send(await buildConnectionMessage(_this.urlOptions.connectionParams, _this.encoder));
17183
+ if (this.urlOptions.connectionParams) ws.send(await buildConnectionMessage(this.urlOptions.connectionParams, this.encoder));
17264
17184
  });
17265
17185
  try {
17266
- await _this.openPromise;
17186
+ await this.openPromise;
17267
17187
  } finally {
17268
- _this.openPromise = null;
17188
+ this.openPromise = null;
17269
17189
  }
17270
17190
  }
17271
17191
  /**
@@ -17273,28 +17193,23 @@ var WsConnection = class WsConnection {
17273
17193
  * Waits for any ongoing open operation to complete before closing.
17274
17194
  */
17275
17195
  async close() {
17276
- var _this2 = this;
17277
17196
  try {
17278
- await _this2.openPromise;
17197
+ await this.openPromise;
17279
17198
  } finally {
17280
17199
  var _this$ws;
17281
- (_this$ws = _this2.ws) === null || _this$ws === void 0 || _this$ws.close();
17200
+ (_this$ws = this.ws) === null || _this$ws === void 0 || _this$ws.close();
17282
17201
  }
17283
17202
  }
17284
17203
  };
17285
- (0, import_defineProperty$1.default)(WsConnection, "connectCount", 0);
17286
- var import_defineProperty$4 = __toESM$1(require_defineProperty$1(), 1);
17287
- var import_objectSpread2$5 = __toESM$1(require_objectSpread2$1(), 1);
17204
+ _defineProperty$1(WsConnection, "connectCount", 0);
17288
17205
 
17289
17206
  //#endregion
17290
- //#region ../desktop/node_modules/.pnpm/@trpc+client@11.18.0_@trpc+server@11.18.0_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/index.mjs
17291
- var import_defineProperty = __toESM$1(require_defineProperty$1(), 1);
17292
- var import_objectSpread2$4 = __toESM$1(require_objectSpread2$1(), 1);
17207
+ //#region node_modules/.pnpm/@trpc+client@11.19.0_@trpc+server@11.19.0_typescript@6.0.3__typescript@6.0.3/node_modules/@trpc/client/dist/index.mjs
17293
17208
  var TRPCUntypedClient = class {
17294
17209
  constructor(opts) {
17295
- (0, import_defineProperty.default)(this, "links", void 0);
17296
- (0, import_defineProperty.default)(this, "runtime", void 0);
17297
- (0, import_defineProperty.default)(this, "requestId", void 0);
17210
+ _defineProperty$1(this, "links", void 0);
17211
+ _defineProperty$1(this, "runtime", void 0);
17212
+ _defineProperty$1(this, "requestId", void 0);
17298
17213
  this.requestId = 0;
17299
17214
  this.runtime = {};
17300
17215
  this.links = opts.links.map((link) => link(this.runtime));
@@ -17303,16 +17218,15 @@ var TRPCUntypedClient = class {
17303
17218
  var _opts$context;
17304
17219
  return createChain({
17305
17220
  links: this.links,
17306
- op: (0, import_objectSpread2$4.default)((0, import_objectSpread2$4.default)({}, opts), {}, {
17221
+ op: _objectSpread2$1(_objectSpread2$1({}, opts), {}, {
17307
17222
  context: (_opts$context = opts.context) !== null && _opts$context !== void 0 ? _opts$context : {},
17308
17223
  id: ++this.requestId
17309
17224
  })
17310
17225
  }).pipe(share());
17311
17226
  }
17312
17227
  async requestAsPromise(opts) {
17313
- var _this = this;
17314
17228
  try {
17315
- return (await observableToPromise(_this.$request(opts))).result.data;
17229
+ return (await observableToPromise(this.$request(opts))).result.data;
17316
17230
  } catch (err) {
17317
17231
  throw TRPCClientError.from(err);
17318
17232
  }
@@ -17361,7 +17275,6 @@ var TRPCUntypedClient = class {
17361
17275
  case void 0:
17362
17276
  var _opts$onData;
17363
17277
  (_opts$onData = opts.onData) === null || _opts$onData === void 0 || _opts$onData.call(opts, envelope.result.data);
17364
- break;
17365
17278
  }
17366
17279
  },
17367
17280
  error(err) {
@@ -17403,198 +17316,71 @@ function createTRPCClientProxy(client) {
17403
17316
  function createTRPCClient(opts) {
17404
17317
  return createTRPCClientProxy(new TRPCUntypedClient(opts));
17405
17318
  }
17406
- var import_objectSpread2$3 = __toESM$1(require_objectSpread2$1(), 1);
17407
- var import_objectSpread2$2 = __toESM$1(require_objectSpread2$1(), 1);
17408
- var import_asyncIterator = __toESM$1(__commonJS$1({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(exports, module) {
17409
- function _asyncIterator$1(r) {
17410
- var n, t, o, e = 2;
17411
- for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) {
17412
- if (t && null != (n = r[t])) return n.call(r);
17413
- if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r));
17414
- t = "@@asyncIterator", o = "@@iterator";
17415
- }
17416
- throw new TypeError("Object is not async iterable");
17417
- }
17418
- function AsyncFromSyncIterator(r) {
17419
- function AsyncFromSyncIteratorContinuation(r$1) {
17420
- if (Object(r$1) !== r$1) return Promise.reject(/* @__PURE__ */ new TypeError(r$1 + " is not an object."));
17421
- var n = r$1.done;
17422
- return Promise.resolve(r$1.value).then(function(r$2) {
17423
- return {
17424
- value: r$2,
17425
- done: n
17426
- };
17427
- });
17428
- }
17429
- return AsyncFromSyncIterator = function AsyncFromSyncIterator$1(r$1) {
17430
- this.s = r$1, this.n = r$1.next;
17431
- }, AsyncFromSyncIterator.prototype = {
17432
- s: null,
17433
- n: null,
17434
- next: function next() {
17435
- return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments));
17436
- },
17437
- "return": function _return(r$1) {
17438
- var n = this.s["return"];
17439
- return void 0 === n ? Promise.resolve({
17440
- value: r$1,
17441
- done: !0
17442
- }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));
17443
- },
17444
- "throw": function _throw(r$1) {
17445
- var n = this.s["return"];
17446
- return void 0 === n ? Promise.reject(r$1) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));
17447
- }
17448
- }, new AsyncFromSyncIterator(r);
17449
- }
17450
- module.exports = _asyncIterator$1, module.exports.__esModule = true, module.exports["default"] = module.exports;
17451
- } })(), 1);
17452
- var import_objectSpread2$1 = __toESM$1(require_objectSpread2$1(), 1);
17453
- var require_usingCtx = __commonJS$1({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(exports, module) {
17454
- function _usingCtx() {
17455
- var r = "function" == typeof SuppressedError ? SuppressedError : function(r$1, e$1) {
17456
- var n$1 = Error();
17457
- return n$1.name = "SuppressedError", n$1.error = r$1, n$1.suppressed = e$1, n$1;
17458
- }, e = {}, n = [];
17459
- function using(r$1, e$1) {
17460
- if (null != e$1) {
17461
- if (Object(e$1) !== e$1) throw new TypeError("using declarations can only be used with objects, functions, null, or undefined.");
17462
- if (r$1) var o = e$1[Symbol.asyncDispose || Symbol["for"]("Symbol.asyncDispose")];
17463
- if (void 0 === o && (o = e$1[Symbol.dispose || Symbol["for"]("Symbol.dispose")], r$1)) var t = o;
17464
- if ("function" != typeof o) throw new TypeError("Object is not disposable.");
17465
- t && (o = function o$1() {
17466
- try {
17467
- t.call(e$1);
17468
- } catch (r$2) {
17469
- return Promise.reject(r$2);
17470
- }
17471
- }), n.push({
17472
- v: e$1,
17473
- d: o,
17474
- a: r$1
17475
- });
17476
- } else r$1 && n.push({
17477
- d: e$1,
17478
- a: r$1
17319
+ function _OverloadYield(e, d) {
17320
+ this.v = e, this.k = d;
17321
+ }
17322
+ function AsyncGenerator(e) {
17323
+ var r, t;
17324
+ function resume(r, t) {
17325
+ try {
17326
+ var n = e[r](t), o = n.value, u = o instanceof _OverloadYield;
17327
+ Promise.resolve(u ? o.v : o).then(function(t) {
17328
+ if (u) {
17329
+ var i = "return" === r ? "return" : "next";
17330
+ if (!o.k || t.done) return resume(i, t);
17331
+ t = e[i](t).value;
17332
+ }
17333
+ settle(n.done ? "return" : "normal", t);
17334
+ }, function(e) {
17335
+ resume("throw", e);
17479
17336
  });
17480
- return e$1;
17337
+ } catch (e) {
17338
+ settle("throw", e);
17481
17339
  }
17482
- return {
17483
- e,
17484
- u: using.bind(null, !1),
17485
- a: using.bind(null, !0),
17486
- d: function d() {
17487
- var o, t = this.e, s = 0;
17488
- function next() {
17489
- for (; o = n.pop();) try {
17490
- if (!o.a && 1 === s) return s = 0, n.push(o), Promise.resolve().then(next);
17491
- if (o.d) {
17492
- var r$1 = o.d.call(o.v);
17493
- if (o.a) return s |= 2, Promise.resolve(r$1).then(next, err);
17494
- } else s |= 1;
17495
- } catch (r$2) {
17496
- return err(r$2);
17497
- }
17498
- if (1 === s) return t !== e ? Promise.reject(t) : Promise.resolve();
17499
- if (t !== e) throw t;
17500
- }
17501
- function err(n$1) {
17502
- return t = t !== e ? new r(n$1, t) : n$1, next();
17503
- }
17504
- return next();
17505
- }
17506
- };
17507
- }
17508
- module.exports = _usingCtx, module.exports.__esModule = true, module.exports["default"] = module.exports;
17509
- } });
17510
- var require_OverloadYield = __commonJS$1({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js"(exports, module) {
17511
- function _OverloadYield(e, d) {
17512
- this.v = e, this.k = d;
17513
- }
17514
- module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports;
17515
- } });
17516
- var require_awaitAsyncGenerator = __commonJS$1({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js"(exports, module) {
17517
- var OverloadYield$1 = require_OverloadYield();
17518
- function _awaitAsyncGenerator$1(e) {
17519
- return new OverloadYield$1(e, 0);
17520
- }
17521
- module.exports = _awaitAsyncGenerator$1, module.exports.__esModule = true, module.exports["default"] = module.exports;
17522
- } });
17523
- var require_wrapAsyncGenerator = __commonJS$1({ "../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js"(exports, module) {
17524
- var OverloadYield = require_OverloadYield();
17525
- function _wrapAsyncGenerator$1(e) {
17526
- return function() {
17527
- return new AsyncGenerator(e.apply(this, arguments));
17528
- };
17529
17340
  }
17530
- function AsyncGenerator(e) {
17531
- var r, t;
17532
- function resume(r$1, t$1) {
17533
- try {
17534
- var n = e[r$1](t$1), o = n.value, u = o instanceof OverloadYield;
17535
- Promise.resolve(u ? o.v : o).then(function(t$2) {
17536
- if (u) {
17537
- var i = "return" === r$1 ? "return" : "next";
17538
- if (!o.k || t$2.done) return resume(i, t$2);
17539
- t$2 = e[i](t$2).value;
17540
- }
17541
- settle(n.done ? "return" : "normal", t$2);
17542
- }, function(e$1) {
17543
- resume("throw", e$1);
17544
- });
17545
- } catch (e$1) {
17546
- settle("throw", e$1);
17547
- }
17548
- }
17549
- function settle(e$1, n) {
17550
- switch (e$1) {
17551
- case "return":
17552
- r.resolve({
17553
- value: n,
17554
- done: !0
17555
- });
17556
- break;
17557
- case "throw":
17558
- r.reject(n);
17559
- break;
17560
- default: r.resolve({
17341
+ function settle(e, n) {
17342
+ switch (e) {
17343
+ case "return":
17344
+ r.resolve({
17561
17345
  value: n,
17562
- done: !1
17346
+ done: !0
17563
17347
  });
17564
- }
17565
- (r = r.next) ? resume(r.key, r.arg) : t = null;
17566
- }
17567
- this._invoke = function(e$1, n) {
17568
- return new Promise(function(o, u) {
17569
- var i = {
17570
- key: e$1,
17571
- arg: n,
17572
- resolve: o,
17573
- reject: u,
17574
- next: null
17575
- };
17576
- t ? t = t.next = i : (r = t = i, resume(e$1, n));
17348
+ break;
17349
+ case "throw":
17350
+ r.reject(n);
17351
+ break;
17352
+ default: r.resolve({
17353
+ value: n,
17354
+ done: !1
17577
17355
  });
17578
- }, "function" != typeof e["return"] && (this["return"] = void 0);
17356
+ }
17357
+ (r = r.next) ? resume(r.key, r.arg) : t = null;
17579
17358
  }
17580
- AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function() {
17581
- return this;
17582
- }, AsyncGenerator.prototype.next = function(e) {
17583
- return this._invoke("next", e);
17584
- }, AsyncGenerator.prototype["throw"] = function(e) {
17585
- return this._invoke("throw", e);
17586
- }, AsyncGenerator.prototype["return"] = function(e) {
17587
- return this._invoke("return", e);
17588
- };
17589
- module.exports = _wrapAsyncGenerator$1, module.exports.__esModule = true, module.exports["default"] = module.exports;
17590
- } });
17591
- var import_usingCtx = __toESM$1(require_usingCtx(), 1);
17592
- var import_awaitAsyncGenerator = __toESM$1(require_awaitAsyncGenerator(), 1);
17593
- var import_wrapAsyncGenerator = __toESM$1(require_wrapAsyncGenerator(), 1);
17594
- var import_objectSpread2 = __toESM$1(require_objectSpread2$1(), 1);
17359
+ this._invoke = function(e, n) {
17360
+ return new Promise(function(o, u) {
17361
+ var i = {
17362
+ key: e,
17363
+ arg: n,
17364
+ resolve: o,
17365
+ reject: u,
17366
+ next: null
17367
+ };
17368
+ t ? t = t.next = i : (r = t = i, resume(e, n));
17369
+ });
17370
+ }, "function" != typeof e["return"] && (this["return"] = void 0);
17371
+ }
17372
+ AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function() {
17373
+ return this;
17374
+ }, AsyncGenerator.prototype.next = function(e) {
17375
+ return this._invoke("next", e);
17376
+ }, AsyncGenerator.prototype["throw"] = function(e) {
17377
+ return this._invoke("throw", e);
17378
+ }, AsyncGenerator.prototype["return"] = function(e) {
17379
+ return this._invoke("return", e);
17380
+ };
17595
17381
 
17596
17382
  //#endregion
17597
- //#region ../desktop/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/double-indexed-kv.js
17383
+ //#region node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/double-indexed-kv.js
17598
17384
  var DoubleIndexedKV = class {
17599
17385
  constructor() {
17600
17386
  this.keyToValue = /* @__PURE__ */ new Map();
@@ -17617,7 +17403,7 @@ var DoubleIndexedKV = class {
17617
17403
  };
17618
17404
 
17619
17405
  //#endregion
17620
- //#region ../desktop/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/registry.js
17406
+ //#region node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/registry.js
17621
17407
  var Registry = class {
17622
17408
  constructor(generateIdentifier) {
17623
17409
  this.generateIdentifier = generateIdentifier;
@@ -17640,7 +17426,7 @@ var Registry = class {
17640
17426
  };
17641
17427
 
17642
17428
  //#endregion
17643
- //#region ../desktop/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/class-registry.js
17429
+ //#region node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/class-registry.js
17644
17430
  var ClassRegistry = class extends Registry {
17645
17431
  constructor() {
17646
17432
  super((c) => c.name);
@@ -17658,7 +17444,7 @@ var ClassRegistry = class extends Registry {
17658
17444
  };
17659
17445
 
17660
17446
  //#endregion
17661
- //#region ../desktop/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/util.js
17447
+ //#region node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/util.js
17662
17448
  function valuesOfObj(record) {
17663
17449
  if ("values" in Object) return Object.values(record);
17664
17450
  const values = [];
@@ -17688,7 +17474,7 @@ function findArr(record, predicate) {
17688
17474
  }
17689
17475
 
17690
17476
  //#endregion
17691
- //#region ../desktop/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/custom-transformer-registry.js
17477
+ //#region node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/custom-transformer-registry.js
17692
17478
  var CustomTransformerRegistry = class {
17693
17479
  constructor() {
17694
17480
  this.transfomers = {};
@@ -17705,8 +17491,8 @@ var CustomTransformerRegistry = class {
17705
17491
  };
17706
17492
 
17707
17493
  //#endregion
17708
- //#region ../desktop/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/is.js
17709
- const getType$1 = (payload) => Object.prototype.toString.call(payload).slice(8, -1);
17494
+ //#region node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/is.js
17495
+ const getType = (payload) => Object.prototype.toString.call(payload).slice(8, -1);
17710
17496
  const isUndefined$1 = (payload) => typeof payload === "undefined";
17711
17497
  const isNull$1 = (payload) => payload === null;
17712
17498
  const isPlainObject$4 = (payload) => {
@@ -17716,14 +17502,14 @@ const isPlainObject$4 = (payload) => {
17716
17502
  return Object.getPrototypeOf(payload) === Object.prototype;
17717
17503
  };
17718
17504
  const isEmptyObject = (payload) => isPlainObject$4(payload) && Object.keys(payload).length === 0;
17719
- const isArray$1 = (payload) => Array.isArray(payload);
17505
+ const isArray = (payload) => Array.isArray(payload);
17720
17506
  const isString = (payload) => typeof payload === "string";
17721
17507
  const isNumber = (payload) => typeof payload === "number" && !isNaN(payload);
17722
17508
  const isBoolean$1 = (payload) => typeof payload === "boolean";
17723
17509
  const isRegExp = (payload) => payload instanceof RegExp;
17724
17510
  const isMap = (payload) => payload instanceof Map;
17725
17511
  const isSet = (payload) => payload instanceof Set;
17726
- const isSymbol = (payload) => getType$1(payload) === "Symbol";
17512
+ const isSymbol = (payload) => getType(payload) === "Symbol";
17727
17513
  const isDate = (payload) => payload instanceof Date && !isNaN(payload.valueOf());
17728
17514
  const isError$1 = (payload) => payload instanceof Error;
17729
17515
  const isNaNValue = (payload) => typeof payload === "number" && isNaN(payload);
@@ -17734,7 +17520,7 @@ const isTypedArray$3 = (payload) => ArrayBuffer.isView(payload) && !(payload ins
17734
17520
  const isURL = (payload) => payload instanceof URL;
17735
17521
 
17736
17522
  //#endregion
17737
- //#region ../desktop/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/pathstringifier.js
17523
+ //#region node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/pathstringifier.js
17738
17524
  const escapeKey = (key) => key.replace(/\\/g, "\\\\").replace(/\./g, "\\.");
17739
17525
  const stringifyPath = (path) => path.map(String).map(escapeKey).join(".");
17740
17526
  const parsePath = (string, legacyPaths) => {
@@ -17768,7 +17554,7 @@ const parsePath = (string, legacyPaths) => {
17768
17554
  };
17769
17555
 
17770
17556
  //#endregion
17771
- //#region ../desktop/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/transformer.js
17557
+ //#region node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/transformer.js
17772
17558
  function simpleTransformation(isApplicable, annotation, transform, untransform) {
17773
17559
  return {
17774
17560
  isApplicable,
@@ -17911,7 +17697,7 @@ simpleRules.forEach((rule) => {
17911
17697
  simpleRulesByAnnotation[rule.annotation] = rule;
17912
17698
  });
17913
17699
  const untransformValue = (json, type, superJson) => {
17914
- if (isArray$1(type)) switch (type[0]) {
17700
+ if (isArray(type)) switch (type[0]) {
17915
17701
  case "symbol": return symbolRule.untransform(json, type, superJson);
17916
17702
  case "class": return classRule.untransform(json, type, superJson);
17917
17703
  case "custom": return customRule.untransform(json, type, superJson);
@@ -17926,7 +17712,7 @@ const untransformValue = (json, type, superJson) => {
17926
17712
  };
17927
17713
 
17928
17714
  //#endregion
17929
- //#region ../desktop/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/accessDeep.js
17715
+ //#region node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/accessDeep.js
17930
17716
  const getNthKey = (value, n) => {
17931
17717
  if (n > value.size) throw new Error("index out of bounds");
17932
17718
  const keys = value.keys();
@@ -17968,7 +17754,7 @@ const setDeep = (object, path, mapper) => {
17968
17754
  let parent = object;
17969
17755
  for (let i = 0; i < path.length - 1; i++) {
17970
17756
  const key = path[i];
17971
- if (isArray$1(parent)) {
17757
+ if (isArray(parent)) {
17972
17758
  const index = +key;
17973
17759
  parent = parent[index];
17974
17760
  } else if (isPlainObject$4(parent)) parent = parent[key];
@@ -17991,7 +17777,7 @@ const setDeep = (object, path, mapper) => {
17991
17777
  }
17992
17778
  }
17993
17779
  const lastKey = path[path.length - 1];
17994
- if (isArray$1(parent)) parent[+lastKey] = mapper(parent[+lastKey]);
17780
+ if (isArray(parent)) parent[+lastKey] = mapper(parent[+lastKey]);
17995
17781
  else if (isPlainObject$4(parent)) parent[lastKey] = mapper(parent[lastKey]);
17996
17782
  if (isSet(parent)) {
17997
17783
  const oldValue = getNthKey(parent, +lastKey);
@@ -18020,12 +17806,12 @@ const setDeep = (object, path, mapper) => {
18020
17806
  };
18021
17807
 
18022
17808
  //#endregion
18023
- //#region ../desktop/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/plainer.js
17809
+ //#region node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/plainer.js
18024
17810
  const enableLegacyPaths = (version) => version < 1;
18025
17811
  function traverse(tree, walker, version, origin = []) {
18026
17812
  if (!tree) return;
18027
17813
  const legacyPaths = enableLegacyPaths(version);
18028
- if (!isArray$1(tree)) {
17814
+ if (!isArray(tree)) {
18029
17815
  forEach(tree, (subtree, key) => traverse(subtree, walker, version, [...origin, ...parsePath(key, legacyPaths)]));
18030
17816
  return;
18031
17817
  }
@@ -18049,7 +17835,7 @@ function applyReferentialEqualityAnnotations(plain, annotations, version) {
18049
17835
  plain = setDeep(plain, identicalObjectPath, () => object);
18050
17836
  });
18051
17837
  }
18052
- if (isArray$1(annotations)) {
17838
+ if (isArray(annotations)) {
18053
17839
  const [root, other] = annotations;
18054
17840
  root.forEach((identicalPath) => {
18055
17841
  plain = setDeep(plain, parsePath(identicalPath, legacyPaths), () => plain);
@@ -18058,7 +17844,7 @@ function applyReferentialEqualityAnnotations(plain, annotations, version) {
18058
17844
  } else forEach(annotations, apply);
18059
17845
  return plain;
18060
17846
  }
18061
- const isDeep = (object, superJson) => isPlainObject$4(object) || isArray$1(object) || isMap(object) || isSet(object) || isError$1(object) || isInstanceOfRegisteredClass(object, superJson);
17847
+ const isDeep = (object, superJson) => isPlainObject$4(object) || isArray(object) || isMap(object) || isSet(object) || isError$1(object) || isInstanceOfRegisteredClass(object, superJson);
18062
17848
  function addIdentity(object, path, identities) {
18063
17849
  const existingSet = identities.get(object);
18064
17850
  if (existingSet) existingSet.push(path);
@@ -18097,13 +17883,13 @@ const walker = (object, identities, superJson, dedupe, path = [], objectsInThisP
18097
17883
  if (includes(objectsInThisPath, object)) return { transformedValue: null };
18098
17884
  const transformationResult = transformValue(object, superJson);
18099
17885
  const transformed = transformationResult?.value ?? object;
18100
- const transformedValue = isArray$1(transformed) ? [] : {};
17886
+ const transformedValue = isArray(transformed) ? [] : {};
18101
17887
  const innerAnnotations = {};
18102
17888
  forEach(transformed, (value, index) => {
18103
17889
  if (index === "__proto__" || index === "constructor" || index === "prototype") throw new Error(`Detected property ${index}. This is a prototype pollution risk, please remove it from your object.`);
18104
17890
  const recursiveResult = walker(value, identities, superJson, dedupe, [...path, index], [...objectsInThisPath, object], seenObjects);
18105
17891
  transformedValue[index] = recursiveResult.transformedValue;
18106
- if (isArray$1(recursiveResult.annotations)) innerAnnotations[escapeKey(index)] = recursiveResult.annotations;
17892
+ if (isArray(recursiveResult.annotations)) innerAnnotations[escapeKey(index)] = recursiveResult.annotations;
18107
17893
  else if (isPlainObject$4(recursiveResult.annotations)) forEach(recursiveResult.annotations, (tree, key) => {
18108
17894
  innerAnnotations[escapeKey(index) + "." + key] = tree;
18109
17895
  });
@@ -18120,37 +17906,17 @@ const walker = (object, identities, superJson, dedupe, path = [], objectsInThisP
18120
17906
  };
18121
17907
 
18122
17908
  //#endregion
18123
- //#region ../desktop/node_modules/.pnpm/is-what@5.5.0/node_modules/is-what/dist/getType.js
18124
- /** Returns the object type of the given payload */
18125
- function getType(payload) {
18126
- return Object.prototype.toString.call(payload).slice(8, -1);
18127
- }
18128
-
18129
- //#endregion
18130
- //#region ../desktop/node_modules/.pnpm/is-what@5.5.0/node_modules/is-what/dist/isArray.js
18131
- /** Returns whether the payload is an array */
18132
- function isArray(payload) {
18133
- return getType(payload) === "Array";
18134
- }
18135
-
18136
- //#endregion
18137
- //#region ../desktop/node_modules/.pnpm/is-what@5.5.0/node_modules/is-what/dist/isPlainObject.js
17909
+ //#region node_modules/.pnpm/copy-anything@4.1.1/node_modules/copy-anything/dist/index.js
18138
17910
  /**
18139
- * Returns whether the payload is a plain JavaScript object (excluding special classes or objects
18140
- * with other prototypes)
17911
+ * Assigns a prop the copy is keeping, preserving whether it was enumerable. Callers decide *whether*
17912
+ * to keep a non-enumerable prop before getting here, so by this point the answer is always yes.
18141
17913
  */
18142
- function isPlainObject$3(payload) {
18143
- if (getType(payload) !== "Object") return false;
18144
- const prototype = Object.getPrototypeOf(payload);
18145
- return !!prototype && prototype.constructor === Object && prototype === Object.prototype;
18146
- }
18147
-
18148
- //#endregion
18149
- //#region ../desktop/node_modules/.pnpm/copy-anything@4.0.5/node_modules/copy-anything/dist/index.js
18150
- function assignProp(carry, key, newVal, originalObject, includeNonenumerable) {
18151
- const propType = {}.propertyIsEnumerable.call(originalObject, key) ? "enumerable" : "nonenumerable";
18152
- if (propType === "enumerable") carry[key] = newVal;
18153
- if (includeNonenumerable && propType === "nonenumerable") Object.defineProperty(carry, key, {
17914
+ function assignProp(carry, key, newVal, originalObject) {
17915
+ if (Object.prototype.propertyIsEnumerable.call(originalObject, key)) {
17916
+ carry[key] = newVal;
17917
+ return;
17918
+ }
17919
+ Object.defineProperty(carry, key, {
18154
17920
  value: newVal,
18155
17921
  enumerable: false,
18156
17922
  writable: true,
@@ -18158,8 +17924,42 @@ function assignProp(carry, key, newVal, originalObject, includeNonenumerable) {
18158
17924
  });
18159
17925
  }
18160
17926
  /**
17927
+ * Whether `value` is an object literal, as opposed to a class instance, a built-in like `Date`, an
17928
+ * `arguments` object, or an object with a null prototype.
17929
+ *
17930
+ * The prototype check comes first because it is cheap and rejects almost everything; the tag check
17931
+ * is only reached by values that are about to be cloned anyway.
17932
+ */
17933
+ function isPlainObject$3(value) {
17934
+ return Object.getPrototypeOf(value) === Object.prototype && Object.prototype.toString.call(value) === "[object Object]";
17935
+ }
17936
+ /**
17937
+ * Returns the clone that `value` should be replaced with, and queues it to be filled in later.
17938
+ * Anything that isn't an array or a plain object is returned untouched.
17939
+ *
17940
+ * Reusing the clone already registered in `clones` is what makes circular and shared references
17941
+ * work: the placeholder is registered before its contents exist, so a reference back to an ancestor
17942
+ * resolves to it rather than walking forever.
17943
+ */
17944
+ function cloneRef(value, clones, sources, dests) {
17945
+ if (typeof value !== "object" || value === null) return value;
17946
+ const array = Array.isArray(value);
17947
+ if (!array && !isPlainObject$3(value)) return value;
17948
+ const existing = clones.get(value);
17949
+ if (existing !== void 0) return existing;
17950
+ const clone = array ? new Array(value.length) : {};
17951
+ clones.set(value, clone);
17952
+ sources.push(value);
17953
+ dests.push(clone);
17954
+ return clone;
17955
+ }
17956
+ /**
18161
17957
  * Copy (clone) an object and all its props recursively to get rid of any prop referenced of the
18162
- * original object. Arrays are also cloned, however objects inside arrays are still linked.
17958
+ * original object. Arrays and the objects inside them are cloned as well.
17959
+ *
17960
+ * Nesting depth is limited only by available memory, and circular references are reproduced in the
17961
+ * copy rather than followed forever. Two props pointing at the same object still point at one
17962
+ * shared copy afterwards.
18163
17963
  *
18164
17964
  * @param target Target can be anything
18165
17965
  * @param [options={}] See type {@link Options} for more details.
@@ -18172,21 +17972,42 @@ function assignProp(carry, key, newVal, originalObject, includeNonenumerable) {
18172
17972
  * @returns The target with replaced values
18173
17973
  */
18174
17974
  function copy(target, options = {}) {
18175
- if (isArray(target)) return target.map((item) => copy(item, options));
18176
- if (!isPlainObject$3(target)) return target;
18177
- const props = Object.getOwnPropertyNames(target);
18178
- const symbols = Object.getOwnPropertySymbols(target);
18179
- return [...props, ...symbols].reduce((carry, key) => {
18180
- if (key === "__proto__") return carry;
18181
- if (isArray(options.props) && !options.props.includes(key)) return carry;
18182
- const val = target[key];
18183
- assignProp(carry, key, copy(val, options), target, options.nonenumerable);
18184
- return carry;
18185
- }, {});
17975
+ if (typeof target !== "object" || target === null) return target;
17976
+ const clones = /* @__PURE__ */ new Map();
17977
+ const sources = [];
17978
+ const dests = [];
17979
+ const result = cloneRef(target, clones, sources, dests);
17980
+ const onlyProps = Array.isArray(options.props) ? options.props : void 0;
17981
+ const nonenumerable = options.nonenumerable === true;
17982
+ while (sources.length) {
17983
+ const source = sources.pop();
17984
+ const dest = dests.pop();
17985
+ if (Array.isArray(source)) {
17986
+ for (let i = 0; i < source.length; i++) if (i in source) dest[i] = cloneRef(source[i], clones, sources, dests);
17987
+ continue;
17988
+ }
17989
+ if (nonenumerable) for (const key of Object.getOwnPropertyNames(source)) {
17990
+ if (key === "__proto__") continue;
17991
+ if (onlyProps && !onlyProps.includes(key)) continue;
17992
+ assignProp(dest, key, cloneRef(source[key], clones, sources, dests), source);
17993
+ }
17994
+ else for (const key in source) {
17995
+ if (!Object.prototype.hasOwnProperty.call(source, key)) continue;
17996
+ if (key === "__proto__") continue;
17997
+ if (onlyProps && !onlyProps.includes(key)) continue;
17998
+ dest[key] = cloneRef(source[key], clones, sources, dests);
17999
+ }
18000
+ for (const key of Object.getOwnPropertySymbols(source)) {
18001
+ if (onlyProps && !onlyProps.includes(key)) continue;
18002
+ if (!nonenumerable && !Object.prototype.propertyIsEnumerable.call(source, key)) continue;
18003
+ assignProp(dest, key, cloneRef(source[key], clones, sources, dests), source);
18004
+ }
18005
+ }
18006
+ return result;
18186
18007
  }
18187
18008
 
18188
18009
  //#endregion
18189
- //#region ../desktop/node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/index.js
18010
+ //#region node_modules/.pnpm/superjson@2.2.6/node_modules/superjson/dist/index.js
18190
18011
  var SuperJSON = class {
18191
18012
  /**
18192
18013
  * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
@@ -18470,7 +18291,7 @@ const MESSENGER_MAX_COMPRESSION_SOURCE_BYTES = 100 * MB;
18470
18291
 
18471
18292
  //#endregion
18472
18293
  //#region ../../node_modules/.pnpm/url-join@5.0.0/node_modules/url-join/lib/url-join.js
18473
- function normalize$2(strArray) {
18294
+ function normalize$3(strArray) {
18474
18295
  var resultArray = [];
18475
18296
  if (strArray.length === 0) return "";
18476
18297
  if (typeof strArray[0] !== "string") throw new TypeError("Url must be a string. Received " + strArray[0]);
@@ -18492,11 +18313,11 @@ function normalize$2(strArray) {
18492
18313
  str = parts.shift() + (parts.length > 0 ? "?" : "") + parts.join("&");
18493
18314
  return str;
18494
18315
  }
18495
- function urlJoin() {
18316
+ function urlJoin$1() {
18496
18317
  var input;
18497
18318
  if (typeof arguments[0] === "object") input = arguments[0];
18498
18319
  else input = [].slice.call(arguments);
18499
- return normalize$2(input);
18320
+ return normalize$3(input);
18500
18321
  }
18501
18322
 
18502
18323
  //#endregion
@@ -18506,25 +18327,25 @@ const OFFICIAL_SITE = "https://lobehub.com";
18506
18327
  const OFFICIAL_DEVICE_GATEWAY_URL = "https://device-gateway.lobehub.com";
18507
18328
  const OFFICIAL_AGENT_GATEWAY_URL = "https://agent-gateway.lobehub.com";
18508
18329
  const GITHUB = "https://github.com/lobehub/lobe-chat";
18509
- const GITHUB_ISSUES = urlJoin(GITHUB, "issues/new/choose");
18510
- const DOCUMENTS = urlJoin(OFFICIAL_SITE, "/docs");
18511
- const USAGE_DOCUMENTS = urlJoin(DOCUMENTS, "/usage");
18512
- const SELF_HOSTING_DOCUMENTS = urlJoin(DOCUMENTS, "/self-hosting");
18513
- const DATABASE_SELF_HOSTING_URL = urlJoin(SELF_HOSTING_DOCUMENTS, "/server-database");
18330
+ const GITHUB_ISSUES = urlJoin$1(GITHUB, "issues/new/choose");
18331
+ const DOCUMENTS = urlJoin$1(OFFICIAL_SITE, "/docs");
18332
+ const USAGE_DOCUMENTS = urlJoin$1(DOCUMENTS, "/usage");
18333
+ const SELF_HOSTING_DOCUMENTS = urlJoin$1(DOCUMENTS, "/self-hosting");
18334
+ const DATABASE_SELF_HOSTING_URL = urlJoin$1(SELF_HOSTING_DOCUMENTS, "/server-database");
18514
18335
  const DOCUMENTS_REFER_URL = `${DOCUMENTS}?utm_source=chat_preview`;
18515
- const WIKI_PLUGIN_GUIDE = urlJoin(USAGE_DOCUMENTS, "/plugins/development");
18516
- const MANUAL_UPGRADE_URL = urlJoin(SELF_HOSTING_DOCUMENTS, "/advanced/upstream-sync");
18517
- const BLOG = urlJoin(OFFICIAL_SITE, "blog");
18518
- const PRIVACY_URL = urlJoin(OFFICIAL_SITE, "/privacy");
18519
- const TERMS_URL = urlJoin(OFFICIAL_SITE, "/terms");
18336
+ const WIKI_PLUGIN_GUIDE = urlJoin$1(USAGE_DOCUMENTS, "/plugins/development");
18337
+ const MANUAL_UPGRADE_URL = urlJoin$1(SELF_HOSTING_DOCUMENTS, "/advanced/upstream-sync");
18338
+ const BLOG = urlJoin$1(OFFICIAL_SITE, "blog");
18339
+ const PRIVACY_URL = urlJoin$1(OFFICIAL_SITE, "/privacy");
18340
+ const TERMS_URL = urlJoin$1(OFFICIAL_SITE, "/terms");
18520
18341
  const AGENTS_INDEX_GITHUB = "https://github.com/lobehub/lobe-chat-agents";
18521
- const AGENTS_INDEX_GITHUB_ISSUE = urlJoin(AGENTS_INDEX_GITHUB, "issues/new");
18522
- const RELEASES_URL = urlJoin(GITHUB, "releases");
18523
- const CHANGELOG_URL = urlJoin(OFFICIAL_SITE, "changelog");
18342
+ const AGENTS_INDEX_GITHUB_ISSUE = urlJoin$1(AGENTS_INDEX_GITHUB, "issues/new");
18343
+ const RELEASES_URL = urlJoin$1(GITHUB, "releases");
18344
+ const CHANGELOG_URL = urlJoin$1(OFFICIAL_SITE, "changelog");
18524
18345
  const DOWNLOAD_URL = {
18525
18346
  android: "https://play.google.com/store/apps/details?id=com.lobehub.app",
18526
- default: urlJoin(OFFICIAL_SITE, "/downloads"),
18527
- mobile: urlJoin(OFFICIAL_SITE, "/mobile"),
18347
+ default: urlJoin$1(OFFICIAL_SITE, "/downloads"),
18348
+ mobile: urlJoin$1(OFFICIAL_SITE, "/mobile"),
18528
18349
  ios: "https://testflight.apple.com/join/2ZbjX4Qp"
18529
18350
  };
18530
18351
 
@@ -20581,6 +20402,37 @@ async function getAgentStreamAuthInfo(workspaceId) {
20581
20402
  };
20582
20403
  }
20583
20404
 
20405
+ //#endregion
20406
+ //#region node_modules/.pnpm/url-join@5.0.0/node_modules/url-join/lib/url-join.js
20407
+ function normalize$2(strArray) {
20408
+ var resultArray = [];
20409
+ if (strArray.length === 0) return "";
20410
+ if (typeof strArray[0] !== "string") throw new TypeError("Url must be a string. Received " + strArray[0]);
20411
+ if (strArray[0].match(/^[^/:]+:\/*$/) && strArray.length > 1) strArray[0] = strArray.shift() + strArray[0];
20412
+ if (strArray[0].match(/^file:\/\/\//)) strArray[0] = strArray[0].replace(/^([^/:]+):\/*/, "$1:///");
20413
+ else strArray[0] = strArray[0].replace(/^([^/:]+):\/*/, "$1://");
20414
+ for (var i = 0; i < strArray.length; i++) {
20415
+ var component = strArray[i];
20416
+ if (typeof component !== "string") throw new TypeError("Url must be a string. Received " + component);
20417
+ if (component === "") continue;
20418
+ if (i > 0) component = component.replace(/^[\/]+/, "");
20419
+ if (i < strArray.length - 1) component = component.replace(/[\/]+$/, "");
20420
+ else component = component.replace(/[\/]+$/, "/");
20421
+ resultArray.push(component);
20422
+ }
20423
+ var str = resultArray.join("/");
20424
+ str = str.replace(/\/(\?|&|#[^!])/g, "$1");
20425
+ var parts = str.split("?");
20426
+ str = parts.shift() + (parts.length > 0 ? "?" : "") + parts.join("&");
20427
+ return str;
20428
+ }
20429
+ function urlJoin() {
20430
+ var input;
20431
+ if (typeof arguments[0] === "object") input = arguments[0];
20432
+ else input = [].slice.call(arguments);
20433
+ return normalize$2(input);
20434
+ }
20435
+
20584
20436
  //#endregion
20585
20437
  //#region src/utils/agentStream.ts
20586
20438
  /**
@@ -21199,7 +21051,7 @@ async function resolveAgentId$1(client, opts) {
21199
21051
  }
21200
21052
 
21201
21053
  //#endregion
21202
- //#region ../desktop/node_modules/.pnpm/dayjs@1.11.21/node_modules/dayjs/dayjs.min.js
21054
+ //#region node_modules/.pnpm/dayjs@1.11.23/node_modules/dayjs/dayjs.min.js
21203
21055
  var require_dayjs_min$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
21204
21056
  (function(t, e) {
21205
21057
  "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs = e();
@@ -21499,7 +21351,7 @@ var require_dayjs_min$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
21499
21351
 
21500
21352
  //#endregion
21501
21353
  //#region src/commands/agent/spaceFs.ts
21502
- var import_dayjs_min$1 = /* @__PURE__ */ __toESM$2(require_dayjs_min$1(), 1);
21354
+ var import_dayjs_min$1 = /* @__PURE__ */ __toESM(require_dayjs_min$1(), 1);
21503
21355
  const SKILL_FILE_NAME = "SKILL.md";
21504
21356
  const SKILL_NAMESPACE_PREFIXES = {
21505
21357
  "agent": "./lobe/skills/agent/skills",
@@ -25507,7 +25359,7 @@ var require_dayjs_min = /* @__PURE__ */ __commonJSMin(((exports, module) => {
25507
25359
 
25508
25360
  //#endregion
25509
25361
  //#region ../../packages/utils/src/client/cookie.ts
25510
- var import_dayjs_min = /* @__PURE__ */ __toESM$2(require_dayjs_min());
25362
+ var import_dayjs_min = /* @__PURE__ */ __toESM(require_dayjs_min());
25511
25363
 
25512
25364
  //#endregion
25513
25365
  //#region ../../packages/types/src/agent/heteroCliArgs.ts
@@ -28088,6 +27940,8 @@ var init_files = __esmMin((() => {
28088
27940
  * the user's library.
28089
27941
  */
28090
27942
  FileSource["Acceptance"] = "acceptance";
27943
+ /** Original upload owned by an agent's document tree rather than the resource library. */
27944
+ FileSource["AgentDocument"] = "agent-document";
28091
27945
  FileSource["ImageGeneration"] = "image_generation";
28092
27946
  FileSource["PageEditor"] = "page-editor";
28093
27947
  FileSource["VideoGeneration"] = "video_generation";
@@ -30440,7 +30294,7 @@ var require_numeral = /* @__PURE__ */ __commonJSMin(((exports, module) => {
30440
30294
 
30441
30295
  //#endregion
30442
30296
  //#region ../../packages/utils/src/format.ts
30443
- var import_numeral = /* @__PURE__ */ __toESM$2(require_numeral());
30297
+ var import_numeral = /* @__PURE__ */ __toESM(require_numeral());
30444
30298
 
30445
30299
  //#endregion
30446
30300
  //#region ../../node_modules/.pnpm/strtok3@10.3.5/node_modules/strtok3/lib/stream/Errors.js
@@ -32453,7 +32307,7 @@ function mergeArrays(chunks) {
32453
32307
  var import_src$7, debug$10, syncBufferSize, ddSignatureArray, eocdSignatureBytes, ZipHandler;
32454
32308
  var init_ZipHandler = __esmMin((() => {
32455
32309
  init_lib$1();
32456
- import_src$7 = /* @__PURE__ */ __toESM$2(require_src(), 1);
32310
+ import_src$7 = /* @__PURE__ */ __toESM(require_src(), 1);
32457
32311
  init_ZipToken();
32458
32312
  debug$10 = (0, import_src$7.default)("tokenizer:inflate");
32459
32313
  syncBufferSize = 256 * 1024;
@@ -36823,7 +36677,7 @@ var require_ua_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
36823
36677
 
36824
36678
  //#endregion
36825
36679
  //#region ../../packages/utils/src/platform.ts
36826
- var import_ua_parser = /* @__PURE__ */ __toESM$2(require_ua_parser());
36680
+ var import_ua_parser = /* @__PURE__ */ __toESM(require_ua_parser());
36827
36681
  const getParser = () => {
36828
36682
  if (isOnServerSide) return new import_ua_parser.default("Node");
36829
36683
  const ua = navigator.userAgent;
@@ -38614,7 +38468,7 @@ const sleep$5 = async (ms) => await new Promise((resolve) => {
38614
38468
 
38615
38469
  //#endregion
38616
38470
  //#region ../../packages/utils/src/timing.ts
38617
- var import_src$6 = /* @__PURE__ */ __toESM$2(require_src());
38471
+ var import_src$6 = /* @__PURE__ */ __toESM(require_src());
38618
38472
 
38619
38473
  //#endregion
38620
38474
  //#region ../../packages/html-artifact/src/limits.ts
@@ -40615,10 +40469,14 @@ function registerBotCommand(program) {
40615
40469
  const b = await findBot(client, botId);
40616
40470
  log$12.status(`Testing ${b.platform} credentials for ${b.applicationId}...`);
40617
40471
  try {
40618
- await client.agentBotProvider.testConnection.mutate({
40472
+ const result = await client.agentBotProvider.testConnection.mutate({
40619
40473
  applicationId: b.applicationId,
40620
40474
  platform: b.platform
40621
40475
  });
40476
+ if (!result.valid) {
40477
+ log$12.error(`Credential test failed: ${result.message}`);
40478
+ process.exit(1);
40479
+ }
40622
40480
  console.log(`${import_picocolors.default.green("✓")} Credentials are valid for ${import_picocolors.default.bold(b.platform)} bot`);
40623
40481
  } catch (err) {
40624
40482
  const message = err?.message || "Connection test failed";
@@ -57752,6 +57610,7 @@ var init_detectUtf16 = __esmMin((() => {
57752
57610
 
57753
57611
  //#endregion
57754
57612
  //#region ../../packages/file-loaders/src/loaders/text/index.ts
57613
+ init_detectUtf16();
57755
57614
  const log$11 = (0, import_src$6.default)("file-loaders:text");
57756
57615
  /**
57757
57616
  * Read a text file with automatic encoding detection.
@@ -62321,8 +62180,8 @@ var require_word = /* @__PURE__ */ __commonJSMin(((exports, module) => {
62321
62180
  var doc_exports = /* @__PURE__ */ __exportAll({ DocLoader: () => DocLoader });
62322
62181
  var import_src$5, import_word, log$10, DocLoader;
62323
62182
  var init_doc = __esmMin((() => {
62324
- import_src$5 = /* @__PURE__ */ __toESM$2(require_src());
62325
- import_word = /* @__PURE__ */ __toESM$2(require_word());
62183
+ import_src$5 = /* @__PURE__ */ __toESM(require_src());
62184
+ import_word = /* @__PURE__ */ __toESM(require_word());
62326
62185
  log$10 = (0, import_src$5.default)("file-loaders:doc");
62327
62186
  DocLoader = class {
62328
62187
  async loadPages(filePath) {
@@ -90256,8 +90115,8 @@ var require_lib$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
90256
90115
  var docx_exports = /* @__PURE__ */ __exportAll({ DocxLoader: () => DocxLoader });
90257
90116
  var import_src$4, import_lib$3, log$9, DocxLoader;
90258
90117
  var init_docx = __esmMin((() => {
90259
- import_src$4 = /* @__PURE__ */ __toESM$2(require_src());
90260
- import_lib$3 = /* @__PURE__ */ __toESM$2(require_lib$2());
90118
+ import_src$4 = /* @__PURE__ */ __toESM(require_src());
90119
+ import_lib$3 = /* @__PURE__ */ __toESM(require_lib$2());
90261
90120
  log$9 = (0, import_src$4.default)("file-loaders:docx");
90262
90121
  DocxLoader = class {
90263
90122
  async loadPages(filePath) {
@@ -113697,7 +113556,7 @@ function sheetToMarkdownTable(jsonData) {
113697
113556
  }
113698
113557
  var import_src$3, log$8, ExcelLoader;
113699
113558
  var init_excel = __esmMin((() => {
113700
- import_src$3 = /* @__PURE__ */ __toESM$2(require_src());
113559
+ import_src$3 = /* @__PURE__ */ __toESM(require_src());
113701
113560
  init_xlsx();
113702
113561
  init_prompt$1();
113703
113562
  log$8 = (0, import_src$3.default)("file-loaders:excel");
@@ -113775,7 +113634,7 @@ var init_excel = __esmMin((() => {
113775
113634
  //#endregion
113776
113635
  //#region ../../packages/utils/src/isBinaryContent.ts
113777
113636
  var NON_PRINTABLE_THRESHOLD, hasUtf8Bom, hasUtf16Bom, sniffBinaryBuffer, REPLACEMENT_CHAR, checkPrintableRatio;
113778
- var init_isBinaryContent$1 = __esmMin((() => {
113637
+ var init_isBinaryContent = __esmMin((() => {
113779
113638
  init_detectUtf16();
113780
113639
  NON_PRINTABLE_THRESHOLD = .3;
113781
113640
  hasUtf8Bom = (buf) => buf.length >= 3 && buf[0] === 239 && buf[1] === 187 && buf[2] === 191;
@@ -113812,24 +113671,6 @@ var init_isBinaryContent$1 = __esmMin((() => {
113812
113671
  };
113813
113672
  }));
113814
113673
 
113815
- //#endregion
113816
- //#region ../../packages/file-loaders/src/utils/isBinaryContent.ts
113817
- var SNIFF_BYTES, sniffBinaryFile;
113818
- var init_isBinaryContent = __esmMin((() => {
113819
- init_isBinaryContent$1();
113820
- SNIFF_BYTES = 8192;
113821
- sniffBinaryFile = async (filePath) => {
113822
- const fd = await open(filePath, "r");
113823
- try {
113824
- const buffer = Buffer.alloc(SNIFF_BYTES);
113825
- const { bytesRead } = await fd.read(buffer, 0, SNIFF_BYTES, 0);
113826
- return sniffBinaryBuffer(buffer.subarray(0, bytesRead));
113827
- } finally {
113828
- await fd.close();
113829
- }
113830
- };
113831
- }));
113832
-
113833
113674
  //#endregion
113834
113675
  //#region ../../packages/file-loaders/src/loaders/ipynb/index.ts
113835
113676
  var ipynb_exports = /* @__PURE__ */ __exportAll({
@@ -113839,16 +113680,16 @@ var ipynb_exports = /* @__PURE__ */ __exportAll({
113839
113680
  });
113840
113681
  var import_src$2, log$7, SCRIPT_TAG_RE, ANSI_RE, MIME_TOKEN, DATA_URI_RE, BASE64_RUN_RE, BASE64_SEPARATOR_RE, NON_BASE64_RE, BASE64_SCRUB_THRESHOLD, joinSource, cleanStreamText, STYLE_BOUNDARY, stripStyleTags, humanSize, humanChars, base64Bytes, scrubDataUris, base64Placeholder, scrubIpynbFallbackText, singleLine, fence, convertOutput, isNotebookCell, convertCell, convertIpynbToBlocks, convertIpynbToMarkdown, BinaryNotebookError, IpynbLoader;
113841
113682
  var init_ipynb = __esmMin((() => {
113842
- import_src$2 = /* @__PURE__ */ __toESM$2(require_src());
113843
113683
  init_isBinaryContent();
113684
+ import_src$2 = /* @__PURE__ */ __toESM(require_src());
113844
113685
  log$7 = (0, import_src$2.default)("file-loaders:ipynb");
113845
113686
  SCRIPT_TAG_RE = /<script[\t\n\f\r />]/i;
113846
- ANSI_RE = /\u001B\[[\d:;?]*[\u0020-\u002F]*[\u0040-\u007E]|\u001B\][^\u0007\u001B\u009C]{0,256}(?:\u0007|\u001B\\)?|\u001B[\u0021-\u002F]{0,2}[\u0030-\u007E]|\u001B|\u0007|\u009C/g;
113687
+ ANSI_RE = /\u001B\[[\d:;?]*[\u0020-\u002F]*[\u0040-\u007E]|\u001B\][^\u0007\u001B\u009C]{0,256}(?:\u0007|\u001B\\)?|\u001B[\u0021-\u002F]{0,2}[\u0030-\u007E]|[\u001B\u0007\u009C]/g;
113847
113688
  MIME_TOKEN = "[^\\s()<>@,;:\\\\\"/\\[\\]?=]+";
113848
113689
  DATA_URI_RE = new RegExp(`data:(${MIME_TOKEN}/${MIME_TOKEN})?(?:;${MIME_TOKEN}=${MIME_TOKEN})*;base64,([\\d+/=A-Za-z]{256,})`, "gi");
113849
113690
  BASE64_RUN_RE = /[\d+/=A-Za-z]{32,}(?:(?:"[\s,]*"|\\n|\r?\n)+[\d+/=A-Za-z]{32,})*/g;
113850
113691
  BASE64_SEPARATOR_RE = /((?:"[\s,]*"|\\n|\r?\n)+)/;
113851
- NON_BASE64_RE = /[^\d+/=A-Za-z]/g;
113692
+ NON_BASE64_RE = /[^\d+/=A-Z]/gi;
113852
113693
  BASE64_SCRUB_THRESHOLD = 1024;
113853
113694
  joinSource = (source) => Array.isArray(source) ? source.filter((part) => typeof part === "string").join("") : typeof source === "string" ? source : "";
113854
113695
  cleanStreamText = (text) => text.replaceAll(ANSI_RE, "").replaceAll("\r\n", "\n").split("\n").map((line) => {
@@ -222583,7 +222424,7 @@ var init_pdf_worker = __esmMin((() => {
222583
222424
  var pdf_exports = /* @__PURE__ */ __exportAll({ PdfLoader: () => PdfLoader });
222584
222425
  var import_src$1, log$6, pdfjsPromise, loadPdfjs, PdfLoader;
222585
222426
  var init_pdf = __esmMin((() => {
222586
- import_src$1 = /* @__PURE__ */ __toESM$2(require_src());
222427
+ import_src$1 = /* @__PURE__ */ __toESM(require_src());
222587
222428
  init_domMatrix();
222588
222429
  init_prompt();
222589
222430
  log$6 = (0, import_src$1.default)("file-loaders:pdf");
@@ -234152,8 +233993,8 @@ function extractFiles(zipInput, filterFn) {
234152
233993
  var import_lib$2, import_concat_stream, import_yauzl, ERRORMSG, parseString;
234153
233994
  var init_parser_utils = __esmMin((() => {
234154
233995
  import_lib$2 = require_lib$1();
234155
- import_concat_stream = /* @__PURE__ */ __toESM$2(require_concat_stream());
234156
- import_yauzl = /* @__PURE__ */ __toESM$2(require_yauzl());
233996
+ import_concat_stream = /* @__PURE__ */ __toESM(require_concat_stream());
233997
+ import_yauzl = /* @__PURE__ */ __toESM(require_yauzl());
234157
233998
  ERRORMSG = {
234158
233999
  fileCorrupted: (filepath) => `[OfficeParser]: Your file ${typeof filepath === "string" ? filepath : "Buffer"} seems to be corrupted. If you are sure it is fine, please create a ticket.`,
234159
234000
  invalidInput: `[OfficeParser]: Invalid input type: Expected a Buffer or a valid file path`
@@ -234168,7 +234009,7 @@ var init_parser_utils = __esmMin((() => {
234168
234009
  var pptx_exports = /* @__PURE__ */ __exportAll({ PptxLoader: () => PptxLoader });
234169
234010
  var import_src, log$5, PptxLoader;
234170
234011
  var init_pptx = __esmMin((() => {
234171
- import_src = /* @__PURE__ */ __toESM$2(require_src());
234012
+ import_src = /* @__PURE__ */ __toESM(require_src());
234172
234013
  init_parser_utils();
234173
234014
  log$5 = (0, import_src.default)("file-loaders:pptx");
234174
234015
  PptxLoader = class {
@@ -234550,6 +234391,7 @@ const loadFile = async (filePath, fileMetadata) => {
234550
234391
  let pages;
234551
234392
  let aggregatedContent = "";
234552
234393
  let loaderError;
234394
+ let pageError;
234553
234395
  let aggregationError;
234554
234396
  let metadataError;
234555
234397
  let loaderSpecificMetadata;
@@ -234561,6 +234403,7 @@ const loadFile = async (filePath, fileMetadata) => {
234561
234403
  log$4("Loading pages with loader:", LoaderClass.name, "for file:", filePath);
234562
234404
  pages = await loaderInstance.loadPages(filePath);
234563
234405
  log$4("Pages loaded successfully, count:", pages.length);
234406
+ if (pages.length > 0 && pages.every((page) => page.metadata?.error)) pageError = [...new Set(pages.map((page) => page.metadata.error))].join("; ");
234564
234407
  try {
234565
234408
  log$4("Aggregating content with loader:", LoaderClass.name);
234566
234409
  aggregatedContent = await loaderInstance.aggregateContent(pages);
@@ -234615,6 +234458,7 @@ const loadFile = async (filePath, fileMetadata) => {
234615
234458
  const combinedError = [
234616
234459
  fsError,
234617
234460
  loaderError,
234461
+ pageError,
234618
234462
  aggregationError,
234619
234463
  metadataError
234620
234464
  ].filter(Boolean).join("; ") || void 0;
@@ -234645,6 +234489,24 @@ const loadFile = async (filePath, fileMetadata) => {
234645
234489
  return fileDocument;
234646
234490
  };
234647
234491
 
234492
+ //#endregion
234493
+ //#region ../../packages/file-loaders/src/utils/isBinaryContent.ts
234494
+ init_isBinaryContent();
234495
+ const SNIFF_BYTES = 8192;
234496
+ /**
234497
+ * Read up to the leading 8KB of a file and run the binary heuristic on it.
234498
+ */
234499
+ const sniffBinaryFile = async (filePath) => {
234500
+ const fd = await open(filePath, "r");
234501
+ try {
234502
+ const buffer = Buffer.alloc(SNIFF_BYTES);
234503
+ const { bytesRead } = await fd.read(buffer, 0, SNIFF_BYTES, 0);
234504
+ return sniffBinaryBuffer(buffer.subarray(0, bytesRead));
234505
+ } finally {
234506
+ await fd.close();
234507
+ }
234508
+ };
234509
+
234648
234510
  //#endregion
234649
234511
  //#region ../../packages/local-file-shell/src/file/list.ts
234650
234512
  async function listLocalFiles({ path: rawPath, sortBy = "modifiedTime", sortOrder = "desc", limit = 100, cwd }, options) {
@@ -234810,7 +234672,9 @@ async function readLocalFile({ path: rawPath, loc, fullContent, cwd }) {
234810
234672
  if (!SPECIAL_PARSED_FILE_TYPES.includes(extension)) try {
234811
234673
  const sniff = await sniffBinaryFile(filePath);
234812
234674
  if (sniff.isBinary) return buildErrorResult(filePath, `Error: File appears to be binary (${sniff.reason}). Refusing to read as text.`);
234813
- } catch {}
234675
+ } catch (error) {
234676
+ if (!error.code) return buildErrorResult(filePath, `Error: Failed to check whether the file is binary: ${error.message}`);
234677
+ }
234814
234678
  try {
234815
234679
  const fileDocument = await loadFile(filePath);
234816
234680
  if (fileDocument.metadata?.error) return {
@@ -237643,7 +237507,7 @@ const listListeningPorts = async (params = {}) => {
237643
237507
 
237644
237508
  //#endregion
237645
237509
  //#region ../../packages/device-control/src/projectFileSearchManager.ts
237646
- var import_out = /* @__PURE__ */ __toESM$2(require_out());
237510
+ var import_out = /* @__PURE__ */ __toESM(require_out());
237647
237511
  const PROJECT_FILE_SEARCH_SCAN_LIMIT = 5e3;
237648
237512
  const PROJECT_FILE_SEARCH_COMMAND_TIMEOUT_MS = 1e4;
237649
237513
  var ProjectFileSearchManager = class {
@@ -246923,7 +246787,7 @@ var require_gray_matter = /* @__PURE__ */ __commonJSMin(((exports, module) => {
246923
246787
 
246924
246788
  //#endregion
246925
246789
  //#region ../../packages/device-control/src/workspace.ts
246926
- var import_gray_matter = /* @__PURE__ */ __toESM$2(require_gray_matter());
246790
+ var import_gray_matter = /* @__PURE__ */ __toESM(require_gray_matter());
246927
246791
  const MAX_SKILL_FILE_COUNT = 1e3;
246928
246792
  const DEFAULT_DIRECTORY_PAGE_SIZE = 200;
246929
246793
  const MAX_DIRECTORY_PAGE_SIZE = 1e3;
@@ -250853,14 +250717,14 @@ var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module)
250853
250717
 
250854
250718
  //#endregion
250855
250719
  //#region ../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/wrapper.mjs
250856
- var import_stream = /* @__PURE__ */ __toESM$2(require_stream(), 1);
250857
- var import_extension = /* @__PURE__ */ __toESM$2(require_extension(), 1);
250858
- var import_permessage_deflate = /* @__PURE__ */ __toESM$2(require_permessage_deflate(), 1);
250859
- var import_receiver = /* @__PURE__ */ __toESM$2(require_receiver(), 1);
250860
- var import_sender = /* @__PURE__ */ __toESM$2(require_sender(), 1);
250861
- var import_subprotocol = /* @__PURE__ */ __toESM$2(require_subprotocol(), 1);
250862
- var import_websocket = /* @__PURE__ */ __toESM$2(require_websocket(), 1);
250863
- var import_websocket_server = /* @__PURE__ */ __toESM$2(require_websocket_server(), 1);
250720
+ var import_stream = /* @__PURE__ */ __toESM(require_stream(), 1);
250721
+ var import_extension = /* @__PURE__ */ __toESM(require_extension(), 1);
250722
+ var import_permessage_deflate = /* @__PURE__ */ __toESM(require_permessage_deflate(), 1);
250723
+ var import_receiver = /* @__PURE__ */ __toESM(require_receiver(), 1);
250724
+ var import_sender = /* @__PURE__ */ __toESM(require_sender(), 1);
250725
+ var import_subprotocol = /* @__PURE__ */ __toESM(require_subprotocol(), 1);
250726
+ var import_websocket = /* @__PURE__ */ __toESM(require_websocket(), 1);
250727
+ var import_websocket_server = /* @__PURE__ */ __toESM(require_websocket_server(), 1);
250864
250728
  var wrapper_default = import_websocket.default;
250865
250729
 
250866
250730
  //#endregion
@@ -251880,7 +251744,7 @@ const getHeterogeneousTypeLabel = (type) => {
251880
251744
  init_cliSpawn();
251881
251745
  init_resolveCliCommand();
251882
251746
  const execFilePromise = promisify(execFile);
251883
- const MODEL_CATALOG_MAX_BUFFER = 256 * 1024;
251747
+ const MODEL_CATALOG_MAX_BUFFER = 4 * 1024 * 1024;
251884
251748
  const MODEL_CATALOG_TIMEOUT_MS = 15e3;
251885
251749
  const CODEBUDDY_MODEL_OPTION = "--model <model>";
251886
251750
  const CODEBUDDY_SUPPORTED_MODELS_LABEL = "Currently supported:";
@@ -254584,7 +254448,7 @@ const fixCwdError = (originalMessage, cwd) => {
254584
254448
 
254585
254449
  //#endregion
254586
254450
  //#region ../../node_modules/.pnpm/execa@9.6.1/node_modules/execa/lib/arguments/options.js
254587
- var import_cross_spawn = /* @__PURE__ */ __toESM$2(require_cross_spawn(), 1);
254451
+ var import_cross_spawn = /* @__PURE__ */ __toESM(require_cross_spawn(), 1);
254588
254452
  const normalizeOptions = (filePath, rawArguments, rawOptions) => {
254589
254453
  rawOptions.cwd = normalizeCwd(rawOptions.cwd);
254590
254454
  const [processedFile, processedArguments, processedOptions] = handleNodeOption(filePath, rawArguments, rawOptions);
@@ -260003,7 +259867,7 @@ if (-not \$__lobeExecOk) {
260003
259867
 
260004
259868
  //#endregion
260005
259869
  //#region ../../packages/local-file-shell/src/shell/process-manager.ts
260006
- var import_tree_kill = /* @__PURE__ */ __toESM$2(require_tree_kill());
259870
+ var import_tree_kill = /* @__PURE__ */ __toESM(require_tree_kill());
260007
259871
  const DEFAULT_OBSERVATION_TIMEOUT_MS = 6e4;
260008
259872
  /**
260009
259873
  * Ceiling on a single observation window. Sized for the real unit of work an
@@ -282760,7 +282624,7 @@ function daysFromNow(days) {
282760
282624
  }
282761
282625
  var import_lib$1, asn1, pki$1, md, random, util$2, getTBSCertificate, PEM_CERT_BLOCK, CRL_PATH, C, T;
282762
282626
  var init_mitm_ca = __esmMin((() => {
282763
- import_lib$1 = /* @__PURE__ */ __toESM$2(require_lib(), 1);
282627
+ import_lib$1 = /* @__PURE__ */ __toESM(require_lib(), 1);
282764
282628
  init_debug();
282765
282629
  ({asn1, pki: pki$1, md, random, util: util$2} = import_lib$1.default);
282766
282630
  getTBSCertificate = pki$1.getTBSCertificate;
@@ -283081,7 +282945,7 @@ function clampValidity(caCert, notBefore) {
283081
282945
  }
283082
282946
  var import_lib, pki;
283083
282947
  var init_mitm_leaf = __esmMin((() => {
283084
- import_lib = /* @__PURE__ */ __toESM$2(require_lib(), 1);
282948
+ import_lib = /* @__PURE__ */ __toESM(require_lib(), 1);
283085
282949
  init_debug();
283086
282950
  init_mitm_ca();
283087
282951
  ({pki} = import_lib.default);
@@ -508640,7 +508504,7 @@ const executionChecks = [
508640
508504
  ];
508641
508505
 
508642
508506
  //#endregion
508643
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/constants.js
508507
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/constants.js
508644
508508
  var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
508645
508509
  const SEMVER_SPEC_VERSION = "2.0.0";
508646
508510
  const MAX_LENGTH = 256;
@@ -508669,14 +508533,14 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
508669
508533
  }));
508670
508534
 
508671
508535
  //#endregion
508672
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/debug.js
508536
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/debug.js
508673
508537
  var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
508674
508538
  const debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {};
508675
508539
  module.exports = debug;
508676
508540
  }));
508677
508541
 
508678
508542
  //#endregion
508679
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/re.js
508543
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/re.js
508680
508544
  var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
508681
508545
  const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants();
508682
508546
  const debug = require_debug();
@@ -508756,7 +508620,7 @@ var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
508756
508620
  }));
508757
508621
 
508758
508622
  //#endregion
508759
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/parse-options.js
508623
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/parse-options.js
508760
508624
  var require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
508761
508625
  const looseOption = Object.freeze({ loose: true });
508762
508626
  const emptyOpts = Object.freeze({});
@@ -508769,7 +508633,7 @@ var require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) =>
508769
508633
  }));
508770
508634
 
508771
508635
  //#endregion
508772
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js
508636
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js
508773
508637
  var require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
508774
508638
  const numeric = /^[0-9]+$/;
508775
508639
  const compareIdentifiers = (a, b) => {
@@ -508790,7 +508654,7 @@ var require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
508790
508654
  }));
508791
508655
 
508792
508656
  //#endregion
508793
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/semver.js
508657
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/semver.js
508794
508658
  var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
508795
508659
  const debug = require_debug();
508796
508660
  const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
@@ -508977,7 +508841,7 @@ var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
508977
508841
  }));
508978
508842
 
508979
508843
  //#endregion
508980
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js
508844
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js
508981
508845
  var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
508982
508846
  const SemVer = require_semver$1();
508983
508847
  const parse = (version, options, throwErrors = false) => {
@@ -508993,7 +508857,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
508993
508857
  }));
508994
508858
 
508995
508859
  //#endregion
508996
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js
508860
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js
508997
508861
  var require_valid$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
508998
508862
  const parse = require_parse();
508999
508863
  const valid = (version, options) => {
@@ -509004,7 +508868,7 @@ var require_valid$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509004
508868
  }));
509005
508869
 
509006
508870
  //#endregion
509007
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js
508871
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js
509008
508872
  var require_clean = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509009
508873
  const parse = require_parse();
509010
508874
  const clean = (version, options) => {
@@ -509015,7 +508879,7 @@ var require_clean = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509015
508879
  }));
509016
508880
 
509017
508881
  //#endregion
509018
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/inc.js
508882
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/inc.js
509019
508883
  var require_inc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509020
508884
  const SemVer = require_semver$1();
509021
508885
  const inc = (version, release, options, identifier, identifierBase) => {
@@ -509034,7 +508898,7 @@ var require_inc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509034
508898
  }));
509035
508899
 
509036
508900
  //#endregion
509037
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js
508901
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js
509038
508902
  var require_diff = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509039
508903
  const parse = require_parse();
509040
508904
  const diff = (version1, version2) => {
@@ -509063,7 +508927,7 @@ var require_diff = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509063
508927
  }));
509064
508928
 
509065
508929
  //#endregion
509066
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/major.js
508930
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/major.js
509067
508931
  var require_major = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509068
508932
  const SemVer = require_semver$1();
509069
508933
  const major = (a, loose) => new SemVer(a, loose).major;
@@ -509071,7 +508935,7 @@ var require_major = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509071
508935
  }));
509072
508936
 
509073
508937
  //#endregion
509074
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/minor.js
508938
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/minor.js
509075
508939
  var require_minor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509076
508940
  const SemVer = require_semver$1();
509077
508941
  const minor = (a, loose) => new SemVer(a, loose).minor;
@@ -509079,7 +508943,7 @@ var require_minor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509079
508943
  }));
509080
508944
 
509081
508945
  //#endregion
509082
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/patch.js
508946
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/patch.js
509083
508947
  var require_patch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509084
508948
  const SemVer = require_semver$1();
509085
508949
  const patch = (a, loose) => new SemVer(a, loose).patch;
@@ -509087,7 +508951,7 @@ var require_patch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509087
508951
  }));
509088
508952
 
509089
508953
  //#endregion
509090
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js
508954
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js
509091
508955
  var require_prerelease = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509092
508956
  const parse = require_parse();
509093
508957
  const prerelease = (version, options) => {
@@ -509098,7 +508962,7 @@ var require_prerelease = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509098
508962
  }));
509099
508963
 
509100
508964
  //#endregion
509101
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare.js
508965
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare.js
509102
508966
  var require_compare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509103
508967
  const SemVer = require_semver$1();
509104
508968
  const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
@@ -509106,7 +508970,7 @@ var require_compare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509106
508970
  }));
509107
508971
 
509108
508972
  //#endregion
509109
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rcompare.js
508973
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rcompare.js
509110
508974
  var require_rcompare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509111
508975
  const compare = require_compare();
509112
508976
  const rcompare = (a, b, loose) => compare(b, a, loose);
@@ -509114,7 +508978,7 @@ var require_rcompare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509114
508978
  }));
509115
508979
 
509116
508980
  //#endregion
509117
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-loose.js
508981
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-loose.js
509118
508982
  var require_compare_loose = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509119
508983
  const compare = require_compare();
509120
508984
  const compareLoose = (a, b) => compare(a, b, true);
@@ -509122,7 +508986,7 @@ var require_compare_loose = /* @__PURE__ */ __commonJSMin(((exports, module) =>
509122
508986
  }));
509123
508987
 
509124
508988
  //#endregion
509125
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-build.js
508989
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-build.js
509126
508990
  var require_compare_build = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509127
508991
  const SemVer = require_semver$1();
509128
508992
  const compareBuild = (a, b, loose) => {
@@ -509134,7 +508998,7 @@ var require_compare_build = /* @__PURE__ */ __commonJSMin(((exports, module) =>
509134
508998
  }));
509135
508999
 
509136
509000
  //#endregion
509137
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/sort.js
509001
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/sort.js
509138
509002
  var require_sort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509139
509003
  const compareBuild = require_compare_build();
509140
509004
  const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
@@ -509142,7 +509006,7 @@ var require_sort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509142
509006
  }));
509143
509007
 
509144
509008
  //#endregion
509145
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rsort.js
509009
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rsort.js
509146
509010
  var require_rsort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509147
509011
  const compareBuild = require_compare_build();
509148
509012
  const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
@@ -509150,7 +509014,7 @@ var require_rsort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509150
509014
  }));
509151
509015
 
509152
509016
  //#endregion
509153
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gt.js
509017
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gt.js
509154
509018
  var require_gt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509155
509019
  const compare = require_compare();
509156
509020
  const gt = (a, b, loose) => compare(a, b, loose) > 0;
@@ -509158,7 +509022,7 @@ var require_gt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509158
509022
  }));
509159
509023
 
509160
509024
  //#endregion
509161
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lt.js
509025
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lt.js
509162
509026
  var require_lt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509163
509027
  const compare = require_compare();
509164
509028
  const lt = (a, b, loose) => compare(a, b, loose) < 0;
@@ -509166,7 +509030,7 @@ var require_lt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509166
509030
  }));
509167
509031
 
509168
509032
  //#endregion
509169
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/eq.js
509033
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/eq.js
509170
509034
  var require_eq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509171
509035
  const compare = require_compare();
509172
509036
  const eq = (a, b, loose) => compare(a, b, loose) === 0;
@@ -509174,7 +509038,7 @@ var require_eq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509174
509038
  }));
509175
509039
 
509176
509040
  //#endregion
509177
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/neq.js
509041
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/neq.js
509178
509042
  var require_neq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509179
509043
  const compare = require_compare();
509180
509044
  const neq = (a, b, loose) => compare(a, b, loose) !== 0;
@@ -509182,7 +509046,7 @@ var require_neq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509182
509046
  }));
509183
509047
 
509184
509048
  //#endregion
509185
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gte.js
509049
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gte.js
509186
509050
  var require_gte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509187
509051
  const compare = require_compare();
509188
509052
  const gte = (a, b, loose) => compare(a, b, loose) >= 0;
@@ -509190,7 +509054,7 @@ var require_gte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509190
509054
  }));
509191
509055
 
509192
509056
  //#endregion
509193
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lte.js
509057
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lte.js
509194
509058
  var require_lte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509195
509059
  const compare = require_compare();
509196
509060
  const lte = (a, b, loose) => compare(a, b, loose) <= 0;
@@ -509198,7 +509062,7 @@ var require_lte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509198
509062
  }));
509199
509063
 
509200
509064
  //#endregion
509201
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/cmp.js
509065
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/cmp.js
509202
509066
  var require_cmp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509203
509067
  const eq = require_eq();
509204
509068
  const neq = require_neq();
@@ -509231,7 +509095,7 @@ var require_cmp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509231
509095
  }));
509232
509096
 
509233
509097
  //#endregion
509234
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js
509098
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js
509235
509099
  var require_coerce = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509236
509100
  const SemVer = require_semver$1();
509237
509101
  const parse = require_parse();
@@ -509260,7 +509124,7 @@ var require_coerce = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509260
509124
  }));
509261
509125
 
509262
509126
  //#endregion
509263
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js
509127
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js
509264
509128
  var require_truncate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509265
509129
  const parse = require_parse();
509266
509130
  const constants = require_constants();
@@ -509294,7 +509158,7 @@ var require_truncate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509294
509158
  }));
509295
509159
 
509296
509160
  //#endregion
509297
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/lrucache.js
509161
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/lrucache.js
509298
509162
  var require_lrucache = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509299
509163
  var LRUCache = class {
509300
509164
  constructor() {
@@ -509328,7 +509192,7 @@ var require_lrucache = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509328
509192
  }));
509329
509193
 
509330
509194
  //#endregion
509331
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/range.js
509195
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/range.js
509332
509196
  var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509333
509197
  const SPACE_CHARACTERS = /\s+/g;
509334
509198
  var Range = class Range {
@@ -509607,7 +509471,7 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509607
509471
  }));
509608
509472
 
509609
509473
  //#endregion
509610
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/comparator.js
509474
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/comparator.js
509611
509475
  var require_comparator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509612
509476
  const ANY = Symbol("SemVer ANY");
509613
509477
  var Comparator = class Comparator {
@@ -509679,7 +509543,7 @@ var require_comparator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509679
509543
  }));
509680
509544
 
509681
509545
  //#endregion
509682
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/satisfies.js
509546
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/satisfies.js
509683
509547
  var require_satisfies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509684
509548
  const Range = require_range();
509685
509549
  const satisfies = (version, range, options) => {
@@ -509694,7 +509558,7 @@ var require_satisfies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509694
509558
  }));
509695
509559
 
509696
509560
  //#endregion
509697
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/to-comparators.js
509561
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/to-comparators.js
509698
509562
  var require_to_comparators = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509699
509563
  const Range = require_range();
509700
509564
  const toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
@@ -509702,7 +509566,7 @@ var require_to_comparators = /* @__PURE__ */ __commonJSMin(((exports, module) =>
509702
509566
  }));
509703
509567
 
509704
509568
  //#endregion
509705
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/max-satisfying.js
509569
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/max-satisfying.js
509706
509570
  var require_max_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509707
509571
  const SemVer = require_semver$1();
509708
509572
  const Range = require_range();
@@ -509729,7 +509593,7 @@ var require_max_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) =>
509729
509593
  }));
509730
509594
 
509731
509595
  //#endregion
509732
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-satisfying.js
509596
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-satisfying.js
509733
509597
  var require_min_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509734
509598
  const SemVer = require_semver$1();
509735
509599
  const Range = require_range();
@@ -509756,7 +509620,7 @@ var require_min_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) =>
509756
509620
  }));
509757
509621
 
509758
509622
  //#endregion
509759
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-version.js
509623
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-version.js
509760
509624
  var require_min_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509761
509625
  const SemVer = require_semver$1();
509762
509626
  const Range = require_range();
@@ -509797,7 +509661,7 @@ var require_min_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509797
509661
  }));
509798
509662
 
509799
509663
  //#endregion
509800
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/valid.js
509664
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/valid.js
509801
509665
  var require_valid = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509802
509666
  const Range = require_range();
509803
509667
  const validRange = (range, options) => {
@@ -509811,7 +509675,7 @@ var require_valid = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509811
509675
  }));
509812
509676
 
509813
509677
  //#endregion
509814
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/outside.js
509678
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/outside.js
509815
509679
  var require_outside = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509816
509680
  const SemVer = require_semver$1();
509817
509681
  const Comparator = require_comparator();
@@ -509865,7 +509729,7 @@ var require_outside = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509865
509729
  }));
509866
509730
 
509867
509731
  //#endregion
509868
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/gtr.js
509732
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/gtr.js
509869
509733
  var require_gtr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509870
509734
  const outside = require_outside();
509871
509735
  const gtr = (version, range, options) => outside(version, range, ">", options);
@@ -509873,7 +509737,7 @@ var require_gtr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509873
509737
  }));
509874
509738
 
509875
509739
  //#endregion
509876
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/ltr.js
509740
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/ltr.js
509877
509741
  var require_ltr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509878
509742
  const outside = require_outside();
509879
509743
  const ltr = (version, range, options) => outside(version, range, "<", options);
@@ -509881,7 +509745,7 @@ var require_ltr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509881
509745
  }));
509882
509746
 
509883
509747
  //#endregion
509884
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/intersects.js
509748
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/intersects.js
509885
509749
  var require_intersects = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509886
509750
  const Range = require_range();
509887
509751
  const intersects = (r1, r2, options) => {
@@ -509893,7 +509757,7 @@ var require_intersects = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509893
509757
  }));
509894
509758
 
509895
509759
  //#endregion
509896
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/simplify.js
509760
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/simplify.js
509897
509761
  var require_simplify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509898
509762
  const satisfies = require_satisfies();
509899
509763
  const compare = require_compare();
@@ -509924,7 +509788,7 @@ var require_simplify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509924
509788
  }));
509925
509789
 
509926
509790
  //#endregion
509927
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/subset.js
509791
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/subset.js
509928
509792
  var require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => {
509929
509793
  const Range = require_range();
509930
509794
  const Comparator = require_comparator();
@@ -510020,7 +509884,7 @@ var require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => {
510020
509884
  }));
510021
509885
 
510022
509886
  //#endregion
510023
- //#region ../desktop/node_modules/.pnpm/semver@7.8.5/node_modules/semver/index.js
509887
+ //#region node_modules/.pnpm/semver@7.8.5/node_modules/semver/index.js
510024
509888
  var require_semver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
510025
509889
  const internalRe = require_re();
510026
509890
  const constants = require_constants();
@@ -510116,7 +509980,7 @@ var require_semver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
510116
509980
 
510117
509981
  //#endregion
510118
509982
  //#region src/commands/update.ts
510119
- var import_semver = /* @__PURE__ */ __toESM$2(require_semver(), 1);
509983
+ var import_semver = /* @__PURE__ */ __toESM(require_semver(), 1);
510120
509984
  const PACKAGE_MANAGERS = [
510121
509985
  "npm",
510122
509986
  "pnpm",
@@ -516411,7 +516275,7 @@ function object(shape, params) {
516411
516275
  }
516412
516276
 
516413
516277
  //#endregion
516414
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
516278
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.1_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
516415
516279
  function isZ4Schema(s) {
516416
516280
  return !!s._zod;
516417
516281
  }
@@ -516535,7 +516399,7 @@ function getLiteralValue(schema) {
516535
516399
  }
516536
516400
 
516537
516401
  //#endregion
516538
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
516402
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.1_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
516539
516403
  const LATEST_PROTOCOL_VERSION = "2025-11-25";
516540
516404
  const DEFAULT_NEGOTIATED_PROTOCOL_VERSION = "2025-03-26";
516541
516405
  const SUPPORTED_PROTOCOL_VERSIONS = [
@@ -518501,7 +518365,7 @@ var UrlElicitationRequiredError = class extends McpError {
518501
518365
  };
518502
518366
 
518503
518367
  //#endregion
518504
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
518368
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.1_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
518505
518369
  /**
518506
518370
  * Experimental task interfaces for MCP SDK.
518507
518371
  * WARNING: These APIs are experimental and may change without notice.
@@ -519644,7 +519508,7 @@ const zodToJsonSchema = (schema, options) => {
519644
519508
  };
519645
519509
 
519646
519510
  //#endregion
519647
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
519511
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.1_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
519648
519512
  function mapMiniTarget(t) {
519649
519513
  if (!t) return "draft-7";
519650
519514
  if (t === "jsonSchema7" || t === "draft-7") return "draft-7";
@@ -519675,7 +519539,7 @@ function parseWithCompat(schema, data) {
519675
519539
  }
519676
519540
 
519677
519541
  //#endregion
519678
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
519542
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.1_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
519679
519543
  /**
519680
519544
  * The default request timeout, in miliseconds.
519681
519545
  */
@@ -520832,11 +520696,11 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
520832
520696
  }));
520833
520697
 
520834
520698
  //#endregion
520835
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
520699
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.1_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
520836
520700
  /**
520837
520701
  * AJV-based JSON Schema validator provider
520838
520702
  */
520839
- var import_dist = /* @__PURE__ */ __toESM$2(require_dist(), 1);
520703
+ var import_dist = /* @__PURE__ */ __toESM(require_dist(), 1);
520840
520704
  function createDefaultAjvInstance() {
520841
520705
  const ajv = new import_ajv.default({
520842
520706
  strict: false,
@@ -520911,7 +520775,7 @@ var AjvJsonSchemaValidator = class {
520911
520775
  };
520912
520776
 
520913
520777
  //#endregion
520914
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
520778
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.1_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
520915
520779
  /**
520916
520780
  * Experimental server task features for MCP SDK.
520917
520781
  * WARNING: These APIs are experimental and may change without notice.
@@ -521132,7 +520996,7 @@ var ExperimentalServerTasks = class {
521132
520996
  };
521133
520997
 
521134
520998
  //#endregion
521135
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
520999
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.1_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
521136
521000
  /**
521137
521001
  * Experimental task capability assertion helpers.
521138
521002
  * WARNING: These APIs are experimental and may change without notice.
@@ -521184,7 +521048,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
521184
521048
  }
521185
521049
 
521186
521050
  //#endregion
521187
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
521051
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.1_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
521188
521052
  /**
521189
521053
  * An MCP server on top of a pluggable transport.
521190
521054
  *
@@ -521519,7 +521383,7 @@ var Server = class extends Protocol {
521519
521383
  };
521520
521384
 
521521
521385
  //#endregion
521522
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
521386
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.1_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
521523
521387
  const COMPLETABLE_SYMBOL = Symbol.for("mcp.completable");
521524
521388
  /**
521525
521389
  * Checks if a schema is completable (has completion metadata).
@@ -521539,7 +521403,7 @@ var McpZodTypeKind;
521539
521403
  })(McpZodTypeKind || (McpZodTypeKind = {}));
521540
521404
 
521541
521405
  //#endregion
521542
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js
521406
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.1_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js
521543
521407
  /**
521544
521408
  * Tool name validation utilities according to SEP: Specify Format for Tool Names
521545
521409
  *
@@ -521611,7 +521475,7 @@ function validateAndWarnToolName(name) {
521611
521475
  }
521612
521476
 
521613
521477
  //#endregion
521614
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js
521478
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.1_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js
521615
521479
  /**
521616
521480
  * Experimental McpServer task features for MCP SDK.
521617
521481
  * WARNING: These APIs are experimental and may change without notice.
@@ -521643,7 +521507,7 @@ var ExperimentalMcpServerTasks = class {
521643
521507
  };
521644
521508
 
521645
521509
  //#endregion
521646
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
521510
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.1_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
521647
521511
  init_zod$1();
521648
521512
  /**
521649
521513
  * High-level MCP server that provides a simpler API for working with resources, tools, and prompts.
@@ -522271,11 +522135,11 @@ const EMPTY_COMPLETION_RESULT = { completion: {
522271
522135
  } };
522272
522136
 
522273
522137
  //#endregion
522274
- //#region ../../node_modules/.pnpm/@hono+node-server@2.1.1_hono@4.13.8/node_modules/@hono/node-server/dist/constants-BLSFu_RU.mjs
522138
+ //#region ../../node_modules/.pnpm/@hono+node-server@2.1.1_hono@4.13.9/node_modules/@hono/node-server/dist/constants-BLSFu_RU.mjs
522275
522139
  const X_ALREADY_SENT = "x-hono-already-sent";
522276
522140
 
522277
522141
  //#endregion
522278
- //#region ../../node_modules/.pnpm/hono@4.13.8/node_modules/hono/dist/helper/websocket/index.js
522142
+ //#region ../../node_modules/.pnpm/hono@4.13.9/node_modules/hono/dist/helper/websocket/index.js
522279
522143
  var defineWebSocketHelper = (handler) => {
522280
522144
  return ((...args) => {
522281
522145
  if (typeof args[0] === "function") {
@@ -522297,7 +522161,7 @@ var defineWebSocketHelper = (handler) => {
522297
522161
  };
522298
522162
 
522299
522163
  //#endregion
522300
- //#region ../../node_modules/.pnpm/@hono+node-server@2.1.1_hono@4.13.8/node_modules/@hono/node-server/dist/index.mjs
522164
+ //#region ../../node_modules/.pnpm/@hono+node-server@2.1.1_hono@4.13.9/node_modules/@hono/node-server/dist/index.mjs
522301
522165
  var RequestError = class extends Error {
522302
522166
  constructor(message, options) {
522303
522167
  super(message, options);
@@ -523541,8 +523405,8 @@ var require_content_type = /* @__PURE__ */ __commonJSMin(((exports) => {
523541
523405
  }));
523542
523406
 
523543
523407
  //#endregion
523544
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/mediaType.js
523545
- var import_content_type = /* @__PURE__ */ __toESM$2(require_content_type(), 1);
523408
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.1_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/mediaType.js
523409
+ var import_content_type = /* @__PURE__ */ __toESM(require_content_type(), 1);
523546
523410
  /**
523547
523411
  * Extracts the media type (the lowercased `type/subtype` pair, without
523548
523412
  * parameters) from a raw `Content-Type` header value, or `undefined` when the
@@ -523588,7 +523452,58 @@ function isJsonContentType(header) {
523588
523452
  }
523589
523453
 
523590
523454
  //#endregion
523591
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/server/sseKeepAlive.js
523455
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.1_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/server/requestBody.js
523456
+ /** Default upper bound, in bytes, on a request body read by the HTTP entry points (4 MiB). */
523457
+ const DEFAULT_MAX_REQUEST_BODY_SIZE = 4 * 1024 * 1024;
523458
+ /** The message answered with 413 for a request body over `maxBytes`. */
523459
+ function requestBodyTooLargeMessage(maxBytes) {
523460
+ return `Payload Too Large: Request body must not exceed ${maxBytes} bytes`;
523461
+ }
523462
+ /**
523463
+ * Resolves a `maxRequestBodySize` option to the bound to apply: the default when
523464
+ * omitted, otherwise the value itself, which must be a positive finite number of
523465
+ * bytes (a `RangeError` is thrown at configuration time for anything else).
523466
+ */
523467
+ function resolveMaxRequestBodySize(value) {
523468
+ if (value === void 0) return DEFAULT_MAX_REQUEST_BODY_SIZE;
523469
+ if (typeof value !== "number" || !Number.isFinite(value) || value <= 0) throw new RangeError(`maxRequestBodySize must be a positive number of bytes, got ${String(value)}`);
523470
+ return value;
523471
+ }
523472
+ /**
523473
+ * Reads a request body as text, up to `maxBytes` (default
523474
+ * {@linkcode DEFAULT_MAX_REQUEST_BODY_SIZE}). A declared `Content-Length` over the
523475
+ * limit is refused without reading anything; otherwise the read stops as soon as
523476
+ * more than the limit has arrived. Stream failures propagate.
523477
+ */
523478
+ async function readRequestBody(request, maxBytes = DEFAULT_MAX_REQUEST_BODY_SIZE) {
523479
+ if (Number(request.headers.get("content-length")) > maxBytes) return { tooLarge: true };
523480
+ if (request.body === null) return {
523481
+ tooLarge: false,
523482
+ text: ""
523483
+ };
523484
+ const reader = request.body.getReader();
523485
+ const decoder = new TextDecoder();
523486
+ let received = 0;
523487
+ let text = "";
523488
+ try {
523489
+ for (;;) {
523490
+ const { done, value } = await reader.read();
523491
+ if (done) break;
523492
+ received += value.byteLength;
523493
+ if (received > maxBytes) return { tooLarge: true };
523494
+ text += decoder.decode(value, { stream: true });
523495
+ }
523496
+ } finally {
523497
+ reader.releaseLock();
523498
+ }
523499
+ return {
523500
+ tooLarge: false,
523501
+ text: text + decoder.decode()
523502
+ };
523503
+ }
523504
+
523505
+ //#endregion
523506
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.1_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/server/sseKeepAlive.js
523592
523507
  /** Default interval between SSE keep-alive comment frames. */
523593
523508
  const DEFAULT_SSE_KEEP_ALIVE_MS = 15e3;
523594
523509
  const MAX_TIMER_DELAY_MS = 2 ** 31 - 1;
@@ -523601,7 +523516,7 @@ function armSseKeepAlive(intervalMs, onTick) {
523601
523516
  }
523602
523517
 
523603
523518
  //#endregion
523604
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.js
523519
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.1_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.js
523605
523520
  /**
523606
523521
  * Web Standards Streamable HTTP Server Transport
523607
523522
  *
@@ -523680,6 +523595,7 @@ var WebStandardStreamableHTTPServerTransport = class {
523680
523595
  this._enableDnsRebindingProtection = options.enableDnsRebindingProtection ?? false;
523681
523596
  this._retryInterval = options.retryInterval;
523682
523597
  this._keepAliveMs = options.keepAliveMs ?? 15e3;
523598
+ this._maxRequestBodySize = resolveMaxRequestBodySize(options.maxRequestBodySize);
523683
523599
  }
523684
523600
  /**
523685
523601
  * Arms a keep-alive interval for an SSE stream that periodically writes an SSE
@@ -523971,11 +523887,21 @@ var WebStandardStreamableHTTPServerTransport = class {
523971
523887
  let rawMessage;
523972
523888
  if (options?.parsedBody !== void 0) rawMessage = options.parsedBody;
523973
523889
  else try {
523974
- rawMessage = await req.json();
523890
+ const body = await readRequestBody(req, this._maxRequestBodySize);
523891
+ if (body.tooLarge) {
523892
+ const message = requestBodyTooLargeMessage(this._maxRequestBodySize);
523893
+ this.onerror?.(new Error(message));
523894
+ return this.createJsonErrorResponse(413, -32e3, message);
523895
+ }
523896
+ rawMessage = JSON.parse(body.text);
523975
523897
  } catch {
523976
523898
  this.onerror?.(/* @__PURE__ */ new Error("Parse error: Invalid JSON"));
523977
523899
  return this.createJsonErrorResponse(400, -32700, "Parse error: Invalid JSON");
523978
523900
  }
523901
+ if (Array.isArray(rawMessage) && rawMessage.length > 100) {
523902
+ this.onerror?.(/* @__PURE__ */ new Error(`Invalid Request: Batch must not exceed ${100} messages`));
523903
+ return this.createJsonErrorResponse(400, -32600, `Invalid Request: Batch must not exceed ${100} messages`);
523904
+ }
523979
523905
  let messages;
523980
523906
  try {
523981
523907
  if (Array.isArray(rawMessage)) messages = rawMessage.map((msg) => JSONRPCMessageSchema.parse(msg));
@@ -524258,7 +524184,7 @@ var WebStandardStreamableHTTPServerTransport = class {
524258
524184
  };
524259
524185
 
524260
524186
  //#endregion
524261
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/server/streamableHttp.js
524187
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.1_@cfworker+json-schema@4.1.1_supports-color@10.2.2_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/server/streamableHttp.js
524262
524188
  /**
524263
524189
  * Node.js HTTP Streamable HTTP Server Transport
524264
524190
  *
@@ -528000,7 +527926,7 @@ function registerMessageCommand(program) {
528000
527926
  }
528001
527927
 
528002
527928
  //#endregion
528003
- //#region ../desktop/node_modules/.pnpm/ignore@7.0.6/node_modules/ignore/index.js
527929
+ //#region node_modules/.pnpm/ignore@7.0.10/node_modules/ignore/index.js
528004
527930
  var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
528005
527931
  function makeArray(subject) {
528006
527932
  return Array.isArray(subject) ? subject : [subject];
@@ -528009,13 +527935,15 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
528009
527935
  const EMPTY = "";
528010
527936
  const SPACE = " ";
528011
527937
  const ESCAPE = "\\";
528012
- const REGEX_TEST_BLANK_LINE = /^\s+$/;
527938
+ const REGEX_LITERAL_SPECIAL = /[.*+?()[\]{}^$|\\/]/;
527939
+ const REGEX_TEST_BLANK_LINE = /^\uFEFF? *$/;
528013
527940
  const REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/;
528014
527941
  const REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/;
528015
527942
  const REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/;
528016
527943
  const REGEX_SPLITALL_CRLF = /\r?\n/g;
528017
- const REGEX_TEST_INVALID_PATH = /^\.{0,2}\/|^\.{1,2}$/;
528018
- const REGEX_TEST_TRAILING_SLASH = /\/$/;
527944
+ const DOUBLE_SLASH = "//";
527945
+ const SLASH_CODE = 47;
527946
+ const DOT_CODE = 46;
528019
527947
  const SLASH = "/";
528020
527948
  let TMP_KEY_IGNORE = "node-ignore";
528021
527949
  /* istanbul ignore else */
@@ -528025,39 +527953,203 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
528025
527953
  Object.defineProperty(object, key, { value });
528026
527954
  return value;
528027
527955
  };
528028
- const REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g;
528029
527956
  const RETURN_FALSE = () => false;
528030
- const sanitizeRange = (range) => range.replace(REGEX_REGEXP_RANGE, (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) ? match : EMPTY);
528031
- const negateRange = (range) => range.startsWith("!") || range.startsWith("\\^") ? `^${range.slice(range[0] === "!" ? 1 : 2)}` : range;
528032
527957
  const cleanRangeBackSlash = (slashes) => {
528033
527958
  const { length } = slashes;
528034
527959
  return slashes.slice(0, length - length % 2);
528035
527960
  };
527961
+ const POSIX_CLASSES = {
527962
+ alnum: "0-9A-Za-z",
527963
+ alpha: "A-Za-z",
527964
+ blank: " \\t",
527965
+ cntrl: "\\x00-\\x1f\\x7f",
527966
+ digit: "0-9",
527967
+ graph: "!-.0-~",
527968
+ lower: "a-z",
527969
+ print: " -.0-~",
527970
+ punct: "!-.:-@\\[-`{-~",
527971
+ space: " \\t\\n\\r",
527972
+ upper: "A-Z",
527973
+ xdigit: "0-9A-Fa-f"
527974
+ };
527975
+ const CLASS_MEMBERS_TO_ESCAPE = "\\]^-[";
527976
+ const escapeMember = (char) => CLASS_MEMBERS_TO_ESCAPE.indexOf(char) < 0 ? char : ESCAPE + char;
527977
+ const NON_SLASH = "(?!\\/)";
527978
+ const classSource = (negated, body) => {
527979
+ if (negated) return `[^\\/${body}]`;
527980
+ const source = `[${body}]`;
527981
+ return new RegExp(source).test("/") ? NON_SLASH + source : source;
527982
+ };
527983
+ const scanBracket = (pattern, start) => {
527984
+ const { length } = pattern;
527985
+ let index = start + 1;
527986
+ let negated = EMPTY;
527987
+ const lead = pattern[index];
527988
+ if (lead === "!" || lead === "^") {
527989
+ negated = "^";
527990
+ index++;
527991
+ }
527992
+ let body = EMPTY;
527993
+ let prev = EMPTY;
527994
+ for (;;) {
527995
+ const char = pattern[index];
527996
+ if (char === UNDEFINED) return null;
527997
+ if (char === ESCAPE) {
527998
+ const escaped = pattern[index + 1];
527999
+ if (escaped === UNDEFINED) return null;
528000
+ body += escapeMember(escaped);
528001
+ prev = escaped;
528002
+ index++;
528003
+ } else if (char === "-" && prev && index + 1 < length && pattern[index + 1] !== "]") {
528004
+ index++;
528005
+ let to = pattern[index];
528006
+ if (to === ESCAPE) to = pattern[index += 1];
528007
+ if (prev <= to) body += `-${escapeMember(to)}`;
528008
+ prev = EMPTY;
528009
+ } else if (char === "[" && pattern[index + 1] === ":") {
528010
+ const nameStart = index + 2;
528011
+ let end = nameStart;
528012
+ while (end < length && pattern[end] !== "]") end++;
528013
+ if (end === length) return null;
528014
+ if (end > nameStart && pattern[end - 1] === ":") {
528015
+ const expanded = POSIX_CLASSES[pattern.slice(nameStart, end - 1)];
528016
+ if (expanded === UNDEFINED) return null;
528017
+ body += expanded;
528018
+ prev = EMPTY;
528019
+ index = end;
528020
+ } else {
528021
+ body += escapeMember("[");
528022
+ prev = "[";
528023
+ index = nameStart - 2;
528024
+ }
528025
+ } else {
528026
+ body += escapeMember(char);
528027
+ prev = char;
528028
+ }
528029
+ index++;
528030
+ if (pattern[index] === "]") return {
528031
+ end: index,
528032
+ source: classSource(negated, body)
528033
+ };
528034
+ }
528035
+ };
528036
+ const NEVER_MATCH = "[]";
528037
+ const PLACEHOLDER = "\0";
528038
+ const REGEX_RESTORE_PLACEHOLDER = new RegExp(`${PLACEHOLDER}(\\d+)${PLACEHOLDER}`, "g");
528039
+ const TRAILING_WILDCARD = "";
528040
+ const extractBrackets = (pattern) => {
528041
+ const sources = [];
528042
+ const hold = (source) => `${PLACEHOLDER}${sources.push(source) - 1}${PLACEHOLDER}`;
528043
+ const { length } = pattern;
528044
+ let out = EMPTY;
528045
+ let index = 0;
528046
+ while (index < length) {
528047
+ const char = pattern[index];
528048
+ if (char === ESCAPE) {
528049
+ const escaped = pattern[index + 1];
528050
+ if (escaped === "*" || escaped === "[" || escaped === SPACE || escaped === ESCAPE) out += pattern.slice(index, index + 2);
528051
+ else out += hold(REGEX_LITERAL_SPECIAL.test(escaped) ? ESCAPE + escaped : escaped);
528052
+ index += 2;
528053
+ } else if (char === PLACEHOLDER) {
528054
+ out += hold(`[${PLACEHOLDER}]`);
528055
+ index++;
528056
+ } else if (char === "[") {
528057
+ const scanned = scanBracket(pattern, index);
528058
+ if (scanned === null) {
528059
+ out += hold(NEVER_MATCH);
528060
+ index = length;
528061
+ } else {
528062
+ out += hold(scanned.source);
528063
+ index = scanned.end + 1;
528064
+ }
528065
+ } else {
528066
+ out += char;
528067
+ index++;
528068
+ }
528069
+ }
528070
+ return {
528071
+ source: out,
528072
+ sources
528073
+ };
528074
+ };
528075
+ const DIRECT = null;
528076
+ const REGEX_INNER_SLASH = /\/(?!$)/;
528036
528077
  const REPLACERS = [
528037
- [/^\uFEFF/, () => EMPTY],
528038
- [/((?:\\\\)*?)(\\?\s+)$/, (_, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : EMPTY)],
528039
- [/(\\+?)\s/g, (_, m1) => {
528078
+ [
528079
+ /^\uFEFF/,
528080
+ () => EMPTY,
528081
+ ""
528082
+ ],
528083
+ [/[\r\n]+$/, () => EMPTY],
528084
+ [/((?:\\\\)*?)(\\? +)$/, (_, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : EMPTY)],
528085
+ [/(\\+?) /g, (_, m1) => {
528040
528086
  const { length } = m1;
528041
528087
  return m1.slice(0, length - length % 2) + SPACE;
528042
528088
  }],
528043
528089
  [/[\\$.|*+(){^]/g, (match) => `\\${match}`],
528044
- [/(?!\\)\?/g, () => "[^/]"],
528045
- [/^\//, () => "^"],
528046
- [/\//g, () => "\\/"],
528047
- [/^\^*(?:\\\*\\\*\\\/)+/, () => "^(?:.*\\/)?"],
528048
- [/^(?=[^^])/, function startingReplacer() {
528049
- return !/\/(?!$)/.test(this) ? "(?:^|\\/)" : "^";
528050
- }],
528051
- [/\\\/\\\*\\\*(?=\\\/|$)/g, (_, index, str) => index + 6 < str.length ? "(?:\\/[^\\/]+)*" : "\\/.+"],
528052
- [/(^|[^\\]+)(\\\*)+(?=.+)/g, (_, p1, p2) => {
528053
- return p1 + p2.replace(/\\\*/g, "[^\\/]*");
528090
+ [
528091
+ /(?!\\)\?/g,
528092
+ () => "[^/]",
528093
+ "?"
528094
+ ],
528095
+ [
528096
+ /^\//,
528097
+ () => "^",
528098
+ SLASH
528099
+ ],
528100
+ [
528101
+ /\//g,
528102
+ () => "\\/",
528103
+ SLASH
528104
+ ],
528105
+ [
528106
+ /^\^*(?:\\\*\\\*\\\/)+/,
528107
+ () => "^(?:.*\\/)?",
528108
+ "*"
528109
+ ],
528110
+ [DIRECT, (source, pattern) => {
528111
+ if (!source || source[0] === "^") return source;
528112
+ return (!REGEX_INNER_SLASH.test(pattern) ? "(?:^|\\/)" : "^") + source;
528054
528113
  }],
528055
- [/\\\\\\(?=[$.|*+(){^])/g, () => ESCAPE],
528056
- [/\\\\/g, () => ESCAPE],
528057
- [/(\\)?\[([^\]/]*?)(\\*)($|\])/g, (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === "]" ? endEscape.length % 2 === 0 ? `[${negateRange(sanitizeRange(range))}${endEscape}]` : "[]" : "[]"],
528058
- [/(?:[^*])$/, (match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)`]
528114
+ [
528115
+ /\\\/\\\*\\\*(?=\\\/|$)/g,
528116
+ (_, index, str) => index + 6 < str.length ? str.slice(index + 6) === "\\/" ? "(?:\\/[^\\/]+)+" : "(?:\\/[^\\/]+)*" : "\\/.+",
528117
+ "*"
528118
+ ],
528119
+ [
528120
+ /(^|[^\\]+)(\\\*)+(?=.+)/g,
528121
+ (_, p1, p2) => {
528122
+ return p1 + p2.replace(/\\\*/g, "[^\\/]*");
528123
+ },
528124
+ "*"
528125
+ ],
528126
+ [
528127
+ /(^|[^\\])((?:\\\\)*)\\\*$/,
528128
+ (match, p1, p2) => p2.length / 2 % 2 === 0 ? p1 + p2 + TRAILING_WILDCARD : match,
528129
+ "*"
528130
+ ],
528131
+ [
528132
+ /\\\\\\(?=[$.|*+(){^])/g,
528133
+ () => ESCAPE,
528134
+ ESCAPE + ESCAPE
528135
+ ],
528136
+ [
528137
+ /\\\\/g,
528138
+ () => ESCAPE,
528139
+ ESCAPE + ESCAPE
528140
+ ],
528141
+ [
528142
+ /\\\[([^\]/]*?)(\\*)($|\])/g,
528143
+ (match, range, endEscape, close) => `\\[${range}${cleanRangeBackSlash(endEscape)}${close}`,
528144
+ "["
528145
+ ],
528146
+ [DIRECT, (source) => {
528147
+ const last = source[source.length - 1];
528148
+ if (!last || last === TRAILING_WILDCARD) return source;
528149
+ return last === SLASH ? `${source}$` : `${source}(?=$|\\/$)`;
528150
+ }]
528059
528151
  ];
528060
- const REGEX_REPLACE_TRAILING_WILDCARD = /(^|\\\/)?\\\*$/;
528152
+ const REGEX_REPLACE_TRAILING_WILDCARD = /(^|\\\/)?\uE000$/;
528061
528153
  const MODE_IGNORE = "regex";
528062
528154
  const MODE_CHECK_IGNORE = "checkRegex";
528063
528155
  const UNDERSCORE = "_";
@@ -528069,7 +528161,108 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
528069
528161
  return `${p1 ? `${p1}[^/]*` : "[^/]*"}(?=$|\\/$)`;
528070
528162
  }
528071
528163
  };
528072
- const makeRegexPrefix = (pattern) => REPLACERS.reduce((prev, [matcher, replacer]) => prev.replace(matcher, replacer.bind(pattern)), pattern);
528164
+ const WILDCARD = "[^\\/]*";
528165
+ const separatorAfter = (run, at) => {
528166
+ let separator = EMPTY;
528167
+ for (let index = at + 1; index < run.length && !run[index].wildcard; index++) separator += run[index].single;
528168
+ return separator;
528169
+ };
528170
+ const pinWildcards = (source) => {
528171
+ if (source.indexOf(WILDCARD) < 0) return source;
528172
+ const tokens = [];
528173
+ const { length } = source;
528174
+ let index = 0;
528175
+ while (index < length) {
528176
+ const char = source[index];
528177
+ if (source.startsWith(WILDCARD, index)) {
528178
+ tokens.push({ wildcard: true });
528179
+ index += 6;
528180
+ } else if (char === "[") {
528181
+ let end = index + 1;
528182
+ if (source[end] === "^") end++;
528183
+ if (source[end] === "]") end++;
528184
+ while (end < length && source[end] !== "]") end += source[end] === ESCAPE ? 2 : 1;
528185
+ end++;
528186
+ tokens.push({ single: source.slice(index, end) });
528187
+ index = end;
528188
+ } else if (char === ESCAPE) {
528189
+ tokens.push({ single: source.slice(index, index + 2) });
528190
+ index += 2;
528191
+ } else if (char === "(") {
528192
+ let depth = 0;
528193
+ let end = index;
528194
+ do {
528195
+ if (source[end] === ESCAPE) end++;
528196
+ else if (source[end] === "(") depth++;
528197
+ else if (source[end] === ")") depth--;
528198
+ end++;
528199
+ } while (end < length && depth > 0);
528200
+ if ("*+?".indexOf(source[end]) >= 0) end++;
528201
+ tokens.push({ boundary: source.slice(index, end) });
528202
+ index = end;
528203
+ } else if (char === "^" || char === "$") {
528204
+ tokens.push({ boundary: char });
528205
+ index++;
528206
+ } else {
528207
+ tokens.push({ single: char });
528208
+ index++;
528209
+ }
528210
+ }
528211
+ let out = EMPTY;
528212
+ let run = [];
528213
+ const flush = () => {
528214
+ let lastWildcard;
528215
+ run.forEach((token, at) => {
528216
+ if (token.wildcard) lastWildcard = at;
528217
+ });
528218
+ run.forEach((token, at) => {
528219
+ if (!token.wildcard) {
528220
+ out += token.single;
528221
+ return;
528222
+ }
528223
+ out += at === lastWildcard ? WILDCARD : `(?:(?!${separatorAfter(run, at)})[^\\/])*`;
528224
+ });
528225
+ run = [];
528226
+ };
528227
+ tokens.forEach((token) => {
528228
+ if (token.boundary === void 0) {
528229
+ run.push(token);
528230
+ return;
528231
+ }
528232
+ flush();
528233
+ out += token.boundary;
528234
+ });
528235
+ flush();
528236
+ return out;
528237
+ };
528238
+ const makeRegexPrefix = (pattern) => {
528239
+ const { source, sources } = extractBrackets(pattern);
528240
+ const replaced = REPLACERS.reduce((prev, [matcher, replacer, required]) => {
528241
+ if (matcher === DIRECT) return replacer(prev, pattern);
528242
+ if (required !== UNDEFINED && prev.indexOf(required) < 0) return prev;
528243
+ return matcher.test(prev) ? prev.replace(matcher, replacer.bind(pattern)) : prev;
528244
+ }, source);
528245
+ return sources.length ? replaced.replace(REGEX_RESTORE_PLACEHOLDER, (match, index) => sources[index]) : replaced;
528246
+ };
528247
+ const matchesBasename = (body) => {
528248
+ const index = body.indexOf(SLASH);
528249
+ return index < 0 || index === body.length - 1;
528250
+ };
528251
+ const basenameOf = (path) => {
528252
+ const end = path.length - 1;
528253
+ const index = path.lastIndexOf(SLASH, path[end] === SLASH ? end - 1 : end);
528254
+ return index < 0 ? path : path.slice(index + 1);
528255
+ };
528256
+ const parentOf = (path) => {
528257
+ if (path.charCodeAt(0) === SLASH_CODE || path.indexOf(DOUBLE_SLASH) >= 0) {
528258
+ const slices = path.split(SLASH).filter(Boolean);
528259
+ slices.pop();
528260
+ return slices.length ? slices.join(SLASH) + SLASH : EMPTY;
528261
+ }
528262
+ const end = path.length - 1;
528263
+ const cut = path.lastIndexOf(SLASH, path.charCodeAt(end) === SLASH_CODE ? end - 1 : end);
528264
+ return cut < 0 ? EMPTY : path.slice(0, cut + 1);
528265
+ };
528073
528266
  const isString = (subject) => typeof subject === "string";
528074
528267
  const checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0;
528075
528268
  const splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF).filter(Boolean);
@@ -528082,6 +528275,9 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
528082
528275
  define(this, "ignoreCase", ignoreCase);
528083
528276
  define(this, "regexPrefix", prefix);
528084
528277
  }
528278
+ get _basenameOnly() {
528279
+ return define(this, "_basenameOnly", matchesBasename(this.body));
528280
+ }
528085
528281
  get regex() {
528086
528282
  const key = UNDERSCORE + MODE_IGNORE;
528087
528283
  if (this[key]) return this[key];
@@ -528093,7 +528289,7 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
528093
528289
  return this._make(MODE_CHECK_IGNORE, key);
528094
528290
  }
528095
528291
  _make(mode, key) {
528096
- const str = this.regexPrefix.replace(REGEX_REPLACE_TRAILING_WILDCARD, TRAILING_WILD_CARD_REPLACERS[mode]);
528292
+ const str = pinWildcards(this.regexPrefix.replace(REGEX_REPLACE_TRAILING_WILDCARD, TRAILING_WILD_CARD_REPLACERS[mode]));
528097
528293
  const regex = this.ignoreCase ? new RegExp(str, "i") : new RegExp(str);
528098
528294
  return define(this, key, regex);
528099
528295
  }
@@ -528113,10 +528309,12 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
528113
528309
  constructor(ignoreCase) {
528114
528310
  this._ignoreCase = ignoreCase;
528115
528311
  this._rules = [];
528312
+ this._basenameCount = 0;
528116
528313
  }
528117
528314
  _add(pattern) {
528118
528315
  if (pattern && pattern[KEY_IGNORE]) {
528119
528316
  this._rules = this._rules.concat(pattern._rules._rules);
528317
+ this._basenameCount += pattern._rules._basenameCount;
528120
528318
  this._added = true;
528121
528319
  return;
528122
528320
  }
@@ -528125,6 +528323,7 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
528125
528323
  const rule = createRule(pattern, this._ignoreCase);
528126
528324
  this._added = true;
528127
528325
  this._rules.push(rule);
528326
+ if (matchesBasename(rule.body)) this._basenameCount++;
528128
528327
  }
528129
528328
  }
528130
528329
  add(pattern) {
@@ -528136,14 +528335,19 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
528136
528335
  let ignored = false;
528137
528336
  let unignored = false;
528138
528337
  let matchedRule;
528139
- this._rules.forEach((rule) => {
528338
+ const rules = this._rules;
528339
+ const { length } = rules;
528340
+ const shortcut = this._basenameCount * 2 >= length;
528341
+ const basename = shortcut ? basenameOf(path) : path;
528342
+ for (let index = 0; index < length; index++) {
528343
+ const rule = rules[index];
528140
528344
  const { negative } = rule;
528141
- if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) return;
528142
- if (!rule[mode].test(path)) return;
528143
- ignored = !negative;
528144
- unignored = negative;
528145
- matchedRule = negative ? UNDEFINED : rule;
528146
- });
528345
+ if (!(unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) && rule[mode].test(shortcut && rule._basenameOnly ? basename : path)) {
528346
+ ignored = !negative;
528347
+ unignored = negative;
528348
+ matchedRule = negative ? UNDEFINED : rule;
528349
+ }
528350
+ }
528147
528351
  const ret = {
528148
528352
  ignored,
528149
528353
  unignored
@@ -528161,7 +528365,16 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
528161
528365
  if (checkPath.isNotRelative(path)) return doThrow(`path should be a \`path.relative()\`d string, but got "${originalPath}"`, RangeError);
528162
528366
  return true;
528163
528367
  };
528164
- const isNotRelative = (path) => REGEX_TEST_INVALID_PATH.test(path);
528368
+ const isNotRelative = (path) => {
528369
+ const first = path.charCodeAt(0);
528370
+ if (first === SLASH_CODE) return true;
528371
+ if (first !== DOT_CODE) return false;
528372
+ if (path.length === 1) return true;
528373
+ const second = path.charCodeAt(1);
528374
+ if (second === SLASH_CODE) return true;
528375
+ if (second !== DOT_CODE) return false;
528376
+ return path.length === 2 || path.charCodeAt(2) === SLASH_CODE;
528377
+ };
528165
528378
  checkPath.isNotRelative = isNotRelative;
528166
528379
  /* istanbul ignore next */
528167
528380
  checkPath.convert = (p) => p;
@@ -528183,28 +528396,25 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
528183
528396
  addPattern(pattern) {
528184
528397
  return this.add(pattern);
528185
528398
  }
528186
- _test(originalPath, cache, checkUnignored, slices) {
528399
+ _test(originalPath, cache, checkUnignored) {
528187
528400
  const path = originalPath && checkPath.convert(originalPath);
528188
528401
  checkPath(path, originalPath, this._strictPathCheck ? throwError : RETURN_FALSE);
528189
- return this._t(path, cache, checkUnignored, slices);
528402
+ return this._t(path, cache, checkUnignored);
528190
528403
  }
528191
528404
  checkIgnore(path) {
528192
- if (!REGEX_TEST_TRAILING_SLASH.test(path)) return this.test(path);
528193
- const slices = path.split(SLASH).filter(Boolean);
528194
- slices.pop();
528195
- if (slices.length) {
528196
- const parent = this._t(slices.join(SLASH) + SLASH, this._testCache, true, slices);
528405
+ if (path.charCodeAt(path.length - 1) !== SLASH_CODE) return this.test(path);
528406
+ const parentPath = parentOf(path);
528407
+ if (parentPath) {
528408
+ const parent = this._t(parentPath, this._testCache, true);
528197
528409
  if (parent.ignored) return parent;
528198
528410
  }
528199
528411
  return this._rules.test(path, false, MODE_CHECK_IGNORE);
528200
528412
  }
528201
- _t(path, cache, checkUnignored, slices) {
528413
+ _t(path, cache, checkUnignored) {
528202
528414
  if (path in cache) return cache[path];
528203
- if (!slices) slices = path.split(SLASH).filter(Boolean);
528204
- slices.pop();
528205
- if (!slices.length) return cache[path] = this._rules.test(path, checkUnignored, MODE_IGNORE);
528206
- const parent = this._t(slices.join(SLASH) + SLASH, cache, checkUnignored, slices);
528207
- return cache[path] = parent.ignored ? parent : this._rules.test(path, checkUnignored, MODE_IGNORE);
528415
+ const parentPath = parentOf(path);
528416
+ const parent = parentPath ? this._t(parentPath, cache, checkUnignored) : UNDEFINED;
528417
+ return cache[path] = parent && parent.ignored ? parent : this._rules.test(path, checkUnignored, MODE_IGNORE);
528208
528418
  }
528209
528419
  ignores(path) {
528210
528420
  return this._test(path, this._ignoreCache, false).ignored;
@@ -528238,7 +528448,7 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
528238
528448
 
528239
528449
  //#endregion
528240
528450
  //#region src/commands/migrate/openclaw.ts
528241
- var import_ignore = /* @__PURE__ */ __toESM$2(require_ignore(), 1);
528451
+ var import_ignore = /* @__PURE__ */ __toESM(require_ignore(), 1);
528242
528452
  const DEFAULT_AGENT_NAME = "OpenClaw";
528243
528453
  const IDENTITY_FILES = ["IDENTITY.md", "SOUL.md"];
528244
528454
  const DEFAULT_IGNORE_RULES = [
@@ -532979,6 +533189,63 @@ function evidenceDescriptionForFile(description, file) {
532979
533189
 
532980
533190
  //#endregion
532981
533191
  //#region src/commands/acceptanceEvidence.ts
533192
+ async function storageQuotaRecovery(client) {
533193
+ const serverUrl = new URL(resolveServerUrl());
533194
+ serverUrl.username = "";
533195
+ serverUrl.password = "";
533196
+ if (serverUrl.origin === "https://app.lobehub.com") serverUrl.hostname = "lobehub.com";
533197
+ const workspaceId = resolveWorkspaceId();
533198
+ let cleanupUrl;
533199
+ let upgradeUrl;
533200
+ let guidance;
533201
+ if (workspaceId) {
533202
+ let workspace;
533203
+ try {
533204
+ workspace = await client.workspace.getById.query();
533205
+ } catch {
533206
+ log$12.warn("Could not load workspace recovery links; verify the scope with lh workspace current.");
533207
+ }
533208
+ if (workspace?.id === workspaceId && workspace.slug) {
533209
+ const prefix = `/${encodeURIComponent(workspace.slug)}`;
533210
+ cleanupUrl = new URL(`${prefix}/resource`, serverUrl).toString();
533211
+ upgradeUrl = new URL(`${prefix}/settings/plans`, serverUrl).toString();
533212
+ guidance = `Free workspace space: ${cleanupUrl} — ask a workspace owner/admin to delete unneeded files from this workspace's resource library. Deletion is permanent and may affect shared evidence. Upgrade the workspace plan: ${upgradeUrl} (ask a workspace owner/admin if you cannot manage billing). Personal cleanup or a personal plan upgrade will not resolve this workspace quota.`;
533213
+ } else guidance = `Could not verify workspace ${workspaceId}. Run lh workspace current and lh workspace list to check the scope, then ask its owner/admin to clean up workspace files or upgrade the workspace plan. Recovery links are unavailable; do not invent links or substitute personal pages.`;
533214
+ } else {
533215
+ cleanupUrl = new URL("/acceptance", serverUrl).toString();
533216
+ upgradeUrl = new URL("/settings/plans", serverUrl).toString();
533217
+ guidance = `Free space: ${cleanupUrl} — delete unneeded acceptances and select the option to permanently delete all rounds, reports, and evidence files. This cannot be undone; deleting only the acceptance record does not free file storage.\nUpgrade your plan: ${upgradeUrl}`;
533218
+ }
533219
+ return {
533220
+ cleanupUrl,
533221
+ message: [
533222
+ `Acceptance evidence upload was blocked by file storage limits (CLI scope: ${workspaceId ? `workspace ${workspaceId}` : "personal"}).`,
533223
+ guidance,
533224
+ "Tell the user both options and any available links in the final response, following the scope-specific guidance above. Do not delete their files automatically. Keep local evidence and stop retrying until storage is available. Evidence publication is incomplete; do not claim all required evidence was uploaded."
533225
+ ].join("\n"),
533226
+ reason: "storage_quota",
533227
+ scope: workspaceId ? "workspace" : "personal",
533228
+ upgradeUrl,
533229
+ workspaceId
533230
+ };
533231
+ }
533232
+ /** Atomic submissions must stop before recording a result if its file cannot be uploaded. */
533233
+ async function uploadAcceptanceFile(client, file, json) {
533234
+ try {
533235
+ return await uploadLocalFile(client, file);
533236
+ } catch (error) {
533237
+ const message = error instanceof Error ? error.message : String(error);
533238
+ if (!message.includes("storage_block:")) throw error;
533239
+ const recovery = await storageQuotaRecovery(client);
533240
+ process.exitCode = 1;
533241
+ log$12.warn(recovery.message);
533242
+ if (json !== void 0) outputJson({
533243
+ error: message,
533244
+ recovery
533245
+ }, typeof json === "string" ? json : void 0);
533246
+ return;
533247
+ }
533248
+ }
532982
533249
  /** Upload and attach independently: a failed artifact must not discard the report. */
532983
533250
  async function uploadReportEvidence(client, params) {
532984
533251
  const failedEvidence = [];
@@ -533252,7 +533519,11 @@ async function submitAction(options) {
533252
533519
  let inlineContent = options.content;
533253
533520
  if (options.file) {
533254
533521
  inlineContent = inlineTextEvidenceForFile(options.file, options.type);
533255
- if (inlineContent === void 0) fileId = (await uploadLocalFile(client, options.file)).id;
533522
+ if (inlineContent === void 0) {
533523
+ const uploaded = await uploadAcceptanceFile(client, options.file, options.json);
533524
+ if (!uploaded) return;
533525
+ fileId = uploaded.id;
533526
+ }
533256
533527
  }
533257
533528
  const evidence = hasEvidence ? [{
533258
533529
  capturedBy: options.by,
@@ -533311,7 +533582,11 @@ async function evidenceUploadAction(options) {
533311
533582
  let inlineContent = options.content;
533312
533583
  if (options.file) {
533313
533584
  inlineContent = inlineTextEvidenceForFile(options.file, options.type);
533314
- if (inlineContent === void 0) fileId = (await uploadLocalFile(client, options.file)).id;
533585
+ if (inlineContent === void 0) {
533586
+ const uploaded = await uploadAcceptanceFile(client, options.file, options.json);
533587
+ if (!uploaded) return;
533588
+ fileId = uploaded.id;
533589
+ }
533315
533590
  }
533316
533591
  const ev = await client.verify.uploadEvidence.mutate({
533317
533592
  capturedBy: options.by,
@@ -533628,12 +533903,13 @@ async function ingestReportAction(reportDir, options) {
533628
533903
  log$12.warn(`proposal not posted to the discussion: ${String(e)}`);
533629
533904
  }
533630
533905
  const unplanned = plan?.length ? [...seenCheckItemIds].filter((id) => !plan.some((item) => item.id === id)) : [];
533906
+ const recovery = failedEvidence.some((failure) => failure.reason === "storage_quota") ? await storageQuotaRecovery(client) : void 0;
533631
533907
  const partial = failedEvidence.length > 0 || missingEvidence.length > 0;
533632
533908
  if (partial) {
533633
533909
  process.exitCode = 1;
533634
533910
  log$12.warn("Report saved, but evidence publication is incomplete. Keep the local artifacts; retry only the missing evidence, not the whole ingest. Supplementing evidence does not change recorded verdicts.");
533635
533911
  if (missingEvidence.some(({ checkItemId }) => !seenCheckItemIds.has(checkItemId))) log$12.warn("Unexecuted checks have no result to attach evidence to. Execute them and publish a new round on the same acceptance; do not re-ingest this unchanged report.");
533636
- if (failedEvidence.some((failure) => failure.reason === "storage_quota")) log$12.warn("Acceptance evidence uses your personal file storage quota. Free space or upgrade your storage plan, then retry the failed artifacts.");
533912
+ if (recovery) log$12.warn(recovery.message);
533637
533913
  }
533638
533914
  if (options.json !== void 0) {
533639
533915
  outputJson({
@@ -533650,6 +533926,7 @@ async function ingestReportAction(reportDir, options) {
533650
533926
  proposalPosted,
533651
533927
  publicationStatus: partial ? "partial" : "complete",
533652
533928
  pullRequest,
533929
+ recovery,
533653
533930
  roundIndex,
533654
533931
  roundUrl,
533655
533932
  scenario,