@lousy-agents/mcp 5.17.15 → 5.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/653.js CHANGED
@@ -20,43 +20,43 @@ export const __webpack_modules__ = {
20
20
 
21
21
 
22
22
 
23
- const h = /^[A-Za-z]:\//;
24
- function g(e = ``) {
25
- return e && e.replace(/\\/g, `/`).replace(h, (e) => e.toUpperCase());
23
+ const _ = /^[A-Za-z]:\//;
24
+ function v(e = ``) {
25
+ return e && e.replace(/\\/g, `/`).replace(_, (e) => e.toUpperCase());
26
26
  }
27
- const ne = /^[/\\]{2}/, _ = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/, v = /^[A-Za-z]:$/, y = /^\/([A-Za-z]:)?$/, b = function(e) {
27
+ const y = /^[/\\]{2}/, b = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/, x = /^[A-Za-z]:$/, S = /^\/([A-Za-z]:)?$/, C = function(e) {
28
28
  if (e.length === 0) return `.`;
29
- e = g(e);
30
- let t = e.match(ne), n = T(e), r = e[e.length - 1] === `/`;
31
- return e = w(e, !n), e.length === 0 ? n ? `/` : r ? `./` : `.` : (r && (e += `/`), v.test(e) && (e += `/`), t ? n ? `//${e}` : `//./${e}` : n && !T(e) ? `/${e}` : e);
32
- }, x = function(...e) {
29
+ e = v(e);
30
+ let t = e.match(y), n = O(e), r = e[e.length - 1] === `/`;
31
+ return e = D(e, !n), e.length === 0 ? n ? `/` : r ? `./` : `.` : (r && (e += `/`), x.test(e) && (e += `/`), t ? n ? `//${e}` : `//./${e}` : n && !O(e) ? `/${e}` : e);
32
+ }, w = function(...e) {
33
33
  let t = ``;
34
34
  for (let n of e) if (n) if (t.length > 0) {
35
35
  let e = t[t.length - 1] === `/`, r = n[0] === `/`;
36
36
  e && r ? t += n.slice(1) : t += e || r ? n : `/${n}`;
37
37
  } else t += n;
38
- return b(t);
38
+ return C(t);
39
39
  };
40
- function S() {
40
+ function T() {
41
41
  return typeof process < `u` && typeof process.cwd == `function` ? process.cwd().replace(/\\/g, `/`) : `/`;
42
42
  }
43
- const C = function(...e) {
44
- e = e.map((e) => g(e));
43
+ const E = function(...e) {
44
+ e = e.map((e) => v(e));
45
45
  let t = ``, n = !1;
46
46
  for (let r = e.length - 1; r >= -1 && !n; r--) {
47
- let i = r >= 0 ? e[r] : S();
48
- !i || i.length === 0 || (t = `${i}/${t}`, n = T(i));
47
+ let i = r >= 0 ? e[r] : T();
48
+ !i || i.length === 0 || (t = `${i}/${t}`, n = O(i));
49
49
  }
50
- return t = w(t, !n), n && !T(t) ? `/${t}` : t.length > 0 ? t : `.`;
50
+ return t = D(t, !n), n && !O(t) ? `/${t}` : t.length > 0 ? t : `.`;
51
51
  };
52
- function w(e, t) {
52
+ function D(e, t) {
53
53
  let n = ``, r = 0, i = -1, a = 0, o = null;
54
54
  for (let s = 0; s <= e.length; ++s) {
55
55
  if (s < e.length) o = e[s];
56
56
  else if (o === `/`) break;
57
57
  else o = `/`;
58
58
  if (o === `/`) {
59
- if (!(i === s - 1 || a === 1)) if (a === 2) {
59
+ if (i !== s - 1 && a !== 1) if (a === 2) {
60
60
  if (n.length < 2 || r !== 2 || n[n.length - 1] !== `.` || n[n.length - 2] !== `.`) {
61
61
  if (n.length > 2) {
62
62
  let e = n.lastIndexOf(`/`);
@@ -74,10 +74,10 @@ function w(e, t) {
74
74
  }
75
75
  return n;
76
76
  }
77
- const T = function(e) {
78
- return _.test(e);
79
- }, re = function(e, t) {
80
- let n = C(e).replace(y, `$1`).split(`/`), r = C(t).replace(y, `$1`).split(`/`);
77
+ const O = function(e) {
78
+ return b.test(e);
79
+ }, ee = function(e, t) {
80
+ let n = E(e).replace(S, `$1`).split(`/`), r = E(t).replace(S, `$1`).split(`/`);
81
81
  if (r[0][1] === `:` && n[0][1] === `:` && n[0] !== r[0]) return r.join(`/`);
82
82
  let i = [...n];
83
83
  for (let e of i) {
@@ -85,11 +85,11 @@ const T = function(e) {
85
85
  n.shift(), r.shift();
86
86
  }
87
87
  return [...n.map(() => `..`), ...r].join(`/`);
88
- }, E = function(e) {
89
- let t = g(e).replace(/\/$/, ``).split(`/`).slice(0, -1);
90
- return t.length === 1 && v.test(t[0]) && (t[0] += `/`), t.join(`/`) || (T(e) ? `/` : `.`);
91
- }, D = function(e, t) {
92
- let n = g(e).split(`/`), r = ``;
88
+ }, te = function(e) {
89
+ let t = v(e).replace(/\/$/, ``).split(`/`).slice(0, -1);
90
+ return t.length === 1 && x.test(t[0]) && (t[0] += `/`), t.join(`/`) || (O(e) ? `/` : `.`);
91
+ }, ne = function(e, t) {
92
+ let n = v(e).split(`/`), r = ``;
93
93
  for (let e = n.length - 1; e >= 0; e--) {
94
94
  let t = n[e];
95
95
  if (t) {
@@ -98,22 +98,22 @@ const T = function(e) {
98
98
  }
99
99
  }
100
100
  return t && r.endsWith(t) ? r.slice(0, -t.length) : r;
101
- }, O = /^path$/i, k = {
101
+ }, k = /^path$/i, A = {
102
102
  key: `PATH`,
103
103
  value: ``
104
104
  };
105
- function A(e) {
105
+ function j(e) {
106
106
  for (let t in e) {
107
- if (!Object.prototype.hasOwnProperty.call(e, t) || !O.test(t)) continue;
107
+ if (!Object.prototype.hasOwnProperty.call(e, t) || !k.test(t)) continue;
108
108
  let n = e[t];
109
109
  return n ? {
110
110
  key: t,
111
111
  value: n
112
- } : k;
112
+ } : A;
113
113
  }
114
- return k;
114
+ return A;
115
115
  }
116
- function j(e, t) {
116
+ function M(e, t) {
117
117
  let n = t.value.split(node_path__rspack_import_5.delimiter), r = [], i = e, a;
118
118
  do
119
119
  r.push((0,node_path__rspack_import_5.resolve)(i, `node_modules`, `.bin`)), a = i, i = (0,node_path__rspack_import_5.dirname)(i);
@@ -125,34 +125,34 @@ function j(e, t) {
125
125
  value: o
126
126
  };
127
127
  }
128
- function M(e, t, n = !0) {
128
+ function N(e, t, n = !0) {
129
129
  let r = {
130
130
  ...process.env,
131
131
  ...t
132
132
  };
133
133
  if (!n) return r;
134
- let i = j(e, A(r));
134
+ let i = M(e, j(r));
135
135
  return r[i.key] = i.value, r;
136
136
  }
137
- const N = (e) => {
137
+ const P = (e) => {
138
138
  let t = e.length, n = new node_stream__rspack_import_2.PassThrough(), r = () => {
139
139
  --t === 0 && n.end();
140
140
  };
141
141
  for (let t of e) (0,node_stream_promises__rspack_import_3.pipeline)(t, n, { end: !1 }).then(r).catch(r);
142
142
  return n;
143
- }, P = /([()\][%!^"`<>&|;, *?])/g, F = /^#!\s*(.+)/, I = /\.(?:com|exe)$/i, L = /node_modules[\\/]\.bin[\\/][^\\/]+\.cmd$/i, R = process.platform === `win32`, z = [
143
+ }, F = /([()\][%!^"`<>&|;, *?])/g, I = /^#!\s*(.+)/, L = /\.(?:com|exe)$/i, R = /node_modules[\\/]\.bin[\\/][^\\/]+\.cmd$/i, z = process.platform === `win32`, B = [
144
144
  `.EXE`,
145
145
  `.CMD`,
146
146
  `.BAT`,
147
147
  `.COM`
148
148
  ];
149
- function B(e, n = [], a = {}) {
150
- if (a.shell === !0 || !R) return {
149
+ function V(e, n = [], a = {}) {
150
+ if (a.shell === !0 || !z) return {
151
151
  command: e,
152
152
  args: n,
153
153
  options: a
154
154
  };
155
- let o = V(e, a), s = null;
155
+ let o = H(e, a), s = null;
156
156
  if (o !== null) {
157
157
  let e = Buffer.alloc(150), n = null;
158
158
  try {
@@ -160,15 +160,15 @@ function B(e, n = [], a = {}) {
160
160
  } catch {} finally {
161
161
  n !== null && (0,node_fs__rspack_import_0.closeSync)(n);
162
162
  }
163
- let a = e.toString().match(F);
163
+ let a = e.toString().match(I);
164
164
  if (a !== null) {
165
165
  let e = a[1].trim(), t = e.indexOf(` `), n = t === -1 ? e : e.slice(0, t), r = t === -1 ? `` : e.slice(t + 1), i = (0,node_path__rspack_import_5.basename)(n);
166
166
  s = i === `env` ? r || null : i;
167
167
  }
168
168
  }
169
- if (s !== null && o !== null && (n = [o, ...n], e = s, o = V(e, a)), o === null || !I.test(o)) {
170
- let t = o !== null && L.test(o);
171
- e = (0,node_path__rspack_import_5.normalize)(e), e = e.replace(P, `^$1`), n = n.map((e) => (e = e.replace(/(?=(\\+?)?)\1"/g, `$1$1\\"`), e = e.replace(/(?=(\\+?)?)\1$/, `$1$1`), e = `"${e}"`, e = e.replace(P, `^$1`), t && (e = e.replace(P, `^$1`)), e)), n = [
169
+ if (s !== null && o !== null && (n = [o, ...n], e = s, o = H(e, a)), o === null || !L.test(o)) {
170
+ let t = o !== null && R.test(o);
171
+ e = (0,node_path__rspack_import_5.normalize)(e), e = e.replace(F, `^$1`), n = n.map((e) => (e = e.replace(/(?=(\\+?)?)\1"/g, `$1$1\\"`), e = e.replace(/(?=(\\+?)?)\1$/, `$1$1`), e = `"${e}"`, e = e.replace(F, `^$1`), t && (e = e.replace(F, `^$1`)), e)), n = [
172
172
  `/d`,
173
173
  `/s`,
174
174
  `/c`,
@@ -184,8 +184,8 @@ function B(e, n = [], a = {}) {
184
184
  options: a
185
185
  };
186
186
  }
187
- function V(e, t) {
188
- let n = (t.cwd ?? (0,node_process__rspack_import_6.cwd)()).toString(), r = t.env ?? process.env, i = A(r).value, o = e.includes(`/`) || e.includes(`\\`) ? [``] : [n, ...i.split(node_path__rspack_import_5.delimiter)], s = r.PATHEXT ? r.PATHEXT.split(node_path__rspack_import_5.delimiter) : z;
187
+ function H(e, t) {
188
+ let n = (t.cwd ?? (0,node_process__rspack_import_6.cwd)()).toString(), r = t.env ?? process.env, i = j(r).value, o = e.includes(`/`) || e.includes(`\\`) ? [``] : [n, ...i.split(node_path__rspack_import_5.delimiter)], s = r.PATHEXT ? r.PATHEXT.split(node_path__rspack_import_5.delimiter) : B;
189
189
  e.includes(`.`) && s[0] !== `` && s.unshift(``);
190
190
  for (let t of o) {
191
191
  let r = (0,node_path__rspack_import_5.resolve)(n, t.startsWith(`"`) && t.endsWith(`"`) && t.length > 1 ? t.slice(1, -1) : t, e);
@@ -198,7 +198,7 @@ function V(e, t) {
198
198
  }
199
199
  return null;
200
200
  }
201
- var H = class extends Error {
201
+ var U = class extends Error {
202
202
  result;
203
203
  output;
204
204
  get exitCode() {
@@ -208,7 +208,7 @@ var H = class extends Error {
208
208
  super(`Process exited with non-zero status (${e.exitCode})`), this.result = e, this.output = t;
209
209
  }
210
210
  };
211
- const U = {
211
+ const re = {
212
212
  timeout: void 0,
213
213
  persist: !1
214
214
  }, W = { windowsHide: !0 };
@@ -249,7 +249,7 @@ var q = class {
249
249
  }
250
250
  constructor(e, t, n) {
251
251
  this._options = {
252
- ...U,
252
+ ...re,
253
253
  ...n
254
254
  }, this._command = e, this._args = t ?? [], this._processClosed = new Promise((e) => {
255
255
  this._resolveClose = e;
@@ -275,10 +275,10 @@ var q = class {
275
275
  if (!e) return;
276
276
  let t = [];
277
277
  this._streamErr && t.push(this._streamErr), this._streamOut && t.push(this._streamOut);
278
- let n = N(t), r = node_readline__rspack_import_7.createInterface({ input: n });
278
+ let n = P(t), r = node_readline__rspack_import_7.createInterface({ input: n });
279
279
  for await (let e of r) yield e.toString();
280
280
  if (await this._processClosed, e.removeAllListeners(), this._thrownError) throw this._thrownError;
281
- if (this._options?.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new H(this);
281
+ if (this._options?.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new U(this);
282
282
  }
283
283
  async _waitForOutput() {
284
284
  let e = this._process;
@@ -292,7 +292,7 @@ var q = class {
292
292
  stdout: t,
293
293
  exitCode: this.exitCode
294
294
  };
295
- if (this._options.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new H(this, i);
295
+ if (this._options.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new U(this, i);
296
296
  return i;
297
297
  }
298
298
  then(e, t) {
@@ -305,8 +305,8 @@ var q = class {
305
305
  ...W,
306
306
  ...t.nodeOptions
307
307
  }, r = [];
308
- this._resetState(), t.timeout !== void 0 && r.push(AbortSignal.timeout(t.timeout)), t.signal !== void 0 && r.push(t.signal), t.persist === !0 && (n.detached = !0), r.length > 0 && (n.signal = G(r)), n.env = M(e, n.env, t.nodePath);
309
- let i = B(this._command, this._args, n), a = (0,node_child_process__rspack_import_4.spawn)(i.command, i.args, i.options);
308
+ this._resetState(), t.timeout !== void 0 && r.push(AbortSignal.timeout(t.timeout)), t.signal !== void 0 && r.push(t.signal), t.persist === !0 && (n.detached = !0), r.length > 0 && (n.signal = G(r)), n.env = N(e, n.env, t.nodePath);
309
+ let i = V(this._command, this._args, n), a = (0,node_child_process__rspack_import_4.spawn)(i.command, i.args, i.options);
310
310
  if (a.stderr && (this._streamErr = a.stderr), a.stdout && (this._streamOut = a.stdout), this._process = a, a.once(`error`, this._onError), a.once(`close`, this._onClose), a.stdin) {
311
311
  let { stdin: e } = t;
312
312
  typeof e == `string` ? a.stdin.end(e) : e?.process?.stdout?.pipe(a.stdin);
@@ -334,11 +334,11 @@ const J = (e, t, n) => {
334
334
  }, Y = J;
335
335
  var X = (0,_rolldown_runtime_mjs__rspack_import_8/* .__exportAll */.I)({
336
336
  detectPackageManager: () => $,
337
- installDependencies: () => le,
337
+ installDependencies: () => de,
338
338
  packageManagers: () => Q
339
339
  });
340
340
  async function ie(e, t, n = {}) {
341
- let r = b(e).split(`/`);
341
+ let r = C(e).split(`/`);
342
342
  for (; r.length > 0;) {
343
343
  let e = await t(r.join(`/`) || `/`);
344
344
  if (e || !n.includeParentDirs) return e;
@@ -359,8 +359,8 @@ const oe = ae(async () => {
359
359
  }
360
360
  });
361
361
  async function se(e, t, n = {}) {
362
- let r = e !== `npm` && e !== `bun` && e !== `deno` && n.corepack !== !1 && await oe() ? [`corepack`, [e, ...t]] : [e, t], { exitCode: i, stdout: a, stderr: o } = await J(r[0], r[1], { nodeOptions: {
363
- cwd: C(n.cwd || process.cwd()),
362
+ let r = e !== `npm` && e !== `bun` && e !== `deno` && e !== `aube` && e !== `nub` && n.corepack !== !1 && await oe() ? [`corepack`, [e, ...t]] : [e, t], { exitCode: i, stdout: a, stderr: o } = await J(r[0], r[1], { nodeOptions: {
363
+ cwd: E(n.cwd || process.cwd()),
364
364
  env: n.env,
365
365
  stdio: n.silent ? `pipe` : `inherit`
366
366
  } });
@@ -389,9 +389,10 @@ async function ce(e = {}) {
389
389
  corepack: e.corepack ?? !0
390
390
  };
391
391
  }
392
- function Z(e) {
392
+ const Z = /^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/;
393
+ function le(e) {
393
394
  let [t, n] = (e || ``).split(`@`), [r, i] = n?.split(`+`) || [];
394
- if (t && t !== `-` && /^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/.test(t)) return {
395
+ if (t && t !== `-` && Z.test(t)) return {
395
396
  name: t,
396
397
  version: r,
397
398
  buildMeta: i
@@ -404,12 +405,37 @@ function Z(e) {
404
405
  warnings: [`Abnormal characters found in \`packageManager\` field, sanitizing from \`${t}\` to \`${a}\``]
405
406
  };
406
407
  }
408
+ function ue(e) {
409
+ let t = e?.packageManager, n = Array.isArray(t) ? t[0] : t, r = typeof n?.name == `string` ? n.name : void 0, i = typeof n?.version == `string` ? n.version : void 0;
410
+ if (!r) return {};
411
+ if (!Z.test(r)) {
412
+ let e = r.replace(/\W+/g, ``);
413
+ return {
414
+ name: e,
415
+ version: i,
416
+ warnings: [`Abnormal characters found in \`devEngines.packageManager\` field, sanitizing from \`${r}\` to \`${e}\``]
417
+ };
418
+ }
419
+ return {
420
+ name: r,
421
+ version: i
422
+ };
423
+ }
407
424
  const Q = [
408
425
  {
409
426
  name: `npm`,
410
427
  command: `npm`,
411
428
  lockFile: `package-lock.json`
412
429
  },
430
+ {
431
+ name: `aube`,
432
+ command: `aube`,
433
+ lockFile: `aube-lock.yaml`
434
+ },
435
+ {
436
+ name: `nub`,
437
+ command: `nub`
438
+ },
413
439
  {
414
440
  name: `pnpm`,
415
441
  command: `pnpm`,
@@ -435,13 +461,13 @@ const Q = [
435
461
  }
436
462
  ];
437
463
  async function $(e, t = {}) {
438
- let r = await ie(C(e || `.`), async (e) => {
464
+ let r = await ie(E(e || `.`), async (e) => {
439
465
  if (!t.ignorePackageJSON) {
440
- let t = x(e, `package.json`);
466
+ let t = w(e, `package.json`);
441
467
  if ((0,node_fs__rspack_import_0.existsSync)(t)) {
442
468
  let e = JSON.parse(await (0,node_fs_promises__rspack_import_1.readFile)(t, `utf8`));
443
469
  if (e?.packageManager) {
444
- let { name: t, version: n = `0.0.0`, buildMeta: r, warnings: i } = Z(e.packageManager);
470
+ let { name: t, version: n = `0.0.0`, buildMeta: r, warnings: i } = le(e.packageManager);
445
471
  if (t) {
446
472
  let e = n.split(`.`)[0], a = Q.find((n) => n.name === t && n.majorVersion === e) || Q.find((e) => e.name === t);
447
473
  return {
@@ -456,11 +482,24 @@ async function $(e, t = {}) {
456
482
  };
457
483
  }
458
484
  }
485
+ let n = ue(e?.devEngines);
486
+ if (n.name) {
487
+ let { name: e, version: t, warnings: r } = n, i = t?.match(/\d+/)?.[0], a = Q.find((t) => t.name === e && t.majorVersion === i) || Q.find((t) => t.name === e);
488
+ return {
489
+ name: e,
490
+ command: e,
491
+ version: t,
492
+ majorVersion: i,
493
+ warnings: r,
494
+ files: a?.files,
495
+ lockFile: a?.lockFile
496
+ };
497
+ }
459
498
  }
460
- if ((0,node_fs__rspack_import_0.existsSync)(x(e, `deno.json`))) return Q.find((e) => e.name === `deno`);
499
+ if ((0,node_fs__rspack_import_0.existsSync)(w(e, `deno.json`))) return Q.find((e) => e.name === `deno`);
461
500
  }
462
501
  if (!t.ignoreLockFile) {
463
- for (let t of Q) if ([t.lockFile, t.files].flat().filter(Boolean).some((t) => (0,node_fs__rspack_import_0.existsSync)(C(e, t)))) return { ...t };
502
+ for (let t of Q) if ([t.lockFile, t.files].flat().filter(Boolean).some((t) => (0,node_fs__rspack_import_0.existsSync)(E(e, t)))) return { ...t };
464
503
  }
465
504
  }, { includeParentDirs: t.includeParentDirs ?? !0 });
466
505
  if (!r && !t.ignoreArgv) {
@@ -471,13 +510,15 @@ async function $(e, t = {}) {
471
510
  }
472
511
  return r;
473
512
  }
474
- async function le(e = {}) {
513
+ async function de(e = {}) {
475
514
  let t = await ce(e), n = e.frozenLockFile ? {
476
515
  npm: [`ci`],
477
516
  yarn: [`install`, `--immutable`],
478
517
  bun: [`install`, `--frozen-lockfile`],
479
518
  pnpm: [`install`, `--frozen-lockfile`],
480
- deno: [`install`, `--frozen`]
519
+ deno: [`install`, `--frozen`],
520
+ aube: [`install`, `--frozen-lockfile`],
521
+ nub: [`install`, `--frozen-lockfile`]
481
522
  }[t.packageManager.name] : [`install`];
482
523
  return e.ignoreWorkspace && t.packageManager.name === `pnpm` && n.push(`--ignore-workspace`), t.dry || await se(t.packageManager.command, n, {
483
524
  cwd: t.cwd,
@@ -493,9 +534,9 @@ async function le(e = {}) {
493
534
  __webpack_require__.d(__webpack_exports__, {
494
535
  dist_exports: () => (X)
495
536
  }, {
496
- P8: D,
497
- hd: C,
498
- pD: E
537
+ P8: ne,
538
+ hd: E,
539
+ pD: te
499
540
  });
500
541
 
501
542