@mrrlin-dev/mcp 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.cjs +431 -273
- package/package.json +5 -5
package/dist/bin.cjs
CHANGED
|
@@ -4120,7 +4120,7 @@ var require_extension = __commonJS({
|
|
|
4120
4120
|
if (dest[name] === void 0) dest[name] = [elem];
|
|
4121
4121
|
else dest[name].push(elem);
|
|
4122
4122
|
}
|
|
4123
|
-
function
|
|
4123
|
+
function parse5(header) {
|
|
4124
4124
|
const offers = /* @__PURE__ */ Object.create(null);
|
|
4125
4125
|
let params = /* @__PURE__ */ Object.create(null);
|
|
4126
4126
|
let mustUnescape = false;
|
|
@@ -4260,7 +4260,7 @@ var require_extension = __commonJS({
|
|
|
4260
4260
|
}).join(", ");
|
|
4261
4261
|
}).join(", ");
|
|
4262
4262
|
}
|
|
4263
|
-
module2.exports = { format, parse:
|
|
4263
|
+
module2.exports = { format, parse: parse5 };
|
|
4264
4264
|
}
|
|
4265
4265
|
});
|
|
4266
4266
|
|
|
@@ -4294,7 +4294,7 @@ var require_websocket = __commonJS({
|
|
|
4294
4294
|
var {
|
|
4295
4295
|
EventTarget: { addEventListener, removeEventListener }
|
|
4296
4296
|
} = require_event_target();
|
|
4297
|
-
var { format, parse:
|
|
4297
|
+
var { format, parse: parse5 } = require_extension();
|
|
4298
4298
|
var { toBuffer } = require_buffer_util();
|
|
4299
4299
|
var kAborted = Symbol("kAborted");
|
|
4300
4300
|
var protocolVersions = [8, 13];
|
|
@@ -4971,7 +4971,7 @@ var require_websocket = __commonJS({
|
|
|
4971
4971
|
}
|
|
4972
4972
|
let extensions;
|
|
4973
4973
|
try {
|
|
4974
|
-
extensions =
|
|
4974
|
+
extensions = parse5(secWebSocketExtensions);
|
|
4975
4975
|
} catch (err) {
|
|
4976
4976
|
const message = "Invalid Sec-WebSocket-Extensions header";
|
|
4977
4977
|
abortHandshake(websocket, socket, message);
|
|
@@ -5263,7 +5263,7 @@ var require_subprotocol = __commonJS({
|
|
|
5263
5263
|
"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/subprotocol.js"(exports2, module2) {
|
|
5264
5264
|
"use strict";
|
|
5265
5265
|
var { tokenChars } = require_validation();
|
|
5266
|
-
function
|
|
5266
|
+
function parse5(header) {
|
|
5267
5267
|
const protocols = /* @__PURE__ */ new Set();
|
|
5268
5268
|
let start = -1;
|
|
5269
5269
|
let end = -1;
|
|
@@ -5299,7 +5299,7 @@ var require_subprotocol = __commonJS({
|
|
|
5299
5299
|
protocols.add(protocol);
|
|
5300
5300
|
return protocols;
|
|
5301
5301
|
}
|
|
5302
|
-
module2.exports = { parse:
|
|
5302
|
+
module2.exports = { parse: parse5 };
|
|
5303
5303
|
}
|
|
5304
5304
|
});
|
|
5305
5305
|
|
|
@@ -5730,54 +5730,54 @@ var require_polyfills = __commonJS({
|
|
|
5730
5730
|
}
|
|
5731
5731
|
var chdir;
|
|
5732
5732
|
module2.exports = patch;
|
|
5733
|
-
function patch(
|
|
5733
|
+
function patch(fs5) {
|
|
5734
5734
|
if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
|
|
5735
|
-
patchLchmod(
|
|
5736
|
-
}
|
|
5737
|
-
if (!
|
|
5738
|
-
patchLutimes(
|
|
5739
|
-
}
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
if (
|
|
5759
|
-
|
|
5735
|
+
patchLchmod(fs5);
|
|
5736
|
+
}
|
|
5737
|
+
if (!fs5.lutimes) {
|
|
5738
|
+
patchLutimes(fs5);
|
|
5739
|
+
}
|
|
5740
|
+
fs5.chown = chownFix(fs5.chown);
|
|
5741
|
+
fs5.fchown = chownFix(fs5.fchown);
|
|
5742
|
+
fs5.lchown = chownFix(fs5.lchown);
|
|
5743
|
+
fs5.chmod = chmodFix(fs5.chmod);
|
|
5744
|
+
fs5.fchmod = chmodFix(fs5.fchmod);
|
|
5745
|
+
fs5.lchmod = chmodFix(fs5.lchmod);
|
|
5746
|
+
fs5.chownSync = chownFixSync(fs5.chownSync);
|
|
5747
|
+
fs5.fchownSync = chownFixSync(fs5.fchownSync);
|
|
5748
|
+
fs5.lchownSync = chownFixSync(fs5.lchownSync);
|
|
5749
|
+
fs5.chmodSync = chmodFixSync(fs5.chmodSync);
|
|
5750
|
+
fs5.fchmodSync = chmodFixSync(fs5.fchmodSync);
|
|
5751
|
+
fs5.lchmodSync = chmodFixSync(fs5.lchmodSync);
|
|
5752
|
+
fs5.stat = statFix(fs5.stat);
|
|
5753
|
+
fs5.fstat = statFix(fs5.fstat);
|
|
5754
|
+
fs5.lstat = statFix(fs5.lstat);
|
|
5755
|
+
fs5.statSync = statFixSync(fs5.statSync);
|
|
5756
|
+
fs5.fstatSync = statFixSync(fs5.fstatSync);
|
|
5757
|
+
fs5.lstatSync = statFixSync(fs5.lstatSync);
|
|
5758
|
+
if (fs5.chmod && !fs5.lchmod) {
|
|
5759
|
+
fs5.lchmod = function(path13, mode, cb) {
|
|
5760
5760
|
if (cb) process.nextTick(cb);
|
|
5761
5761
|
};
|
|
5762
|
-
|
|
5762
|
+
fs5.lchmodSync = function() {
|
|
5763
5763
|
};
|
|
5764
5764
|
}
|
|
5765
|
-
if (
|
|
5766
|
-
|
|
5765
|
+
if (fs5.chown && !fs5.lchown) {
|
|
5766
|
+
fs5.lchown = function(path13, uid, gid, cb) {
|
|
5767
5767
|
if (cb) process.nextTick(cb);
|
|
5768
5768
|
};
|
|
5769
|
-
|
|
5769
|
+
fs5.lchownSync = function() {
|
|
5770
5770
|
};
|
|
5771
5771
|
}
|
|
5772
5772
|
if (platform === "win32") {
|
|
5773
|
-
|
|
5773
|
+
fs5.rename = typeof fs5.rename !== "function" ? fs5.rename : function(fs$rename) {
|
|
5774
5774
|
function rename(from, to, cb) {
|
|
5775
5775
|
var start = Date.now();
|
|
5776
5776
|
var backoff = 0;
|
|
5777
5777
|
fs$rename(from, to, function CB(er) {
|
|
5778
5778
|
if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
|
|
5779
5779
|
setTimeout(function() {
|
|
5780
|
-
|
|
5780
|
+
fs5.stat(to, function(stater, st) {
|
|
5781
5781
|
if (stater && stater.code === "ENOENT")
|
|
5782
5782
|
fs$rename(from, to, CB);
|
|
5783
5783
|
else
|
|
@@ -5793,9 +5793,9 @@ var require_polyfills = __commonJS({
|
|
|
5793
5793
|
}
|
|
5794
5794
|
if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
|
|
5795
5795
|
return rename;
|
|
5796
|
-
}(
|
|
5796
|
+
}(fs5.rename);
|
|
5797
5797
|
}
|
|
5798
|
-
|
|
5798
|
+
fs5.read = typeof fs5.read !== "function" ? fs5.read : function(fs$read) {
|
|
5799
5799
|
function read(fd, buffer, offset, length, position, callback_) {
|
|
5800
5800
|
var callback;
|
|
5801
5801
|
if (callback_ && typeof callback_ === "function") {
|
|
@@ -5803,22 +5803,22 @@ var require_polyfills = __commonJS({
|
|
|
5803
5803
|
callback = function(er, _, __) {
|
|
5804
5804
|
if (er && er.code === "EAGAIN" && eagCounter < 10) {
|
|
5805
5805
|
eagCounter++;
|
|
5806
|
-
return fs$read.call(
|
|
5806
|
+
return fs$read.call(fs5, fd, buffer, offset, length, position, callback);
|
|
5807
5807
|
}
|
|
5808
5808
|
callback_.apply(this, arguments);
|
|
5809
5809
|
};
|
|
5810
5810
|
}
|
|
5811
|
-
return fs$read.call(
|
|
5811
|
+
return fs$read.call(fs5, fd, buffer, offset, length, position, callback);
|
|
5812
5812
|
}
|
|
5813
5813
|
if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
|
|
5814
5814
|
return read;
|
|
5815
|
-
}(
|
|
5816
|
-
|
|
5815
|
+
}(fs5.read);
|
|
5816
|
+
fs5.readSync = typeof fs5.readSync !== "function" ? fs5.readSync : /* @__PURE__ */ function(fs$readSync) {
|
|
5817
5817
|
return function(fd, buffer, offset, length, position) {
|
|
5818
5818
|
var eagCounter = 0;
|
|
5819
5819
|
while (true) {
|
|
5820
5820
|
try {
|
|
5821
|
-
return fs$readSync.call(
|
|
5821
|
+
return fs$readSync.call(fs5, fd, buffer, offset, length, position);
|
|
5822
5822
|
} catch (er) {
|
|
5823
5823
|
if (er.code === "EAGAIN" && eagCounter < 10) {
|
|
5824
5824
|
eagCounter++;
|
|
@@ -5828,11 +5828,11 @@ var require_polyfills = __commonJS({
|
|
|
5828
5828
|
}
|
|
5829
5829
|
}
|
|
5830
5830
|
};
|
|
5831
|
-
}(
|
|
5832
|
-
function patchLchmod(
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
|
|
5831
|
+
}(fs5.readSync);
|
|
5832
|
+
function patchLchmod(fs6) {
|
|
5833
|
+
fs6.lchmod = function(path13, mode, callback) {
|
|
5834
|
+
fs6.open(
|
|
5835
|
+
path13,
|
|
5836
5836
|
constants.O_WRONLY | constants.O_SYMLINK,
|
|
5837
5837
|
mode,
|
|
5838
5838
|
function(err, fd) {
|
|
@@ -5840,80 +5840,80 @@ var require_polyfills = __commonJS({
|
|
|
5840
5840
|
if (callback) callback(err);
|
|
5841
5841
|
return;
|
|
5842
5842
|
}
|
|
5843
|
-
|
|
5844
|
-
|
|
5843
|
+
fs6.fchmod(fd, mode, function(err2) {
|
|
5844
|
+
fs6.close(fd, function(err22) {
|
|
5845
5845
|
if (callback) callback(err2 || err22);
|
|
5846
5846
|
});
|
|
5847
5847
|
});
|
|
5848
5848
|
}
|
|
5849
5849
|
);
|
|
5850
5850
|
};
|
|
5851
|
-
|
|
5852
|
-
var fd =
|
|
5851
|
+
fs6.lchmodSync = function(path13, mode) {
|
|
5852
|
+
var fd = fs6.openSync(path13, constants.O_WRONLY | constants.O_SYMLINK, mode);
|
|
5853
5853
|
var threw = true;
|
|
5854
5854
|
var ret;
|
|
5855
5855
|
try {
|
|
5856
|
-
ret =
|
|
5856
|
+
ret = fs6.fchmodSync(fd, mode);
|
|
5857
5857
|
threw = false;
|
|
5858
5858
|
} finally {
|
|
5859
5859
|
if (threw) {
|
|
5860
5860
|
try {
|
|
5861
|
-
|
|
5861
|
+
fs6.closeSync(fd);
|
|
5862
5862
|
} catch (er) {
|
|
5863
5863
|
}
|
|
5864
5864
|
} else {
|
|
5865
|
-
|
|
5865
|
+
fs6.closeSync(fd);
|
|
5866
5866
|
}
|
|
5867
5867
|
}
|
|
5868
5868
|
return ret;
|
|
5869
5869
|
};
|
|
5870
5870
|
}
|
|
5871
|
-
function patchLutimes(
|
|
5872
|
-
if (constants.hasOwnProperty("O_SYMLINK") &&
|
|
5873
|
-
|
|
5874
|
-
|
|
5871
|
+
function patchLutimes(fs6) {
|
|
5872
|
+
if (constants.hasOwnProperty("O_SYMLINK") && fs6.futimes) {
|
|
5873
|
+
fs6.lutimes = function(path13, at, mt, cb) {
|
|
5874
|
+
fs6.open(path13, constants.O_SYMLINK, function(er, fd) {
|
|
5875
5875
|
if (er) {
|
|
5876
5876
|
if (cb) cb(er);
|
|
5877
5877
|
return;
|
|
5878
5878
|
}
|
|
5879
|
-
|
|
5880
|
-
|
|
5879
|
+
fs6.futimes(fd, at, mt, function(er2) {
|
|
5880
|
+
fs6.close(fd, function(er22) {
|
|
5881
5881
|
if (cb) cb(er2 || er22);
|
|
5882
5882
|
});
|
|
5883
5883
|
});
|
|
5884
5884
|
});
|
|
5885
5885
|
};
|
|
5886
|
-
|
|
5887
|
-
var fd =
|
|
5886
|
+
fs6.lutimesSync = function(path13, at, mt) {
|
|
5887
|
+
var fd = fs6.openSync(path13, constants.O_SYMLINK);
|
|
5888
5888
|
var ret;
|
|
5889
5889
|
var threw = true;
|
|
5890
5890
|
try {
|
|
5891
|
-
ret =
|
|
5891
|
+
ret = fs6.futimesSync(fd, at, mt);
|
|
5892
5892
|
threw = false;
|
|
5893
5893
|
} finally {
|
|
5894
5894
|
if (threw) {
|
|
5895
5895
|
try {
|
|
5896
|
-
|
|
5896
|
+
fs6.closeSync(fd);
|
|
5897
5897
|
} catch (er) {
|
|
5898
5898
|
}
|
|
5899
5899
|
} else {
|
|
5900
|
-
|
|
5900
|
+
fs6.closeSync(fd);
|
|
5901
5901
|
}
|
|
5902
5902
|
}
|
|
5903
5903
|
return ret;
|
|
5904
5904
|
};
|
|
5905
|
-
} else if (
|
|
5906
|
-
|
|
5905
|
+
} else if (fs6.futimes) {
|
|
5906
|
+
fs6.lutimes = function(_a3, _b, _c, cb) {
|
|
5907
5907
|
if (cb) process.nextTick(cb);
|
|
5908
5908
|
};
|
|
5909
|
-
|
|
5909
|
+
fs6.lutimesSync = function() {
|
|
5910
5910
|
};
|
|
5911
5911
|
}
|
|
5912
5912
|
}
|
|
5913
5913
|
function chmodFix(orig) {
|
|
5914
5914
|
if (!orig) return orig;
|
|
5915
5915
|
return function(target, mode, cb) {
|
|
5916
|
-
return orig.call(
|
|
5916
|
+
return orig.call(fs5, target, mode, function(er) {
|
|
5917
5917
|
if (chownErOk(er)) er = null;
|
|
5918
5918
|
if (cb) cb.apply(this, arguments);
|
|
5919
5919
|
});
|
|
@@ -5923,7 +5923,7 @@ var require_polyfills = __commonJS({
|
|
|
5923
5923
|
if (!orig) return orig;
|
|
5924
5924
|
return function(target, mode) {
|
|
5925
5925
|
try {
|
|
5926
|
-
return orig.call(
|
|
5926
|
+
return orig.call(fs5, target, mode);
|
|
5927
5927
|
} catch (er) {
|
|
5928
5928
|
if (!chownErOk(er)) throw er;
|
|
5929
5929
|
}
|
|
@@ -5932,7 +5932,7 @@ var require_polyfills = __commonJS({
|
|
|
5932
5932
|
function chownFix(orig) {
|
|
5933
5933
|
if (!orig) return orig;
|
|
5934
5934
|
return function(target, uid, gid, cb) {
|
|
5935
|
-
return orig.call(
|
|
5935
|
+
return orig.call(fs5, target, uid, gid, function(er) {
|
|
5936
5936
|
if (chownErOk(er)) er = null;
|
|
5937
5937
|
if (cb) cb.apply(this, arguments);
|
|
5938
5938
|
});
|
|
@@ -5942,7 +5942,7 @@ var require_polyfills = __commonJS({
|
|
|
5942
5942
|
if (!orig) return orig;
|
|
5943
5943
|
return function(target, uid, gid) {
|
|
5944
5944
|
try {
|
|
5945
|
-
return orig.call(
|
|
5945
|
+
return orig.call(fs5, target, uid, gid);
|
|
5946
5946
|
} catch (er) {
|
|
5947
5947
|
if (!chownErOk(er)) throw er;
|
|
5948
5948
|
}
|
|
@@ -5962,13 +5962,13 @@ var require_polyfills = __commonJS({
|
|
|
5962
5962
|
}
|
|
5963
5963
|
if (cb) cb.apply(this, arguments);
|
|
5964
5964
|
}
|
|
5965
|
-
return options ? orig.call(
|
|
5965
|
+
return options ? orig.call(fs5, target, options, callback) : orig.call(fs5, target, callback);
|
|
5966
5966
|
};
|
|
5967
5967
|
}
|
|
5968
5968
|
function statFixSync(orig) {
|
|
5969
5969
|
if (!orig) return orig;
|
|
5970
5970
|
return function(target, options) {
|
|
5971
|
-
var stats = options ? orig.call(
|
|
5971
|
+
var stats = options ? orig.call(fs5, target, options) : orig.call(fs5, target);
|
|
5972
5972
|
if (stats) {
|
|
5973
5973
|
if (stats.uid < 0) stats.uid += 4294967296;
|
|
5974
5974
|
if (stats.gid < 0) stats.gid += 4294967296;
|
|
@@ -5997,16 +5997,16 @@ var require_legacy_streams = __commonJS({
|
|
|
5997
5997
|
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports2, module2) {
|
|
5998
5998
|
var Stream = require("stream").Stream;
|
|
5999
5999
|
module2.exports = legacy;
|
|
6000
|
-
function legacy(
|
|
6000
|
+
function legacy(fs5) {
|
|
6001
6001
|
return {
|
|
6002
6002
|
ReadStream,
|
|
6003
6003
|
WriteStream
|
|
6004
6004
|
};
|
|
6005
|
-
function ReadStream(
|
|
6006
|
-
if (!(this instanceof ReadStream)) return new ReadStream(
|
|
6005
|
+
function ReadStream(path13, options) {
|
|
6006
|
+
if (!(this instanceof ReadStream)) return new ReadStream(path13, options);
|
|
6007
6007
|
Stream.call(this);
|
|
6008
6008
|
var self = this;
|
|
6009
|
-
this.path =
|
|
6009
|
+
this.path = path13;
|
|
6010
6010
|
this.fd = null;
|
|
6011
6011
|
this.readable = true;
|
|
6012
6012
|
this.paused = false;
|
|
@@ -6040,7 +6040,7 @@ var require_legacy_streams = __commonJS({
|
|
|
6040
6040
|
});
|
|
6041
6041
|
return;
|
|
6042
6042
|
}
|
|
6043
|
-
|
|
6043
|
+
fs5.open(this.path, this.flags, this.mode, function(err, fd) {
|
|
6044
6044
|
if (err) {
|
|
6045
6045
|
self.emit("error", err);
|
|
6046
6046
|
self.readable = false;
|
|
@@ -6051,10 +6051,10 @@ var require_legacy_streams = __commonJS({
|
|
|
6051
6051
|
self._read();
|
|
6052
6052
|
});
|
|
6053
6053
|
}
|
|
6054
|
-
function WriteStream(
|
|
6055
|
-
if (!(this instanceof WriteStream)) return new WriteStream(
|
|
6054
|
+
function WriteStream(path13, options) {
|
|
6055
|
+
if (!(this instanceof WriteStream)) return new WriteStream(path13, options);
|
|
6056
6056
|
Stream.call(this);
|
|
6057
|
-
this.path =
|
|
6057
|
+
this.path = path13;
|
|
6058
6058
|
this.fd = null;
|
|
6059
6059
|
this.writable = true;
|
|
6060
6060
|
this.flags = "w";
|
|
@@ -6079,7 +6079,7 @@ var require_legacy_streams = __commonJS({
|
|
|
6079
6079
|
this.busy = false;
|
|
6080
6080
|
this._queue = [];
|
|
6081
6081
|
if (this.fd === null) {
|
|
6082
|
-
this._open =
|
|
6082
|
+
this._open = fs5.open;
|
|
6083
6083
|
this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
|
|
6084
6084
|
this.flush();
|
|
6085
6085
|
}
|
|
@@ -6114,7 +6114,7 @@ var require_clone = __commonJS({
|
|
|
6114
6114
|
// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js
|
|
6115
6115
|
var require_graceful_fs = __commonJS({
|
|
6116
6116
|
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
|
|
6117
|
-
var
|
|
6117
|
+
var fs5 = require("fs");
|
|
6118
6118
|
var polyfills = require_polyfills();
|
|
6119
6119
|
var legacy = require_legacy_streams();
|
|
6120
6120
|
var clone2 = require_clone();
|
|
@@ -6146,12 +6146,12 @@ var require_graceful_fs = __commonJS({
|
|
|
6146
6146
|
m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
|
|
6147
6147
|
console.error(m);
|
|
6148
6148
|
};
|
|
6149
|
-
if (!
|
|
6149
|
+
if (!fs5[gracefulQueue]) {
|
|
6150
6150
|
queue = global[gracefulQueue] || [];
|
|
6151
|
-
publishQueue(
|
|
6152
|
-
|
|
6151
|
+
publishQueue(fs5, queue);
|
|
6152
|
+
fs5.close = function(fs$close) {
|
|
6153
6153
|
function close(fd, cb) {
|
|
6154
|
-
return fs$close.call(
|
|
6154
|
+
return fs$close.call(fs5, fd, function(err) {
|
|
6155
6155
|
if (!err) {
|
|
6156
6156
|
resetQueue();
|
|
6157
6157
|
}
|
|
@@ -6163,48 +6163,48 @@ var require_graceful_fs = __commonJS({
|
|
|
6163
6163
|
value: fs$close
|
|
6164
6164
|
});
|
|
6165
6165
|
return close;
|
|
6166
|
-
}(
|
|
6167
|
-
|
|
6166
|
+
}(fs5.close);
|
|
6167
|
+
fs5.closeSync = function(fs$closeSync) {
|
|
6168
6168
|
function closeSync(fd) {
|
|
6169
|
-
fs$closeSync.apply(
|
|
6169
|
+
fs$closeSync.apply(fs5, arguments);
|
|
6170
6170
|
resetQueue();
|
|
6171
6171
|
}
|
|
6172
6172
|
Object.defineProperty(closeSync, previousSymbol, {
|
|
6173
6173
|
value: fs$closeSync
|
|
6174
6174
|
});
|
|
6175
6175
|
return closeSync;
|
|
6176
|
-
}(
|
|
6176
|
+
}(fs5.closeSync);
|
|
6177
6177
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
|
6178
6178
|
process.on("exit", function() {
|
|
6179
|
-
debug(
|
|
6180
|
-
require("assert").equal(
|
|
6179
|
+
debug(fs5[gracefulQueue]);
|
|
6180
|
+
require("assert").equal(fs5[gracefulQueue].length, 0);
|
|
6181
6181
|
});
|
|
6182
6182
|
}
|
|
6183
6183
|
}
|
|
6184
6184
|
var queue;
|
|
6185
6185
|
if (!global[gracefulQueue]) {
|
|
6186
|
-
publishQueue(global,
|
|
6187
|
-
}
|
|
6188
|
-
module2.exports = patch(clone2(
|
|
6189
|
-
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !
|
|
6190
|
-
module2.exports = patch(
|
|
6191
|
-
|
|
6192
|
-
}
|
|
6193
|
-
function patch(
|
|
6194
|
-
polyfills(
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
|
|
6198
|
-
var fs$readFile =
|
|
6199
|
-
|
|
6200
|
-
function readFile2(
|
|
6186
|
+
publishQueue(global, fs5[gracefulQueue]);
|
|
6187
|
+
}
|
|
6188
|
+
module2.exports = patch(clone2(fs5));
|
|
6189
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs5.__patched) {
|
|
6190
|
+
module2.exports = patch(fs5);
|
|
6191
|
+
fs5.__patched = true;
|
|
6192
|
+
}
|
|
6193
|
+
function patch(fs6) {
|
|
6194
|
+
polyfills(fs6);
|
|
6195
|
+
fs6.gracefulify = patch;
|
|
6196
|
+
fs6.createReadStream = createReadStream;
|
|
6197
|
+
fs6.createWriteStream = createWriteStream;
|
|
6198
|
+
var fs$readFile = fs6.readFile;
|
|
6199
|
+
fs6.readFile = readFile2;
|
|
6200
|
+
function readFile2(path13, options, cb) {
|
|
6201
6201
|
if (typeof options === "function")
|
|
6202
6202
|
cb = options, options = null;
|
|
6203
|
-
return go$readFile(
|
|
6204
|
-
function go$readFile(
|
|
6205
|
-
return fs$readFile(
|
|
6203
|
+
return go$readFile(path13, options, cb);
|
|
6204
|
+
function go$readFile(path14, options2, cb2, startTime) {
|
|
6205
|
+
return fs$readFile(path14, options2, function(err) {
|
|
6206
6206
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
6207
|
-
enqueue([go$readFile, [
|
|
6207
|
+
enqueue([go$readFile, [path14, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
6208
6208
|
else {
|
|
6209
6209
|
if (typeof cb2 === "function")
|
|
6210
6210
|
cb2.apply(this, arguments);
|
|
@@ -6212,16 +6212,16 @@ var require_graceful_fs = __commonJS({
|
|
|
6212
6212
|
});
|
|
6213
6213
|
}
|
|
6214
6214
|
}
|
|
6215
|
-
var fs$writeFile =
|
|
6216
|
-
|
|
6217
|
-
function writeFile(
|
|
6215
|
+
var fs$writeFile = fs6.writeFile;
|
|
6216
|
+
fs6.writeFile = writeFile;
|
|
6217
|
+
function writeFile(path13, data, options, cb) {
|
|
6218
6218
|
if (typeof options === "function")
|
|
6219
6219
|
cb = options, options = null;
|
|
6220
|
-
return go$writeFile(
|
|
6221
|
-
function go$writeFile(
|
|
6222
|
-
return fs$writeFile(
|
|
6220
|
+
return go$writeFile(path13, data, options, cb);
|
|
6221
|
+
function go$writeFile(path14, data2, options2, cb2, startTime) {
|
|
6222
|
+
return fs$writeFile(path14, data2, options2, function(err) {
|
|
6223
6223
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
6224
|
-
enqueue([go$writeFile, [
|
|
6224
|
+
enqueue([go$writeFile, [path14, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
6225
6225
|
else {
|
|
6226
6226
|
if (typeof cb2 === "function")
|
|
6227
6227
|
cb2.apply(this, arguments);
|
|
@@ -6229,17 +6229,17 @@ var require_graceful_fs = __commonJS({
|
|
|
6229
6229
|
});
|
|
6230
6230
|
}
|
|
6231
6231
|
}
|
|
6232
|
-
var fs$appendFile =
|
|
6232
|
+
var fs$appendFile = fs6.appendFile;
|
|
6233
6233
|
if (fs$appendFile)
|
|
6234
|
-
|
|
6235
|
-
function appendFile(
|
|
6234
|
+
fs6.appendFile = appendFile;
|
|
6235
|
+
function appendFile(path13, data, options, cb) {
|
|
6236
6236
|
if (typeof options === "function")
|
|
6237
6237
|
cb = options, options = null;
|
|
6238
|
-
return go$appendFile(
|
|
6239
|
-
function go$appendFile(
|
|
6240
|
-
return fs$appendFile(
|
|
6238
|
+
return go$appendFile(path13, data, options, cb);
|
|
6239
|
+
function go$appendFile(path14, data2, options2, cb2, startTime) {
|
|
6240
|
+
return fs$appendFile(path14, data2, options2, function(err) {
|
|
6241
6241
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
6242
|
-
enqueue([go$appendFile, [
|
|
6242
|
+
enqueue([go$appendFile, [path14, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
6243
6243
|
else {
|
|
6244
6244
|
if (typeof cb2 === "function")
|
|
6245
6245
|
cb2.apply(this, arguments);
|
|
@@ -6247,9 +6247,9 @@ var require_graceful_fs = __commonJS({
|
|
|
6247
6247
|
});
|
|
6248
6248
|
}
|
|
6249
6249
|
}
|
|
6250
|
-
var fs$copyFile =
|
|
6250
|
+
var fs$copyFile = fs6.copyFile;
|
|
6251
6251
|
if (fs$copyFile)
|
|
6252
|
-
|
|
6252
|
+
fs6.copyFile = copyFile;
|
|
6253
6253
|
function copyFile(src, dest, flags, cb) {
|
|
6254
6254
|
if (typeof flags === "function") {
|
|
6255
6255
|
cb = flags;
|
|
@@ -6267,34 +6267,34 @@ var require_graceful_fs = __commonJS({
|
|
|
6267
6267
|
});
|
|
6268
6268
|
}
|
|
6269
6269
|
}
|
|
6270
|
-
var fs$readdir =
|
|
6271
|
-
|
|
6270
|
+
var fs$readdir = fs6.readdir;
|
|
6271
|
+
fs6.readdir = readdir;
|
|
6272
6272
|
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
6273
|
-
function readdir(
|
|
6273
|
+
function readdir(path13, options, cb) {
|
|
6274
6274
|
if (typeof options === "function")
|
|
6275
6275
|
cb = options, options = null;
|
|
6276
|
-
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(
|
|
6277
|
-
return fs$readdir(
|
|
6278
|
-
|
|
6276
|
+
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path14, options2, cb2, startTime) {
|
|
6277
|
+
return fs$readdir(path14, fs$readdirCallback(
|
|
6278
|
+
path14,
|
|
6279
6279
|
options2,
|
|
6280
6280
|
cb2,
|
|
6281
6281
|
startTime
|
|
6282
6282
|
));
|
|
6283
|
-
} : function go$readdir2(
|
|
6284
|
-
return fs$readdir(
|
|
6285
|
-
|
|
6283
|
+
} : function go$readdir2(path14, options2, cb2, startTime) {
|
|
6284
|
+
return fs$readdir(path14, options2, fs$readdirCallback(
|
|
6285
|
+
path14,
|
|
6286
6286
|
options2,
|
|
6287
6287
|
cb2,
|
|
6288
6288
|
startTime
|
|
6289
6289
|
));
|
|
6290
6290
|
};
|
|
6291
|
-
return go$readdir(
|
|
6292
|
-
function fs$readdirCallback(
|
|
6291
|
+
return go$readdir(path13, options, cb);
|
|
6292
|
+
function fs$readdirCallback(path14, options2, cb2, startTime) {
|
|
6293
6293
|
return function(err, files) {
|
|
6294
6294
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
6295
6295
|
enqueue([
|
|
6296
6296
|
go$readdir,
|
|
6297
|
-
[
|
|
6297
|
+
[path14, options2, cb2],
|
|
6298
6298
|
err,
|
|
6299
6299
|
startTime || Date.now(),
|
|
6300
6300
|
Date.now()
|
|
@@ -6309,21 +6309,21 @@ var require_graceful_fs = __commonJS({
|
|
|
6309
6309
|
}
|
|
6310
6310
|
}
|
|
6311
6311
|
if (process.version.substr(0, 4) === "v0.8") {
|
|
6312
|
-
var legStreams = legacy(
|
|
6312
|
+
var legStreams = legacy(fs6);
|
|
6313
6313
|
ReadStream = legStreams.ReadStream;
|
|
6314
6314
|
WriteStream = legStreams.WriteStream;
|
|
6315
6315
|
}
|
|
6316
|
-
var fs$ReadStream =
|
|
6316
|
+
var fs$ReadStream = fs6.ReadStream;
|
|
6317
6317
|
if (fs$ReadStream) {
|
|
6318
6318
|
ReadStream.prototype = Object.create(fs$ReadStream.prototype);
|
|
6319
6319
|
ReadStream.prototype.open = ReadStream$open;
|
|
6320
6320
|
}
|
|
6321
|
-
var fs$WriteStream =
|
|
6321
|
+
var fs$WriteStream = fs6.WriteStream;
|
|
6322
6322
|
if (fs$WriteStream) {
|
|
6323
6323
|
WriteStream.prototype = Object.create(fs$WriteStream.prototype);
|
|
6324
6324
|
WriteStream.prototype.open = WriteStream$open;
|
|
6325
6325
|
}
|
|
6326
|
-
Object.defineProperty(
|
|
6326
|
+
Object.defineProperty(fs6, "ReadStream", {
|
|
6327
6327
|
get: function() {
|
|
6328
6328
|
return ReadStream;
|
|
6329
6329
|
},
|
|
@@ -6333,7 +6333,7 @@ var require_graceful_fs = __commonJS({
|
|
|
6333
6333
|
enumerable: true,
|
|
6334
6334
|
configurable: true
|
|
6335
6335
|
});
|
|
6336
|
-
Object.defineProperty(
|
|
6336
|
+
Object.defineProperty(fs6, "WriteStream", {
|
|
6337
6337
|
get: function() {
|
|
6338
6338
|
return WriteStream;
|
|
6339
6339
|
},
|
|
@@ -6344,7 +6344,7 @@ var require_graceful_fs = __commonJS({
|
|
|
6344
6344
|
configurable: true
|
|
6345
6345
|
});
|
|
6346
6346
|
var FileReadStream = ReadStream;
|
|
6347
|
-
Object.defineProperty(
|
|
6347
|
+
Object.defineProperty(fs6, "FileReadStream", {
|
|
6348
6348
|
get: function() {
|
|
6349
6349
|
return FileReadStream;
|
|
6350
6350
|
},
|
|
@@ -6355,7 +6355,7 @@ var require_graceful_fs = __commonJS({
|
|
|
6355
6355
|
configurable: true
|
|
6356
6356
|
});
|
|
6357
6357
|
var FileWriteStream = WriteStream;
|
|
6358
|
-
Object.defineProperty(
|
|
6358
|
+
Object.defineProperty(fs6, "FileWriteStream", {
|
|
6359
6359
|
get: function() {
|
|
6360
6360
|
return FileWriteStream;
|
|
6361
6361
|
},
|
|
@@ -6365,7 +6365,7 @@ var require_graceful_fs = __commonJS({
|
|
|
6365
6365
|
enumerable: true,
|
|
6366
6366
|
configurable: true
|
|
6367
6367
|
});
|
|
6368
|
-
function ReadStream(
|
|
6368
|
+
function ReadStream(path13, options) {
|
|
6369
6369
|
if (this instanceof ReadStream)
|
|
6370
6370
|
return fs$ReadStream.apply(this, arguments), this;
|
|
6371
6371
|
else
|
|
@@ -6385,7 +6385,7 @@ var require_graceful_fs = __commonJS({
|
|
|
6385
6385
|
}
|
|
6386
6386
|
});
|
|
6387
6387
|
}
|
|
6388
|
-
function WriteStream(
|
|
6388
|
+
function WriteStream(path13, options) {
|
|
6389
6389
|
if (this instanceof WriteStream)
|
|
6390
6390
|
return fs$WriteStream.apply(this, arguments), this;
|
|
6391
6391
|
else
|
|
@@ -6403,22 +6403,22 @@ var require_graceful_fs = __commonJS({
|
|
|
6403
6403
|
}
|
|
6404
6404
|
});
|
|
6405
6405
|
}
|
|
6406
|
-
function createReadStream(
|
|
6407
|
-
return new
|
|
6406
|
+
function createReadStream(path13, options) {
|
|
6407
|
+
return new fs6.ReadStream(path13, options);
|
|
6408
6408
|
}
|
|
6409
|
-
function createWriteStream(
|
|
6410
|
-
return new
|
|
6409
|
+
function createWriteStream(path13, options) {
|
|
6410
|
+
return new fs6.WriteStream(path13, options);
|
|
6411
6411
|
}
|
|
6412
|
-
var fs$open =
|
|
6413
|
-
|
|
6414
|
-
function open(
|
|
6412
|
+
var fs$open = fs6.open;
|
|
6413
|
+
fs6.open = open;
|
|
6414
|
+
function open(path13, flags, mode, cb) {
|
|
6415
6415
|
if (typeof mode === "function")
|
|
6416
6416
|
cb = mode, mode = null;
|
|
6417
|
-
return go$open(
|
|
6418
|
-
function go$open(
|
|
6419
|
-
return fs$open(
|
|
6417
|
+
return go$open(path13, flags, mode, cb);
|
|
6418
|
+
function go$open(path14, flags2, mode2, cb2, startTime) {
|
|
6419
|
+
return fs$open(path14, flags2, mode2, function(err, fd) {
|
|
6420
6420
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
6421
|
-
enqueue([go$open, [
|
|
6421
|
+
enqueue([go$open, [path14, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
6422
6422
|
else {
|
|
6423
6423
|
if (typeof cb2 === "function")
|
|
6424
6424
|
cb2.apply(this, arguments);
|
|
@@ -6426,20 +6426,20 @@ var require_graceful_fs = __commonJS({
|
|
|
6426
6426
|
});
|
|
6427
6427
|
}
|
|
6428
6428
|
}
|
|
6429
|
-
return
|
|
6429
|
+
return fs6;
|
|
6430
6430
|
}
|
|
6431
6431
|
function enqueue(elem) {
|
|
6432
6432
|
debug("ENQUEUE", elem[0].name, elem[1]);
|
|
6433
|
-
|
|
6433
|
+
fs5[gracefulQueue].push(elem);
|
|
6434
6434
|
retry();
|
|
6435
6435
|
}
|
|
6436
6436
|
var retryTimer;
|
|
6437
6437
|
function resetQueue() {
|
|
6438
6438
|
var now = Date.now();
|
|
6439
|
-
for (var i = 0; i <
|
|
6440
|
-
if (
|
|
6441
|
-
|
|
6442
|
-
|
|
6439
|
+
for (var i = 0; i < fs5[gracefulQueue].length; ++i) {
|
|
6440
|
+
if (fs5[gracefulQueue][i].length > 2) {
|
|
6441
|
+
fs5[gracefulQueue][i][3] = now;
|
|
6442
|
+
fs5[gracefulQueue][i][4] = now;
|
|
6443
6443
|
}
|
|
6444
6444
|
}
|
|
6445
6445
|
retry();
|
|
@@ -6447,9 +6447,9 @@ var require_graceful_fs = __commonJS({
|
|
|
6447
6447
|
function retry() {
|
|
6448
6448
|
clearTimeout(retryTimer);
|
|
6449
6449
|
retryTimer = void 0;
|
|
6450
|
-
if (
|
|
6450
|
+
if (fs5[gracefulQueue].length === 0)
|
|
6451
6451
|
return;
|
|
6452
|
-
var elem =
|
|
6452
|
+
var elem = fs5[gracefulQueue].shift();
|
|
6453
6453
|
var fn = elem[0];
|
|
6454
6454
|
var args = elem[1];
|
|
6455
6455
|
var err = elem[2];
|
|
@@ -6471,7 +6471,7 @@ var require_graceful_fs = __commonJS({
|
|
|
6471
6471
|
debug("RETRY", fn.name, args);
|
|
6472
6472
|
fn.apply(null, args.concat([startTime]));
|
|
6473
6473
|
} else {
|
|
6474
|
-
|
|
6474
|
+
fs5[gracefulQueue].push(elem);
|
|
6475
6475
|
}
|
|
6476
6476
|
}
|
|
6477
6477
|
if (retryTimer === void 0) {
|
|
@@ -6906,10 +6906,10 @@ var require_mtime_precision = __commonJS({
|
|
|
6906
6906
|
"../../node_modules/.pnpm/proper-lockfile@4.1.2/node_modules/proper-lockfile/lib/mtime-precision.js"(exports2, module2) {
|
|
6907
6907
|
"use strict";
|
|
6908
6908
|
var cacheSymbol = Symbol();
|
|
6909
|
-
function probe(file2,
|
|
6910
|
-
const cachedPrecision =
|
|
6909
|
+
function probe(file2, fs5, callback) {
|
|
6910
|
+
const cachedPrecision = fs5[cacheSymbol];
|
|
6911
6911
|
if (cachedPrecision) {
|
|
6912
|
-
return
|
|
6912
|
+
return fs5.stat(file2, (err, stat2) => {
|
|
6913
6913
|
if (err) {
|
|
6914
6914
|
return callback(err);
|
|
6915
6915
|
}
|
|
@@ -6917,16 +6917,16 @@ var require_mtime_precision = __commonJS({
|
|
|
6917
6917
|
});
|
|
6918
6918
|
}
|
|
6919
6919
|
const mtime = new Date(Math.ceil(Date.now() / 1e3) * 1e3 + 5);
|
|
6920
|
-
|
|
6920
|
+
fs5.utimes(file2, mtime, mtime, (err) => {
|
|
6921
6921
|
if (err) {
|
|
6922
6922
|
return callback(err);
|
|
6923
6923
|
}
|
|
6924
|
-
|
|
6924
|
+
fs5.stat(file2, (err2, stat2) => {
|
|
6925
6925
|
if (err2) {
|
|
6926
6926
|
return callback(err2);
|
|
6927
6927
|
}
|
|
6928
6928
|
const precision = stat2.mtime.getTime() % 1e3 === 0 ? "s" : "ms";
|
|
6929
|
-
Object.defineProperty(
|
|
6929
|
+
Object.defineProperty(fs5, cacheSymbol, { value: precision });
|
|
6930
6930
|
callback(null, stat2.mtime, precision);
|
|
6931
6931
|
});
|
|
6932
6932
|
});
|
|
@@ -6947,8 +6947,8 @@ var require_mtime_precision = __commonJS({
|
|
|
6947
6947
|
var require_lockfile = __commonJS({
|
|
6948
6948
|
"../../node_modules/.pnpm/proper-lockfile@4.1.2/node_modules/proper-lockfile/lib/lockfile.js"(exports2, module2) {
|
|
6949
6949
|
"use strict";
|
|
6950
|
-
var
|
|
6951
|
-
var
|
|
6950
|
+
var path13 = require("path");
|
|
6951
|
+
var fs5 = require_graceful_fs();
|
|
6952
6952
|
var retry = require_retry2();
|
|
6953
6953
|
var onExit = require_signal_exit();
|
|
6954
6954
|
var mtimePrecision = require_mtime_precision();
|
|
@@ -6958,7 +6958,7 @@ var require_lockfile = __commonJS({
|
|
|
6958
6958
|
}
|
|
6959
6959
|
function resolveCanonicalPath(file2, options, callback) {
|
|
6960
6960
|
if (!options.realpath) {
|
|
6961
|
-
return callback(null,
|
|
6961
|
+
return callback(null, path13.resolve(file2));
|
|
6962
6962
|
}
|
|
6963
6963
|
options.fs.realpath(file2, callback);
|
|
6964
6964
|
}
|
|
@@ -7079,7 +7079,7 @@ var require_lockfile = __commonJS({
|
|
|
7079
7079
|
update: null,
|
|
7080
7080
|
realpath: true,
|
|
7081
7081
|
retries: 0,
|
|
7082
|
-
fs:
|
|
7082
|
+
fs: fs5,
|
|
7083
7083
|
onCompromised: (err) => {
|
|
7084
7084
|
throw err;
|
|
7085
7085
|
},
|
|
@@ -7123,7 +7123,7 @@ var require_lockfile = __commonJS({
|
|
|
7123
7123
|
}
|
|
7124
7124
|
function unlock(file2, options, callback) {
|
|
7125
7125
|
options = {
|
|
7126
|
-
fs:
|
|
7126
|
+
fs: fs5,
|
|
7127
7127
|
realpath: true,
|
|
7128
7128
|
...options
|
|
7129
7129
|
};
|
|
@@ -7145,7 +7145,7 @@ var require_lockfile = __commonJS({
|
|
|
7145
7145
|
options = {
|
|
7146
7146
|
stale: 1e4,
|
|
7147
7147
|
realpath: true,
|
|
7148
|
-
fs:
|
|
7148
|
+
fs: fs5,
|
|
7149
7149
|
...options
|
|
7150
7150
|
};
|
|
7151
7151
|
options.stale = Math.max(options.stale || 0, 2e3);
|
|
@@ -7184,16 +7184,16 @@ var require_lockfile = __commonJS({
|
|
|
7184
7184
|
var require_adapter = __commonJS({
|
|
7185
7185
|
"../../node_modules/.pnpm/proper-lockfile@4.1.2/node_modules/proper-lockfile/lib/adapter.js"(exports2, module2) {
|
|
7186
7186
|
"use strict";
|
|
7187
|
-
var
|
|
7188
|
-
function createSyncFs(
|
|
7187
|
+
var fs5 = require_graceful_fs();
|
|
7188
|
+
function createSyncFs(fs6) {
|
|
7189
7189
|
const methods = ["mkdir", "realpath", "stat", "rmdir", "utimes"];
|
|
7190
|
-
const newFs = { ...
|
|
7190
|
+
const newFs = { ...fs6 };
|
|
7191
7191
|
methods.forEach((method) => {
|
|
7192
7192
|
newFs[method] = (...args) => {
|
|
7193
7193
|
const callback = args.pop();
|
|
7194
7194
|
let ret;
|
|
7195
7195
|
try {
|
|
7196
|
-
ret =
|
|
7196
|
+
ret = fs6[`${method}Sync`](...args);
|
|
7197
7197
|
} catch (err) {
|
|
7198
7198
|
return callback(err);
|
|
7199
7199
|
}
|
|
@@ -7231,7 +7231,7 @@ var require_adapter = __commonJS({
|
|
|
7231
7231
|
}
|
|
7232
7232
|
function toSyncOptions(options) {
|
|
7233
7233
|
options = { ...options };
|
|
7234
|
-
options.fs = createSyncFs(options.fs ||
|
|
7234
|
+
options.fs = createSyncFs(options.fs || fs5);
|
|
7235
7235
|
if (typeof options.retries === "number" && options.retries > 0 || options.retries && typeof options.retries.retries === "number" && options.retries.retries > 0) {
|
|
7236
7236
|
throw Object.assign(new Error("Cannot use retries with the sync api"), { code: "ESYNC" });
|
|
7237
7237
|
}
|
|
@@ -8822,10 +8822,10 @@ var require_segments = __commonJS({
|
|
|
8822
8822
|
const segs = getSegmentsFromString(data, Utils.isKanjiModeEnabled());
|
|
8823
8823
|
const nodes = buildNodes(segs);
|
|
8824
8824
|
const graph = buildGraph(nodes, version2);
|
|
8825
|
-
const
|
|
8825
|
+
const path13 = dijkstra.find_path(graph.map, "start", "end");
|
|
8826
8826
|
const optimizedSegs = [];
|
|
8827
|
-
for (let i = 1; i <
|
|
8828
|
-
optimizedSegs.push(graph.table[
|
|
8827
|
+
for (let i = 1; i < path13.length - 1; i++) {
|
|
8828
|
+
optimizedSegs.push(graph.table[path13[i]].node);
|
|
8829
8829
|
}
|
|
8830
8830
|
return exports2.fromArray(mergeSegments(optimizedSegs));
|
|
8831
8831
|
};
|
|
@@ -11030,10 +11030,10 @@ var require_packer_sync = __commonJS({
|
|
|
11030
11030
|
var require_png_sync = __commonJS({
|
|
11031
11031
|
"../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/png-sync.js"(exports2) {
|
|
11032
11032
|
"use strict";
|
|
11033
|
-
var
|
|
11033
|
+
var parse5 = require_parser_sync();
|
|
11034
11034
|
var pack = require_packer_sync();
|
|
11035
11035
|
exports2.read = function(buffer, options) {
|
|
11036
|
-
return
|
|
11036
|
+
return parse5(buffer, options || {});
|
|
11037
11037
|
};
|
|
11038
11038
|
exports2.write = function(png, options) {
|
|
11039
11039
|
return pack(png, options);
|
|
@@ -11261,7 +11261,7 @@ var require_utils2 = __commonJS({
|
|
|
11261
11261
|
// ../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/png.js
|
|
11262
11262
|
var require_png2 = __commonJS({
|
|
11263
11263
|
"../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/png.js"(exports2) {
|
|
11264
|
-
var
|
|
11264
|
+
var fs5 = require("fs");
|
|
11265
11265
|
var PNG = require_png().PNG;
|
|
11266
11266
|
var Utils = require_utils2();
|
|
11267
11267
|
exports2.render = function render(qrData, options) {
|
|
@@ -11302,7 +11302,7 @@ var require_png2 = __commonJS({
|
|
|
11302
11302
|
});
|
|
11303
11303
|
png.pack();
|
|
11304
11304
|
};
|
|
11305
|
-
exports2.renderToFile = function renderToFile(
|
|
11305
|
+
exports2.renderToFile = function renderToFile(path13, qrData, options, cb) {
|
|
11306
11306
|
if (typeof cb === "undefined") {
|
|
11307
11307
|
cb = options;
|
|
11308
11308
|
options = void 0;
|
|
@@ -11313,7 +11313,7 @@ var require_png2 = __commonJS({
|
|
|
11313
11313
|
called = true;
|
|
11314
11314
|
cb.apply(null, args);
|
|
11315
11315
|
};
|
|
11316
|
-
const stream =
|
|
11316
|
+
const stream = fs5.createWriteStream(path13);
|
|
11317
11317
|
stream.on("error", done);
|
|
11318
11318
|
stream.on("close", done);
|
|
11319
11319
|
exports2.renderToFileStream(stream, qrData, options);
|
|
@@ -11375,14 +11375,14 @@ var require_utf8 = __commonJS({
|
|
|
11375
11375
|
}
|
|
11376
11376
|
return output3;
|
|
11377
11377
|
};
|
|
11378
|
-
exports2.renderToFile = function renderToFile(
|
|
11378
|
+
exports2.renderToFile = function renderToFile(path13, qrData, options, cb) {
|
|
11379
11379
|
if (typeof cb === "undefined") {
|
|
11380
11380
|
cb = options;
|
|
11381
11381
|
options = void 0;
|
|
11382
11382
|
}
|
|
11383
|
-
const
|
|
11383
|
+
const fs5 = require("fs");
|
|
11384
11384
|
const utf8 = exports2.render(qrData, options);
|
|
11385
|
-
|
|
11385
|
+
fs5.writeFile(path13, utf8, cb);
|
|
11386
11386
|
};
|
|
11387
11387
|
}
|
|
11388
11388
|
});
|
|
@@ -11503,7 +11503,7 @@ var require_svg_tag = __commonJS({
|
|
|
11503
11503
|
return str;
|
|
11504
11504
|
}
|
|
11505
11505
|
function qrToPath(data, size, margin) {
|
|
11506
|
-
let
|
|
11506
|
+
let path13 = "";
|
|
11507
11507
|
let moveBy = 0;
|
|
11508
11508
|
let newRow = false;
|
|
11509
11509
|
let lineLength = 0;
|
|
@@ -11514,19 +11514,19 @@ var require_svg_tag = __commonJS({
|
|
|
11514
11514
|
if (data[i]) {
|
|
11515
11515
|
lineLength++;
|
|
11516
11516
|
if (!(i > 0 && col > 0 && data[i - 1])) {
|
|
11517
|
-
|
|
11517
|
+
path13 += newRow ? svgCmd("M", col + margin, 0.5 + row + margin) : svgCmd("m", moveBy, 0);
|
|
11518
11518
|
moveBy = 0;
|
|
11519
11519
|
newRow = false;
|
|
11520
11520
|
}
|
|
11521
11521
|
if (!(col + 1 < size && data[i + 1])) {
|
|
11522
|
-
|
|
11522
|
+
path13 += svgCmd("h", lineLength);
|
|
11523
11523
|
lineLength = 0;
|
|
11524
11524
|
}
|
|
11525
11525
|
} else {
|
|
11526
11526
|
moveBy++;
|
|
11527
11527
|
}
|
|
11528
11528
|
}
|
|
11529
|
-
return
|
|
11529
|
+
return path13;
|
|
11530
11530
|
}
|
|
11531
11531
|
exports2.render = function render(qrData, options, cb) {
|
|
11532
11532
|
const opts = Utils.getOptions(options);
|
|
@@ -11534,10 +11534,10 @@ var require_svg_tag = __commonJS({
|
|
|
11534
11534
|
const data = qrData.modules.data;
|
|
11535
11535
|
const qrcodesize = size + opts.margin * 2;
|
|
11536
11536
|
const bg = !opts.color.light.a ? "" : "<path " + getColorAttrib(opts.color.light, "fill") + ' d="M0 0h' + qrcodesize + "v" + qrcodesize + 'H0z"/>';
|
|
11537
|
-
const
|
|
11537
|
+
const path13 = "<path " + getColorAttrib(opts.color.dark, "stroke") + ' d="' + qrToPath(data, size, opts.margin) + '"/>';
|
|
11538
11538
|
const viewBox = 'viewBox="0 0 ' + qrcodesize + " " + qrcodesize + '"';
|
|
11539
11539
|
const width = !opts.width ? "" : 'width="' + opts.width + '" height="' + opts.width + '" ';
|
|
11540
|
-
const svgTag = '<svg xmlns="http://www.w3.org/2000/svg" ' + width + viewBox + ' shape-rendering="crispEdges">' + bg +
|
|
11540
|
+
const svgTag = '<svg xmlns="http://www.w3.org/2000/svg" ' + width + viewBox + ' shape-rendering="crispEdges">' + bg + path13 + "</svg>\n";
|
|
11541
11541
|
if (typeof cb === "function") {
|
|
11542
11542
|
cb(null, svgTag);
|
|
11543
11543
|
}
|
|
@@ -11551,15 +11551,15 @@ var require_svg = __commonJS({
|
|
|
11551
11551
|
"../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg.js"(exports2) {
|
|
11552
11552
|
var svgTagRenderer = require_svg_tag();
|
|
11553
11553
|
exports2.render = svgTagRenderer.render;
|
|
11554
|
-
exports2.renderToFile = function renderToFile(
|
|
11554
|
+
exports2.renderToFile = function renderToFile(path13, qrData, options, cb) {
|
|
11555
11555
|
if (typeof cb === "undefined") {
|
|
11556
11556
|
cb = options;
|
|
11557
11557
|
options = void 0;
|
|
11558
11558
|
}
|
|
11559
|
-
const
|
|
11559
|
+
const fs5 = require("fs");
|
|
11560
11560
|
const svgTag = exports2.render(qrData, options);
|
|
11561
11561
|
const xmlStr = '<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">' + svgTag;
|
|
11562
|
-
|
|
11562
|
+
fs5.writeFile(path13, xmlStr, cb);
|
|
11563
11563
|
};
|
|
11564
11564
|
}
|
|
11565
11565
|
});
|
|
@@ -11717,8 +11717,8 @@ var require_server = __commonJS({
|
|
|
11717
11717
|
cb
|
|
11718
11718
|
};
|
|
11719
11719
|
}
|
|
11720
|
-
function getTypeFromFilename(
|
|
11721
|
-
return
|
|
11720
|
+
function getTypeFromFilename(path13) {
|
|
11721
|
+
return path13.slice((path13.lastIndexOf(".") - 1 >>> 0) + 2).toLowerCase();
|
|
11722
11722
|
}
|
|
11723
11723
|
function getRendererFromType(type) {
|
|
11724
11724
|
switch (type) {
|
|
@@ -11782,17 +11782,17 @@ var require_server = __commonJS({
|
|
|
11782
11782
|
const renderer = getRendererFromType(params.opts.type);
|
|
11783
11783
|
return render(renderer.renderToBuffer, text, params);
|
|
11784
11784
|
};
|
|
11785
|
-
exports2.toFile = function toFile(
|
|
11786
|
-
if (typeof
|
|
11785
|
+
exports2.toFile = function toFile(path13, text, opts, cb) {
|
|
11786
|
+
if (typeof path13 !== "string" || !(typeof text === "string" || typeof text === "object")) {
|
|
11787
11787
|
throw new Error("Invalid argument");
|
|
11788
11788
|
}
|
|
11789
11789
|
if (arguments.length < 3 && !canPromise()) {
|
|
11790
11790
|
throw new Error("Too few arguments provided");
|
|
11791
11791
|
}
|
|
11792
11792
|
const params = checkParams(text, opts, cb);
|
|
11793
|
-
const type = params.opts.type || getTypeFromFilename(
|
|
11793
|
+
const type = params.opts.type || getTypeFromFilename(path13);
|
|
11794
11794
|
const renderer = getRendererFromType(type);
|
|
11795
|
-
const renderToFile = renderer.renderToFile.bind(null,
|
|
11795
|
+
const renderToFile = renderer.renderToFile.bind(null, path13);
|
|
11796
11796
|
return render(renderToFile, text, params);
|
|
11797
11797
|
};
|
|
11798
11798
|
exports2.toFileStream = function toFileStream(stream, text, opts) {
|
|
@@ -15010,8 +15010,8 @@ var require_utils3 = __commonJS({
|
|
|
15010
15010
|
}
|
|
15011
15011
|
return ind;
|
|
15012
15012
|
}
|
|
15013
|
-
function removeDotSegments(
|
|
15014
|
-
let input =
|
|
15013
|
+
function removeDotSegments(path13) {
|
|
15014
|
+
let input = path13;
|
|
15015
15015
|
const output3 = [];
|
|
15016
15016
|
let nextSlash = -1;
|
|
15017
15017
|
let len = 0;
|
|
@@ -15263,8 +15263,8 @@ var require_schemes = __commonJS({
|
|
|
15263
15263
|
wsComponent.secure = void 0;
|
|
15264
15264
|
}
|
|
15265
15265
|
if (wsComponent.resourceName) {
|
|
15266
|
-
const [
|
|
15267
|
-
wsComponent.path =
|
|
15266
|
+
const [path13, query] = wsComponent.resourceName.split("?");
|
|
15267
|
+
wsComponent.path = path13 && path13 !== "/" ? path13 : void 0;
|
|
15268
15268
|
wsComponent.query = query;
|
|
15269
15269
|
wsComponent.resourceName = void 0;
|
|
15270
15270
|
}
|
|
@@ -15419,21 +15419,21 @@ var require_fast_uri = __commonJS({
|
|
|
15419
15419
|
normalizeString(uri, options);
|
|
15420
15420
|
} else if (typeof uri === "object") {
|
|
15421
15421
|
uri = /** @type {T} */
|
|
15422
|
-
|
|
15422
|
+
parse5(serialize(uri, options), options);
|
|
15423
15423
|
}
|
|
15424
15424
|
return uri;
|
|
15425
15425
|
}
|
|
15426
15426
|
function resolve(baseURI, relativeURI, options) {
|
|
15427
15427
|
const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
|
|
15428
|
-
const resolved = resolveComponent(
|
|
15428
|
+
const resolved = resolveComponent(parse5(baseURI, schemelessOptions), parse5(relativeURI, schemelessOptions), schemelessOptions, true);
|
|
15429
15429
|
schemelessOptions.skipEscape = true;
|
|
15430
15430
|
return serialize(resolved, schemelessOptions);
|
|
15431
15431
|
}
|
|
15432
15432
|
function resolveComponent(base, relative, options, skipNormalization) {
|
|
15433
15433
|
const target = {};
|
|
15434
15434
|
if (!skipNormalization) {
|
|
15435
|
-
base =
|
|
15436
|
-
relative =
|
|
15435
|
+
base = parse5(serialize(base, options), options);
|
|
15436
|
+
relative = parse5(serialize(relative, options), options);
|
|
15437
15437
|
}
|
|
15438
15438
|
options = options || {};
|
|
15439
15439
|
if (!options.tolerant && relative.scheme) {
|
|
@@ -15656,7 +15656,7 @@ var require_fast_uri = __commonJS({
|
|
|
15656
15656
|
}
|
|
15657
15657
|
return { parsed, malformedAuthorityOrPort };
|
|
15658
15658
|
}
|
|
15659
|
-
function
|
|
15659
|
+
function parse5(uri, opts) {
|
|
15660
15660
|
return parseWithStatus(uri, opts).parsed;
|
|
15661
15661
|
}
|
|
15662
15662
|
function normalizeString(uri, opts) {
|
|
@@ -15685,7 +15685,7 @@ var require_fast_uri = __commonJS({
|
|
|
15685
15685
|
resolveComponent,
|
|
15686
15686
|
equal,
|
|
15687
15687
|
serialize,
|
|
15688
|
-
parse:
|
|
15688
|
+
parse: parse5
|
|
15689
15689
|
};
|
|
15690
15690
|
module2.exports = fastUri;
|
|
15691
15691
|
module2.exports.default = fastUri;
|
|
@@ -18657,12 +18657,12 @@ var require_dist = __commonJS({
|
|
|
18657
18657
|
throw new Error(`Unknown format "${name}"`);
|
|
18658
18658
|
return f;
|
|
18659
18659
|
};
|
|
18660
|
-
function addFormats(ajv, list,
|
|
18660
|
+
function addFormats(ajv, list, fs5, exportName) {
|
|
18661
18661
|
var _a3;
|
|
18662
18662
|
var _b;
|
|
18663
18663
|
(_a3 = (_b = ajv.opts.code).formats) !== null && _a3 !== void 0 ? _a3 : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
|
|
18664
18664
|
for (const f of list)
|
|
18665
|
-
ajv.addFormat(f,
|
|
18665
|
+
ajv.addFormat(f, fs5[f]);
|
|
18666
18666
|
}
|
|
18667
18667
|
module2.exports = exports2 = formatsPlugin;
|
|
18668
18668
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -18671,11 +18671,11 @@ var require_dist = __commonJS({
|
|
|
18671
18671
|
});
|
|
18672
18672
|
|
|
18673
18673
|
// src/bin.ts
|
|
18674
|
-
var
|
|
18674
|
+
var import_node_path19 = __toESM(require("node:path"), 1);
|
|
18675
18675
|
var import_node_child_process7 = require("node:child_process");
|
|
18676
18676
|
var import_node_fs13 = require("node:fs");
|
|
18677
|
-
var
|
|
18678
|
-
var
|
|
18677
|
+
var import_node_os10 = require("node:os");
|
|
18678
|
+
var import_node_path20 = __toESM(require("node:path"), 1);
|
|
18679
18679
|
|
|
18680
18680
|
// src/install-codex.ts
|
|
18681
18681
|
var import_promises = __toESM(require("node:fs/promises"), 1);
|
|
@@ -20073,10 +20073,10 @@ function mergeDefs(...defs) {
|
|
|
20073
20073
|
function cloneDef(schema) {
|
|
20074
20074
|
return mergeDefs(schema._zod.def);
|
|
20075
20075
|
}
|
|
20076
|
-
function getElementAtPath(obj,
|
|
20077
|
-
if (!
|
|
20076
|
+
function getElementAtPath(obj, path13) {
|
|
20077
|
+
if (!path13)
|
|
20078
20078
|
return obj;
|
|
20079
|
-
return
|
|
20079
|
+
return path13.reduce((acc, key) => acc?.[key], obj);
|
|
20080
20080
|
}
|
|
20081
20081
|
function promiseAllObject(promisesObj) {
|
|
20082
20082
|
const keys = Object.keys(promisesObj);
|
|
@@ -20485,11 +20485,11 @@ function explicitlyAborted(x, startIndex = 0) {
|
|
|
20485
20485
|
}
|
|
20486
20486
|
return false;
|
|
20487
20487
|
}
|
|
20488
|
-
function prefixIssues(
|
|
20488
|
+
function prefixIssues(path13, issues) {
|
|
20489
20489
|
return issues.map((iss) => {
|
|
20490
20490
|
var _a3;
|
|
20491
20491
|
(_a3 = iss).path ?? (_a3.path = []);
|
|
20492
|
-
iss.path.unshift(
|
|
20492
|
+
iss.path.unshift(path13);
|
|
20493
20493
|
return iss;
|
|
20494
20494
|
});
|
|
20495
20495
|
}
|
|
@@ -20636,16 +20636,16 @@ function flattenError(error51, mapper = (issue2) => issue2.message) {
|
|
|
20636
20636
|
}
|
|
20637
20637
|
function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
20638
20638
|
const fieldErrors = { _errors: [] };
|
|
20639
|
-
const processError = (error52,
|
|
20639
|
+
const processError = (error52, path13 = []) => {
|
|
20640
20640
|
for (const issue2 of error52.issues) {
|
|
20641
20641
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
20642
|
-
issue2.errors.map((issues) => processError({ issues }, [...
|
|
20642
|
+
issue2.errors.map((issues) => processError({ issues }, [...path13, ...issue2.path]));
|
|
20643
20643
|
} else if (issue2.code === "invalid_key") {
|
|
20644
|
-
processError({ issues: issue2.issues }, [...
|
|
20644
|
+
processError({ issues: issue2.issues }, [...path13, ...issue2.path]);
|
|
20645
20645
|
} else if (issue2.code === "invalid_element") {
|
|
20646
|
-
processError({ issues: issue2.issues }, [...
|
|
20646
|
+
processError({ issues: issue2.issues }, [...path13, ...issue2.path]);
|
|
20647
20647
|
} else {
|
|
20648
|
-
const fullpath = [...
|
|
20648
|
+
const fullpath = [...path13, ...issue2.path];
|
|
20649
20649
|
if (fullpath.length === 0) {
|
|
20650
20650
|
fieldErrors._errors.push(mapper(issue2));
|
|
20651
20651
|
} else {
|
|
@@ -20672,17 +20672,17 @@ function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
|
20672
20672
|
}
|
|
20673
20673
|
function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
20674
20674
|
const result = { errors: [] };
|
|
20675
|
-
const processError = (error52,
|
|
20675
|
+
const processError = (error52, path13 = []) => {
|
|
20676
20676
|
var _a3, _b;
|
|
20677
20677
|
for (const issue2 of error52.issues) {
|
|
20678
20678
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
20679
|
-
issue2.errors.map((issues) => processError({ issues }, [...
|
|
20679
|
+
issue2.errors.map((issues) => processError({ issues }, [...path13, ...issue2.path]));
|
|
20680
20680
|
} else if (issue2.code === "invalid_key") {
|
|
20681
|
-
processError({ issues: issue2.issues }, [...
|
|
20681
|
+
processError({ issues: issue2.issues }, [...path13, ...issue2.path]);
|
|
20682
20682
|
} else if (issue2.code === "invalid_element") {
|
|
20683
|
-
processError({ issues: issue2.issues }, [...
|
|
20683
|
+
processError({ issues: issue2.issues }, [...path13, ...issue2.path]);
|
|
20684
20684
|
} else {
|
|
20685
|
-
const fullpath = [...
|
|
20685
|
+
const fullpath = [...path13, ...issue2.path];
|
|
20686
20686
|
if (fullpath.length === 0) {
|
|
20687
20687
|
result.errors.push(mapper(issue2));
|
|
20688
20688
|
continue;
|
|
@@ -20714,8 +20714,8 @@ function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
|
20714
20714
|
}
|
|
20715
20715
|
function toDotPath(_path) {
|
|
20716
20716
|
const segs = [];
|
|
20717
|
-
const
|
|
20718
|
-
for (const seg of
|
|
20717
|
+
const path13 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
|
|
20718
|
+
for (const seg of path13) {
|
|
20719
20719
|
if (typeof seg === "number")
|
|
20720
20720
|
segs.push(`[${seg}]`);
|
|
20721
20721
|
else if (typeof seg === "symbol")
|
|
@@ -33407,13 +33407,13 @@ function resolveRef(ref, ctx) {
|
|
|
33407
33407
|
if (!ref.startsWith("#")) {
|
|
33408
33408
|
throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
|
|
33409
33409
|
}
|
|
33410
|
-
const
|
|
33411
|
-
if (
|
|
33410
|
+
const path13 = ref.slice(1).split("/").filter(Boolean);
|
|
33411
|
+
if (path13.length === 0) {
|
|
33412
33412
|
return ctx.rootSchema;
|
|
33413
33413
|
}
|
|
33414
33414
|
const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
|
|
33415
|
-
if (
|
|
33416
|
-
const key =
|
|
33415
|
+
if (path13[0] === defsKey) {
|
|
33416
|
+
const key = path13[1];
|
|
33417
33417
|
if (!key || !ctx.defs[key]) {
|
|
33418
33418
|
throw new Error(`Reference not found: ${ref}`);
|
|
33419
33419
|
}
|
|
@@ -34055,6 +34055,11 @@ var mrrlinTaskIdSchema = external_exports.string().regex(/^GT-\d+$/);
|
|
|
34055
34055
|
var mrrlinPlanIdSchema = external_exports.string().regex(/^PL-\d+$/);
|
|
34056
34056
|
var mrrlinWikiPageIdSchema = external_exports.string().regex(/^WK-\d+$/);
|
|
34057
34057
|
var mrrlinWikiPagePathSchema = external_exports.string().regex(/^\/[a-z0-9-]+\/[a-z0-9-]+$/);
|
|
34058
|
+
var PROJECT_CONSTITUTION_PAGE = {
|
|
34059
|
+
folder: "Memory",
|
|
34060
|
+
path: "/memory/constitution",
|
|
34061
|
+
title: "Project Constitution"
|
|
34062
|
+
};
|
|
34058
34063
|
var mrrlinExecutionRunIdSchema = external_exports.string().regex(/^ER-[A-Za-z0-9-]+$/);
|
|
34059
34064
|
var mrrlinExecutionArtifactIdSchema = external_exports.string().regex(/^EA-[A-Za-z0-9-]+$/);
|
|
34060
34065
|
var mrrlinProjectSlugSchema = external_exports.string().min(1);
|
|
@@ -35030,18 +35035,18 @@ function createMrrlinClient(config2) {
|
|
|
35030
35035
|
const customFetch = config2.fetch ?? globalThis.fetch;
|
|
35031
35036
|
const baseUrl = config2.baseUrl.replace(/\/$/, "");
|
|
35032
35037
|
const token = config2.token;
|
|
35033
|
-
async function request(
|
|
35038
|
+
async function request(path13, init) {
|
|
35034
35039
|
const method = init?.method ?? "GET";
|
|
35035
35040
|
const headers = new Headers(init?.headers ?? {});
|
|
35036
35041
|
if (token && !headers.has("authorization")) {
|
|
35037
35042
|
headers.set("authorization", `Bearer ${token}`);
|
|
35038
35043
|
}
|
|
35039
|
-
const response = await customFetch(`${baseUrl}${
|
|
35044
|
+
const response = await customFetch(`${baseUrl}${path13}`, { ...init, headers });
|
|
35040
35045
|
if (!response.ok) {
|
|
35041
35046
|
const body = await response.text();
|
|
35042
35047
|
let code = `HTTP_${response.status}`;
|
|
35043
35048
|
let violations = null;
|
|
35044
|
-
let message = `Mrrlin API ${method} ${
|
|
35049
|
+
let message = `Mrrlin API ${method} ${path13} failed: ${response.status}`;
|
|
35045
35050
|
try {
|
|
35046
35051
|
const parsed = JSON.parse(body);
|
|
35047
35052
|
const violationsParsed = apiViolationsErrorSchema.safeParse(parsed);
|
|
@@ -35061,7 +35066,7 @@ function createMrrlinClient(config2) {
|
|
|
35061
35066
|
throw new MrrlinApiError({
|
|
35062
35067
|
code,
|
|
35063
35068
|
method,
|
|
35064
|
-
path:
|
|
35069
|
+
path: path13,
|
|
35065
35070
|
responseBody: body,
|
|
35066
35071
|
status: response.status,
|
|
35067
35072
|
violations,
|
|
@@ -35312,7 +35317,7 @@ function createMrrlinClient(config2) {
|
|
|
35312
35317
|
return taskEventListResponseSchema.parse(body).data;
|
|
35313
35318
|
},
|
|
35314
35319
|
async listTasks(projectSlug, filters = {}) {
|
|
35315
|
-
const
|
|
35320
|
+
const path13 = appendQuery(`${projectPath(projectSlug)}/tasks`, {
|
|
35316
35321
|
assignee: filters.assignee,
|
|
35317
35322
|
autonomyLevel: filters.autonomyLevel,
|
|
35318
35323
|
blockedBy: filters.blockedBy,
|
|
@@ -35324,7 +35329,7 @@ function createMrrlinClient(config2) {
|
|
|
35324
35329
|
subcategory: filters.subcategory,
|
|
35325
35330
|
type: filters.type
|
|
35326
35331
|
});
|
|
35327
|
-
const body = await request(
|
|
35332
|
+
const body = await request(path13);
|
|
35328
35333
|
return taskListResponseSchema.parse(body).data;
|
|
35329
35334
|
},
|
|
35330
35335
|
async listTaxonomy(projectSlug) {
|
|
@@ -35332,22 +35337,22 @@ function createMrrlinClient(config2) {
|
|
|
35332
35337
|
return taxonomyListResponseSchema.parse(body).data;
|
|
35333
35338
|
},
|
|
35334
35339
|
async listWikiPages(projectSlug, filters = {}) {
|
|
35335
|
-
const
|
|
35340
|
+
const path13 = appendQuery(`${projectPath(projectSlug)}/wiki`, {
|
|
35336
35341
|
folder: filters.folder,
|
|
35337
35342
|
q: filters.q,
|
|
35338
35343
|
taskId: filters.taskId
|
|
35339
35344
|
});
|
|
35340
|
-
const body = await request(
|
|
35345
|
+
const body = await request(path13);
|
|
35341
35346
|
return wikiPageListResponseSchema.parse(body).data;
|
|
35342
35347
|
},
|
|
35343
35348
|
async searchWikiPages(projectSlug, query) {
|
|
35344
|
-
const
|
|
35349
|
+
const path13 = appendQuery(`${projectPath(projectSlug)}/wiki/search`, {
|
|
35345
35350
|
folder: query.folder,
|
|
35346
35351
|
limit: query.limit === void 0 ? void 0 : String(query.limit),
|
|
35347
35352
|
pathPrefix: query.pathPrefix,
|
|
35348
35353
|
q: query.q
|
|
35349
35354
|
});
|
|
35350
|
-
const body = await request(
|
|
35355
|
+
const body = await request(path13);
|
|
35351
35356
|
return wikiPageSearchResponseSchema.parse(body).data;
|
|
35352
35357
|
},
|
|
35353
35358
|
async updatePlan(projectSlug, planId, patch) {
|
|
@@ -40656,9 +40661,9 @@ var DirectorRelay = class {
|
|
|
40656
40661
|
|
|
40657
40662
|
// src/remote-phone-relay.ts
|
|
40658
40663
|
function loadOrCreateAgentDeviceKey() {
|
|
40659
|
-
const
|
|
40664
|
+
const path13 = (0, import_node_path7.join)((0, import_node_os5.homedir)(), ".mrrlin", "agent-device-key");
|
|
40660
40665
|
try {
|
|
40661
|
-
const raw = JSON.parse((0, import_node_fs6.readFileSync)(
|
|
40666
|
+
const raw = JSON.parse((0, import_node_fs6.readFileSync)(path13, "utf8"));
|
|
40662
40667
|
if (typeof raw.priv === "string" && typeof raw.pub === "string") {
|
|
40663
40668
|
return { privateKey: fromBase64Url(raw.priv), publicKey: fromBase64Url(raw.pub) };
|
|
40664
40669
|
}
|
|
@@ -40668,7 +40673,7 @@ function loadOrCreateAgentDeviceKey() {
|
|
|
40668
40673
|
try {
|
|
40669
40674
|
(0, import_node_fs6.mkdirSync)((0, import_node_path7.join)((0, import_node_os5.homedir)(), ".mrrlin"), { recursive: true });
|
|
40670
40675
|
(0, import_node_fs6.writeFileSync)(
|
|
40671
|
-
|
|
40676
|
+
path13,
|
|
40672
40677
|
JSON.stringify({ priv: toBase64Url(kp.privateKey), pub: toBase64Url(kp.publicKey) }),
|
|
40673
40678
|
{ mode: 384 }
|
|
40674
40679
|
);
|
|
@@ -40883,9 +40888,9 @@ var CheckoutRegistry = class {
|
|
|
40883
40888
|
get(slug) {
|
|
40884
40889
|
return this.read()[slug] ?? null;
|
|
40885
40890
|
}
|
|
40886
|
-
confirm(slug,
|
|
40891
|
+
confirm(slug, path13, now) {
|
|
40887
40892
|
const all = this.read();
|
|
40888
|
-
all[slug] = { path:
|
|
40893
|
+
all[slug] = { path: path13, confirmedAt: now };
|
|
40889
40894
|
(0, import_node_fs7.writeFileSync)(this.file, JSON.stringify(all, null, 2));
|
|
40890
40895
|
}
|
|
40891
40896
|
};
|
|
@@ -41029,7 +41034,7 @@ function writeExecutorCodexHome(scratchDir, opts) {
|
|
|
41029
41034
|
'[permissions.executor.filesystem.":workspace_roots"]',
|
|
41030
41035
|
'"**/.env*" = "deny"'
|
|
41031
41036
|
].join("\n");
|
|
41032
|
-
const
|
|
41037
|
+
const toml3 = [
|
|
41033
41038
|
'default_permissions = "executor"',
|
|
41034
41039
|
"",
|
|
41035
41040
|
"[permissions.executor]",
|
|
@@ -41044,7 +41049,7 @@ function writeExecutorCodexHome(scratchDir, opts) {
|
|
|
41044
41049
|
networkSection,
|
|
41045
41050
|
""
|
|
41046
41051
|
].join("\n");
|
|
41047
|
-
(0, import_node_fs9.writeFileSync)((0, import_node_path10.join)(codexHome, "config.toml"),
|
|
41052
|
+
(0, import_node_fs9.writeFileSync)((0, import_node_path10.join)(codexHome, "config.toml"), toml3, "utf8");
|
|
41048
41053
|
return codexHome;
|
|
41049
41054
|
}
|
|
41050
41055
|
async function startExecutorServer(opts) {
|
|
@@ -41451,12 +41456,40 @@ function buildThreadStartParams(msg, config2, desiredModel) {
|
|
|
41451
41456
|
"- When the operator answers in chat, write the answer into the Specs/{taskId}",
|
|
41452
41457
|
' Clarifications section, then `decide_inbox_item` the question with `verdict="acknowledged"`',
|
|
41453
41458
|
" and `answer` = the resolved answer.",
|
|
41459
|
+
"- Project-level ambiguity (scope or direction not yet tied to a specific task) MAY be banked",
|
|
41460
|
+
" the same way but with `taskId` OMITTED. There is no spec page yet, so incorporate the answer",
|
|
41461
|
+
" into your current scoping/conversation. Reserve taskless questions for genuine project-level",
|
|
41462
|
+
" scope \u2014 task-affecting questions still set `taskId`.",
|
|
41463
|
+
"- Binding taskless answers to a task: WHEN you create a task out of project-level scoping,",
|
|
41464
|
+
" call `list_inbox_items` (kind=question), fold any relevant `acknowledged` TASKLESS answer",
|
|
41465
|
+
" into the new task's Specs/{id} Clarifications, and `reject` (with a reason) any taskless",
|
|
41466
|
+
" question the new task makes moot \u2014 so taskless answers never linger unconsumed.",
|
|
41454
41467
|
"- When resuming a task, call `list_inbox_items` (kind=question) and incorporate any",
|
|
41455
41468
|
" `acknowledged` answer not yet reflected in the spec's Clarifications section.",
|
|
41456
41469
|
"- If a question becomes moot (task cancelled, superseded, or no longer relevant), close it",
|
|
41457
41470
|
' with `decide_inbox_item` `verdict="rejected"` + a `reason`; never leave it pending.',
|
|
41458
41471
|
"- Questions are a chat-only mechanism. Do not create question items from non-interactive",
|
|
41459
|
-
" runs; use the handoff contract above when there is no live operator."
|
|
41472
|
+
" runs; use the handoff contract above when there is no live operator.",
|
|
41473
|
+
"",
|
|
41474
|
+
"Onboarding contract \u2014 seed project context when there is none:",
|
|
41475
|
+
`- A project is un-onboarded when it has no \`${PROJECT_CONSTITUTION_PAGE.path}\` wiki page.`,
|
|
41476
|
+
" Run onboarding when the operator initiates it (the overview onboarding CTA seeds a kickoff,",
|
|
41477
|
+
" or they explicitly ask to set up the project), OR when a request clearly needs missing",
|
|
41478
|
+
" project context \u2014 in which case OFFER to onboard once. Do NOT turn every turn on an",
|
|
41479
|
+
" un-onboarded project into an interrogation.",
|
|
41480
|
+
"- Gather context by asking a focused set of high-value questions: what the project/product",
|
|
41481
|
+
" is; primary goal/outcome; domain or URL; target audience; key constraints; how success is",
|
|
41482
|
+
" measured; current state. Ask ~5-7 \u2014 gather, don't interrogate.",
|
|
41483
|
+
`- Write the answers into a wiki page at path \`${PROJECT_CONSTITUTION_PAGE.path}\` (folder`,
|
|
41484
|
+
` \`${PROJECT_CONSTITUTION_PAGE.folder}\`, title \`${PROJECT_CONSTITUTION_PAGE.title}\`) via`,
|
|
41485
|
+
" `create_wiki_page` if it does not exist yet, else `update_wiki_page` \u2014 never create a",
|
|
41486
|
+
" duplicate. Seed it once you have a meaningful answer or two, then keep extending it.",
|
|
41487
|
+
"- These onboarding questions are ordinary TASKLESS `question` inbox items: follow the",
|
|
41488
|
+
" clarifying-question contract above \u2014 when answered, write it into the constitution page AND",
|
|
41489
|
+
' close the item with `decide_inbox_item` `verdict="acknowledged"` + `answer`; `reject` (with',
|
|
41490
|
+
" a reason) any that become moot. Never leave stale pending onboarding questions.",
|
|
41491
|
+
"- v1 captures the domain as prose in the constitution page (no structured domain field, no",
|
|
41492
|
+
" web research) \u2014 just record what the operator tells you."
|
|
41460
41493
|
].join("\n");
|
|
41461
41494
|
return {
|
|
41462
41495
|
// No project checkout for this turn → run in a dedicated EMPTY scratch dir, never the bridge's own
|
|
@@ -48455,6 +48488,10 @@ function installService(deps) {
|
|
|
48455
48488
|
deps.log("Could not resolve absolute paths for node/codex/mrrlin-mcp on PATH. Install them or fix PATH.");
|
|
48456
48489
|
return { ok: false };
|
|
48457
48490
|
}
|
|
48491
|
+
if (!deps.which("pm2")) {
|
|
48492
|
+
deps.log("pm2 not found on PATH. Install it first: npm i -g pm2");
|
|
48493
|
+
return { ok: false };
|
|
48494
|
+
}
|
|
48458
48495
|
const resolvedBins = bins.filter((b) => b !== null);
|
|
48459
48496
|
const pathEnv = Array.from(new Set(resolvedBins.map((b) => import_node_path17.default.dirname(b)))).join(":");
|
|
48460
48497
|
const text = renderEcosystemConfig({
|
|
@@ -48494,6 +48531,53 @@ function uninstallService(deps) {
|
|
|
48494
48531
|
return { ok: true };
|
|
48495
48532
|
}
|
|
48496
48533
|
|
|
48534
|
+
// src/uninstall-codex.ts
|
|
48535
|
+
var import_promises4 = __toESM(require("node:fs/promises"), 1);
|
|
48536
|
+
var import_node_os9 = __toESM(require("node:os"), 1);
|
|
48537
|
+
var import_node_path18 = __toESM(require("node:path"), 1);
|
|
48538
|
+
var toml2 = __toESM(require_toml(), 1);
|
|
48539
|
+
function resolveCodexHome2(options) {
|
|
48540
|
+
if (options.codexHome) return options.codexHome;
|
|
48541
|
+
if (process.env.CODEX_HOME) return process.env.CODEX_HOME;
|
|
48542
|
+
return import_node_path18.default.join(options.homeDir ?? import_node_os9.default.homedir(), ".codex");
|
|
48543
|
+
}
|
|
48544
|
+
async function pathExists3(target) {
|
|
48545
|
+
try {
|
|
48546
|
+
await import_promises4.default.access(target);
|
|
48547
|
+
return true;
|
|
48548
|
+
} catch {
|
|
48549
|
+
return false;
|
|
48550
|
+
}
|
|
48551
|
+
}
|
|
48552
|
+
var MRRLIN_BLOCK_RE2 = /(^|\n)\[mcp_servers\.mrrlin(?:\]|\.[^\]\n]*\])[\s\S]*?(?=\n\[|$)/g;
|
|
48553
|
+
async function uninstallCodex(options = {}) {
|
|
48554
|
+
const codexHome = resolveCodexHome2(options);
|
|
48555
|
+
const configPath = import_node_path18.default.join(codexHome, "config.toml");
|
|
48556
|
+
if (!await pathExists3(configPath)) {
|
|
48557
|
+
return { action: "missing", configPath };
|
|
48558
|
+
}
|
|
48559
|
+
const realPath = await import_promises4.default.realpath(configPath).catch(() => configPath);
|
|
48560
|
+
const existing = await import_promises4.default.readFile(realPath, "utf8");
|
|
48561
|
+
let parsed = null;
|
|
48562
|
+
try {
|
|
48563
|
+
parsed = toml2.parse(existing);
|
|
48564
|
+
} catch (error51) {
|
|
48565
|
+
const detail = error51 instanceof Error ? error51.message : String(error51);
|
|
48566
|
+
const err = {
|
|
48567
|
+
code: "CODEX_CONFIG_PARSE_FAILED",
|
|
48568
|
+
configPath: realPath,
|
|
48569
|
+
detail: `Refusing to edit a config.toml we cannot parse: ${detail}`
|
|
48570
|
+
};
|
|
48571
|
+
throw Object.assign(new Error(err.detail), err);
|
|
48572
|
+
}
|
|
48573
|
+
if (parsed?.mcp_servers?.["mrrlin"] === void 0) {
|
|
48574
|
+
return { action: "noop", configPath: realPath };
|
|
48575
|
+
}
|
|
48576
|
+
const stripped = existing.replace(MRRLIN_BLOCK_RE2, (match) => match.startsWith("\n") ? "\n" : "").replace(/\n{3,}/g, "\n\n").replace(/^\n+/, "");
|
|
48577
|
+
await import_promises4.default.writeFile(realPath, stripped, { mode: 384 });
|
|
48578
|
+
return { action: "removed", configPath: realPath };
|
|
48579
|
+
}
|
|
48580
|
+
|
|
48497
48581
|
// src/bin.ts
|
|
48498
48582
|
function pm2Runner(args) {
|
|
48499
48583
|
const r = (0, import_node_child_process7.spawnSync)("pm2", args, { encoding: "utf8" });
|
|
@@ -48590,6 +48674,16 @@ Usage:
|
|
|
48590
48674
|
active server-side; revoke it in Settings to
|
|
48591
48675
|
fully retire it.
|
|
48592
48676
|
|
|
48677
|
+
mrrlin-mcp uninstall Full teardown of Mrrlin's local footprint:
|
|
48678
|
+
the pm2 service, the [mcp_servers.mrrlin] block
|
|
48679
|
+
in ~/.codex/config.toml (other servers untouched),
|
|
48680
|
+
and the whole ~/.mrrlin dir (credential, token,
|
|
48681
|
+
bridge/worker state). Then prints the two steps
|
|
48682
|
+
it cannot do for you: 'npm uninstall -g
|
|
48683
|
+
@mrrlin-dev/mcp' (a process can't delete its own
|
|
48684
|
+
binary) and the Settings credential revoke. Leaves
|
|
48685
|
+
global pm2 alone (it may be used elsewhere).
|
|
48686
|
+
|
|
48593
48687
|
mrrlin-mcp --help Show this help.
|
|
48594
48688
|
|
|
48595
48689
|
Operator notes:
|
|
@@ -48635,7 +48729,7 @@ async function main() {
|
|
|
48635
48729
|
env: process.env,
|
|
48636
48730
|
cwd: process.cwd(),
|
|
48637
48731
|
writeFile: (p, c) => {
|
|
48638
|
-
(0, import_node_fs13.mkdirSync)(
|
|
48732
|
+
(0, import_node_fs13.mkdirSync)(import_node_path20.default.dirname(p), { recursive: true, mode: 448 });
|
|
48639
48733
|
(0, import_node_fs13.writeFileSync)(p, c, { mode: 384 });
|
|
48640
48734
|
},
|
|
48641
48735
|
runPm2: pm2Runner,
|
|
@@ -48660,12 +48754,76 @@ async function main() {
|
|
|
48660
48754
|
purgeSecret: purge,
|
|
48661
48755
|
secretPath: agentCredentialPath(),
|
|
48662
48756
|
tokenPath: operatorTokenPath(),
|
|
48663
|
-
ecoPath:
|
|
48757
|
+
ecoPath: import_node_path20.default.join(process.env.HOME ?? (0, import_node_os10.homedir)(), ".mrrlin", "ecosystem.config.cjs"),
|
|
48664
48758
|
log: (m) => process.stderr.write(`[mrrlin-mcp uninstall-service] ${m}
|
|
48665
48759
|
`)
|
|
48666
48760
|
});
|
|
48667
48761
|
return;
|
|
48668
48762
|
}
|
|
48763
|
+
case "uninstall": {
|
|
48764
|
+
const home = process.env.HOME ?? (0, import_node_os10.homedir)();
|
|
48765
|
+
const log = (m) => process.stderr.write(`[mrrlin-mcp uninstall] ${m}
|
|
48766
|
+
`);
|
|
48767
|
+
uninstallService({
|
|
48768
|
+
runPm2: (a) => ({ code: pm2Runner(a).code }),
|
|
48769
|
+
removeFile: (p) => {
|
|
48770
|
+
try {
|
|
48771
|
+
(0, import_node_fs13.rmSync)(p, { force: true });
|
|
48772
|
+
} catch {
|
|
48773
|
+
}
|
|
48774
|
+
},
|
|
48775
|
+
purgeSecret: true,
|
|
48776
|
+
secretPath: agentCredentialPath(),
|
|
48777
|
+
tokenPath: operatorTokenPath(),
|
|
48778
|
+
ecoPath: import_node_path20.default.join(home, ".mrrlin", "ecosystem.config.cjs"),
|
|
48779
|
+
log
|
|
48780
|
+
});
|
|
48781
|
+
let codexOk = true;
|
|
48782
|
+
let codexConfigPath = "~/.codex/config.toml";
|
|
48783
|
+
try {
|
|
48784
|
+
const res = await uninstallCodex({});
|
|
48785
|
+
codexConfigPath = res.configPath;
|
|
48786
|
+
log(`codex config: ${res.action} (${res.configPath})`);
|
|
48787
|
+
} catch (error51) {
|
|
48788
|
+
codexOk = false;
|
|
48789
|
+
if (error51 && typeof error51 === "object" && typeof error51.configPath === "string") {
|
|
48790
|
+
codexConfigPath = error51.configPath;
|
|
48791
|
+
}
|
|
48792
|
+
log(`codex config NOT modified: ${error51 instanceof Error ? error51.message : String(error51)}`);
|
|
48793
|
+
}
|
|
48794
|
+
try {
|
|
48795
|
+
(0, import_node_fs13.rmSync)(import_node_path20.default.join(home, ".mrrlin"), { recursive: true, force: true });
|
|
48796
|
+
} catch {
|
|
48797
|
+
}
|
|
48798
|
+
log("removed ~/.mrrlin");
|
|
48799
|
+
if (codexOk) {
|
|
48800
|
+
process.stderr.write(
|
|
48801
|
+
[
|
|
48802
|
+
"",
|
|
48803
|
+
"Mrrlin's local footprint is gone. Two manual steps remain:",
|
|
48804
|
+
" 1) Remove the CLI \u2014 a running process can't delete its own binary:",
|
|
48805
|
+
" npm uninstall -g @mrrlin-dev/mcp",
|
|
48806
|
+
" 2) Revoke the agent credential in Mrrlin Settings \u2014 the local copy is",
|
|
48807
|
+
" wiped, but the server-side credential stays ACTIVE until revoked.",
|
|
48808
|
+
" \u2022 Optional: if you installed pm2 only for Mrrlin: npm uninstall -g pm2",
|
|
48809
|
+
""
|
|
48810
|
+
].join("\n")
|
|
48811
|
+
);
|
|
48812
|
+
} else {
|
|
48813
|
+
process.stderr.write(
|
|
48814
|
+
[
|
|
48815
|
+
"",
|
|
48816
|
+
"PARTIAL UNINSTALL \u2014 the codex config could not be edited (see the error above).",
|
|
48817
|
+
`The [mcp_servers.mrrlin] block is still live. Remove it from ${codexConfigPath}`,
|
|
48818
|
+
"by hand, then run: npm uninstall -g @mrrlin-dev/mcp",
|
|
48819
|
+
"Also revoke the agent credential in Mrrlin Settings.",
|
|
48820
|
+
""
|
|
48821
|
+
].join("\n")
|
|
48822
|
+
);
|
|
48823
|
+
process.exitCode = 2;
|
|
48824
|
+
}
|
|
48825
|
+
return;
|
|
48826
|
+
}
|
|
48669
48827
|
default: {
|
|
48670
48828
|
process.stderr.write(`Unknown command: ${command}
|
|
48671
48829
|
|
|
@@ -48675,7 +48833,7 @@ ${HELP_TEXT}`);
|
|
|
48675
48833
|
}
|
|
48676
48834
|
}
|
|
48677
48835
|
function resolveSelfBinPath() {
|
|
48678
|
-
return
|
|
48836
|
+
return import_node_path19.default.resolve(process.argv[1] ?? process.execPath);
|
|
48679
48837
|
}
|
|
48680
48838
|
main().catch((error51) => {
|
|
48681
48839
|
process.stderr.write(`mrrlin-mcp fatal error: ${error51 instanceof Error ? error51.message : String(error51)}
|