dorkos 0.36.0 → 0.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/cli.js +6 -6
- package/dist/client/assets/{TopologyGraph-CI0jg9Ij.js → TopologyGraph-CxHROye0.js} +1 -1
- package/dist/client/assets/TopologyGraph-XmDAh_jU.js +40 -0
- package/dist/client/assets/{highlighted-body-OFNGDK62-BrI8ztCo.js → highlighted-body-OFNGDK62-B0i9Oec5.js} +1 -1
- package/dist/client/assets/highlighted-body-OFNGDK62-CR9gOZRf.js +1 -0
- package/dist/client/assets/{index-iUiNZx8U.js → index-B5TKcNau.js} +277 -262
- package/dist/client/assets/index-BdwdqwzU.css +1 -0
- package/dist/client/assets/index-Bpr8KFot.js +1122 -0
- package/dist/client/assets/{index-CiScPjq5.js → index-K0mxCTQg.js} +1 -1
- package/dist/client/assets/index-NoFMZO3W.js +69 -0
- package/dist/client/assets/{index-BRvxzZkG.js → index-uKiueM9W.js} +1 -1
- package/dist/client/assets/index-yyXxFq-j.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server/index.js +753 -519
- package/dist/server/index.js.map +4 -4
- package/package.json +4 -4
- package/dist/client/assets/index-BSPwg-6T.css +0 -1
package/dist/server/index.js
CHANGED
|
@@ -13806,11 +13806,11 @@ var require_mime_types = __commonJS({
|
|
|
13806
13806
|
}
|
|
13807
13807
|
return exts[0];
|
|
13808
13808
|
}
|
|
13809
|
-
function lookup(
|
|
13810
|
-
if (!
|
|
13809
|
+
function lookup(path79) {
|
|
13810
|
+
if (!path79 || typeof path79 !== "string") {
|
|
13811
13811
|
return false;
|
|
13812
13812
|
}
|
|
13813
|
-
var extension3 = extname2("x." +
|
|
13813
|
+
var extension3 = extname2("x." + path79).toLowerCase().substr(1);
|
|
13814
13814
|
if (!extension3) {
|
|
13815
13815
|
return false;
|
|
13816
13816
|
}
|
|
@@ -14319,19 +14319,19 @@ var require_utils = __commonJS({
|
|
|
14319
14319
|
if (decode2)
|
|
14320
14320
|
return decode2(data, hint);
|
|
14321
14321
|
}
|
|
14322
|
-
function basename5(
|
|
14323
|
-
if (typeof
|
|
14322
|
+
function basename5(path79) {
|
|
14323
|
+
if (typeof path79 !== "string")
|
|
14324
14324
|
return "";
|
|
14325
|
-
for (let i4 =
|
|
14326
|
-
switch (
|
|
14325
|
+
for (let i4 = path79.length - 1; i4 >= 0; --i4) {
|
|
14326
|
+
switch (path79.charCodeAt(i4)) {
|
|
14327
14327
|
case 47:
|
|
14328
14328
|
// '/'
|
|
14329
14329
|
case 92:
|
|
14330
|
-
|
|
14331
|
-
return
|
|
14330
|
+
path79 = path79.slice(i4 + 1);
|
|
14331
|
+
return path79 === ".." || path79 === "." ? "" : path79;
|
|
14332
14332
|
}
|
|
14333
14333
|
}
|
|
14334
|
-
return
|
|
14334
|
+
return path79 === ".." || path79 === "." ? "" : path79;
|
|
14335
14335
|
}
|
|
14336
14336
|
var TOKEN = [
|
|
14337
14337
|
0,
|
|
@@ -18174,9 +18174,9 @@ var require_make_middleware = __commonJS({
|
|
|
18174
18174
|
// ../../node_modules/.pnpm/multer@2.1.1/node_modules/multer/storage/disk.js
|
|
18175
18175
|
var require_disk = __commonJS({
|
|
18176
18176
|
"../../node_modules/.pnpm/multer@2.1.1/node_modules/multer/storage/disk.js"(exports, module) {
|
|
18177
|
-
var
|
|
18177
|
+
var fs44 = __require("fs");
|
|
18178
18178
|
var os8 = __require("os");
|
|
18179
|
-
var
|
|
18179
|
+
var path79 = __require("path");
|
|
18180
18180
|
var crypto8 = __require("crypto");
|
|
18181
18181
|
function getFilename(req, file, cb) {
|
|
18182
18182
|
crypto8.randomBytes(16, function(err, raw) {
|
|
@@ -18189,7 +18189,7 @@ var require_disk = __commonJS({
|
|
|
18189
18189
|
function DiskStorage(opts) {
|
|
18190
18190
|
this.getFilename = opts.filename || getFilename;
|
|
18191
18191
|
if (typeof opts.destination === "string") {
|
|
18192
|
-
|
|
18192
|
+
fs44.mkdirSync(opts.destination, { recursive: true });
|
|
18193
18193
|
this.getDestination = function($0, $1, cb) {
|
|
18194
18194
|
cb(null, opts.destination);
|
|
18195
18195
|
};
|
|
@@ -18203,8 +18203,8 @@ var require_disk = __commonJS({
|
|
|
18203
18203
|
if (err) return cb(err);
|
|
18204
18204
|
that.getFilename(req, file, function(err2, filename) {
|
|
18205
18205
|
if (err2) return cb(err2);
|
|
18206
|
-
var finalPath =
|
|
18207
|
-
var outStream =
|
|
18206
|
+
var finalPath = path79.join(destination, filename);
|
|
18207
|
+
var outStream = fs44.createWriteStream(finalPath);
|
|
18208
18208
|
file.stream.pipe(outStream);
|
|
18209
18209
|
outStream.on("error", cb);
|
|
18210
18210
|
outStream.on("finish", function() {
|
|
@@ -18219,11 +18219,11 @@ var require_disk = __commonJS({
|
|
|
18219
18219
|
});
|
|
18220
18220
|
};
|
|
18221
18221
|
DiskStorage.prototype._removeFile = function _removeFile(req, file, cb) {
|
|
18222
|
-
var
|
|
18222
|
+
var path80 = file.path;
|
|
18223
18223
|
delete file.destination;
|
|
18224
18224
|
delete file.filename;
|
|
18225
18225
|
delete file.path;
|
|
18226
|
-
|
|
18226
|
+
fs44.unlink(path80, cb);
|
|
18227
18227
|
};
|
|
18228
18228
|
module.exports = function(opts) {
|
|
18229
18229
|
return new DiskStorage(opts);
|
|
@@ -27075,7 +27075,7 @@ async function _cloneAndTar(parsed, token) {
|
|
|
27075
27075
|
const stream = create({
|
|
27076
27076
|
gzip: true,
|
|
27077
27077
|
cwd: tarDir,
|
|
27078
|
-
filter: (
|
|
27078
|
+
filter: (path79) => !path79.startsWith(".git/") && path79 !== ".git" && !path79.startsWith("./.git/") && path79 !== "./.git"
|
|
27079
27079
|
}, ["."]).pipe(new PassThrough());
|
|
27080
27080
|
let cleaned = false;
|
|
27081
27081
|
const cleanup = () => {
|
|
@@ -32390,14 +32390,14 @@ var require_url_state_machine = __commonJS({
|
|
|
32390
32390
|
return url.replace(/\u0009|\u000A|\u000D/g, "");
|
|
32391
32391
|
}
|
|
32392
32392
|
function shortenPath(url) {
|
|
32393
|
-
const
|
|
32394
|
-
if (
|
|
32393
|
+
const path79 = url.path;
|
|
32394
|
+
if (path79.length === 0) {
|
|
32395
32395
|
return;
|
|
32396
32396
|
}
|
|
32397
|
-
if (url.scheme === "file" &&
|
|
32397
|
+
if (url.scheme === "file" && path79.length === 1 && isNormalizedWindowsDriveLetter(path79[0])) {
|
|
32398
32398
|
return;
|
|
32399
32399
|
}
|
|
32400
|
-
|
|
32400
|
+
path79.pop();
|
|
32401
32401
|
}
|
|
32402
32402
|
function includesCredentials(url) {
|
|
32403
32403
|
return url.username !== "" || url.password !== "";
|
|
@@ -46686,11 +46686,11 @@ var require_form_data = __commonJS({
|
|
|
46686
46686
|
"use strict";
|
|
46687
46687
|
var CombinedStream = require_combined_stream();
|
|
46688
46688
|
var util = __require("util");
|
|
46689
|
-
var
|
|
46689
|
+
var path79 = __require("path");
|
|
46690
46690
|
var http2 = __require("http");
|
|
46691
46691
|
var https = __require("https");
|
|
46692
46692
|
var parseUrl = __require("url").parse;
|
|
46693
|
-
var
|
|
46693
|
+
var fs44 = __require("fs");
|
|
46694
46694
|
var Stream = __require("stream").Stream;
|
|
46695
46695
|
var crypto8 = __require("crypto");
|
|
46696
46696
|
var mime = require_mime_types();
|
|
@@ -46757,7 +46757,7 @@ var require_form_data = __commonJS({
|
|
|
46757
46757
|
if (value.end != void 0 && value.end != Infinity && value.start != void 0) {
|
|
46758
46758
|
callback(null, value.end + 1 - (value.start ? value.start : 0));
|
|
46759
46759
|
} else {
|
|
46760
|
-
|
|
46760
|
+
fs44.stat(value.path, function(err, stat14) {
|
|
46761
46761
|
if (err) {
|
|
46762
46762
|
callback(err);
|
|
46763
46763
|
return;
|
|
@@ -46814,11 +46814,11 @@ var require_form_data = __commonJS({
|
|
|
46814
46814
|
FormData2.prototype._getContentDisposition = function(value, options) {
|
|
46815
46815
|
var filename;
|
|
46816
46816
|
if (typeof options.filepath === "string") {
|
|
46817
|
-
filename =
|
|
46817
|
+
filename = path79.normalize(options.filepath).replace(/\\/g, "/");
|
|
46818
46818
|
} else if (options.filename || value && (value.name || value.path)) {
|
|
46819
|
-
filename =
|
|
46819
|
+
filename = path79.basename(options.filename || value && (value.name || value.path));
|
|
46820
46820
|
} else if (value && value.readable && hasOwn(value, "httpVersion")) {
|
|
46821
|
-
filename =
|
|
46821
|
+
filename = path79.basename(value.client._httpMessage.path || "");
|
|
46822
46822
|
}
|
|
46823
46823
|
if (filename) {
|
|
46824
46824
|
return 'filename="' + filename + '"';
|
|
@@ -48048,9 +48048,9 @@ var require_axios = __commonJS({
|
|
|
48048
48048
|
function removeBrackets(key) {
|
|
48049
48049
|
return utils$1.endsWith(key, "[]") ? key.slice(0, -2) : key;
|
|
48050
48050
|
}
|
|
48051
|
-
function renderKey(
|
|
48052
|
-
if (!
|
|
48053
|
-
return
|
|
48051
|
+
function renderKey(path79, key, dots) {
|
|
48052
|
+
if (!path79) return key;
|
|
48053
|
+
return path79.concat(key).map(function each(token, i4) {
|
|
48054
48054
|
token = removeBrackets(token);
|
|
48055
48055
|
return !dots && i4 ? "[" + token + "]" : token;
|
|
48056
48056
|
}).join(dots ? "." : "");
|
|
@@ -48098,13 +48098,13 @@ var require_axios = __commonJS({
|
|
|
48098
48098
|
}
|
|
48099
48099
|
return value;
|
|
48100
48100
|
}
|
|
48101
|
-
function defaultVisitor(value, key,
|
|
48101
|
+
function defaultVisitor(value, key, path79) {
|
|
48102
48102
|
let arr = value;
|
|
48103
48103
|
if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
|
|
48104
|
-
formData.append(renderKey(
|
|
48104
|
+
formData.append(renderKey(path79, key, dots), convertValue(value));
|
|
48105
48105
|
return false;
|
|
48106
48106
|
}
|
|
48107
|
-
if (value && !
|
|
48107
|
+
if (value && !path79 && typeof value === "object") {
|
|
48108
48108
|
if (utils$1.endsWith(key, "{}")) {
|
|
48109
48109
|
key = metaTokens ? key : key.slice(0, -2);
|
|
48110
48110
|
value = JSON.stringify(value);
|
|
@@ -48123,7 +48123,7 @@ var require_axios = __commonJS({
|
|
|
48123
48123
|
if (isVisitable(value)) {
|
|
48124
48124
|
return true;
|
|
48125
48125
|
}
|
|
48126
|
-
formData.append(renderKey(
|
|
48126
|
+
formData.append(renderKey(path79, key, dots), convertValue(value));
|
|
48127
48127
|
return false;
|
|
48128
48128
|
}
|
|
48129
48129
|
const stack = [];
|
|
@@ -48132,16 +48132,16 @@ var require_axios = __commonJS({
|
|
|
48132
48132
|
convertValue,
|
|
48133
48133
|
isVisitable
|
|
48134
48134
|
});
|
|
48135
|
-
function build2(value,
|
|
48135
|
+
function build2(value, path79) {
|
|
48136
48136
|
if (utils$1.isUndefined(value)) return;
|
|
48137
48137
|
if (stack.indexOf(value) !== -1) {
|
|
48138
|
-
throw Error("Circular reference detected in " +
|
|
48138
|
+
throw Error("Circular reference detected in " + path79.join("."));
|
|
48139
48139
|
}
|
|
48140
48140
|
stack.push(value);
|
|
48141
48141
|
utils$1.forEach(value, function each(el, key) {
|
|
48142
|
-
const result2 = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key,
|
|
48142
|
+
const result2 = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path79, exposedHelpers);
|
|
48143
48143
|
if (result2 === true) {
|
|
48144
|
-
build2(el,
|
|
48144
|
+
build2(el, path79 ? path79.concat(key) : [key]);
|
|
48145
48145
|
}
|
|
48146
48146
|
});
|
|
48147
48147
|
stack.pop();
|
|
@@ -48330,7 +48330,7 @@ var require_axios = __commonJS({
|
|
|
48330
48330
|
};
|
|
48331
48331
|
function toURLEncodedForm(data, options) {
|
|
48332
48332
|
return toFormData(data, new platform2.classes.URLSearchParams(), {
|
|
48333
|
-
visitor: function(value, key,
|
|
48333
|
+
visitor: function(value, key, path79, helpers) {
|
|
48334
48334
|
if (platform2.isNode && utils$1.isBuffer(value)) {
|
|
48335
48335
|
this.append(key, value.toString("base64"));
|
|
48336
48336
|
return false;
|
|
@@ -48358,11 +48358,11 @@ var require_axios = __commonJS({
|
|
|
48358
48358
|
return obj;
|
|
48359
48359
|
}
|
|
48360
48360
|
function formDataToJSON(formData) {
|
|
48361
|
-
function buildPath(
|
|
48362
|
-
let name =
|
|
48361
|
+
function buildPath(path79, value, target, index3) {
|
|
48362
|
+
let name = path79[index3++];
|
|
48363
48363
|
if (name === "__proto__") return true;
|
|
48364
48364
|
const isNumericKey = Number.isFinite(+name);
|
|
48365
|
-
const isLast = index3 >=
|
|
48365
|
+
const isLast = index3 >= path79.length;
|
|
48366
48366
|
name = !name && utils$1.isArray(target) ? target.length : name;
|
|
48367
48367
|
if (isLast) {
|
|
48368
48368
|
if (utils$1.hasOwnProp(target, name)) {
|
|
@@ -48375,7 +48375,7 @@ var require_axios = __commonJS({
|
|
|
48375
48375
|
if (!target[name] || !utils$1.isObject(target[name])) {
|
|
48376
48376
|
target[name] = [];
|
|
48377
48377
|
}
|
|
48378
|
-
const result2 = buildPath(
|
|
48378
|
+
const result2 = buildPath(path79, value, target[name], index3);
|
|
48379
48379
|
if (result2 && utils$1.isArray(target[name])) {
|
|
48380
48380
|
target[name] = arrayToObject(target[name]);
|
|
48381
48381
|
}
|
|
@@ -49693,9 +49693,9 @@ var require_axios = __commonJS({
|
|
|
49693
49693
|
auth = urlUsername + ":" + urlPassword;
|
|
49694
49694
|
}
|
|
49695
49695
|
auth && headers.delete("authorization");
|
|
49696
|
-
let
|
|
49696
|
+
let path79;
|
|
49697
49697
|
try {
|
|
49698
|
-
|
|
49698
|
+
path79 = buildURL(parsed.pathname + parsed.search, config.params, config.paramsSerializer).replace(/^\?/, "");
|
|
49699
49699
|
} catch (err) {
|
|
49700
49700
|
const customErr = new Error(err.message);
|
|
49701
49701
|
customErr.config = config;
|
|
@@ -49705,7 +49705,7 @@ var require_axios = __commonJS({
|
|
|
49705
49705
|
}
|
|
49706
49706
|
headers.set("Accept-Encoding", "gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""), false);
|
|
49707
49707
|
const options = {
|
|
49708
|
-
path:
|
|
49708
|
+
path: path79,
|
|
49709
49709
|
method,
|
|
49710
49710
|
headers: headers.toJSON(),
|
|
49711
49711
|
agents: {
|
|
@@ -49911,14 +49911,14 @@ var require_axios = __commonJS({
|
|
|
49911
49911
|
var cookies = platform2.hasStandardBrowserEnv ? (
|
|
49912
49912
|
// Standard browser envs support document.cookie
|
|
49913
49913
|
{
|
|
49914
|
-
write(name, value, expires,
|
|
49914
|
+
write(name, value, expires, path79, domain2, secure, sameSite) {
|
|
49915
49915
|
if (typeof document === "undefined") return;
|
|
49916
49916
|
const cookie = [`${name}=${encodeURIComponent(value)}`];
|
|
49917
49917
|
if (utils$1.isNumber(expires)) {
|
|
49918
49918
|
cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
49919
49919
|
}
|
|
49920
|
-
if (utils$1.isString(
|
|
49921
|
-
cookie.push(`path=${
|
|
49920
|
+
if (utils$1.isString(path79)) {
|
|
49921
|
+
cookie.push(`path=${path79}`);
|
|
49922
49922
|
}
|
|
49923
49923
|
if (utils$1.isString(domain2)) {
|
|
49924
49924
|
cookie.push(`domain=${domain2}`);
|
|
@@ -60887,15 +60887,15 @@ var require_dist6 = __commonJS({
|
|
|
60887
60887
|
if (token.type === endType)
|
|
60888
60888
|
break;
|
|
60889
60889
|
if (token.type === "char" || token.type === "escape") {
|
|
60890
|
-
let
|
|
60890
|
+
let path79 = token.value;
|
|
60891
60891
|
let cur = tokens[pos];
|
|
60892
60892
|
while (cur.type === "char" || cur.type === "escape") {
|
|
60893
|
-
|
|
60893
|
+
path79 += cur.value;
|
|
60894
60894
|
cur = tokens[++pos];
|
|
60895
60895
|
}
|
|
60896
60896
|
output.push({
|
|
60897
60897
|
type: "text",
|
|
60898
|
-
value: encodePath(
|
|
60898
|
+
value: encodePath(path79)
|
|
60899
60899
|
});
|
|
60900
60900
|
continue;
|
|
60901
60901
|
}
|
|
@@ -60919,16 +60919,16 @@ var require_dist6 = __commonJS({
|
|
|
60919
60919
|
}
|
|
60920
60920
|
return new TokenData(consumeUntil("end"), str);
|
|
60921
60921
|
}
|
|
60922
|
-
function compile(
|
|
60922
|
+
function compile(path79, options = {}) {
|
|
60923
60923
|
const { encode = encodeURIComponent, delimiter = DEFAULT_DELIMITER } = options;
|
|
60924
|
-
const data = typeof
|
|
60924
|
+
const data = typeof path79 === "object" ? path79 : parse2(path79, options);
|
|
60925
60925
|
const fn3 = tokensToFunction(data.tokens, delimiter, encode);
|
|
60926
|
-
return function
|
|
60927
|
-
const [
|
|
60926
|
+
return function path80(params = {}) {
|
|
60927
|
+
const [path81, ...missing] = fn3(params);
|
|
60928
60928
|
if (missing.length) {
|
|
60929
60929
|
throw new TypeError(`Missing parameters: ${missing.join(", ")}`);
|
|
60930
60930
|
}
|
|
60931
|
-
return
|
|
60931
|
+
return path81;
|
|
60932
60932
|
};
|
|
60933
60933
|
}
|
|
60934
60934
|
function tokensToFunction(tokens, delimiter, encode) {
|
|
@@ -60984,9 +60984,9 @@ var require_dist6 = __commonJS({
|
|
|
60984
60984
|
return [encodeValue(value)];
|
|
60985
60985
|
};
|
|
60986
60986
|
}
|
|
60987
|
-
function match(
|
|
60987
|
+
function match(path79, options = {}) {
|
|
60988
60988
|
const { decode: decode2 = decodeURIComponent, delimiter = DEFAULT_DELIMITER } = options;
|
|
60989
|
-
const { regexp, keys } = pathToRegexp(
|
|
60989
|
+
const { regexp, keys } = pathToRegexp(path79, options);
|
|
60990
60990
|
const decoders = keys.map((key) => {
|
|
60991
60991
|
if (decode2 === false)
|
|
60992
60992
|
return NOOP_VALUE;
|
|
@@ -60998,7 +60998,7 @@ var require_dist6 = __commonJS({
|
|
|
60998
60998
|
const m6 = regexp.exec(input);
|
|
60999
60999
|
if (!m6)
|
|
61000
61000
|
return false;
|
|
61001
|
-
const
|
|
61001
|
+
const path80 = m6[0];
|
|
61002
61002
|
const params = /* @__PURE__ */ Object.create(null);
|
|
61003
61003
|
for (let i4 = 1; i4 < m6.length; i4++) {
|
|
61004
61004
|
if (m6[i4] === void 0)
|
|
@@ -61007,22 +61007,22 @@ var require_dist6 = __commonJS({
|
|
|
61007
61007
|
const decoder = decoders[i4 - 1];
|
|
61008
61008
|
params[key.name] = decoder(m6[i4]);
|
|
61009
61009
|
}
|
|
61010
|
-
return { path:
|
|
61010
|
+
return { path: path80, params };
|
|
61011
61011
|
};
|
|
61012
61012
|
}
|
|
61013
|
-
function pathToRegexp(
|
|
61013
|
+
function pathToRegexp(path79, options = {}) {
|
|
61014
61014
|
const { delimiter = DEFAULT_DELIMITER, end = true, sensitive = false, trailing = true } = options;
|
|
61015
61015
|
const keys = [];
|
|
61016
61016
|
const sources = [];
|
|
61017
|
-
const paths = [
|
|
61017
|
+
const paths = [path79];
|
|
61018
61018
|
let combinations = 0;
|
|
61019
61019
|
while (paths.length) {
|
|
61020
|
-
const
|
|
61021
|
-
if (Array.isArray(
|
|
61022
|
-
paths.push(...
|
|
61020
|
+
const path80 = paths.shift();
|
|
61021
|
+
if (Array.isArray(path80)) {
|
|
61022
|
+
paths.push(...path80);
|
|
61023
61023
|
continue;
|
|
61024
61024
|
}
|
|
61025
|
-
const data = typeof
|
|
61025
|
+
const data = typeof path80 === "object" ? path80 : parse2(path80, options);
|
|
61026
61026
|
flatten(data.tokens, 0, [], (tokens) => {
|
|
61027
61027
|
if (combinations++ >= 256) {
|
|
61028
61028
|
throw new PathError("Too many path combinations", data.originalPath);
|
|
@@ -66159,17 +66159,17 @@ var require_HTTPReceiver = __commonJS({
|
|
|
66159
66159
|
});
|
|
66160
66160
|
}
|
|
66161
66161
|
unboundRequestListener(req, res) {
|
|
66162
|
-
const { pathname:
|
|
66162
|
+
const { pathname: path79 } = new node_url_1.URL(req.url, "http://localhost");
|
|
66163
66163
|
const method = req.method.toUpperCase();
|
|
66164
|
-
if (this.endpoints.includes(
|
|
66164
|
+
if (this.endpoints.includes(path79) && method === "POST") {
|
|
66165
66165
|
return this.handleIncomingEvent(req, res);
|
|
66166
66166
|
}
|
|
66167
66167
|
if (this.installer !== void 0 && method === "GET") {
|
|
66168
66168
|
const [installPath, installRedirectUriPath] = [this.installPath, this.installRedirectUriPath];
|
|
66169
|
-
if (
|
|
66169
|
+
if (path79 === installPath) {
|
|
66170
66170
|
return this.handleInstallPathRequest(req, res);
|
|
66171
66171
|
}
|
|
66172
|
-
if (
|
|
66172
|
+
if (path79 === installRedirectUriPath) {
|
|
66173
66173
|
return this.handleInstallRedirectRequest(req, res);
|
|
66174
66174
|
}
|
|
66175
66175
|
}
|
|
@@ -66177,14 +66177,14 @@ var require_HTTPReceiver = __commonJS({
|
|
|
66177
66177
|
for (let i4 = 0; i4 < routes.length; i4 += 1) {
|
|
66178
66178
|
const route = routes[i4];
|
|
66179
66179
|
const matchRegex = (0, path_to_regexp_1.match)(route, { decode: decodeURIComponent });
|
|
66180
|
-
const pathMatch = matchRegex(
|
|
66180
|
+
const pathMatch = matchRegex(path79);
|
|
66181
66181
|
if (pathMatch && this.routes[route][method] !== void 0) {
|
|
66182
66182
|
const params = pathMatch.params;
|
|
66183
66183
|
const message = Object.assign(req, { params });
|
|
66184
66184
|
return this.routes[route][method](message, res);
|
|
66185
66185
|
}
|
|
66186
66186
|
}
|
|
66187
|
-
throw new errors_1.HTTPReceiverDeferredRequestError(`Unhandled HTTP request (${method}) made to ${
|
|
66187
|
+
throw new errors_1.HTTPReceiverDeferredRequestError(`Unhandled HTTP request (${method}) made to ${path79}`, req, res);
|
|
66188
66188
|
}
|
|
66189
66189
|
handleIncomingEvent(req, res) {
|
|
66190
66190
|
(async () => {
|
|
@@ -70812,12 +70812,12 @@ var require_SocketModeReceiver = __commonJS({
|
|
|
70812
70812
|
}
|
|
70813
70813
|
}
|
|
70814
70814
|
if (customRoutes.length && req.url) {
|
|
70815
|
-
const { pathname:
|
|
70815
|
+
const { pathname: path79 } = new node_url_1.URL(req.url, "http://localhost");
|
|
70816
70816
|
const routes = Object.keys(this.routes);
|
|
70817
70817
|
for (let i4 = 0; i4 < routes.length; i4 += 1) {
|
|
70818
70818
|
const route = routes[i4];
|
|
70819
70819
|
const matchRegex = (0, path_to_regexp_1.match)(route, { decode: decodeURIComponent });
|
|
70820
|
-
const pathMatch = matchRegex(
|
|
70820
|
+
const pathMatch = matchRegex(path79);
|
|
70821
70821
|
if (pathMatch && this.routes[route][method] !== void 0) {
|
|
70822
70822
|
const params = pathMatch.params;
|
|
70823
70823
|
const message = Object.assign(req, { params });
|
|
@@ -72538,13 +72538,13 @@ var require_AwsLambdaReceiver = __commonJS({
|
|
|
72538
72538
|
return { statusCode: 500, body: "Internal server error" };
|
|
72539
72539
|
}
|
|
72540
72540
|
clearTimeout(noAckTimeoutId);
|
|
72541
|
-
let
|
|
72541
|
+
let path79;
|
|
72542
72542
|
if ("path" in awsEvent) {
|
|
72543
|
-
|
|
72543
|
+
path79 = awsEvent.path;
|
|
72544
72544
|
} else {
|
|
72545
|
-
|
|
72545
|
+
path79 = awsEvent.rawPath;
|
|
72546
72546
|
}
|
|
72547
|
-
this.logger.info(`No request handler matched the request: ${
|
|
72547
|
+
this.logger.info(`No request handler matched the request: ${path79}`);
|
|
72548
72548
|
return { statusCode: 404, body: "" };
|
|
72549
72549
|
};
|
|
72550
72550
|
}
|
|
@@ -73901,7 +73901,7 @@ is not a problem with esbuild. You need to fix your environment instead.
|
|
|
73901
73901
|
}
|
|
73902
73902
|
);
|
|
73903
73903
|
};
|
|
73904
|
-
let transform2 = ({ callName, refs, input, options, isTTY: isTTY2, fs:
|
|
73904
|
+
let transform2 = ({ callName, refs, input, options, isTTY: isTTY2, fs: fs310, callback }) => {
|
|
73905
73905
|
const details = createObjectStash();
|
|
73906
73906
|
let start2 = (inputPath) => {
|
|
73907
73907
|
try {
|
|
@@ -73940,7 +73940,7 @@ is not a problem with esbuild. You need to fix your environment instead.
|
|
|
73940
73940
|
if (errors.length > 0) return callback(failureErrorWithLog("Transform failed", errors, warnings), null);
|
|
73941
73941
|
if (response.codeFS) {
|
|
73942
73942
|
outstanding++;
|
|
73943
|
-
|
|
73943
|
+
fs310.readFile(response.code, (err, contents) => {
|
|
73944
73944
|
if (err !== null) {
|
|
73945
73945
|
callback(err, null);
|
|
73946
73946
|
} else {
|
|
@@ -73951,7 +73951,7 @@ is not a problem with esbuild. You need to fix your environment instead.
|
|
|
73951
73951
|
}
|
|
73952
73952
|
if (response.mapFS) {
|
|
73953
73953
|
outstanding++;
|
|
73954
|
-
|
|
73954
|
+
fs310.readFile(response.map, (err, contents) => {
|
|
73955
73955
|
if (err !== null) {
|
|
73956
73956
|
callback(err, null);
|
|
73957
73957
|
} else {
|
|
@@ -73977,7 +73977,7 @@ is not a problem with esbuild. You need to fix your environment instead.
|
|
|
73977
73977
|
};
|
|
73978
73978
|
if ((typeof input === "string" || input instanceof Uint8Array) && input.length > 1024 * 1024) {
|
|
73979
73979
|
let next = start2;
|
|
73980
|
-
start2 = () =>
|
|
73980
|
+
start2 = () => fs310.writeFile(input, next);
|
|
73981
73981
|
}
|
|
73982
73982
|
start2(null);
|
|
73983
73983
|
};
|
|
@@ -74780,9 +74780,9 @@ ${file}:${line}:${column}: ERROR: ${pluginText}${e4.text}`;
|
|
|
74780
74780
|
}
|
|
74781
74781
|
};
|
|
74782
74782
|
}
|
|
74783
|
-
var
|
|
74783
|
+
var fs44 = __require("fs");
|
|
74784
74784
|
var os8 = __require("os");
|
|
74785
|
-
var
|
|
74785
|
+
var path79 = __require("path");
|
|
74786
74786
|
var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH;
|
|
74787
74787
|
var isValidBinaryPath = (x6) => !!x6 && x6 !== "/usr/bin/esbuild";
|
|
74788
74788
|
var packageDarwin_arm64 = "@esbuild/darwin-arm64";
|
|
@@ -74840,19 +74840,19 @@ ${file}:${line}:${column}: ERROR: ${pluginText}${e4.text}`;
|
|
|
74840
74840
|
}
|
|
74841
74841
|
function pkgForSomeOtherPlatform() {
|
|
74842
74842
|
const libMainJS = __require.resolve("esbuild");
|
|
74843
|
-
const nodeModulesDirectory =
|
|
74844
|
-
if (
|
|
74843
|
+
const nodeModulesDirectory = path79.dirname(path79.dirname(path79.dirname(libMainJS)));
|
|
74844
|
+
if (path79.basename(nodeModulesDirectory) === "node_modules") {
|
|
74845
74845
|
for (const unixKey in knownUnixlikePackages) {
|
|
74846
74846
|
try {
|
|
74847
74847
|
const pkg = knownUnixlikePackages[unixKey];
|
|
74848
|
-
if (
|
|
74848
|
+
if (fs44.existsSync(path79.join(nodeModulesDirectory, pkg))) return pkg;
|
|
74849
74849
|
} catch {
|
|
74850
74850
|
}
|
|
74851
74851
|
}
|
|
74852
74852
|
for (const windowsKey in knownWindowsPackages) {
|
|
74853
74853
|
try {
|
|
74854
74854
|
const pkg = knownWindowsPackages[windowsKey];
|
|
74855
|
-
if (
|
|
74855
|
+
if (fs44.existsSync(path79.join(nodeModulesDirectory, pkg))) return pkg;
|
|
74856
74856
|
} catch {
|
|
74857
74857
|
}
|
|
74858
74858
|
}
|
|
@@ -74860,12 +74860,12 @@ ${file}:${line}:${column}: ERROR: ${pluginText}${e4.text}`;
|
|
|
74860
74860
|
return null;
|
|
74861
74861
|
}
|
|
74862
74862
|
function downloadedBinPath(pkg, subpath) {
|
|
74863
|
-
const esbuildLibDir =
|
|
74864
|
-
return
|
|
74863
|
+
const esbuildLibDir = path79.dirname(__require.resolve("esbuild"));
|
|
74864
|
+
return path79.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path79.basename(subpath)}`);
|
|
74865
74865
|
}
|
|
74866
74866
|
function generateBinPath() {
|
|
74867
74867
|
if (isValidBinaryPath(ESBUILD_BINARY_PATH)) {
|
|
74868
|
-
if (!
|
|
74868
|
+
if (!fs44.existsSync(ESBUILD_BINARY_PATH)) {
|
|
74869
74869
|
console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`);
|
|
74870
74870
|
} else {
|
|
74871
74871
|
return { binPath: ESBUILD_BINARY_PATH, isWASM: false };
|
|
@@ -74877,7 +74877,7 @@ ${file}:${line}:${column}: ERROR: ${pluginText}${e4.text}`;
|
|
|
74877
74877
|
binPath = __require.resolve(`${pkg}/${subpath}`);
|
|
74878
74878
|
} catch (e4) {
|
|
74879
74879
|
binPath = downloadedBinPath(pkg, subpath);
|
|
74880
|
-
if (!
|
|
74880
|
+
if (!fs44.existsSync(binPath)) {
|
|
74881
74881
|
try {
|
|
74882
74882
|
__require.resolve(pkg);
|
|
74883
74883
|
} catch {
|
|
@@ -74951,17 +74951,17 @@ for your current platform.`);
|
|
|
74951
74951
|
}
|
|
74952
74952
|
if (pnpapi) {
|
|
74953
74953
|
const root3 = pnpapi.getPackageInformation(pnpapi.topLevel).packageLocation;
|
|
74954
|
-
const binTargetPath =
|
|
74954
|
+
const binTargetPath = path79.join(
|
|
74955
74955
|
root3,
|
|
74956
74956
|
"node_modules",
|
|
74957
74957
|
".cache",
|
|
74958
74958
|
"esbuild",
|
|
74959
|
-
`pnpapi-${pkg.replace("/", "-")}-${"0.24.2"}-${
|
|
74959
|
+
`pnpapi-${pkg.replace("/", "-")}-${"0.24.2"}-${path79.basename(subpath)}`
|
|
74960
74960
|
);
|
|
74961
|
-
if (!
|
|
74962
|
-
|
|
74963
|
-
|
|
74964
|
-
|
|
74961
|
+
if (!fs44.existsSync(binTargetPath)) {
|
|
74962
|
+
fs44.mkdirSync(path79.dirname(binTargetPath), { recursive: true });
|
|
74963
|
+
fs44.copyFileSync(binPath, binTargetPath);
|
|
74964
|
+
fs44.chmodSync(binTargetPath, 493);
|
|
74965
74965
|
}
|
|
74966
74966
|
return { binPath: binTargetPath, isWASM };
|
|
74967
74967
|
}
|
|
@@ -78605,8 +78605,8 @@ var require_utils3 = __commonJS({
|
|
|
78605
78605
|
}
|
|
78606
78606
|
return ind;
|
|
78607
78607
|
}
|
|
78608
|
-
function removeDotSegments(
|
|
78609
|
-
let input =
|
|
78608
|
+
function removeDotSegments(path79) {
|
|
78609
|
+
let input = path79;
|
|
78610
78610
|
const output = [];
|
|
78611
78611
|
let nextSlash = -1;
|
|
78612
78612
|
let len = 0;
|
|
@@ -78805,8 +78805,8 @@ var require_schemes = __commonJS({
|
|
|
78805
78805
|
wsComponent.secure = void 0;
|
|
78806
78806
|
}
|
|
78807
78807
|
if (wsComponent.resourceName) {
|
|
78808
|
-
const [
|
|
78809
|
-
wsComponent.path =
|
|
78808
|
+
const [path79, query3] = wsComponent.resourceName.split("?");
|
|
78809
|
+
wsComponent.path = path79 && path79 !== "/" ? path79 : void 0;
|
|
78810
78810
|
wsComponent.query = query3;
|
|
78811
78811
|
wsComponent.resourceName = void 0;
|
|
78812
78812
|
}
|
|
@@ -82168,12 +82168,12 @@ var require_dist8 = __commonJS({
|
|
|
82168
82168
|
throw new Error(`Unknown format "${name}"`);
|
|
82169
82169
|
return f7;
|
|
82170
82170
|
};
|
|
82171
|
-
function addFormats(ajv, list5,
|
|
82171
|
+
function addFormats(ajv, list5, fs44, exportName) {
|
|
82172
82172
|
var _a2;
|
|
82173
82173
|
var _b;
|
|
82174
82174
|
(_a2 = (_b = ajv.opts.code).formats) !== null && _a2 !== void 0 ? _a2 : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
|
|
82175
82175
|
for (const f7 of list5)
|
|
82176
|
-
ajv.addFormat(f7,
|
|
82176
|
+
ajv.addFormat(f7, fs44[f7]);
|
|
82177
82177
|
}
|
|
82178
82178
|
module.exports = exports = formatsPlugin;
|
|
82179
82179
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -82335,7 +82335,7 @@ var init_test_mode_runtime = __esm({
|
|
|
82335
82335
|
});
|
|
82336
82336
|
|
|
82337
82337
|
// ../../apps/server/src/index.ts
|
|
82338
|
-
import
|
|
82338
|
+
import path78 from "path";
|
|
82339
82339
|
|
|
82340
82340
|
// ../../apps/server/src/app.ts
|
|
82341
82341
|
var import_cookie_session = __toESM(require_cookie_session(), 1);
|
|
@@ -83290,7 +83290,7 @@ var UiCanvasContentSchema = z.discriminatedUnion("type", [
|
|
|
83290
83290
|
title: z.string().optional()
|
|
83291
83291
|
})
|
|
83292
83292
|
]).openapi("UiCanvasContent");
|
|
83293
|
-
var UiPanelIdSchema = z.enum(["settings", "tasks", "relay", "
|
|
83293
|
+
var UiPanelIdSchema = z.enum(["settings", "tasks", "relay", "picker"]).openapi("UiPanelId");
|
|
83294
83294
|
var UiSidebarTabSchema = z.enum(["overview", "sessions", "schedules", "connections"]).openapi("UiSidebarTab");
|
|
83295
83295
|
var UiToastLevelSchema = z.enum(["success", "error", "info", "warning"]).openapi("UiToastLevel");
|
|
83296
83296
|
var UiCommandSchema = z.discriminatedUnion("action", [
|
|
@@ -83350,8 +83350,7 @@ var UiStateSchema = z.object({
|
|
|
83350
83350
|
panels: z.object({
|
|
83351
83351
|
settings: z.boolean(),
|
|
83352
83352
|
tasks: z.boolean(),
|
|
83353
|
-
relay: z.boolean()
|
|
83354
|
-
mesh: z.boolean()
|
|
83353
|
+
relay: z.boolean()
|
|
83355
83354
|
}),
|
|
83356
83355
|
sidebar: z.object({
|
|
83357
83356
|
open: z.boolean(),
|
|
@@ -84120,7 +84119,7 @@ var SERVER_VERSION = resolveVersion();
|
|
|
84120
84119
|
var IS_DEV_BUILD = checkDevBuild(SERVER_VERSION);
|
|
84121
84120
|
function resolveVersion() {
|
|
84122
84121
|
if (env.DORKOS_VERSION_OVERRIDE) return env.DORKOS_VERSION_OVERRIDE;
|
|
84123
|
-
if (true) return "0.
|
|
84122
|
+
if (true) return "0.37.0";
|
|
84124
84123
|
const pkgPath = path4.join(path4.dirname(fileURLToPath2(import.meta.url)), "../../package.json");
|
|
84125
84124
|
return JSON.parse(readFileSync(pkgPath, "utf-8")).version;
|
|
84126
84125
|
}
|
|
@@ -86773,7 +86772,23 @@ var DeliveryMetricsSchema = z13.object({
|
|
|
86773
86772
|
import { z as z14 } from "zod";
|
|
86774
86773
|
import { extendZodWithOpenApi as extendZodWithOpenApi6 } from "@asteasolutions/zod-to-openapi";
|
|
86775
86774
|
extendZodWithOpenApi6(z14);
|
|
86776
|
-
var AgentRuntimeSchema = z14.enum([
|
|
86775
|
+
var AgentRuntimeSchema = z14.enum([
|
|
86776
|
+
"claude-code",
|
|
86777
|
+
"cursor",
|
|
86778
|
+
"codex",
|
|
86779
|
+
"windsurf",
|
|
86780
|
+
"gemini",
|
|
86781
|
+
"cline",
|
|
86782
|
+
"roo-code",
|
|
86783
|
+
"copilot",
|
|
86784
|
+
"amazon-q",
|
|
86785
|
+
"continue",
|
|
86786
|
+
"augment",
|
|
86787
|
+
"jetbrains-ai",
|
|
86788
|
+
"kilo-code",
|
|
86789
|
+
"trae",
|
|
86790
|
+
"other"
|
|
86791
|
+
]).openapi("AgentRuntime");
|
|
86777
86792
|
var AgentHealthStatusSchema = z14.enum(["active", "inactive", "stale", "unreachable"]).openapi("AgentHealthStatus");
|
|
86778
86793
|
var AgentBehaviorSchema = z14.object({
|
|
86779
86794
|
responseMode: z14.enum(["always", "direct-only", "mention-only", "silent"]).default("always"),
|
|
@@ -90366,7 +90381,7 @@ var ReaddirpStream = class extends Readable {
|
|
|
90366
90381
|
this._directoryFilter = normalizeFilter(opts.directoryFilter);
|
|
90367
90382
|
const statMethod = opts.lstat ? lstat : stat;
|
|
90368
90383
|
if (wantBigintFsStats) {
|
|
90369
|
-
this._stat = (
|
|
90384
|
+
this._stat = (path79) => statMethod(path79, { bigint: true });
|
|
90370
90385
|
} else {
|
|
90371
90386
|
this._stat = statMethod;
|
|
90372
90387
|
}
|
|
@@ -90391,8 +90406,8 @@ var ReaddirpStream = class extends Readable {
|
|
|
90391
90406
|
const par = this.parent;
|
|
90392
90407
|
const fil = par && par.files;
|
|
90393
90408
|
if (fil && fil.length > 0) {
|
|
90394
|
-
const { path:
|
|
90395
|
-
const slice = fil.splice(0, batch).map((dirent) => this._formatEntry(dirent,
|
|
90409
|
+
const { path: path79, depth } = par;
|
|
90410
|
+
const slice = fil.splice(0, batch).map((dirent) => this._formatEntry(dirent, path79));
|
|
90396
90411
|
const awaited = await Promise.all(slice);
|
|
90397
90412
|
for (const entry of awaited) {
|
|
90398
90413
|
if (!entry)
|
|
@@ -90432,20 +90447,20 @@ var ReaddirpStream = class extends Readable {
|
|
|
90432
90447
|
this.reading = false;
|
|
90433
90448
|
}
|
|
90434
90449
|
}
|
|
90435
|
-
async _exploreDir(
|
|
90450
|
+
async _exploreDir(path79, depth) {
|
|
90436
90451
|
let files;
|
|
90437
90452
|
try {
|
|
90438
|
-
files = await readdir(
|
|
90453
|
+
files = await readdir(path79, this._rdOptions);
|
|
90439
90454
|
} catch (error) {
|
|
90440
90455
|
this._onError(error);
|
|
90441
90456
|
}
|
|
90442
|
-
return { files, depth, path:
|
|
90457
|
+
return { files, depth, path: path79 };
|
|
90443
90458
|
}
|
|
90444
|
-
async _formatEntry(dirent,
|
|
90459
|
+
async _formatEntry(dirent, path79) {
|
|
90445
90460
|
let entry;
|
|
90446
90461
|
const basename5 = this._isDirent ? dirent.name : dirent;
|
|
90447
90462
|
try {
|
|
90448
|
-
const fullPath = presolve(pjoin(
|
|
90463
|
+
const fullPath = presolve(pjoin(path79, basename5));
|
|
90449
90464
|
entry = { path: prelative(this._root, fullPath), fullPath, basename: basename5 };
|
|
90450
90465
|
entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
|
|
90451
90466
|
} catch (err) {
|
|
@@ -90845,16 +90860,16 @@ var delFromSet = (main, prop, item) => {
|
|
|
90845
90860
|
};
|
|
90846
90861
|
var isEmptySet = (val) => val instanceof Set ? val.size === 0 : !val;
|
|
90847
90862
|
var FsWatchInstances = /* @__PURE__ */ new Map();
|
|
90848
|
-
function createFsWatchInstance(
|
|
90863
|
+
function createFsWatchInstance(path79, options, listener, errHandler, emitRaw) {
|
|
90849
90864
|
const handleEvent = (rawEvent, evPath) => {
|
|
90850
|
-
listener(
|
|
90851
|
-
emitRaw(rawEvent, evPath, { watchedPath:
|
|
90852
|
-
if (evPath &&
|
|
90853
|
-
fsWatchBroadcast(sysPath.resolve(
|
|
90865
|
+
listener(path79);
|
|
90866
|
+
emitRaw(rawEvent, evPath, { watchedPath: path79 });
|
|
90867
|
+
if (evPath && path79 !== evPath) {
|
|
90868
|
+
fsWatchBroadcast(sysPath.resolve(path79, evPath), KEY_LISTENERS, sysPath.join(path79, evPath));
|
|
90854
90869
|
}
|
|
90855
90870
|
};
|
|
90856
90871
|
try {
|
|
90857
|
-
return fs_watch(
|
|
90872
|
+
return fs_watch(path79, {
|
|
90858
90873
|
persistent: options.persistent
|
|
90859
90874
|
}, handleEvent);
|
|
90860
90875
|
} catch (error) {
|
|
@@ -90870,12 +90885,12 @@ var fsWatchBroadcast = (fullPath, listenerType, val1, val2, val3) => {
|
|
|
90870
90885
|
listener(val1, val2, val3);
|
|
90871
90886
|
});
|
|
90872
90887
|
};
|
|
90873
|
-
var setFsWatchListener = (
|
|
90888
|
+
var setFsWatchListener = (path79, fullPath, options, handlers) => {
|
|
90874
90889
|
const { listener, errHandler, rawEmitter } = handlers;
|
|
90875
90890
|
let cont = FsWatchInstances.get(fullPath);
|
|
90876
90891
|
let watcher;
|
|
90877
90892
|
if (!options.persistent) {
|
|
90878
|
-
watcher = createFsWatchInstance(
|
|
90893
|
+
watcher = createFsWatchInstance(path79, options, listener, errHandler, rawEmitter);
|
|
90879
90894
|
if (!watcher)
|
|
90880
90895
|
return;
|
|
90881
90896
|
return watcher.close.bind(watcher);
|
|
@@ -90886,7 +90901,7 @@ var setFsWatchListener = (path72, fullPath, options, handlers) => {
|
|
|
90886
90901
|
addAndConvert(cont, KEY_RAW, rawEmitter);
|
|
90887
90902
|
} else {
|
|
90888
90903
|
watcher = createFsWatchInstance(
|
|
90889
|
-
|
|
90904
|
+
path79,
|
|
90890
90905
|
options,
|
|
90891
90906
|
fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS),
|
|
90892
90907
|
errHandler,
|
|
@@ -90901,7 +90916,7 @@ var setFsWatchListener = (path72, fullPath, options, handlers) => {
|
|
|
90901
90916
|
cont.watcherUnusable = true;
|
|
90902
90917
|
if (isWindows2 && error.code === "EPERM") {
|
|
90903
90918
|
try {
|
|
90904
|
-
const fd = await open(
|
|
90919
|
+
const fd = await open(path79, "r");
|
|
90905
90920
|
await fd.close();
|
|
90906
90921
|
broadcastErr(error);
|
|
90907
90922
|
} catch (err) {
|
|
@@ -90932,7 +90947,7 @@ var setFsWatchListener = (path72, fullPath, options, handlers) => {
|
|
|
90932
90947
|
};
|
|
90933
90948
|
};
|
|
90934
90949
|
var FsWatchFileInstances = /* @__PURE__ */ new Map();
|
|
90935
|
-
var setFsWatchFileListener = (
|
|
90950
|
+
var setFsWatchFileListener = (path79, fullPath, options, handlers) => {
|
|
90936
90951
|
const { listener, rawEmitter } = handlers;
|
|
90937
90952
|
let cont = FsWatchFileInstances.get(fullPath);
|
|
90938
90953
|
const copts = cont && cont.options;
|
|
@@ -90954,7 +90969,7 @@ var setFsWatchFileListener = (path72, fullPath, options, handlers) => {
|
|
|
90954
90969
|
});
|
|
90955
90970
|
const currmtime = curr.mtimeMs;
|
|
90956
90971
|
if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) {
|
|
90957
|
-
foreach(cont.listeners, (listener2) => listener2(
|
|
90972
|
+
foreach(cont.listeners, (listener2) => listener2(path79, curr));
|
|
90958
90973
|
}
|
|
90959
90974
|
})
|
|
90960
90975
|
};
|
|
@@ -90982,13 +90997,13 @@ var NodeFsHandler = class {
|
|
|
90982
90997
|
* @param listener on fs change
|
|
90983
90998
|
* @returns closer for the watcher instance
|
|
90984
90999
|
*/
|
|
90985
|
-
_watchWithNodeFs(
|
|
91000
|
+
_watchWithNodeFs(path79, listener) {
|
|
90986
91001
|
const opts = this.fsw.options;
|
|
90987
|
-
const directory = sysPath.dirname(
|
|
90988
|
-
const basename5 = sysPath.basename(
|
|
91002
|
+
const directory = sysPath.dirname(path79);
|
|
91003
|
+
const basename5 = sysPath.basename(path79);
|
|
90989
91004
|
const parent = this.fsw._getWatchedDir(directory);
|
|
90990
91005
|
parent.add(basename5);
|
|
90991
|
-
const absolutePath = sysPath.resolve(
|
|
91006
|
+
const absolutePath = sysPath.resolve(path79);
|
|
90992
91007
|
const options = {
|
|
90993
91008
|
persistent: opts.persistent
|
|
90994
91009
|
};
|
|
@@ -90998,12 +91013,12 @@ var NodeFsHandler = class {
|
|
|
90998
91013
|
if (opts.usePolling) {
|
|
90999
91014
|
const enableBin = opts.interval !== opts.binaryInterval;
|
|
91000
91015
|
options.interval = enableBin && isBinaryPath(basename5) ? opts.binaryInterval : opts.interval;
|
|
91001
|
-
closer = setFsWatchFileListener(
|
|
91016
|
+
closer = setFsWatchFileListener(path79, absolutePath, options, {
|
|
91002
91017
|
listener,
|
|
91003
91018
|
rawEmitter: this.fsw._emitRaw
|
|
91004
91019
|
});
|
|
91005
91020
|
} else {
|
|
91006
|
-
closer = setFsWatchListener(
|
|
91021
|
+
closer = setFsWatchListener(path79, absolutePath, options, {
|
|
91007
91022
|
listener,
|
|
91008
91023
|
errHandler: this._boundHandleError,
|
|
91009
91024
|
rawEmitter: this.fsw._emitRaw
|
|
@@ -91025,7 +91040,7 @@ var NodeFsHandler = class {
|
|
|
91025
91040
|
let prevStats = stats;
|
|
91026
91041
|
if (parent.has(basename5))
|
|
91027
91042
|
return;
|
|
91028
|
-
const listener = async (
|
|
91043
|
+
const listener = async (path79, newStats) => {
|
|
91029
91044
|
if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5))
|
|
91030
91045
|
return;
|
|
91031
91046
|
if (!newStats || newStats.mtimeMs === 0) {
|
|
@@ -91039,11 +91054,11 @@ var NodeFsHandler = class {
|
|
|
91039
91054
|
this.fsw._emit(EV.CHANGE, file, newStats2);
|
|
91040
91055
|
}
|
|
91041
91056
|
if ((isMacos || isLinux || isFreeBSD) && prevStats.ino !== newStats2.ino) {
|
|
91042
|
-
this.fsw._closeFile(
|
|
91057
|
+
this.fsw._closeFile(path79);
|
|
91043
91058
|
prevStats = newStats2;
|
|
91044
91059
|
const closer2 = this._watchWithNodeFs(file, listener);
|
|
91045
91060
|
if (closer2)
|
|
91046
|
-
this.fsw._addPathCloser(
|
|
91061
|
+
this.fsw._addPathCloser(path79, closer2);
|
|
91047
91062
|
} else {
|
|
91048
91063
|
prevStats = newStats2;
|
|
91049
91064
|
}
|
|
@@ -91075,7 +91090,7 @@ var NodeFsHandler = class {
|
|
|
91075
91090
|
* @param item basename of this item
|
|
91076
91091
|
* @returns true if no more processing is needed for this entry.
|
|
91077
91092
|
*/
|
|
91078
|
-
async _handleSymlink(entry, directory,
|
|
91093
|
+
async _handleSymlink(entry, directory, path79, item) {
|
|
91079
91094
|
if (this.fsw.closed) {
|
|
91080
91095
|
return;
|
|
91081
91096
|
}
|
|
@@ -91085,7 +91100,7 @@ var NodeFsHandler = class {
|
|
|
91085
91100
|
this.fsw._incrReadyCount();
|
|
91086
91101
|
let linkPath;
|
|
91087
91102
|
try {
|
|
91088
|
-
linkPath = await fsrealpath(
|
|
91103
|
+
linkPath = await fsrealpath(path79);
|
|
91089
91104
|
} catch (e4) {
|
|
91090
91105
|
this.fsw._emitReady();
|
|
91091
91106
|
return true;
|
|
@@ -91095,12 +91110,12 @@ var NodeFsHandler = class {
|
|
|
91095
91110
|
if (dir.has(item)) {
|
|
91096
91111
|
if (this.fsw._symlinkPaths.get(full) !== linkPath) {
|
|
91097
91112
|
this.fsw._symlinkPaths.set(full, linkPath);
|
|
91098
|
-
this.fsw._emit(EV.CHANGE,
|
|
91113
|
+
this.fsw._emit(EV.CHANGE, path79, entry.stats);
|
|
91099
91114
|
}
|
|
91100
91115
|
} else {
|
|
91101
91116
|
dir.add(item);
|
|
91102
91117
|
this.fsw._symlinkPaths.set(full, linkPath);
|
|
91103
|
-
this.fsw._emit(EV.ADD,
|
|
91118
|
+
this.fsw._emit(EV.ADD, path79, entry.stats);
|
|
91104
91119
|
}
|
|
91105
91120
|
this.fsw._emitReady();
|
|
91106
91121
|
return true;
|
|
@@ -91129,9 +91144,9 @@ var NodeFsHandler = class {
|
|
|
91129
91144
|
return;
|
|
91130
91145
|
}
|
|
91131
91146
|
const item = entry.path;
|
|
91132
|
-
let
|
|
91147
|
+
let path79 = sysPath.join(directory, item);
|
|
91133
91148
|
current.add(item);
|
|
91134
|
-
if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory,
|
|
91149
|
+
if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path79, item)) {
|
|
91135
91150
|
return;
|
|
91136
91151
|
}
|
|
91137
91152
|
if (this.fsw.closed) {
|
|
@@ -91140,8 +91155,8 @@ var NodeFsHandler = class {
|
|
|
91140
91155
|
}
|
|
91141
91156
|
if (item === target || !target && !previous3.has(item)) {
|
|
91142
91157
|
this.fsw._incrReadyCount();
|
|
91143
|
-
|
|
91144
|
-
this._addToNodeFs(
|
|
91158
|
+
path79 = sysPath.join(dir, sysPath.relative(dir, path79));
|
|
91159
|
+
this._addToNodeFs(path79, initialAdd, wh, depth + 1);
|
|
91145
91160
|
}
|
|
91146
91161
|
}).on(EV.ERROR, this._boundHandleError);
|
|
91147
91162
|
return new Promise((resolve4, reject) => {
|
|
@@ -91210,13 +91225,13 @@ var NodeFsHandler = class {
|
|
|
91210
91225
|
* @param depth Child path actually targeted for watch
|
|
91211
91226
|
* @param target Child path actually targeted for watch
|
|
91212
91227
|
*/
|
|
91213
|
-
async _addToNodeFs(
|
|
91228
|
+
async _addToNodeFs(path79, initialAdd, priorWh, depth, target) {
|
|
91214
91229
|
const ready = this.fsw._emitReady;
|
|
91215
|
-
if (this.fsw._isIgnored(
|
|
91230
|
+
if (this.fsw._isIgnored(path79) || this.fsw.closed) {
|
|
91216
91231
|
ready();
|
|
91217
91232
|
return false;
|
|
91218
91233
|
}
|
|
91219
|
-
const wh = this.fsw._getWatchHelpers(
|
|
91234
|
+
const wh = this.fsw._getWatchHelpers(path79);
|
|
91220
91235
|
if (priorWh) {
|
|
91221
91236
|
wh.filterPath = (entry) => priorWh.filterPath(entry);
|
|
91222
91237
|
wh.filterDir = (entry) => priorWh.filterDir(entry);
|
|
@@ -91232,8 +91247,8 @@ var NodeFsHandler = class {
|
|
|
91232
91247
|
const follow = this.fsw.options.followSymlinks;
|
|
91233
91248
|
let closer;
|
|
91234
91249
|
if (stats.isDirectory()) {
|
|
91235
|
-
const absPath = sysPath.resolve(
|
|
91236
|
-
const targetPath = follow ? await fsrealpath(
|
|
91250
|
+
const absPath = sysPath.resolve(path79);
|
|
91251
|
+
const targetPath = follow ? await fsrealpath(path79) : path79;
|
|
91237
91252
|
if (this.fsw.closed)
|
|
91238
91253
|
return;
|
|
91239
91254
|
closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
|
|
@@ -91243,29 +91258,29 @@ var NodeFsHandler = class {
|
|
|
91243
91258
|
this.fsw._symlinkPaths.set(absPath, targetPath);
|
|
91244
91259
|
}
|
|
91245
91260
|
} else if (stats.isSymbolicLink()) {
|
|
91246
|
-
const targetPath = follow ? await fsrealpath(
|
|
91261
|
+
const targetPath = follow ? await fsrealpath(path79) : path79;
|
|
91247
91262
|
if (this.fsw.closed)
|
|
91248
91263
|
return;
|
|
91249
91264
|
const parent = sysPath.dirname(wh.watchPath);
|
|
91250
91265
|
this.fsw._getWatchedDir(parent).add(wh.watchPath);
|
|
91251
91266
|
this.fsw._emit(EV.ADD, wh.watchPath, stats);
|
|
91252
|
-
closer = await this._handleDir(parent, stats, initialAdd, depth,
|
|
91267
|
+
closer = await this._handleDir(parent, stats, initialAdd, depth, path79, wh, targetPath);
|
|
91253
91268
|
if (this.fsw.closed)
|
|
91254
91269
|
return;
|
|
91255
91270
|
if (targetPath !== void 0) {
|
|
91256
|
-
this.fsw._symlinkPaths.set(sysPath.resolve(
|
|
91271
|
+
this.fsw._symlinkPaths.set(sysPath.resolve(path79), targetPath);
|
|
91257
91272
|
}
|
|
91258
91273
|
} else {
|
|
91259
91274
|
closer = this._handleFile(wh.watchPath, stats, initialAdd);
|
|
91260
91275
|
}
|
|
91261
91276
|
ready();
|
|
91262
91277
|
if (closer)
|
|
91263
|
-
this.fsw._addPathCloser(
|
|
91278
|
+
this.fsw._addPathCloser(path79, closer);
|
|
91264
91279
|
return false;
|
|
91265
91280
|
} catch (error) {
|
|
91266
91281
|
if (this.fsw._handleError(error)) {
|
|
91267
91282
|
ready();
|
|
91268
|
-
return
|
|
91283
|
+
return path79;
|
|
91269
91284
|
}
|
|
91270
91285
|
}
|
|
91271
91286
|
}
|
|
@@ -91308,26 +91323,26 @@ function createPattern(matcher) {
|
|
|
91308
91323
|
}
|
|
91309
91324
|
return () => false;
|
|
91310
91325
|
}
|
|
91311
|
-
function normalizePath(
|
|
91312
|
-
if (typeof
|
|
91326
|
+
function normalizePath(path79) {
|
|
91327
|
+
if (typeof path79 !== "string")
|
|
91313
91328
|
throw new Error("string expected");
|
|
91314
|
-
|
|
91315
|
-
|
|
91329
|
+
path79 = sysPath2.normalize(path79);
|
|
91330
|
+
path79 = path79.replace(/\\/g, "/");
|
|
91316
91331
|
let prepend = false;
|
|
91317
|
-
if (
|
|
91332
|
+
if (path79.startsWith("//"))
|
|
91318
91333
|
prepend = true;
|
|
91319
91334
|
const DOUBLE_SLASH_RE2 = /\/\//;
|
|
91320
|
-
while (
|
|
91321
|
-
|
|
91335
|
+
while (path79.match(DOUBLE_SLASH_RE2))
|
|
91336
|
+
path79 = path79.replace(DOUBLE_SLASH_RE2, "/");
|
|
91322
91337
|
if (prepend)
|
|
91323
|
-
|
|
91324
|
-
return
|
|
91338
|
+
path79 = "/" + path79;
|
|
91339
|
+
return path79;
|
|
91325
91340
|
}
|
|
91326
91341
|
function matchPatterns(patterns, testString, stats) {
|
|
91327
|
-
const
|
|
91342
|
+
const path79 = normalizePath(testString);
|
|
91328
91343
|
for (let index3 = 0; index3 < patterns.length; index3++) {
|
|
91329
91344
|
const pattern = patterns[index3];
|
|
91330
|
-
if (pattern(
|
|
91345
|
+
if (pattern(path79, stats)) {
|
|
91331
91346
|
return true;
|
|
91332
91347
|
}
|
|
91333
91348
|
}
|
|
@@ -91367,19 +91382,19 @@ var toUnix = (string4) => {
|
|
|
91367
91382
|
}
|
|
91368
91383
|
return str;
|
|
91369
91384
|
};
|
|
91370
|
-
var normalizePathToUnix = (
|
|
91371
|
-
var normalizeIgnored = (cwd = "") => (
|
|
91372
|
-
if (typeof
|
|
91373
|
-
return normalizePathToUnix(sysPath2.isAbsolute(
|
|
91385
|
+
var normalizePathToUnix = (path79) => toUnix(sysPath2.normalize(toUnix(path79)));
|
|
91386
|
+
var normalizeIgnored = (cwd = "") => (path79) => {
|
|
91387
|
+
if (typeof path79 === "string") {
|
|
91388
|
+
return normalizePathToUnix(sysPath2.isAbsolute(path79) ? path79 : sysPath2.join(cwd, path79));
|
|
91374
91389
|
} else {
|
|
91375
|
-
return
|
|
91390
|
+
return path79;
|
|
91376
91391
|
}
|
|
91377
91392
|
};
|
|
91378
|
-
var getAbsolutePath = (
|
|
91379
|
-
if (sysPath2.isAbsolute(
|
|
91380
|
-
return
|
|
91393
|
+
var getAbsolutePath = (path79, cwd) => {
|
|
91394
|
+
if (sysPath2.isAbsolute(path79)) {
|
|
91395
|
+
return path79;
|
|
91381
91396
|
}
|
|
91382
|
-
return sysPath2.join(cwd,
|
|
91397
|
+
return sysPath2.join(cwd, path79);
|
|
91383
91398
|
};
|
|
91384
91399
|
var EMPTY_SET = Object.freeze(/* @__PURE__ */ new Set());
|
|
91385
91400
|
var DirEntry = class {
|
|
@@ -91434,10 +91449,10 @@ var DirEntry = class {
|
|
|
91434
91449
|
var STAT_METHOD_F = "stat";
|
|
91435
91450
|
var STAT_METHOD_L = "lstat";
|
|
91436
91451
|
var WatchHelper = class {
|
|
91437
|
-
constructor(
|
|
91452
|
+
constructor(path79, follow, fsw) {
|
|
91438
91453
|
this.fsw = fsw;
|
|
91439
|
-
const watchPath =
|
|
91440
|
-
this.path =
|
|
91454
|
+
const watchPath = path79;
|
|
91455
|
+
this.path = path79 = path79.replace(REPLACER_RE, "");
|
|
91441
91456
|
this.watchPath = watchPath;
|
|
91442
91457
|
this.fullWatchPath = sysPath2.resolve(watchPath);
|
|
91443
91458
|
this.dirParts = [];
|
|
@@ -91559,20 +91574,20 @@ var FSWatcher = class extends EventEmitter2 {
|
|
|
91559
91574
|
this._closePromise = void 0;
|
|
91560
91575
|
let paths = unifyPaths(paths_);
|
|
91561
91576
|
if (cwd) {
|
|
91562
|
-
paths = paths.map((
|
|
91563
|
-
const absPath = getAbsolutePath(
|
|
91577
|
+
paths = paths.map((path79) => {
|
|
91578
|
+
const absPath = getAbsolutePath(path79, cwd);
|
|
91564
91579
|
return absPath;
|
|
91565
91580
|
});
|
|
91566
91581
|
}
|
|
91567
|
-
paths.forEach((
|
|
91568
|
-
this._removeIgnoredPath(
|
|
91582
|
+
paths.forEach((path79) => {
|
|
91583
|
+
this._removeIgnoredPath(path79);
|
|
91569
91584
|
});
|
|
91570
91585
|
this._userIgnored = void 0;
|
|
91571
91586
|
if (!this._readyCount)
|
|
91572
91587
|
this._readyCount = 0;
|
|
91573
91588
|
this._readyCount += paths.length;
|
|
91574
|
-
Promise.all(paths.map(async (
|
|
91575
|
-
const res = await this._nodeFsHandler._addToNodeFs(
|
|
91589
|
+
Promise.all(paths.map(async (path79) => {
|
|
91590
|
+
const res = await this._nodeFsHandler._addToNodeFs(path79, !_internal2, void 0, 0, _origAdd);
|
|
91576
91591
|
if (res)
|
|
91577
91592
|
this._emitReady();
|
|
91578
91593
|
return res;
|
|
@@ -91594,17 +91609,17 @@ var FSWatcher = class extends EventEmitter2 {
|
|
|
91594
91609
|
return this;
|
|
91595
91610
|
const paths = unifyPaths(paths_);
|
|
91596
91611
|
const { cwd } = this.options;
|
|
91597
|
-
paths.forEach((
|
|
91598
|
-
if (!sysPath2.isAbsolute(
|
|
91612
|
+
paths.forEach((path79) => {
|
|
91613
|
+
if (!sysPath2.isAbsolute(path79) && !this._closers.has(path79)) {
|
|
91599
91614
|
if (cwd)
|
|
91600
|
-
|
|
91601
|
-
|
|
91615
|
+
path79 = sysPath2.join(cwd, path79);
|
|
91616
|
+
path79 = sysPath2.resolve(path79);
|
|
91602
91617
|
}
|
|
91603
|
-
this._closePath(
|
|
91604
|
-
this._addIgnoredPath(
|
|
91605
|
-
if (this._watched.has(
|
|
91618
|
+
this._closePath(path79);
|
|
91619
|
+
this._addIgnoredPath(path79);
|
|
91620
|
+
if (this._watched.has(path79)) {
|
|
91606
91621
|
this._addIgnoredPath({
|
|
91607
|
-
path:
|
|
91622
|
+
path: path79,
|
|
91608
91623
|
recursive: true
|
|
91609
91624
|
});
|
|
91610
91625
|
}
|
|
@@ -91668,38 +91683,38 @@ var FSWatcher = class extends EventEmitter2 {
|
|
|
91668
91683
|
* @param stats arguments to be passed with event
|
|
91669
91684
|
* @returns the error if defined, otherwise the value of the FSWatcher instance's `closed` flag
|
|
91670
91685
|
*/
|
|
91671
|
-
async _emit(event,
|
|
91686
|
+
async _emit(event, path79, stats) {
|
|
91672
91687
|
if (this.closed)
|
|
91673
91688
|
return;
|
|
91674
91689
|
const opts = this.options;
|
|
91675
91690
|
if (isWindows2)
|
|
91676
|
-
|
|
91691
|
+
path79 = sysPath2.normalize(path79);
|
|
91677
91692
|
if (opts.cwd)
|
|
91678
|
-
|
|
91679
|
-
const args = [
|
|
91693
|
+
path79 = sysPath2.relative(opts.cwd, path79);
|
|
91694
|
+
const args = [path79];
|
|
91680
91695
|
if (stats != null)
|
|
91681
91696
|
args.push(stats);
|
|
91682
91697
|
const awf = opts.awaitWriteFinish;
|
|
91683
91698
|
let pw;
|
|
91684
|
-
if (awf && (pw = this._pendingWrites.get(
|
|
91699
|
+
if (awf && (pw = this._pendingWrites.get(path79))) {
|
|
91685
91700
|
pw.lastChange = /* @__PURE__ */ new Date();
|
|
91686
91701
|
return this;
|
|
91687
91702
|
}
|
|
91688
91703
|
if (opts.atomic) {
|
|
91689
91704
|
if (event === EVENTS.UNLINK) {
|
|
91690
|
-
this._pendingUnlinks.set(
|
|
91705
|
+
this._pendingUnlinks.set(path79, [event, ...args]);
|
|
91691
91706
|
setTimeout(() => {
|
|
91692
|
-
this._pendingUnlinks.forEach((entry,
|
|
91707
|
+
this._pendingUnlinks.forEach((entry, path80) => {
|
|
91693
91708
|
this.emit(...entry);
|
|
91694
91709
|
this.emit(EVENTS.ALL, ...entry);
|
|
91695
|
-
this._pendingUnlinks.delete(
|
|
91710
|
+
this._pendingUnlinks.delete(path80);
|
|
91696
91711
|
});
|
|
91697
91712
|
}, typeof opts.atomic === "number" ? opts.atomic : 100);
|
|
91698
91713
|
return this;
|
|
91699
91714
|
}
|
|
91700
|
-
if (event === EVENTS.ADD && this._pendingUnlinks.has(
|
|
91715
|
+
if (event === EVENTS.ADD && this._pendingUnlinks.has(path79)) {
|
|
91701
91716
|
event = EVENTS.CHANGE;
|
|
91702
|
-
this._pendingUnlinks.delete(
|
|
91717
|
+
this._pendingUnlinks.delete(path79);
|
|
91703
91718
|
}
|
|
91704
91719
|
}
|
|
91705
91720
|
if (awf && (event === EVENTS.ADD || event === EVENTS.CHANGE) && this._readyEmitted) {
|
|
@@ -91717,16 +91732,16 @@ var FSWatcher = class extends EventEmitter2 {
|
|
|
91717
91732
|
this.emitWithAll(event, args);
|
|
91718
91733
|
}
|
|
91719
91734
|
};
|
|
91720
|
-
this._awaitWriteFinish(
|
|
91735
|
+
this._awaitWriteFinish(path79, awf.stabilityThreshold, event, awfEmit);
|
|
91721
91736
|
return this;
|
|
91722
91737
|
}
|
|
91723
91738
|
if (event === EVENTS.CHANGE) {
|
|
91724
|
-
const isThrottled = !this._throttle(EVENTS.CHANGE,
|
|
91739
|
+
const isThrottled = !this._throttle(EVENTS.CHANGE, path79, 50);
|
|
91725
91740
|
if (isThrottled)
|
|
91726
91741
|
return this;
|
|
91727
91742
|
}
|
|
91728
91743
|
if (opts.alwaysStat && stats === void 0 && (event === EVENTS.ADD || event === EVENTS.ADD_DIR || event === EVENTS.CHANGE)) {
|
|
91729
|
-
const fullPath = opts.cwd ? sysPath2.join(opts.cwd,
|
|
91744
|
+
const fullPath = opts.cwd ? sysPath2.join(opts.cwd, path79) : path79;
|
|
91730
91745
|
let stats2;
|
|
91731
91746
|
try {
|
|
91732
91747
|
stats2 = await stat3(fullPath);
|
|
@@ -91757,23 +91772,23 @@ var FSWatcher = class extends EventEmitter2 {
|
|
|
91757
91772
|
* @param timeout duration of time to suppress duplicate actions
|
|
91758
91773
|
* @returns tracking object or false if action should be suppressed
|
|
91759
91774
|
*/
|
|
91760
|
-
_throttle(actionType,
|
|
91775
|
+
_throttle(actionType, path79, timeout) {
|
|
91761
91776
|
if (!this._throttled.has(actionType)) {
|
|
91762
91777
|
this._throttled.set(actionType, /* @__PURE__ */ new Map());
|
|
91763
91778
|
}
|
|
91764
91779
|
const action = this._throttled.get(actionType);
|
|
91765
91780
|
if (!action)
|
|
91766
91781
|
throw new Error("invalid throttle");
|
|
91767
|
-
const actionPath = action.get(
|
|
91782
|
+
const actionPath = action.get(path79);
|
|
91768
91783
|
if (actionPath) {
|
|
91769
91784
|
actionPath.count++;
|
|
91770
91785
|
return false;
|
|
91771
91786
|
}
|
|
91772
91787
|
let timeoutObject;
|
|
91773
91788
|
const clear = () => {
|
|
91774
|
-
const item = action.get(
|
|
91789
|
+
const item = action.get(path79);
|
|
91775
91790
|
const count2 = item ? item.count : 0;
|
|
91776
|
-
action.delete(
|
|
91791
|
+
action.delete(path79);
|
|
91777
91792
|
clearTimeout(timeoutObject);
|
|
91778
91793
|
if (item)
|
|
91779
91794
|
clearTimeout(item.timeoutObject);
|
|
@@ -91781,7 +91796,7 @@ var FSWatcher = class extends EventEmitter2 {
|
|
|
91781
91796
|
};
|
|
91782
91797
|
timeoutObject = setTimeout(clear, timeout);
|
|
91783
91798
|
const thr = { timeoutObject, clear, count: 0 };
|
|
91784
|
-
action.set(
|
|
91799
|
+
action.set(path79, thr);
|
|
91785
91800
|
return thr;
|
|
91786
91801
|
}
|
|
91787
91802
|
_incrReadyCount() {
|
|
@@ -91795,44 +91810,44 @@ var FSWatcher = class extends EventEmitter2 {
|
|
|
91795
91810
|
* @param event
|
|
91796
91811
|
* @param awfEmit Callback to be called when ready for event to be emitted.
|
|
91797
91812
|
*/
|
|
91798
|
-
_awaitWriteFinish(
|
|
91813
|
+
_awaitWriteFinish(path79, threshold, event, awfEmit) {
|
|
91799
91814
|
const awf = this.options.awaitWriteFinish;
|
|
91800
91815
|
if (typeof awf !== "object")
|
|
91801
91816
|
return;
|
|
91802
91817
|
const pollInterval = awf.pollInterval;
|
|
91803
91818
|
let timeoutHandler;
|
|
91804
|
-
let fullPath =
|
|
91805
|
-
if (this.options.cwd && !sysPath2.isAbsolute(
|
|
91806
|
-
fullPath = sysPath2.join(this.options.cwd,
|
|
91819
|
+
let fullPath = path79;
|
|
91820
|
+
if (this.options.cwd && !sysPath2.isAbsolute(path79)) {
|
|
91821
|
+
fullPath = sysPath2.join(this.options.cwd, path79);
|
|
91807
91822
|
}
|
|
91808
91823
|
const now = /* @__PURE__ */ new Date();
|
|
91809
91824
|
const writes = this._pendingWrites;
|
|
91810
91825
|
function awaitWriteFinishFn(prevStat) {
|
|
91811
91826
|
statcb(fullPath, (err, curStat) => {
|
|
91812
|
-
if (err || !writes.has(
|
|
91827
|
+
if (err || !writes.has(path79)) {
|
|
91813
91828
|
if (err && err.code !== "ENOENT")
|
|
91814
91829
|
awfEmit(err);
|
|
91815
91830
|
return;
|
|
91816
91831
|
}
|
|
91817
91832
|
const now2 = Number(/* @__PURE__ */ new Date());
|
|
91818
91833
|
if (prevStat && curStat.size !== prevStat.size) {
|
|
91819
|
-
writes.get(
|
|
91834
|
+
writes.get(path79).lastChange = now2;
|
|
91820
91835
|
}
|
|
91821
|
-
const pw = writes.get(
|
|
91836
|
+
const pw = writes.get(path79);
|
|
91822
91837
|
const df = now2 - pw.lastChange;
|
|
91823
91838
|
if (df >= threshold) {
|
|
91824
|
-
writes.delete(
|
|
91839
|
+
writes.delete(path79);
|
|
91825
91840
|
awfEmit(void 0, curStat);
|
|
91826
91841
|
} else {
|
|
91827
91842
|
timeoutHandler = setTimeout(awaitWriteFinishFn, pollInterval, curStat);
|
|
91828
91843
|
}
|
|
91829
91844
|
});
|
|
91830
91845
|
}
|
|
91831
|
-
if (!writes.has(
|
|
91832
|
-
writes.set(
|
|
91846
|
+
if (!writes.has(path79)) {
|
|
91847
|
+
writes.set(path79, {
|
|
91833
91848
|
lastChange: now,
|
|
91834
91849
|
cancelWait: () => {
|
|
91835
|
-
writes.delete(
|
|
91850
|
+
writes.delete(path79);
|
|
91836
91851
|
clearTimeout(timeoutHandler);
|
|
91837
91852
|
return event;
|
|
91838
91853
|
}
|
|
@@ -91843,8 +91858,8 @@ var FSWatcher = class extends EventEmitter2 {
|
|
|
91843
91858
|
/**
|
|
91844
91859
|
* Determines whether user has asked to ignore this path.
|
|
91845
91860
|
*/
|
|
91846
|
-
_isIgnored(
|
|
91847
|
-
if (this.options.atomic && DOT_RE.test(
|
|
91861
|
+
_isIgnored(path79, stats) {
|
|
91862
|
+
if (this.options.atomic && DOT_RE.test(path79))
|
|
91848
91863
|
return true;
|
|
91849
91864
|
if (!this._userIgnored) {
|
|
91850
91865
|
const { cwd } = this.options;
|
|
@@ -91854,17 +91869,17 @@ var FSWatcher = class extends EventEmitter2 {
|
|
|
91854
91869
|
const list5 = [...ignoredPaths.map(normalizeIgnored(cwd)), ...ignored];
|
|
91855
91870
|
this._userIgnored = anymatch(list5, void 0);
|
|
91856
91871
|
}
|
|
91857
|
-
return this._userIgnored(
|
|
91872
|
+
return this._userIgnored(path79, stats);
|
|
91858
91873
|
}
|
|
91859
|
-
_isntIgnored(
|
|
91860
|
-
return !this._isIgnored(
|
|
91874
|
+
_isntIgnored(path79, stat14) {
|
|
91875
|
+
return !this._isIgnored(path79, stat14);
|
|
91861
91876
|
}
|
|
91862
91877
|
/**
|
|
91863
91878
|
* Provides a set of common helpers and properties relating to symlink handling.
|
|
91864
91879
|
* @param path file or directory pattern being watched
|
|
91865
91880
|
*/
|
|
91866
|
-
_getWatchHelpers(
|
|
91867
|
-
return new WatchHelper(
|
|
91881
|
+
_getWatchHelpers(path79) {
|
|
91882
|
+
return new WatchHelper(path79, this.options.followSymlinks, this);
|
|
91868
91883
|
}
|
|
91869
91884
|
// Directory helpers
|
|
91870
91885
|
// -----------------
|
|
@@ -91896,63 +91911,63 @@ var FSWatcher = class extends EventEmitter2 {
|
|
|
91896
91911
|
* @param item base path of item/directory
|
|
91897
91912
|
*/
|
|
91898
91913
|
_remove(directory, item, isDirectory) {
|
|
91899
|
-
const
|
|
91900
|
-
const fullPath = sysPath2.resolve(
|
|
91901
|
-
isDirectory = isDirectory != null ? isDirectory : this._watched.has(
|
|
91902
|
-
if (!this._throttle("remove",
|
|
91914
|
+
const path79 = sysPath2.join(directory, item);
|
|
91915
|
+
const fullPath = sysPath2.resolve(path79);
|
|
91916
|
+
isDirectory = isDirectory != null ? isDirectory : this._watched.has(path79) || this._watched.has(fullPath);
|
|
91917
|
+
if (!this._throttle("remove", path79, 100))
|
|
91903
91918
|
return;
|
|
91904
91919
|
if (!isDirectory && this._watched.size === 1) {
|
|
91905
91920
|
this.add(directory, item, true);
|
|
91906
91921
|
}
|
|
91907
|
-
const wp = this._getWatchedDir(
|
|
91922
|
+
const wp = this._getWatchedDir(path79);
|
|
91908
91923
|
const nestedDirectoryChildren = wp.getChildren();
|
|
91909
|
-
nestedDirectoryChildren.forEach((nested) => this._remove(
|
|
91924
|
+
nestedDirectoryChildren.forEach((nested) => this._remove(path79, nested));
|
|
91910
91925
|
const parent = this._getWatchedDir(directory);
|
|
91911
91926
|
const wasTracked = parent.has(item);
|
|
91912
91927
|
parent.remove(item);
|
|
91913
91928
|
if (this._symlinkPaths.has(fullPath)) {
|
|
91914
91929
|
this._symlinkPaths.delete(fullPath);
|
|
91915
91930
|
}
|
|
91916
|
-
let relPath =
|
|
91931
|
+
let relPath = path79;
|
|
91917
91932
|
if (this.options.cwd)
|
|
91918
|
-
relPath = sysPath2.relative(this.options.cwd,
|
|
91933
|
+
relPath = sysPath2.relative(this.options.cwd, path79);
|
|
91919
91934
|
if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
|
|
91920
91935
|
const event = this._pendingWrites.get(relPath).cancelWait();
|
|
91921
91936
|
if (event === EVENTS.ADD)
|
|
91922
91937
|
return;
|
|
91923
91938
|
}
|
|
91924
|
-
this._watched.delete(
|
|
91939
|
+
this._watched.delete(path79);
|
|
91925
91940
|
this._watched.delete(fullPath);
|
|
91926
91941
|
const eventName = isDirectory ? EVENTS.UNLINK_DIR : EVENTS.UNLINK;
|
|
91927
|
-
if (wasTracked && !this._isIgnored(
|
|
91928
|
-
this._emit(eventName,
|
|
91929
|
-
this._closePath(
|
|
91942
|
+
if (wasTracked && !this._isIgnored(path79))
|
|
91943
|
+
this._emit(eventName, path79);
|
|
91944
|
+
this._closePath(path79);
|
|
91930
91945
|
}
|
|
91931
91946
|
/**
|
|
91932
91947
|
* Closes all watchers for a path
|
|
91933
91948
|
*/
|
|
91934
|
-
_closePath(
|
|
91935
|
-
this._closeFile(
|
|
91936
|
-
const dir = sysPath2.dirname(
|
|
91937
|
-
this._getWatchedDir(dir).remove(sysPath2.basename(
|
|
91949
|
+
_closePath(path79) {
|
|
91950
|
+
this._closeFile(path79);
|
|
91951
|
+
const dir = sysPath2.dirname(path79);
|
|
91952
|
+
this._getWatchedDir(dir).remove(sysPath2.basename(path79));
|
|
91938
91953
|
}
|
|
91939
91954
|
/**
|
|
91940
91955
|
* Closes only file-specific watchers
|
|
91941
91956
|
*/
|
|
91942
|
-
_closeFile(
|
|
91943
|
-
const closers = this._closers.get(
|
|
91957
|
+
_closeFile(path79) {
|
|
91958
|
+
const closers = this._closers.get(path79);
|
|
91944
91959
|
if (!closers)
|
|
91945
91960
|
return;
|
|
91946
91961
|
closers.forEach((closer) => closer());
|
|
91947
|
-
this._closers.delete(
|
|
91962
|
+
this._closers.delete(path79);
|
|
91948
91963
|
}
|
|
91949
|
-
_addPathCloser(
|
|
91964
|
+
_addPathCloser(path79, closer) {
|
|
91950
91965
|
if (!closer)
|
|
91951
91966
|
return;
|
|
91952
|
-
let list5 = this._closers.get(
|
|
91967
|
+
let list5 = this._closers.get(path79);
|
|
91953
91968
|
if (!list5) {
|
|
91954
91969
|
list5 = [];
|
|
91955
|
-
this._closers.set(
|
|
91970
|
+
this._closers.set(path79, list5);
|
|
91956
91971
|
}
|
|
91957
91972
|
list5.push(closer);
|
|
91958
91973
|
}
|
|
@@ -95996,7 +96011,7 @@ import { tool as tool9 } from "@anthropic-ai/claude-agent-sdk";
|
|
|
95996
96011
|
import { z as z36 } from "zod";
|
|
95997
96012
|
var DEFAULT_UI_STATE = {
|
|
95998
96013
|
canvas: { open: false, contentType: null },
|
|
95999
|
-
panels: { settings: false, tasks: false, relay: false
|
|
96014
|
+
panels: { settings: false, tasks: false, relay: false },
|
|
96000
96015
|
sidebar: { open: true, activeTab: "overview" },
|
|
96001
96016
|
agent: { id: null, cwd: null }
|
|
96002
96017
|
};
|
|
@@ -98389,7 +98404,7 @@ var QueryPromise = class {
|
|
|
98389
98404
|
function mapResultRow(columns, row, joinsNotNullableMap) {
|
|
98390
98405
|
const nullifyMap = {};
|
|
98391
98406
|
const result2 = columns.reduce(
|
|
98392
|
-
(result22, { path:
|
|
98407
|
+
(result22, { path: path79, field }, columnIndex) => {
|
|
98393
98408
|
let decoder;
|
|
98394
98409
|
if (is(field, Column)) {
|
|
98395
98410
|
decoder = field;
|
|
@@ -98399,8 +98414,8 @@ function mapResultRow(columns, row, joinsNotNullableMap) {
|
|
|
98399
98414
|
decoder = field.sql.decoder;
|
|
98400
98415
|
}
|
|
98401
98416
|
let node2 = result22;
|
|
98402
|
-
for (const [pathChunkIndex, pathChunk] of
|
|
98403
|
-
if (pathChunkIndex <
|
|
98417
|
+
for (const [pathChunkIndex, pathChunk] of path79.entries()) {
|
|
98418
|
+
if (pathChunkIndex < path79.length - 1) {
|
|
98404
98419
|
if (!(pathChunk in node2)) {
|
|
98405
98420
|
node2[pathChunk] = {};
|
|
98406
98421
|
}
|
|
@@ -98408,8 +98423,8 @@ function mapResultRow(columns, row, joinsNotNullableMap) {
|
|
|
98408
98423
|
} else {
|
|
98409
98424
|
const rawValue = row[columnIndex];
|
|
98410
98425
|
const value = node2[pathChunk] = rawValue === null ? null : decoder.mapFromDriverValue(rawValue);
|
|
98411
|
-
if (joinsNotNullableMap && is(field, Column) &&
|
|
98412
|
-
const objectName =
|
|
98426
|
+
if (joinsNotNullableMap && is(field, Column) && path79.length === 2) {
|
|
98427
|
+
const objectName = path79[0];
|
|
98413
98428
|
if (!(objectName in nullifyMap)) {
|
|
98414
98429
|
nullifyMap[objectName] = value === null ? getTableName(field.table) : false;
|
|
98415
98430
|
} else if (typeof nullifyMap[objectName] === "string" && nullifyMap[objectName] !== getTableName(field.table)) {
|
|
@@ -107535,13 +107550,13 @@ var VFile = class {
|
|
|
107535
107550
|
* @returns {undefined}
|
|
107536
107551
|
* Nothing.
|
|
107537
107552
|
*/
|
|
107538
|
-
set path(
|
|
107539
|
-
if (isUrl(
|
|
107540
|
-
|
|
107553
|
+
set path(path79) {
|
|
107554
|
+
if (isUrl(path79)) {
|
|
107555
|
+
path79 = fileURLToPath5(path79);
|
|
107541
107556
|
}
|
|
107542
|
-
assertNonEmpty(
|
|
107543
|
-
if (this.path !==
|
|
107544
|
-
this.history.push(
|
|
107557
|
+
assertNonEmpty(path79, "path");
|
|
107558
|
+
if (this.path !== path79) {
|
|
107559
|
+
this.history.push(path79);
|
|
107545
107560
|
}
|
|
107546
107561
|
}
|
|
107547
107562
|
/**
|
|
@@ -107808,8 +107823,8 @@ function assertNonEmpty(part, name) {
|
|
|
107808
107823
|
throw new Error("`" + name + "` cannot be empty");
|
|
107809
107824
|
}
|
|
107810
107825
|
}
|
|
107811
|
-
function assertPath(
|
|
107812
|
-
if (!
|
|
107826
|
+
function assertPath(path79, name) {
|
|
107827
|
+
if (!path79) {
|
|
107813
107828
|
throw new Error("Setting `" + name + "` requires `path` to be set too");
|
|
107814
107829
|
}
|
|
107815
107830
|
}
|
|
@@ -117294,7 +117309,7 @@ function transformGfmAutolinkLiterals(tree) {
|
|
|
117294
117309
|
{ ignore: ["link", "linkReference"] }
|
|
117295
117310
|
);
|
|
117296
117311
|
}
|
|
117297
|
-
function findUrl(_6, protocol, domain2,
|
|
117312
|
+
function findUrl(_6, protocol, domain2, path79, match) {
|
|
117298
117313
|
let prefix = "";
|
|
117299
117314
|
if (!previous2(match)) {
|
|
117300
117315
|
return false;
|
|
@@ -117307,7 +117322,7 @@ function findUrl(_6, protocol, domain2, path72, match) {
|
|
|
117307
117322
|
if (!isCorrectDomain(domain2)) {
|
|
117308
117323
|
return false;
|
|
117309
117324
|
}
|
|
117310
|
-
const parts = splitUrl(domain2 +
|
|
117325
|
+
const parts = splitUrl(domain2 + path79);
|
|
117311
117326
|
if (!parts[0]) return false;
|
|
117312
117327
|
const result2 = {
|
|
117313
117328
|
type: "link",
|
|
@@ -133381,21 +133396,25 @@ var TopologyManager = class {
|
|
|
133381
133396
|
// ../mesh/dist/strategies/claude-code-strategy.js
|
|
133382
133397
|
import fs22 from "fs/promises";
|
|
133383
133398
|
import path40 from "path";
|
|
133384
|
-
var
|
|
133399
|
+
var MAX_MD_BYTES = 4096;
|
|
133400
|
+
var DETECTION_FILES = ["CLAUDE.md", "AGENTS.md"];
|
|
133385
133401
|
var ClaudeCodeStrategy = class {
|
|
133386
133402
|
name = "claude-code";
|
|
133387
133403
|
runtime = "claude-code";
|
|
133388
133404
|
async detect(dir) {
|
|
133389
|
-
|
|
133390
|
-
|
|
133391
|
-
|
|
133392
|
-
|
|
133393
|
-
|
|
133405
|
+
for (const file of DETECTION_FILES) {
|
|
133406
|
+
try {
|
|
133407
|
+
const stat14 = await fs22.stat(path40.join(dir, file));
|
|
133408
|
+
if (stat14.isFile())
|
|
133409
|
+
return true;
|
|
133410
|
+
} catch {
|
|
133411
|
+
}
|
|
133394
133412
|
}
|
|
133413
|
+
return false;
|
|
133395
133414
|
}
|
|
133396
133415
|
async extractHints(dir) {
|
|
133397
133416
|
const suggestedName = path40.basename(dir);
|
|
133398
|
-
const description = await this.extractDescription(dir);
|
|
133417
|
+
const description = await this.extractDescription(dir, "CLAUDE.md") ?? await this.extractDescription(dir, "AGENTS.md");
|
|
133399
133418
|
return {
|
|
133400
133419
|
suggestedName,
|
|
133401
133420
|
detectedRuntime: "claude-code",
|
|
@@ -133404,17 +133423,17 @@ var ClaudeCodeStrategy = class {
|
|
|
133404
133423
|
};
|
|
133405
133424
|
}
|
|
133406
133425
|
/**
|
|
133407
|
-
* Extract a description from
|
|
133426
|
+
* Extract a description from a markdown file at the project root.
|
|
133408
133427
|
*
|
|
133409
133428
|
* Reads the first chunk and returns the first non-heading paragraph.
|
|
133410
133429
|
*/
|
|
133411
|
-
async extractDescription(dir) {
|
|
133430
|
+
async extractDescription(dir, filename) {
|
|
133412
133431
|
try {
|
|
133413
|
-
const
|
|
133414
|
-
const fd = await fs22.open(
|
|
133432
|
+
const mdPath = path40.join(dir, filename);
|
|
133433
|
+
const fd = await fs22.open(mdPath, "r");
|
|
133415
133434
|
try {
|
|
133416
|
-
const buf = Buffer.alloc(
|
|
133417
|
-
const { bytesRead } = await fd.read(buf, 0,
|
|
133435
|
+
const buf = Buffer.alloc(MAX_MD_BYTES);
|
|
133436
|
+
const { bytesRead } = await fd.read(buf, 0, MAX_MD_BYTES, 0);
|
|
133418
133437
|
const content3 = buf.toString("utf-8", 0, bytesRead);
|
|
133419
133438
|
return extractFirstParagraph(content3);
|
|
133420
133439
|
} finally {
|
|
@@ -133461,7 +133480,13 @@ var CursorStrategy = class {
|
|
|
133461
133480
|
async detect(dir) {
|
|
133462
133481
|
try {
|
|
133463
133482
|
const stat14 = await fs23.stat(path41.join(dir, ".cursor"));
|
|
133464
|
-
|
|
133483
|
+
if (stat14.isDirectory())
|
|
133484
|
+
return true;
|
|
133485
|
+
} catch {
|
|
133486
|
+
}
|
|
133487
|
+
try {
|
|
133488
|
+
const stat14 = await fs23.stat(path41.join(dir, ".cursorrules"));
|
|
133489
|
+
return stat14.isFile();
|
|
133465
133490
|
} catch {
|
|
133466
133491
|
return false;
|
|
133467
133492
|
}
|
|
@@ -133498,11 +133523,197 @@ var CodexStrategy = class {
|
|
|
133498
133523
|
}
|
|
133499
133524
|
};
|
|
133500
133525
|
|
|
133526
|
+
// ../mesh/dist/strategies/windsurf-strategy.js
|
|
133527
|
+
import fs25 from "fs/promises";
|
|
133528
|
+
import path43 from "path";
|
|
133529
|
+
var WindsurfStrategy = class {
|
|
133530
|
+
name = "windsurf";
|
|
133531
|
+
runtime = "windsurf";
|
|
133532
|
+
async detect(dir) {
|
|
133533
|
+
try {
|
|
133534
|
+
const stat14 = await fs25.stat(path43.join(dir, ".windsurfrules"));
|
|
133535
|
+
if (stat14.isFile())
|
|
133536
|
+
return true;
|
|
133537
|
+
} catch {
|
|
133538
|
+
}
|
|
133539
|
+
try {
|
|
133540
|
+
const stat14 = await fs25.stat(path43.join(dir, ".windsurf"));
|
|
133541
|
+
return stat14.isDirectory();
|
|
133542
|
+
} catch {
|
|
133543
|
+
return false;
|
|
133544
|
+
}
|
|
133545
|
+
}
|
|
133546
|
+
async extractHints(dir) {
|
|
133547
|
+
return {
|
|
133548
|
+
suggestedName: path43.basename(dir),
|
|
133549
|
+
detectedRuntime: "windsurf",
|
|
133550
|
+
inferredCapabilities: ["code"]
|
|
133551
|
+
};
|
|
133552
|
+
}
|
|
133553
|
+
};
|
|
133554
|
+
|
|
133555
|
+
// ../mesh/dist/strategies/gemini-strategy.js
|
|
133556
|
+
import fs26 from "fs/promises";
|
|
133557
|
+
import path44 from "path";
|
|
133558
|
+
var GeminiStrategy = class {
|
|
133559
|
+
name = "gemini";
|
|
133560
|
+
runtime = "gemini";
|
|
133561
|
+
async detect(dir) {
|
|
133562
|
+
try {
|
|
133563
|
+
const stat14 = await fs26.stat(path44.join(dir, "GEMINI.md"));
|
|
133564
|
+
if (stat14.isFile())
|
|
133565
|
+
return true;
|
|
133566
|
+
} catch {
|
|
133567
|
+
}
|
|
133568
|
+
try {
|
|
133569
|
+
const stat14 = await fs26.stat(path44.join(dir, ".gemini"));
|
|
133570
|
+
return stat14.isDirectory();
|
|
133571
|
+
} catch {
|
|
133572
|
+
return false;
|
|
133573
|
+
}
|
|
133574
|
+
}
|
|
133575
|
+
async extractHints(dir) {
|
|
133576
|
+
return {
|
|
133577
|
+
suggestedName: path44.basename(dir),
|
|
133578
|
+
detectedRuntime: "gemini",
|
|
133579
|
+
inferredCapabilities: ["code"]
|
|
133580
|
+
};
|
|
133581
|
+
}
|
|
133582
|
+
};
|
|
133583
|
+
|
|
133584
|
+
// ../mesh/dist/strategies/cline-strategy.js
|
|
133585
|
+
import fs27 from "fs/promises";
|
|
133586
|
+
import path45 from "path";
|
|
133587
|
+
var ClineStrategy = class {
|
|
133588
|
+
name = "cline";
|
|
133589
|
+
runtime = "cline";
|
|
133590
|
+
async detect(dir) {
|
|
133591
|
+
try {
|
|
133592
|
+
await fs27.stat(path45.join(dir, ".clinerules"));
|
|
133593
|
+
return true;
|
|
133594
|
+
} catch {
|
|
133595
|
+
return false;
|
|
133596
|
+
}
|
|
133597
|
+
}
|
|
133598
|
+
async extractHints(dir) {
|
|
133599
|
+
return {
|
|
133600
|
+
suggestedName: path45.basename(dir),
|
|
133601
|
+
detectedRuntime: "cline",
|
|
133602
|
+
inferredCapabilities: ["code"]
|
|
133603
|
+
};
|
|
133604
|
+
}
|
|
133605
|
+
};
|
|
133606
|
+
|
|
133607
|
+
// ../mesh/dist/strategies/roo-code-strategy.js
|
|
133608
|
+
import fs28 from "fs/promises";
|
|
133609
|
+
import path46 from "path";
|
|
133610
|
+
var RooCodeStrategy = class {
|
|
133611
|
+
name = "roo-code";
|
|
133612
|
+
runtime = "roo-code";
|
|
133613
|
+
async detect(dir) {
|
|
133614
|
+
try {
|
|
133615
|
+
const stat14 = await fs28.stat(path46.join(dir, ".roo"));
|
|
133616
|
+
if (stat14.isDirectory())
|
|
133617
|
+
return true;
|
|
133618
|
+
} catch {
|
|
133619
|
+
}
|
|
133620
|
+
try {
|
|
133621
|
+
const stat14 = await fs28.stat(path46.join(dir, ".roorules"));
|
|
133622
|
+
return stat14.isFile();
|
|
133623
|
+
} catch {
|
|
133624
|
+
return false;
|
|
133625
|
+
}
|
|
133626
|
+
}
|
|
133627
|
+
async extractHints(dir) {
|
|
133628
|
+
return {
|
|
133629
|
+
suggestedName: path46.basename(dir),
|
|
133630
|
+
detectedRuntime: "roo-code",
|
|
133631
|
+
inferredCapabilities: ["code"]
|
|
133632
|
+
};
|
|
133633
|
+
}
|
|
133634
|
+
};
|
|
133635
|
+
|
|
133636
|
+
// ../mesh/dist/strategies/copilot-strategy.js
|
|
133637
|
+
import fs29 from "fs/promises";
|
|
133638
|
+
import path47 from "path";
|
|
133639
|
+
var COPILOT_SIGNALS = [
|
|
133640
|
+
".github/copilot-instructions.md",
|
|
133641
|
+
".github/instructions",
|
|
133642
|
+
".github/agents"
|
|
133643
|
+
];
|
|
133644
|
+
var CopilotStrategy = class {
|
|
133645
|
+
name = "copilot";
|
|
133646
|
+
runtime = "copilot";
|
|
133647
|
+
async detect(dir) {
|
|
133648
|
+
for (const signal of COPILOT_SIGNALS) {
|
|
133649
|
+
try {
|
|
133650
|
+
await fs29.stat(path47.join(dir, signal));
|
|
133651
|
+
return true;
|
|
133652
|
+
} catch {
|
|
133653
|
+
}
|
|
133654
|
+
}
|
|
133655
|
+
return false;
|
|
133656
|
+
}
|
|
133657
|
+
async extractHints(dir) {
|
|
133658
|
+
return {
|
|
133659
|
+
suggestedName: path47.basename(dir),
|
|
133660
|
+
detectedRuntime: "copilot",
|
|
133661
|
+
inferredCapabilities: ["code"]
|
|
133662
|
+
};
|
|
133663
|
+
}
|
|
133664
|
+
};
|
|
133665
|
+
|
|
133666
|
+
// ../mesh/dist/strategies/amazon-q-strategy.js
|
|
133667
|
+
import fs30 from "fs/promises";
|
|
133668
|
+
import path48 from "path";
|
|
133669
|
+
var AmazonQStrategy = class {
|
|
133670
|
+
name = "amazon-q";
|
|
133671
|
+
runtime = "amazon-q";
|
|
133672
|
+
async detect(dir) {
|
|
133673
|
+
try {
|
|
133674
|
+
const stat14 = await fs30.stat(path48.join(dir, ".amazonq"));
|
|
133675
|
+
return stat14.isDirectory();
|
|
133676
|
+
} catch {
|
|
133677
|
+
return false;
|
|
133678
|
+
}
|
|
133679
|
+
}
|
|
133680
|
+
async extractHints(dir) {
|
|
133681
|
+
return {
|
|
133682
|
+
suggestedName: path48.basename(dir),
|
|
133683
|
+
detectedRuntime: "amazon-q",
|
|
133684
|
+
inferredCapabilities: ["code"]
|
|
133685
|
+
};
|
|
133686
|
+
}
|
|
133687
|
+
};
|
|
133688
|
+
|
|
133689
|
+
// ../mesh/dist/strategies/continue-strategy.js
|
|
133690
|
+
import fs31 from "fs/promises";
|
|
133691
|
+
import path49 from "path";
|
|
133692
|
+
var ContinueStrategy = class {
|
|
133693
|
+
name = "continue";
|
|
133694
|
+
runtime = "continue";
|
|
133695
|
+
async detect(dir) {
|
|
133696
|
+
try {
|
|
133697
|
+
const stat14 = await fs31.stat(path49.join(dir, ".continue"));
|
|
133698
|
+
return stat14.isDirectory();
|
|
133699
|
+
} catch {
|
|
133700
|
+
return false;
|
|
133701
|
+
}
|
|
133702
|
+
}
|
|
133703
|
+
async extractHints(dir) {
|
|
133704
|
+
return {
|
|
133705
|
+
suggestedName: path49.basename(dir),
|
|
133706
|
+
detectedRuntime: "continue",
|
|
133707
|
+
inferredCapabilities: ["code"]
|
|
133708
|
+
};
|
|
133709
|
+
}
|
|
133710
|
+
};
|
|
133711
|
+
|
|
133501
133712
|
// ../mesh/dist/reconciler.js
|
|
133502
133713
|
import { access as access2 } from "node:fs/promises";
|
|
133503
133714
|
|
|
133504
133715
|
// ../mesh/dist/namespace-resolver.js
|
|
133505
|
-
import
|
|
133716
|
+
import path50 from "path";
|
|
133506
133717
|
var MAX_NAMESPACE_LENGTH = 64;
|
|
133507
133718
|
function normalizeNamespace(raw) {
|
|
133508
133719
|
return raw.toLowerCase().replace(/[^a-z0-9-]/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
@@ -133528,8 +133739,8 @@ function resolveNamespace(projectPath, scanRoot, manifestNamespace) {
|
|
|
133528
133739
|
}
|
|
133529
133740
|
return normalized2;
|
|
133530
133741
|
}
|
|
133531
|
-
const relative4 =
|
|
133532
|
-
const firstSegment = relative4.split(
|
|
133742
|
+
const relative4 = path50.relative(scanRoot, projectPath);
|
|
133743
|
+
const firstSegment = relative4.split(path50.sep)[0];
|
|
133533
133744
|
if (!firstSegment) {
|
|
133534
133745
|
throw new Error(`Cannot derive namespace: projectPath '${projectPath}' is at or above scanRoot '${scanRoot}'`);
|
|
133535
133746
|
}
|
|
@@ -133605,8 +133816,8 @@ function manifestDiffersFromEntry(manifest, entry) {
|
|
|
133605
133816
|
}
|
|
133606
133817
|
|
|
133607
133818
|
// ../mesh/dist/discovery/unified-scanner.js
|
|
133608
|
-
import
|
|
133609
|
-
import
|
|
133819
|
+
import fs32 from "fs/promises";
|
|
133820
|
+
import path51 from "path";
|
|
133610
133821
|
|
|
133611
133822
|
// ../mesh/dist/discovery/types.js
|
|
133612
133823
|
var UNIFIED_EXCLUDE_PATTERNS = /* @__PURE__ */ new Set([
|
|
@@ -133639,7 +133850,23 @@ var UNIFIED_EXCLUDE_PATTERNS = /* @__PURE__ */ new Set([
|
|
|
133639
133850
|
var DEFAULT_MAX_DEPTH = 5;
|
|
133640
133851
|
var DEFAULT_TIMEOUT_MS = 3e4;
|
|
133641
133852
|
var PROGRESS_INTERVAL = 100;
|
|
133642
|
-
var ALLOWED_DOT_DIRS = /* @__PURE__ */ new Set([
|
|
133853
|
+
var ALLOWED_DOT_DIRS = /* @__PURE__ */ new Set([
|
|
133854
|
+
".claude",
|
|
133855
|
+
".cursor",
|
|
133856
|
+
".codex",
|
|
133857
|
+
".dork",
|
|
133858
|
+
".windsurf",
|
|
133859
|
+
".gemini",
|
|
133860
|
+
".cline",
|
|
133861
|
+
".clinerules",
|
|
133862
|
+
".roo",
|
|
133863
|
+
".amazonq",
|
|
133864
|
+
".continue",
|
|
133865
|
+
".augment",
|
|
133866
|
+
".aiassistant",
|
|
133867
|
+
".kilocode",
|
|
133868
|
+
".trae"
|
|
133869
|
+
]);
|
|
133643
133870
|
async function* unifiedScan(options, strategies, registry2, denialList) {
|
|
133644
133871
|
const maxDepth = options.maxDepth ?? DEFAULT_MAX_DEPTH;
|
|
133645
133872
|
const timeoutMs = options.timeout ?? DEFAULT_TIMEOUT_MS;
|
|
@@ -133671,7 +133898,7 @@ async function* unifiedScan(options, strategies, registry2, denialList) {
|
|
|
133671
133898
|
if (!item)
|
|
133672
133899
|
continue;
|
|
133673
133900
|
const { dir, depth } = item;
|
|
133674
|
-
const dirName =
|
|
133901
|
+
const dirName = path51.basename(dir);
|
|
133675
133902
|
if (UNIFIED_EXCLUDE_PATTERNS.has(dirName) || extraExcludes.has(dirName))
|
|
133676
133903
|
continue;
|
|
133677
133904
|
if (dirName.startsWith(".") && !ALLOWED_DOT_DIRS.has(dirName))
|
|
@@ -133679,7 +133906,7 @@ async function* unifiedScan(options, strategies, registry2, denialList) {
|
|
|
133679
133906
|
if (followSymlinks) {
|
|
133680
133907
|
let realDir;
|
|
133681
133908
|
try {
|
|
133682
|
-
realDir = await
|
|
133909
|
+
realDir = await fs32.realpath(dir);
|
|
133683
133910
|
} catch {
|
|
133684
133911
|
continue;
|
|
133685
133912
|
}
|
|
@@ -133696,7 +133923,7 @@ async function* unifiedScan(options, strategies, registry2, denialList) {
|
|
|
133696
133923
|
}
|
|
133697
133924
|
let entries;
|
|
133698
133925
|
try {
|
|
133699
|
-
entries = await
|
|
133926
|
+
entries = await fs32.readdir(dir, {
|
|
133700
133927
|
withFileTypes: true
|
|
133701
133928
|
});
|
|
133702
133929
|
} catch (err) {
|
|
@@ -133740,7 +133967,7 @@ async function* unifiedScan(options, strategies, registry2, denialList) {
|
|
|
133740
133967
|
continue;
|
|
133741
133968
|
if (isSymlink && !followSymlinks)
|
|
133742
133969
|
continue;
|
|
133743
|
-
queue2.push({ dir:
|
|
133970
|
+
queue2.push({ dir: path51.join(dir, entry.name), depth: depth + 1 });
|
|
133744
133971
|
}
|
|
133745
133972
|
}
|
|
133746
133973
|
}
|
|
@@ -133849,7 +134076,7 @@ async function upsertAutoImported(manifest, projectPath, deps) {
|
|
|
133849
134076
|
}
|
|
133850
134077
|
|
|
133851
134078
|
// ../mesh/dist/mesh-agent-management.js
|
|
133852
|
-
import
|
|
134079
|
+
import path52 from "path";
|
|
133853
134080
|
function toManifest(entry) {
|
|
133854
134081
|
const { projectPath: _p, namespace: _n3, scanRoot: _s, ...rest } = entry;
|
|
133855
134082
|
return rest;
|
|
@@ -133918,7 +134145,7 @@ async function unregister(deps, agentId) {
|
|
|
133918
134145
|
return;
|
|
133919
134146
|
await removeManifest(agent.projectPath);
|
|
133920
134147
|
const namespace = agent.namespace;
|
|
133921
|
-
const subject = `relay.agent.${namespace ||
|
|
134148
|
+
const subject = `relay.agent.${namespace || path52.basename(agent.projectPath)}.${agent.id}`;
|
|
133922
134149
|
await deps.relayBridge.unregisterAgent(subject, agent.id, agent.name);
|
|
133923
134150
|
deps.registry.remove(agentId);
|
|
133924
134151
|
for (const cb of deps.onUnregisterCallbacks) {
|
|
@@ -134003,7 +134230,7 @@ function inspect(deps, agentId) {
|
|
|
134003
134230
|
if (!health)
|
|
134004
134231
|
return void 0;
|
|
134005
134232
|
const manifest = toManifest(entry);
|
|
134006
|
-
const ns = entry.namespace ||
|
|
134233
|
+
const ns = entry.namespace || path52.basename(entry.projectPath);
|
|
134007
134234
|
const relaySubject = `relay.agent.${ns}.${agentId}`;
|
|
134008
134235
|
return { agent: manifest, health, relaySubject };
|
|
134009
134236
|
}
|
|
@@ -134059,7 +134286,14 @@ var MeshCore = class {
|
|
|
134059
134286
|
const strategies = options.strategies ?? [
|
|
134060
134287
|
new ClaudeCodeStrategy(),
|
|
134061
134288
|
new CursorStrategy(),
|
|
134062
|
-
new CodexStrategy()
|
|
134289
|
+
new CodexStrategy(),
|
|
134290
|
+
new WindsurfStrategy(),
|
|
134291
|
+
new GeminiStrategy(),
|
|
134292
|
+
new ClineStrategy(),
|
|
134293
|
+
new RooCodeStrategy(),
|
|
134294
|
+
new CopilotStrategy(),
|
|
134295
|
+
new AmazonQStrategy(),
|
|
134296
|
+
new ContinueStrategy()
|
|
134063
134297
|
];
|
|
134064
134298
|
this.relayBridge = relayBridge;
|
|
134065
134299
|
this.defaultScanRoot = defaultScanRoot;
|
|
@@ -134554,11 +134788,11 @@ function createMeshRouter(deps) {
|
|
|
134554
134788
|
}
|
|
134555
134789
|
|
|
134556
134790
|
// ../../apps/server/src/services/mesh/ensure-dorkbot.ts
|
|
134557
|
-
import
|
|
134558
|
-
import
|
|
134791
|
+
import fs33 from "fs/promises";
|
|
134792
|
+
import path53 from "path";
|
|
134559
134793
|
init_logger();
|
|
134560
134794
|
async function ensureDorkBot(meshCore2, dorkHome) {
|
|
134561
|
-
const dorkbotDir =
|
|
134795
|
+
const dorkbotDir = path53.join(dorkHome, "agents", "dorkbot");
|
|
134562
134796
|
const existing = await readManifest(dorkbotDir);
|
|
134563
134797
|
if (existing) {
|
|
134564
134798
|
if (existing.isSystem && existing.namespace === "system") {
|
|
@@ -134576,7 +134810,7 @@ async function ensureDorkBot(meshCore2, dorkHome) {
|
|
|
134576
134810
|
logger.info("[Mesh] Upgraded existing DorkBot to system agent");
|
|
134577
134811
|
return;
|
|
134578
134812
|
}
|
|
134579
|
-
await
|
|
134813
|
+
await fs33.mkdir(path53.join(dorkbotDir, ".dork"), { recursive: true });
|
|
134580
134814
|
const manifest = {
|
|
134581
134815
|
id: ulid(),
|
|
134582
134816
|
name: "dorkbot",
|
|
@@ -134599,7 +134833,7 @@ async function ensureDorkBot(meshCore2, dorkHome) {
|
|
|
134599
134833
|
await writeConventionFile(dorkbotDir, "SOUL.md", defaultSoulTemplate("DorkBot", traitBlock));
|
|
134600
134834
|
await writeConventionFile(dorkbotDir, "NOPE.md", defaultNopeTemplate());
|
|
134601
134835
|
const claudeMd = dorkbotClaudeMdTemplate();
|
|
134602
|
-
await
|
|
134836
|
+
await fs33.writeFile(path53.join(dorkbotDir, ".dork", "AGENTS.md"), claudeMd, "utf-8");
|
|
134603
134837
|
await meshCore2.syncFromDisk(dorkbotDir);
|
|
134604
134838
|
logger.info("[Mesh] Created DorkBot system agent at %s", dorkbotDir);
|
|
134605
134839
|
}
|
|
@@ -136374,7 +136608,7 @@ function createA2aRouter(deps) {
|
|
|
136374
136608
|
|
|
136375
136609
|
// ../../apps/server/src/routes/agents.ts
|
|
136376
136610
|
import { Router as Router23 } from "express";
|
|
136377
|
-
import
|
|
136611
|
+
import path54 from "path";
|
|
136378
136612
|
init_logger();
|
|
136379
136613
|
function createAgentsRouter(meshCore2) {
|
|
136380
136614
|
const router16 = Router23();
|
|
@@ -136437,7 +136671,7 @@ function createAgentsRouter(meshCore2) {
|
|
|
136437
136671
|
}
|
|
136438
136672
|
const manifest = {
|
|
136439
136673
|
id: ulid(),
|
|
136440
|
-
name: name ??
|
|
136674
|
+
name: name ?? path54.basename(agentPath),
|
|
136441
136675
|
description: description ?? "",
|
|
136442
136676
|
runtime: runtime ?? "claude-code",
|
|
136443
136677
|
capabilities: [],
|
|
@@ -136707,8 +136941,8 @@ function createDiscoveryRouter(meshCore2) {
|
|
|
136707
136941
|
|
|
136708
136942
|
// ../../apps/server/src/routes/templates.ts
|
|
136709
136943
|
import { Router as Router25 } from "express";
|
|
136710
|
-
import
|
|
136711
|
-
import
|
|
136944
|
+
import fs34 from "fs/promises";
|
|
136945
|
+
import path55 from "path";
|
|
136712
136946
|
|
|
136713
136947
|
// ../shared/dist/template-catalog.js
|
|
136714
136948
|
import { z as z45 } from "zod";
|
|
@@ -136805,7 +137039,7 @@ var USER_CATALOG_FILENAME = "agent-templates.json";
|
|
|
136805
137039
|
async function readUserTemplates(catalogPath) {
|
|
136806
137040
|
let raw;
|
|
136807
137041
|
try {
|
|
136808
|
-
raw = await
|
|
137042
|
+
raw = await fs34.readFile(catalogPath, "utf-8");
|
|
136809
137043
|
} catch {
|
|
136810
137044
|
return [];
|
|
136811
137045
|
}
|
|
@@ -136829,12 +137063,12 @@ async function readUserTemplates(catalogPath) {
|
|
|
136829
137063
|
}
|
|
136830
137064
|
async function writeUserTemplates(catalogPath, templates) {
|
|
136831
137065
|
const catalog = { version: 1, templates };
|
|
136832
|
-
await
|
|
136833
|
-
await
|
|
137066
|
+
await fs34.mkdir(path55.dirname(catalogPath), { recursive: true });
|
|
137067
|
+
await fs34.writeFile(catalogPath, JSON.stringify(catalog, null, 2), "utf-8");
|
|
136834
137068
|
}
|
|
136835
137069
|
function createTemplateRouter(dorkHome) {
|
|
136836
137070
|
const router16 = Router25();
|
|
136837
|
-
const catalogPath =
|
|
137071
|
+
const catalogPath = path55.join(dorkHome, USER_CATALOG_FILENAME);
|
|
136838
137072
|
router16.get("/", async (_req, res) => {
|
|
136839
137073
|
try {
|
|
136840
137074
|
const userTemplates = await readUserTemplates(catalogPath);
|
|
@@ -136895,7 +137129,7 @@ function createTemplateRouter(dorkHome) {
|
|
|
136895
137129
|
// ../../apps/server/src/routes/admin.ts
|
|
136896
137130
|
import { Router as Router26 } from "express";
|
|
136897
137131
|
import { spawn as spawn3 } from "child_process";
|
|
136898
|
-
import
|
|
137132
|
+
import fs35 from "fs/promises";
|
|
136899
137133
|
init_env();
|
|
136900
137134
|
function triggerRestart() {
|
|
136901
137135
|
if (env.NODE_ENV === "development") {
|
|
@@ -136933,7 +137167,7 @@ function createAdminRouter(deps) {
|
|
|
136933
137167
|
try {
|
|
136934
137168
|
await deps.shutdownServices();
|
|
136935
137169
|
deps.closeDb();
|
|
136936
|
-
await
|
|
137170
|
+
await fs35.rm(deps.dorkHome, { recursive: true, force: true });
|
|
136937
137171
|
} catch {
|
|
136938
137172
|
}
|
|
136939
137173
|
triggerRestart();
|
|
@@ -136953,8 +137187,8 @@ function createAdminRouter(deps) {
|
|
|
136953
137187
|
}
|
|
136954
137188
|
|
|
136955
137189
|
// ../../apps/server/src/services/extensions/extension-discovery.ts
|
|
136956
|
-
import
|
|
136957
|
-
import
|
|
137190
|
+
import fs36 from "fs/promises";
|
|
137191
|
+
import path56 from "path";
|
|
136958
137192
|
|
|
136959
137193
|
// ../extension-api/dist/manifest-schema.js
|
|
136960
137194
|
import { z as z46 } from "zod";
|
|
@@ -137062,11 +137296,11 @@ var ExtensionDiscovery = class {
|
|
|
137062
137296
|
* @returns All discovered extension records, with local overriding global by ID
|
|
137063
137297
|
*/
|
|
137064
137298
|
async discover(cwd, enabledIds) {
|
|
137065
|
-
const globalDir =
|
|
137299
|
+
const globalDir = path56.join(this.dorkHome, "extensions");
|
|
137066
137300
|
const globalRecords = await this.scanDirectory(globalDir, "global");
|
|
137067
137301
|
let localRecords = [];
|
|
137068
137302
|
if (cwd) {
|
|
137069
|
-
const localDir =
|
|
137303
|
+
const localDir = path56.join(cwd, ".dork", "extensions");
|
|
137070
137304
|
localRecords = await this.scanDirectory(localDir, "local");
|
|
137071
137305
|
}
|
|
137072
137306
|
const merged = /* @__PURE__ */ new Map();
|
|
@@ -137112,15 +137346,15 @@ var ExtensionDiscovery = class {
|
|
|
137112
137346
|
*/
|
|
137113
137347
|
async scanDirectory(dir, scope) {
|
|
137114
137348
|
try {
|
|
137115
|
-
await
|
|
137349
|
+
await fs36.access(dir);
|
|
137116
137350
|
} catch {
|
|
137117
137351
|
return [];
|
|
137118
137352
|
}
|
|
137119
|
-
const entries = await
|
|
137353
|
+
const entries = await fs36.readdir(dir, { withFileTypes: true });
|
|
137120
137354
|
const records = [];
|
|
137121
137355
|
for (const entry of entries) {
|
|
137122
137356
|
if (!entry.isDirectory() && !entry.isSymbolicLink()) continue;
|
|
137123
|
-
const extDir =
|
|
137357
|
+
const extDir = path56.join(dir, entry.name);
|
|
137124
137358
|
const record2 = await this.readExtension(extDir, entry.name, scope);
|
|
137125
137359
|
records.push(record2);
|
|
137126
137360
|
}
|
|
@@ -137134,9 +137368,9 @@ var ExtensionDiscovery = class {
|
|
|
137134
137368
|
* @param scope - Whether this is a global or local extension
|
|
137135
137369
|
*/
|
|
137136
137370
|
async readExtension(extDir, dirName, scope) {
|
|
137137
|
-
const manifestPath =
|
|
137371
|
+
const manifestPath = path56.join(extDir, "extension.json");
|
|
137138
137372
|
try {
|
|
137139
|
-
const raw = await
|
|
137373
|
+
const raw = await fs36.readFile(manifestPath, "utf-8");
|
|
137140
137374
|
const parsed = JSON.parse(raw);
|
|
137141
137375
|
const result2 = ExtensionManifestSchema.safeParse(parsed);
|
|
137142
137376
|
if (!result2.success) {
|
|
@@ -137199,16 +137433,16 @@ var ExtensionDiscovery = class {
|
|
|
137199
137433
|
*/
|
|
137200
137434
|
async detectServerEntry(extDir, manifest) {
|
|
137201
137435
|
const serverEntryRel = manifest.serverCapabilities?.serverEntry ?? "./server.ts";
|
|
137202
|
-
const resolvedPath =
|
|
137436
|
+
const resolvedPath = path56.join(extDir, serverEntryRel);
|
|
137203
137437
|
try {
|
|
137204
|
-
await
|
|
137438
|
+
await fs36.access(resolvedPath);
|
|
137205
137439
|
return { hasServerEntry: true, resolvedPath };
|
|
137206
137440
|
} catch {
|
|
137207
137441
|
}
|
|
137208
137442
|
if (resolvedPath.endsWith(".ts")) {
|
|
137209
137443
|
const jsPath = resolvedPath.replace(/\.ts$/, ".js");
|
|
137210
137444
|
try {
|
|
137211
|
-
await
|
|
137445
|
+
await fs36.access(jsPath);
|
|
137212
137446
|
return { hasServerEntry: true, resolvedPath: jsPath };
|
|
137213
137447
|
} catch {
|
|
137214
137448
|
}
|
|
@@ -137228,14 +137462,14 @@ var ExtensionDiscovery = class {
|
|
|
137228
137462
|
var import_esbuild = __toESM(require_main(), 1);
|
|
137229
137463
|
init_logger();
|
|
137230
137464
|
import { createHash as createHash2 } from "crypto";
|
|
137231
|
-
import
|
|
137232
|
-
import
|
|
137465
|
+
import fs37 from "fs/promises";
|
|
137466
|
+
import path57 from "path";
|
|
137233
137467
|
var BUNDLE_SIZE_WARNING_KB = 500;
|
|
137234
137468
|
var STALE_THRESHOLD_MS = 7 * 24 * 60 * 60 * 1e3;
|
|
137235
137469
|
var ExtensionCompiler = class {
|
|
137236
137470
|
cacheDir;
|
|
137237
137471
|
constructor(dorkHome) {
|
|
137238
|
-
this.cacheDir =
|
|
137472
|
+
this.cacheDir = path57.join(dorkHome, "cache", "extensions");
|
|
137239
137473
|
}
|
|
137240
137474
|
/**
|
|
137241
137475
|
* Compile a client-side extension (or return cached bundle).
|
|
@@ -137250,7 +137484,7 @@ var ExtensionCompiler = class {
|
|
|
137250
137484
|
return { error: entryResult.error, sourceHash: "" };
|
|
137251
137485
|
}
|
|
137252
137486
|
const { entryPath, isPrecompiled } = entryResult;
|
|
137253
|
-
const source = await
|
|
137487
|
+
const source = await fs37.readFile(entryPath, "utf-8");
|
|
137254
137488
|
const sourceHash = this.computeSourceHash(source);
|
|
137255
137489
|
if (isPrecompiled) {
|
|
137256
137490
|
return this.handlePrecompiled(record2.id, source, sourceHash);
|
|
@@ -137277,7 +137511,7 @@ var ExtensionCompiler = class {
|
|
|
137277
137511
|
sourceHash: ""
|
|
137278
137512
|
};
|
|
137279
137513
|
}
|
|
137280
|
-
const source = await
|
|
137514
|
+
const source = await fs37.readFile(record2.serverEntryPath, "utf-8");
|
|
137281
137515
|
const sourceHash = this.computeSourceHash(source);
|
|
137282
137516
|
return this.handleServerCompilation(record2.id, record2.serverEntryPath, sourceHash);
|
|
137283
137517
|
}
|
|
@@ -137289,12 +137523,12 @@ var ExtensionCompiler = class {
|
|
|
137289
137523
|
* @param sourceHash - Content hash of the source file
|
|
137290
137524
|
*/
|
|
137291
137525
|
async readBundle(extId, sourceHash) {
|
|
137292
|
-
const cachedPath =
|
|
137293
|
-
if (!cachedPath.startsWith(this.cacheDir +
|
|
137526
|
+
const cachedPath = path57.join(this.cacheDir, `${extId}.${sourceHash}.js`);
|
|
137527
|
+
if (!cachedPath.startsWith(this.cacheDir + path57.sep)) {
|
|
137294
137528
|
throw new Error("Attempted path escape in cache lookup");
|
|
137295
137529
|
}
|
|
137296
137530
|
try {
|
|
137297
|
-
return await
|
|
137531
|
+
return await fs37.readFile(cachedPath, "utf-8");
|
|
137298
137532
|
} catch {
|
|
137299
137533
|
return null;
|
|
137300
137534
|
}
|
|
@@ -137308,19 +137542,19 @@ var ExtensionCompiler = class {
|
|
|
137308
137542
|
async cleanStaleCache() {
|
|
137309
137543
|
const now = Date.now();
|
|
137310
137544
|
let cleaned = 0;
|
|
137311
|
-
for (const subDir of [this.cacheDir,
|
|
137545
|
+
for (const subDir of [this.cacheDir, path57.join(this.cacheDir, "server")]) {
|
|
137312
137546
|
try {
|
|
137313
|
-
await
|
|
137547
|
+
await fs37.access(subDir);
|
|
137314
137548
|
} catch {
|
|
137315
137549
|
continue;
|
|
137316
137550
|
}
|
|
137317
|
-
const entries = await
|
|
137551
|
+
const entries = await fs37.readdir(subDir);
|
|
137318
137552
|
for (const entry of entries) {
|
|
137319
|
-
const filePath =
|
|
137553
|
+
const filePath = path57.join(subDir, entry);
|
|
137320
137554
|
try {
|
|
137321
|
-
const stat14 = await
|
|
137555
|
+
const stat14 = await fs37.stat(filePath);
|
|
137322
137556
|
if (stat14.isFile() && now - stat14.atimeMs > STALE_THRESHOLD_MS) {
|
|
137323
|
-
await
|
|
137557
|
+
await fs37.unlink(filePath);
|
|
137324
137558
|
cleaned++;
|
|
137325
137559
|
}
|
|
137326
137560
|
} catch {
|
|
@@ -137338,15 +137572,15 @@ var ExtensionCompiler = class {
|
|
|
137338
137572
|
* Priority: index.js (pre-compiled) > index.ts (compile) > error
|
|
137339
137573
|
*/
|
|
137340
137574
|
async resolveEntryPoint(extPath) {
|
|
137341
|
-
const jsPath =
|
|
137342
|
-
const tsPath =
|
|
137575
|
+
const jsPath = path57.join(extPath, "index.js");
|
|
137576
|
+
const tsPath = path57.join(extPath, "index.ts");
|
|
137343
137577
|
try {
|
|
137344
|
-
await
|
|
137578
|
+
await fs37.access(jsPath);
|
|
137345
137579
|
return { entryPath: jsPath, isPrecompiled: true };
|
|
137346
137580
|
} catch {
|
|
137347
137581
|
}
|
|
137348
137582
|
try {
|
|
137349
|
-
await
|
|
137583
|
+
await fs37.access(tsPath);
|
|
137350
137584
|
return { entryPath: tsPath, isPrecompiled: false };
|
|
137351
137585
|
} catch {
|
|
137352
137586
|
return {
|
|
@@ -137361,32 +137595,32 @@ var ExtensionCompiler = class {
|
|
|
137361
137595
|
/** Handle a pre-compiled JS extension — cache for consistent serving. */
|
|
137362
137596
|
async handlePrecompiled(extId, source, sourceHash) {
|
|
137363
137597
|
await this.ensureCacheDir();
|
|
137364
|
-
const cachedPath =
|
|
137598
|
+
const cachedPath = path57.join(this.cacheDir, `${extId}.${sourceHash}.js`);
|
|
137365
137599
|
try {
|
|
137366
|
-
await
|
|
137367
|
-
const cached = await
|
|
137600
|
+
await fs37.access(cachedPath);
|
|
137601
|
+
const cached = await fs37.readFile(cachedPath, "utf-8");
|
|
137368
137602
|
return { code: cached, sourceHash };
|
|
137369
137603
|
} catch {
|
|
137370
|
-
await
|
|
137604
|
+
await fs37.writeFile(cachedPath, source, "utf-8");
|
|
137371
137605
|
return { code: source, sourceHash };
|
|
137372
137606
|
}
|
|
137373
137607
|
}
|
|
137374
137608
|
/** Handle client-side TypeScript compilation with cache hit/miss logic. */
|
|
137375
137609
|
async handleCompilation(extId, entryPath, sourceHash) {
|
|
137376
137610
|
await this.ensureCacheDir();
|
|
137377
|
-
const cachedJsPath =
|
|
137378
|
-
const cachedErrorPath =
|
|
137611
|
+
const cachedJsPath = path57.join(this.cacheDir, `${extId}.${sourceHash}.js`);
|
|
137612
|
+
const cachedErrorPath = path57.join(this.cacheDir, `${extId}.${sourceHash}.error.json`);
|
|
137379
137613
|
try {
|
|
137380
|
-
await
|
|
137381
|
-
const cached = await
|
|
137614
|
+
await fs37.access(cachedJsPath);
|
|
137615
|
+
const cached = await fs37.readFile(cachedJsPath, "utf-8");
|
|
137382
137616
|
logger.debug(`[Extensions] Cache hit for ${extId} (${sourceHash})`);
|
|
137383
137617
|
return { code: cached, sourceHash };
|
|
137384
137618
|
} catch {
|
|
137385
137619
|
}
|
|
137386
137620
|
try {
|
|
137387
|
-
await
|
|
137621
|
+
await fs37.access(cachedErrorPath);
|
|
137388
137622
|
const cachedError = JSON.parse(
|
|
137389
|
-
await
|
|
137623
|
+
await fs37.readFile(cachedErrorPath, "utf-8")
|
|
137390
137624
|
);
|
|
137391
137625
|
logger.debug(`[Extensions] Cached error for ${extId} (${sourceHash})`);
|
|
137392
137626
|
return { error: cachedError, sourceHash };
|
|
@@ -137396,21 +137630,21 @@ var ExtensionCompiler = class {
|
|
|
137396
137630
|
}
|
|
137397
137631
|
/** Handle server-side TypeScript compilation with cache hit/miss logic. */
|
|
137398
137632
|
async handleServerCompilation(extId, entryPath, sourceHash) {
|
|
137399
|
-
const serverCacheDir =
|
|
137400
|
-
await
|
|
137401
|
-
const cachedJsPath =
|
|
137402
|
-
const cachedErrorPath =
|
|
137633
|
+
const serverCacheDir = path57.join(this.cacheDir, "server");
|
|
137634
|
+
await fs37.mkdir(serverCacheDir, { recursive: true });
|
|
137635
|
+
const cachedJsPath = path57.join(serverCacheDir, `${extId}.${sourceHash}.js`);
|
|
137636
|
+
const cachedErrorPath = path57.join(serverCacheDir, `${extId}.${sourceHash}.error.json`);
|
|
137403
137637
|
try {
|
|
137404
|
-
await
|
|
137405
|
-
const cached = await
|
|
137638
|
+
await fs37.access(cachedJsPath);
|
|
137639
|
+
const cached = await fs37.readFile(cachedJsPath, "utf-8");
|
|
137406
137640
|
logger.debug(`[Extensions] Server cache hit for ${extId} (${sourceHash})`);
|
|
137407
137641
|
return { code: cached, sourceHash };
|
|
137408
137642
|
} catch {
|
|
137409
137643
|
}
|
|
137410
137644
|
try {
|
|
137411
|
-
await
|
|
137645
|
+
await fs37.access(cachedErrorPath);
|
|
137412
137646
|
const cachedError = JSON.parse(
|
|
137413
|
-
await
|
|
137647
|
+
await fs37.readFile(cachedErrorPath, "utf-8")
|
|
137414
137648
|
);
|
|
137415
137649
|
logger.debug(`[Extensions] Server cached error for ${extId} (${sourceHash})`);
|
|
137416
137650
|
return { error: cachedError, sourceHash };
|
|
@@ -137442,9 +137676,9 @@ var ExtensionCompiler = class {
|
|
|
137442
137676
|
`[Extensions] Bundle for ${extId} is ${sizeKb.toFixed(0)}KB (exceeds ${BUNDLE_SIZE_WARNING_KB}KB guideline)`
|
|
137443
137677
|
);
|
|
137444
137678
|
}
|
|
137445
|
-
await
|
|
137679
|
+
await fs37.writeFile(cachedJsPath, code3, "utf-8");
|
|
137446
137680
|
try {
|
|
137447
|
-
await
|
|
137681
|
+
await fs37.unlink(cachedErrorPath);
|
|
137448
137682
|
} catch {
|
|
137449
137683
|
}
|
|
137450
137684
|
logger.info(`[Extensions] Compiled ${extId} (${sizeKb.toFixed(1)}KB)`);
|
|
@@ -137476,9 +137710,9 @@ var ExtensionCompiler = class {
|
|
|
137476
137710
|
`[Extensions] Server bundle for ${extId} is ${sizeKb.toFixed(0)}KB (exceeds ${BUNDLE_SIZE_WARNING_KB}KB guideline)`
|
|
137477
137711
|
);
|
|
137478
137712
|
}
|
|
137479
|
-
await
|
|
137713
|
+
await fs37.writeFile(cachedJsPath, code3, "utf-8");
|
|
137480
137714
|
try {
|
|
137481
|
-
await
|
|
137715
|
+
await fs37.unlink(cachedErrorPath);
|
|
137482
137716
|
} catch {
|
|
137483
137717
|
}
|
|
137484
137718
|
logger.info(`[Extensions] Compiled server bundle for ${extId} (${sizeKb.toFixed(1)}KB)`);
|
|
@@ -137507,7 +137741,7 @@ var ExtensionCompiler = class {
|
|
|
137507
137741
|
location: e4.location ? { file: e4.location.file, line: e4.location.line, column: e4.location.column } : void 0
|
|
137508
137742
|
})) ?? [{ text: err instanceof Error ? err.message : "Unknown compilation error" }]
|
|
137509
137743
|
};
|
|
137510
|
-
await
|
|
137744
|
+
await fs37.writeFile(cachedErrorPath, JSON.stringify(compilationError, null, 2), "utf-8");
|
|
137511
137745
|
logger.error(
|
|
137512
137746
|
`[Extensions] ${prefix}Compilation failed for ${extId}: ${compilationError.errors[0]?.text}`
|
|
137513
137747
|
);
|
|
@@ -137519,13 +137753,13 @@ var ExtensionCompiler = class {
|
|
|
137519
137753
|
}
|
|
137520
137754
|
/** Ensure the client-side cache directory exists. */
|
|
137521
137755
|
async ensureCacheDir() {
|
|
137522
|
-
await
|
|
137756
|
+
await fs37.mkdir(this.cacheDir, { recursive: true });
|
|
137523
137757
|
}
|
|
137524
137758
|
};
|
|
137525
137759
|
|
|
137526
137760
|
// ../../apps/server/src/services/extensions/extension-server-lifecycle.ts
|
|
137527
|
-
import
|
|
137528
|
-
import
|
|
137761
|
+
import fs39 from "fs/promises";
|
|
137762
|
+
import path59 from "path";
|
|
137529
137763
|
import { createRequire as createRequire2 } from "node:module";
|
|
137530
137764
|
import { Router as Router28 } from "express";
|
|
137531
137765
|
|
|
@@ -137605,29 +137839,29 @@ function createProxyRouter(extensionId, config, dorkHome) {
|
|
|
137605
137839
|
|
|
137606
137840
|
// ../../apps/server/src/services/extensions/extension-server-api-factory.ts
|
|
137607
137841
|
init_logger();
|
|
137608
|
-
import
|
|
137609
|
-
import
|
|
137842
|
+
import fs38 from "fs/promises";
|
|
137843
|
+
import path58 from "path";
|
|
137610
137844
|
var MIN_INTERVAL_SECONDS = 5;
|
|
137611
137845
|
function createDataProviderContext(deps) {
|
|
137612
137846
|
const scheduledCleanups = [];
|
|
137613
137847
|
const { extensionId, extensionDir, dorkHome } = deps;
|
|
137614
137848
|
const secrets = new ExtensionSecretStore(extensionId, dorkHome);
|
|
137615
137849
|
const settings = new ExtensionSettingsStore(dorkHome, extensionId);
|
|
137616
|
-
const dataPath =
|
|
137850
|
+
const dataPath = path58.join(dorkHome, "extension-data", extensionId, "data.json");
|
|
137617
137851
|
const storage = {
|
|
137618
137852
|
async loadData() {
|
|
137619
137853
|
try {
|
|
137620
|
-
const raw = await
|
|
137854
|
+
const raw = await fs38.readFile(dataPath, "utf-8");
|
|
137621
137855
|
return JSON.parse(raw);
|
|
137622
137856
|
} catch {
|
|
137623
137857
|
return null;
|
|
137624
137858
|
}
|
|
137625
137859
|
},
|
|
137626
137860
|
async saveData(data) {
|
|
137627
|
-
await
|
|
137861
|
+
await fs38.mkdir(path58.dirname(dataPath), { recursive: true });
|
|
137628
137862
|
const tempPath = dataPath + ".tmp";
|
|
137629
|
-
await
|
|
137630
|
-
await
|
|
137863
|
+
await fs38.writeFile(tempPath, JSON.stringify(data, null, 2), "utf-8");
|
|
137864
|
+
await fs38.rename(tempPath, dataPath);
|
|
137631
137865
|
}
|
|
137632
137866
|
};
|
|
137633
137867
|
function schedule(intervalSeconds, fn3) {
|
|
@@ -137696,10 +137930,10 @@ var ExtensionServerLifecycle = class {
|
|
|
137696
137930
|
if ("error" in compiled) {
|
|
137697
137931
|
return { ok: false, error: compiled.error.message };
|
|
137698
137932
|
}
|
|
137699
|
-
const tempDir =
|
|
137700
|
-
await
|
|
137701
|
-
const tempFile =
|
|
137702
|
-
await
|
|
137933
|
+
const tempDir = path59.join(this.dorkHome, "cache", "extensions", "server", "_run");
|
|
137934
|
+
await fs39.mkdir(tempDir, { recursive: true });
|
|
137935
|
+
const tempFile = path59.join(tempDir, `${id}.js`);
|
|
137936
|
+
await fs39.writeFile(tempFile, compiled.code, "utf-8");
|
|
137703
137937
|
try {
|
|
137704
137938
|
delete require2.cache[require2.resolve(tempFile)];
|
|
137705
137939
|
} catch {
|
|
@@ -137924,8 +138158,8 @@ async function testServerCompilation(record2, compiler2) {
|
|
|
137924
138158
|
}
|
|
137925
138159
|
|
|
137926
138160
|
// ../../apps/server/src/services/extensions/extension-scaffolder.ts
|
|
137927
|
-
import
|
|
137928
|
-
import
|
|
138161
|
+
import fs40 from "fs/promises";
|
|
138162
|
+
import path60 from "path";
|
|
137929
138163
|
|
|
137930
138164
|
// ../../apps/server/src/services/extensions/extension-templates.ts
|
|
137931
138165
|
function toPascalCase(str) {
|
|
@@ -138240,29 +138474,29 @@ async function scaffoldExtension(options) {
|
|
|
138240
138474
|
if (!currentCwd) {
|
|
138241
138475
|
throw new Error("Cannot create local extension: no working directory is active");
|
|
138242
138476
|
}
|
|
138243
|
-
targetDir =
|
|
138477
|
+
targetDir = path60.join(currentCwd, ".dork", "extensions", name);
|
|
138244
138478
|
} else {
|
|
138245
|
-
targetDir =
|
|
138479
|
+
targetDir = path60.join(dorkHome, "extensions", name);
|
|
138246
138480
|
}
|
|
138247
138481
|
try {
|
|
138248
|
-
await
|
|
138482
|
+
await fs40.access(targetDir);
|
|
138249
138483
|
throw new Error(`Extension '${name}' already exists at ${targetDir}`);
|
|
138250
138484
|
} catch (err) {
|
|
138251
138485
|
if (err instanceof Error && err.message.includes("already exists")) throw err;
|
|
138252
138486
|
}
|
|
138253
|
-
await
|
|
138487
|
+
await fs40.mkdir(targetDir, { recursive: true });
|
|
138254
138488
|
const manifest = generateManifest(name, description, template);
|
|
138255
|
-
await
|
|
138256
|
-
|
|
138489
|
+
await fs40.writeFile(
|
|
138490
|
+
path60.join(targetDir, "extension.json"),
|
|
138257
138491
|
JSON.stringify(manifest, null, 2),
|
|
138258
138492
|
"utf-8"
|
|
138259
138493
|
);
|
|
138260
138494
|
const indexContent = generateTemplate(name, description ?? "", template);
|
|
138261
|
-
await
|
|
138495
|
+
await fs40.writeFile(path60.join(targetDir, "index.ts"), indexContent, "utf-8");
|
|
138262
138496
|
const files = ["extension.json", "index.ts"];
|
|
138263
138497
|
if (template === "data-provider") {
|
|
138264
138498
|
const serverContent = generateServerTemplate(name, description ?? "");
|
|
138265
|
-
await
|
|
138499
|
+
await fs40.writeFile(path60.join(targetDir, "server.ts"), serverContent, "utf-8");
|
|
138266
138500
|
files.push("server.ts");
|
|
138267
138501
|
}
|
|
138268
138502
|
return { targetDir, files };
|
|
@@ -138532,16 +138766,16 @@ var ExtensionManager = class {
|
|
|
138532
138766
|
};
|
|
138533
138767
|
|
|
138534
138768
|
// ../../apps/server/src/services/builtin-extensions/ensure-marketplace.ts
|
|
138535
|
-
import
|
|
138536
|
-
import
|
|
138769
|
+
import fs41 from "fs/promises";
|
|
138770
|
+
import path61 from "path";
|
|
138537
138771
|
import { fileURLToPath as fileURLToPath6 } from "url";
|
|
138538
138772
|
init_logger();
|
|
138539
|
-
var __dirname4 =
|
|
138773
|
+
var __dirname4 = path61.dirname(fileURLToPath6(import.meta.url));
|
|
138540
138774
|
var EXTENSION_ID = "marketplace";
|
|
138541
|
-
var BUILTIN_SOURCE_DIR =
|
|
138775
|
+
var BUILTIN_SOURCE_DIR = path61.resolve(__dirname4, "../../builtin-extensions/marketplace");
|
|
138542
138776
|
async function readManifestVersion(manifestPath) {
|
|
138543
138777
|
try {
|
|
138544
|
-
const raw = await
|
|
138778
|
+
const raw = await fs41.readFile(manifestPath, "utf-8");
|
|
138545
138779
|
const parsed = JSON.parse(raw);
|
|
138546
138780
|
const result2 = ExtensionManifestSchema.safeParse(parsed);
|
|
138547
138781
|
if (!result2.success) return null;
|
|
@@ -138551,13 +138785,13 @@ async function readManifestVersion(manifestPath) {
|
|
|
138551
138785
|
}
|
|
138552
138786
|
}
|
|
138553
138787
|
async function copyDirectory(source, destination) {
|
|
138554
|
-
await
|
|
138555
|
-
await
|
|
138788
|
+
await fs41.mkdir(destination, { recursive: true });
|
|
138789
|
+
await fs41.cp(source, destination, { recursive: true, force: true });
|
|
138556
138790
|
}
|
|
138557
138791
|
async function ensureBuiltinMarketplaceExtension(dorkHome) {
|
|
138558
|
-
const destinationDir =
|
|
138559
|
-
const sourceManifestPath =
|
|
138560
|
-
const destinationManifestPath =
|
|
138792
|
+
const destinationDir = path61.join(dorkHome, "extensions", EXTENSION_ID);
|
|
138793
|
+
const sourceManifestPath = path61.join(BUILTIN_SOURCE_DIR, "extension.json");
|
|
138794
|
+
const destinationManifestPath = path61.join(destinationDir, "extension.json");
|
|
138561
138795
|
const bundledVersion = await readManifestVersion(sourceManifestPath);
|
|
138562
138796
|
if (!bundledVersion) {
|
|
138563
138797
|
logger.warn(
|
|
@@ -138829,16 +139063,16 @@ function resolveRelativePath(source, context) {
|
|
|
138829
139063
|
throw new ResolvePluginSourceError('Relative paths must not contain ".."');
|
|
138830
139064
|
}
|
|
138831
139065
|
const startsWithDotSlash = source.startsWith("./");
|
|
138832
|
-
let
|
|
139066
|
+
let path79;
|
|
138833
139067
|
if (startsWithDotSlash) {
|
|
138834
|
-
|
|
139068
|
+
path79 = stripLeadingDotSlash(source);
|
|
138835
139069
|
} else {
|
|
138836
139070
|
const pluginRoot = normalizePluginRoot(context.pluginRoot);
|
|
138837
|
-
|
|
139071
|
+
path79 = pluginRoot ? `${pluginRoot}/${source}` : source;
|
|
138838
139072
|
}
|
|
138839
139073
|
return {
|
|
138840
139074
|
type: "relative-path",
|
|
138841
|
-
path:
|
|
139075
|
+
path: path79,
|
|
138842
139076
|
marketplaceRoot: context.marketplaceRoot
|
|
138843
139077
|
};
|
|
138844
139078
|
}
|
|
@@ -138946,16 +139180,16 @@ var MarketplaceCache = class {
|
|
|
138946
139180
|
* @returns A descriptor when present, `null` otherwise.
|
|
138947
139181
|
*/
|
|
138948
139182
|
async getPackage(packageName, commitSha) {
|
|
138949
|
-
const
|
|
139183
|
+
const path79 = this.packageDir(packageName, commitSha);
|
|
138950
139184
|
try {
|
|
138951
|
-
const info = await stat5(
|
|
139185
|
+
const info = await stat5(path79);
|
|
138952
139186
|
if (!info.isDirectory()) {
|
|
138953
139187
|
return null;
|
|
138954
139188
|
}
|
|
138955
139189
|
return {
|
|
138956
139190
|
packageName,
|
|
138957
139191
|
commitSha,
|
|
138958
|
-
path:
|
|
139192
|
+
path: path79,
|
|
138959
139193
|
cachedAt: info.mtime
|
|
138960
139194
|
};
|
|
138961
139195
|
} catch {
|
|
@@ -138974,9 +139208,9 @@ var MarketplaceCache = class {
|
|
|
138974
139208
|
* @returns Absolute path to the reserved directory.
|
|
138975
139209
|
*/
|
|
138976
139210
|
async putPackage(packageName, commitSha) {
|
|
138977
|
-
const
|
|
138978
|
-
await mkdir12(
|
|
138979
|
-
return
|
|
139211
|
+
const path79 = this.packageDir(packageName, commitSha);
|
|
139212
|
+
await mkdir12(path79, { recursive: true });
|
|
139213
|
+
return path79;
|
|
138980
139214
|
}
|
|
138981
139215
|
/**
|
|
138982
139216
|
* Enumerate every cached package across all names and SHAs. Entries whose
|
|
@@ -138997,16 +139231,16 @@ var MarketplaceCache = class {
|
|
|
138997
139231
|
if (!parsed) {
|
|
138998
139232
|
continue;
|
|
138999
139233
|
}
|
|
139000
|
-
const
|
|
139234
|
+
const path79 = join19(root3, entry);
|
|
139001
139235
|
try {
|
|
139002
|
-
const info = await stat5(
|
|
139236
|
+
const info = await stat5(path79);
|
|
139003
139237
|
if (!info.isDirectory()) {
|
|
139004
139238
|
continue;
|
|
139005
139239
|
}
|
|
139006
139240
|
results.push({
|
|
139007
139241
|
packageName: parsed.packageName,
|
|
139008
139242
|
commitSha: parsed.commitSha,
|
|
139009
|
-
path:
|
|
139243
|
+
path: path79,
|
|
139010
139244
|
cachedAt: info.mtime
|
|
139011
139245
|
});
|
|
139012
139246
|
} catch {
|
|
@@ -139289,15 +139523,15 @@ function legacyGitUrlFromSource(source) {
|
|
|
139289
139523
|
// ../../apps/server/src/services/marketplace/package-fetcher.ts
|
|
139290
139524
|
import { execFile as execFile3 } from "node:child_process";
|
|
139291
139525
|
import { readFile as readFile16 } from "node:fs/promises";
|
|
139292
|
-
import
|
|
139526
|
+
import path64 from "node:path";
|
|
139293
139527
|
import { promisify as promisify5 } from "node:util";
|
|
139294
139528
|
|
|
139295
139529
|
// ../../apps/server/src/services/marketplace/source-resolvers/relative-path.ts
|
|
139296
|
-
import
|
|
139530
|
+
import path62 from "node:path";
|
|
139297
139531
|
import { access as access3 } from "node:fs/promises";
|
|
139298
139532
|
var RELATIVE_PATH_SENTINEL_SHA = "relative-path";
|
|
139299
139533
|
async function relativePathResolver(resolved, opts) {
|
|
139300
|
-
const fullPath =
|
|
139534
|
+
const fullPath = path62.join(resolved.marketplaceRoot, resolved.path);
|
|
139301
139535
|
try {
|
|
139302
139536
|
await access3(fullPath);
|
|
139303
139537
|
} catch {
|
|
@@ -139333,7 +139567,7 @@ async function urlResolver(resolved, opts, deps) {
|
|
|
139333
139567
|
// ../../apps/server/src/services/marketplace/source-resolvers/git-subdir.ts
|
|
139334
139568
|
import { spawn as spawn4 } from "node:child_process";
|
|
139335
139569
|
import { readdir as readdir6, rm as rm5 } from "node:fs/promises";
|
|
139336
|
-
import
|
|
139570
|
+
import path63 from "node:path";
|
|
139337
139571
|
async function gitSubdirResolver(resolved, opts, deps) {
|
|
139338
139572
|
const ref = resolved.sha ?? resolved.ref ?? "main";
|
|
139339
139573
|
const commitSha = await deps.resolveCommitSha(resolved.cloneUrl, ref);
|
|
@@ -139341,7 +139575,7 @@ async function gitSubdirResolver(resolved, opts, deps) {
|
|
|
139341
139575
|
const cached = await deps.cache.getPackage(opts.packageName, commitSha);
|
|
139342
139576
|
if (cached) {
|
|
139343
139577
|
return {
|
|
139344
|
-
path:
|
|
139578
|
+
path: path63.join(cached.path, resolved.subpath),
|
|
139345
139579
|
commitSha,
|
|
139346
139580
|
fromCache: true
|
|
139347
139581
|
};
|
|
@@ -139386,7 +139620,7 @@ async function gitSubdirResolver(resolved, opts, deps) {
|
|
|
139386
139620
|
}
|
|
139387
139621
|
}
|
|
139388
139622
|
return {
|
|
139389
|
-
path:
|
|
139623
|
+
path: path63.join(destDir, resolved.subpath),
|
|
139390
139624
|
commitSha,
|
|
139391
139625
|
fromCache: false
|
|
139392
139626
|
};
|
|
@@ -139418,7 +139652,7 @@ async function pruneOutsideSubpath(destDir, subpath) {
|
|
|
139418
139652
|
await Promise.all(
|
|
139419
139653
|
entries.map(async (entry) => {
|
|
139420
139654
|
if (entry === ".git" || entry === firstSegment) return;
|
|
139421
|
-
await rm5(
|
|
139655
|
+
await rm5(path63.join(destDir, entry), { recursive: true, force: true });
|
|
139422
139656
|
})
|
|
139423
139657
|
);
|
|
139424
139658
|
}
|
|
@@ -139696,7 +139930,7 @@ var PackageFetcher = class {
|
|
|
139696
139930
|
*/
|
|
139697
139931
|
async readLocalDorkosSidecar(source) {
|
|
139698
139932
|
const root3 = fileUrlToPath(source.source);
|
|
139699
|
-
const sidecarPath =
|
|
139933
|
+
const sidecarPath = path64.join(root3, ".claude-plugin", "dorkos.json");
|
|
139700
139934
|
let raw;
|
|
139701
139935
|
try {
|
|
139702
139936
|
raw = await readFile16(sidecarPath, "utf-8");
|
|
@@ -139723,7 +139957,7 @@ var PackageFetcher = class {
|
|
|
139723
139957
|
*/
|
|
139724
139958
|
async readLocalMarketplaceJson(source) {
|
|
139725
139959
|
const root3 = fileUrlToPath(source.source);
|
|
139726
|
-
const manifestPath =
|
|
139960
|
+
const manifestPath = path64.join(root3, "marketplace.json");
|
|
139727
139961
|
let raw;
|
|
139728
139962
|
try {
|
|
139729
139963
|
raw = await readFile16(manifestPath, "utf-8");
|
|
@@ -140176,9 +140410,9 @@ async function walkPackageFiles(root3) {
|
|
|
140176
140410
|
await visit2(root3);
|
|
140177
140411
|
return results;
|
|
140178
140412
|
}
|
|
140179
|
-
async function pathExists2(
|
|
140413
|
+
async function pathExists2(path79) {
|
|
140180
140414
|
try {
|
|
140181
|
-
await stat8(
|
|
140415
|
+
await stat8(path79);
|
|
140182
140416
|
return true;
|
|
140183
140417
|
} catch {
|
|
140184
140418
|
return false;
|
|
@@ -140373,7 +140607,7 @@ function collectExternalHosts(extensions) {
|
|
|
140373
140607
|
|
|
140374
140608
|
// ../../apps/server/src/services/marketplace/flows/install-plugin.ts
|
|
140375
140609
|
import { cp as cp2, mkdir as mkdir13, readdir as readdir9, readFile as readFile19, stat as stat9 } from "node:fs/promises";
|
|
140376
|
-
import
|
|
140610
|
+
import path66 from "node:path";
|
|
140377
140611
|
|
|
140378
140612
|
// ../../apps/server/src/services/marketplace/lib/atomic-move.ts
|
|
140379
140613
|
import { cp, rename as rename9, rm as rm6 } from "node:fs/promises";
|
|
@@ -140394,13 +140628,13 @@ function isCrossDeviceError(err) {
|
|
|
140394
140628
|
import { execFile as execFile4 } from "node:child_process";
|
|
140395
140629
|
import { mkdtemp as mkdtemp2, rm as rm7 } from "node:fs/promises";
|
|
140396
140630
|
import { tmpdir as tmpdir2 } from "node:os";
|
|
140397
|
-
import
|
|
140631
|
+
import path65 from "node:path";
|
|
140398
140632
|
import { promisify as promisify6 } from "node:util";
|
|
140399
140633
|
var execFileAsync4 = promisify6(execFile4);
|
|
140400
140634
|
var BACKUP_BRANCH_PREFIX = "dorkos-rollback";
|
|
140401
140635
|
var STAGING_DIR_PREFIX = "dorkos-install-";
|
|
140402
140636
|
async function runTransaction(opts) {
|
|
140403
|
-
const stagingDir = await mkdtemp2(
|
|
140637
|
+
const stagingDir = await mkdtemp2(path65.join(tmpdir2(), `${STAGING_DIR_PREFIX}${opts.name}-`));
|
|
140404
140638
|
const backupBranch = opts.rollbackBranch ? await maybeCreateBackupBranch(opts.name) : void 0;
|
|
140405
140639
|
try {
|
|
140406
140640
|
await opts.stage({ path: stagingDir });
|
|
@@ -140528,7 +140762,7 @@ var PluginInstallFlow = class {
|
|
|
140528
140762
|
* lives on a different volume than `dorkHome`.
|
|
140529
140763
|
*/
|
|
140530
140764
|
async activate(stagingDir, installRoot, manifest) {
|
|
140531
|
-
await mkdir13(
|
|
140765
|
+
await mkdir13(path66.dirname(installRoot), { recursive: true });
|
|
140532
140766
|
await atomicMove(stagingDir, installRoot);
|
|
140533
140767
|
const extensions = await discoverStagedExtensions(installRoot);
|
|
140534
140768
|
for (const ext of extensions) {
|
|
@@ -140548,19 +140782,19 @@ var PluginInstallFlow = class {
|
|
|
140548
140782
|
};
|
|
140549
140783
|
function computeInstallRoot2(dorkHome, manifest, projectPath) {
|
|
140550
140784
|
if (projectPath) {
|
|
140551
|
-
return
|
|
140785
|
+
return path66.join(projectPath, ".dork", "plugins", manifest.name);
|
|
140552
140786
|
}
|
|
140553
|
-
return
|
|
140787
|
+
return path66.join(dorkHome, "plugins", manifest.name);
|
|
140554
140788
|
}
|
|
140555
140789
|
async function discoverStagedExtensions(root3) {
|
|
140556
|
-
const extRoot =
|
|
140790
|
+
const extRoot = path66.join(root3, ".dork", "extensions");
|
|
140557
140791
|
if (!await exists2(extRoot)) return [];
|
|
140558
140792
|
const entries = await readdir9(extRoot, { withFileTypes: true });
|
|
140559
140793
|
const found = [];
|
|
140560
140794
|
for (const entry of entries) {
|
|
140561
140795
|
if (!entry.isDirectory()) continue;
|
|
140562
|
-
const extDir =
|
|
140563
|
-
const manifestPath =
|
|
140796
|
+
const extDir = path66.join(extRoot, entry.name);
|
|
140797
|
+
const manifestPath = path66.join(extDir, "extension.json");
|
|
140564
140798
|
if (!await exists2(manifestPath)) continue;
|
|
140565
140799
|
const parsed = await readExtensionManifest(manifestPath);
|
|
140566
140800
|
if (parsed) {
|
|
@@ -140601,7 +140835,7 @@ async function exists2(target) {
|
|
|
140601
140835
|
|
|
140602
140836
|
// ../../apps/server/src/services/marketplace/flows/install-agent.ts
|
|
140603
140837
|
import { cp as cp3, mkdir as mkdir14 } from "node:fs/promises";
|
|
140604
|
-
import
|
|
140838
|
+
import path67 from "node:path";
|
|
140605
140839
|
var AgentInstallFlow = class {
|
|
140606
140840
|
constructor(deps) {
|
|
140607
140841
|
this.deps = deps;
|
|
@@ -140663,19 +140897,19 @@ var AgentInstallFlow = class {
|
|
|
140663
140897
|
};
|
|
140664
140898
|
function computeTargetDir(dorkHome, manifest, projectPath) {
|
|
140665
140899
|
if (projectPath) return projectPath;
|
|
140666
|
-
return
|
|
140900
|
+
return path67.join(dorkHome, "agents", manifest.name);
|
|
140667
140901
|
}
|
|
140668
140902
|
async function stageAgentPackage(packagePath, stagingPath) {
|
|
140669
140903
|
await cp3(packagePath, stagingPath, { recursive: true });
|
|
140670
140904
|
}
|
|
140671
140905
|
async function activateAgentPackage(stagingPath, targetDir) {
|
|
140672
|
-
await mkdir14(
|
|
140906
|
+
await mkdir14(path67.dirname(targetDir), { recursive: true });
|
|
140673
140907
|
await atomicMove(stagingPath, targetDir);
|
|
140674
140908
|
}
|
|
140675
140909
|
|
|
140676
140910
|
// ../../apps/server/src/services/marketplace/flows/install-skill-pack.ts
|
|
140677
140911
|
import { cp as cp4, mkdir as mkdir15, readdir as readdir10, readFile as readFile20 } from "node:fs/promises";
|
|
140678
|
-
import
|
|
140912
|
+
import path68 from "node:path";
|
|
140679
140913
|
init_parser();
|
|
140680
140914
|
var SKILL_FILENAME2 = "SKILL.md";
|
|
140681
140915
|
var SkillPackInstallFlow = class {
|
|
@@ -140703,9 +140937,9 @@ var SkillPackInstallFlow = class {
|
|
|
140703
140937
|
};
|
|
140704
140938
|
function computeInstallRoot3(dorkHome, packageName, projectPath) {
|
|
140705
140939
|
if (projectPath) {
|
|
140706
|
-
return
|
|
140940
|
+
return path68.join(projectPath, ".dork", "plugins", packageName);
|
|
140707
140941
|
}
|
|
140708
|
-
return
|
|
140942
|
+
return path68.join(dorkHome, "plugins", packageName);
|
|
140709
140943
|
}
|
|
140710
140944
|
async function stageSkillPack(packagePath, stagingPath) {
|
|
140711
140945
|
await cp4(packagePath, stagingPath, { recursive: true });
|
|
@@ -140715,7 +140949,7 @@ async function stageSkillPack(packagePath, stagingPath) {
|
|
|
140715
140949
|
}
|
|
140716
140950
|
}
|
|
140717
140951
|
async function activateSkillPack(stagingPath, installRoot) {
|
|
140718
|
-
await mkdir15(
|
|
140952
|
+
await mkdir15(path68.dirname(installRoot), { recursive: true });
|
|
140719
140953
|
await atomicMove(stagingPath, installRoot);
|
|
140720
140954
|
return { installPath: installRoot };
|
|
140721
140955
|
}
|
|
@@ -140737,7 +140971,7 @@ async function findSkillFiles(root3) {
|
|
|
140737
140971
|
for (const entry of entries) {
|
|
140738
140972
|
if (!entry.isFile() || entry.name !== SKILL_FILENAME2) continue;
|
|
140739
140973
|
const parent = entry.parentPath ?? entry.path ?? root3;
|
|
140740
|
-
matches.push(
|
|
140974
|
+
matches.push(path68.join(parent, entry.name));
|
|
140741
140975
|
}
|
|
140742
140976
|
return matches;
|
|
140743
140977
|
}
|
|
@@ -140751,7 +140985,7 @@ async function validateSkillFile(absFile) {
|
|
|
140751
140985
|
|
|
140752
140986
|
// ../../apps/server/src/services/marketplace/flows/install-adapter.ts
|
|
140753
140987
|
import { cp as cp5, mkdir as mkdir16 } from "node:fs/promises";
|
|
140754
|
-
import
|
|
140988
|
+
import path69 from "node:path";
|
|
140755
140989
|
var AdapterInstallFlow = class {
|
|
140756
140990
|
constructor(deps) {
|
|
140757
140991
|
this.deps = deps;
|
|
@@ -140766,7 +141000,7 @@ var AdapterInstallFlow = class {
|
|
|
140766
141000
|
*/
|
|
140767
141001
|
async install(packagePath, manifest, _opts) {
|
|
140768
141002
|
const { dorkHome, adapterManager: adapterManager2, logger: logger3 } = this.deps;
|
|
140769
|
-
const installPath =
|
|
141003
|
+
const installPath = path69.join(dorkHome, "plugins", manifest.name);
|
|
140770
141004
|
logger3.info("[marketplace/install-adapter] starting", {
|
|
140771
141005
|
name: manifest.name,
|
|
140772
141006
|
adapterType: manifest.adapterType,
|
|
@@ -140800,13 +141034,13 @@ async function stageAdapterPackage(packagePath, stagingPath) {
|
|
|
140800
141034
|
await cp5(packagePath, stagingPath, { recursive: true });
|
|
140801
141035
|
}
|
|
140802
141036
|
async function activateAdapterPackage(stagingPath, installPath) {
|
|
140803
|
-
await mkdir16(
|
|
141037
|
+
await mkdir16(path69.dirname(installPath), { recursive: true });
|
|
140804
141038
|
await atomicMove(stagingPath, installPath);
|
|
140805
141039
|
}
|
|
140806
141040
|
async function registerAdapterWithCompensation(adapterManager2, manifest, installPath, logger3) {
|
|
140807
141041
|
try {
|
|
140808
141042
|
await adapterManager2.addAdapter(manifest.adapterType, manifest.name, {
|
|
140809
|
-
pluginPath:
|
|
141043
|
+
pluginPath: path69.join(installPath, ".dork", "adapters", manifest.adapterType)
|
|
140810
141044
|
});
|
|
140811
141045
|
} catch (err) {
|
|
140812
141046
|
logger3.warn("[marketplace/install-adapter] addAdapter failed, compensating", {
|
|
@@ -140828,10 +141062,10 @@ async function registerAdapterWithCompensation(adapterManager2, manifest, instal
|
|
|
140828
141062
|
// ../../apps/server/src/services/marketplace/flows/uninstall.ts
|
|
140829
141063
|
import { cp as cp6, mkdir as mkdir17, mkdtemp as mkdtemp3, readFile as readFile21, readdir as readdir11, rm as rm8, stat as stat10 } from "node:fs/promises";
|
|
140830
141064
|
import { tmpdir as tmpdir3 } from "node:os";
|
|
140831
|
-
import
|
|
141065
|
+
import path70 from "node:path";
|
|
140832
141066
|
var STAGING_DIR_PREFIX2 = "dorkos-uninstall-";
|
|
140833
|
-
var DATA_SUBPATH =
|
|
140834
|
-
var SECRETS_SUBPATH =
|
|
141067
|
+
var DATA_SUBPATH = path70.join(".dork", "data");
|
|
141068
|
+
var SECRETS_SUBPATH = path70.join(".dork", "secrets.json");
|
|
140835
141069
|
var PackageNotInstalledError = class extends Error {
|
|
140836
141070
|
/**
|
|
140837
141071
|
* Build a `PackageNotInstalledError` for the supplied package name.
|
|
@@ -140857,8 +141091,8 @@ var UninstallFlow = class {
|
|
|
140857
141091
|
*/
|
|
140858
141092
|
async uninstall(req) {
|
|
140859
141093
|
const located = await this.locate(req);
|
|
140860
|
-
const stagingDir = await mkdtemp3(
|
|
140861
|
-
const stagingPath =
|
|
141094
|
+
const stagingDir = await mkdtemp3(path70.join(tmpdir3(), `${STAGING_DIR_PREFIX2}${req.name}-`));
|
|
141095
|
+
const stagingPath = path70.join(stagingDir, "pkg");
|
|
140862
141096
|
try {
|
|
140863
141097
|
await atomicMove(located.installRoot, stagingPath);
|
|
140864
141098
|
} catch (err) {
|
|
@@ -140905,16 +141139,16 @@ var UninstallFlow = class {
|
|
|
140905
141139
|
const candidates = [];
|
|
140906
141140
|
if (req.projectPath) {
|
|
140907
141141
|
candidates.push({
|
|
140908
|
-
installRoot:
|
|
141142
|
+
installRoot: path70.join(req.projectPath, ".dork", "plugins", req.name),
|
|
140909
141143
|
inferredType: "plugin"
|
|
140910
141144
|
});
|
|
140911
141145
|
}
|
|
140912
141146
|
candidates.push({
|
|
140913
|
-
installRoot:
|
|
141147
|
+
installRoot: path70.join(this.deps.dorkHome, "plugins", req.name),
|
|
140914
141148
|
inferredType: "plugin"
|
|
140915
141149
|
});
|
|
140916
141150
|
candidates.push({
|
|
140917
|
-
installRoot:
|
|
141151
|
+
installRoot: path70.join(this.deps.dorkHome, "agents", req.name),
|
|
140918
141152
|
inferredType: "agent"
|
|
140919
141153
|
});
|
|
140920
141154
|
return candidates;
|
|
@@ -140933,7 +141167,7 @@ var UninstallFlow = class {
|
|
|
140933
141167
|
}
|
|
140934
141168
|
if (type === "adapter") {
|
|
140935
141169
|
await this.deps.adapterManager.removeAdapter(
|
|
140936
|
-
located.manifest?.name ??
|
|
141170
|
+
located.manifest?.name ?? path70.basename(located.installRoot)
|
|
140937
141171
|
);
|
|
140938
141172
|
}
|
|
140939
141173
|
}
|
|
@@ -140944,7 +141178,7 @@ var UninstallFlow = class {
|
|
|
140944
141178
|
* @internal
|
|
140945
141179
|
*/
|
|
140946
141180
|
async disableBundledExtensions(stagingPath) {
|
|
140947
|
-
const extDir =
|
|
141181
|
+
const extDir = path70.join(stagingPath, ".dork", "extensions");
|
|
140948
141182
|
if (!await pathExists3(extDir)) return;
|
|
140949
141183
|
const entries = await readdir11(extDir, { withFileTypes: true });
|
|
140950
141184
|
for (const entry of entries) {
|
|
@@ -140962,17 +141196,17 @@ var UninstallFlow = class {
|
|
|
140962
141196
|
*/
|
|
140963
141197
|
async restorePreservedData(stagingPath, installRoot) {
|
|
140964
141198
|
const preserved = [];
|
|
140965
|
-
const stagedDataDir =
|
|
140966
|
-
const stagedSecrets =
|
|
140967
|
-
const liveDataDir =
|
|
140968
|
-
const liveSecrets =
|
|
141199
|
+
const stagedDataDir = path70.join(stagingPath, DATA_SUBPATH);
|
|
141200
|
+
const stagedSecrets = path70.join(stagingPath, SECRETS_SUBPATH);
|
|
141201
|
+
const liveDataDir = path70.join(installRoot, DATA_SUBPATH);
|
|
141202
|
+
const liveSecrets = path70.join(installRoot, SECRETS_SUBPATH);
|
|
140969
141203
|
if (await pathExists3(stagedDataDir)) {
|
|
140970
|
-
await mkdir17(
|
|
141204
|
+
await mkdir17(path70.dirname(liveDataDir), { recursive: true });
|
|
140971
141205
|
await cp6(stagedDataDir, liveDataDir, { recursive: true });
|
|
140972
141206
|
preserved.push(liveDataDir);
|
|
140973
141207
|
}
|
|
140974
141208
|
if (await pathExists3(stagedSecrets)) {
|
|
140975
|
-
await mkdir17(
|
|
141209
|
+
await mkdir17(path70.dirname(liveSecrets), { recursive: true });
|
|
140976
141210
|
await cp6(stagedSecrets, liveSecrets);
|
|
140977
141211
|
preserved.push(liveSecrets);
|
|
140978
141212
|
}
|
|
@@ -140990,7 +141224,7 @@ var UninstallFlow = class {
|
|
|
140990
141224
|
if (await pathExists3(installRoot)) {
|
|
140991
141225
|
await rm8(installRoot, { recursive: true, force: true });
|
|
140992
141226
|
}
|
|
140993
|
-
await mkdir17(
|
|
141227
|
+
await mkdir17(path70.dirname(installRoot), { recursive: true });
|
|
140994
141228
|
await atomicMove(stagingPath, installRoot);
|
|
140995
141229
|
} catch (rollbackErr) {
|
|
140996
141230
|
this.deps.logger.warn(
|
|
@@ -141025,7 +141259,7 @@ async function pathExists3(target) {
|
|
|
141025
141259
|
}
|
|
141026
141260
|
async function readManifestIfPresent(installRoot) {
|
|
141027
141261
|
try {
|
|
141028
|
-
const raw = await readFile21(
|
|
141262
|
+
const raw = await readFile21(path70.join(installRoot, PACKAGE_MANIFEST_PATH), "utf-8");
|
|
141029
141263
|
return JSON.parse(raw);
|
|
141030
141264
|
} catch {
|
|
141031
141265
|
return null;
|
|
@@ -141035,7 +141269,7 @@ async function readManifestIfPresent(installRoot) {
|
|
|
141035
141269
|
// ../../apps/server/src/services/marketplace/flows/update.ts
|
|
141036
141270
|
var import_semver2 = __toESM(require_semver2(), 1);
|
|
141037
141271
|
import { readFile as readFile22, readdir as readdir12, stat as stat11 } from "node:fs/promises";
|
|
141038
|
-
import
|
|
141272
|
+
import path71 from "node:path";
|
|
141039
141273
|
init_installed_metadata();
|
|
141040
141274
|
var PackageNotInstalledForUpdateError = class extends Error {
|
|
141041
141275
|
/**
|
|
@@ -141110,14 +141344,14 @@ var UpdateFlow = class {
|
|
|
141110
141344
|
async listInstalled() {
|
|
141111
141345
|
const results = [];
|
|
141112
141346
|
const roots = [
|
|
141113
|
-
{ dir:
|
|
141114
|
-
{ dir:
|
|
141347
|
+
{ dir: path71.join(this.deps.dorkHome, "plugins"), inferredType: "plugin" },
|
|
141348
|
+
{ dir: path71.join(this.deps.dorkHome, "agents"), inferredType: "agent" }
|
|
141115
141349
|
];
|
|
141116
141350
|
for (const root3 of roots) {
|
|
141117
141351
|
const entries = await readDirSafe(root3.dir);
|
|
141118
141352
|
for (const entry of entries) {
|
|
141119
141353
|
if (!entry.isDirectory()) continue;
|
|
141120
|
-
const installPath =
|
|
141354
|
+
const installPath = path71.join(root3.dir, entry.name);
|
|
141121
141355
|
const manifest = await readInstalledManifest(installPath);
|
|
141122
141356
|
if (!manifest) continue;
|
|
141123
141357
|
const installMetadata = await readInstallMetadata(installPath);
|
|
@@ -141221,7 +141455,7 @@ async function readDirSafe(dir) {
|
|
|
141221
141455
|
}
|
|
141222
141456
|
}
|
|
141223
141457
|
async function readInstalledManifest(installRoot) {
|
|
141224
|
-
const manifestPath =
|
|
141458
|
+
const manifestPath = path71.join(installRoot, PACKAGE_MANIFEST_PATH);
|
|
141225
141459
|
try {
|
|
141226
141460
|
const s5 = await stat11(manifestPath);
|
|
141227
141461
|
if (!s5.isFile()) return null;
|
|
@@ -141254,7 +141488,7 @@ async function reportInstallEvent(event) {
|
|
|
141254
141488
|
init_installed_metadata();
|
|
141255
141489
|
import { cp as cp7, mkdir as mkdir18, mkdtemp as mkdtemp4, rm as rm9, stat as stat12 } from "node:fs/promises";
|
|
141256
141490
|
import { tmpdir as tmpdir4 } from "node:os";
|
|
141257
|
-
import
|
|
141491
|
+
import path72 from "node:path";
|
|
141258
141492
|
var DIRECT_SOURCE_LABEL = "<direct>";
|
|
141259
141493
|
var InvalidPackageError = class extends Error {
|
|
141260
141494
|
/**
|
|
@@ -141408,12 +141642,12 @@ var MarketplaceInstaller = class {
|
|
|
141408
141642
|
let scratchDir = null;
|
|
141409
141643
|
let installRoot = null;
|
|
141410
141644
|
if (preserved.length > 0) {
|
|
141411
|
-
scratchDir = await mkdtemp4(
|
|
141645
|
+
scratchDir = await mkdtemp4(path72.join(tmpdir4(), "dorkos-update-preserve-"));
|
|
141412
141646
|
installRoot = await findInstallRootFromPreservedPath(preserved[0]);
|
|
141413
141647
|
for (const livePath of preserved) {
|
|
141414
|
-
const relPath =
|
|
141415
|
-
const scratchPath =
|
|
141416
|
-
await mkdir18(
|
|
141648
|
+
const relPath = path72.relative(installRoot, livePath);
|
|
141649
|
+
const scratchPath = path72.join(scratchDir, relPath);
|
|
141650
|
+
await mkdir18(path72.dirname(scratchPath), { recursive: true });
|
|
141417
141651
|
await cp7(livePath, scratchPath, { recursive: true });
|
|
141418
141652
|
}
|
|
141419
141653
|
await rm9(installRoot, { recursive: true, force: true });
|
|
@@ -141426,9 +141660,9 @@ var MarketplaceInstaller = class {
|
|
|
141426
141660
|
try {
|
|
141427
141661
|
await mkdir18(installRoot, { recursive: true });
|
|
141428
141662
|
for (const livePath of preserved) {
|
|
141429
|
-
const relPath =
|
|
141430
|
-
const scratchPath =
|
|
141431
|
-
await mkdir18(
|
|
141663
|
+
const relPath = path72.relative(installRoot, livePath);
|
|
141664
|
+
const scratchPath = path72.join(scratchDir, relPath);
|
|
141665
|
+
await mkdir18(path72.dirname(livePath), { recursive: true });
|
|
141432
141666
|
await cp7(scratchPath, livePath, { recursive: true });
|
|
141433
141667
|
}
|
|
141434
141668
|
} catch {
|
|
@@ -141439,11 +141673,11 @@ var MarketplaceInstaller = class {
|
|
|
141439
141673
|
}
|
|
141440
141674
|
if (scratchDir && installRoot) {
|
|
141441
141675
|
for (const livePath of preserved) {
|
|
141442
|
-
const relPath =
|
|
141443
|
-
const scratchPath =
|
|
141444
|
-
const destPath =
|
|
141676
|
+
const relPath = path72.relative(installRoot, livePath);
|
|
141677
|
+
const scratchPath = path72.join(scratchDir, relPath);
|
|
141678
|
+
const destPath = path72.join(installResult.installPath, relPath);
|
|
141445
141679
|
if (!await pathExists4(scratchPath)) continue;
|
|
141446
|
-
await mkdir18(
|
|
141680
|
+
await mkdir18(path72.dirname(destPath), { recursive: true });
|
|
141447
141681
|
await cp7(scratchPath, destPath, { recursive: true });
|
|
141448
141682
|
}
|
|
141449
141683
|
await rm9(scratchDir, { recursive: true, force: true }).catch(() => void 0);
|
|
@@ -141589,14 +141823,14 @@ async function pathExists4(target) {
|
|
|
141589
141823
|
}
|
|
141590
141824
|
}
|
|
141591
141825
|
async function findInstallRootFromPreservedPath(preservedPath) {
|
|
141592
|
-
const segments = preservedPath.split(
|
|
141826
|
+
const segments = preservedPath.split(path72.sep);
|
|
141593
141827
|
const dorkIdx = segments.lastIndexOf(".dork");
|
|
141594
141828
|
if (dorkIdx <= 0) {
|
|
141595
141829
|
throw new Error(
|
|
141596
141830
|
`[marketplace-installer] Cannot derive install root from preserved path '${preservedPath}'`
|
|
141597
141831
|
);
|
|
141598
141832
|
}
|
|
141599
|
-
return segments.slice(0, dorkIdx).join(
|
|
141833
|
+
return segments.slice(0, dorkIdx).join(path72.sep);
|
|
141600
141834
|
}
|
|
141601
141835
|
function resolveRelativeSubpath(source, pluginRoot) {
|
|
141602
141836
|
if (source.startsWith("./")) {
|
|
@@ -142087,10 +142321,10 @@ async function safeReaddir2(dir) {
|
|
|
142087
142321
|
|
|
142088
142322
|
// ../../apps/server/src/services/marketplace-mcp/personal-marketplace.ts
|
|
142089
142323
|
import { mkdir as mkdir19, writeFile as writeFile12, access as access4 } from "node:fs/promises";
|
|
142090
|
-
import
|
|
142324
|
+
import path73 from "node:path";
|
|
142091
142325
|
var PERSONAL_MARKETPLACE_NAME = "personal";
|
|
142092
142326
|
function personalMarketplaceRoot(dorkHome) {
|
|
142093
|
-
return
|
|
142327
|
+
return path73.join(dorkHome, "personal-marketplace");
|
|
142094
142328
|
}
|
|
142095
142329
|
var DEFAULT_README = `# Personal Marketplace
|
|
142096
142330
|
|
|
@@ -142124,10 +142358,10 @@ async function pathExists5(target) {
|
|
|
142124
142358
|
}
|
|
142125
142359
|
async function ensurePersonalMarketplace(deps) {
|
|
142126
142360
|
const root3 = personalMarketplaceRoot(deps.dorkHome);
|
|
142127
|
-
const packagesDir =
|
|
142128
|
-
const manifestPath =
|
|
142129
|
-
const readmePath =
|
|
142130
|
-
const gitignorePath =
|
|
142361
|
+
const packagesDir = path73.join(root3, "packages");
|
|
142362
|
+
const manifestPath = path73.join(root3, "marketplace.json");
|
|
142363
|
+
const readmePath = path73.join(root3, "README.md");
|
|
142364
|
+
const gitignorePath = path73.join(root3, ".gitignore");
|
|
142131
142365
|
await mkdir19(packagesDir, { recursive: true });
|
|
142132
142366
|
if (!await pathExists5(manifestPath)) {
|
|
142133
142367
|
await writeFile12(
|
|
@@ -147957,7 +148191,7 @@ function applyFilters(entries, args) {
|
|
|
147957
148191
|
|
|
147958
148192
|
// ../../apps/server/src/services/marketplace-mcp/tool-get.ts
|
|
147959
148193
|
import { readFile as readFile23 } from "node:fs/promises";
|
|
147960
|
-
import
|
|
148194
|
+
import path74 from "node:path";
|
|
147961
148195
|
import { z as z52 } from "zod";
|
|
147962
148196
|
var GetInputSchema = {
|
|
147963
148197
|
name: z52.string().describe("Package name"),
|
|
@@ -148053,7 +148287,7 @@ async function loadManifestAndReadme(deps, located, packageName) {
|
|
|
148053
148287
|
}
|
|
148054
148288
|
async function readReadmeIfPresent(packagePath) {
|
|
148055
148289
|
try {
|
|
148056
|
-
return await readFile23(
|
|
148290
|
+
return await readFile23(path74.join(packagePath, "README.md"), "utf-8");
|
|
148057
148291
|
} catch {
|
|
148058
148292
|
return void 0;
|
|
148059
148293
|
}
|
|
@@ -148416,26 +148650,26 @@ function createUninstallHandler(deps) {
|
|
|
148416
148650
|
}
|
|
148417
148651
|
|
|
148418
148652
|
// ../../apps/server/src/services/marketplace-mcp/tool-create-package.ts
|
|
148419
|
-
import
|
|
148653
|
+
import path76 from "node:path";
|
|
148420
148654
|
import { readFile as readFile24, writeFile as writeFile13 } from "node:fs/promises";
|
|
148421
148655
|
import { z as z57 } from "zod";
|
|
148422
148656
|
|
|
148423
148657
|
// ../marketplace/dist/scaffolder.js
|
|
148424
148658
|
init_constants();
|
|
148425
148659
|
init_package_types();
|
|
148426
|
-
import { promises as
|
|
148427
|
-
import
|
|
148660
|
+
import { promises as fs42 } from "node:fs";
|
|
148661
|
+
import path75 from "node:path";
|
|
148428
148662
|
async function createPackage(opts) {
|
|
148429
|
-
const packagePath =
|
|
148663
|
+
const packagePath = path75.join(opts.parentDir, opts.name);
|
|
148430
148664
|
try {
|
|
148431
|
-
await
|
|
148665
|
+
await fs42.access(packagePath);
|
|
148432
148666
|
throw new Error(`Directory already exists: ${packagePath}`);
|
|
148433
148667
|
} catch (err) {
|
|
148434
148668
|
if (err.code !== "ENOENT")
|
|
148435
148669
|
throw err;
|
|
148436
148670
|
}
|
|
148437
|
-
await
|
|
148438
|
-
await
|
|
148671
|
+
await fs42.mkdir(packagePath, { recursive: true });
|
|
148672
|
+
await fs42.mkdir(path75.join(packagePath, ".dork"), { recursive: true });
|
|
148439
148673
|
const filesWritten = [];
|
|
148440
148674
|
const baseManifest = {
|
|
148441
148675
|
schemaVersion: 1,
|
|
@@ -148449,16 +148683,16 @@ async function createPackage(opts) {
|
|
|
148449
148683
|
layers: defaultLayersForType(opts.type)
|
|
148450
148684
|
};
|
|
148451
148685
|
const manifest = opts.type === "adapter" ? { ...baseManifest, adapterType: opts.adapterType ?? opts.name } : baseManifest;
|
|
148452
|
-
await
|
|
148686
|
+
await fs42.writeFile(path75.join(packagePath, PACKAGE_MANIFEST_PATH), JSON.stringify(manifest, null, 2) + "\n", "utf-8");
|
|
148453
148687
|
filesWritten.push(PACKAGE_MANIFEST_PATH);
|
|
148454
148688
|
if (requiresClaudePlugin(opts.type)) {
|
|
148455
|
-
await
|
|
148689
|
+
await fs42.mkdir(path75.join(packagePath, ".claude-plugin"), { recursive: true });
|
|
148456
148690
|
const pluginManifest = {
|
|
148457
148691
|
name: opts.name,
|
|
148458
148692
|
version: "0.0.1",
|
|
148459
148693
|
description: manifest.description
|
|
148460
148694
|
};
|
|
148461
|
-
await
|
|
148695
|
+
await fs42.writeFile(path75.join(packagePath, CLAUDE_PLUGIN_MANIFEST_PATH), JSON.stringify(pluginManifest, null, 2) + "\n", "utf-8");
|
|
148462
148696
|
filesWritten.push(CLAUDE_PLUGIN_MANIFEST_PATH);
|
|
148463
148697
|
}
|
|
148464
148698
|
const readme = `# ${opts.name}
|
|
@@ -148467,10 +148701,10 @@ ${manifest.description}
|
|
|
148467
148701
|
|
|
148468
148702
|
Created with \`dorkos package init\`.
|
|
148469
148703
|
`;
|
|
148470
|
-
await
|
|
148704
|
+
await fs42.writeFile(path75.join(packagePath, "README.md"), readme, "utf-8");
|
|
148471
148705
|
filesWritten.push("README.md");
|
|
148472
148706
|
for (const dir of starterDirsForType(opts.type)) {
|
|
148473
|
-
await
|
|
148707
|
+
await fs42.mkdir(path75.join(packagePath, dir), { recursive: true });
|
|
148474
148708
|
}
|
|
148475
148709
|
return { packagePath, filesWritten };
|
|
148476
148710
|
}
|
|
@@ -148553,7 +148787,7 @@ function createCreatePackageHandler(deps) {
|
|
|
148553
148787
|
reason: confirmation.reason ?? "User declined package creation"
|
|
148554
148788
|
});
|
|
148555
148789
|
}
|
|
148556
|
-
const packagesDir =
|
|
148790
|
+
const packagesDir = path76.join(personalMarketplaceRoot(deps.dorkHome), "packages");
|
|
148557
148791
|
let result2;
|
|
148558
148792
|
try {
|
|
148559
148793
|
result2 = await createPackage({
|
|
@@ -148588,7 +148822,7 @@ function createCreatePackageHandler(deps) {
|
|
|
148588
148822
|
};
|
|
148589
148823
|
}
|
|
148590
148824
|
async function registerInPersonalMarketplace(dorkHome, entry) {
|
|
148591
|
-
const manifestPath =
|
|
148825
|
+
const manifestPath = path76.join(personalMarketplaceRoot(dorkHome), "marketplace.json");
|
|
148592
148826
|
const raw = await readFile24(manifestPath, "utf-8");
|
|
148593
148827
|
const json = JSON.parse(raw);
|
|
148594
148828
|
const plugins = json.plugins ?? [];
|
|
@@ -150483,8 +150717,8 @@ init_dork_home();
|
|
|
150483
150717
|
|
|
150484
150718
|
// ../../apps/server/src/services/marketplace/telemetry-reporter.ts
|
|
150485
150719
|
import { randomUUID as randomUUID11 } from "node:crypto";
|
|
150486
|
-
import
|
|
150487
|
-
import
|
|
150720
|
+
import fs43 from "node:fs/promises";
|
|
150721
|
+
import path77 from "node:path";
|
|
150488
150722
|
var TELEMETRY_ENDPOINT = "https://dorkos.ai/api/telemetry/install";
|
|
150489
150723
|
var INSTALL_ID_FILENAME = "telemetry-install-id";
|
|
150490
150724
|
function registerDorkosCommunityTelemetry(consent, dorkHome, dorkosVersion) {
|
|
@@ -150512,16 +150746,16 @@ function buildPayload(event, installId, dorkosVersion) {
|
|
|
150512
150746
|
};
|
|
150513
150747
|
}
|
|
150514
150748
|
async function getOrCreateInstallId(dorkHome) {
|
|
150515
|
-
const filePath =
|
|
150749
|
+
const filePath = path77.join(dorkHome, INSTALL_ID_FILENAME);
|
|
150516
150750
|
try {
|
|
150517
|
-
const existing = await
|
|
150751
|
+
const existing = await fs43.readFile(filePath, "utf8");
|
|
150518
150752
|
const trimmed = existing.trim();
|
|
150519
150753
|
if (trimmed) return trimmed;
|
|
150520
150754
|
} catch {
|
|
150521
150755
|
}
|
|
150522
150756
|
const id = randomUUID11();
|
|
150523
|
-
await
|
|
150524
|
-
await
|
|
150757
|
+
await fs43.mkdir(dorkHome, { recursive: true });
|
|
150758
|
+
await fs43.writeFile(filePath, id, "utf8");
|
|
150525
150759
|
return id;
|
|
150526
150760
|
}
|
|
150527
150761
|
|
|
@@ -150544,18 +150778,18 @@ async function start() {
|
|
|
150544
150778
|
process.env.DORK_HOME = dorkHome;
|
|
150545
150779
|
console.log(`[DorkOS] Data directory: ${dorkHome}`);
|
|
150546
150780
|
const logLevel = env.DORKOS_LOG_LEVEL;
|
|
150547
|
-
initLogger({ level: logLevel, logDir:
|
|
150781
|
+
initLogger({ level: logLevel, logDir: path78.join(dorkHome, "logs") });
|
|
150548
150782
|
initConfigManager(dorkHome);
|
|
150549
150783
|
const loggingConfig = configManager.get("logging");
|
|
150550
150784
|
if (loggingConfig?.maxLogSizeKb || loggingConfig?.maxLogFiles) {
|
|
150551
150785
|
initLogger({
|
|
150552
150786
|
level: logLevel,
|
|
150553
|
-
logDir:
|
|
150787
|
+
logDir: path78.join(dorkHome, "logs"),
|
|
150554
150788
|
maxLogSize: (loggingConfig.maxLogSizeKb ?? 500) * 1024,
|
|
150555
150789
|
maxLogFiles: loggingConfig.maxLogFiles ?? 14
|
|
150556
150790
|
});
|
|
150557
150791
|
}
|
|
150558
|
-
const dbPath =
|
|
150792
|
+
const dbPath = path78.join(dorkHome, "dork.db");
|
|
150559
150793
|
const db = createDb(dbPath);
|
|
150560
150794
|
runMigrations(db);
|
|
150561
150795
|
logger.info(`[DB] Consolidated database ready at ${dbPath}`);
|
|
@@ -150625,7 +150859,7 @@ async function start() {
|
|
|
150625
150859
|
// eslint-disable-next-line no-restricted-syntax -- Checking presence, not value: env.ts can't distinguish "unset" from "set to false"
|
|
150626
150860
|
"DORKOS_RELAY_ENABLED" in process.env ? env.DORKOS_RELAY_ENABLED : relayConfig.enabled
|
|
150627
150861
|
);
|
|
150628
|
-
const relayDataDir = relayConfig.dataDir ??
|
|
150862
|
+
const relayDataDir = relayConfig.dataDir ?? path78.join(dorkHome, "relay");
|
|
150629
150863
|
if (relayEnabled) {
|
|
150630
150864
|
try {
|
|
150631
150865
|
adapterRegistry = new AdapterRegistry();
|
|
@@ -150674,7 +150908,7 @@ async function start() {
|
|
|
150674
150908
|
}
|
|
150675
150909
|
if (relayEnabled && relayCore && adapterRegistry && traceStore) {
|
|
150676
150910
|
try {
|
|
150677
|
-
const adapterConfigPath =
|
|
150911
|
+
const adapterConfigPath = path78.join(dorkHome, "relay", "adapters.json");
|
|
150678
150912
|
adapterManager = new AdapterManager(adapterRegistry, adapterConfigPath, {
|
|
150679
150913
|
agentManager: runtimeRegistry.getDefault(),
|
|
150680
150914
|
traceStore,
|
|
@@ -150771,17 +151005,17 @@ async function start() {
|
|
|
150771
151005
|
if (taskFileWatcher) {
|
|
150772
151006
|
const projectPath = meshCore.getProjectPath(agentId);
|
|
150773
151007
|
if (projectPath) {
|
|
150774
|
-
const agentTasksDir =
|
|
151008
|
+
const agentTasksDir = path78.join(projectPath, ".dork", "tasks");
|
|
150775
151009
|
taskFileWatcher.stopWatching(agentTasksDir).catch(() => {
|
|
150776
151010
|
});
|
|
150777
151011
|
}
|
|
150778
151012
|
}
|
|
150779
151013
|
taskReconciler?.removeDirectory(
|
|
150780
|
-
meshCore.getProjectPath(agentId) ?
|
|
151014
|
+
meshCore.getProjectPath(agentId) ? path78.join(meshCore.getProjectPath(agentId), ".dork", "tasks") : ""
|
|
150781
151015
|
);
|
|
150782
151016
|
});
|
|
150783
151017
|
}
|
|
150784
|
-
const globalTasksDir =
|
|
151018
|
+
const globalTasksDir = path78.join(dorkHome, "tasks");
|
|
150785
151019
|
taskFileWatcher = new TaskFileWatcher(taskStore, () => {
|
|
150786
151020
|
}, dorkHome);
|
|
150787
151021
|
taskFileWatcher.watch(globalTasksDir, "global");
|
|
@@ -150791,7 +151025,7 @@ async function start() {
|
|
|
150791
151025
|
for (const agent of meshCore.list()) {
|
|
150792
151026
|
const projectPath = meshCore.getProjectPath(agent.id);
|
|
150793
151027
|
if (projectPath) {
|
|
150794
|
-
const agentTasksDir =
|
|
151028
|
+
const agentTasksDir = path78.join(projectPath, ".dork", "tasks");
|
|
150795
151029
|
taskFileWatcher.watch(agentTasksDir, "project", projectPath, agent.id);
|
|
150796
151030
|
taskReconciler.addDirectory(agentTasksDir, "project", projectPath, agent.id);
|
|
150797
151031
|
}
|