@mrrlin-dev/mcp 0.4.88 → 0.4.90

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 (2) hide show
  1. package/dist/bin.cjs +1101 -357
  2. package/package.json +1 -1
package/dist/bin.cjs CHANGED
@@ -5832,7 +5832,7 @@ var require_fast_uri = __commonJS({
5832
5832
  normalizeString(uri, options);
5833
5833
  } else if (typeof uri === "object") {
5834
5834
  uri = /** @type {T} */
5835
- parse7(serialize(uri, options), options);
5835
+ parse8(serialize(uri, options), options);
5836
5836
  }
5837
5837
  return uri;
5838
5838
  }
@@ -5872,8 +5872,8 @@ var require_fast_uri = __commonJS({
5872
5872
  function resolveComponent(base, relative, options, skipNormalization) {
5873
5873
  const target = {};
5874
5874
  if (!skipNormalization) {
5875
- base = parse7(serialize(base, options), options);
5876
- relative = parse7(serialize(relative, options), options);
5875
+ base = parse8(serialize(base, options), options);
5876
+ relative = parse8(serialize(relative, options), options);
5877
5877
  }
5878
5878
  options = options || {};
5879
5879
  if (!options.tolerant && relative.scheme) {
@@ -6172,7 +6172,7 @@ var require_fast_uri = __commonJS({
6172
6172
  }
6173
6173
  return { parsed, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme };
6174
6174
  }
6175
- function parse7(uri, opts) {
6175
+ function parse8(uri, opts) {
6176
6176
  return parseWithStatus(uri, opts).parsed;
6177
6177
  }
6178
6178
  function normalizeString(uri, opts) {
@@ -6209,7 +6209,7 @@ var require_fast_uri = __commonJS({
6209
6209
  resolveComponent,
6210
6210
  equal,
6211
6211
  serialize,
6212
- parse: parse7
6212
+ parse: parse8
6213
6213
  };
6214
6214
  module2.exports = fastUri;
6215
6215
  module2.exports.default = fastUri;
@@ -9205,7 +9205,7 @@ var require_content_type = __commonJS({
9205
9205
  var QUOTE_REGEXP = /([\\"])/g;
9206
9206
  var TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
9207
9207
  exports2.format = format;
9208
- exports2.parse = parse7;
9208
+ exports2.parse = parse8;
9209
9209
  function format(obj) {
9210
9210
  if (!obj || typeof obj !== "object") {
9211
9211
  throw new TypeError("argument obj is required");
@@ -9229,7 +9229,7 @@ var require_content_type = __commonJS({
9229
9229
  }
9230
9230
  return string4;
9231
9231
  }
9232
- function parse7(string4) {
9232
+ function parse8(string4) {
9233
9233
  if (!string4) {
9234
9234
  throw new TypeError("argument string is required");
9235
9235
  }
@@ -9298,6 +9298,503 @@ var require_content_type = __commonJS({
9298
9298
  }
9299
9299
  });
9300
9300
 
9301
+ // ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
9302
+ var require_windows = __commonJS({
9303
+ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports2, module2) {
9304
+ module2.exports = isexe;
9305
+ isexe.sync = sync;
9306
+ var fs14 = require("fs");
9307
+ function checkPathExt(path28, options) {
9308
+ var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
9309
+ if (!pathext) {
9310
+ return true;
9311
+ }
9312
+ pathext = pathext.split(";");
9313
+ if (pathext.indexOf("") !== -1) {
9314
+ return true;
9315
+ }
9316
+ for (var i = 0; i < pathext.length; i++) {
9317
+ var p = pathext[i].toLowerCase();
9318
+ if (p && path28.substr(-p.length).toLowerCase() === p) {
9319
+ return true;
9320
+ }
9321
+ }
9322
+ return false;
9323
+ }
9324
+ function checkStat(stat3, path28, options) {
9325
+ if (!stat3.isSymbolicLink() && !stat3.isFile()) {
9326
+ return false;
9327
+ }
9328
+ return checkPathExt(path28, options);
9329
+ }
9330
+ function isexe(path28, options, cb) {
9331
+ fs14.stat(path28, function(er, stat3) {
9332
+ cb(er, er ? false : checkStat(stat3, path28, options));
9333
+ });
9334
+ }
9335
+ function sync(path28, options) {
9336
+ return checkStat(fs14.statSync(path28), path28, options);
9337
+ }
9338
+ }
9339
+ });
9340
+
9341
+ // ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js
9342
+ var require_mode = __commonJS({
9343
+ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports2, module2) {
9344
+ module2.exports = isexe;
9345
+ isexe.sync = sync;
9346
+ var fs14 = require("fs");
9347
+ function isexe(path28, options, cb) {
9348
+ fs14.stat(path28, function(er, stat3) {
9349
+ cb(er, er ? false : checkStat(stat3, options));
9350
+ });
9351
+ }
9352
+ function sync(path28, options) {
9353
+ return checkStat(fs14.statSync(path28), options);
9354
+ }
9355
+ function checkStat(stat3, options) {
9356
+ return stat3.isFile() && checkMode(stat3, options);
9357
+ }
9358
+ function checkMode(stat3, options) {
9359
+ var mod2 = stat3.mode;
9360
+ var uid = stat3.uid;
9361
+ var gid = stat3.gid;
9362
+ var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid();
9363
+ var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid();
9364
+ var u = parseInt("100", 8);
9365
+ var g = parseInt("010", 8);
9366
+ var o = parseInt("001", 8);
9367
+ var ug = u | g;
9368
+ var ret = mod2 & o || mod2 & g && gid === myGid || mod2 & u && uid === myUid || mod2 & ug && myUid === 0;
9369
+ return ret;
9370
+ }
9371
+ }
9372
+ });
9373
+
9374
+ // ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
9375
+ var require_isexe = __commonJS({
9376
+ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports2, module2) {
9377
+ var fs14 = require("fs");
9378
+ var core;
9379
+ if (process.platform === "win32" || global.TESTING_WINDOWS) {
9380
+ core = require_windows();
9381
+ } else {
9382
+ core = require_mode();
9383
+ }
9384
+ module2.exports = isexe;
9385
+ isexe.sync = sync;
9386
+ function isexe(path28, options, cb) {
9387
+ if (typeof options === "function") {
9388
+ cb = options;
9389
+ options = {};
9390
+ }
9391
+ if (!cb) {
9392
+ if (typeof Promise !== "function") {
9393
+ throw new TypeError("callback not provided");
9394
+ }
9395
+ return new Promise(function(resolve, reject) {
9396
+ isexe(path28, options || {}, function(er, is) {
9397
+ if (er) {
9398
+ reject(er);
9399
+ } else {
9400
+ resolve(is);
9401
+ }
9402
+ });
9403
+ });
9404
+ }
9405
+ core(path28, options || {}, function(er, is) {
9406
+ if (er) {
9407
+ if (er.code === "EACCES" || options && options.ignoreErrors) {
9408
+ er = null;
9409
+ is = false;
9410
+ }
9411
+ }
9412
+ cb(er, is);
9413
+ });
9414
+ }
9415
+ function sync(path28, options) {
9416
+ try {
9417
+ return core.sync(path28, options || {});
9418
+ } catch (er) {
9419
+ if (options && options.ignoreErrors || er.code === "EACCES") {
9420
+ return false;
9421
+ } else {
9422
+ throw er;
9423
+ }
9424
+ }
9425
+ }
9426
+ }
9427
+ });
9428
+
9429
+ // ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
9430
+ var require_which = __commonJS({
9431
+ "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports2, module2) {
9432
+ var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
9433
+ var path28 = require("path");
9434
+ var COLON = isWindows ? ";" : ":";
9435
+ var isexe = require_isexe();
9436
+ var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
9437
+ var getPathInfo = (cmd, opt) => {
9438
+ const colon = opt.colon || COLON;
9439
+ const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [
9440
+ // windows always checks the cwd first
9441
+ ...isWindows ? [process.cwd()] : [],
9442
+ ...(opt.path || process.env.PATH || /* istanbul ignore next: very unusual */
9443
+ "").split(colon)
9444
+ ];
9445
+ const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
9446
+ const pathExt = isWindows ? pathExtExe.split(colon) : [""];
9447
+ if (isWindows) {
9448
+ if (cmd.indexOf(".") !== -1 && pathExt[0] !== "")
9449
+ pathExt.unshift("");
9450
+ }
9451
+ return {
9452
+ pathEnv,
9453
+ pathExt,
9454
+ pathExtExe
9455
+ };
9456
+ };
9457
+ var which = (cmd, opt, cb) => {
9458
+ if (typeof opt === "function") {
9459
+ cb = opt;
9460
+ opt = {};
9461
+ }
9462
+ if (!opt)
9463
+ opt = {};
9464
+ const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
9465
+ const found = [];
9466
+ const step = (i) => new Promise((resolve, reject) => {
9467
+ if (i === pathEnv.length)
9468
+ return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
9469
+ const ppRaw = pathEnv[i];
9470
+ const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
9471
+ const pCmd = path28.join(pathPart, cmd);
9472
+ const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
9473
+ resolve(subStep(p, i, 0));
9474
+ });
9475
+ const subStep = (p, i, ii) => new Promise((resolve, reject) => {
9476
+ if (ii === pathExt.length)
9477
+ return resolve(step(i + 1));
9478
+ const ext = pathExt[ii];
9479
+ isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
9480
+ if (!er && is) {
9481
+ if (opt.all)
9482
+ found.push(p + ext);
9483
+ else
9484
+ return resolve(p + ext);
9485
+ }
9486
+ return resolve(subStep(p, i, ii + 1));
9487
+ });
9488
+ });
9489
+ return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
9490
+ };
9491
+ var whichSync = (cmd, opt) => {
9492
+ opt = opt || {};
9493
+ const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
9494
+ const found = [];
9495
+ for (let i = 0; i < pathEnv.length; i++) {
9496
+ const ppRaw = pathEnv[i];
9497
+ const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
9498
+ const pCmd = path28.join(pathPart, cmd);
9499
+ const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
9500
+ for (let j = 0; j < pathExt.length; j++) {
9501
+ const cur = p + pathExt[j];
9502
+ try {
9503
+ const is = isexe.sync(cur, { pathExt: pathExtExe });
9504
+ if (is) {
9505
+ if (opt.all)
9506
+ found.push(cur);
9507
+ else
9508
+ return cur;
9509
+ }
9510
+ } catch (ex) {
9511
+ }
9512
+ }
9513
+ }
9514
+ if (opt.all && found.length)
9515
+ return found;
9516
+ if (opt.nothrow)
9517
+ return null;
9518
+ throw getNotFoundError(cmd);
9519
+ };
9520
+ module2.exports = which;
9521
+ which.sync = whichSync;
9522
+ }
9523
+ });
9524
+
9525
+ // ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js
9526
+ var require_path_key = __commonJS({
9527
+ "../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js"(exports2, module2) {
9528
+ "use strict";
9529
+ var pathKey = (options = {}) => {
9530
+ const environment = options.env || process.env;
9531
+ const platform = options.platform || process.platform;
9532
+ if (platform !== "win32") {
9533
+ return "PATH";
9534
+ }
9535
+ return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
9536
+ };
9537
+ module2.exports = pathKey;
9538
+ module2.exports.default = pathKey;
9539
+ }
9540
+ });
9541
+
9542
+ // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
9543
+ var require_resolveCommand = __commonJS({
9544
+ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
9545
+ "use strict";
9546
+ var path28 = require("path");
9547
+ var which = require_which();
9548
+ var getPathKey = require_path_key();
9549
+ function resolveCommandAttempt(parsed, withoutPathExt) {
9550
+ const env = parsed.options.env || process.env;
9551
+ const cwd = process.cwd();
9552
+ const hasCustomCwd = parsed.options.cwd != null;
9553
+ const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
9554
+ if (shouldSwitchCwd) {
9555
+ try {
9556
+ process.chdir(parsed.options.cwd);
9557
+ } catch (err) {
9558
+ }
9559
+ }
9560
+ let resolved;
9561
+ try {
9562
+ resolved = which.sync(parsed.command, {
9563
+ path: env[getPathKey({ env })],
9564
+ pathExt: withoutPathExt ? path28.delimiter : void 0
9565
+ });
9566
+ } catch (e) {
9567
+ } finally {
9568
+ if (shouldSwitchCwd) {
9569
+ process.chdir(cwd);
9570
+ }
9571
+ }
9572
+ if (resolved) {
9573
+ resolved = path28.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
9574
+ }
9575
+ return resolved;
9576
+ }
9577
+ function resolveCommand(parsed) {
9578
+ return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
9579
+ }
9580
+ module2.exports = resolveCommand;
9581
+ }
9582
+ });
9583
+
9584
+ // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js
9585
+ var require_escape = __commonJS({
9586
+ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js"(exports2, module2) {
9587
+ "use strict";
9588
+ var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
9589
+ function escapeCommand(arg) {
9590
+ arg = arg.replace(metaCharsRegExp, "^$1");
9591
+ return arg;
9592
+ }
9593
+ function escapeArgument(arg, doubleEscapeMetaChars) {
9594
+ arg = `${arg}`;
9595
+ arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"');
9596
+ arg = arg.replace(/(?=(\\+?)?)\1$/, "$1$1");
9597
+ arg = `"${arg}"`;
9598
+ arg = arg.replace(metaCharsRegExp, "^$1");
9599
+ if (doubleEscapeMetaChars) {
9600
+ arg = arg.replace(metaCharsRegExp, "^$1");
9601
+ }
9602
+ return arg;
9603
+ }
9604
+ module2.exports.command = escapeCommand;
9605
+ module2.exports.argument = escapeArgument;
9606
+ }
9607
+ });
9608
+
9609
+ // ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js
9610
+ var require_shebang_regex = __commonJS({
9611
+ "../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(exports2, module2) {
9612
+ "use strict";
9613
+ module2.exports = /^#!(.*)/;
9614
+ }
9615
+ });
9616
+
9617
+ // ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js
9618
+ var require_shebang_command = __commonJS({
9619
+ "../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(exports2, module2) {
9620
+ "use strict";
9621
+ var shebangRegex = require_shebang_regex();
9622
+ module2.exports = (string4 = "") => {
9623
+ const match = string4.match(shebangRegex);
9624
+ if (!match) {
9625
+ return null;
9626
+ }
9627
+ const [path28, argument] = match[0].replace(/#! ?/, "").split(" ");
9628
+ const binary = path28.split("/").pop();
9629
+ if (binary === "env") {
9630
+ return argument;
9631
+ }
9632
+ return argument ? `${binary} ${argument}` : binary;
9633
+ };
9634
+ }
9635
+ });
9636
+
9637
+ // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
9638
+ var require_readShebang = __commonJS({
9639
+ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
9640
+ "use strict";
9641
+ var fs14 = require("fs");
9642
+ var shebangCommand = require_shebang_command();
9643
+ function readShebang(command) {
9644
+ const size = 150;
9645
+ const buffer = Buffer.alloc(size);
9646
+ let fd;
9647
+ try {
9648
+ fd = fs14.openSync(command, "r");
9649
+ fs14.readSync(fd, buffer, 0, size, 0);
9650
+ fs14.closeSync(fd);
9651
+ } catch (e) {
9652
+ }
9653
+ return shebangCommand(buffer.toString());
9654
+ }
9655
+ module2.exports = readShebang;
9656
+ }
9657
+ });
9658
+
9659
+ // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
9660
+ var require_parse2 = __commonJS({
9661
+ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
9662
+ "use strict";
9663
+ var path28 = require("path");
9664
+ var resolveCommand = require_resolveCommand();
9665
+ var escape2 = require_escape();
9666
+ var readShebang = require_readShebang();
9667
+ var isWin = process.platform === "win32";
9668
+ var isExecutableRegExp = /\.(?:com|exe)$/i;
9669
+ var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
9670
+ function detectShebang(parsed) {
9671
+ parsed.file = resolveCommand(parsed);
9672
+ const shebang = parsed.file && readShebang(parsed.file);
9673
+ if (shebang) {
9674
+ parsed.args.unshift(parsed.file);
9675
+ parsed.command = shebang;
9676
+ return resolveCommand(parsed);
9677
+ }
9678
+ return parsed.file;
9679
+ }
9680
+ function parseNonShell(parsed) {
9681
+ if (!isWin) {
9682
+ return parsed;
9683
+ }
9684
+ const commandFile = detectShebang(parsed);
9685
+ const needsShell = !isExecutableRegExp.test(commandFile);
9686
+ if (parsed.options.forceShell || needsShell) {
9687
+ const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
9688
+ parsed.command = path28.normalize(parsed.command);
9689
+ parsed.command = escape2.command(parsed.command);
9690
+ parsed.args = parsed.args.map((arg) => escape2.argument(arg, needsDoubleEscapeMetaChars));
9691
+ const shellCommand = [parsed.command].concat(parsed.args).join(" ");
9692
+ parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`];
9693
+ parsed.command = process.env.comspec || "cmd.exe";
9694
+ parsed.options.windowsVerbatimArguments = true;
9695
+ }
9696
+ return parsed;
9697
+ }
9698
+ function parse8(command, args, options) {
9699
+ if (args && !Array.isArray(args)) {
9700
+ options = args;
9701
+ args = null;
9702
+ }
9703
+ args = args ? args.slice(0) : [];
9704
+ options = Object.assign({}, options);
9705
+ const parsed = {
9706
+ command,
9707
+ args,
9708
+ options,
9709
+ file: void 0,
9710
+ original: {
9711
+ command,
9712
+ args
9713
+ }
9714
+ };
9715
+ return options.shell ? parsed : parseNonShell(parsed);
9716
+ }
9717
+ module2.exports = parse8;
9718
+ }
9719
+ });
9720
+
9721
+ // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js
9722
+ var require_enoent = __commonJS({
9723
+ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js"(exports2, module2) {
9724
+ "use strict";
9725
+ var isWin = process.platform === "win32";
9726
+ function notFoundError(original, syscall) {
9727
+ return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
9728
+ code: "ENOENT",
9729
+ errno: "ENOENT",
9730
+ syscall: `${syscall} ${original.command}`,
9731
+ path: original.command,
9732
+ spawnargs: original.args
9733
+ });
9734
+ }
9735
+ function hookChildProcess(cp, parsed) {
9736
+ if (!isWin) {
9737
+ return;
9738
+ }
9739
+ const originalEmit = cp.emit;
9740
+ cp.emit = function(name, arg1) {
9741
+ if (name === "exit") {
9742
+ const err = verifyENOENT(arg1, parsed);
9743
+ if (err) {
9744
+ return originalEmit.call(cp, "error", err);
9745
+ }
9746
+ }
9747
+ return originalEmit.apply(cp, arguments);
9748
+ };
9749
+ }
9750
+ function verifyENOENT(status, parsed) {
9751
+ if (isWin && status === 1 && !parsed.file) {
9752
+ return notFoundError(parsed.original, "spawn");
9753
+ }
9754
+ return null;
9755
+ }
9756
+ function verifyENOENTSync(status, parsed) {
9757
+ if (isWin && status === 1 && !parsed.file) {
9758
+ return notFoundError(parsed.original, "spawnSync");
9759
+ }
9760
+ return null;
9761
+ }
9762
+ module2.exports = {
9763
+ hookChildProcess,
9764
+ verifyENOENT,
9765
+ verifyENOENTSync,
9766
+ notFoundError
9767
+ };
9768
+ }
9769
+ });
9770
+
9771
+ // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js
9772
+ var require_cross_spawn = __commonJS({
9773
+ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"(exports2, module2) {
9774
+ "use strict";
9775
+ var cp = require("child_process");
9776
+ var parse8 = require_parse2();
9777
+ var enoent = require_enoent();
9778
+ function spawn6(command, args, options) {
9779
+ const parsed = parse8(command, args, options);
9780
+ const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
9781
+ enoent.hookChildProcess(spawned, parsed);
9782
+ return spawned;
9783
+ }
9784
+ function spawnSync7(command, args, options) {
9785
+ const parsed = parse8(command, args, options);
9786
+ const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
9787
+ result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
9788
+ return result;
9789
+ }
9790
+ module2.exports = spawn6;
9791
+ module2.exports.spawn = spawn6;
9792
+ module2.exports.sync = spawnSync7;
9793
+ module2.exports._parse = parse8;
9794
+ module2.exports._enoent = enoent;
9795
+ }
9796
+ });
9797
+
9301
9798
  // ../../node_modules/.pnpm/semver@7.8.0/node_modules/semver/internal/constants.js
9302
9799
  var require_constants = __commonJS({
9303
9800
  "../../node_modules/.pnpm/semver@7.8.0/node_modules/semver/internal/constants.js"(exports2, module2) {
@@ -9752,11 +10249,11 @@ var require_semver = __commonJS({
9752
10249
  });
9753
10250
 
9754
10251
  // ../../node_modules/.pnpm/semver@7.8.0/node_modules/semver/functions/parse.js
9755
- var require_parse2 = __commonJS({
10252
+ var require_parse3 = __commonJS({
9756
10253
  "../../node_modules/.pnpm/semver@7.8.0/node_modules/semver/functions/parse.js"(exports2, module2) {
9757
10254
  "use strict";
9758
10255
  var SemVer = require_semver();
9759
- var parse7 = (version2, options, throwErrors = false) => {
10256
+ var parse8 = (version2, options, throwErrors = false) => {
9760
10257
  if (version2 instanceof SemVer) {
9761
10258
  return version2;
9762
10259
  }
@@ -9769,7 +10266,7 @@ var require_parse2 = __commonJS({
9769
10266
  throw er;
9770
10267
  }
9771
10268
  };
9772
- module2.exports = parse7;
10269
+ module2.exports = parse8;
9773
10270
  }
9774
10271
  });
9775
10272
 
@@ -9777,9 +10274,9 @@ var require_parse2 = __commonJS({
9777
10274
  var require_valid = __commonJS({
9778
10275
  "../../node_modules/.pnpm/semver@7.8.0/node_modules/semver/functions/valid.js"(exports2, module2) {
9779
10276
  "use strict";
9780
- var parse7 = require_parse2();
10277
+ var parse8 = require_parse3();
9781
10278
  var valid = (version2, options) => {
9782
- const v = parse7(version2, options);
10279
+ const v = parse8(version2, options);
9783
10280
  return v ? v.version : null;
9784
10281
  };
9785
10282
  module2.exports = valid;
@@ -9790,9 +10287,9 @@ var require_valid = __commonJS({
9790
10287
  var require_clean = __commonJS({
9791
10288
  "../../node_modules/.pnpm/semver@7.8.0/node_modules/semver/functions/clean.js"(exports2, module2) {
9792
10289
  "use strict";
9793
- var parse7 = require_parse2();
10290
+ var parse8 = require_parse3();
9794
10291
  var clean = (version2, options) => {
9795
- const s = parse7(version2.trim().replace(/^[=v]+/, ""), options);
10292
+ const s = parse8(version2.trim().replace(/^[=v]+/, ""), options);
9796
10293
  return s ? s.version : null;
9797
10294
  };
9798
10295
  module2.exports = clean;
@@ -9827,10 +10324,10 @@ var require_inc = __commonJS({
9827
10324
  var require_diff = __commonJS({
9828
10325
  "../../node_modules/.pnpm/semver@7.8.0/node_modules/semver/functions/diff.js"(exports2, module2) {
9829
10326
  "use strict";
9830
- var parse7 = require_parse2();
10327
+ var parse8 = require_parse3();
9831
10328
  var diff = (version1, version2) => {
9832
- const v1 = parse7(version1, null, true);
9833
- const v2 = parse7(version2, null, true);
10329
+ const v1 = parse8(version1, null, true);
10330
+ const v2 = parse8(version2, null, true);
9834
10331
  const comparison = v1.compare(v2);
9835
10332
  if (comparison === 0) {
9836
10333
  return null;
@@ -9901,9 +10398,9 @@ var require_patch = __commonJS({
9901
10398
  var require_prerelease = __commonJS({
9902
10399
  "../../node_modules/.pnpm/semver@7.8.0/node_modules/semver/functions/prerelease.js"(exports2, module2) {
9903
10400
  "use strict";
9904
- var parse7 = require_parse2();
10401
+ var parse8 = require_parse3();
9905
10402
  var prerelease = (version2, options) => {
9906
- const parsed = parse7(version2, options);
10403
+ const parsed = parse8(version2, options);
9907
10404
  return parsed && parsed.prerelease.length ? parsed.prerelease : null;
9908
10405
  };
9909
10406
  module2.exports = prerelease;
@@ -10089,7 +10586,7 @@ var require_coerce = __commonJS({
10089
10586
  "../../node_modules/.pnpm/semver@7.8.0/node_modules/semver/functions/coerce.js"(exports2, module2) {
10090
10587
  "use strict";
10091
10588
  var SemVer = require_semver();
10092
- var parse7 = require_parse2();
10589
+ var parse8 = require_parse3();
10093
10590
  var { safeRe: re, t } = require_re();
10094
10591
  var coerce = (version2, options) => {
10095
10592
  if (version2 instanceof SemVer) {
@@ -10124,7 +10621,7 @@ var require_coerce = __commonJS({
10124
10621
  const patch = match[4] || "0";
10125
10622
  const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
10126
10623
  const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
10127
- return parse7(`${major}.${minor}.${patch}${prerelease}${build}`, options);
10624
+ return parse8(`${major}.${minor}.${patch}${prerelease}${build}`, options);
10128
10625
  };
10129
10626
  module2.exports = coerce;
10130
10627
  }
@@ -10134,7 +10631,7 @@ var require_coerce = __commonJS({
10134
10631
  var require_truncate = __commonJS({
10135
10632
  "../../node_modules/.pnpm/semver@7.8.0/node_modules/semver/functions/truncate.js"(exports2, module2) {
10136
10633
  "use strict";
10137
- var parse7 = require_parse2();
10634
+ var parse8 = require_parse3();
10138
10635
  var constants2 = require_constants();
10139
10636
  var SemVer = require_semver();
10140
10637
  var truncate3 = (version2, truncation, options) => {
@@ -10146,7 +10643,7 @@ var require_truncate = __commonJS({
10146
10643
  };
10147
10644
  var cloneInputVersion = (version2, options) => {
10148
10645
  const versionStringToParse = version2 instanceof SemVer ? version2.version : version2;
10149
- return parse7(versionStringToParse, options);
10646
+ return parse8(versionStringToParse, options);
10150
10647
  };
10151
10648
  var doTruncation = (version2, truncation) => {
10152
10649
  if (isPrerelease(truncation)) {
@@ -11182,7 +11679,7 @@ var require_semver2 = __commonJS({
11182
11679
  var constants2 = require_constants();
11183
11680
  var SemVer = require_semver();
11184
11681
  var identifiers = require_identifiers();
11185
- var parse7 = require_parse2();
11682
+ var parse8 = require_parse3();
11186
11683
  var valid = require_valid();
11187
11684
  var clean = require_clean();
11188
11685
  var inc = require_inc();
@@ -11221,7 +11718,7 @@ var require_semver2 = __commonJS({
11221
11718
  var simplifyRange = require_simplify();
11222
11719
  var subset = require_subset();
11223
11720
  module2.exports = {
11224
- parse: parse7,
11721
+ parse: parse8,
11225
11722
  valid,
11226
11723
  clean,
11227
11724
  inc,
@@ -13366,7 +13863,7 @@ var require_extension = __commonJS({
13366
13863
  if (dest[name] === void 0) dest[name] = [elem];
13367
13864
  else dest[name].push(elem);
13368
13865
  }
13369
- function parse7(header) {
13866
+ function parse8(header) {
13370
13867
  const offers = /* @__PURE__ */ Object.create(null);
13371
13868
  let params = /* @__PURE__ */ Object.create(null);
13372
13869
  let mustUnescape = false;
@@ -13506,7 +14003,7 @@ var require_extension = __commonJS({
13506
14003
  }).join(", ");
13507
14004
  }).join(", ");
13508
14005
  }
13509
- module2.exports = { format, parse: parse7 };
14006
+ module2.exports = { format, parse: parse8 };
13510
14007
  }
13511
14008
  });
13512
14009
 
@@ -13540,7 +14037,7 @@ var require_websocket = __commonJS({
13540
14037
  var {
13541
14038
  EventTarget: { addEventListener, removeEventListener }
13542
14039
  } = require_event_target();
13543
- var { format, parse: parse7 } = require_extension();
14040
+ var { format, parse: parse8 } = require_extension();
13544
14041
  var { toBuffer } = require_buffer_util();
13545
14042
  var kAborted = Symbol("kAborted");
13546
14043
  var protocolVersions = [8, 13];
@@ -14217,7 +14714,7 @@ var require_websocket = __commonJS({
14217
14714
  }
14218
14715
  let extensions;
14219
14716
  try {
14220
- extensions = parse7(secWebSocketExtensions);
14717
+ extensions = parse8(secWebSocketExtensions);
14221
14718
  } catch (err) {
14222
14719
  const message = "Invalid Sec-WebSocket-Extensions header";
14223
14720
  abortHandshake(websocket, socket, message);
@@ -14509,7 +15006,7 @@ var require_subprotocol = __commonJS({
14509
15006
  "../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/subprotocol.js"(exports2, module2) {
14510
15007
  "use strict";
14511
15008
  var { tokenChars } = require_validation2();
14512
- function parse7(header) {
15009
+ function parse8(header) {
14513
15010
  const protocols = /* @__PURE__ */ new Set();
14514
15011
  let start = -1;
14515
15012
  let end = -1;
@@ -14545,7 +15042,7 @@ var require_subprotocol = __commonJS({
14545
15042
  protocols.add(protocol);
14546
15043
  return protocols;
14547
15044
  }
14548
- module2.exports = { parse: parse7 };
15045
+ module2.exports = { parse: parse8 };
14549
15046
  }
14550
15047
  });
14551
15048
 
@@ -15991,11 +16488,11 @@ var require_signals = __commonJS({
15991
16488
  // ../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js
15992
16489
  var require_signal_exit = __commonJS({
15993
16490
  "../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports2, module2) {
15994
- var process4 = global.process;
15995
- var processOk = function(process5) {
15996
- return process5 && typeof process5 === "object" && typeof process5.removeListener === "function" && typeof process5.emit === "function" && typeof process5.reallyExit === "function" && typeof process5.listeners === "function" && typeof process5.kill === "function" && typeof process5.pid === "number" && typeof process5.on === "function";
16491
+ var process5 = global.process;
16492
+ var processOk = function(process6) {
16493
+ return process6 && typeof process6 === "object" && typeof process6.removeListener === "function" && typeof process6.emit === "function" && typeof process6.reallyExit === "function" && typeof process6.listeners === "function" && typeof process6.kill === "function" && typeof process6.pid === "number" && typeof process6.on === "function";
15997
16494
  };
15998
- if (!processOk(process4)) {
16495
+ if (!processOk(process5)) {
15999
16496
  module2.exports = function() {
16000
16497
  return function() {
16001
16498
  };
@@ -16003,15 +16500,15 @@ var require_signal_exit = __commonJS({
16003
16500
  } else {
16004
16501
  assert2 = require("assert");
16005
16502
  signals = require_signals();
16006
- isWin = /^win/i.test(process4.platform);
16503
+ isWin = /^win/i.test(process5.platform);
16007
16504
  EE = require("events");
16008
16505
  if (typeof EE !== "function") {
16009
16506
  EE = EE.EventEmitter;
16010
16507
  }
16011
- if (process4.__signal_exit_emitter__) {
16012
- emitter = process4.__signal_exit_emitter__;
16508
+ if (process5.__signal_exit_emitter__) {
16509
+ emitter = process5.__signal_exit_emitter__;
16013
16510
  } else {
16014
- emitter = process4.__signal_exit_emitter__ = new EE();
16511
+ emitter = process5.__signal_exit_emitter__ = new EE();
16015
16512
  emitter.count = 0;
16016
16513
  emitter.emitted = {};
16017
16514
  }
@@ -16048,12 +16545,12 @@ var require_signal_exit = __commonJS({
16048
16545
  loaded = false;
16049
16546
  signals.forEach(function(sig) {
16050
16547
  try {
16051
- process4.removeListener(sig, sigListeners[sig]);
16548
+ process5.removeListener(sig, sigListeners[sig]);
16052
16549
  } catch (er) {
16053
16550
  }
16054
16551
  });
16055
- process4.emit = originalProcessEmit;
16056
- process4.reallyExit = originalProcessReallyExit;
16552
+ process5.emit = originalProcessEmit;
16553
+ process5.reallyExit = originalProcessReallyExit;
16057
16554
  emitter.count -= 1;
16058
16555
  };
16059
16556
  module2.exports.unload = unload;
@@ -16070,7 +16567,7 @@ var require_signal_exit = __commonJS({
16070
16567
  if (!processOk(global.process)) {
16071
16568
  return;
16072
16569
  }
16073
- var listeners = process4.listeners(sig);
16570
+ var listeners = process5.listeners(sig);
16074
16571
  if (listeners.length === emitter.count) {
16075
16572
  unload();
16076
16573
  emit("exit", null, sig);
@@ -16078,7 +16575,7 @@ var require_signal_exit = __commonJS({
16078
16575
  if (isWin && sig === "SIGHUP") {
16079
16576
  sig = "SIGINT";
16080
16577
  }
16081
- process4.kill(process4.pid, sig);
16578
+ process5.kill(process5.pid, sig);
16082
16579
  }
16083
16580
  };
16084
16581
  });
@@ -16094,36 +16591,36 @@ var require_signal_exit = __commonJS({
16094
16591
  emitter.count += 1;
16095
16592
  signals = signals.filter(function(sig) {
16096
16593
  try {
16097
- process4.on(sig, sigListeners[sig]);
16594
+ process5.on(sig, sigListeners[sig]);
16098
16595
  return true;
16099
16596
  } catch (er) {
16100
16597
  return false;
16101
16598
  }
16102
16599
  });
16103
- process4.emit = processEmit;
16104
- process4.reallyExit = processReallyExit;
16600
+ process5.emit = processEmit;
16601
+ process5.reallyExit = processReallyExit;
16105
16602
  };
16106
16603
  module2.exports.load = load;
16107
- originalProcessReallyExit = process4.reallyExit;
16604
+ originalProcessReallyExit = process5.reallyExit;
16108
16605
  processReallyExit = function processReallyExit2(code) {
16109
16606
  if (!processOk(global.process)) {
16110
16607
  return;
16111
16608
  }
16112
- process4.exitCode = code || /* istanbul ignore next */
16609
+ process5.exitCode = code || /* istanbul ignore next */
16113
16610
  0;
16114
- emit("exit", process4.exitCode, null);
16115
- emit("afterexit", process4.exitCode, null);
16116
- originalProcessReallyExit.call(process4, process4.exitCode);
16611
+ emit("exit", process5.exitCode, null);
16612
+ emit("afterexit", process5.exitCode, null);
16613
+ originalProcessReallyExit.call(process5, process5.exitCode);
16117
16614
  };
16118
- originalProcessEmit = process4.emit;
16615
+ originalProcessEmit = process5.emit;
16119
16616
  processEmit = function processEmit2(ev, arg) {
16120
16617
  if (ev === "exit" && processOk(global.process)) {
16121
16618
  if (arg !== void 0) {
16122
- process4.exitCode = arg;
16619
+ process5.exitCode = arg;
16123
16620
  }
16124
16621
  var ret = originalProcessEmit.apply(this, arguments);
16125
- emit("exit", process4.exitCode, null);
16126
- emit("afterexit", process4.exitCode, null);
16622
+ emit("exit", process5.exitCode, null);
16623
+ emit("afterexit", process5.exitCode, null);
16127
16624
  return ret;
16128
16625
  } else {
16129
16626
  return originalProcessEmit.apply(this, arguments);
@@ -17420,7 +17917,7 @@ var require_regex = __commonJS({
17420
17917
  });
17421
17918
 
17422
17919
  // ../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js
17423
- var require_mode = __commonJS({
17920
+ var require_mode2 = __commonJS({
17424
17921
  "../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js"(exports2) {
17425
17922
  var VersionCheck = require_version_check();
17426
17923
  var Regex = require_regex();
@@ -17506,7 +18003,7 @@ var require_version = __commonJS({
17506
18003
  var Utils = require_utils2();
17507
18004
  var ECCode = require_error_correction_code();
17508
18005
  var ECLevel = require_error_correction_level();
17509
- var Mode = require_mode();
18006
+ var Mode = require_mode2();
17510
18007
  var VersionCheck = require_version_check();
17511
18008
  var G18 = 1 << 12 | 1 << 11 | 1 << 10 | 1 << 9 | 1 << 8 | 1 << 5 | 1 << 2 | 1 << 0;
17512
18009
  var G18_BCH = Utils.getBCHDigit(G18);
@@ -17616,7 +18113,7 @@ var require_format_info = __commonJS({
17616
18113
  // ../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/numeric-data.js
17617
18114
  var require_numeric_data = __commonJS({
17618
18115
  "../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/numeric-data.js"(exports2, module2) {
17619
- var Mode = require_mode();
18116
+ var Mode = require_mode2();
17620
18117
  function NumericData(data) {
17621
18118
  this.mode = Mode.NUMERIC;
17622
18119
  this.data = data.toString();
@@ -17651,7 +18148,7 @@ var require_numeric_data = __commonJS({
17651
18148
  // ../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alphanumeric-data.js
17652
18149
  var require_alphanumeric_data = __commonJS({
17653
18150
  "../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alphanumeric-data.js"(exports2, module2) {
17654
- var Mode = require_mode();
18151
+ var Mode = require_mode2();
17655
18152
  var ALPHA_NUM_CHARS = [
17656
18153
  "0",
17657
18154
  "1",
@@ -17730,7 +18227,7 @@ var require_alphanumeric_data = __commonJS({
17730
18227
  // ../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/byte-data.js
17731
18228
  var require_byte_data = __commonJS({
17732
18229
  "../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/byte-data.js"(exports2, module2) {
17733
- var Mode = require_mode();
18230
+ var Mode = require_mode2();
17734
18231
  function ByteData(data) {
17735
18232
  this.mode = Mode.BYTE;
17736
18233
  if (typeof data === "string") {
@@ -17760,7 +18257,7 @@ var require_byte_data = __commonJS({
17760
18257
  // ../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/kanji-data.js
17761
18258
  var require_kanji_data = __commonJS({
17762
18259
  "../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/kanji-data.js"(exports2, module2) {
17763
- var Mode = require_mode();
18260
+ var Mode = require_mode2();
17764
18261
  var Utils = require_utils2();
17765
18262
  function KanjiData(data) {
17766
18263
  this.mode = Mode.KANJI;
@@ -17900,7 +18397,7 @@ var require_dijkstra = __commonJS({
17900
18397
  // ../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/segments.js
17901
18398
  var require_segments = __commonJS({
17902
18399
  "../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/segments.js"(exports2) {
17903
- var Mode = require_mode();
18400
+ var Mode = require_mode2();
17904
18401
  var NumericData = require_numeric_data();
17905
18402
  var AlphanumericData = require_alphanumeric_data();
17906
18403
  var ByteData = require_byte_data();
@@ -18097,7 +18594,7 @@ var require_qrcode = __commonJS({
18097
18594
  var ReedSolomonEncoder = require_reed_solomon_encoder();
18098
18595
  var Version = require_version();
18099
18596
  var FormatInfo = require_format_info();
18100
- var Mode = require_mode();
18597
+ var Mode = require_mode2();
18101
18598
  var Segments = require_segments();
18102
18599
  function setupFinderPattern(matrix, version2) {
18103
18600
  const size = matrix.size;
@@ -20276,10 +20773,10 @@ var require_packer_sync = __commonJS({
20276
20773
  var require_png_sync = __commonJS({
20277
20774
  "../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/png-sync.js"(exports2) {
20278
20775
  "use strict";
20279
- var parse7 = require_parser_sync();
20776
+ var parse8 = require_parser_sync();
20280
20777
  var pack = require_packer_sync();
20281
20778
  exports2.read = function(buffer, options) {
20282
- return parse7(buffer, options || {});
20779
+ return parse8(buffer, options || {});
20283
20780
  };
20284
20781
  exports2.write = function(png, options) {
20285
20782
  return pack(png, options);
@@ -21114,7 +21611,7 @@ async function installPublicMcpServerToConfigs(serverId, expected) {
21114
21611
  if (await pathExists5(codexPath)) {
21115
21612
  try {
21116
21613
  const content = await import_promises15.default.readFile(codexPath, "utf8");
21117
- const parsed = toml3.parse(content);
21614
+ const parsed = toml4.parse(content);
21118
21615
  if (!parsed.mcp_servers?.[serverId]) {
21119
21616
  const appended = content.replace(/\n$/, "") + renderTomlBlock(serverId, expected);
21120
21617
  await writeAtomic(codexPath, appended);
@@ -21146,14 +21643,14 @@ async function installPublicMcpServerToConfigs(serverId, expected) {
21146
21643
  await writeAtomic(agyPath, JSON.stringify({ mcpServers: { [serverId]: expected } }, null, 2) + "\n");
21147
21644
  }
21148
21645
  }
21149
- var import_promises15, import_node_os16, import_node_path36, toml3;
21646
+ var import_promises15, import_node_os16, import_node_path36, toml4;
21150
21647
  var init_install_public_mcp = __esm({
21151
21648
  "src/install-public-mcp.ts"() {
21152
21649
  "use strict";
21153
21650
  import_promises15 = __toESM(require("node:fs/promises"), 1);
21154
21651
  import_node_os16 = __toESM(require("node:os"), 1);
21155
21652
  import_node_path36 = __toESM(require("node:path"), 1);
21156
- toml3 = __toESM(require_toml(), 1);
21653
+ toml4 = __toESM(require_toml(), 1);
21157
21654
  }
21158
21655
  });
21159
21656
 
@@ -21168,7 +21665,7 @@ var import_node_path42 = __toESM(require("node:path"), 1);
21168
21665
  var import_promises = __toESM(require("node:fs/promises"), 1);
21169
21666
  var import_node_os3 = __toESM(require("node:os"), 1);
21170
21667
  var import_node_path3 = __toESM(require("node:path"), 1);
21171
- var toml = __toESM(require_toml(), 1);
21668
+ var toml2 = __toESM(require_toml(), 1);
21172
21669
 
21173
21670
  // src/api-base-url.ts
21174
21671
  var DEFAULT_API_BASE_URL = "http://127.0.0.1:8787";
@@ -21242,17 +21739,10 @@ function isLoopbackUrl(input) {
21242
21739
  function readConfiguredApiBaseUrl(explicit) {
21243
21740
  const direct = explicit ?? process.env.MRRLIN_API_BASE_URL;
21244
21741
  if (direct?.trim()) return retargetRetiredApiBaseUrl(direct.trim()).baseUrl;
21245
- if (process.env.MRRLIN_STAGING === "1") return STAGING_API_BASE_URL;
21246
- return DEFAULT_API_BASE_URL;
21247
- }
21248
- function readDirectorBridgeApiBaseUrl(explicit) {
21249
- const direct = explicit ?? process.env.MRRLIN_API_BASE_URL;
21250
- if (direct?.trim()) return retargetRetiredApiBaseUrl(direct.trim()).baseUrl;
21251
- if (process.env.MRRLIN_STAGING === "1") return STAGING_API_BASE_URL;
21252
21742
  return PRODUCTION_API_BASE_URL;
21253
21743
  }
21254
- function isRemoteApiAllowed(apiBaseUrl) {
21255
- return isLoopbackUrl(apiBaseUrl) || isStagingApiBaseUrl(apiBaseUrl) || isProductionApiBaseUrl(apiBaseUrl) || process.env.MRRLIN_API_ALLOW_REMOTE === "1";
21744
+ function readDirectorBridgeApiBaseUrl(explicit) {
21745
+ return readConfiguredApiBaseUrl(explicit);
21256
21746
  }
21257
21747
  function readProbeTimeoutMs(env) {
21258
21748
  const raw = Number((env.MRRLIN_API_PROBE_TIMEOUT_MS ?? "").trim());
@@ -21281,16 +21771,12 @@ async function resolveApiBaseUrlDynamic(opts = {}) {
21281
21771
  const { baseUrl, retargeted } = retargetRetiredApiBaseUrl(direct.trim());
21282
21772
  return { baseUrl, source: retargeted ? "retired-retarget" : "explicit" };
21283
21773
  }
21284
- if ((env.MRRLIN_STAGING ?? "").trim() === "1") {
21285
- return { baseUrl: STAGING_API_BASE_URL, source: "staging-env" };
21286
- }
21287
21774
  const autoDetect = (env.MRRLIN_API_AUTODETECT ?? "").trim() === "1";
21288
21775
  const timeoutMs = opts.probeTimeoutMs ?? readProbeTimeoutMs(env);
21289
21776
  if (autoDetect) {
21290
21777
  if (await probeLocalHealth(DEFAULT_API_BASE_URL, timeoutMs, fetchImpl)) {
21291
21778
  return { baseUrl: DEFAULT_API_BASE_URL, source: "local-probe" };
21292
21779
  }
21293
- return { baseUrl: STAGING_API_BASE_URL, source: "staging-autodetect" };
21294
21780
  }
21295
21781
  return { baseUrl: PRODUCTION_API_BASE_URL, source: "production-default" };
21296
21782
  }
@@ -21496,7 +21982,8 @@ async function installBrowser(opts = {}) {
21496
21982
  var import_node_fs = __toESM(require("node:fs"), 1);
21497
21983
  var import_node_os2 = __toESM(require("node:os"), 1);
21498
21984
  var import_node_path2 = __toESM(require("node:path"), 1);
21499
- var KNOWN_MRRLIN_ENV_KEYS = /* @__PURE__ */ new Set(["MRRLIN_STAGING", "MRRLIN_API_BASE_URL", "MRRLIN_API_ALLOW_REMOTE"]);
21985
+ var toml = __toESM(require_toml(), 1);
21986
+ var KNOWN_MRRLIN_ENV_KEYS = /* @__PURE__ */ new Set(["MRRLIN_API_BASE_URL"]);
21500
21987
  function commandArgsTimeoutEqual(candidate, expected) {
21501
21988
  if (candidate.command !== expected.command) return false;
21502
21989
  const actualArgs = candidate.args === void 0 && expected.args.length === 0 ? [] : Array.isArray(candidate.args) ? candidate.args : null;
@@ -21525,13 +22012,9 @@ function tablesEqual(actual, expected) {
21525
22012
  }
21526
22013
  function isCoherentMrrlinEnv(env) {
21527
22014
  const keys = Object.keys(env);
21528
- const staging = env.MRRLIN_STAGING;
21529
22015
  const url2 = env.MRRLIN_API_BASE_URL;
21530
- const allowRemote = env.MRRLIN_API_ALLOW_REMOTE;
21531
22016
  const hasUrl = typeof url2 === "string" && url2.trim() !== "";
21532
- if (keys.length === 1 && staging === "1") return true;
21533
22017
  if (keys.length === 1 && hasUrl) return true;
21534
- if (keys.length === 2 && hasUrl && allowRemote === "1") return true;
21535
22018
  return false;
21536
22019
  }
21537
22020
  function classifyExistingBlock(actual, expected) {
@@ -21561,9 +22044,6 @@ function blockEnvHasRetiredApiUrl(actual) {
21561
22044
  }
21562
22045
  return retiredApiHostnames().includes(hostname3);
21563
22046
  }
21564
- function isFirstPartyOrLoopbackApiUrl(value) {
21565
- return isStagingApiBaseUrl(value) || isProductionApiBaseUrl(value) || isLoopbackUrl(value);
21566
- }
21567
22047
  function normalizedApiUrlFromEnv(env) {
21568
22048
  const pinned = env.MRRLIN_API_BASE_URL;
21569
22049
  if (typeof pinned === "string" && pinned.trim()) return retargetRetiredApiBaseUrl(pinned.trim()).baseUrl;
@@ -21574,10 +22054,11 @@ function blockEnvNeedsApiRoutingMigration(actual) {
21574
22054
  const env = actual.env;
21575
22055
  if (typeof env !== "object" || env === null) return false;
21576
22056
  const vars = env;
21577
- if (vars.MRRLIN_STAGING === "1") return true;
22057
+ if (vars.MRRLIN_STAGING !== void 0) return true;
22058
+ if (vars.MRRLIN_API_ALLOW_REMOTE !== void 0) return true;
21578
22059
  if (blockEnvHasRetiredApiUrl(actual)) return true;
21579
22060
  const apiUrl = normalizedApiUrlFromEnv(vars);
21580
- return apiUrl !== void 0 && (isProductionApiBaseUrl(apiUrl) || vars.MRRLIN_API_ALLOW_REMOTE === "1" && isFirstPartyOrLoopbackApiUrl(apiUrl));
22061
+ return apiUrl !== void 0 && isProductionApiBaseUrl(apiUrl);
21581
22062
  }
21582
22063
  function renderEnvPreservedNotice(blockId, envKeys) {
21583
22064
  const keys = [...envKeys].sort().join(", ");
@@ -21598,9 +22079,6 @@ function reconcileMcpServerBlock(existing, desired) {
21598
22079
  }
21599
22080
  if (apiUrl && !isProductionApiBaseUrl(apiUrl)) {
21600
22081
  healedEnv.MRRLIN_API_BASE_URL = apiUrl;
21601
- if (existingEnv.MRRLIN_API_ALLOW_REMOTE === "1" && !isFirstPartyOrLoopbackApiUrl(apiUrl)) {
21602
- healedEnv.MRRLIN_API_ALLOW_REMOTE = "1";
21603
- }
21604
22082
  }
21605
22083
  const finalEnv = { ...desired.env, ...healedEnv };
21606
22084
  const block = { ...desired };
@@ -21627,27 +22105,76 @@ function readMcpServerById(configPath, serverId) {
21627
22105
  } catch {
21628
22106
  return null;
21629
22107
  }
21630
- let parsed;
21631
- try {
21632
- parsed = JSON.parse(raw);
21633
- } catch {
21634
- return null;
22108
+ let servers;
22109
+ if (configPath.endsWith(".toml")) {
22110
+ try {
22111
+ const parsed = toml.parse(raw);
22112
+ servers = parsed.mcp_servers ?? parsed.mcpServers;
22113
+ } catch {
22114
+ return null;
22115
+ }
22116
+ } else {
22117
+ let parsed;
22118
+ try {
22119
+ parsed = JSON.parse(raw);
22120
+ } catch {
22121
+ return null;
22122
+ }
22123
+ if (typeof parsed !== "object" || parsed === null) return null;
22124
+ const rawServers = parsed.mcpServers ?? parsed.mcp_servers;
22125
+ if (typeof rawServers !== "object" || rawServers === null) return null;
22126
+ servers = rawServers;
21635
22127
  }
21636
- if (typeof parsed !== "object" || parsed === null) return null;
21637
- const servers = parsed.mcpServers;
21638
- if (typeof servers !== "object" || servers === null) return null;
22128
+ if (!servers || typeof servers !== "object") return null;
21639
22129
  const entry = servers[serverId];
21640
22130
  if (typeof entry !== "object" || entry === null) return null;
21641
- const url2 = entry.url;
21642
- if (typeof url2 !== "string" || url2.trim() === "") return null;
21643
- const rawHeaders = entry.headers;
21644
- const headers = {};
21645
- if (typeof rawHeaders === "object" && rawHeaders !== null) {
21646
- for (const [key, value] of Object.entries(rawHeaders)) {
21647
- if (typeof value === "string") headers[key] = value;
22131
+ const record2 = entry;
22132
+ const url2 = typeof record2.url === "string" ? record2.url.trim() : "";
22133
+ const command = typeof record2.command === "string" ? record2.command.trim() : "";
22134
+ if (url2 !== "" && command !== "") return null;
22135
+ if (url2 !== "") {
22136
+ try {
22137
+ new URL(url2);
22138
+ } catch {
22139
+ return null;
21648
22140
  }
22141
+ const rawHeaders = record2.headers;
22142
+ const headers = {};
22143
+ if (rawHeaders !== void 0) {
22144
+ if (typeof rawHeaders !== "object" || rawHeaders === null || Array.isArray(rawHeaders)) {
22145
+ return null;
22146
+ }
22147
+ for (const [key, value] of Object.entries(rawHeaders)) {
22148
+ if (typeof value !== "string") return null;
22149
+ headers[key] = value;
22150
+ }
22151
+ }
22152
+ return { id: serverId, transport: "http", url: url2, headers };
21649
22153
  }
21650
- return { url: url2, headers };
22154
+ if (command !== "") {
22155
+ const rawArgs = record2.args;
22156
+ const args = [];
22157
+ if (rawArgs !== void 0) {
22158
+ if (!Array.isArray(rawArgs)) return null;
22159
+ for (const item of rawArgs) {
22160
+ if (typeof item !== "string") return null;
22161
+ args.push(item);
22162
+ }
22163
+ }
22164
+ const rawEnv = record2.env;
22165
+ const env = {};
22166
+ if (rawEnv !== void 0) {
22167
+ if (typeof rawEnv !== "object" || rawEnv === null || Array.isArray(rawEnv)) {
22168
+ return null;
22169
+ }
22170
+ for (const [key, value] of Object.entries(rawEnv)) {
22171
+ if (typeof value !== "string") return null;
22172
+ env[key] = value;
22173
+ }
22174
+ }
22175
+ return { id: serverId, transport: "stdio", command, args, env };
22176
+ }
22177
+ return null;
21651
22178
  }
21652
22179
  function parseTomlMcpServers(raw) {
21653
22180
  const result = {};
@@ -21779,11 +22306,8 @@ function deriveServeEnvFromProcessEnv(env) {
21779
22306
  if (apiUrl) {
21780
22307
  if (!isProductionApiBaseUrl(apiUrl)) {
21781
22308
  out.MRRLIN_API_BASE_URL = apiUrl;
21782
- if (env.MRRLIN_API_ALLOW_REMOTE === "1" && !isStagingApiBaseUrl(apiUrl) && !isLoopbackUrl(apiUrl)) {
21783
- out.MRRLIN_API_ALLOW_REMOTE = "1";
21784
- }
21785
22309
  }
21786
- } else if (env.MRRLIN_STAGING === "1" || bridgeWantsStaging) {
22310
+ } else if (bridgeWantsStaging) {
21787
22311
  out.MRRLIN_API_BASE_URL = STAGING_API_BASE_URL;
21788
22312
  }
21789
22313
  return Object.keys(out).length > 0 ? out : void 0;
@@ -21904,7 +22428,7 @@ async function installCodex(options) {
21904
22428
  let content = await import_promises.default.readFile(realPath, "utf8");
21905
22429
  let parsed = null;
21906
22430
  try {
21907
- parsed = toml.parse(content);
22431
+ parsed = toml2.parse(content);
21908
22432
  } catch (error51) {
21909
22433
  const detail = error51 instanceof Error ? error51.message : String(error51);
21910
22434
  const err = {
@@ -22327,7 +22851,7 @@ __export(external_exports, {
22327
22851
  object: () => object,
22328
22852
  optional: () => optional,
22329
22853
  overwrite: () => _overwrite,
22330
- parse: () => parse3,
22854
+ parse: () => parse4,
22331
22855
  parseAsync: () => parseAsync2,
22332
22856
  partialRecord: () => partialRecord,
22333
22857
  pipe: () => pipe,
@@ -22647,7 +23171,7 @@ __export(core_exports2, {
22647
23171
  isValidJWT: () => isValidJWT,
22648
23172
  locales: () => locales_exports,
22649
23173
  meta: () => meta,
22650
- parse: () => parse2,
23174
+ parse: () => parse3,
22651
23175
  parseAsync: () => parseAsync,
22652
23176
  prettifyError: () => prettifyError,
22653
23177
  process: () => process2,
@@ -23592,7 +24116,7 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
23592
24116
  }
23593
24117
  return result.value;
23594
24118
  };
23595
- var parse2 = /* @__PURE__ */ _parse($ZodRealError);
24119
+ var parse3 = /* @__PURE__ */ _parse($ZodRealError);
23596
24120
  var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
23597
24121
  const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
23598
24122
  let result = schema._zod.run({ value, issues: [] }, ctx);
@@ -26384,10 +26908,10 @@ var $ZodFunction = /* @__PURE__ */ $constructor("$ZodFunction", (inst, def) => {
26384
26908
  throw new Error("implement() must be called with a function");
26385
26909
  }
26386
26910
  return function(...args) {
26387
- const parsedArgs = inst._def.input ? parse2(inst._def.input, args) : args;
26911
+ const parsedArgs = inst._def.input ? parse3(inst._def.input, args) : args;
26388
26912
  const result = Reflect.apply(func, this, parsedArgs);
26389
26913
  if (inst._def.output) {
26390
- return parse2(inst._def.output, result);
26914
+ return parse3(inst._def.output, result);
26391
26915
  }
26392
26916
  return result;
26393
26917
  };
@@ -34821,7 +35345,7 @@ var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
34821
35345
  });
34822
35346
 
34823
35347
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/parse.js
34824
- var parse3 = /* @__PURE__ */ _parse(ZodRealError);
35348
+ var parse4 = /* @__PURE__ */ _parse(ZodRealError);
34825
35349
  var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
34826
35350
  var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError);
34827
35351
  var safeParseAsync2 = /* @__PURE__ */ _safeParseAsync(ZodRealError);
@@ -34884,7 +35408,7 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
34884
35408
  inst.def = def;
34885
35409
  inst.type = def.type;
34886
35410
  Object.defineProperty(inst, "_def", { value: def });
34887
- inst.parse = (data, params) => parse3(inst, data, params, { callee: inst.parse });
35411
+ inst.parse = (data, params) => parse4(inst, data, params, { callee: inst.parse });
34888
35412
  inst.safeParse = (data, params) => safeParse2(inst, data, params);
34889
35413
  inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
34890
35414
  inst.safeParseAsync = async (data, params) => safeParseAsync2(inst, data, params);
@@ -36691,11 +37215,11 @@ function resolveKindCapability(kind) {
36691
37215
  var REFUSAL_TEMPLATES = {
36692
37216
  no_route: {
36693
37217
  happened: ({ artifactKind, projectSlug }) => `Nothing is configured to deliver \`${artifactKind}\` for project \`${projectSlug}\`.`,
36694
- action: ({ capability }) => `Grant an MCP server that provides the "${capability}" capability and route it on the Integrations page. Retrying before that will refuse identically.`
37218
+ action: ({ capability }) => `Grant an MCP server that provides the "${capability}" capability and route it on the Integrations page (/integrations?query=${encodeURIComponent(capability)}). Retrying before that will refuse identically.`
36695
37219
  },
36696
37220
  no_grant: {
36697
37221
  happened: ({ projectSlug, capability }) => `Project \`${projectSlug}\` routes "${capability}" to a server whose access has been revoked.`,
36698
- action: () => "Grant that server again on the Integrations page, or re-point the route. Retrying before that will refuse identically."
37222
+ action: ({ capability }) => `Grant that server again on the Integrations page (/integrations?query=${encodeURIComponent(capability)}), or re-point the route. Retrying before that will refuse identically.`
36699
37223
  },
36700
37224
  project_mismatch: {
36701
37225
  happened: ({ capability }) => `The route for "${capability}" belongs to a different project than this task does.`,
@@ -36764,7 +37288,6 @@ var openApiOperationIds = {
36764
37288
  deleteTaskDependency: "deleteTaskDependency",
36765
37289
  getExecutionRun: "getExecutionRun",
36766
37290
  getProjectSchedulerPolicy: "getProjectSchedulerPolicy",
36767
- getProjectDeployWorkflow: "getProjectDeployWorkflow",
36768
37291
  getDeployTopology: "getDeployTopology",
36769
37292
  writeDeployTopology: "writeDeployTopology",
36770
37293
  getTaskDeployTarget: "getTaskDeployTarget",
@@ -36797,7 +37320,6 @@ var openApiOperationIds = {
36797
37320
  searchKnowledge: "searchKnowledge",
36798
37321
  updateExecutionRun: "updateExecutionRun",
36799
37322
  upsertProjectSchedulerPolicy: "upsertProjectSchedulerPolicy",
36800
- upsertProjectDeployWorkflow: "upsertProjectDeployWorkflow",
36801
37323
  updatePlan: "updatePlan",
36802
37324
  updateTask: "updateTask",
36803
37325
  updateWikiPage: "updateWikiPage",
@@ -37477,6 +37999,35 @@ var TASK_NOTES_JOURNAL_SECTIONS = [
37477
37999
  ];
37478
38000
  var JOURNAL_HEADING_RE = new RegExp(`^##[ \\t]+(${TASK_NOTES_JOURNAL_SECTIONS.map((s) => s.heading).join("|")})\\b[ \\t]*(?:[\u2014\u2013-][ \\t]*(\\S.*?))?[ \\t]*$`);
37479
38001
 
38002
+ // ../../packages/schemas/dist/integration-route-defaults.js
38003
+ var DEFAULT_INTEGRATION_ROUTES = {
38004
+ github: {
38005
+ capability: "repo_host",
38006
+ artifactKind: "code_change",
38007
+ operations: {
38008
+ pull_request: "create_pull_request",
38009
+ pull_request_state: "get_pull_request"
38010
+ }
38011
+ },
38012
+ slack: {
38013
+ capability: "send",
38014
+ artifactKind: "message",
38015
+ operations: {
38016
+ dispatch: "slack_post_message"
38017
+ }
38018
+ }
38019
+ };
38020
+ var SERVER_ALIASES = {
38021
+ "github-mcp": "github",
38022
+ gh: "github",
38023
+ "github-server": "github",
38024
+ "slack-mcp": "slack"
38025
+ };
38026
+ function getDefaultCapabilityRouteForServer(serverId) {
38027
+ const normalizedId = (SERVER_ALIASES[serverId.toLowerCase()] ?? serverId).toLowerCase();
38028
+ return DEFAULT_INTEGRATION_ROUTES[normalizedId] ?? null;
38029
+ }
38030
+
37480
38031
  // ../../packages/schemas/dist/index.js
37481
38032
  var mrrlinTaskStatusSchema = external_exports.enum([
37482
38033
  "backlog",
@@ -37556,7 +38107,7 @@ var mrrlinDeclaredOutcomeSchema = mrrlinDeclaredOutcomeShapeSchema.superRefine((
37556
38107
  var mrrlinReceiptSchema = external_exports.object({
37557
38108
  kind: external_exports.enum(["outcome", "attempt"]),
37558
38109
  evidence: external_exports.object({
37559
- type: external_exports.enum(["url", "build", "human_tap"]),
38110
+ type: external_exports.enum(["url", "build", "status", "human_tap"]),
37560
38111
  value: external_exports.string().trim().min(1)
37561
38112
  }),
37562
38113
  observedAt: external_exports.string().datetime(),
@@ -38106,9 +38657,9 @@ function refineTaskCreateDomain(data, ctx) {
38106
38657
  }
38107
38658
  var mrrlinTaskCreateSchema = mrrlinTaskCreateShapeSchema.superRefine(refineTaskCreateDomain);
38108
38659
  var mrrlinTaskCreateWithoutIdSchema = mrrlinTaskCreateShapeSchema.omit({ id: true }).superRefine(refineTaskCreateDomain);
38109
- var mrrlinDeployWorkflowEnvSchema = external_exports.enum(["dev", "prod"]);
38660
+ var mrrlinDeployEnvSchema = external_exports.enum(["dev", "prod"]);
38110
38661
  var mrrlinTaskDeployTargetInputSchema = external_exports.object({
38111
- env: mrrlinDeployWorkflowEnvSchema,
38662
+ env: mrrlinDeployEnvSchema,
38112
38663
  targetLabel: external_exports.string().min(1),
38113
38664
  // publish-as-capability: which provider's namespace the workflow fields below belong to. Defaulted
38114
38665
  // rather than required so adding it breaks no caller, and `github` is the only provider that
@@ -38126,7 +38677,7 @@ var deployTopologyResponseSchema = external_exports.object({
38126
38677
  snapshot: external_exports.array(external_exports.object({ id: external_exports.number(), path: external_exports.string(), sha: external_exports.string(), state: external_exports.string() })).nullable(),
38127
38678
  entries: external_exports.array(external_exports.object({
38128
38679
  label: external_exports.string(),
38129
- env: mrrlinDeployWorkflowEnvSchema,
38680
+ env: mrrlinDeployEnvSchema,
38130
38681
  workflowId: external_exports.number(),
38131
38682
  workflowPath: external_exports.string(),
38132
38683
  workflowSha: external_exports.string()
@@ -38137,7 +38688,7 @@ var mrrlinDeployTopologyWriteSchema = external_exports.object({
38137
38688
  fingerprint: external_exports.string().min(1),
38138
38689
  entries: external_exports.array(external_exports.object({
38139
38690
  label: external_exports.string().min(1),
38140
- env: mrrlinDeployWorkflowEnvSchema,
38691
+ env: mrrlinDeployEnvSchema,
38141
38692
  workflowId: external_exports.number().int().positive(),
38142
38693
  workflowPath: external_exports.string().min(1),
38143
38694
  workflowSha: external_exports.string().min(1)
@@ -38881,37 +39432,6 @@ var mrrlinProjectSchedulerPolicyUpsertSchema = external_exports.object({
38881
39432
  var projectSchedulerPolicyResponseSchema = external_exports.object({
38882
39433
  data: mrrlinProjectSchedulerPolicySchema
38883
39434
  });
38884
- var mrrlinDeployWorkflowSourceSchema = external_exports.enum(["agent", "operator"]);
38885
- var mrrlinDeployWorkflowStateSchema = external_exports.enum(["resolved", "ambiguous"]);
38886
- var mrrlinProjectDeployWorkflowSchema = external_exports.object({
38887
- projectSlug: mrrlinProjectSlugSchema,
38888
- env: mrrlinDeployWorkflowEnvSchema,
38889
- workflowId: external_exports.number().int().positive().nullable(),
38890
- workflowPath: external_exports.string().nullable(),
38891
- reason: external_exports.string().nullable(),
38892
- source: mrrlinDeployWorkflowSourceSchema.nullable(),
38893
- state: mrrlinDeployWorkflowStateSchema,
38894
- activeSetFingerprint: external_exports.string().nullable(),
38895
- reverifyRequested: external_exports.boolean(),
38896
- resolvedAt: external_exports.string().datetime().nullable(),
38897
- createdAt: external_exports.string().datetime(),
38898
- updatedAt: external_exports.string().datetime()
38899
- });
38900
- var mrrlinProjectDeployWorkflowUpsertSchema = external_exports.object({
38901
- workflowId: external_exports.number().int().positive().nullable(),
38902
- workflowPath: external_exports.string().nullable().optional(),
38903
- reason: external_exports.string().nullable().optional(),
38904
- state: mrrlinDeployWorkflowStateSchema.optional(),
38905
- activeSetFingerprint: external_exports.string().nullable().optional(),
38906
- reverifyRequested: external_exports.boolean().optional()
38907
- }).refine((value) => (value.state ?? "resolved") !== "resolved" || value.workflowId !== null, {
38908
- message: "A resolved deploy-workflow row requires a non-null workflowId."
38909
- }).refine((value) => (value.state ?? "resolved") !== "ambiguous" || value.workflowId === null, {
38910
- message: "An ambiguous deploy-workflow row must not carry a workflowId."
38911
- });
38912
- var projectDeployWorkflowResponseSchema = external_exports.object({
38913
- data: mrrlinProjectDeployWorkflowSchema
38914
- });
38915
39435
  var mrrlinSchedulerPendingReasonSchema = external_exports.enum([
38916
39436
  "follow_up_due",
38917
39437
  "verification_due",
@@ -40654,13 +41174,37 @@ var CATEGORIES = [
40654
41174
  ];
40655
41175
  var CAT_SET = new Set(CATEGORIES);
40656
41176
  function parseVerdict(raw) {
40657
- const verdictMatch = raw.match(/\*\*Verdict\*\*:\s*(APPROVE|REQUEST_CHANGES|REJECT)\b/i);
40658
- const parsedVerdict = verdictMatch?.[1]?.toUpperCase();
40659
- const verdict = parsedVerdict === "APPROVE" || parsedVerdict === "REQUEST_CHANGES" || parsedVerdict === "REJECT" ? parsedVerdict : "REQUEST_CHANGES";
40660
- const afterCritical = raw.split(/\*\*Critical issues\*\*/i)[1];
40661
- const block = afterCritical?.split(/\n\*\*/)[0] ?? "";
40662
41177
  const issues = [];
40663
41178
  const parseFallbacks = [];
41179
+ const VERDICT_LINE_RE = /^[ \t]*(>?[ \t]*)(?:\*\*)?Verdict(?:\*\*)?:[ \t]*(.*)$/i;
41180
+ const APPROVE_VAL_RE = /^(?:\*\*)?[ \t]*APPROVE[ \t]*(?:\*\*)?$/i;
41181
+ const REQUEST_CHANGES_VAL_RE = /^(?:\*\*)?[ \t]*REQUEST[ _]CHANGES\b/i;
41182
+ const REJECT_VAL_RE = /^(?:\*\*)?[ \t]*REJECT\b/i;
41183
+ const candidates = [];
41184
+ for (const line of raw.split(/\r?\n/)) {
41185
+ const m = line.match(VERDICT_LINE_RE);
41186
+ if (!m) continue;
41187
+ const isBlockquote = m[1]?.includes(">") ?? false;
41188
+ const rest = (m[2] ?? "").trim();
41189
+ if (APPROVE_VAL_RE.test(rest)) {
41190
+ candidates.push({ verdict: "APPROVE", isBlockquote, line });
41191
+ } else if (REQUEST_CHANGES_VAL_RE.test(rest)) {
41192
+ candidates.push({ verdict: "REQUEST_CHANGES", isBlockquote, line });
41193
+ } else if (REJECT_VAL_RE.test(rest)) {
41194
+ candidates.push({ verdict: "REJECT", isBlockquote, line });
41195
+ }
41196
+ }
41197
+ const unquoted = candidates.filter((c) => !c.isBlockquote);
41198
+ const eligible = unquoted.length > 0 ? unquoted : candidates;
41199
+ const chosen = eligible.length > 0 ? eligible[eligible.length - 1] : null;
41200
+ let verdict;
41201
+ if (chosen) {
41202
+ verdict = chosen.verdict;
41203
+ } else {
41204
+ verdict = "REQUEST_CHANGES";
41205
+ }
41206
+ const afterCritical = raw.split(/\*\*Critical issues\*\*/i)[1] ?? raw.split(/(?:\*\*)?Critical issues(?:\*\*)?:?/i)[1];
41207
+ const block = afterCritical?.split(/\n\*\*/)[0] ?? "";
40664
41208
  for (const line of block.split(/\r?\n/)) {
40665
41209
  const bulletMatch = line.match(/^\s*-\s+(.*\S)\s*$/);
40666
41210
  if (!bulletMatch) continue;
@@ -43584,7 +44128,7 @@ function firstString(...values) {
43584
44128
  return null;
43585
44129
  }
43586
44130
  function runCodexExec(input, deps) {
43587
- const spawn5 = deps?.spawn ?? import_node_child_process6.spawn;
44131
+ const spawn6 = deps?.spawn ?? import_node_child_process6.spawn;
43588
44132
  const executable = input.codexExecutable ?? "codex";
43589
44133
  const sandbox = input.sandbox ?? "read-only";
43590
44134
  const fullPrompt = input.developerInstructions.trim() ? `${input.developerInstructions.trim()}
@@ -43624,7 +44168,7 @@ ${input.prompt}` : input.prompt;
43624
44168
  };
43625
44169
  let child;
43626
44170
  try {
43627
- child = spawn5(executable, args, options);
44171
+ child = spawn6(executable, args, options);
43628
44172
  } catch (err) {
43629
44173
  finish({ ok: false, error: `Failed to spawn codex exec: ${errMessage(err)}` });
43630
44174
  return;
@@ -43667,7 +44211,7 @@ function errMessage(err) {
43667
44211
  // ../../packages/agent-client/dist/providers/claude/exec.js
43668
44212
  var import_node_child_process7 = require("node:child_process");
43669
44213
  function runClaudeExec(input, deps) {
43670
- const spawn5 = deps?.spawn ?? import_node_child_process7.spawn;
44214
+ const spawn6 = deps?.spawn ?? import_node_child_process7.spawn;
43671
44215
  const executable = input.codexExecutable ?? "claude";
43672
44216
  const args = ["--print", "--output-format", "json", "--strict-mcp-config"];
43673
44217
  if (input.mcpConfig) {
@@ -43705,7 +44249,7 @@ function runClaudeExec(input, deps) {
43705
44249
  };
43706
44250
  let child;
43707
44251
  try {
43708
- child = spawn5(executable, args, options);
44252
+ child = spawn6(executable, args, options);
43709
44253
  } catch (err) {
43710
44254
  finish({ ok: false, error: `Failed to spawn ${executable} exec: ${errMessage2(err)}` });
43711
44255
  return;
@@ -44868,7 +45412,7 @@ var DEFAULT_STATUS_TIMEOUT_MS = 1e4;
44868
45412
  function errMessage3(err) {
44869
45413
  return err instanceof Error ? err.message : String(err);
44870
45414
  }
44871
- function runExternalAgentsStatus(bin, args, timeoutMs, spawn5) {
45415
+ function runExternalAgentsStatus(bin, args, timeoutMs, spawn6) {
44872
45416
  return new Promise((resolve) => {
44873
45417
  let settled = false;
44874
45418
  const timerRef = { id: void 0 };
@@ -44881,7 +45425,7 @@ function runExternalAgentsStatus(bin, args, timeoutMs, spawn5) {
44881
45425
  const options = { stdio: ["ignore", "pipe", "pipe"], env: process.env, shell: false };
44882
45426
  let child;
44883
45427
  try {
44884
- child = spawn5(bin, args, options);
45428
+ child = spawn6(bin, args, options);
44885
45429
  } catch (err) {
44886
45430
  finish({ stdout: "", error: `spawn ${bin} failed: ${errMessage3(err)}` });
44887
45431
  return;
@@ -44905,13 +45449,13 @@ function runExternalAgentsStatus(bin, args, timeoutMs, spawn5) {
44905
45449
  });
44906
45450
  }
44907
45451
  async function fetchRegistrySnapshot(deps) {
44908
- const spawn5 = deps?.spawn ?? import_node_child_process9.spawn;
45452
+ const spawn6 = deps?.spawn ?? import_node_child_process9.spawn;
44909
45453
  const { command, prefixArgs } = resolveExternalAgentsCliInvocation(deps?.externalAgentsBin);
44910
45454
  const { stdout, error: error51 } = await runExternalAgentsStatus(
44911
45455
  command,
44912
45456
  [...prefixArgs, "status", "--json"],
44913
45457
  deps?.statusTimeoutMs ?? DEFAULT_STATUS_TIMEOUT_MS,
44914
- spawn5
45458
+ spawn6
44915
45459
  );
44916
45460
  if (error51) return { ok: false, error: error51 };
44917
45461
  try {
@@ -44955,7 +45499,7 @@ function estimateTokenCount(text) {
44955
45499
  function errMessage4(err) {
44956
45500
  return err instanceof Error ? err.message : String(err);
44957
45501
  }
44958
- function runExternalAgents(bin, args, label, timeoutMs, spawn5) {
45502
+ function runExternalAgents(bin, args, label, timeoutMs, spawn6) {
44959
45503
  return new Promise((resolve) => {
44960
45504
  let settled = false;
44961
45505
  const timerRef = { id: void 0 };
@@ -44973,7 +45517,7 @@ function runExternalAgents(bin, args, label, timeoutMs, spawn5) {
44973
45517
  };
44974
45518
  let child;
44975
45519
  try {
44976
- child = spawn5(bin, args, options);
45520
+ child = spawn6(bin, args, options);
44977
45521
  } catch (err) {
44978
45522
  finish({ code: null, stdout: "", error: `spawn ${bin} failed: ${errMessage4(err)}` });
44979
45523
  return;
@@ -44993,7 +45537,7 @@ function runExternalAgents(bin, args, label, timeoutMs, spawn5) {
44993
45537
  });
44994
45538
  }
44995
45539
  async function pickPanel(input, deps) {
44996
- const spawn5 = deps?.spawn ?? import_node_child_process10.spawn;
45540
+ const spawn6 = deps?.spawn ?? import_node_child_process10.spawn;
44997
45541
  const { command, prefixArgs } = resolveExternalAgentsCliInvocation(deps?.externalAgentsBin);
44998
45542
  const args = [
44999
45543
  "pick",
@@ -45006,7 +45550,7 @@ async function pickPanel(input, deps) {
45006
45550
  "--exclude-providers",
45007
45551
  input.excludeProvider
45008
45552
  ];
45009
- const r = await runExternalAgents(command, [...prefixArgs, ...args], "pick", input.timeoutMs, spawn5);
45553
+ const r = await runExternalAgents(command, [...prefixArgs, ...args], "pick", input.timeoutMs, spawn6);
45010
45554
  if (r.error) return { ok: false, error: r.error };
45011
45555
  if (r.code === 3) return { ok: true, agents: [] };
45012
45556
  if (r.code !== 0) return { ok: false, error: `external-agents pick exited ${r.code}` };
@@ -45040,10 +45584,10 @@ function parseDispatch(agentId, stdout, exitCode) {
45040
45584
  return { ok: true, text: parsed.text, usage };
45041
45585
  }
45042
45586
  async function dispatchHead(agentId, prompt, timeoutMs, deps) {
45043
- const spawn5 = deps?.spawn ?? import_node_child_process10.spawn;
45587
+ const spawn6 = deps?.spawn ?? import_node_child_process10.spawn;
45044
45588
  const { command, prefixArgs } = resolveExternalAgentsCliInvocation(deps?.externalAgentsBin);
45045
45589
  const args = ["dispatch", agentId, "--json", prompt];
45046
- const r = await runExternalAgents(command, [...prefixArgs, ...args], "dispatch", timeoutMs, spawn5);
45590
+ const r = await runExternalAgents(command, [...prefixArgs, ...args], "dispatch", timeoutMs, spawn6);
45047
45591
  if (r.error) return { ok: false, error: r.error };
45048
45592
  return parseDispatch(agentId, r.stdout, r.code);
45049
45593
  }
@@ -50169,37 +50713,271 @@ var StreamableHTTPClientTransport = class {
50169
50713
  }
50170
50714
  };
50171
50715
 
50716
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js
50717
+ var import_cross_spawn = __toESM(require_cross_spawn(), 1);
50718
+ var import_node_process = __toESM(require("node:process"), 1);
50719
+ var import_node_stream = require("node:stream");
50720
+
50721
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
50722
+ var STDIO_DEFAULT_MAX_BUFFER_SIZE = 10 * 1024 * 1024;
50723
+ var ReadBuffer = class {
50724
+ constructor(options) {
50725
+ this._maxBufferSize = options?.maxBufferSize ?? STDIO_DEFAULT_MAX_BUFFER_SIZE;
50726
+ }
50727
+ append(chunk) {
50728
+ const newSize = (this._buffer?.length ?? 0) + chunk.length;
50729
+ if (newSize > this._maxBufferSize) {
50730
+ this.clear();
50731
+ throw new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);
50732
+ }
50733
+ this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
50734
+ }
50735
+ readMessage() {
50736
+ if (!this._buffer) {
50737
+ return null;
50738
+ }
50739
+ const index = this._buffer.indexOf("\n");
50740
+ if (index === -1) {
50741
+ return null;
50742
+ }
50743
+ const line = this._buffer.toString("utf8", 0, index).replace(/\r$/, "");
50744
+ this._buffer = this._buffer.subarray(index + 1);
50745
+ return deserializeMessage(line);
50746
+ }
50747
+ clear() {
50748
+ this._buffer = void 0;
50749
+ }
50750
+ };
50751
+ function deserializeMessage(line) {
50752
+ return JSONRPCMessageSchema.parse(JSON.parse(line));
50753
+ }
50754
+ function serializeMessage(message) {
50755
+ return JSON.stringify(message) + "\n";
50756
+ }
50757
+
50758
+ // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js
50759
+ var DEFAULT_INHERITED_ENV_VARS = import_node_process.default.platform === "win32" ? [
50760
+ "APPDATA",
50761
+ "HOMEDRIVE",
50762
+ "HOMEPATH",
50763
+ "LOCALAPPDATA",
50764
+ "PATH",
50765
+ "PROCESSOR_ARCHITECTURE",
50766
+ "SYSTEMDRIVE",
50767
+ "SYSTEMROOT",
50768
+ "TEMP",
50769
+ "USERNAME",
50770
+ "USERPROFILE",
50771
+ "PROGRAMFILES"
50772
+ ] : (
50773
+ /* list inspired by the default env inheritance of sudo */
50774
+ ["HOME", "LOGNAME", "PATH", "SHELL", "TERM", "USER"]
50775
+ );
50776
+ function getDefaultEnvironment() {
50777
+ const env = {};
50778
+ for (const key of DEFAULT_INHERITED_ENV_VARS) {
50779
+ const value = import_node_process.default.env[key];
50780
+ if (value === void 0) {
50781
+ continue;
50782
+ }
50783
+ if (value.startsWith("()")) {
50784
+ continue;
50785
+ }
50786
+ env[key] = value;
50787
+ }
50788
+ return env;
50789
+ }
50790
+ var StdioClientTransport = class {
50791
+ constructor(server) {
50792
+ this._stderrStream = null;
50793
+ this._serverParams = server;
50794
+ this._readBuffer = new ReadBuffer({ maxBufferSize: server.maxBufferSize });
50795
+ if (server.stderr === "pipe" || server.stderr === "overlapped") {
50796
+ this._stderrStream = new import_node_stream.PassThrough();
50797
+ }
50798
+ }
50799
+ /**
50800
+ * Starts the server process and prepares to communicate with it.
50801
+ */
50802
+ async start() {
50803
+ if (this._process) {
50804
+ throw new Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");
50805
+ }
50806
+ return new Promise((resolve, reject) => {
50807
+ this._process = (0, import_cross_spawn.default)(this._serverParams.command, this._serverParams.args ?? [], {
50808
+ // merge default env with server env because mcp server needs some env vars
50809
+ env: {
50810
+ ...getDefaultEnvironment(),
50811
+ ...this._serverParams.env
50812
+ },
50813
+ stdio: ["pipe", "pipe", this._serverParams.stderr ?? "inherit"],
50814
+ shell: false,
50815
+ windowsHide: import_node_process.default.platform === "win32",
50816
+ cwd: this._serverParams.cwd
50817
+ });
50818
+ this._process.on("error", (error51) => {
50819
+ reject(error51);
50820
+ this.onerror?.(error51);
50821
+ });
50822
+ this._process.on("spawn", () => {
50823
+ resolve();
50824
+ });
50825
+ this._process.on("close", (_code) => {
50826
+ this._process = void 0;
50827
+ this.onclose?.();
50828
+ });
50829
+ this._process.stdin?.on("error", (error51) => {
50830
+ this.onerror?.(error51);
50831
+ });
50832
+ this._process.stdout?.on("data", (chunk) => {
50833
+ try {
50834
+ this._readBuffer.append(chunk);
50835
+ this.processReadBuffer();
50836
+ } catch (error51) {
50837
+ this.onerror?.(error51);
50838
+ this.close().catch(() => {
50839
+ });
50840
+ }
50841
+ });
50842
+ this._process.stdout?.on("error", (error51) => {
50843
+ this.onerror?.(error51);
50844
+ });
50845
+ if (this._stderrStream && this._process.stderr) {
50846
+ this._process.stderr.pipe(this._stderrStream);
50847
+ }
50848
+ });
50849
+ }
50850
+ /**
50851
+ * The stderr stream of the child process, if `StdioServerParameters.stderr` was set to "pipe" or "overlapped".
50852
+ *
50853
+ * If stderr piping was requested, a PassThrough stream is returned _immediately_, allowing callers to
50854
+ * attach listeners before the start method is invoked. This prevents loss of any early
50855
+ * error output emitted by the child process.
50856
+ */
50857
+ get stderr() {
50858
+ if (this._stderrStream) {
50859
+ return this._stderrStream;
50860
+ }
50861
+ return this._process?.stderr ?? null;
50862
+ }
50863
+ /**
50864
+ * The child process pid spawned by this transport.
50865
+ *
50866
+ * This is only available after the transport has been started.
50867
+ */
50868
+ get pid() {
50869
+ return this._process?.pid ?? null;
50870
+ }
50871
+ processReadBuffer() {
50872
+ while (true) {
50873
+ try {
50874
+ const message = this._readBuffer.readMessage();
50875
+ if (message === null) {
50876
+ break;
50877
+ }
50878
+ this.onmessage?.(message);
50879
+ } catch (error51) {
50880
+ this.onerror?.(error51);
50881
+ }
50882
+ }
50883
+ }
50884
+ async close() {
50885
+ if (this._process) {
50886
+ const processToClose = this._process;
50887
+ this._process = void 0;
50888
+ const closePromise = new Promise((resolve) => {
50889
+ processToClose.once("close", () => {
50890
+ resolve();
50891
+ });
50892
+ });
50893
+ try {
50894
+ processToClose.stdin?.end();
50895
+ } catch {
50896
+ }
50897
+ await Promise.race([closePromise, new Promise((resolve) => setTimeout(resolve, 2e3).unref())]);
50898
+ if (processToClose.exitCode === null) {
50899
+ try {
50900
+ processToClose.kill("SIGTERM");
50901
+ } catch {
50902
+ }
50903
+ await Promise.race([closePromise, new Promise((resolve) => setTimeout(resolve, 2e3).unref())]);
50904
+ }
50905
+ if (processToClose.exitCode === null) {
50906
+ try {
50907
+ processToClose.kill("SIGKILL");
50908
+ } catch {
50909
+ }
50910
+ }
50911
+ }
50912
+ this._readBuffer.clear();
50913
+ }
50914
+ send(message) {
50915
+ return new Promise((resolve) => {
50916
+ if (!this._process?.stdin) {
50917
+ throw new Error("Not connected");
50918
+ }
50919
+ const json2 = serializeMessage(message);
50920
+ if (this._process.stdin.write(json2)) {
50921
+ resolve();
50922
+ } else {
50923
+ this._process.stdin.once("drain", resolve);
50924
+ }
50925
+ });
50926
+ }
50927
+ };
50928
+
50172
50929
  // src/delivery/invoke.ts
50173
50930
  async function invokeCapability(server, toolName, payload) {
50174
- const headers = Object.fromEntries(
50175
- Object.entries(server.headers ?? {}).map(([key, value]) => {
50176
- const expandedValue = value.replace(/\$\{([A-Za-z_][A-Za-z0-9_]*)\}/g, (_match, varName) => {
50177
- const envVal = process.env[varName];
50178
- if (envVal === void 0) {
50179
- throw new InvokeUnexpandedHeaderError(key, varName);
50180
- }
50181
- return envVal;
50182
- });
50183
- return [key, expandedValue];
50184
- })
50185
- );
50186
50931
  const client = new Client({ name: "mrrlin-delivery-invoker", version: "1.0.0" });
50187
50932
  try {
50188
50933
  let result;
50934
+ const target = server.transport === "stdio" ? server.command : server.url;
50189
50935
  try {
50190
- const transport = new StreamableHTTPClientTransport(new URL(server.url), {
50191
- requestInit: {
50192
- headers,
50193
- signal: AbortSignal.timeout(3e4)
50936
+ if (server.transport === "stdio") {
50937
+ const env = {};
50938
+ for (const [key, value] of Object.entries(server.env ?? {})) {
50939
+ const expandedValue = value.replace(/\$\{([A-Za-z_][A-Za-z0-9_]*)\}/g, (_match, varName) => {
50940
+ const envVal = process.env[varName];
50941
+ if (envVal === void 0) {
50942
+ throw new InvokeUnexpandedHeaderError(key, varName);
50943
+ }
50944
+ return envVal;
50945
+ });
50946
+ env[key] = expandedValue;
50194
50947
  }
50195
- });
50196
- await client.connect(transport);
50948
+ const transport = new StdioClientTransport({
50949
+ command: server.command,
50950
+ args: server.args ?? [],
50951
+ env
50952
+ });
50953
+ await client.connect(transport);
50954
+ } else {
50955
+ const headers = Object.fromEntries(
50956
+ Object.entries(server.headers ?? {}).map(([key, value]) => {
50957
+ const expandedValue = value.replace(/\$\{([A-Za-z_][A-Za-z0-9_]*)\}/g, (_match, varName) => {
50958
+ const envVal = process.env[varName];
50959
+ if (envVal === void 0) {
50960
+ throw new InvokeUnexpandedHeaderError(key, varName);
50961
+ }
50962
+ return envVal;
50963
+ });
50964
+ return [key, expandedValue];
50965
+ })
50966
+ );
50967
+ const transport = new StreamableHTTPClientTransport(new URL(server.url), {
50968
+ requestInit: {
50969
+ headers,
50970
+ signal: AbortSignal.timeout(3e4)
50971
+ }
50972
+ });
50973
+ await client.connect(transport);
50974
+ }
50197
50975
  result = await client.callTool({
50198
50976
  name: toolName,
50199
50977
  arguments: isRecord(payload) ? payload : void 0
50200
50978
  });
50201
50979
  } catch (error51) {
50202
- throw classifyInvokeError(error51, server.url, toolName);
50980
+ throw classifyInvokeError(error51, target, toolName);
50203
50981
  }
50204
50982
  if (result.isError) {
50205
50983
  throw new Error(`invokeCapability: tool "${toolName}" reported isError -- ${extractFirstText(result.content)}`);
@@ -50241,6 +51019,9 @@ var InvokeUnexpandedHeaderError = class extends Error {
50241
51019
  }
50242
51020
  };
50243
51021
  function classifyInvokeError(error51, url2, toolName) {
51022
+ if (error51 instanceof InvokeUnexpandedHeaderError) {
51023
+ return error51;
51024
+ }
50244
51025
  if (error51 instanceof StreamableHTTPError) {
50245
51026
  if (error51.code === 401 || error51.code === 403) return new InvokeAuthError(url2, error51);
50246
51027
  return new InvokeUnreachableError(url2, error51);
@@ -50296,9 +51077,78 @@ function findFirstMatch(value, pattern) {
50296
51077
  var gitPullRequestStateResponseSchema = external_exports.object({
50297
51078
  merged: external_exports.boolean()
50298
51079
  });
51080
+ function parsePullRequestUrl(url2) {
51081
+ try {
51082
+ const parsed = new URL(url2);
51083
+ const parts = parsed.pathname.split("/").filter(Boolean);
51084
+ const pullIdx = parts.indexOf("pull");
51085
+ if (pullIdx >= 2 && pullIdx + 1 < parts.length) {
51086
+ const owner = parts[pullIdx - 2];
51087
+ const repo = parts[pullIdx - 1];
51088
+ const pullPart = parts[pullIdx + 1];
51089
+ const pullNumber = pullPart ? parseInt(pullPart, 10) : NaN;
51090
+ if (owner && repo && !Number.isNaN(pullNumber)) {
51091
+ return { owner, repo, pullNumber };
51092
+ }
51093
+ }
51094
+ } catch {
51095
+ }
51096
+ return {};
51097
+ }
50299
51098
  async function deliverToGit(server, toolName, payload) {
50300
- const { operation: _operation, ...args } = payload;
50301
- return invokeCapability(server, toolName, args);
51099
+ const defaultRoute = server.id ? getDefaultCapabilityRouteForServer(server.id) : null;
51100
+ const isDefaultGitHubRoute = defaultRoute?.capability === "repo_host";
51101
+ if (payload.operation === "pull_request") {
51102
+ const { operation: _operation, ...args } = payload;
51103
+ if (isDefaultGitHubRoute && toolName === defaultRoute.operations.pull_request) {
51104
+ let owner = args.owner;
51105
+ let repo = args.repo;
51106
+ const repository = args.repository;
51107
+ if ((!owner || !repo) && repository && repository.includes("/")) {
51108
+ const parts = repository.split("/");
51109
+ owner = parts[0];
51110
+ repo = parts[1];
51111
+ }
51112
+ const head = args.head ?? payload.headBranch;
51113
+ const base = args.base ?? payload.baseBranch ?? "main";
51114
+ const title = args.title ?? payload.title ?? "";
51115
+ const body = args.body ?? payload.body ?? "";
51116
+ const adaptedArgs = {
51117
+ head,
51118
+ base,
51119
+ title,
51120
+ body
51121
+ };
51122
+ if (owner) adaptedArgs.owner = owner;
51123
+ if (repo) adaptedArgs.repo = repo;
51124
+ if (typeof payload.draft === "boolean") {
51125
+ adaptedArgs.draft = payload.draft;
51126
+ }
51127
+ return invokeCapability(server, toolName, adaptedArgs);
51128
+ }
51129
+ return invokeCapability(server, toolName, args);
51130
+ }
51131
+ if (isDefaultGitHubRoute && toolName === defaultRoute.operations.pull_request_state) {
51132
+ const { operation: _operation, ...args } = payload;
51133
+ const urlParts = parsePullRequestUrl(payload.pullRequestUrl);
51134
+ let owner = args.owner ?? urlParts.owner;
51135
+ let repo = args.repo ?? urlParts.repo;
51136
+ const repository = args.repository;
51137
+ if ((!owner || !repo) && repository && repository.includes("/")) {
51138
+ const parts = repository.split("/");
51139
+ owner = parts[0];
51140
+ repo = parts[1];
51141
+ }
51142
+ const pullNumber = args.pull_number ?? args.pullNumber ?? urlParts.pullNumber;
51143
+ const adaptedArgs = {};
51144
+ if (owner) adaptedArgs.owner = owner;
51145
+ if (repo) adaptedArgs.repo = repo;
51146
+ if (pullNumber !== void 0) {
51147
+ adaptedArgs.pull_number = pullNumber;
51148
+ }
51149
+ return invokeCapability(server, toolName, adaptedArgs);
51150
+ }
51151
+ return invokeCapability(server, toolName, { pullRequestUrl: payload.pullRequestUrl });
50302
51152
  }
50303
51153
 
50304
51154
  // src/mcp-tool-error.ts
@@ -50379,6 +51229,16 @@ async function deliverToArtifacts(client, projectSlug, payload, bareFetch) {
50379
51229
  // src/delivery/send.ts
50380
51230
  async function deliverToSend(server, toolName, payload) {
50381
51231
  const { operation: _operation, ...args } = payload;
51232
+ const defaultRoute = server.id ? getDefaultCapabilityRouteForServer(server.id) : null;
51233
+ const isDefaultSlackRoute = defaultRoute?.capability === "send";
51234
+ if (payload.operation === "dispatch" && isDefaultSlackRoute && toolName === defaultRoute.operations.dispatch) {
51235
+ const channelId = args.channel_id ?? args.destination ?? args.channel ?? args.to;
51236
+ const text = args.text ?? args.body ?? args.message ?? args.content;
51237
+ const adaptedArgs = {};
51238
+ if (channelId !== void 0) adaptedArgs.channel_id = channelId;
51239
+ if (text !== void 0) adaptedArgs.text = text;
51240
+ return invokeCapability(server, toolName, adaptedArgs);
51241
+ }
50382
51242
  return invokeCapability(server, toolName, args);
50383
51243
  }
50384
51244
 
@@ -55466,7 +56326,7 @@ var import_node_fs10 = require("node:fs");
55466
56326
  var import_node_os11 = __toESM(require("node:os"), 1);
55467
56327
  var import_node_path18 = __toESM(require("node:path"), 1);
55468
56328
  var import_semver2 = __toESM(require_semver2(), 1);
55469
- var toml2 = __toESM(require_toml(), 1);
56329
+ var toml3 = __toESM(require_toml(), 1);
55470
56330
 
55471
56331
  // src/agent-version.ts
55472
56332
  var import_node_child_process12 = require("node:child_process");
@@ -55649,7 +56509,7 @@ async function verifyProviderReadiness(provider, run3, opts = {}) {
55649
56509
  const configPath = import_node_path18.default.join(resolveCodexHome2(opts), "config.toml");
55650
56510
  try {
55651
56511
  const raw = await (0, import_promises10.readFile)(configPath, "utf8");
55652
- const parsed = toml2.parse(raw);
56512
+ const parsed = toml3.parse(raw);
55653
56513
  checks.mcpReachable = isExternalAgentsWrapper(parsed.mcp_servers?.["external-agents"]);
55654
56514
  } catch {
55655
56515
  }
@@ -56831,7 +57691,7 @@ Do NOT derail the current task - if the operator has an in-flight question, answ
56831
57691
  }
56832
57692
 
56833
57693
  // src/_generated/version.ts
56834
- var PKG_VERSION = "0.4.88";
57694
+ var PKG_VERSION = "0.4.90";
56835
57695
 
56836
57696
  // src/api-base-url-migrate.ts
56837
57697
  var import_node_fs13 = __toESM(require("node:fs"), 1);
@@ -56889,9 +57749,6 @@ function renderEcosystemConfig(opts) {
56889
57749
  const apiBaseUrl = legacyOpts.apiBaseUrl ? retargetRetiredApiBaseUrl(legacyOpts.apiBaseUrl).baseUrl : void 0;
56890
57750
  if (apiBaseUrl && !isProductionApiBaseUrl(apiBaseUrl)) {
56891
57751
  env.MRRLIN_API_BASE_URL = apiBaseUrl;
56892
- if (legacyOpts.apiAllowRemote && !isStagingApiBaseUrl(apiBaseUrl) && !isLoopbackUrl(apiBaseUrl)) {
56893
- env.MRRLIN_API_ALLOW_REMOTE = "1";
56894
- }
56895
57752
  }
56896
57753
  envLines = Object.entries(env).map(([k, v]) => ` ${k}: ${JSON.stringify(v)},`).join("\n");
56897
57754
  }
@@ -59939,35 +60796,7 @@ var EXECUTOR_BASE_INSTRUCTIONS = [
59939
60796
  "You MUST verify every delegated result against the actual files and tests before it lands \u2014",
59940
60797
  "pool models are lower-reliability and a wrong delegated edit is YOUR responsibility; never",
59941
60798
  "commit unverified delegated output. If dispatch fails or the pool is unavailable, do the",
59942
- "work yourself \u2014 never block the run on the pool.",
59943
- "",
59944
- // Auto-deploy design Part C (2026-08-04), C4: the workflow-resolution procedure. Only relevant
59945
- // when the deploy gate has parked this run on a missing/stale workflow id for one environment —
59946
- // most turns will never need this. This choice becomes durable project state (record_deploy_workflow
59947
- // writes project_deploy_workflow), not a per-run decision, so resolve it AT MOST ONCE per
59948
- // project+environment, only when actually needed (lazy, per env — do not speculatively resolve
59949
- // prod when only dev was asked for).
59950
- "If your context shows the deploy gate parked on a missing or stale workflow id for an",
59951
- "environment, resolve it once with this fail-closed procedure \u2014 do this AT MOST ONCE per",
59952
- "project+environment; it becomes durable project state, not a per-run choice:",
59953
- '1. Call `list_github_workflows` and keep only candidates with state: "active". A workflow\'s',
59954
- " name is NOT evidence it deploys anything \u2014 e.g. this repo also has `publish` (ships an npm",
59955
- " package) and `bootstrap-changelog`; picking by name resemblance can dispatch the wrong thing.",
59956
- "2. For each active candidate, read its file at `<worktree>/<path>` \u2014 the list API's `path` is",
59957
- " already repo-root-relative (e.g. `.github/workflows/deploy.yml`), so do NOT prefix it again",
59958
- " with `.github/workflows/`. Require an explicit `workflow_dispatch` trigger \u2014 a workflow you",
59959
- " cannot confirm is dispatchable this way is not a candidate.",
59960
- "3. Require positive evidence from the workflow's own steps that it deploys THIS project \u2014 not",
59961
- " just a plausible-sounding name.",
59962
- "4. Exactly one confirmed candidate \u2192 call `record_deploy_workflow` with that workflowId (state",
59963
- ' defaults to "resolved") and a one-sentence reason. The server captures its own snapshot of',
59964
- " the live active-workflow set at write time \u2014 you do not need to compute or pass one; hand-",
59965
- " assembling it yourself would risk a format mismatch against what the deploy gate recomputes",
59966
- " later, silently disabling the drift check. Append a `checkpoint` artifact with the same pick",
59967
- " + reason so the decision stays auditable.",
59968
- "5. Zero confirmed candidates, or more than one \u2192 call `record_deploy_workflow` with",
59969
- ' workflowId: null and state: "ambiguous", and file a clarifying question through the normal',
59970
- " inbox question path. Do NOT guess between multiple plausible candidates."
60799
+ "work yourself \u2014 never block the run on the pool."
59971
60800
  ].join("\n");
59972
60801
  function artifactKindForEvent(event) {
59973
60802
  switch (event.type) {
@@ -60012,21 +60841,21 @@ function isBlastRadiusFloorPath(path28) {
60012
60841
  }
60013
60842
  var execFileAsync2 = (0, import_node_util2.promisify)(import_node_child_process18.execFile);
60014
60843
  async function defaultListRunDiffPaths(opts) {
60015
- const parse7 = (stdout) => stdout.split("\n").map((line) => line.trim()).filter((line) => line.length > 0);
60844
+ const parse8 = (stdout) => stdout.split("\n").map((line) => line.trim()).filter((line) => line.length > 0);
60016
60845
  try {
60017
60846
  const { stdout } = await execFileAsync2(
60018
60847
  "git",
60019
60848
  ["-C", opts.worktreePath, "diff", "--name-only", `origin/${opts.defaultBranch}...HEAD`],
60020
60849
  { timeout: 3e4 }
60021
60850
  );
60022
- return parse7(stdout);
60851
+ return parse8(stdout);
60023
60852
  } catch {
60024
60853
  const { stdout } = await execFileAsync2(
60025
60854
  "git",
60026
60855
  ["-C", opts.worktreePath, "diff", "--name-only", `${opts.defaultBranch}...HEAD`],
60027
60856
  { timeout: 3e4 }
60028
60857
  );
60029
- return parse7(stdout);
60858
+ return parse8(stdout);
60030
60859
  }
60031
60860
  }
60032
60861
  var BLAST_RADIUS_FLOOR_REASON = "migration or database schema files changed";
@@ -60088,23 +60917,6 @@ async function gatherContext(client, projectSlug, task, openRunId) {
60088
60917
  autonomyEvents
60089
60918
  };
60090
60919
  }
60091
- async function deployWorkflowReverifyNotice(client, projectSlug) {
60092
- const envs = ["dev", "prod"];
60093
- const flagged = [];
60094
- const clientWithDeploy = client;
60095
- for (const env of envs) {
60096
- try {
60097
- const row = await clientWithDeploy.getProjectDeployWorkflow?.(projectSlug, env);
60098
- if (row?.reverifyRequested) flagged.push(env);
60099
- } catch {
60100
- }
60101
- }
60102
- if (flagged.length === 0) return "";
60103
- return `
60104
-
60105
- ## Deploy workflow re-verification needed
60106
- The GitHub Actions workflow set changed since the deploy workflow was last confirmed for: ${flagged.join(", ")}. Re-run the workflow-resolution procedure (list_github_workflows -> confirm -> record_deploy_workflow) for ${flagged.length === 1 ? "this environment" : "these environments"} if you have a worktree this turn \u2014 this is a hint, not a blocker, so it is fine to skip if unrelated work is more urgent this turn.`;
60107
- }
60108
60920
  async function assertRunCompletionReady(deps, projectSlug, taskId, runId, allowedStatuses) {
60109
60921
  const task = await deps.client.getTask(projectSlug, taskId);
60110
60922
  if (!allowedStatuses.has(task.status)) {
@@ -60436,7 +61248,6 @@ async function driveRun(deps, projectSlug, runId) {
60436
61248
  }
60437
61249
  } : context
60438
61250
  );
60439
- bundle += await deployWorkflowReverifyNotice(deps.client, projectSlug);
60440
61251
  const runTelemetry = {
60441
61252
  promptBytes: 0,
60442
61253
  turnCount: 0,
@@ -60865,6 +61676,7 @@ Continue executing task ${task.id}. Make the next concrete increment of progress
60865
61676
  runId,
60866
61677
  payload: {
60867
61678
  operation: "pull_request",
61679
+ repository: expectedRepoFullName,
60868
61680
  headBranch,
60869
61681
  title: `[mrrlin] ${readiness.task.title}`,
60870
61682
  body: buildPullRequestBody({ runId, taskId: readiness.task.id, producedUrls }),
@@ -61377,23 +62189,16 @@ async function driveNonCodeRun(deps, projectSlug, runId, leaseId, task, domain2)
61377
62189
  return;
61378
62190
  }
61379
62191
  }
61380
- let evidenceValue = pageId;
61381
- if (task.blockedBy.length > 0) {
61382
- for (const blockerId of task.blockedBy) {
61383
- const runs = (await deps.client.listExecutionRuns(projectSlug, { taskId: blockerId })).sort(
61384
- (a, b) => (b.createdAt ?? "").localeCompare(a.createdAt ?? "")
61385
- );
61386
- if (runs[0]?.prodEnvUrl) {
61387
- evidenceValue = runs[0].prodEnvUrl;
61388
- break;
61389
- }
61390
- }
61391
- }
61392
- const receipt = parsedResult.outcome === "completed" && task.declaredOutcome != null ? buildReceipt({
62192
+ const receipt = parsedResult.outcome === "completed" && task.declaredOutcome != null ? task.declaredOutcome.requires.includes("document") ? buildReceipt({
61393
62193
  declaredOutcome: task.declaredOutcome,
61394
- evidenceType: "url",
61395
- evidenceValue,
61396
- coveredKinds: ["page"]
62194
+ evidenceType: "human_tap",
62195
+ evidenceValue: pageId,
62196
+ coveredKinds: ["document"]
62197
+ }) : buildReceipt({
62198
+ declaredOutcome: task.declaredOutcome,
62199
+ evidenceType: "human_tap",
62200
+ evidenceValue: pageId,
62201
+ coveredKinds: []
61397
62202
  }) : void 0;
61398
62203
  try {
61399
62204
  const settled = await deps.client.settleExecutionRunOutcome(projectSlug, runId, {
@@ -67489,7 +68294,7 @@ function collectedTurnTimeoutMs() {
67489
68294
  return COLLECTED_TURN_TIMEOUT_DEFAULT_MS;
67490
68295
  }
67491
68296
  var DEFAULT_IMAGE_ONLY_PROMPT = "Look at the attached image.";
67492
- var VERIFICATION_BASE_INSTRUCTIONS = [
68297
+ var _VERIFICATION_BASE_INSTRUCTIONS = [
67493
68298
  "You are a deployment verification agent. Make ONLY read-only HTTP requests to the single",
67494
68299
  "environment URL given in the prompt to confirm a deploy succeeded. Do not read or write any",
67495
68300
  "files, do not use repository or credential access, do not contact any other host, and do not",
@@ -69232,11 +70037,6 @@ async function startDirectorBridge() {
69232
70037
  } catch {
69233
70038
  }
69234
70039
  const apiBaseUrl = readDirectorBridgeApiBaseUrl();
69235
- if (!isRemoteApiAllowed(apiBaseUrl)) {
69236
- throw new Error(
69237
- `Refusing to run the director-bridge execution consumer against untrusted remote API URL ${apiBaseUrl}. Set MRRLIN_API_ALLOW_REMOTE=1 for a custom remote, or set MRRLIN_API_BASE_URL=https://api-staging.mrrlin.com for the official staging API.`
69238
- );
69239
- }
69240
70040
  const envToken = process.env.MRRLIN_TOKEN?.trim() || void 0;
69241
70041
  const agentSecret = readAgentSecret();
69242
70042
  let tokenProvider = null;
@@ -70756,48 +71556,9 @@ var Server = class extends Protocol {
70756
71556
  };
70757
71557
 
70758
71558
  // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
70759
- var import_node_process = __toESM(require("node:process"), 1);
70760
-
70761
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
70762
- var STDIO_DEFAULT_MAX_BUFFER_SIZE = 10 * 1024 * 1024;
70763
- var ReadBuffer = class {
70764
- constructor(options) {
70765
- this._maxBufferSize = options?.maxBufferSize ?? STDIO_DEFAULT_MAX_BUFFER_SIZE;
70766
- }
70767
- append(chunk) {
70768
- const newSize = (this._buffer?.length ?? 0) + chunk.length;
70769
- if (newSize > this._maxBufferSize) {
70770
- this.clear();
70771
- throw new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);
70772
- }
70773
- this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
70774
- }
70775
- readMessage() {
70776
- if (!this._buffer) {
70777
- return null;
70778
- }
70779
- const index = this._buffer.indexOf("\n");
70780
- if (index === -1) {
70781
- return null;
70782
- }
70783
- const line = this._buffer.toString("utf8", 0, index).replace(/\r$/, "");
70784
- this._buffer = this._buffer.subarray(index + 1);
70785
- return deserializeMessage(line);
70786
- }
70787
- clear() {
70788
- this._buffer = void 0;
70789
- }
70790
- };
70791
- function deserializeMessage(line) {
70792
- return JSONRPCMessageSchema.parse(JSON.parse(line));
70793
- }
70794
- function serializeMessage(message) {
70795
- return JSON.stringify(message) + "\n";
70796
- }
70797
-
70798
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
71559
+ var import_node_process2 = __toESM(require("node:process"), 1);
70799
71560
  var StdioServerTransport = class {
70800
- constructor(_stdin = import_node_process.default.stdin, _stdout = import_node_process.default.stdout, options) {
71561
+ constructor(_stdin = import_node_process2.default.stdin, _stdout = import_node_process2.default.stdout, options) {
70801
71562
  this._stdin = _stdin;
70802
71563
  this._stdout = _stdout;
70803
71564
  this._started = false;
@@ -70873,16 +71634,10 @@ function redactUrlForLog(value) {
70873
71634
  }
70874
71635
  function resolveServerOptions(input = {}) {
70875
71636
  const apiBaseUrl = readConfiguredApiBaseUrl(input.apiBaseUrl);
70876
- const remoteAllowed = isRemoteApiAllowed(apiBaseUrl) || input.allowRemoteApi === true;
70877
- if (!remoteAllowed) {
70878
- throw new Error(
70879
- `Refusing to start MCP server against non-loopback URL ${apiBaseUrl}. Set MRRLIN_API_ALLOW_REMOTE=1 for a custom remote, or set MRRLIN_API_BASE_URL=https://api-staging.mrrlin.com for the official staging API.`
70880
- );
70881
- }
70882
71637
  return {
70883
71638
  apiBaseUrl,
70884
71639
  fetch: input.fetch,
70885
- remoteAllowed,
71640
+ remoteAllowed: true,
70886
71641
  // Deliberately do NOT bake process.env.MRRLIN_TOKEN in here: withAuth (tools.ts) resolves
70887
71642
  // env + the bridge-persisted operator-token file lazily per request, so long-lived MCP
70888
71643
  // processes pick up token rotation. An explicit input.token still wins when provided.
@@ -71004,7 +71759,7 @@ async function startStdioServer(options = {}) {
71004
71759
  effective = {
71005
71760
  ...options,
71006
71761
  apiBaseUrl: baseUrl,
71007
- allowRemoteApi: source === "staging-env" || source === "staging-autodetect" || source === "retired-retarget"
71762
+ allowRemoteApi: true
71008
71763
  };
71009
71764
  process.stderr.write(`[mrrlin-mcp] API resolved: ${redactUrlForLog(baseUrl)} (source=${source})
71010
71765
  `);
@@ -71346,9 +72101,7 @@ var CURATED_KEYS = [
71346
72101
  "CODEX_HOME",
71347
72102
  "CLAUDE_CONFIG_DIR",
71348
72103
  "MRRLIN_DIRECTOR_BRIDGE_LOG",
71349
- "MRRLIN_API_BASE_URL",
71350
- "MRRLIN_API_ALLOW_REMOTE",
71351
- "MRRLIN_STAGING"
72104
+ "MRRLIN_API_BASE_URL"
71352
72105
  ];
71353
72106
  function mergeConfigEnv(depsEnv, carriedEnv) {
71354
72107
  const isWin = process.platform === "win32";
@@ -71406,6 +72159,7 @@ function mergeConfigEnv(depsEnv, carriedEnv) {
71406
72159
  function deriveMergedApiRouting(mergedEnv, invokingBridgeUrl) {
71407
72160
  const result = /* @__PURE__ */ Object.create(null);
71408
72161
  for (const k of Object.keys(mergedEnv)) {
72162
+ if (k === "MRRLIN_STAGING" || k === "MRRLIN_API_ALLOW_REMOTE") continue;
71409
72163
  const v = mergedEnv[k];
71410
72164
  if (v !== void 0) {
71411
72165
  result[k] = v;
@@ -71420,9 +72174,7 @@ function deriveMergedApiRouting(mergedEnv, invokingBridgeUrl) {
71420
72174
  result["MRRLIN_API_BASE_URL"] = retargeted;
71421
72175
  }
71422
72176
  } else {
71423
- if (result["MRRLIN_STAGING"] === "1") {
71424
- result["MRRLIN_API_BASE_URL"] = STAGING_API_BASE_URL;
71425
- } else if (bridgeUrlImpliesStaging(invokingBridgeUrl)) {
72177
+ if (mergedEnv["MRRLIN_STAGING"] === "1" || bridgeUrlImpliesStaging(invokingBridgeUrl)) {
71426
72178
  result["MRRLIN_API_BASE_URL"] = STAGING_API_BASE_URL;
71427
72179
  }
71428
72180
  }
@@ -71634,7 +72386,7 @@ function uninstallService(deps) {
71634
72386
  var import_promises16 = __toESM(require("node:fs/promises"), 1);
71635
72387
  var import_node_os19 = __toESM(require("node:os"), 1);
71636
72388
  var import_node_path39 = __toESM(require("node:path"), 1);
71637
- var toml4 = __toESM(require_toml(), 1);
72389
+ var toml5 = __toESM(require_toml(), 1);
71638
72390
  function resolveCodexHome3(options) {
71639
72391
  if (options.codexHome) return options.codexHome;
71640
72392
  if (process.env.CODEX_HOME) return process.env.CODEX_HOME;
@@ -71660,7 +72412,7 @@ async function uninstallCodex(options = {}) {
71660
72412
  const existing = await import_promises16.default.readFile(realPath, "utf8");
71661
72413
  let parsed = null;
71662
72414
  try {
71663
- parsed = toml4.parse(existing);
72415
+ parsed = toml5.parse(existing);
71664
72416
  } catch (error51) {
71665
72417
  const detail = error51 instanceof Error ? error51.message : String(error51);
71666
72418
  const err = {
@@ -71860,11 +72612,11 @@ var HELP_TEXT = `mrrlin-mcp - Mrrlin Phase 1 MCP server CLI
71860
72612
 
71861
72613
  Usage:
71862
72614
  mrrlin-mcp serve Run the stdio MCP server. Honors
71863
- MRRLIN_API_BASE_URL (default http://127.0.0.1:8787)
71864
- and MRRLIN_TOKEN. Non-loopback API URLs require
71865
- MRRLIN_API_ALLOW_REMOTE=1 for a custom remote. Use
71866
- MRRLIN_API_BASE_URL=https://api-staging.mrrlin.com
71867
- to target the known staging API.
72615
+ MRRLIN_API_BASE_URL (default
72616
+ https://api.mrrlin.com) and MRRLIN_TOKEN.
72617
+ Use MRRLIN_API_BASE_URL=https://api-staging.mrrlin.com
72618
+ to target the known staging API, or http://127.0.0.1:8787
72619
+ for local development.
71868
72620
 
71869
72621
  mrrlin-mcp install-browser Idempotently install the dedicated, pinned
71870
72622
  Chromium into ~/.mrrlin/browser/browsers (its own
@@ -71901,15 +72653,9 @@ Usage:
71901
72653
  inline env table so \`serve\` boots even when the
71902
72654
  local 127.0.0.1:8787 is not running. Setup guide:
71903
72655
  MRRLIN_API_BASE_URL=https://api-staging.mrrlin.com mrrlin-mcp configure bridge
71904
- is the canonical staging path. For a custom remote,
71905
- pass BOTH the URL AND the allow gate:
71906
- MRRLIN_API_BASE_URL=https://... \\
71907
- MRRLIN_API_ALLOW_REMOTE=1 mrrlin-mcp configure bridge
71908
- Without an allow gate, \`serve\` still refuses any
71909
- non-loopback URL (see \`mrrlin-mcp serve\` above).
72656
+ is the canonical staging path.
71910
72657
  An explicit URL is the only routing selector at bake
71911
- time. Production needs no routing env; a custom
71912
- remote also needs MRRLIN_API_ALLOW_REMOTE=1.
72658
+ time. Production is the default and needs no routing env.
71913
72659
  Re-running BARE (no env vars) over a block you
71914
72660
  already pinned to staging/a remote target is safe:
71915
72661
  it keeps your env verbatim (reported as
@@ -71941,11 +72687,9 @@ Usage:
71941
72687
  user turn text from the log when logging is enabled)
71942
72688
  It also hosts the execution-run consumer (advances
71943
72689
  pending runs, read-only). Consumer env:
71944
- - MRRLIN_API_BASE_URL (default http://127.0.0.1:8787;
71945
- non-loopback requires MRRLIN_API_ALLOW_REMOTE=1,
71946
- or an explicit staging API URL)
71947
- - MRRLIN_API_BASE_URL=https://api-staging.mrrlin.com
71948
- (known staging API)
72690
+ - MRRLIN_API_BASE_URL (default https://api.mrrlin.com;
72691
+ set to https://api-staging.mrrlin.com for staging,
72692
+ or http://127.0.0.1:8787 for local development)
71949
72693
  - MRRLIN_TOKEN (service-principal auth to the API;
71950
72694
  if unset, chat still works but claim-sweep /
71951
72695
  autonomous execution stays disabled)