dorkos 0.36.0 → 0.38.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.
@@ -13806,11 +13806,11 @@ var require_mime_types = __commonJS({
13806
13806
  }
13807
13807
  return exts[0];
13808
13808
  }
13809
- function lookup(path72) {
13810
- if (!path72 || typeof path72 !== "string") {
13809
+ function lookup(path79) {
13810
+ if (!path79 || typeof path79 !== "string") {
13811
13811
  return false;
13812
13812
  }
13813
- var extension3 = extname2("x." + path72).toLowerCase().substr(1);
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(path72) {
14323
- if (typeof path72 !== "string")
14322
+ function basename5(path79) {
14323
+ if (typeof path79 !== "string")
14324
14324
  return "";
14325
- for (let i4 = path72.length - 1; i4 >= 0; --i4) {
14326
- switch (path72.charCodeAt(i4)) {
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
- path72 = path72.slice(i4 + 1);
14331
- return path72 === ".." || path72 === "." ? "" : path72;
14330
+ path79 = path79.slice(i4 + 1);
14331
+ return path79 === ".." || path79 === "." ? "" : path79;
14332
14332
  }
14333
14333
  }
14334
- return path72 === ".." || path72 === "." ? "" : path72;
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 fs37 = __require("fs");
18177
+ var fs44 = __require("fs");
18178
18178
  var os8 = __require("os");
18179
- var path72 = __require("path");
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
- fs37.mkdirSync(opts.destination, { recursive: true });
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 = path72.join(destination, filename);
18207
- var outStream = fs37.createWriteStream(finalPath);
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 path73 = file.path;
18222
+ var path80 = file.path;
18223
18223
  delete file.destination;
18224
18224
  delete file.filename;
18225
18225
  delete file.path;
18226
- fs37.unlink(path73, cb);
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: (path72) => !path72.startsWith(".git/") && path72 !== ".git" && !path72.startsWith("./.git/") && path72 !== "./.git"
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 path72 = url.path;
32394
- if (path72.length === 0) {
32393
+ const path79 = url.path;
32394
+ if (path79.length === 0) {
32395
32395
  return;
32396
32396
  }
32397
- if (url.scheme === "file" && path72.length === 1 && isNormalizedWindowsDriveLetter(path72[0])) {
32397
+ if (url.scheme === "file" && path79.length === 1 && isNormalizedWindowsDriveLetter(path79[0])) {
32398
32398
  return;
32399
32399
  }
32400
- path72.pop();
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 path72 = __require("path");
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 fs37 = __require("fs");
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
- fs37.stat(value.path, function(err, stat14) {
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 = path72.normalize(options.filepath).replace(/\\/g, "/");
46817
+ filename = path79.normalize(options.filepath).replace(/\\/g, "/");
46818
46818
  } else if (options.filename || value && (value.name || value.path)) {
46819
- filename = path72.basename(options.filename || value && (value.name || value.path));
46819
+ filename = path79.basename(options.filename || value && (value.name || value.path));
46820
46820
  } else if (value && value.readable && hasOwn(value, "httpVersion")) {
46821
- filename = path72.basename(value.client._httpMessage.path || "");
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(path72, key, dots) {
48052
- if (!path72) return key;
48053
- return path72.concat(key).map(function each(token, i4) {
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, path72) {
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(path72, key, dots), convertValue(value));
48104
+ formData.append(renderKey(path79, key, dots), convertValue(value));
48105
48105
  return false;
48106
48106
  }
48107
- if (value && !path72 && typeof value === "object") {
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(path72, key, dots), convertValue(value));
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, path72) {
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 " + path72.join("."));
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, path72, exposedHelpers);
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, path72 ? path72.concat(key) : [key]);
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, path72, helpers) {
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(path72, value, target, index3) {
48362
- let name = path72[index3++];
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 >= path72.length;
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(path72, value, target[name], index3);
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 path72;
49696
+ let path79;
49697
49697
  try {
49698
- path72 = buildURL(parsed.pathname + parsed.search, config.params, config.paramsSerializer).replace(/^\?/, "");
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: path72,
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, path72, domain2, secure, sameSite) {
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(path72)) {
49921
- cookie.push(`path=${path72}`);
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 path72 = token.value;
60890
+ let path79 = token.value;
60891
60891
  let cur = tokens[pos];
60892
60892
  while (cur.type === "char" || cur.type === "escape") {
60893
- path72 += cur.value;
60893
+ path79 += cur.value;
60894
60894
  cur = tokens[++pos];
60895
60895
  }
60896
60896
  output.push({
60897
60897
  type: "text",
60898
- value: encodePath(path72)
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(path72, options = {}) {
60922
+ function compile(path79, options = {}) {
60923
60923
  const { encode = encodeURIComponent, delimiter = DEFAULT_DELIMITER } = options;
60924
- const data = typeof path72 === "object" ? path72 : parse2(path72, options);
60924
+ const data = typeof path79 === "object" ? path79 : parse2(path79, options);
60925
60925
  const fn3 = tokensToFunction(data.tokens, delimiter, encode);
60926
- return function path73(params = {}) {
60927
- const [path74, ...missing] = fn3(params);
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 path74;
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(path72, options = {}) {
60987
+ function match(path79, options = {}) {
60988
60988
  const { decode: decode2 = decodeURIComponent, delimiter = DEFAULT_DELIMITER } = options;
60989
- const { regexp, keys } = pathToRegexp(path72, options);
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 path73 = m6[0];
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: path73, params };
61010
+ return { path: path80, params };
61011
61011
  };
61012
61012
  }
61013
- function pathToRegexp(path72, options = {}) {
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 = [path72];
61017
+ const paths = [path79];
61018
61018
  let combinations = 0;
61019
61019
  while (paths.length) {
61020
- const path73 = paths.shift();
61021
- if (Array.isArray(path73)) {
61022
- paths.push(...path73);
61020
+ const path80 = paths.shift();
61021
+ if (Array.isArray(path80)) {
61022
+ paths.push(...path80);
61023
61023
  continue;
61024
61024
  }
61025
- const data = typeof path73 === "object" ? path73 : parse2(path73, options);
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: path72 } = new node_url_1.URL(req.url, "http://localhost");
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(path72) && method === "POST") {
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 (path72 === installPath) {
66169
+ if (path79 === installPath) {
66170
66170
  return this.handleInstallPathRequest(req, res);
66171
66171
  }
66172
- if (path72 === installRedirectUriPath) {
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(path72);
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 ${path72}`, req, res);
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: path72 } = new node_url_1.URL(req.url, "http://localhost");
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(path72);
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 path72;
72541
+ let path79;
72542
72542
  if ("path" in awsEvent) {
72543
- path72 = awsEvent.path;
72543
+ path79 = awsEvent.path;
72544
72544
  } else {
72545
- path72 = awsEvent.rawPath;
72545
+ path79 = awsEvent.rawPath;
72546
72546
  }
72547
- this.logger.info(`No request handler matched the request: ${path72}`);
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: fs38, callback }) => {
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
- fs38.readFile(response.code, (err, contents) => {
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
- fs38.readFile(response.map, (err, contents) => {
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 = () => fs38.writeFile(input, next);
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 fs37 = __require("fs");
74783
+ var fs44 = __require("fs");
74784
74784
  var os8 = __require("os");
74785
- var path72 = __require("path");
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 = path72.dirname(path72.dirname(path72.dirname(libMainJS)));
74844
- if (path72.basename(nodeModulesDirectory) === "node_modules") {
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 (fs37.existsSync(path72.join(nodeModulesDirectory, pkg))) return pkg;
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 (fs37.existsSync(path72.join(nodeModulesDirectory, pkg))) return pkg;
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 = path72.dirname(__require.resolve("esbuild"));
74864
- return path72.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path72.basename(subpath)}`);
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 (!fs37.existsSync(ESBUILD_BINARY_PATH)) {
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 (!fs37.existsSync(binPath)) {
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 = path72.join(
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"}-${path72.basename(subpath)}`
74959
+ `pnpapi-${pkg.replace("/", "-")}-${"0.24.2"}-${path79.basename(subpath)}`
74960
74960
  );
74961
- if (!fs37.existsSync(binTargetPath)) {
74962
- fs37.mkdirSync(path72.dirname(binTargetPath), { recursive: true });
74963
- fs37.copyFileSync(binPath, binTargetPath);
74964
- fs37.chmodSync(binTargetPath, 493);
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(path72) {
78609
- let input = path72;
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 [path72, query3] = wsComponent.resourceName.split("?");
78809
- wsComponent.path = path72 && path72 !== "/" ? path72 : void 0;
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, fs37, exportName) {
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, fs37[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 path71 from "path";
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", "mesh", "picker"]).openapi("UiPanelId");
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.36.0";
84122
+ if (true) return "0.38.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(["claude-code", "cursor", "codex", "other"]).openapi("AgentRuntime");
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 = (path72) => statMethod(path72, { bigint: true });
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: path72, depth } = par;
90395
- const slice = fil.splice(0, batch).map((dirent) => this._formatEntry(dirent, path72));
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(path72, depth) {
90450
+ async _exploreDir(path79, depth) {
90436
90451
  let files;
90437
90452
  try {
90438
- files = await readdir(path72, this._rdOptions);
90453
+ files = await readdir(path79, this._rdOptions);
90439
90454
  } catch (error) {
90440
90455
  this._onError(error);
90441
90456
  }
90442
- return { files, depth, path: path72 };
90457
+ return { files, depth, path: path79 };
90443
90458
  }
90444
- async _formatEntry(dirent, path72) {
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(path72, basename5));
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(path72, options, listener, errHandler, emitRaw) {
90863
+ function createFsWatchInstance(path79, options, listener, errHandler, emitRaw) {
90849
90864
  const handleEvent = (rawEvent, evPath) => {
90850
- listener(path72);
90851
- emitRaw(rawEvent, evPath, { watchedPath: path72 });
90852
- if (evPath && path72 !== evPath) {
90853
- fsWatchBroadcast(sysPath.resolve(path72, evPath), KEY_LISTENERS, sysPath.join(path72, evPath));
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(path72, {
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 = (path72, fullPath, options, handlers) => {
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(path72, options, listener, errHandler, rawEmitter);
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
- path72,
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(path72, "r");
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 = (path72, fullPath, options, handlers) => {
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(path72, curr));
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(path72, listener) {
91000
+ _watchWithNodeFs(path79, listener) {
90986
91001
  const opts = this.fsw.options;
90987
- const directory = sysPath.dirname(path72);
90988
- const basename5 = sysPath.basename(path72);
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(path72);
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(path72, absolutePath, options, {
91016
+ closer = setFsWatchFileListener(path79, absolutePath, options, {
91002
91017
  listener,
91003
91018
  rawEmitter: this.fsw._emitRaw
91004
91019
  });
91005
91020
  } else {
91006
- closer = setFsWatchListener(path72, absolutePath, options, {
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 (path72, newStats) => {
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(path72);
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(path72, closer2);
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, path72, item) {
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(path72);
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, path72, entry.stats);
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, path72, entry.stats);
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 path72 = sysPath.join(directory, item);
91147
+ let path79 = sysPath.join(directory, item);
91133
91148
  current.add(item);
91134
- if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path72, item)) {
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
- path72 = sysPath.join(dir, sysPath.relative(dir, path72));
91144
- this._addToNodeFs(path72, initialAdd, wh, depth + 1);
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(path72, initialAdd, priorWh, depth, target) {
91228
+ async _addToNodeFs(path79, initialAdd, priorWh, depth, target) {
91214
91229
  const ready = this.fsw._emitReady;
91215
- if (this.fsw._isIgnored(path72) || this.fsw.closed) {
91230
+ if (this.fsw._isIgnored(path79) || this.fsw.closed) {
91216
91231
  ready();
91217
91232
  return false;
91218
91233
  }
91219
- const wh = this.fsw._getWatchHelpers(path72);
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(path72);
91236
- const targetPath = follow ? await fsrealpath(path72) : path72;
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(path72) : path72;
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, path72, wh, targetPath);
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(path72), targetPath);
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(path72, closer);
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 path72;
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(path72) {
91312
- if (typeof path72 !== "string")
91326
+ function normalizePath(path79) {
91327
+ if (typeof path79 !== "string")
91313
91328
  throw new Error("string expected");
91314
- path72 = sysPath2.normalize(path72);
91315
- path72 = path72.replace(/\\/g, "/");
91329
+ path79 = sysPath2.normalize(path79);
91330
+ path79 = path79.replace(/\\/g, "/");
91316
91331
  let prepend = false;
91317
- if (path72.startsWith("//"))
91332
+ if (path79.startsWith("//"))
91318
91333
  prepend = true;
91319
91334
  const DOUBLE_SLASH_RE2 = /\/\//;
91320
- while (path72.match(DOUBLE_SLASH_RE2))
91321
- path72 = path72.replace(DOUBLE_SLASH_RE2, "/");
91335
+ while (path79.match(DOUBLE_SLASH_RE2))
91336
+ path79 = path79.replace(DOUBLE_SLASH_RE2, "/");
91322
91337
  if (prepend)
91323
- path72 = "/" + path72;
91324
- return path72;
91338
+ path79 = "/" + path79;
91339
+ return path79;
91325
91340
  }
91326
91341
  function matchPatterns(patterns, testString, stats) {
91327
- const path72 = normalizePath(testString);
91342
+ const path79 = normalizePath(testString);
91328
91343
  for (let index3 = 0; index3 < patterns.length; index3++) {
91329
91344
  const pattern = patterns[index3];
91330
- if (pattern(path72, stats)) {
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 = (path72) => toUnix(sysPath2.normalize(toUnix(path72)));
91371
- var normalizeIgnored = (cwd = "") => (path72) => {
91372
- if (typeof path72 === "string") {
91373
- return normalizePathToUnix(sysPath2.isAbsolute(path72) ? path72 : sysPath2.join(cwd, path72));
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 path72;
91390
+ return path79;
91376
91391
  }
91377
91392
  };
91378
- var getAbsolutePath = (path72, cwd) => {
91379
- if (sysPath2.isAbsolute(path72)) {
91380
- return path72;
91393
+ var getAbsolutePath = (path79, cwd) => {
91394
+ if (sysPath2.isAbsolute(path79)) {
91395
+ return path79;
91381
91396
  }
91382
- return sysPath2.join(cwd, path72);
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(path72, follow, fsw) {
91452
+ constructor(path79, follow, fsw) {
91438
91453
  this.fsw = fsw;
91439
- const watchPath = path72;
91440
- this.path = path72 = path72.replace(REPLACER_RE, "");
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((path72) => {
91563
- const absPath = getAbsolutePath(path72, cwd);
91577
+ paths = paths.map((path79) => {
91578
+ const absPath = getAbsolutePath(path79, cwd);
91564
91579
  return absPath;
91565
91580
  });
91566
91581
  }
91567
- paths.forEach((path72) => {
91568
- this._removeIgnoredPath(path72);
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 (path72) => {
91575
- const res = await this._nodeFsHandler._addToNodeFs(path72, !_internal2, void 0, 0, _origAdd);
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((path72) => {
91598
- if (!sysPath2.isAbsolute(path72) && !this._closers.has(path72)) {
91612
+ paths.forEach((path79) => {
91613
+ if (!sysPath2.isAbsolute(path79) && !this._closers.has(path79)) {
91599
91614
  if (cwd)
91600
- path72 = sysPath2.join(cwd, path72);
91601
- path72 = sysPath2.resolve(path72);
91615
+ path79 = sysPath2.join(cwd, path79);
91616
+ path79 = sysPath2.resolve(path79);
91602
91617
  }
91603
- this._closePath(path72);
91604
- this._addIgnoredPath(path72);
91605
- if (this._watched.has(path72)) {
91618
+ this._closePath(path79);
91619
+ this._addIgnoredPath(path79);
91620
+ if (this._watched.has(path79)) {
91606
91621
  this._addIgnoredPath({
91607
- path: path72,
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, path72, stats) {
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
- path72 = sysPath2.normalize(path72);
91691
+ path79 = sysPath2.normalize(path79);
91677
91692
  if (opts.cwd)
91678
- path72 = sysPath2.relative(opts.cwd, path72);
91679
- const args = [path72];
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(path72))) {
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(path72, [event, ...args]);
91705
+ this._pendingUnlinks.set(path79, [event, ...args]);
91691
91706
  setTimeout(() => {
91692
- this._pendingUnlinks.forEach((entry, path73) => {
91707
+ this._pendingUnlinks.forEach((entry, path80) => {
91693
91708
  this.emit(...entry);
91694
91709
  this.emit(EVENTS.ALL, ...entry);
91695
- this._pendingUnlinks.delete(path73);
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(path72)) {
91715
+ if (event === EVENTS.ADD && this._pendingUnlinks.has(path79)) {
91701
91716
  event = EVENTS.CHANGE;
91702
- this._pendingUnlinks.delete(path72);
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(path72, awf.stabilityThreshold, event, awfEmit);
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, path72, 50);
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, path72) : path72;
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, path72, timeout) {
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(path72);
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(path72);
91789
+ const item = action.get(path79);
91775
91790
  const count2 = item ? item.count : 0;
91776
- action.delete(path72);
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(path72, thr);
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(path72, threshold, event, awfEmit) {
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 = path72;
91805
- if (this.options.cwd && !sysPath2.isAbsolute(path72)) {
91806
- fullPath = sysPath2.join(this.options.cwd, path72);
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(path72)) {
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(path72).lastChange = now2;
91834
+ writes.get(path79).lastChange = now2;
91820
91835
  }
91821
- const pw = writes.get(path72);
91836
+ const pw = writes.get(path79);
91822
91837
  const df = now2 - pw.lastChange;
91823
91838
  if (df >= threshold) {
91824
- writes.delete(path72);
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(path72)) {
91832
- writes.set(path72, {
91846
+ if (!writes.has(path79)) {
91847
+ writes.set(path79, {
91833
91848
  lastChange: now,
91834
91849
  cancelWait: () => {
91835
- writes.delete(path72);
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(path72, stats) {
91847
- if (this.options.atomic && DOT_RE.test(path72))
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(path72, stats);
91872
+ return this._userIgnored(path79, stats);
91858
91873
  }
91859
- _isntIgnored(path72, stat14) {
91860
- return !this._isIgnored(path72, stat14);
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(path72) {
91867
- return new WatchHelper(path72, this.options.followSymlinks, this);
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 path72 = sysPath2.join(directory, item);
91900
- const fullPath = sysPath2.resolve(path72);
91901
- isDirectory = isDirectory != null ? isDirectory : this._watched.has(path72) || this._watched.has(fullPath);
91902
- if (!this._throttle("remove", path72, 100))
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(path72);
91922
+ const wp = this._getWatchedDir(path79);
91908
91923
  const nestedDirectoryChildren = wp.getChildren();
91909
- nestedDirectoryChildren.forEach((nested) => this._remove(path72, nested));
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 = path72;
91931
+ let relPath = path79;
91917
91932
  if (this.options.cwd)
91918
- relPath = sysPath2.relative(this.options.cwd, path72);
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(path72);
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(path72))
91928
- this._emit(eventName, path72);
91929
- this._closePath(path72);
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(path72) {
91935
- this._closeFile(path72);
91936
- const dir = sysPath2.dirname(path72);
91937
- this._getWatchedDir(dir).remove(sysPath2.basename(path72));
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(path72) {
91943
- const closers = this._closers.get(path72);
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(path72);
91962
+ this._closers.delete(path79);
91948
91963
  }
91949
- _addPathCloser(path72, closer) {
91964
+ _addPathCloser(path79, closer) {
91950
91965
  if (!closer)
91951
91966
  return;
91952
- let list5 = this._closers.get(path72);
91967
+ let list5 = this._closers.get(path79);
91953
91968
  if (!list5) {
91954
91969
  list5 = [];
91955
- this._closers.set(path72, list5);
91970
+ this._closers.set(path79, list5);
91956
91971
  }
91957
91972
  list5.push(closer);
91958
91973
  }
@@ -95875,16 +95890,38 @@ async function createAgentWorkspace(input, meshCore2) {
95875
95890
  throw err;
95876
95891
  }
95877
95892
  if (!opts.skipTemplateDownload) {
95893
+ let dirExists = false;
95878
95894
  try {
95879
95895
  await fs12.stat(resolvedPath);
95880
- throw new AgentCreationError("Directory already exists", "COLLISION", 409);
95896
+ dirExists = true;
95881
95897
  } catch (err) {
95882
- if (err instanceof AgentCreationError) throw err;
95883
95898
  if (err.code !== "ENOENT") throw err;
95884
95899
  }
95885
- const parentDir = path25.dirname(resolvedPath);
95886
- await fs12.mkdir(parentDir, { recursive: true });
95887
- await fs12.mkdir(resolvedPath);
95900
+ if (dirExists) {
95901
+ const dorkPath = path25.join(resolvedPath, ".dork");
95902
+ try {
95903
+ await fs12.stat(dorkPath);
95904
+ throw new AgentCreationError(
95905
+ "Directory already contains a DorkOS project \u2014 use Import instead",
95906
+ "COLLISION",
95907
+ 409
95908
+ );
95909
+ } catch (err) {
95910
+ if (err instanceof AgentCreationError) throw err;
95911
+ if (err.code !== "ENOENT") throw err;
95912
+ }
95913
+ if (opts.template) {
95914
+ throw new AgentCreationError(
95915
+ "Cannot apply template to an existing directory \u2014 use Start Blank or choose a new directory",
95916
+ "COLLISION",
95917
+ 409
95918
+ );
95919
+ }
95920
+ } else {
95921
+ const parentDir = path25.dirname(resolvedPath);
95922
+ await fs12.mkdir(parentDir, { recursive: true });
95923
+ await fs12.mkdir(resolvedPath);
95924
+ }
95888
95925
  }
95889
95926
  let meta;
95890
95927
  if (opts.template && !opts.skipTemplateDownload) {
@@ -95996,7 +96033,7 @@ import { tool as tool9 } from "@anthropic-ai/claude-agent-sdk";
95996
96033
  import { z as z36 } from "zod";
95997
96034
  var DEFAULT_UI_STATE = {
95998
96035
  canvas: { open: false, contentType: null },
95999
- panels: { settings: false, tasks: false, relay: false, mesh: false },
96036
+ panels: { settings: false, tasks: false, relay: false },
96000
96037
  sidebar: { open: true, activeTab: "overview" },
96001
96038
  agent: { id: null, cwd: null }
96002
96039
  };
@@ -98389,7 +98426,7 @@ var QueryPromise = class {
98389
98426
  function mapResultRow(columns, row, joinsNotNullableMap) {
98390
98427
  const nullifyMap = {};
98391
98428
  const result2 = columns.reduce(
98392
- (result22, { path: path72, field }, columnIndex) => {
98429
+ (result22, { path: path79, field }, columnIndex) => {
98393
98430
  let decoder;
98394
98431
  if (is(field, Column)) {
98395
98432
  decoder = field;
@@ -98399,8 +98436,8 @@ function mapResultRow(columns, row, joinsNotNullableMap) {
98399
98436
  decoder = field.sql.decoder;
98400
98437
  }
98401
98438
  let node2 = result22;
98402
- for (const [pathChunkIndex, pathChunk] of path72.entries()) {
98403
- if (pathChunkIndex < path72.length - 1) {
98439
+ for (const [pathChunkIndex, pathChunk] of path79.entries()) {
98440
+ if (pathChunkIndex < path79.length - 1) {
98404
98441
  if (!(pathChunk in node2)) {
98405
98442
  node2[pathChunk] = {};
98406
98443
  }
@@ -98408,8 +98445,8 @@ function mapResultRow(columns, row, joinsNotNullableMap) {
98408
98445
  } else {
98409
98446
  const rawValue = row[columnIndex];
98410
98447
  const value = node2[pathChunk] = rawValue === null ? null : decoder.mapFromDriverValue(rawValue);
98411
- if (joinsNotNullableMap && is(field, Column) && path72.length === 2) {
98412
- const objectName = path72[0];
98448
+ if (joinsNotNullableMap && is(field, Column) && path79.length === 2) {
98449
+ const objectName = path79[0];
98413
98450
  if (!(objectName in nullifyMap)) {
98414
98451
  nullifyMap[objectName] = value === null ? getTableName(field.table) : false;
98415
98452
  } else if (typeof nullifyMap[objectName] === "string" && nullifyMap[objectName] !== getTableName(field.table)) {
@@ -107535,13 +107572,13 @@ var VFile = class {
107535
107572
  * @returns {undefined}
107536
107573
  * Nothing.
107537
107574
  */
107538
- set path(path72) {
107539
- if (isUrl(path72)) {
107540
- path72 = fileURLToPath5(path72);
107575
+ set path(path79) {
107576
+ if (isUrl(path79)) {
107577
+ path79 = fileURLToPath5(path79);
107541
107578
  }
107542
- assertNonEmpty(path72, "path");
107543
- if (this.path !== path72) {
107544
- this.history.push(path72);
107579
+ assertNonEmpty(path79, "path");
107580
+ if (this.path !== path79) {
107581
+ this.history.push(path79);
107545
107582
  }
107546
107583
  }
107547
107584
  /**
@@ -107808,8 +107845,8 @@ function assertNonEmpty(part, name) {
107808
107845
  throw new Error("`" + name + "` cannot be empty");
107809
107846
  }
107810
107847
  }
107811
- function assertPath(path72, name) {
107812
- if (!path72) {
107848
+ function assertPath(path79, name) {
107849
+ if (!path79) {
107813
107850
  throw new Error("Setting `" + name + "` requires `path` to be set too");
107814
107851
  }
107815
107852
  }
@@ -117294,7 +117331,7 @@ function transformGfmAutolinkLiterals(tree) {
117294
117331
  { ignore: ["link", "linkReference"] }
117295
117332
  );
117296
117333
  }
117297
- function findUrl(_6, protocol, domain2, path72, match) {
117334
+ function findUrl(_6, protocol, domain2, path79, match) {
117298
117335
  let prefix = "";
117299
117336
  if (!previous2(match)) {
117300
117337
  return false;
@@ -117307,7 +117344,7 @@ function findUrl(_6, protocol, domain2, path72, match) {
117307
117344
  if (!isCorrectDomain(domain2)) {
117308
117345
  return false;
117309
117346
  }
117310
- const parts = splitUrl(domain2 + path72);
117347
+ const parts = splitUrl(domain2 + path79);
117311
117348
  if (!parts[0]) return false;
117312
117349
  const result2 = {
117313
117350
  type: "link",
@@ -133381,21 +133418,25 @@ var TopologyManager = class {
133381
133418
  // ../mesh/dist/strategies/claude-code-strategy.js
133382
133419
  import fs22 from "fs/promises";
133383
133420
  import path40 from "path";
133384
- var MAX_CLAUDEMD_BYTES = 4096;
133421
+ var MAX_MD_BYTES = 4096;
133422
+ var DETECTION_FILES = ["CLAUDE.md", "AGENTS.md"];
133385
133423
  var ClaudeCodeStrategy = class {
133386
133424
  name = "claude-code";
133387
133425
  runtime = "claude-code";
133388
133426
  async detect(dir) {
133389
- try {
133390
- const stat14 = await fs22.stat(path40.join(dir, "AGENTS.md"));
133391
- return stat14.isFile();
133392
- } catch {
133393
- return false;
133427
+ for (const file of DETECTION_FILES) {
133428
+ try {
133429
+ const stat14 = await fs22.stat(path40.join(dir, file));
133430
+ if (stat14.isFile())
133431
+ return true;
133432
+ } catch {
133433
+ }
133394
133434
  }
133435
+ return false;
133395
133436
  }
133396
133437
  async extractHints(dir) {
133397
133438
  const suggestedName = path40.basename(dir);
133398
- const description = await this.extractDescription(dir);
133439
+ const description = await this.extractDescription(dir, "CLAUDE.md") ?? await this.extractDescription(dir, "AGENTS.md");
133399
133440
  return {
133400
133441
  suggestedName,
133401
133442
  detectedRuntime: "claude-code",
@@ -133404,17 +133445,17 @@ var ClaudeCodeStrategy = class {
133404
133445
  };
133405
133446
  }
133406
133447
  /**
133407
- * Extract a description from the AGENTS.md file at the project root.
133448
+ * Extract a description from a markdown file at the project root.
133408
133449
  *
133409
133450
  * Reads the first chunk and returns the first non-heading paragraph.
133410
133451
  */
133411
- async extractDescription(dir) {
133452
+ async extractDescription(dir, filename) {
133412
133453
  try {
133413
- const claudeMdPath = path40.join(dir, "AGENTS.md");
133414
- const fd = await fs22.open(claudeMdPath, "r");
133454
+ const mdPath = path40.join(dir, filename);
133455
+ const fd = await fs22.open(mdPath, "r");
133415
133456
  try {
133416
- const buf = Buffer.alloc(MAX_CLAUDEMD_BYTES);
133417
- const { bytesRead } = await fd.read(buf, 0, MAX_CLAUDEMD_BYTES, 0);
133457
+ const buf = Buffer.alloc(MAX_MD_BYTES);
133458
+ const { bytesRead } = await fd.read(buf, 0, MAX_MD_BYTES, 0);
133418
133459
  const content3 = buf.toString("utf-8", 0, bytesRead);
133419
133460
  return extractFirstParagraph(content3);
133420
133461
  } finally {
@@ -133461,7 +133502,13 @@ var CursorStrategy = class {
133461
133502
  async detect(dir) {
133462
133503
  try {
133463
133504
  const stat14 = await fs23.stat(path41.join(dir, ".cursor"));
133464
- return stat14.isDirectory();
133505
+ if (stat14.isDirectory())
133506
+ return true;
133507
+ } catch {
133508
+ }
133509
+ try {
133510
+ const stat14 = await fs23.stat(path41.join(dir, ".cursorrules"));
133511
+ return stat14.isFile();
133465
133512
  } catch {
133466
133513
  return false;
133467
133514
  }
@@ -133498,11 +133545,197 @@ var CodexStrategy = class {
133498
133545
  }
133499
133546
  };
133500
133547
 
133548
+ // ../mesh/dist/strategies/windsurf-strategy.js
133549
+ import fs25 from "fs/promises";
133550
+ import path43 from "path";
133551
+ var WindsurfStrategy = class {
133552
+ name = "windsurf";
133553
+ runtime = "windsurf";
133554
+ async detect(dir) {
133555
+ try {
133556
+ const stat14 = await fs25.stat(path43.join(dir, ".windsurfrules"));
133557
+ if (stat14.isFile())
133558
+ return true;
133559
+ } catch {
133560
+ }
133561
+ try {
133562
+ const stat14 = await fs25.stat(path43.join(dir, ".windsurf"));
133563
+ return stat14.isDirectory();
133564
+ } catch {
133565
+ return false;
133566
+ }
133567
+ }
133568
+ async extractHints(dir) {
133569
+ return {
133570
+ suggestedName: path43.basename(dir),
133571
+ detectedRuntime: "windsurf",
133572
+ inferredCapabilities: ["code"]
133573
+ };
133574
+ }
133575
+ };
133576
+
133577
+ // ../mesh/dist/strategies/gemini-strategy.js
133578
+ import fs26 from "fs/promises";
133579
+ import path44 from "path";
133580
+ var GeminiStrategy = class {
133581
+ name = "gemini";
133582
+ runtime = "gemini";
133583
+ async detect(dir) {
133584
+ try {
133585
+ const stat14 = await fs26.stat(path44.join(dir, "GEMINI.md"));
133586
+ if (stat14.isFile())
133587
+ return true;
133588
+ } catch {
133589
+ }
133590
+ try {
133591
+ const stat14 = await fs26.stat(path44.join(dir, ".gemini"));
133592
+ return stat14.isDirectory();
133593
+ } catch {
133594
+ return false;
133595
+ }
133596
+ }
133597
+ async extractHints(dir) {
133598
+ return {
133599
+ suggestedName: path44.basename(dir),
133600
+ detectedRuntime: "gemini",
133601
+ inferredCapabilities: ["code"]
133602
+ };
133603
+ }
133604
+ };
133605
+
133606
+ // ../mesh/dist/strategies/cline-strategy.js
133607
+ import fs27 from "fs/promises";
133608
+ import path45 from "path";
133609
+ var ClineStrategy = class {
133610
+ name = "cline";
133611
+ runtime = "cline";
133612
+ async detect(dir) {
133613
+ try {
133614
+ await fs27.stat(path45.join(dir, ".clinerules"));
133615
+ return true;
133616
+ } catch {
133617
+ return false;
133618
+ }
133619
+ }
133620
+ async extractHints(dir) {
133621
+ return {
133622
+ suggestedName: path45.basename(dir),
133623
+ detectedRuntime: "cline",
133624
+ inferredCapabilities: ["code"]
133625
+ };
133626
+ }
133627
+ };
133628
+
133629
+ // ../mesh/dist/strategies/roo-code-strategy.js
133630
+ import fs28 from "fs/promises";
133631
+ import path46 from "path";
133632
+ var RooCodeStrategy = class {
133633
+ name = "roo-code";
133634
+ runtime = "roo-code";
133635
+ async detect(dir) {
133636
+ try {
133637
+ const stat14 = await fs28.stat(path46.join(dir, ".roo"));
133638
+ if (stat14.isDirectory())
133639
+ return true;
133640
+ } catch {
133641
+ }
133642
+ try {
133643
+ const stat14 = await fs28.stat(path46.join(dir, ".roorules"));
133644
+ return stat14.isFile();
133645
+ } catch {
133646
+ return false;
133647
+ }
133648
+ }
133649
+ async extractHints(dir) {
133650
+ return {
133651
+ suggestedName: path46.basename(dir),
133652
+ detectedRuntime: "roo-code",
133653
+ inferredCapabilities: ["code"]
133654
+ };
133655
+ }
133656
+ };
133657
+
133658
+ // ../mesh/dist/strategies/copilot-strategy.js
133659
+ import fs29 from "fs/promises";
133660
+ import path47 from "path";
133661
+ var COPILOT_SIGNALS = [
133662
+ ".github/copilot-instructions.md",
133663
+ ".github/instructions",
133664
+ ".github/agents"
133665
+ ];
133666
+ var CopilotStrategy = class {
133667
+ name = "copilot";
133668
+ runtime = "copilot";
133669
+ async detect(dir) {
133670
+ for (const signal of COPILOT_SIGNALS) {
133671
+ try {
133672
+ await fs29.stat(path47.join(dir, signal));
133673
+ return true;
133674
+ } catch {
133675
+ }
133676
+ }
133677
+ return false;
133678
+ }
133679
+ async extractHints(dir) {
133680
+ return {
133681
+ suggestedName: path47.basename(dir),
133682
+ detectedRuntime: "copilot",
133683
+ inferredCapabilities: ["code"]
133684
+ };
133685
+ }
133686
+ };
133687
+
133688
+ // ../mesh/dist/strategies/amazon-q-strategy.js
133689
+ import fs30 from "fs/promises";
133690
+ import path48 from "path";
133691
+ var AmazonQStrategy = class {
133692
+ name = "amazon-q";
133693
+ runtime = "amazon-q";
133694
+ async detect(dir) {
133695
+ try {
133696
+ const stat14 = await fs30.stat(path48.join(dir, ".amazonq"));
133697
+ return stat14.isDirectory();
133698
+ } catch {
133699
+ return false;
133700
+ }
133701
+ }
133702
+ async extractHints(dir) {
133703
+ return {
133704
+ suggestedName: path48.basename(dir),
133705
+ detectedRuntime: "amazon-q",
133706
+ inferredCapabilities: ["code"]
133707
+ };
133708
+ }
133709
+ };
133710
+
133711
+ // ../mesh/dist/strategies/continue-strategy.js
133712
+ import fs31 from "fs/promises";
133713
+ import path49 from "path";
133714
+ var ContinueStrategy = class {
133715
+ name = "continue";
133716
+ runtime = "continue";
133717
+ async detect(dir) {
133718
+ try {
133719
+ const stat14 = await fs31.stat(path49.join(dir, ".continue"));
133720
+ return stat14.isDirectory();
133721
+ } catch {
133722
+ return false;
133723
+ }
133724
+ }
133725
+ async extractHints(dir) {
133726
+ return {
133727
+ suggestedName: path49.basename(dir),
133728
+ detectedRuntime: "continue",
133729
+ inferredCapabilities: ["code"]
133730
+ };
133731
+ }
133732
+ };
133733
+
133501
133734
  // ../mesh/dist/reconciler.js
133502
133735
  import { access as access2 } from "node:fs/promises";
133503
133736
 
133504
133737
  // ../mesh/dist/namespace-resolver.js
133505
- import path43 from "path";
133738
+ import path50 from "path";
133506
133739
  var MAX_NAMESPACE_LENGTH = 64;
133507
133740
  function normalizeNamespace(raw) {
133508
133741
  return raw.toLowerCase().replace(/[^a-z0-9-]/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
@@ -133528,8 +133761,8 @@ function resolveNamespace(projectPath, scanRoot, manifestNamespace) {
133528
133761
  }
133529
133762
  return normalized2;
133530
133763
  }
133531
- const relative4 = path43.relative(scanRoot, projectPath);
133532
- const firstSegment = relative4.split(path43.sep)[0];
133764
+ const relative4 = path50.relative(scanRoot, projectPath);
133765
+ const firstSegment = relative4.split(path50.sep)[0];
133533
133766
  if (!firstSegment) {
133534
133767
  throw new Error(`Cannot derive namespace: projectPath '${projectPath}' is at or above scanRoot '${scanRoot}'`);
133535
133768
  }
@@ -133605,8 +133838,8 @@ function manifestDiffersFromEntry(manifest, entry) {
133605
133838
  }
133606
133839
 
133607
133840
  // ../mesh/dist/discovery/unified-scanner.js
133608
- import fs25 from "fs/promises";
133609
- import path44 from "path";
133841
+ import fs32 from "fs/promises";
133842
+ import path51 from "path";
133610
133843
 
133611
133844
  // ../mesh/dist/discovery/types.js
133612
133845
  var UNIFIED_EXCLUDE_PATTERNS = /* @__PURE__ */ new Set([
@@ -133639,7 +133872,23 @@ var UNIFIED_EXCLUDE_PATTERNS = /* @__PURE__ */ new Set([
133639
133872
  var DEFAULT_MAX_DEPTH = 5;
133640
133873
  var DEFAULT_TIMEOUT_MS = 3e4;
133641
133874
  var PROGRESS_INTERVAL = 100;
133642
- var ALLOWED_DOT_DIRS = /* @__PURE__ */ new Set([".claude", ".cursor", ".codex", ".dork"]);
133875
+ var ALLOWED_DOT_DIRS = /* @__PURE__ */ new Set([
133876
+ ".claude",
133877
+ ".cursor",
133878
+ ".codex",
133879
+ ".dork",
133880
+ ".windsurf",
133881
+ ".gemini",
133882
+ ".cline",
133883
+ ".clinerules",
133884
+ ".roo",
133885
+ ".amazonq",
133886
+ ".continue",
133887
+ ".augment",
133888
+ ".aiassistant",
133889
+ ".kilocode",
133890
+ ".trae"
133891
+ ]);
133643
133892
  async function* unifiedScan(options, strategies, registry2, denialList) {
133644
133893
  const maxDepth = options.maxDepth ?? DEFAULT_MAX_DEPTH;
133645
133894
  const timeoutMs = options.timeout ?? DEFAULT_TIMEOUT_MS;
@@ -133671,7 +133920,7 @@ async function* unifiedScan(options, strategies, registry2, denialList) {
133671
133920
  if (!item)
133672
133921
  continue;
133673
133922
  const { dir, depth } = item;
133674
- const dirName = path44.basename(dir);
133923
+ const dirName = path51.basename(dir);
133675
133924
  if (UNIFIED_EXCLUDE_PATTERNS.has(dirName) || extraExcludes.has(dirName))
133676
133925
  continue;
133677
133926
  if (dirName.startsWith(".") && !ALLOWED_DOT_DIRS.has(dirName))
@@ -133679,7 +133928,7 @@ async function* unifiedScan(options, strategies, registry2, denialList) {
133679
133928
  if (followSymlinks) {
133680
133929
  let realDir;
133681
133930
  try {
133682
- realDir = await fs25.realpath(dir);
133931
+ realDir = await fs32.realpath(dir);
133683
133932
  } catch {
133684
133933
  continue;
133685
133934
  }
@@ -133696,7 +133945,7 @@ async function* unifiedScan(options, strategies, registry2, denialList) {
133696
133945
  }
133697
133946
  let entries;
133698
133947
  try {
133699
- entries = await fs25.readdir(dir, {
133948
+ entries = await fs32.readdir(dir, {
133700
133949
  withFileTypes: true
133701
133950
  });
133702
133951
  } catch (err) {
@@ -133740,7 +133989,7 @@ async function* unifiedScan(options, strategies, registry2, denialList) {
133740
133989
  continue;
133741
133990
  if (isSymlink && !followSymlinks)
133742
133991
  continue;
133743
- queue2.push({ dir: path44.join(dir, entry.name), depth: depth + 1 });
133992
+ queue2.push({ dir: path51.join(dir, entry.name), depth: depth + 1 });
133744
133993
  }
133745
133994
  }
133746
133995
  }
@@ -133849,7 +134098,7 @@ async function upsertAutoImported(manifest, projectPath, deps) {
133849
134098
  }
133850
134099
 
133851
134100
  // ../mesh/dist/mesh-agent-management.js
133852
- import path45 from "path";
134101
+ import path52 from "path";
133853
134102
  function toManifest(entry) {
133854
134103
  const { projectPath: _p, namespace: _n3, scanRoot: _s, ...rest } = entry;
133855
134104
  return rest;
@@ -133918,7 +134167,7 @@ async function unregister(deps, agentId) {
133918
134167
  return;
133919
134168
  await removeManifest(agent.projectPath);
133920
134169
  const namespace = agent.namespace;
133921
- const subject = `relay.agent.${namespace || path45.basename(agent.projectPath)}.${agent.id}`;
134170
+ const subject = `relay.agent.${namespace || path52.basename(agent.projectPath)}.${agent.id}`;
133922
134171
  await deps.relayBridge.unregisterAgent(subject, agent.id, agent.name);
133923
134172
  deps.registry.remove(agentId);
133924
134173
  for (const cb of deps.onUnregisterCallbacks) {
@@ -134003,7 +134252,7 @@ function inspect(deps, agentId) {
134003
134252
  if (!health)
134004
134253
  return void 0;
134005
134254
  const manifest = toManifest(entry);
134006
- const ns = entry.namespace || path45.basename(entry.projectPath);
134255
+ const ns = entry.namespace || path52.basename(entry.projectPath);
134007
134256
  const relaySubject = `relay.agent.${ns}.${agentId}`;
134008
134257
  return { agent: manifest, health, relaySubject };
134009
134258
  }
@@ -134059,7 +134308,14 @@ var MeshCore = class {
134059
134308
  const strategies = options.strategies ?? [
134060
134309
  new ClaudeCodeStrategy(),
134061
134310
  new CursorStrategy(),
134062
- new CodexStrategy()
134311
+ new CodexStrategy(),
134312
+ new WindsurfStrategy(),
134313
+ new GeminiStrategy(),
134314
+ new ClineStrategy(),
134315
+ new RooCodeStrategy(),
134316
+ new CopilotStrategy(),
134317
+ new AmazonQStrategy(),
134318
+ new ContinueStrategy()
134063
134319
  ];
134064
134320
  this.relayBridge = relayBridge;
134065
134321
  this.defaultScanRoot = defaultScanRoot;
@@ -134554,11 +134810,11 @@ function createMeshRouter(deps) {
134554
134810
  }
134555
134811
 
134556
134812
  // ../../apps/server/src/services/mesh/ensure-dorkbot.ts
134557
- import fs26 from "fs/promises";
134558
- import path46 from "path";
134813
+ import fs33 from "fs/promises";
134814
+ import path53 from "path";
134559
134815
  init_logger();
134560
134816
  async function ensureDorkBot(meshCore2, dorkHome) {
134561
- const dorkbotDir = path46.join(dorkHome, "agents", "dorkbot");
134817
+ const dorkbotDir = path53.join(dorkHome, "agents", "dorkbot");
134562
134818
  const existing = await readManifest(dorkbotDir);
134563
134819
  if (existing) {
134564
134820
  if (existing.isSystem && existing.namespace === "system") {
@@ -134576,7 +134832,7 @@ async function ensureDorkBot(meshCore2, dorkHome) {
134576
134832
  logger.info("[Mesh] Upgraded existing DorkBot to system agent");
134577
134833
  return;
134578
134834
  }
134579
- await fs26.mkdir(path46.join(dorkbotDir, ".dork"), { recursive: true });
134835
+ await fs33.mkdir(path53.join(dorkbotDir, ".dork"), { recursive: true });
134580
134836
  const manifest = {
134581
134837
  id: ulid(),
134582
134838
  name: "dorkbot",
@@ -134599,7 +134855,7 @@ async function ensureDorkBot(meshCore2, dorkHome) {
134599
134855
  await writeConventionFile(dorkbotDir, "SOUL.md", defaultSoulTemplate("DorkBot", traitBlock));
134600
134856
  await writeConventionFile(dorkbotDir, "NOPE.md", defaultNopeTemplate());
134601
134857
  const claudeMd = dorkbotClaudeMdTemplate();
134602
- await fs26.writeFile(path46.join(dorkbotDir, ".dork", "AGENTS.md"), claudeMd, "utf-8");
134858
+ await fs33.writeFile(path53.join(dorkbotDir, ".dork", "AGENTS.md"), claudeMd, "utf-8");
134603
134859
  await meshCore2.syncFromDisk(dorkbotDir);
134604
134860
  logger.info("[Mesh] Created DorkBot system agent at %s", dorkbotDir);
134605
134861
  }
@@ -136374,7 +136630,7 @@ function createA2aRouter(deps) {
136374
136630
 
136375
136631
  // ../../apps/server/src/routes/agents.ts
136376
136632
  import { Router as Router23 } from "express";
136377
- import path47 from "path";
136633
+ import path54 from "path";
136378
136634
  init_logger();
136379
136635
  function createAgentsRouter(meshCore2) {
136380
136636
  const router16 = Router23();
@@ -136437,7 +136693,7 @@ function createAgentsRouter(meshCore2) {
136437
136693
  }
136438
136694
  const manifest = {
136439
136695
  id: ulid(),
136440
- name: name ?? path47.basename(agentPath),
136696
+ name: name ?? path54.basename(agentPath),
136441
136697
  description: description ?? "",
136442
136698
  runtime: runtime ?? "claude-code",
136443
136699
  capabilities: [],
@@ -136501,6 +136757,7 @@ function createAgentsRouter(meshCore2) {
136501
136757
  }
136502
136758
  return res.status(201).json({
136503
136759
  ...result2.manifest,
136760
+ _path: result2.path,
136504
136761
  ...result2.meta ? { _meta: result2.meta } : {}
136505
136762
  });
136506
136763
  } catch (err) {
@@ -136707,8 +136964,8 @@ function createDiscoveryRouter(meshCore2) {
136707
136964
 
136708
136965
  // ../../apps/server/src/routes/templates.ts
136709
136966
  import { Router as Router25 } from "express";
136710
- import fs27 from "fs/promises";
136711
- import path48 from "path";
136967
+ import fs34 from "fs/promises";
136968
+ import path55 from "path";
136712
136969
 
136713
136970
  // ../shared/dist/template-catalog.js
136714
136971
  import { z as z45 } from "zod";
@@ -136805,7 +137062,7 @@ var USER_CATALOG_FILENAME = "agent-templates.json";
136805
137062
  async function readUserTemplates(catalogPath) {
136806
137063
  let raw;
136807
137064
  try {
136808
- raw = await fs27.readFile(catalogPath, "utf-8");
137065
+ raw = await fs34.readFile(catalogPath, "utf-8");
136809
137066
  } catch {
136810
137067
  return [];
136811
137068
  }
@@ -136829,12 +137086,12 @@ async function readUserTemplates(catalogPath) {
136829
137086
  }
136830
137087
  async function writeUserTemplates(catalogPath, templates) {
136831
137088
  const catalog = { version: 1, templates };
136832
- await fs27.mkdir(path48.dirname(catalogPath), { recursive: true });
136833
- await fs27.writeFile(catalogPath, JSON.stringify(catalog, null, 2), "utf-8");
137089
+ await fs34.mkdir(path55.dirname(catalogPath), { recursive: true });
137090
+ await fs34.writeFile(catalogPath, JSON.stringify(catalog, null, 2), "utf-8");
136834
137091
  }
136835
137092
  function createTemplateRouter(dorkHome) {
136836
137093
  const router16 = Router25();
136837
- const catalogPath = path48.join(dorkHome, USER_CATALOG_FILENAME);
137094
+ const catalogPath = path55.join(dorkHome, USER_CATALOG_FILENAME);
136838
137095
  router16.get("/", async (_req, res) => {
136839
137096
  try {
136840
137097
  const userTemplates = await readUserTemplates(catalogPath);
@@ -136895,7 +137152,7 @@ function createTemplateRouter(dorkHome) {
136895
137152
  // ../../apps/server/src/routes/admin.ts
136896
137153
  import { Router as Router26 } from "express";
136897
137154
  import { spawn as spawn3 } from "child_process";
136898
- import fs28 from "fs/promises";
137155
+ import fs35 from "fs/promises";
136899
137156
  init_env();
136900
137157
  function triggerRestart() {
136901
137158
  if (env.NODE_ENV === "development") {
@@ -136933,7 +137190,7 @@ function createAdminRouter(deps) {
136933
137190
  try {
136934
137191
  await deps.shutdownServices();
136935
137192
  deps.closeDb();
136936
- await fs28.rm(deps.dorkHome, { recursive: true, force: true });
137193
+ await fs35.rm(deps.dorkHome, { recursive: true, force: true });
136937
137194
  } catch {
136938
137195
  }
136939
137196
  triggerRestart();
@@ -136953,8 +137210,8 @@ function createAdminRouter(deps) {
136953
137210
  }
136954
137211
 
136955
137212
  // ../../apps/server/src/services/extensions/extension-discovery.ts
136956
- import fs29 from "fs/promises";
136957
- import path49 from "path";
137213
+ import fs36 from "fs/promises";
137214
+ import path56 from "path";
136958
137215
 
136959
137216
  // ../extension-api/dist/manifest-schema.js
136960
137217
  import { z as z46 } from "zod";
@@ -137062,11 +137319,11 @@ var ExtensionDiscovery = class {
137062
137319
  * @returns All discovered extension records, with local overriding global by ID
137063
137320
  */
137064
137321
  async discover(cwd, enabledIds) {
137065
- const globalDir = path49.join(this.dorkHome, "extensions");
137322
+ const globalDir = path56.join(this.dorkHome, "extensions");
137066
137323
  const globalRecords = await this.scanDirectory(globalDir, "global");
137067
137324
  let localRecords = [];
137068
137325
  if (cwd) {
137069
- const localDir = path49.join(cwd, ".dork", "extensions");
137326
+ const localDir = path56.join(cwd, ".dork", "extensions");
137070
137327
  localRecords = await this.scanDirectory(localDir, "local");
137071
137328
  }
137072
137329
  const merged = /* @__PURE__ */ new Map();
@@ -137112,15 +137369,15 @@ var ExtensionDiscovery = class {
137112
137369
  */
137113
137370
  async scanDirectory(dir, scope) {
137114
137371
  try {
137115
- await fs29.access(dir);
137372
+ await fs36.access(dir);
137116
137373
  } catch {
137117
137374
  return [];
137118
137375
  }
137119
- const entries = await fs29.readdir(dir, { withFileTypes: true });
137376
+ const entries = await fs36.readdir(dir, { withFileTypes: true });
137120
137377
  const records = [];
137121
137378
  for (const entry of entries) {
137122
137379
  if (!entry.isDirectory() && !entry.isSymbolicLink()) continue;
137123
- const extDir = path49.join(dir, entry.name);
137380
+ const extDir = path56.join(dir, entry.name);
137124
137381
  const record2 = await this.readExtension(extDir, entry.name, scope);
137125
137382
  records.push(record2);
137126
137383
  }
@@ -137134,9 +137391,9 @@ var ExtensionDiscovery = class {
137134
137391
  * @param scope - Whether this is a global or local extension
137135
137392
  */
137136
137393
  async readExtension(extDir, dirName, scope) {
137137
- const manifestPath = path49.join(extDir, "extension.json");
137394
+ const manifestPath = path56.join(extDir, "extension.json");
137138
137395
  try {
137139
- const raw = await fs29.readFile(manifestPath, "utf-8");
137396
+ const raw = await fs36.readFile(manifestPath, "utf-8");
137140
137397
  const parsed = JSON.parse(raw);
137141
137398
  const result2 = ExtensionManifestSchema.safeParse(parsed);
137142
137399
  if (!result2.success) {
@@ -137199,16 +137456,16 @@ var ExtensionDiscovery = class {
137199
137456
  */
137200
137457
  async detectServerEntry(extDir, manifest) {
137201
137458
  const serverEntryRel = manifest.serverCapabilities?.serverEntry ?? "./server.ts";
137202
- const resolvedPath = path49.join(extDir, serverEntryRel);
137459
+ const resolvedPath = path56.join(extDir, serverEntryRel);
137203
137460
  try {
137204
- await fs29.access(resolvedPath);
137461
+ await fs36.access(resolvedPath);
137205
137462
  return { hasServerEntry: true, resolvedPath };
137206
137463
  } catch {
137207
137464
  }
137208
137465
  if (resolvedPath.endsWith(".ts")) {
137209
137466
  const jsPath = resolvedPath.replace(/\.ts$/, ".js");
137210
137467
  try {
137211
- await fs29.access(jsPath);
137468
+ await fs36.access(jsPath);
137212
137469
  return { hasServerEntry: true, resolvedPath: jsPath };
137213
137470
  } catch {
137214
137471
  }
@@ -137228,14 +137485,14 @@ var ExtensionDiscovery = class {
137228
137485
  var import_esbuild = __toESM(require_main(), 1);
137229
137486
  init_logger();
137230
137487
  import { createHash as createHash2 } from "crypto";
137231
- import fs30 from "fs/promises";
137232
- import path50 from "path";
137488
+ import fs37 from "fs/promises";
137489
+ import path57 from "path";
137233
137490
  var BUNDLE_SIZE_WARNING_KB = 500;
137234
137491
  var STALE_THRESHOLD_MS = 7 * 24 * 60 * 60 * 1e3;
137235
137492
  var ExtensionCompiler = class {
137236
137493
  cacheDir;
137237
137494
  constructor(dorkHome) {
137238
- this.cacheDir = path50.join(dorkHome, "cache", "extensions");
137495
+ this.cacheDir = path57.join(dorkHome, "cache", "extensions");
137239
137496
  }
137240
137497
  /**
137241
137498
  * Compile a client-side extension (or return cached bundle).
@@ -137250,7 +137507,7 @@ var ExtensionCompiler = class {
137250
137507
  return { error: entryResult.error, sourceHash: "" };
137251
137508
  }
137252
137509
  const { entryPath, isPrecompiled } = entryResult;
137253
- const source = await fs30.readFile(entryPath, "utf-8");
137510
+ const source = await fs37.readFile(entryPath, "utf-8");
137254
137511
  const sourceHash = this.computeSourceHash(source);
137255
137512
  if (isPrecompiled) {
137256
137513
  return this.handlePrecompiled(record2.id, source, sourceHash);
@@ -137277,7 +137534,7 @@ var ExtensionCompiler = class {
137277
137534
  sourceHash: ""
137278
137535
  };
137279
137536
  }
137280
- const source = await fs30.readFile(record2.serverEntryPath, "utf-8");
137537
+ const source = await fs37.readFile(record2.serverEntryPath, "utf-8");
137281
137538
  const sourceHash = this.computeSourceHash(source);
137282
137539
  return this.handleServerCompilation(record2.id, record2.serverEntryPath, sourceHash);
137283
137540
  }
@@ -137289,12 +137546,12 @@ var ExtensionCompiler = class {
137289
137546
  * @param sourceHash - Content hash of the source file
137290
137547
  */
137291
137548
  async readBundle(extId, sourceHash) {
137292
- const cachedPath = path50.join(this.cacheDir, `${extId}.${sourceHash}.js`);
137293
- if (!cachedPath.startsWith(this.cacheDir + path50.sep)) {
137549
+ const cachedPath = path57.join(this.cacheDir, `${extId}.${sourceHash}.js`);
137550
+ if (!cachedPath.startsWith(this.cacheDir + path57.sep)) {
137294
137551
  throw new Error("Attempted path escape in cache lookup");
137295
137552
  }
137296
137553
  try {
137297
- return await fs30.readFile(cachedPath, "utf-8");
137554
+ return await fs37.readFile(cachedPath, "utf-8");
137298
137555
  } catch {
137299
137556
  return null;
137300
137557
  }
@@ -137308,19 +137565,19 @@ var ExtensionCompiler = class {
137308
137565
  async cleanStaleCache() {
137309
137566
  const now = Date.now();
137310
137567
  let cleaned = 0;
137311
- for (const subDir of [this.cacheDir, path50.join(this.cacheDir, "server")]) {
137568
+ for (const subDir of [this.cacheDir, path57.join(this.cacheDir, "server")]) {
137312
137569
  try {
137313
- await fs30.access(subDir);
137570
+ await fs37.access(subDir);
137314
137571
  } catch {
137315
137572
  continue;
137316
137573
  }
137317
- const entries = await fs30.readdir(subDir);
137574
+ const entries = await fs37.readdir(subDir);
137318
137575
  for (const entry of entries) {
137319
- const filePath = path50.join(subDir, entry);
137576
+ const filePath = path57.join(subDir, entry);
137320
137577
  try {
137321
- const stat14 = await fs30.stat(filePath);
137578
+ const stat14 = await fs37.stat(filePath);
137322
137579
  if (stat14.isFile() && now - stat14.atimeMs > STALE_THRESHOLD_MS) {
137323
- await fs30.unlink(filePath);
137580
+ await fs37.unlink(filePath);
137324
137581
  cleaned++;
137325
137582
  }
137326
137583
  } catch {
@@ -137338,15 +137595,15 @@ var ExtensionCompiler = class {
137338
137595
  * Priority: index.js (pre-compiled) > index.ts (compile) > error
137339
137596
  */
137340
137597
  async resolveEntryPoint(extPath) {
137341
- const jsPath = path50.join(extPath, "index.js");
137342
- const tsPath = path50.join(extPath, "index.ts");
137598
+ const jsPath = path57.join(extPath, "index.js");
137599
+ const tsPath = path57.join(extPath, "index.ts");
137343
137600
  try {
137344
- await fs30.access(jsPath);
137601
+ await fs37.access(jsPath);
137345
137602
  return { entryPath: jsPath, isPrecompiled: true };
137346
137603
  } catch {
137347
137604
  }
137348
137605
  try {
137349
- await fs30.access(tsPath);
137606
+ await fs37.access(tsPath);
137350
137607
  return { entryPath: tsPath, isPrecompiled: false };
137351
137608
  } catch {
137352
137609
  return {
@@ -137361,32 +137618,32 @@ var ExtensionCompiler = class {
137361
137618
  /** Handle a pre-compiled JS extension — cache for consistent serving. */
137362
137619
  async handlePrecompiled(extId, source, sourceHash) {
137363
137620
  await this.ensureCacheDir();
137364
- const cachedPath = path50.join(this.cacheDir, `${extId}.${sourceHash}.js`);
137621
+ const cachedPath = path57.join(this.cacheDir, `${extId}.${sourceHash}.js`);
137365
137622
  try {
137366
- await fs30.access(cachedPath);
137367
- const cached = await fs30.readFile(cachedPath, "utf-8");
137623
+ await fs37.access(cachedPath);
137624
+ const cached = await fs37.readFile(cachedPath, "utf-8");
137368
137625
  return { code: cached, sourceHash };
137369
137626
  } catch {
137370
- await fs30.writeFile(cachedPath, source, "utf-8");
137627
+ await fs37.writeFile(cachedPath, source, "utf-8");
137371
137628
  return { code: source, sourceHash };
137372
137629
  }
137373
137630
  }
137374
137631
  /** Handle client-side TypeScript compilation with cache hit/miss logic. */
137375
137632
  async handleCompilation(extId, entryPath, sourceHash) {
137376
137633
  await this.ensureCacheDir();
137377
- const cachedJsPath = path50.join(this.cacheDir, `${extId}.${sourceHash}.js`);
137378
- const cachedErrorPath = path50.join(this.cacheDir, `${extId}.${sourceHash}.error.json`);
137634
+ const cachedJsPath = path57.join(this.cacheDir, `${extId}.${sourceHash}.js`);
137635
+ const cachedErrorPath = path57.join(this.cacheDir, `${extId}.${sourceHash}.error.json`);
137379
137636
  try {
137380
- await fs30.access(cachedJsPath);
137381
- const cached = await fs30.readFile(cachedJsPath, "utf-8");
137637
+ await fs37.access(cachedJsPath);
137638
+ const cached = await fs37.readFile(cachedJsPath, "utf-8");
137382
137639
  logger.debug(`[Extensions] Cache hit for ${extId} (${sourceHash})`);
137383
137640
  return { code: cached, sourceHash };
137384
137641
  } catch {
137385
137642
  }
137386
137643
  try {
137387
- await fs30.access(cachedErrorPath);
137644
+ await fs37.access(cachedErrorPath);
137388
137645
  const cachedError = JSON.parse(
137389
- await fs30.readFile(cachedErrorPath, "utf-8")
137646
+ await fs37.readFile(cachedErrorPath, "utf-8")
137390
137647
  );
137391
137648
  logger.debug(`[Extensions] Cached error for ${extId} (${sourceHash})`);
137392
137649
  return { error: cachedError, sourceHash };
@@ -137396,21 +137653,21 @@ var ExtensionCompiler = class {
137396
137653
  }
137397
137654
  /** Handle server-side TypeScript compilation with cache hit/miss logic. */
137398
137655
  async handleServerCompilation(extId, entryPath, sourceHash) {
137399
- const serverCacheDir = path50.join(this.cacheDir, "server");
137400
- await fs30.mkdir(serverCacheDir, { recursive: true });
137401
- const cachedJsPath = path50.join(serverCacheDir, `${extId}.${sourceHash}.js`);
137402
- const cachedErrorPath = path50.join(serverCacheDir, `${extId}.${sourceHash}.error.json`);
137656
+ const serverCacheDir = path57.join(this.cacheDir, "server");
137657
+ await fs37.mkdir(serverCacheDir, { recursive: true });
137658
+ const cachedJsPath = path57.join(serverCacheDir, `${extId}.${sourceHash}.js`);
137659
+ const cachedErrorPath = path57.join(serverCacheDir, `${extId}.${sourceHash}.error.json`);
137403
137660
  try {
137404
- await fs30.access(cachedJsPath);
137405
- const cached = await fs30.readFile(cachedJsPath, "utf-8");
137661
+ await fs37.access(cachedJsPath);
137662
+ const cached = await fs37.readFile(cachedJsPath, "utf-8");
137406
137663
  logger.debug(`[Extensions] Server cache hit for ${extId} (${sourceHash})`);
137407
137664
  return { code: cached, sourceHash };
137408
137665
  } catch {
137409
137666
  }
137410
137667
  try {
137411
- await fs30.access(cachedErrorPath);
137668
+ await fs37.access(cachedErrorPath);
137412
137669
  const cachedError = JSON.parse(
137413
- await fs30.readFile(cachedErrorPath, "utf-8")
137670
+ await fs37.readFile(cachedErrorPath, "utf-8")
137414
137671
  );
137415
137672
  logger.debug(`[Extensions] Server cached error for ${extId} (${sourceHash})`);
137416
137673
  return { error: cachedError, sourceHash };
@@ -137442,9 +137699,9 @@ var ExtensionCompiler = class {
137442
137699
  `[Extensions] Bundle for ${extId} is ${sizeKb.toFixed(0)}KB (exceeds ${BUNDLE_SIZE_WARNING_KB}KB guideline)`
137443
137700
  );
137444
137701
  }
137445
- await fs30.writeFile(cachedJsPath, code3, "utf-8");
137702
+ await fs37.writeFile(cachedJsPath, code3, "utf-8");
137446
137703
  try {
137447
- await fs30.unlink(cachedErrorPath);
137704
+ await fs37.unlink(cachedErrorPath);
137448
137705
  } catch {
137449
137706
  }
137450
137707
  logger.info(`[Extensions] Compiled ${extId} (${sizeKb.toFixed(1)}KB)`);
@@ -137476,9 +137733,9 @@ var ExtensionCompiler = class {
137476
137733
  `[Extensions] Server bundle for ${extId} is ${sizeKb.toFixed(0)}KB (exceeds ${BUNDLE_SIZE_WARNING_KB}KB guideline)`
137477
137734
  );
137478
137735
  }
137479
- await fs30.writeFile(cachedJsPath, code3, "utf-8");
137736
+ await fs37.writeFile(cachedJsPath, code3, "utf-8");
137480
137737
  try {
137481
- await fs30.unlink(cachedErrorPath);
137738
+ await fs37.unlink(cachedErrorPath);
137482
137739
  } catch {
137483
137740
  }
137484
137741
  logger.info(`[Extensions] Compiled server bundle for ${extId} (${sizeKb.toFixed(1)}KB)`);
@@ -137507,7 +137764,7 @@ var ExtensionCompiler = class {
137507
137764
  location: e4.location ? { file: e4.location.file, line: e4.location.line, column: e4.location.column } : void 0
137508
137765
  })) ?? [{ text: err instanceof Error ? err.message : "Unknown compilation error" }]
137509
137766
  };
137510
- await fs30.writeFile(cachedErrorPath, JSON.stringify(compilationError, null, 2), "utf-8");
137767
+ await fs37.writeFile(cachedErrorPath, JSON.stringify(compilationError, null, 2), "utf-8");
137511
137768
  logger.error(
137512
137769
  `[Extensions] ${prefix}Compilation failed for ${extId}: ${compilationError.errors[0]?.text}`
137513
137770
  );
@@ -137519,13 +137776,13 @@ var ExtensionCompiler = class {
137519
137776
  }
137520
137777
  /** Ensure the client-side cache directory exists. */
137521
137778
  async ensureCacheDir() {
137522
- await fs30.mkdir(this.cacheDir, { recursive: true });
137779
+ await fs37.mkdir(this.cacheDir, { recursive: true });
137523
137780
  }
137524
137781
  };
137525
137782
 
137526
137783
  // ../../apps/server/src/services/extensions/extension-server-lifecycle.ts
137527
- import fs32 from "fs/promises";
137528
- import path52 from "path";
137784
+ import fs39 from "fs/promises";
137785
+ import path59 from "path";
137529
137786
  import { createRequire as createRequire2 } from "node:module";
137530
137787
  import { Router as Router28 } from "express";
137531
137788
 
@@ -137605,29 +137862,29 @@ function createProxyRouter(extensionId, config, dorkHome) {
137605
137862
 
137606
137863
  // ../../apps/server/src/services/extensions/extension-server-api-factory.ts
137607
137864
  init_logger();
137608
- import fs31 from "fs/promises";
137609
- import path51 from "path";
137865
+ import fs38 from "fs/promises";
137866
+ import path58 from "path";
137610
137867
  var MIN_INTERVAL_SECONDS = 5;
137611
137868
  function createDataProviderContext(deps) {
137612
137869
  const scheduledCleanups = [];
137613
137870
  const { extensionId, extensionDir, dorkHome } = deps;
137614
137871
  const secrets = new ExtensionSecretStore(extensionId, dorkHome);
137615
137872
  const settings = new ExtensionSettingsStore(dorkHome, extensionId);
137616
- const dataPath = path51.join(dorkHome, "extension-data", extensionId, "data.json");
137873
+ const dataPath = path58.join(dorkHome, "extension-data", extensionId, "data.json");
137617
137874
  const storage = {
137618
137875
  async loadData() {
137619
137876
  try {
137620
- const raw = await fs31.readFile(dataPath, "utf-8");
137877
+ const raw = await fs38.readFile(dataPath, "utf-8");
137621
137878
  return JSON.parse(raw);
137622
137879
  } catch {
137623
137880
  return null;
137624
137881
  }
137625
137882
  },
137626
137883
  async saveData(data) {
137627
- await fs31.mkdir(path51.dirname(dataPath), { recursive: true });
137884
+ await fs38.mkdir(path58.dirname(dataPath), { recursive: true });
137628
137885
  const tempPath = dataPath + ".tmp";
137629
- await fs31.writeFile(tempPath, JSON.stringify(data, null, 2), "utf-8");
137630
- await fs31.rename(tempPath, dataPath);
137886
+ await fs38.writeFile(tempPath, JSON.stringify(data, null, 2), "utf-8");
137887
+ await fs38.rename(tempPath, dataPath);
137631
137888
  }
137632
137889
  };
137633
137890
  function schedule(intervalSeconds, fn3) {
@@ -137696,10 +137953,10 @@ var ExtensionServerLifecycle = class {
137696
137953
  if ("error" in compiled) {
137697
137954
  return { ok: false, error: compiled.error.message };
137698
137955
  }
137699
- const tempDir = path52.join(this.dorkHome, "cache", "extensions", "server", "_run");
137700
- await fs32.mkdir(tempDir, { recursive: true });
137701
- const tempFile = path52.join(tempDir, `${id}.js`);
137702
- await fs32.writeFile(tempFile, compiled.code, "utf-8");
137956
+ const tempDir = path59.join(this.dorkHome, "cache", "extensions", "server", "_run");
137957
+ await fs39.mkdir(tempDir, { recursive: true });
137958
+ const tempFile = path59.join(tempDir, `${id}.js`);
137959
+ await fs39.writeFile(tempFile, compiled.code, "utf-8");
137703
137960
  try {
137704
137961
  delete require2.cache[require2.resolve(tempFile)];
137705
137962
  } catch {
@@ -137924,8 +138181,8 @@ async function testServerCompilation(record2, compiler2) {
137924
138181
  }
137925
138182
 
137926
138183
  // ../../apps/server/src/services/extensions/extension-scaffolder.ts
137927
- import fs33 from "fs/promises";
137928
- import path53 from "path";
138184
+ import fs40 from "fs/promises";
138185
+ import path60 from "path";
137929
138186
 
137930
138187
  // ../../apps/server/src/services/extensions/extension-templates.ts
137931
138188
  function toPascalCase(str) {
@@ -138240,29 +138497,29 @@ async function scaffoldExtension(options) {
138240
138497
  if (!currentCwd) {
138241
138498
  throw new Error("Cannot create local extension: no working directory is active");
138242
138499
  }
138243
- targetDir = path53.join(currentCwd, ".dork", "extensions", name);
138500
+ targetDir = path60.join(currentCwd, ".dork", "extensions", name);
138244
138501
  } else {
138245
- targetDir = path53.join(dorkHome, "extensions", name);
138502
+ targetDir = path60.join(dorkHome, "extensions", name);
138246
138503
  }
138247
138504
  try {
138248
- await fs33.access(targetDir);
138505
+ await fs40.access(targetDir);
138249
138506
  throw new Error(`Extension '${name}' already exists at ${targetDir}`);
138250
138507
  } catch (err) {
138251
138508
  if (err instanceof Error && err.message.includes("already exists")) throw err;
138252
138509
  }
138253
- await fs33.mkdir(targetDir, { recursive: true });
138510
+ await fs40.mkdir(targetDir, { recursive: true });
138254
138511
  const manifest = generateManifest(name, description, template);
138255
- await fs33.writeFile(
138256
- path53.join(targetDir, "extension.json"),
138512
+ await fs40.writeFile(
138513
+ path60.join(targetDir, "extension.json"),
138257
138514
  JSON.stringify(manifest, null, 2),
138258
138515
  "utf-8"
138259
138516
  );
138260
138517
  const indexContent = generateTemplate(name, description ?? "", template);
138261
- await fs33.writeFile(path53.join(targetDir, "index.ts"), indexContent, "utf-8");
138518
+ await fs40.writeFile(path60.join(targetDir, "index.ts"), indexContent, "utf-8");
138262
138519
  const files = ["extension.json", "index.ts"];
138263
138520
  if (template === "data-provider") {
138264
138521
  const serverContent = generateServerTemplate(name, description ?? "");
138265
- await fs33.writeFile(path53.join(targetDir, "server.ts"), serverContent, "utf-8");
138522
+ await fs40.writeFile(path60.join(targetDir, "server.ts"), serverContent, "utf-8");
138266
138523
  files.push("server.ts");
138267
138524
  }
138268
138525
  return { targetDir, files };
@@ -138532,16 +138789,16 @@ var ExtensionManager = class {
138532
138789
  };
138533
138790
 
138534
138791
  // ../../apps/server/src/services/builtin-extensions/ensure-marketplace.ts
138535
- import fs34 from "fs/promises";
138536
- import path54 from "path";
138792
+ import fs41 from "fs/promises";
138793
+ import path61 from "path";
138537
138794
  import { fileURLToPath as fileURLToPath6 } from "url";
138538
138795
  init_logger();
138539
- var __dirname4 = path54.dirname(fileURLToPath6(import.meta.url));
138796
+ var __dirname4 = path61.dirname(fileURLToPath6(import.meta.url));
138540
138797
  var EXTENSION_ID = "marketplace";
138541
- var BUILTIN_SOURCE_DIR = path54.resolve(__dirname4, "../../builtin-extensions/marketplace");
138798
+ var BUILTIN_SOURCE_DIR = path61.resolve(__dirname4, "../../builtin-extensions/marketplace");
138542
138799
  async function readManifestVersion(manifestPath) {
138543
138800
  try {
138544
- const raw = await fs34.readFile(manifestPath, "utf-8");
138801
+ const raw = await fs41.readFile(manifestPath, "utf-8");
138545
138802
  const parsed = JSON.parse(raw);
138546
138803
  const result2 = ExtensionManifestSchema.safeParse(parsed);
138547
138804
  if (!result2.success) return null;
@@ -138551,13 +138808,13 @@ async function readManifestVersion(manifestPath) {
138551
138808
  }
138552
138809
  }
138553
138810
  async function copyDirectory(source, destination) {
138554
- await fs34.mkdir(destination, { recursive: true });
138555
- await fs34.cp(source, destination, { recursive: true, force: true });
138811
+ await fs41.mkdir(destination, { recursive: true });
138812
+ await fs41.cp(source, destination, { recursive: true, force: true });
138556
138813
  }
138557
138814
  async function ensureBuiltinMarketplaceExtension(dorkHome) {
138558
- const destinationDir = path54.join(dorkHome, "extensions", EXTENSION_ID);
138559
- const sourceManifestPath = path54.join(BUILTIN_SOURCE_DIR, "extension.json");
138560
- const destinationManifestPath = path54.join(destinationDir, "extension.json");
138815
+ const destinationDir = path61.join(dorkHome, "extensions", EXTENSION_ID);
138816
+ const sourceManifestPath = path61.join(BUILTIN_SOURCE_DIR, "extension.json");
138817
+ const destinationManifestPath = path61.join(destinationDir, "extension.json");
138561
138818
  const bundledVersion = await readManifestVersion(sourceManifestPath);
138562
138819
  if (!bundledVersion) {
138563
138820
  logger.warn(
@@ -138829,16 +139086,16 @@ function resolveRelativePath(source, context) {
138829
139086
  throw new ResolvePluginSourceError('Relative paths must not contain ".."');
138830
139087
  }
138831
139088
  const startsWithDotSlash = source.startsWith("./");
138832
- let path72;
139089
+ let path79;
138833
139090
  if (startsWithDotSlash) {
138834
- path72 = stripLeadingDotSlash(source);
139091
+ path79 = stripLeadingDotSlash(source);
138835
139092
  } else {
138836
139093
  const pluginRoot = normalizePluginRoot(context.pluginRoot);
138837
- path72 = pluginRoot ? `${pluginRoot}/${source}` : source;
139094
+ path79 = pluginRoot ? `${pluginRoot}/${source}` : source;
138838
139095
  }
138839
139096
  return {
138840
139097
  type: "relative-path",
138841
- path: path72,
139098
+ path: path79,
138842
139099
  marketplaceRoot: context.marketplaceRoot
138843
139100
  };
138844
139101
  }
@@ -138946,16 +139203,16 @@ var MarketplaceCache = class {
138946
139203
  * @returns A descriptor when present, `null` otherwise.
138947
139204
  */
138948
139205
  async getPackage(packageName, commitSha) {
138949
- const path72 = this.packageDir(packageName, commitSha);
139206
+ const path79 = this.packageDir(packageName, commitSha);
138950
139207
  try {
138951
- const info = await stat5(path72);
139208
+ const info = await stat5(path79);
138952
139209
  if (!info.isDirectory()) {
138953
139210
  return null;
138954
139211
  }
138955
139212
  return {
138956
139213
  packageName,
138957
139214
  commitSha,
138958
- path: path72,
139215
+ path: path79,
138959
139216
  cachedAt: info.mtime
138960
139217
  };
138961
139218
  } catch {
@@ -138974,9 +139231,9 @@ var MarketplaceCache = class {
138974
139231
  * @returns Absolute path to the reserved directory.
138975
139232
  */
138976
139233
  async putPackage(packageName, commitSha) {
138977
- const path72 = this.packageDir(packageName, commitSha);
138978
- await mkdir12(path72, { recursive: true });
138979
- return path72;
139234
+ const path79 = this.packageDir(packageName, commitSha);
139235
+ await mkdir12(path79, { recursive: true });
139236
+ return path79;
138980
139237
  }
138981
139238
  /**
138982
139239
  * Enumerate every cached package across all names and SHAs. Entries whose
@@ -138997,16 +139254,16 @@ var MarketplaceCache = class {
138997
139254
  if (!parsed) {
138998
139255
  continue;
138999
139256
  }
139000
- const path72 = join19(root3, entry);
139257
+ const path79 = join19(root3, entry);
139001
139258
  try {
139002
- const info = await stat5(path72);
139259
+ const info = await stat5(path79);
139003
139260
  if (!info.isDirectory()) {
139004
139261
  continue;
139005
139262
  }
139006
139263
  results.push({
139007
139264
  packageName: parsed.packageName,
139008
139265
  commitSha: parsed.commitSha,
139009
- path: path72,
139266
+ path: path79,
139010
139267
  cachedAt: info.mtime
139011
139268
  });
139012
139269
  } catch {
@@ -139289,15 +139546,15 @@ function legacyGitUrlFromSource(source) {
139289
139546
  // ../../apps/server/src/services/marketplace/package-fetcher.ts
139290
139547
  import { execFile as execFile3 } from "node:child_process";
139291
139548
  import { readFile as readFile16 } from "node:fs/promises";
139292
- import path57 from "node:path";
139549
+ import path64 from "node:path";
139293
139550
  import { promisify as promisify5 } from "node:util";
139294
139551
 
139295
139552
  // ../../apps/server/src/services/marketplace/source-resolvers/relative-path.ts
139296
- import path55 from "node:path";
139553
+ import path62 from "node:path";
139297
139554
  import { access as access3 } from "node:fs/promises";
139298
139555
  var RELATIVE_PATH_SENTINEL_SHA = "relative-path";
139299
139556
  async function relativePathResolver(resolved, opts) {
139300
- const fullPath = path55.join(resolved.marketplaceRoot, resolved.path);
139557
+ const fullPath = path62.join(resolved.marketplaceRoot, resolved.path);
139301
139558
  try {
139302
139559
  await access3(fullPath);
139303
139560
  } catch {
@@ -139333,7 +139590,7 @@ async function urlResolver(resolved, opts, deps) {
139333
139590
  // ../../apps/server/src/services/marketplace/source-resolvers/git-subdir.ts
139334
139591
  import { spawn as spawn4 } from "node:child_process";
139335
139592
  import { readdir as readdir6, rm as rm5 } from "node:fs/promises";
139336
- import path56 from "node:path";
139593
+ import path63 from "node:path";
139337
139594
  async function gitSubdirResolver(resolved, opts, deps) {
139338
139595
  const ref = resolved.sha ?? resolved.ref ?? "main";
139339
139596
  const commitSha = await deps.resolveCommitSha(resolved.cloneUrl, ref);
@@ -139341,7 +139598,7 @@ async function gitSubdirResolver(resolved, opts, deps) {
139341
139598
  const cached = await deps.cache.getPackage(opts.packageName, commitSha);
139342
139599
  if (cached) {
139343
139600
  return {
139344
- path: path56.join(cached.path, resolved.subpath),
139601
+ path: path63.join(cached.path, resolved.subpath),
139345
139602
  commitSha,
139346
139603
  fromCache: true
139347
139604
  };
@@ -139386,7 +139643,7 @@ async function gitSubdirResolver(resolved, opts, deps) {
139386
139643
  }
139387
139644
  }
139388
139645
  return {
139389
- path: path56.join(destDir, resolved.subpath),
139646
+ path: path63.join(destDir, resolved.subpath),
139390
139647
  commitSha,
139391
139648
  fromCache: false
139392
139649
  };
@@ -139418,7 +139675,7 @@ async function pruneOutsideSubpath(destDir, subpath) {
139418
139675
  await Promise.all(
139419
139676
  entries.map(async (entry) => {
139420
139677
  if (entry === ".git" || entry === firstSegment) return;
139421
- await rm5(path56.join(destDir, entry), { recursive: true, force: true });
139678
+ await rm5(path63.join(destDir, entry), { recursive: true, force: true });
139422
139679
  })
139423
139680
  );
139424
139681
  }
@@ -139696,7 +139953,7 @@ var PackageFetcher = class {
139696
139953
  */
139697
139954
  async readLocalDorkosSidecar(source) {
139698
139955
  const root3 = fileUrlToPath(source.source);
139699
- const sidecarPath = path57.join(root3, ".claude-plugin", "dorkos.json");
139956
+ const sidecarPath = path64.join(root3, ".claude-plugin", "dorkos.json");
139700
139957
  let raw;
139701
139958
  try {
139702
139959
  raw = await readFile16(sidecarPath, "utf-8");
@@ -139723,7 +139980,7 @@ var PackageFetcher = class {
139723
139980
  */
139724
139981
  async readLocalMarketplaceJson(source) {
139725
139982
  const root3 = fileUrlToPath(source.source);
139726
- const manifestPath = path57.join(root3, "marketplace.json");
139983
+ const manifestPath = path64.join(root3, "marketplace.json");
139727
139984
  let raw;
139728
139985
  try {
139729
139986
  raw = await readFile16(manifestPath, "utf-8");
@@ -140176,9 +140433,9 @@ async function walkPackageFiles(root3) {
140176
140433
  await visit2(root3);
140177
140434
  return results;
140178
140435
  }
140179
- async function pathExists2(path72) {
140436
+ async function pathExists2(path79) {
140180
140437
  try {
140181
- await stat8(path72);
140438
+ await stat8(path79);
140182
140439
  return true;
140183
140440
  } catch {
140184
140441
  return false;
@@ -140373,7 +140630,7 @@ function collectExternalHosts(extensions) {
140373
140630
 
140374
140631
  // ../../apps/server/src/services/marketplace/flows/install-plugin.ts
140375
140632
  import { cp as cp2, mkdir as mkdir13, readdir as readdir9, readFile as readFile19, stat as stat9 } from "node:fs/promises";
140376
- import path59 from "node:path";
140633
+ import path66 from "node:path";
140377
140634
 
140378
140635
  // ../../apps/server/src/services/marketplace/lib/atomic-move.ts
140379
140636
  import { cp, rename as rename9, rm as rm6 } from "node:fs/promises";
@@ -140394,13 +140651,13 @@ function isCrossDeviceError(err) {
140394
140651
  import { execFile as execFile4 } from "node:child_process";
140395
140652
  import { mkdtemp as mkdtemp2, rm as rm7 } from "node:fs/promises";
140396
140653
  import { tmpdir as tmpdir2 } from "node:os";
140397
- import path58 from "node:path";
140654
+ import path65 from "node:path";
140398
140655
  import { promisify as promisify6 } from "node:util";
140399
140656
  var execFileAsync4 = promisify6(execFile4);
140400
140657
  var BACKUP_BRANCH_PREFIX = "dorkos-rollback";
140401
140658
  var STAGING_DIR_PREFIX = "dorkos-install-";
140402
140659
  async function runTransaction(opts) {
140403
- const stagingDir = await mkdtemp2(path58.join(tmpdir2(), `${STAGING_DIR_PREFIX}${opts.name}-`));
140660
+ const stagingDir = await mkdtemp2(path65.join(tmpdir2(), `${STAGING_DIR_PREFIX}${opts.name}-`));
140404
140661
  const backupBranch = opts.rollbackBranch ? await maybeCreateBackupBranch(opts.name) : void 0;
140405
140662
  try {
140406
140663
  await opts.stage({ path: stagingDir });
@@ -140528,7 +140785,7 @@ var PluginInstallFlow = class {
140528
140785
  * lives on a different volume than `dorkHome`.
140529
140786
  */
140530
140787
  async activate(stagingDir, installRoot, manifest) {
140531
- await mkdir13(path59.dirname(installRoot), { recursive: true });
140788
+ await mkdir13(path66.dirname(installRoot), { recursive: true });
140532
140789
  await atomicMove(stagingDir, installRoot);
140533
140790
  const extensions = await discoverStagedExtensions(installRoot);
140534
140791
  for (const ext of extensions) {
@@ -140548,19 +140805,19 @@ var PluginInstallFlow = class {
140548
140805
  };
140549
140806
  function computeInstallRoot2(dorkHome, manifest, projectPath) {
140550
140807
  if (projectPath) {
140551
- return path59.join(projectPath, ".dork", "plugins", manifest.name);
140808
+ return path66.join(projectPath, ".dork", "plugins", manifest.name);
140552
140809
  }
140553
- return path59.join(dorkHome, "plugins", manifest.name);
140810
+ return path66.join(dorkHome, "plugins", manifest.name);
140554
140811
  }
140555
140812
  async function discoverStagedExtensions(root3) {
140556
- const extRoot = path59.join(root3, ".dork", "extensions");
140813
+ const extRoot = path66.join(root3, ".dork", "extensions");
140557
140814
  if (!await exists2(extRoot)) return [];
140558
140815
  const entries = await readdir9(extRoot, { withFileTypes: true });
140559
140816
  const found = [];
140560
140817
  for (const entry of entries) {
140561
140818
  if (!entry.isDirectory()) continue;
140562
- const extDir = path59.join(extRoot, entry.name);
140563
- const manifestPath = path59.join(extDir, "extension.json");
140819
+ const extDir = path66.join(extRoot, entry.name);
140820
+ const manifestPath = path66.join(extDir, "extension.json");
140564
140821
  if (!await exists2(manifestPath)) continue;
140565
140822
  const parsed = await readExtensionManifest(manifestPath);
140566
140823
  if (parsed) {
@@ -140601,7 +140858,7 @@ async function exists2(target) {
140601
140858
 
140602
140859
  // ../../apps/server/src/services/marketplace/flows/install-agent.ts
140603
140860
  import { cp as cp3, mkdir as mkdir14 } from "node:fs/promises";
140604
- import path60 from "node:path";
140861
+ import path67 from "node:path";
140605
140862
  var AgentInstallFlow = class {
140606
140863
  constructor(deps) {
140607
140864
  this.deps = deps;
@@ -140663,19 +140920,19 @@ var AgentInstallFlow = class {
140663
140920
  };
140664
140921
  function computeTargetDir(dorkHome, manifest, projectPath) {
140665
140922
  if (projectPath) return projectPath;
140666
- return path60.join(dorkHome, "agents", manifest.name);
140923
+ return path67.join(dorkHome, "agents", manifest.name);
140667
140924
  }
140668
140925
  async function stageAgentPackage(packagePath, stagingPath) {
140669
140926
  await cp3(packagePath, stagingPath, { recursive: true });
140670
140927
  }
140671
140928
  async function activateAgentPackage(stagingPath, targetDir) {
140672
- await mkdir14(path60.dirname(targetDir), { recursive: true });
140929
+ await mkdir14(path67.dirname(targetDir), { recursive: true });
140673
140930
  await atomicMove(stagingPath, targetDir);
140674
140931
  }
140675
140932
 
140676
140933
  // ../../apps/server/src/services/marketplace/flows/install-skill-pack.ts
140677
140934
  import { cp as cp4, mkdir as mkdir15, readdir as readdir10, readFile as readFile20 } from "node:fs/promises";
140678
- import path61 from "node:path";
140935
+ import path68 from "node:path";
140679
140936
  init_parser();
140680
140937
  var SKILL_FILENAME2 = "SKILL.md";
140681
140938
  var SkillPackInstallFlow = class {
@@ -140703,9 +140960,9 @@ var SkillPackInstallFlow = class {
140703
140960
  };
140704
140961
  function computeInstallRoot3(dorkHome, packageName, projectPath) {
140705
140962
  if (projectPath) {
140706
- return path61.join(projectPath, ".dork", "plugins", packageName);
140963
+ return path68.join(projectPath, ".dork", "plugins", packageName);
140707
140964
  }
140708
- return path61.join(dorkHome, "plugins", packageName);
140965
+ return path68.join(dorkHome, "plugins", packageName);
140709
140966
  }
140710
140967
  async function stageSkillPack(packagePath, stagingPath) {
140711
140968
  await cp4(packagePath, stagingPath, { recursive: true });
@@ -140715,7 +140972,7 @@ async function stageSkillPack(packagePath, stagingPath) {
140715
140972
  }
140716
140973
  }
140717
140974
  async function activateSkillPack(stagingPath, installRoot) {
140718
- await mkdir15(path61.dirname(installRoot), { recursive: true });
140975
+ await mkdir15(path68.dirname(installRoot), { recursive: true });
140719
140976
  await atomicMove(stagingPath, installRoot);
140720
140977
  return { installPath: installRoot };
140721
140978
  }
@@ -140737,7 +140994,7 @@ async function findSkillFiles(root3) {
140737
140994
  for (const entry of entries) {
140738
140995
  if (!entry.isFile() || entry.name !== SKILL_FILENAME2) continue;
140739
140996
  const parent = entry.parentPath ?? entry.path ?? root3;
140740
- matches.push(path61.join(parent, entry.name));
140997
+ matches.push(path68.join(parent, entry.name));
140741
140998
  }
140742
140999
  return matches;
140743
141000
  }
@@ -140751,7 +141008,7 @@ async function validateSkillFile(absFile) {
140751
141008
 
140752
141009
  // ../../apps/server/src/services/marketplace/flows/install-adapter.ts
140753
141010
  import { cp as cp5, mkdir as mkdir16 } from "node:fs/promises";
140754
- import path62 from "node:path";
141011
+ import path69 from "node:path";
140755
141012
  var AdapterInstallFlow = class {
140756
141013
  constructor(deps) {
140757
141014
  this.deps = deps;
@@ -140766,7 +141023,7 @@ var AdapterInstallFlow = class {
140766
141023
  */
140767
141024
  async install(packagePath, manifest, _opts) {
140768
141025
  const { dorkHome, adapterManager: adapterManager2, logger: logger3 } = this.deps;
140769
- const installPath = path62.join(dorkHome, "plugins", manifest.name);
141026
+ const installPath = path69.join(dorkHome, "plugins", manifest.name);
140770
141027
  logger3.info("[marketplace/install-adapter] starting", {
140771
141028
  name: manifest.name,
140772
141029
  adapterType: manifest.adapterType,
@@ -140800,13 +141057,13 @@ async function stageAdapterPackage(packagePath, stagingPath) {
140800
141057
  await cp5(packagePath, stagingPath, { recursive: true });
140801
141058
  }
140802
141059
  async function activateAdapterPackage(stagingPath, installPath) {
140803
- await mkdir16(path62.dirname(installPath), { recursive: true });
141060
+ await mkdir16(path69.dirname(installPath), { recursive: true });
140804
141061
  await atomicMove(stagingPath, installPath);
140805
141062
  }
140806
141063
  async function registerAdapterWithCompensation(adapterManager2, manifest, installPath, logger3) {
140807
141064
  try {
140808
141065
  await adapterManager2.addAdapter(manifest.adapterType, manifest.name, {
140809
- pluginPath: path62.join(installPath, ".dork", "adapters", manifest.adapterType)
141066
+ pluginPath: path69.join(installPath, ".dork", "adapters", manifest.adapterType)
140810
141067
  });
140811
141068
  } catch (err) {
140812
141069
  logger3.warn("[marketplace/install-adapter] addAdapter failed, compensating", {
@@ -140828,10 +141085,10 @@ async function registerAdapterWithCompensation(adapterManager2, manifest, instal
140828
141085
  // ../../apps/server/src/services/marketplace/flows/uninstall.ts
140829
141086
  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
141087
  import { tmpdir as tmpdir3 } from "node:os";
140831
- import path63 from "node:path";
141088
+ import path70 from "node:path";
140832
141089
  var STAGING_DIR_PREFIX2 = "dorkos-uninstall-";
140833
- var DATA_SUBPATH = path63.join(".dork", "data");
140834
- var SECRETS_SUBPATH = path63.join(".dork", "secrets.json");
141090
+ var DATA_SUBPATH = path70.join(".dork", "data");
141091
+ var SECRETS_SUBPATH = path70.join(".dork", "secrets.json");
140835
141092
  var PackageNotInstalledError = class extends Error {
140836
141093
  /**
140837
141094
  * Build a `PackageNotInstalledError` for the supplied package name.
@@ -140857,8 +141114,8 @@ var UninstallFlow = class {
140857
141114
  */
140858
141115
  async uninstall(req) {
140859
141116
  const located = await this.locate(req);
140860
- const stagingDir = await mkdtemp3(path63.join(tmpdir3(), `${STAGING_DIR_PREFIX2}${req.name}-`));
140861
- const stagingPath = path63.join(stagingDir, "pkg");
141117
+ const stagingDir = await mkdtemp3(path70.join(tmpdir3(), `${STAGING_DIR_PREFIX2}${req.name}-`));
141118
+ const stagingPath = path70.join(stagingDir, "pkg");
140862
141119
  try {
140863
141120
  await atomicMove(located.installRoot, stagingPath);
140864
141121
  } catch (err) {
@@ -140905,16 +141162,16 @@ var UninstallFlow = class {
140905
141162
  const candidates = [];
140906
141163
  if (req.projectPath) {
140907
141164
  candidates.push({
140908
- installRoot: path63.join(req.projectPath, ".dork", "plugins", req.name),
141165
+ installRoot: path70.join(req.projectPath, ".dork", "plugins", req.name),
140909
141166
  inferredType: "plugin"
140910
141167
  });
140911
141168
  }
140912
141169
  candidates.push({
140913
- installRoot: path63.join(this.deps.dorkHome, "plugins", req.name),
141170
+ installRoot: path70.join(this.deps.dorkHome, "plugins", req.name),
140914
141171
  inferredType: "plugin"
140915
141172
  });
140916
141173
  candidates.push({
140917
- installRoot: path63.join(this.deps.dorkHome, "agents", req.name),
141174
+ installRoot: path70.join(this.deps.dorkHome, "agents", req.name),
140918
141175
  inferredType: "agent"
140919
141176
  });
140920
141177
  return candidates;
@@ -140933,7 +141190,7 @@ var UninstallFlow = class {
140933
141190
  }
140934
141191
  if (type === "adapter") {
140935
141192
  await this.deps.adapterManager.removeAdapter(
140936
- located.manifest?.name ?? path63.basename(located.installRoot)
141193
+ located.manifest?.name ?? path70.basename(located.installRoot)
140937
141194
  );
140938
141195
  }
140939
141196
  }
@@ -140944,7 +141201,7 @@ var UninstallFlow = class {
140944
141201
  * @internal
140945
141202
  */
140946
141203
  async disableBundledExtensions(stagingPath) {
140947
- const extDir = path63.join(stagingPath, ".dork", "extensions");
141204
+ const extDir = path70.join(stagingPath, ".dork", "extensions");
140948
141205
  if (!await pathExists3(extDir)) return;
140949
141206
  const entries = await readdir11(extDir, { withFileTypes: true });
140950
141207
  for (const entry of entries) {
@@ -140962,17 +141219,17 @@ var UninstallFlow = class {
140962
141219
  */
140963
141220
  async restorePreservedData(stagingPath, installRoot) {
140964
141221
  const preserved = [];
140965
- const stagedDataDir = path63.join(stagingPath, DATA_SUBPATH);
140966
- const stagedSecrets = path63.join(stagingPath, SECRETS_SUBPATH);
140967
- const liveDataDir = path63.join(installRoot, DATA_SUBPATH);
140968
- const liveSecrets = path63.join(installRoot, SECRETS_SUBPATH);
141222
+ const stagedDataDir = path70.join(stagingPath, DATA_SUBPATH);
141223
+ const stagedSecrets = path70.join(stagingPath, SECRETS_SUBPATH);
141224
+ const liveDataDir = path70.join(installRoot, DATA_SUBPATH);
141225
+ const liveSecrets = path70.join(installRoot, SECRETS_SUBPATH);
140969
141226
  if (await pathExists3(stagedDataDir)) {
140970
- await mkdir17(path63.dirname(liveDataDir), { recursive: true });
141227
+ await mkdir17(path70.dirname(liveDataDir), { recursive: true });
140971
141228
  await cp6(stagedDataDir, liveDataDir, { recursive: true });
140972
141229
  preserved.push(liveDataDir);
140973
141230
  }
140974
141231
  if (await pathExists3(stagedSecrets)) {
140975
- await mkdir17(path63.dirname(liveSecrets), { recursive: true });
141232
+ await mkdir17(path70.dirname(liveSecrets), { recursive: true });
140976
141233
  await cp6(stagedSecrets, liveSecrets);
140977
141234
  preserved.push(liveSecrets);
140978
141235
  }
@@ -140990,7 +141247,7 @@ var UninstallFlow = class {
140990
141247
  if (await pathExists3(installRoot)) {
140991
141248
  await rm8(installRoot, { recursive: true, force: true });
140992
141249
  }
140993
- await mkdir17(path63.dirname(installRoot), { recursive: true });
141250
+ await mkdir17(path70.dirname(installRoot), { recursive: true });
140994
141251
  await atomicMove(stagingPath, installRoot);
140995
141252
  } catch (rollbackErr) {
140996
141253
  this.deps.logger.warn(
@@ -141025,7 +141282,7 @@ async function pathExists3(target) {
141025
141282
  }
141026
141283
  async function readManifestIfPresent(installRoot) {
141027
141284
  try {
141028
- const raw = await readFile21(path63.join(installRoot, PACKAGE_MANIFEST_PATH), "utf-8");
141285
+ const raw = await readFile21(path70.join(installRoot, PACKAGE_MANIFEST_PATH), "utf-8");
141029
141286
  return JSON.parse(raw);
141030
141287
  } catch {
141031
141288
  return null;
@@ -141035,7 +141292,7 @@ async function readManifestIfPresent(installRoot) {
141035
141292
  // ../../apps/server/src/services/marketplace/flows/update.ts
141036
141293
  var import_semver2 = __toESM(require_semver2(), 1);
141037
141294
  import { readFile as readFile22, readdir as readdir12, stat as stat11 } from "node:fs/promises";
141038
- import path64 from "node:path";
141295
+ import path71 from "node:path";
141039
141296
  init_installed_metadata();
141040
141297
  var PackageNotInstalledForUpdateError = class extends Error {
141041
141298
  /**
@@ -141110,14 +141367,14 @@ var UpdateFlow = class {
141110
141367
  async listInstalled() {
141111
141368
  const results = [];
141112
141369
  const roots = [
141113
- { dir: path64.join(this.deps.dorkHome, "plugins"), inferredType: "plugin" },
141114
- { dir: path64.join(this.deps.dorkHome, "agents"), inferredType: "agent" }
141370
+ { dir: path71.join(this.deps.dorkHome, "plugins"), inferredType: "plugin" },
141371
+ { dir: path71.join(this.deps.dorkHome, "agents"), inferredType: "agent" }
141115
141372
  ];
141116
141373
  for (const root3 of roots) {
141117
141374
  const entries = await readDirSafe(root3.dir);
141118
141375
  for (const entry of entries) {
141119
141376
  if (!entry.isDirectory()) continue;
141120
- const installPath = path64.join(root3.dir, entry.name);
141377
+ const installPath = path71.join(root3.dir, entry.name);
141121
141378
  const manifest = await readInstalledManifest(installPath);
141122
141379
  if (!manifest) continue;
141123
141380
  const installMetadata = await readInstallMetadata(installPath);
@@ -141221,7 +141478,7 @@ async function readDirSafe(dir) {
141221
141478
  }
141222
141479
  }
141223
141480
  async function readInstalledManifest(installRoot) {
141224
- const manifestPath = path64.join(installRoot, PACKAGE_MANIFEST_PATH);
141481
+ const manifestPath = path71.join(installRoot, PACKAGE_MANIFEST_PATH);
141225
141482
  try {
141226
141483
  const s5 = await stat11(manifestPath);
141227
141484
  if (!s5.isFile()) return null;
@@ -141254,7 +141511,7 @@ async function reportInstallEvent(event) {
141254
141511
  init_installed_metadata();
141255
141512
  import { cp as cp7, mkdir as mkdir18, mkdtemp as mkdtemp4, rm as rm9, stat as stat12 } from "node:fs/promises";
141256
141513
  import { tmpdir as tmpdir4 } from "node:os";
141257
- import path65 from "node:path";
141514
+ import path72 from "node:path";
141258
141515
  var DIRECT_SOURCE_LABEL = "<direct>";
141259
141516
  var InvalidPackageError = class extends Error {
141260
141517
  /**
@@ -141408,12 +141665,12 @@ var MarketplaceInstaller = class {
141408
141665
  let scratchDir = null;
141409
141666
  let installRoot = null;
141410
141667
  if (preserved.length > 0) {
141411
- scratchDir = await mkdtemp4(path65.join(tmpdir4(), "dorkos-update-preserve-"));
141668
+ scratchDir = await mkdtemp4(path72.join(tmpdir4(), "dorkos-update-preserve-"));
141412
141669
  installRoot = await findInstallRootFromPreservedPath(preserved[0]);
141413
141670
  for (const livePath of preserved) {
141414
- const relPath = path65.relative(installRoot, livePath);
141415
- const scratchPath = path65.join(scratchDir, relPath);
141416
- await mkdir18(path65.dirname(scratchPath), { recursive: true });
141671
+ const relPath = path72.relative(installRoot, livePath);
141672
+ const scratchPath = path72.join(scratchDir, relPath);
141673
+ await mkdir18(path72.dirname(scratchPath), { recursive: true });
141417
141674
  await cp7(livePath, scratchPath, { recursive: true });
141418
141675
  }
141419
141676
  await rm9(installRoot, { recursive: true, force: true });
@@ -141426,9 +141683,9 @@ var MarketplaceInstaller = class {
141426
141683
  try {
141427
141684
  await mkdir18(installRoot, { recursive: true });
141428
141685
  for (const livePath of preserved) {
141429
- const relPath = path65.relative(installRoot, livePath);
141430
- const scratchPath = path65.join(scratchDir, relPath);
141431
- await mkdir18(path65.dirname(livePath), { recursive: true });
141686
+ const relPath = path72.relative(installRoot, livePath);
141687
+ const scratchPath = path72.join(scratchDir, relPath);
141688
+ await mkdir18(path72.dirname(livePath), { recursive: true });
141432
141689
  await cp7(scratchPath, livePath, { recursive: true });
141433
141690
  }
141434
141691
  } catch {
@@ -141439,11 +141696,11 @@ var MarketplaceInstaller = class {
141439
141696
  }
141440
141697
  if (scratchDir && installRoot) {
141441
141698
  for (const livePath of preserved) {
141442
- const relPath = path65.relative(installRoot, livePath);
141443
- const scratchPath = path65.join(scratchDir, relPath);
141444
- const destPath = path65.join(installResult.installPath, relPath);
141699
+ const relPath = path72.relative(installRoot, livePath);
141700
+ const scratchPath = path72.join(scratchDir, relPath);
141701
+ const destPath = path72.join(installResult.installPath, relPath);
141445
141702
  if (!await pathExists4(scratchPath)) continue;
141446
- await mkdir18(path65.dirname(destPath), { recursive: true });
141703
+ await mkdir18(path72.dirname(destPath), { recursive: true });
141447
141704
  await cp7(scratchPath, destPath, { recursive: true });
141448
141705
  }
141449
141706
  await rm9(scratchDir, { recursive: true, force: true }).catch(() => void 0);
@@ -141589,14 +141846,14 @@ async function pathExists4(target) {
141589
141846
  }
141590
141847
  }
141591
141848
  async function findInstallRootFromPreservedPath(preservedPath) {
141592
- const segments = preservedPath.split(path65.sep);
141849
+ const segments = preservedPath.split(path72.sep);
141593
141850
  const dorkIdx = segments.lastIndexOf(".dork");
141594
141851
  if (dorkIdx <= 0) {
141595
141852
  throw new Error(
141596
141853
  `[marketplace-installer] Cannot derive install root from preserved path '${preservedPath}'`
141597
141854
  );
141598
141855
  }
141599
- return segments.slice(0, dorkIdx).join(path65.sep);
141856
+ return segments.slice(0, dorkIdx).join(path72.sep);
141600
141857
  }
141601
141858
  function resolveRelativeSubpath(source, pluginRoot) {
141602
141859
  if (source.startsWith("./")) {
@@ -142087,10 +142344,10 @@ async function safeReaddir2(dir) {
142087
142344
 
142088
142345
  // ../../apps/server/src/services/marketplace-mcp/personal-marketplace.ts
142089
142346
  import { mkdir as mkdir19, writeFile as writeFile12, access as access4 } from "node:fs/promises";
142090
- import path66 from "node:path";
142347
+ import path73 from "node:path";
142091
142348
  var PERSONAL_MARKETPLACE_NAME = "personal";
142092
142349
  function personalMarketplaceRoot(dorkHome) {
142093
- return path66.join(dorkHome, "personal-marketplace");
142350
+ return path73.join(dorkHome, "personal-marketplace");
142094
142351
  }
142095
142352
  var DEFAULT_README = `# Personal Marketplace
142096
142353
 
@@ -142124,10 +142381,10 @@ async function pathExists5(target) {
142124
142381
  }
142125
142382
  async function ensurePersonalMarketplace(deps) {
142126
142383
  const root3 = personalMarketplaceRoot(deps.dorkHome);
142127
- const packagesDir = path66.join(root3, "packages");
142128
- const manifestPath = path66.join(root3, "marketplace.json");
142129
- const readmePath = path66.join(root3, "README.md");
142130
- const gitignorePath = path66.join(root3, ".gitignore");
142384
+ const packagesDir = path73.join(root3, "packages");
142385
+ const manifestPath = path73.join(root3, "marketplace.json");
142386
+ const readmePath = path73.join(root3, "README.md");
142387
+ const gitignorePath = path73.join(root3, ".gitignore");
142131
142388
  await mkdir19(packagesDir, { recursive: true });
142132
142389
  if (!await pathExists5(manifestPath)) {
142133
142390
  await writeFile12(
@@ -147957,7 +148214,7 @@ function applyFilters(entries, args) {
147957
148214
 
147958
148215
  // ../../apps/server/src/services/marketplace-mcp/tool-get.ts
147959
148216
  import { readFile as readFile23 } from "node:fs/promises";
147960
- import path67 from "node:path";
148217
+ import path74 from "node:path";
147961
148218
  import { z as z52 } from "zod";
147962
148219
  var GetInputSchema = {
147963
148220
  name: z52.string().describe("Package name"),
@@ -148053,7 +148310,7 @@ async function loadManifestAndReadme(deps, located, packageName) {
148053
148310
  }
148054
148311
  async function readReadmeIfPresent(packagePath) {
148055
148312
  try {
148056
- return await readFile23(path67.join(packagePath, "README.md"), "utf-8");
148313
+ return await readFile23(path74.join(packagePath, "README.md"), "utf-8");
148057
148314
  } catch {
148058
148315
  return void 0;
148059
148316
  }
@@ -148416,26 +148673,26 @@ function createUninstallHandler(deps) {
148416
148673
  }
148417
148674
 
148418
148675
  // ../../apps/server/src/services/marketplace-mcp/tool-create-package.ts
148419
- import path69 from "node:path";
148676
+ import path76 from "node:path";
148420
148677
  import { readFile as readFile24, writeFile as writeFile13 } from "node:fs/promises";
148421
148678
  import { z as z57 } from "zod";
148422
148679
 
148423
148680
  // ../marketplace/dist/scaffolder.js
148424
148681
  init_constants();
148425
148682
  init_package_types();
148426
- import { promises as fs35 } from "node:fs";
148427
- import path68 from "node:path";
148683
+ import { promises as fs42 } from "node:fs";
148684
+ import path75 from "node:path";
148428
148685
  async function createPackage(opts) {
148429
- const packagePath = path68.join(opts.parentDir, opts.name);
148686
+ const packagePath = path75.join(opts.parentDir, opts.name);
148430
148687
  try {
148431
- await fs35.access(packagePath);
148688
+ await fs42.access(packagePath);
148432
148689
  throw new Error(`Directory already exists: ${packagePath}`);
148433
148690
  } catch (err) {
148434
148691
  if (err.code !== "ENOENT")
148435
148692
  throw err;
148436
148693
  }
148437
- await fs35.mkdir(packagePath, { recursive: true });
148438
- await fs35.mkdir(path68.join(packagePath, ".dork"), { recursive: true });
148694
+ await fs42.mkdir(packagePath, { recursive: true });
148695
+ await fs42.mkdir(path75.join(packagePath, ".dork"), { recursive: true });
148439
148696
  const filesWritten = [];
148440
148697
  const baseManifest = {
148441
148698
  schemaVersion: 1,
@@ -148449,16 +148706,16 @@ async function createPackage(opts) {
148449
148706
  layers: defaultLayersForType(opts.type)
148450
148707
  };
148451
148708
  const manifest = opts.type === "adapter" ? { ...baseManifest, adapterType: opts.adapterType ?? opts.name } : baseManifest;
148452
- await fs35.writeFile(path68.join(packagePath, PACKAGE_MANIFEST_PATH), JSON.stringify(manifest, null, 2) + "\n", "utf-8");
148709
+ await fs42.writeFile(path75.join(packagePath, PACKAGE_MANIFEST_PATH), JSON.stringify(manifest, null, 2) + "\n", "utf-8");
148453
148710
  filesWritten.push(PACKAGE_MANIFEST_PATH);
148454
148711
  if (requiresClaudePlugin(opts.type)) {
148455
- await fs35.mkdir(path68.join(packagePath, ".claude-plugin"), { recursive: true });
148712
+ await fs42.mkdir(path75.join(packagePath, ".claude-plugin"), { recursive: true });
148456
148713
  const pluginManifest = {
148457
148714
  name: opts.name,
148458
148715
  version: "0.0.1",
148459
148716
  description: manifest.description
148460
148717
  };
148461
- await fs35.writeFile(path68.join(packagePath, CLAUDE_PLUGIN_MANIFEST_PATH), JSON.stringify(pluginManifest, null, 2) + "\n", "utf-8");
148718
+ await fs42.writeFile(path75.join(packagePath, CLAUDE_PLUGIN_MANIFEST_PATH), JSON.stringify(pluginManifest, null, 2) + "\n", "utf-8");
148462
148719
  filesWritten.push(CLAUDE_PLUGIN_MANIFEST_PATH);
148463
148720
  }
148464
148721
  const readme = `# ${opts.name}
@@ -148467,10 +148724,10 @@ ${manifest.description}
148467
148724
 
148468
148725
  Created with \`dorkos package init\`.
148469
148726
  `;
148470
- await fs35.writeFile(path68.join(packagePath, "README.md"), readme, "utf-8");
148727
+ await fs42.writeFile(path75.join(packagePath, "README.md"), readme, "utf-8");
148471
148728
  filesWritten.push("README.md");
148472
148729
  for (const dir of starterDirsForType(opts.type)) {
148473
- await fs35.mkdir(path68.join(packagePath, dir), { recursive: true });
148730
+ await fs42.mkdir(path75.join(packagePath, dir), { recursive: true });
148474
148731
  }
148475
148732
  return { packagePath, filesWritten };
148476
148733
  }
@@ -148553,7 +148810,7 @@ function createCreatePackageHandler(deps) {
148553
148810
  reason: confirmation.reason ?? "User declined package creation"
148554
148811
  });
148555
148812
  }
148556
- const packagesDir = path69.join(personalMarketplaceRoot(deps.dorkHome), "packages");
148813
+ const packagesDir = path76.join(personalMarketplaceRoot(deps.dorkHome), "packages");
148557
148814
  let result2;
148558
148815
  try {
148559
148816
  result2 = await createPackage({
@@ -148588,7 +148845,7 @@ function createCreatePackageHandler(deps) {
148588
148845
  };
148589
148846
  }
148590
148847
  async function registerInPersonalMarketplace(dorkHome, entry) {
148591
- const manifestPath = path69.join(personalMarketplaceRoot(dorkHome), "marketplace.json");
148848
+ const manifestPath = path76.join(personalMarketplaceRoot(dorkHome), "marketplace.json");
148592
148849
  const raw = await readFile24(manifestPath, "utf-8");
148593
148850
  const json = JSON.parse(raw);
148594
148851
  const plugins = json.plugins ?? [];
@@ -150483,8 +150740,8 @@ init_dork_home();
150483
150740
 
150484
150741
  // ../../apps/server/src/services/marketplace/telemetry-reporter.ts
150485
150742
  import { randomUUID as randomUUID11 } from "node:crypto";
150486
- import fs36 from "node:fs/promises";
150487
- import path70 from "node:path";
150743
+ import fs43 from "node:fs/promises";
150744
+ import path77 from "node:path";
150488
150745
  var TELEMETRY_ENDPOINT = "https://dorkos.ai/api/telemetry/install";
150489
150746
  var INSTALL_ID_FILENAME = "telemetry-install-id";
150490
150747
  function registerDorkosCommunityTelemetry(consent, dorkHome, dorkosVersion) {
@@ -150512,16 +150769,16 @@ function buildPayload(event, installId, dorkosVersion) {
150512
150769
  };
150513
150770
  }
150514
150771
  async function getOrCreateInstallId(dorkHome) {
150515
- const filePath = path70.join(dorkHome, INSTALL_ID_FILENAME);
150772
+ const filePath = path77.join(dorkHome, INSTALL_ID_FILENAME);
150516
150773
  try {
150517
- const existing = await fs36.readFile(filePath, "utf8");
150774
+ const existing = await fs43.readFile(filePath, "utf8");
150518
150775
  const trimmed = existing.trim();
150519
150776
  if (trimmed) return trimmed;
150520
150777
  } catch {
150521
150778
  }
150522
150779
  const id = randomUUID11();
150523
- await fs36.mkdir(dorkHome, { recursive: true });
150524
- await fs36.writeFile(filePath, id, "utf8");
150780
+ await fs43.mkdir(dorkHome, { recursive: true });
150781
+ await fs43.writeFile(filePath, id, "utf8");
150525
150782
  return id;
150526
150783
  }
150527
150784
 
@@ -150544,18 +150801,18 @@ async function start() {
150544
150801
  process.env.DORK_HOME = dorkHome;
150545
150802
  console.log(`[DorkOS] Data directory: ${dorkHome}`);
150546
150803
  const logLevel = env.DORKOS_LOG_LEVEL;
150547
- initLogger({ level: logLevel, logDir: path71.join(dorkHome, "logs") });
150804
+ initLogger({ level: logLevel, logDir: path78.join(dorkHome, "logs") });
150548
150805
  initConfigManager(dorkHome);
150549
150806
  const loggingConfig = configManager.get("logging");
150550
150807
  if (loggingConfig?.maxLogSizeKb || loggingConfig?.maxLogFiles) {
150551
150808
  initLogger({
150552
150809
  level: logLevel,
150553
- logDir: path71.join(dorkHome, "logs"),
150810
+ logDir: path78.join(dorkHome, "logs"),
150554
150811
  maxLogSize: (loggingConfig.maxLogSizeKb ?? 500) * 1024,
150555
150812
  maxLogFiles: loggingConfig.maxLogFiles ?? 14
150556
150813
  });
150557
150814
  }
150558
- const dbPath = path71.join(dorkHome, "dork.db");
150815
+ const dbPath = path78.join(dorkHome, "dork.db");
150559
150816
  const db = createDb(dbPath);
150560
150817
  runMigrations(db);
150561
150818
  logger.info(`[DB] Consolidated database ready at ${dbPath}`);
@@ -150625,7 +150882,7 @@ async function start() {
150625
150882
  // eslint-disable-next-line no-restricted-syntax -- Checking presence, not value: env.ts can't distinguish "unset" from "set to false"
150626
150883
  "DORKOS_RELAY_ENABLED" in process.env ? env.DORKOS_RELAY_ENABLED : relayConfig.enabled
150627
150884
  );
150628
- const relayDataDir = relayConfig.dataDir ?? path71.join(dorkHome, "relay");
150885
+ const relayDataDir = relayConfig.dataDir ?? path78.join(dorkHome, "relay");
150629
150886
  if (relayEnabled) {
150630
150887
  try {
150631
150888
  adapterRegistry = new AdapterRegistry();
@@ -150674,7 +150931,7 @@ async function start() {
150674
150931
  }
150675
150932
  if (relayEnabled && relayCore && adapterRegistry && traceStore) {
150676
150933
  try {
150677
- const adapterConfigPath = path71.join(dorkHome, "relay", "adapters.json");
150934
+ const adapterConfigPath = path78.join(dorkHome, "relay", "adapters.json");
150678
150935
  adapterManager = new AdapterManager(adapterRegistry, adapterConfigPath, {
150679
150936
  agentManager: runtimeRegistry.getDefault(),
150680
150937
  traceStore,
@@ -150771,17 +151028,17 @@ async function start() {
150771
151028
  if (taskFileWatcher) {
150772
151029
  const projectPath = meshCore.getProjectPath(agentId);
150773
151030
  if (projectPath) {
150774
- const agentTasksDir = path71.join(projectPath, ".dork", "tasks");
151031
+ const agentTasksDir = path78.join(projectPath, ".dork", "tasks");
150775
151032
  taskFileWatcher.stopWatching(agentTasksDir).catch(() => {
150776
151033
  });
150777
151034
  }
150778
151035
  }
150779
151036
  taskReconciler?.removeDirectory(
150780
- meshCore.getProjectPath(agentId) ? path71.join(meshCore.getProjectPath(agentId), ".dork", "tasks") : ""
151037
+ meshCore.getProjectPath(agentId) ? path78.join(meshCore.getProjectPath(agentId), ".dork", "tasks") : ""
150781
151038
  );
150782
151039
  });
150783
151040
  }
150784
- const globalTasksDir = path71.join(dorkHome, "tasks");
151041
+ const globalTasksDir = path78.join(dorkHome, "tasks");
150785
151042
  taskFileWatcher = new TaskFileWatcher(taskStore, () => {
150786
151043
  }, dorkHome);
150787
151044
  taskFileWatcher.watch(globalTasksDir, "global");
@@ -150791,7 +151048,7 @@ async function start() {
150791
151048
  for (const agent of meshCore.list()) {
150792
151049
  const projectPath = meshCore.getProjectPath(agent.id);
150793
151050
  if (projectPath) {
150794
- const agentTasksDir = path71.join(projectPath, ".dork", "tasks");
151051
+ const agentTasksDir = path78.join(projectPath, ".dork", "tasks");
150795
151052
  taskFileWatcher.watch(agentTasksDir, "project", projectPath, agent.id);
150796
151053
  taskReconciler.addDirectory(agentTasksDir, "project", projectPath, agent.id);
150797
151054
  }