@firfi/huly-mcp 0.13.0 → 0.14.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.
Files changed (3) hide show
  1. package/README.md +11 -3
  2. package/dist/index.cjs +1199 -594
  3. package/package.json +19 -32
package/dist/index.cjs CHANGED
@@ -23651,7 +23651,7 @@ var require_platform = __commonJS({
23651
23651
  getEmbeddedLabel: () => getEmbeddedLabel2,
23652
23652
  mergeIds: () => mergeIds,
23653
23653
  platformId: () => platformId,
23654
- plugin: () => plugin
23654
+ plugin: () => plugin2
23655
23655
  });
23656
23656
  module2.exports = __toCommonJS2(platform_exports);
23657
23657
  var _ID_SEPARATOR = ":";
@@ -23672,16 +23672,16 @@ var require_platform = __commonJS({
23672
23672
  return _EmbeddedId + _ID_SEPARATOR + _EmbeddedId + _ID_SEPARATOR + str;
23673
23673
  }
23674
23674
  __name(getEmbeddedLabel2, "getEmbeddedLabel");
23675
- function plugin(plugin2, namespace) {
23676
- return identify({}, plugin2, namespace);
23675
+ function plugin2(plugin22, namespace) {
23676
+ return identify({}, plugin22, namespace);
23677
23677
  }
23678
- __name(plugin, "plugin");
23679
- function mergeIds(plugin2, ns, merge10) {
23680
- return identify({ ...ns }, plugin2, merge10);
23678
+ __name(plugin2, "plugin");
23679
+ function mergeIds(plugin22, ns, merge10) {
23680
+ return identify({ ...ns }, plugin22, merge10);
23681
23681
  }
23682
23682
  __name(mergeIds, "mergeIds");
23683
23683
  var platformId = "platform";
23684
- var platform_default = plugin(platformId, {
23684
+ var platform_default = plugin2(platformId, {
23685
23685
  status: {
23686
23686
  OK: "",
23687
23687
  BadError: "",
@@ -23791,7 +23791,7 @@ var require_status = __commonJS({
23791
23791
  unknownStatus: () => unknownStatus
23792
23792
  });
23793
23793
  module2.exports = __toCommonJS2(status_exports);
23794
- var import_platform3 = __toESM2(require_platform());
23794
+ var import_platform4 = __toESM2(require_platform());
23795
23795
  var Severity = /* @__PURE__ */ ((Severity2) => {
23796
23796
  Severity2["OK"] = "OK";
23797
23797
  Severity2["INFO"] = "INFO";
@@ -23822,11 +23822,11 @@ var require_status = __commonJS({
23822
23822
  this.status = status;
23823
23823
  }
23824
23824
  };
23825
- var OK2 = new Status("OK", import_platform3.default.status.OK, {});
23826
- var ERROR = new Status("ERROR", import_platform3.default.status.BadError, {});
23827
- var UNAUTHORIZED = new Status("ERROR", import_platform3.default.status.Unauthorized, {});
23825
+ var OK2 = new Status("OK", import_platform4.default.status.OK, {});
23826
+ var ERROR = new Status("ERROR", import_platform4.default.status.BadError, {});
23827
+ var UNAUTHORIZED = new Status("ERROR", import_platform4.default.status.Unauthorized, {});
23828
23828
  function unknownStatus(message) {
23829
- return new Status("ERROR", import_platform3.default.status.UnknownError, { message });
23829
+ return new Status("ERROR", import_platform4.default.status.UnknownError, { message });
23830
23830
  }
23831
23831
  __name(unknownStatus, "unknownStatus");
23832
23832
  function unknownError(err) {
@@ -28103,16 +28103,16 @@ var require_ident = __commonJS({
28103
28103
  });
28104
28104
  module2.exports = __toCommonJS2(ident_exports);
28105
28105
  var import_status = require_status();
28106
- var import_platform3 = __toESM2(require_platform());
28106
+ var import_platform4 = __toESM2(require_platform());
28107
28107
  function _parseId(id) {
28108
- const path2 = id.split(import_platform3._ID_SEPARATOR);
28108
+ const path2 = id.split(import_platform4._ID_SEPARATOR);
28109
28109
  if (path2.length < 3) {
28110
- throw new import_status.PlatformError(new import_status.Status(import_status.Severity.ERROR, import_platform3.default.status.InvalidId, { id }));
28110
+ throw new import_status.PlatformError(new import_status.Status(import_status.Severity.ERROR, import_platform4.default.status.InvalidId, { id }));
28111
28111
  }
28112
28112
  return {
28113
28113
  component: path2[0],
28114
28114
  kind: path2[1],
28115
- name: path2.slice(2).join(import_platform3._ID_SEPARATOR)
28115
+ name: path2.slice(2).join(import_platform4._ID_SEPARATOR)
28116
28116
  };
28117
28117
  }
28118
28118
  __name(_parseId, "_parseId");
@@ -28216,43 +28216,43 @@ var require_i18n = __commonJS({
28216
28216
  var import_ident = require_ident();
28217
28217
  var import_status = require_status();
28218
28218
  var import_metadata = require_metadata();
28219
- var import_platform3 = __toESM2(require_platform());
28219
+ var import_platform4 = __toESM2(require_platform());
28220
28220
  var loaders = /* @__PURE__ */ new Map();
28221
28221
  var translations = /* @__PURE__ */ new Map();
28222
28222
  var cache = /* @__PURE__ */ new Map();
28223
28223
  var englishTranslationsForMissing = /* @__PURE__ */ new Map();
28224
- function addStringsLoader(plugin, loader) {
28225
- loaders.set(plugin, loader);
28224
+ function addStringsLoader(plugin2, loader) {
28225
+ loaders.set(plugin2, loader);
28226
28226
  }
28227
28227
  __name(addStringsLoader, "addStringsLoader");
28228
28228
  async function loadPluginStrings(locale, force = false) {
28229
28229
  if (force) {
28230
28230
  cache.clear();
28231
28231
  }
28232
- for (const [plugin] of loaders) {
28232
+ for (const [plugin2] of loaders) {
28233
28233
  const localtTanslations = translations.get(locale) ?? /* @__PURE__ */ new Map();
28234
28234
  if (!translations.has(locale)) {
28235
28235
  translations.set(locale, localtTanslations);
28236
28236
  }
28237
- let messages = localtTanslations.get(plugin);
28237
+ let messages = localtTanslations.get(plugin2);
28238
28238
  if (messages === void 0 || force) {
28239
- messages = await loadTranslationsForComponent(plugin, locale);
28240
- localtTanslations.set(plugin, messages);
28239
+ messages = await loadTranslationsForComponent(plugin2, locale);
28240
+ localtTanslations.set(plugin2, messages);
28241
28241
  }
28242
28242
  }
28243
28243
  }
28244
28244
  __name(loadPluginStrings, "loadPluginStrings");
28245
- async function loadTranslationsForComponent(plugin, locale) {
28246
- const loader = loaders.get(plugin);
28245
+ async function loadTranslationsForComponent(plugin2, locale) {
28246
+ const loader = loaders.get(plugin2);
28247
28247
  if (loader === void 0) {
28248
- const status = new import_status.Status(import_status.Severity.ERROR, import_platform3.default.status.NoLoaderForStrings, { plugin });
28248
+ const status = new import_status.Status(import_status.Severity.ERROR, import_platform4.default.status.NoLoaderForStrings, { plugin: plugin2 });
28249
28249
  await (0, import_event.setPlatformStatus)(status);
28250
28250
  return status;
28251
28251
  }
28252
28252
  try {
28253
28253
  return await loader(locale);
28254
28254
  } catch (err) {
28255
- console.error("No translations found for plugin", plugin, err);
28255
+ console.error("No translations found for plugin", plugin2, err);
28256
28256
  try {
28257
28257
  return await loader("en");
28258
28258
  } catch (err2) {
@@ -28321,7 +28321,7 @@ var require_i18n = __commonJS({
28321
28321
  }
28322
28322
  __name(getTranslation, "getTranslation");
28323
28323
  async function translate(message, params, language) {
28324
- const locale = language ?? (0, import_metadata.getMetadata)(import_platform3.default.metadata.locale) ?? "en";
28324
+ const locale = language ?? (0, import_metadata.getMetadata)(import_platform4.default.metadata.locale) ?? "en";
28325
28325
  const localCache = cache.get(locale) ?? /* @__PURE__ */ new Map();
28326
28326
  if (!cache.has(locale)) {
28327
28327
  cache.set(locale, localCache);
@@ -28335,7 +28335,7 @@ var require_i18n = __commonJS({
28335
28335
  } else {
28336
28336
  try {
28337
28337
  const id = (0, import_ident._parseId)(message);
28338
- if (id.component === import_platform3._EmbeddedId) {
28338
+ if (id.component === import_platform4._EmbeddedId) {
28339
28339
  return id.name;
28340
28340
  }
28341
28341
  const translation = getCachedTranslation(id, locale) ?? await getTranslation(id, locale) ?? message;
@@ -28356,7 +28356,7 @@ var require_i18n = __commonJS({
28356
28356
  }
28357
28357
  __name(translate, "translate");
28358
28358
  function translateCB(message, params, language, resolve2) {
28359
- const locale = language ?? (0, import_metadata.getMetadata)(import_platform3.default.metadata.locale) ?? "en";
28359
+ const locale = language ?? (0, import_metadata.getMetadata)(import_platform4.default.metadata.locale) ?? "en";
28360
28360
  const localCache = cache.get(locale) ?? /* @__PURE__ */ new Map();
28361
28361
  if (!cache.has(locale)) {
28362
28362
  cache.set(locale, localCache);
@@ -28372,7 +28372,7 @@ var require_i18n = __commonJS({
28372
28372
  let id;
28373
28373
  try {
28374
28374
  id = (0, import_ident._parseId)(message);
28375
- if (id.component === import_platform3._EmbeddedId) {
28375
+ if (id.component === import_platform4._EmbeddedId) {
28376
28376
  resolve2(id.name);
28377
28377
  return;
28378
28378
  }
@@ -28450,22 +28450,22 @@ var require_resource = __commonJS({
28450
28450
  var import_ident = require_ident();
28451
28451
  var import_status = require_status();
28452
28452
  var import_metadata = require_metadata();
28453
- var import_platform3 = __toESM2(require_platform());
28453
+ var import_platform4 = __toESM2(require_platform());
28454
28454
  var locations = /* @__PURE__ */ new Map();
28455
- function addLocation(plugin, module22) {
28456
- locations.set(plugin, module22);
28455
+ function addLocation(plugin2, module22) {
28456
+ locations.set(plugin2, module22);
28457
28457
  }
28458
28458
  __name(addLocation, "addLocation");
28459
28459
  function getPlugins() {
28460
28460
  return Array.from(locations.keys());
28461
28461
  }
28462
28462
  __name(getPlugins, "getPlugins");
28463
- function getLocation(plugin) {
28464
- const location = locations.get(plugin);
28463
+ function getLocation(plugin2) {
28464
+ const location = locations.get(plugin2);
28465
28465
  if (location === void 0) {
28466
28466
  throw new import_status.PlatformError(
28467
- new import_status.Status(import_status.Severity.ERROR, import_platform3.default.status.NoLocationForPlugin, {
28468
- plugin
28467
+ new import_status.Status(import_status.Severity.ERROR, import_platform4.default.status.NoLocationForPlugin, {
28468
+ plugin: plugin2
28469
28469
  })
28470
28470
  );
28471
28471
  }
@@ -28476,18 +28476,18 @@ var require_resource = __commonJS({
28476
28476
  function loadPlugin(id) {
28477
28477
  let pluginLoader = loading.get(id);
28478
28478
  if (pluginLoader === void 0) {
28479
- const status = new import_status.Status(import_status.Severity.INFO, import_platform3.default.status.LoadingPlugin, {
28479
+ const status = new import_status.Status(import_status.Severity.INFO, import_platform4.default.status.LoadingPlugin, {
28480
28480
  plugin: id
28481
28481
  });
28482
- const loadHelper = (0, import_metadata.getMetadata)(import_platform3.default.metadata.LoadHelper);
28482
+ const loadHelper = (0, import_metadata.getMetadata)(import_platform4.default.metadata.LoadHelper);
28483
28483
  const locationLoader = getLocation(id);
28484
28484
  pluginLoader = (0, import_event.monitor)(status, loadHelper !== void 0 ? loadHelper(locationLoader) : locationLoader()).then(
28485
- async (plugin) => {
28485
+ async (plugin2) => {
28486
28486
  try {
28487
- if (typeof plugin.default === "object") {
28488
- return await plugin.default.default();
28487
+ if (typeof plugin2.default === "object") {
28488
+ return await plugin2.default.default();
28489
28489
  }
28490
- return await plugin.default();
28490
+ return await plugin2.default();
28491
28491
  } catch (err) {
28492
28492
  console.error(err);
28493
28493
  throw err;
@@ -28513,7 +28513,7 @@ var require_resource = __commonJS({
28513
28513
  }
28514
28514
  const value3 = resources[info.kind]?.[info.name];
28515
28515
  if (value3 === void 0) {
28516
- throw new import_status.PlatformError(new import_status.Status(import_status.Severity.ERROR, import_platform3.default.status.ResourceNotFound, { resource }));
28516
+ throw new import_status.PlatformError(new import_status.Status(import_status.Severity.ERROR, import_platform4.default.status.ResourceNotFound, { resource }));
28517
28517
  }
28518
28518
  cachedResource.set(resource, value3);
28519
28519
  return value3;
@@ -28633,7 +28633,7 @@ var require_lib = __commonJS({
28633
28633
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
28634
28634
  var index_exports2 = {};
28635
28635
  __export2(index_exports2, {
28636
- default: () => import_platform3.default
28636
+ default: () => import_platform4.default
28637
28637
  });
28638
28638
  module2.exports = __toCommonJS2(index_exports2);
28639
28639
  __reExport2(index_exports2, require_event(), module2.exports);
@@ -28641,7 +28641,7 @@ var require_lib = __commonJS({
28641
28641
  __reExport2(index_exports2, require_metadata(), module2.exports);
28642
28642
  __reExport2(index_exports2, require_platform(), module2.exports);
28643
28643
  __reExport2(index_exports2, require_ident(), module2.exports);
28644
- var import_platform3 = __toESM2(require_platform());
28644
+ var import_platform4 = __toESM2(require_platform());
28645
28645
  __reExport2(index_exports2, require_resource(), module2.exports);
28646
28646
  __reExport2(index_exports2, require_status(), module2.exports);
28647
28647
  __reExport2(index_exports2, require_testUtils(), module2.exports);
@@ -28851,7 +28851,7 @@ var require_component = __commonJS({
28851
28851
  systemAccountUuid: () => systemAccountUuid
28852
28852
  });
28853
28853
  module2.exports = __toCommonJS2(component_exports);
28854
- var import_platform3 = require_lib();
28854
+ var import_platform4 = require_lib();
28855
28855
  var import_classes = require_classes();
28856
28856
  var coreId = "core";
28857
28857
  var systemAccountEmail = "anticrm@hc.engineering";
@@ -28865,7 +28865,7 @@ var require_component = __commonJS({
28865
28865
  };
28866
28866
  var configUserAccountUuid = "0d94731c-0787-4bcd-aefe-304efc3706b1";
28867
28867
  var readOnlyGuestAccountUuid = "83bbed9a-0867-4851-be32-31d49d1d42ce";
28868
- var component_default = (0, import_platform3.plugin)(coreId, {
28868
+ var component_default = (0, import_platform4.plugin)(coreId, {
28869
28869
  class: {
28870
28870
  Obj: "",
28871
28871
  Doc: "",
@@ -29106,7 +29106,7 @@ var require_lib2 = __commonJS({
29106
29106
  providers: () => providers
29107
29107
  });
29108
29108
  module2.exports = __toCommonJS2(index_exports2);
29109
- var import_platform3 = require_lib();
29109
+ var import_platform4 = require_lib();
29110
29110
  var providers = [];
29111
29111
  var Analytics = {
29112
29112
  data: {},
@@ -29157,9 +29157,9 @@ var require_lib2 = __commonJS({
29157
29157
  });
29158
29158
  }
29159
29159
  };
29160
- (0, import_platform3.addEventListener)(import_platform3.PlatformEvent, async (_event, _status) => {
29161
- if (_status.severity === import_platform3.Severity.ERROR) {
29162
- const label = await (0, import_platform3.translate)(_status.code, _status.params, "en");
29160
+ (0, import_platform4.addEventListener)(import_platform4.PlatformEvent, async (_event, _status) => {
29161
+ if (_status.severity === import_platform4.Severity.ERROR) {
29162
+ const label = await (0, import_platform4.translate)(_status.code, _status.params, "en");
29163
29163
  Analytics.handleError(new Error(label));
29164
29164
  }
29165
29165
  });
@@ -29313,7 +29313,7 @@ var require_proxy = __commonJS({
29313
29313
  freeze: () => freeze
29314
29314
  });
29315
29315
  module2.exports = __toCommonJS2(proxy_exports);
29316
- var import_platform3 = require_lib();
29316
+ var import_platform4 = require_lib();
29317
29317
  var PROXY_TARGET_KEY = "$___proxy_target";
29318
29318
  var PROXY_MIXIN_CLASS_KEY = "$__mixin";
29319
29319
  function _createMixinProxy(mixin, ancestorProxy) {
@@ -29340,10 +29340,10 @@ var require_proxy = __commonJS({
29340
29340
  return value3.map((it) => freeze(it));
29341
29341
  }
29342
29342
  if (value3 instanceof Map) {
29343
- throw new import_platform3.PlatformError((0, import_platform3.unknownError)("Map is not allowed in model"));
29343
+ throw new import_platform4.PlatformError((0, import_platform4.unknownError)("Map is not allowed in model"));
29344
29344
  }
29345
29345
  if (value3 instanceof Set) {
29346
- throw new import_platform3.PlatformError((0, import_platform3.unknownError)("Set is not allowed in model"));
29346
+ throw new import_platform4.PlatformError((0, import_platform4.unknownError)("Set is not allowed in model"));
29347
29347
  }
29348
29348
  return new Proxy(value3, _createFreezeProxy(value3));
29349
29349
  }
@@ -29357,16 +29357,16 @@ var require_proxy = __commonJS({
29357
29357
  return freeze(value3);
29358
29358
  },
29359
29359
  set(target, p, newValue, receiver) {
29360
- throw new import_platform3.PlatformError((0, import_platform3.unknownError)("Modification is not allowed"));
29360
+ throw new import_platform4.PlatformError((0, import_platform4.unknownError)("Modification is not allowed"));
29361
29361
  },
29362
29362
  defineProperty(target, property2, attributes) {
29363
- throw new import_platform3.PlatformError((0, import_platform3.unknownError)("Modification is not allowed"));
29363
+ throw new import_platform4.PlatformError((0, import_platform4.unknownError)("Modification is not allowed"));
29364
29364
  },
29365
29365
  deleteProperty(target, p) {
29366
- throw new import_platform3.PlatformError((0, import_platform3.unknownError)("Modification is not allowed"));
29366
+ throw new import_platform4.PlatformError((0, import_platform4.unknownError)("Modification is not allowed"));
29367
29367
  },
29368
29368
  setPrototypeOf(target, v) {
29369
- throw new import_platform3.PlatformError((0, import_platform3.unknownError)("Modification is not allowed"));
29369
+ throw new import_platform4.PlatformError((0, import_platform4.unknownError)("Modification is not allowed"));
29370
29370
  }
29371
29371
  };
29372
29372
  }
@@ -29424,7 +29424,7 @@ var require_objvalue = __commonJS({
29424
29424
  setObjectValue: () => setObjectValue
29425
29425
  });
29426
29426
  module2.exports = __toCommonJS2(objvalue_exports);
29427
- var import_platform3 = require_lib();
29427
+ var import_platform4 = require_lib();
29428
29428
  var import_clone2 = require_clone();
29429
29429
  var import_component = __toESM2(require_component());
29430
29430
  function getObjectValue(key, doc) {
@@ -29456,7 +29456,7 @@ var require_objvalue = __commonJS({
29456
29456
  let value3 = doc;
29457
29457
  for (const d of dots) {
29458
29458
  if (Array.isArray(value3) && isNestedArrayQuery(value3, d)) {
29459
- throw new import_platform3.PlatformError(new import_platform3.Status(import_platform3.Severity.ERROR, import_component.default.status.ObjectNotFound, { _id: "dots" }));
29459
+ throw new import_platform4.PlatformError(new import_platform4.Status(import_platform4.Severity.ERROR, import_component.default.status.ObjectNotFound, { _id: "dots" }));
29460
29460
  }
29461
29461
  const lvalue = value3?.[d];
29462
29462
  if (lvalue === void 0) {
@@ -31077,7 +31077,7 @@ var require_utils2 = __commonJS({
31077
31077
  uniqueNotEmpty: () => uniqueNotEmpty
31078
31078
  });
31079
31079
  module2.exports = __toCommonJS2(utils_exports);
31080
- var import_platform3 = require_lib();
31080
+ var import_platform4 = require_lib();
31081
31081
  var import_fast_equals = require_cjs();
31082
31082
  var import_benchmark = require_benchmark();
31083
31083
  var import_classes = require_classes();
@@ -31441,13 +31441,13 @@ var require_utils2 = __commonJS({
31441
31441
  return typeof token === "string" && Object.values(e).includes(token);
31442
31442
  }, "isEnum");
31443
31443
  async function checkPermission(client, _id, _space, space) {
31444
- const arePermissionsDisabled = (0, import_platform3.getMetadata)(import_component.default.metadata.DisablePermissions) ?? false;
31444
+ const arePermissionsDisabled = (0, import_platform4.getMetadata)(import_component.default.metadata.DisablePermissions) ?? false;
31445
31445
  if (arePermissionsDisabled) return true;
31446
31446
  return await hasPermission(client, _id, _space, space);
31447
31447
  }
31448
31448
  __name(checkPermission, "checkPermission");
31449
31449
  async function checkForbiddenPermission(client, _id, _space, space) {
31450
- const arePermissionsDisabled = (0, import_platform3.getMetadata)(import_component.default.metadata.DisablePermissions) ?? false;
31450
+ const arePermissionsDisabled = (0, import_platform4.getMetadata)(import_component.default.metadata.DisablePermissions) ?? false;
31451
31451
  if (arePermissionsDisabled) return false;
31452
31452
  return await hasPermission(client, _id, _space, space);
31453
31453
  }
@@ -31470,7 +31470,7 @@ var require_utils2 = __commonJS({
31470
31470
  }
31471
31471
  __name(hasPermission, "hasPermission");
31472
31472
  function getRoleAttributeLabel(roleName) {
31473
- return (0, import_platform3.getEmbeddedLabel)(`Role: ${roleName.trim()}`);
31473
+ return (0, import_platform4.getEmbeddedLabel)(`Role: ${roleName.trim()}`);
31474
31474
  }
31475
31475
  __name(getRoleAttributeLabel, "getRoleAttributeLabel");
31476
31476
  function getFullTextIndexableAttributes(hierarchy, clazz, skipDocs = false) {
@@ -32862,7 +32862,7 @@ var require_memdb = __commonJS({
32862
32862
  TxDb: () => TxDb
32863
32863
  });
32864
32864
  module2.exports = __toCommonJS2(memdb_exports);
32865
- var import_platform3 = require_lib();
32865
+ var import_platform4 = require_lib();
32866
32866
  var import__ = require_lib4();
32867
32867
  var import_component = __toESM2(require_component());
32868
32868
  var import_query = require_query();
@@ -32910,7 +32910,7 @@ var require_memdb = __commonJS({
32910
32910
  getObject(_id) {
32911
32911
  const doc = this.objectById.get(_id);
32912
32912
  if (doc === void 0) {
32913
- throw new import_platform3.PlatformError(new import_platform3.Status(import_platform3.Severity.ERROR, import_component.default.status.ObjectNotFound, { _id }));
32913
+ throw new import_platform4.PlatformError(new import_platform4.Status(import_platform4.Severity.ERROR, import_component.default.status.ObjectNotFound, { _id }));
32914
32914
  }
32915
32915
  return doc;
32916
32916
  }
@@ -33055,7 +33055,7 @@ var require_memdb = __commonJS({
33055
33055
  delDoc(_id) {
33056
33056
  const doc = this.objectById.get(_id);
33057
33057
  if (doc === void 0) {
33058
- throw new import_platform3.PlatformError(new import_platform3.Status(import_platform3.Severity.ERROR, import_component.default.status.ObjectNotFound, { _id }));
33058
+ throw new import_platform4.PlatformError(new import_platform4.Status(import_platform4.Severity.ERROR, import_component.default.status.ObjectNotFound, { _id }));
33059
33059
  }
33060
33060
  this.objectById.delete(_id);
33061
33061
  this.hierarchy.getAncestors(doc._class).forEach((_class) => {
@@ -34077,15 +34077,15 @@ var require_storage = __commonJS({
34077
34077
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
34078
34078
  var storage_exports = {};
34079
34079
  __export2(storage_exports, {
34080
- SortingOrder: () => SortingOrder30,
34080
+ SortingOrder: () => SortingOrder31,
34081
34081
  shouldShowArchived: () => shouldShowArchived
34082
34082
  });
34083
34083
  module2.exports = __toCommonJS2(storage_exports);
34084
- var SortingOrder30 = /* @__PURE__ */ ((SortingOrder210) => {
34084
+ var SortingOrder31 = /* @__PURE__ */ ((SortingOrder210) => {
34085
34085
  SortingOrder210[SortingOrder210["Ascending"] = 1] = "Ascending";
34086
34086
  SortingOrder210[SortingOrder210["Descending"] = -1] = "Descending";
34087
34087
  return SortingOrder210;
34088
- })(SortingOrder30 || {});
34088
+ })(SortingOrder31 || {});
34089
34089
  function shouldShowArchived(query, options) {
34090
34090
  if (options?.showArchived !== void 0) {
34091
34091
  return options.showArchived;
@@ -34588,8 +34588,8 @@ var require_client3 = __commonJS({
34588
34588
  getClient: () => getClient
34589
34589
  });
34590
34590
  module2.exports = __toCommonJS2(client_exports);
34591
- var import_core51 = require_lib4();
34592
- var import_platform3 = __toESM2(require_lib());
34591
+ var import_core52 = require_lib4();
34592
+ var import_platform4 = __toESM2(require_lib());
34593
34593
  var import_utils14 = require_utils3();
34594
34594
  function getClient(accountsUrl, token, retryTimeoutMs) {
34595
34595
  if (accountsUrl === void 0) {
@@ -34624,7 +34624,7 @@ var require_client3 = __commonJS({
34624
34624
  rpc;
34625
34625
  async getProviders() {
34626
34626
  return await withRetryUntilMaxAttempts(async () => {
34627
- const response = await fetch((0, import_core51.concatLink)(this.url, "/providers"));
34627
+ const response = await fetch((0, import_core52.concatLink)(this.url, "/providers"));
34628
34628
  return await response.json();
34629
34629
  })();
34630
34630
  }
@@ -34644,13 +34644,13 @@ var require_client3 = __commonJS({
34644
34644
  });
34645
34645
  const result = await response.json();
34646
34646
  if (result.error != null) {
34647
- throw new import_platform3.PlatformError(result.error);
34647
+ throw new import_platform4.PlatformError(result.error);
34648
34648
  }
34649
34649
  return result.result;
34650
34650
  }
34651
34651
  flattenStatus(ws) {
34652
34652
  if (ws === void 0) {
34653
- throw new import_platform3.PlatformError(new import_platform3.Status(import_platform3.Severity.ERROR, import_platform3.default.status.WorkspaceNotFound, {}));
34653
+ throw new import_platform4.PlatformError(new import_platform4.Status(import_platform4.Severity.ERROR, import_platform4.default.status.WorkspaceNotFound, {}));
34654
34654
  }
34655
34655
  const status = ws.status;
34656
34656
  if (status === void 0) {
@@ -35279,22 +35279,22 @@ var require_client3 = __commonJS({
35279
35279
  await this.rpc(request2);
35280
35280
  }
35281
35281
  async setCookie() {
35282
- const url4 = (0, import_core51.concatLink)(this.url, "/cookie");
35282
+ const url4 = (0, import_core52.concatLink)(this.url, "/cookie");
35283
35283
  const response = await fetch(url4, { ...this.request, method: "PUT" });
35284
35284
  if (!response.ok) {
35285
35285
  const result = await response.json();
35286
35286
  if (result.error != null) {
35287
- throw new import_platform3.PlatformError(result.error);
35287
+ throw new import_platform4.PlatformError(result.error);
35288
35288
  }
35289
35289
  }
35290
35290
  }
35291
35291
  async deleteCookie() {
35292
- const url4 = (0, import_core51.concatLink)(this.url, "/cookie");
35292
+ const url4 = (0, import_core52.concatLink)(this.url, "/cookie");
35293
35293
  const response = await fetch(url4, { ...this.request, method: "DELETE" });
35294
35294
  if (!response.ok) {
35295
35295
  const result = await response.json();
35296
35296
  if (result.error != null) {
35297
- throw new import_platform3.PlatformError(result.error);
35297
+ throw new import_platform4.PlatformError(result.error);
35298
35298
  }
35299
35299
  }
35300
35300
  }
@@ -35512,7 +35512,7 @@ var require_lib6 = __commonJS({
35512
35512
  pongConst: () => pongConst
35513
35513
  });
35514
35514
  module2.exports = __toCommonJS2(index_exports2);
35515
- var import_platform3 = require_lib();
35515
+ var import_platform4 = require_lib();
35516
35516
  var clientId = "client";
35517
35517
  var ClientSocketReadyState = /* @__PURE__ */ ((ClientSocketReadyState2) => {
35518
35518
  ClientSocketReadyState2[ClientSocketReadyState2["CONNECTING"] = 0] = "CONNECTING";
@@ -35523,7 +35523,7 @@ var require_lib6 = __commonJS({
35523
35523
  })(ClientSocketReadyState || {});
35524
35524
  var pingConst = "ping";
35525
35525
  var pongConst = "pong!";
35526
- var index_default = (0, import_platform3.plugin)(clientId, {
35526
+ var index_default = (0, import_platform4.plugin)(clientId, {
35527
35527
  metadata: {
35528
35528
  ClientSocketFactory: "",
35529
35529
  FilterModel: "",
@@ -35568,9 +35568,9 @@ var require_config = __commonJS({
35568
35568
  loadServerConfig: () => loadServerConfig2
35569
35569
  });
35570
35570
  module2.exports = __toCommonJS2(config_exports3);
35571
- var import_core51 = require_lib4();
35571
+ var import_core52 = require_lib4();
35572
35572
  async function loadServerConfig2(url4) {
35573
- const configUrl = (0, import_core51.concatLink)(url4, "/config.json");
35573
+ const configUrl = (0, import_core52.concatLink)(url4, "/config.json");
35574
35574
  const res = await fetch(configUrl, { keepalive: true });
35575
35575
  if (res.ok) {
35576
35576
  return await res.json();
@@ -35656,7 +35656,7 @@ var require_client4 = __commonJS({
35656
35656
  getClient: () => getClient
35657
35657
  });
35658
35658
  module2.exports = __toCommonJS2(client_exports);
35659
- var import_core51 = require_lib4();
35659
+ var import_core52 = require_lib4();
35660
35660
  var import_utils14 = require_utils4();
35661
35661
  function getClient(workspaceId, token, collaboratorUrl) {
35662
35662
  const url4 = collaboratorUrl.replaceAll("wss://", "https://").replace("ws://", "http://");
@@ -35675,7 +35675,7 @@ var require_client4 = __commonJS({
35675
35675
  async rpc(document2, method, payload) {
35676
35676
  const workspace = this.workspace;
35677
35677
  const documentId = (0, import_utils14.encodeDocumentId)(workspace, document2);
35678
- const url4 = (0, import_core51.concatLink)(this.collaboratorUrl, `/rpc/${encodeURIComponent(documentId)}`);
35678
+ const url4 = (0, import_core52.concatLink)(this.collaboratorUrl, `/rpc/${encodeURIComponent(documentId)}`);
35679
35679
  const res = await fetch(url4, {
35680
35680
  method: "POST",
35681
35681
  headers: {
@@ -41617,11 +41617,11 @@ var require_dist4 = __commonJS({
41617
41617
  this.plugins = [];
41618
41618
  this.pluginsByKey = /* @__PURE__ */ Object.create(null);
41619
41619
  this.fields = baseFields.slice();
41620
- if (plugins) plugins.forEach(function(plugin) {
41621
- if (_this3.pluginsByKey[plugin.key]) throw new RangeError("Adding different instances of a keyed plugin (" + plugin.key + ")");
41622
- _this3.plugins.push(plugin);
41623
- _this3.pluginsByKey[plugin.key] = plugin;
41624
- if (plugin.spec.state) _this3.fields.push(new FieldDesc(plugin.key, plugin.spec.state, plugin));
41620
+ if (plugins) plugins.forEach(function(plugin2) {
41621
+ if (_this3.pluginsByKey[plugin2.key]) throw new RangeError("Adding different instances of a keyed plugin (" + plugin2.key + ")");
41622
+ _this3.plugins.push(plugin2);
41623
+ _this3.pluginsByKey[plugin2.key] = plugin2;
41624
+ if (plugin2.spec.state) _this3.fields.push(new FieldDesc(plugin2.key, plugin2.spec.state, plugin2));
41625
41625
  });
41626
41626
  });
41627
41627
  var EditorState = (function() {
@@ -41649,8 +41649,8 @@ var require_dist4 = __commonJS({
41649
41649
  value: function filterTransaction(tr) {
41650
41650
  var ignore3 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : -1;
41651
41651
  for (var i = 0; i < this.config.plugins.length; i++) if (i != ignore3) {
41652
- var plugin = this.config.plugins[i];
41653
- if (plugin.spec.filterTransaction && !plugin.spec.filterTransaction.call(plugin, tr, this)) return false;
41652
+ var plugin2 = this.config.plugins[i];
41653
+ if (plugin2.spec.filterTransaction && !plugin2.spec.filterTransaction.call(plugin2, tr, this)) return false;
41654
41654
  }
41655
41655
  return true;
41656
41656
  }
@@ -41665,10 +41665,10 @@ var require_dist4 = __commonJS({
41665
41665
  for (; ; ) {
41666
41666
  var haveNew = false;
41667
41667
  for (var i = 0; i < this.config.plugins.length; i++) {
41668
- var plugin = this.config.plugins[i];
41669
- if (plugin.spec.appendTransaction) {
41668
+ var plugin2 = this.config.plugins[i];
41669
+ if (plugin2.spec.appendTransaction) {
41670
41670
  var n = seen ? seen[i].n : 0, oldState = seen ? seen[i].state : this;
41671
- var tr = n < trs.length && plugin.spec.appendTransaction.call(plugin, n ? trs.slice(n) : trs, oldState, newState);
41671
+ var tr = n < trs.length && plugin2.spec.appendTransaction.call(plugin2, n ? trs.slice(n) : trs, oldState, newState);
41672
41672
  if (tr && newState.filterTransaction(tr, i)) {
41673
41673
  tr.setMeta("appendedTransaction", rootTr);
41674
41674
  if (!seen) {
@@ -41736,8 +41736,8 @@ var require_dist4 = __commonJS({
41736
41736
  });
41737
41737
  if (pluginFields && _typeof(pluginFields) == "object") for (var prop in pluginFields) {
41738
41738
  if (prop == "doc" || prop == "selection") throw new RangeError("The JSON fields `doc` and `selection` are reserved");
41739
- var plugin = pluginFields[prop], state = plugin.spec.state;
41740
- if (state && state.toJSON) result[prop] = state.toJSON.call(plugin, this[plugin.key]);
41739
+ var plugin2 = pluginFields[prop], state = plugin2.spec.state;
41740
+ if (state && state.toJSON) result[prop] = state.toJSON.call(plugin2, this[plugin2.key]);
41741
41741
  }
41742
41742
  return result;
41743
41743
  }
@@ -41765,9 +41765,9 @@ var require_dist4 = __commonJS({
41765
41765
  if (json3.storedMarks) instance.storedMarks = json3.storedMarks.map(config3.schema.markFromJSON);
41766
41766
  } else {
41767
41767
  if (pluginFields) for (var prop in pluginFields) {
41768
- var plugin = pluginFields[prop], state = plugin.spec.state;
41769
- if (plugin.key == field.name && state && state.fromJSON && Object.prototype.hasOwnProperty.call(json3, prop)) {
41770
- instance[field.name] = state.fromJSON.call(plugin, config3, json3[prop], instance);
41768
+ var plugin2 = pluginFields[prop], state = plugin2.spec.state;
41769
+ if (plugin2.key == field.name && state && state.fromJSON && Object.prototype.hasOwnProperty.call(json3, prop)) {
41770
+ instance[field.name] = state.fromJSON.call(plugin2, config3, json3[prop], instance);
41771
41771
  return;
41772
41772
  }
41773
41773
  }
@@ -47008,8 +47008,8 @@ var require_dist6 = __commonJS({
47008
47008
  this.prevDirectPlugins = this.directPlugins;
47009
47009
  this.destroyPluginViews();
47010
47010
  for (var i = 0; i < this.directPlugins.length; i++) {
47011
- var plugin = this.directPlugins[i];
47012
- if (plugin.spec.view) this.pluginViews.push(plugin.spec.view(this));
47011
+ var plugin2 = this.directPlugins[i];
47012
+ if (plugin2.spec.view) this.pluginViews.push(plugin2.spec.view(this));
47013
47013
  }
47014
47014
  for (var _i18 = 0; _i18 < this.state.plugins.length; _i18++) {
47015
47015
  var _plugin = this.state.plugins[_i18];
@@ -47262,8 +47262,8 @@ var require_dist6 = __commonJS({
47262
47262
  for (var _ in b) nB++;
47263
47263
  return nA != nB;
47264
47264
  }
47265
- function checkStateComponent(plugin) {
47266
- if (plugin.spec.state || plugin.spec.filterTransaction || plugin.spec.appendTransaction) throw new RangeError("Plugins passed directly to the view must not have a state component");
47265
+ function checkStateComponent(plugin2) {
47266
+ if (plugin2.spec.state || plugin2.spec.filterTransaction || plugin2.spec.appendTransaction) throw new RangeError("Plugins passed directly to the view must not have a state component");
47267
47267
  }
47268
47268
  exports2.Decoration = Decoration;
47269
47269
  exports2.DecorationSet = DecorationSet;
@@ -48984,7 +48984,7 @@ var require_dist16 = __commonJS({
48984
48984
  };
48985
48985
  function run$1(config3) {
48986
48986
  var _a2;
48987
- const { editor, from, to, text, rules, plugin } = config3;
48987
+ const { editor, from, to, text, rules, plugin: plugin2 } = config3;
48988
48988
  const { view: view2 } = editor;
48989
48989
  if (view2.composing) {
48990
48990
  return false;
@@ -49030,7 +49030,7 @@ var require_dist16 = __commonJS({
49030
49030
  if (handler === null || !tr.steps.length) {
49031
49031
  return;
49032
49032
  }
49033
- tr.setMeta(plugin, {
49033
+ tr.setMeta(plugin2, {
49034
49034
  transform: tr,
49035
49035
  from,
49036
49036
  to,
@@ -49043,13 +49043,13 @@ var require_dist16 = __commonJS({
49043
49043
  }
49044
49044
  function inputRulesPlugin(props) {
49045
49045
  const { editor, rules } = props;
49046
- const plugin = new state.Plugin({
49046
+ const plugin2 = new state.Plugin({
49047
49047
  state: {
49048
49048
  init() {
49049
49049
  return null;
49050
49050
  },
49051
49051
  apply(tr, prev, state2) {
49052
- const stored = tr.getMeta(plugin);
49052
+ const stored = tr.getMeta(plugin2);
49053
49053
  if (stored) {
49054
49054
  return stored;
49055
49055
  }
@@ -49071,7 +49071,7 @@ var require_dist16 = __commonJS({
49071
49071
  to,
49072
49072
  text,
49073
49073
  rules,
49074
- plugin
49074
+ plugin: plugin2
49075
49075
  });
49076
49076
  });
49077
49077
  }
@@ -49086,7 +49086,7 @@ var require_dist16 = __commonJS({
49086
49086
  to,
49087
49087
  text,
49088
49088
  rules,
49089
- plugin
49089
+ plugin: plugin2
49090
49090
  });
49091
49091
  },
49092
49092
  handleDOMEvents: {
@@ -49100,7 +49100,7 @@ var require_dist16 = __commonJS({
49100
49100
  to: $cursor.pos,
49101
49101
  text: "",
49102
49102
  rules,
49103
- plugin
49103
+ plugin: plugin2
49104
49104
  });
49105
49105
  }
49106
49106
  });
@@ -49121,7 +49121,7 @@ var require_dist16 = __commonJS({
49121
49121
  to: $cursor.pos,
49122
49122
  text: "\n",
49123
49123
  rules,
49124
- plugin
49124
+ plugin: plugin2
49125
49125
  });
49126
49126
  }
49127
49127
  return false;
@@ -49130,7 +49130,7 @@ var require_dist16 = __commonJS({
49130
49130
  // @ts-ignore
49131
49131
  isInputRules: true
49132
49132
  });
49133
- return plugin;
49133
+ return plugin2;
49134
49134
  }
49135
49135
  function getType(value3) {
49136
49136
  return Object.prototype.toString.call(value3).slice(8, -1);
@@ -51446,9 +51446,9 @@ var require_dist16 = __commonJS({
51446
51446
  var undoInputRule = () => ({ state: state2, dispatch }) => {
51447
51447
  const plugins = state2.plugins;
51448
51448
  for (let i = 0; i < plugins.length; i += 1) {
51449
- const plugin = plugins[i];
51449
+ const plugin2 = plugins[i];
51450
51450
  let undoable;
51451
- if (plugin.spec.isInputRules && (undoable = plugin.getState(state2))) {
51451
+ if (plugin2.spec.isInputRules && (undoable = plugin2.getState(state2))) {
51452
51452
  if (dispatch) {
51453
51453
  const tr = state2.tr;
51454
51454
  const toUndo = undoable.transform;
@@ -52289,8 +52289,8 @@ img.ProseMirror-separator {
52289
52289
  * @param handlePlugins Control how to merge the plugin into the existing plugins.
52290
52290
  * @returns The new editor state
52291
52291
  */
52292
- registerPlugin(plugin, handlePlugins) {
52293
- const plugins = isFunction4(handlePlugins) ? handlePlugins(plugin, [...this.state.plugins]) : [...this.state.plugins, plugin];
52292
+ registerPlugin(plugin2, handlePlugins) {
52293
+ const plugins = isFunction4(handlePlugins) ? handlePlugins(plugin2, [...this.state.plugins]) : [...this.state.plugins, plugin2];
52294
52294
  const state2 = this.state.reconfigure({ plugins });
52295
52295
  this.view.updateState(state2);
52296
52296
  return state2;
@@ -52309,7 +52309,7 @@ img.ProseMirror-separator {
52309
52309
  let plugins = prevPlugins;
52310
52310
  [].concat(nameOrPluginKeyToRemove).forEach((nameOrPluginKey) => {
52311
52311
  const name = typeof nameOrPluginKey === "string" ? `${nameOrPluginKey}$` : nameOrPluginKey.key;
52312
- plugins = plugins.filter((plugin) => !plugin.key.startsWith(name));
52312
+ plugins = plugins.filter((plugin2) => !plugin2.key.startsWith(name));
52313
52313
  });
52314
52314
  if (prevPlugins.length === plugins.length) {
52315
52315
  return void 0;
@@ -53242,9 +53242,9 @@ var require_image = __commonJS({
53242
53242
  ImageNode: () => ImageNode
53243
53243
  });
53244
53244
  module2.exports = __toCommonJS2(image_exports);
53245
- var import_core51 = require_dist16();
53245
+ var import_core52 = require_dist16();
53246
53246
  var import_utils14 = require_utils5();
53247
- var ImageNode = import_core51.Node.create({
53247
+ var ImageNode = import_core52.Node.create({
53248
53248
  name: "image",
53249
53249
  addOptions() {
53250
53250
  return {
@@ -53303,7 +53303,7 @@ var require_image = __commonJS({
53303
53303
  "data-type": this.name,
53304
53304
  "data-align": node.attrs.align
53305
53305
  };
53306
- const imgAttributes = (0, import_core51.mergeAttributes)(
53306
+ const imgAttributes = (0, import_core52.mergeAttributes)(
53307
53307
  {
53308
53308
  "data-type": this.name
53309
53309
  },
@@ -53347,9 +53347,9 @@ var require_reference = __commonJS({
53347
53347
  ReferenceNode: () => ReferenceNode
53348
53348
  });
53349
53349
  module2.exports = __toCommonJS2(reference_exports);
53350
- var import_core51 = require_dist16();
53350
+ var import_core52 = require_dist16();
53351
53351
  var import_utils14 = require_utils5();
53352
- var ReferenceNode = import_core51.Node.create({
53352
+ var ReferenceNode = import_core52.Node.create({
53353
53353
  name: "reference",
53354
53354
  group: "inline",
53355
53355
  inline: true,
@@ -53384,7 +53384,7 @@ var require_reference = __commonJS({
53384
53384
  renderHTML({ node, HTMLAttributes }) {
53385
53385
  return [
53386
53386
  "span",
53387
- (0, import_core51.mergeAttributes)(
53387
+ (0, import_core52.mergeAttributes)(
53388
53388
  {
53389
53389
  "data-type": this.name,
53390
53390
  "data-id": node.attrs.id,
@@ -53443,8 +53443,8 @@ var require_emoji = __commonJS({
53443
53443
  EmojiNode: () => EmojiNode
53444
53444
  });
53445
53445
  module2.exports = __toCommonJS2(emoji_exports);
53446
- var import_core51 = require_dist16();
53447
- var EmojiNode = import_core51.Node.create({
53446
+ var import_core52 = require_dist16();
53447
+ var EmojiNode = import_core52.Node.create({
53448
53448
  name: "emoji",
53449
53449
  group: "inline",
53450
53450
  inline: true,
@@ -53484,7 +53484,7 @@ var require_emoji = __commonJS({
53484
53484
  addNodeView() {
53485
53485
  return ({ node, HTMLAttributes }) => {
53486
53486
  const container = document.createElement("span");
53487
- const containerAttributes = (0, import_core51.mergeAttributes)(
53487
+ const containerAttributes = (0, import_core52.mergeAttributes)(
53488
53488
  {
53489
53489
  "data-type": this.name,
53490
53490
  class: "emoji"
@@ -53517,7 +53517,7 @@ var require_emoji = __commonJS({
53517
53517
  if (node.attrs.kind === "image") {
53518
53518
  return [
53519
53519
  "span",
53520
- (0, import_core51.mergeAttributes)(
53520
+ (0, import_core52.mergeAttributes)(
53521
53521
  {
53522
53522
  "data-type": this.name,
53523
53523
  class: "emoji"
@@ -53526,7 +53526,7 @@ var require_emoji = __commonJS({
53526
53526
  ),
53527
53527
  [
53528
53528
  "img",
53529
- (0, import_core51.mergeAttributes)({
53529
+ (0, import_core52.mergeAttributes)({
53530
53530
  "data-type": this.name,
53531
53531
  src: node.attrs.image,
53532
53532
  alt: node.attrs.emoji
@@ -53536,7 +53536,7 @@ var require_emoji = __commonJS({
53536
53536
  }
53537
53537
  return [
53538
53538
  "span",
53539
- (0, import_core51.mergeAttributes)(
53539
+ (0, import_core52.mergeAttributes)(
53540
53540
  {
53541
53541
  "data-type": this.name,
53542
53542
  class: "emoji"
@@ -53844,8 +53844,8 @@ var require_file = __commonJS({
53844
53844
  FileNode: () => FileNode
53845
53845
  });
53846
53846
  module2.exports = __toCommonJS2(file_exports);
53847
- var import_core51 = require_dist16();
53848
- var FileNode = import_core51.Node.create({
53847
+ var import_core52 = require_dist16();
53848
+ var FileNode = import_core52.Node.create({
53849
53849
  name: "file",
53850
53850
  addOptions() {
53851
53851
  return {
@@ -54155,7 +54155,7 @@ var require_codeblock = __commonJS({
54155
54155
  tildeInputRegex: () => tildeInputRegex
54156
54156
  });
54157
54157
  module2.exports = __toCommonJS2(codeblock_exports);
54158
- var import_core51 = require_dist16();
54158
+ var import_core52 = require_dist16();
54159
54159
  var import_extension_code_block = __toESM2(require_dist19());
54160
54160
  var codeBlockOptions = {
54161
54161
  defaultLanguage: "plaintext",
@@ -54201,11 +54201,11 @@ var require_codeblock = __commonJS({
54201
54201
  },
54202
54202
  addInputRules() {
54203
54203
  return [
54204
- (0, import_core51.textblockTypeInputRule)({
54204
+ (0, import_core52.textblockTypeInputRule)({
54205
54205
  find: backtickInputRegex,
54206
54206
  type: this.type
54207
54207
  }),
54208
- (0, import_core51.textblockTypeInputRule)({
54208
+ (0, import_core52.textblockTypeInputRule)({
54209
54209
  find: tildeInputRegex,
54210
54210
  type: this.type
54211
54211
  })
@@ -54241,8 +54241,8 @@ var require_comment = __commonJS({
54241
54241
  CommentNode: () => CommentNode
54242
54242
  });
54243
54243
  module2.exports = __toCommonJS2(comment_exports);
54244
- var import_core51 = require_dist16();
54245
- var CommentNode = import_core51.Node.create({
54244
+ var import_core52 = require_dist16();
54245
+ var CommentNode = import_core52.Node.create({
54246
54246
  name: "comment",
54247
54247
  group: "inline",
54248
54248
  inline: true,
@@ -54288,8 +54288,8 @@ var require_markdown = __commonJS({
54288
54288
  MarkdownNode: () => MarkdownNode
54289
54289
  });
54290
54290
  module2.exports = __toCommonJS2(markdown_exports);
54291
- var import_core51 = require_dist16();
54292
- var MarkdownNode = import_core51.Node.create({
54291
+ var import_core52 = require_dist16();
54292
+ var MarkdownNode = import_core52.Node.create({
54293
54293
  name: "markdown",
54294
54294
  group: "block",
54295
54295
  content: "text*",
@@ -54307,7 +54307,7 @@ var require_markdown = __commonJS({
54307
54307
  renderHTML({ node, HTMLAttributes }) {
54308
54308
  return [
54309
54309
  "pre",
54310
- (0, import_core51.mergeAttributes)({ "data-type": this.name }, this.options.HTMLAttributes, HTMLAttributes),
54310
+ (0, import_core52.mergeAttributes)({ "data-type": this.name }, this.options.HTMLAttributes, HTMLAttributes),
54311
54311
  ["code", {}, 0]
54312
54312
  ];
54313
54313
  }
@@ -54341,8 +54341,8 @@ var require_embed = __commonJS({
54341
54341
  EmbedNode: () => EmbedNode
54342
54342
  });
54343
54343
  module2.exports = __toCommonJS2(embed_exports);
54344
- var import_core51 = require_dist16();
54345
- var EmbedNode = import_core51.Node.create({
54344
+ var import_core52 = require_dist16();
54345
+ var EmbedNode = import_core52.Node.create({
54346
54346
  name: "embed",
54347
54347
  addOptions() {
54348
54348
  return {};
@@ -54367,7 +54367,7 @@ var require_embed = __commonJS({
54367
54367
  ];
54368
54368
  },
54369
54369
  renderHTML({ HTMLAttributes }) {
54370
- return ["figure", { "data-type": this.name }, ["iframe", (0, import_core51.mergeAttributes)(HTMLAttributes)]];
54370
+ return ["figure", { "data-type": this.name }, ["iframe", (0, import_core52.mergeAttributes)(HTMLAttributes)]];
54371
54371
  }
54372
54372
  });
54373
54373
  }
@@ -54441,7 +54441,7 @@ var require_noteBase = __commonJS({
54441
54441
  name: () => name
54442
54442
  });
54443
54443
  module2.exports = __toCommonJS2(noteBase_exports);
54444
- var import_core51 = require_dist16();
54444
+ var import_core52 = require_dist16();
54445
54445
  var import_nodes = require_nodes();
54446
54446
  var name = "note";
54447
54447
  var NoteKind = /* @__PURE__ */ ((NoteKind2) => {
@@ -54456,7 +54456,7 @@ var require_noteBase = __commonJS({
54456
54456
  NoteKind2["PrimaryLight"] = "primary-light";
54457
54457
  return NoteKind2;
54458
54458
  })(NoteKind || {});
54459
- var NoteBaseExtension = import_core51.Mark.create({
54459
+ var NoteBaseExtension = import_core52.Mark.create({
54460
54460
  name,
54461
54461
  parseHTML() {
54462
54462
  return [
@@ -54513,9 +54513,9 @@ var require_qmsInlineCommentMark = __commonJS({
54513
54513
  QMSInlineCommentMark: () => QMSInlineCommentMark
54514
54514
  });
54515
54515
  module2.exports = __toCommonJS2(qmsInlineCommentMark_exports);
54516
- var import_core51 = require_dist16();
54516
+ var import_core52 = require_dist16();
54517
54517
  var NAME2 = "node-uuid";
54518
- var QMSInlineCommentMark = import_core51.Mark.create({
54518
+ var QMSInlineCommentMark = import_core52.Mark.create({
54519
54519
  name: NAME2,
54520
54520
  inline: true,
54521
54521
  parseHTML() {
@@ -54560,9 +54560,9 @@ var require_kit = __commonJS({
54560
54560
  mergeKitOptions: () => mergeKitOptions
54561
54561
  });
54562
54562
  module2.exports = __toCommonJS2(kit_exports);
54563
- var import_core51 = require_dist16();
54563
+ var import_core52 = require_dist16();
54564
54564
  function extensionKit(name, fn2) {
54565
- return import_core51.Extension.create({
54565
+ return import_core52.Extension.create({
54566
54566
  name,
54567
54567
  addExtensions() {
54568
54568
  const e = /* @__PURE__ */ __name((extension, options) => {
@@ -57731,34 +57731,34 @@ var require_linkify = __commonJS({
57731
57731
  INIT.initialized = false;
57732
57732
  return INIT;
57733
57733
  }
57734
- function registerTokenPlugin(name, plugin) {
57735
- if (typeof plugin !== "function") {
57736
- throw new Error(`linkifyjs: Invalid token plugin ${plugin} (expects function)`);
57734
+ function registerTokenPlugin(name, plugin2) {
57735
+ if (typeof plugin2 !== "function") {
57736
+ throw new Error(`linkifyjs: Invalid token plugin ${plugin2} (expects function)`);
57737
57737
  }
57738
57738
  for (let i = 0; i < INIT.tokenQueue.length; i++) {
57739
57739
  if (name === INIT.tokenQueue[i][0]) {
57740
57740
  warn(`linkifyjs: token plugin "${name}" already registered - will be overwritten`);
57741
- INIT.tokenQueue[i] = [name, plugin];
57741
+ INIT.tokenQueue[i] = [name, plugin2];
57742
57742
  return;
57743
57743
  }
57744
57744
  }
57745
- INIT.tokenQueue.push([name, plugin]);
57745
+ INIT.tokenQueue.push([name, plugin2]);
57746
57746
  if (INIT.initialized) {
57747
57747
  warn(`linkifyjs: already initialized - will not register token plugin "${name}" ${warnAdvice}`);
57748
57748
  }
57749
57749
  }
57750
- function registerPlugin(name, plugin) {
57751
- if (typeof plugin !== "function") {
57752
- throw new Error(`linkifyjs: Invalid plugin ${plugin} (expects function)`);
57750
+ function registerPlugin(name, plugin2) {
57751
+ if (typeof plugin2 !== "function") {
57752
+ throw new Error(`linkifyjs: Invalid plugin ${plugin2} (expects function)`);
57753
57753
  }
57754
57754
  for (let i = 0; i < INIT.pluginQueue.length; i++) {
57755
57755
  if (name === INIT.pluginQueue[i][0]) {
57756
57756
  warn(`linkifyjs: plugin "${name}" already registered - will be overwritten`);
57757
- INIT.pluginQueue[i] = [name, plugin];
57757
+ INIT.pluginQueue[i] = [name, plugin2];
57758
57758
  return;
57759
57759
  }
57760
57760
  }
57761
- INIT.pluginQueue.push([name, plugin]);
57761
+ INIT.pluginQueue.push([name, plugin2]);
57762
57762
  if (INIT.initialized) {
57763
57763
  warn(`linkifyjs: already initialized - will not register plugin "${name}" ${warnAdvice}`);
57764
57764
  }
@@ -60684,12 +60684,12 @@ var require_dist48 = __commonJS({
60684
60684
  }
60685
60685
  var columnResizingPluginKey = new prosemirror_state.PluginKey("tableColumnResizing");
60686
60686
  function columnResizing({ handleWidth = 5, cellMinWidth = 25, defaultCellMinWidth = 100, View = TableView, lastColumnResizable = true } = {}) {
60687
- const plugin = new prosemirror_state.Plugin({
60687
+ const plugin2 = new prosemirror_state.Plugin({
60688
60688
  key: columnResizingPluginKey,
60689
60689
  state: {
60690
60690
  init(_, state) {
60691
60691
  var _plugin$spec;
60692
- const nodeViews = (_plugin$spec = plugin.spec) === null || _plugin$spec === void 0 || (_plugin$spec = _plugin$spec.props) === null || _plugin$spec === void 0 ? void 0 : _plugin$spec.nodeViews;
60692
+ const nodeViews = (_plugin$spec = plugin2.spec) === null || _plugin$spec === void 0 || (_plugin$spec = _plugin$spec.props) === null || _plugin$spec === void 0 ? void 0 : _plugin$spec.nodeViews;
60693
60693
  const tableName = tableNodeTypes(state.schema).table.name;
60694
60694
  if (View && nodeViews) nodeViews[tableName] = (node, view) => {
60695
60695
  return new View(node, defaultCellMinWidth, view);
@@ -60723,7 +60723,7 @@ var require_dist48 = __commonJS({
60723
60723
  nodeViews: {}
60724
60724
  }
60725
60725
  });
60726
- return plugin;
60726
+ return plugin2;
60727
60727
  }
60728
60728
  var ResizeState = class ResizeState2 {
60729
60729
  constructor(activeHandle, dragging) {
@@ -61591,9 +61591,9 @@ var require_colors = __commonJS({
61591
61591
  TextColor: () => TextColor
61592
61592
  });
61593
61593
  module2.exports = __toCommonJS2(colors_exports);
61594
- var import_core51 = require_dist16();
61594
+ var import_core52 = require_dist16();
61595
61595
  var import_extension_text_style = require_dist20();
61596
- var BackgroundColor = import_core51.Extension.create({
61596
+ var BackgroundColor = import_core52.Extension.create({
61597
61597
  name: "backgroundColor",
61598
61598
  addOptions() {
61599
61599
  return {
@@ -61634,7 +61634,7 @@ var require_colors = __commonJS({
61634
61634
  };
61635
61635
  }
61636
61636
  });
61637
- var TextColor = import_core51.Extension.create({
61637
+ var TextColor = import_core52.Extension.create({
61638
61638
  name: "textColor",
61639
61639
  addOptions() {
61640
61640
  return {
@@ -61706,10 +61706,10 @@ var require_inlineComment = __commonJS({
61706
61706
  InlineCommentPasteFixPlugin: () => InlineCommentPasteFixPlugin
61707
61707
  });
61708
61708
  module2.exports = __toCommonJS2(inlineComment_exports);
61709
- var import_core51 = require_dist16();
61709
+ var import_core52 = require_dist16();
61710
61710
  var import_model = require_dist10();
61711
61711
  var import_state = require_dist5();
61712
- var InlineCommentMark = import_core51.Mark.create({
61712
+ var InlineCommentMark = import_core52.Mark.create({
61713
61713
  name: "inline-comment",
61714
61714
  excludes: "",
61715
61715
  inclusive: false,
@@ -61943,12 +61943,12 @@ var require_inputRules = __commonJS({
61943
61943
  return false;
61944
61944
  }
61945
61945
  function createInputRule(cursorPlugin, opts) {
61946
- const plugin = new prosemirror_state_1.Plugin({
61946
+ const plugin2 = new prosemirror_state_1.Plugin({
61947
61947
  isInputRules: true,
61948
61948
  state: {
61949
61949
  init: () => null,
61950
61950
  apply(tr, prev) {
61951
- const meta3 = tr.getMeta(plugin);
61951
+ const meta3 = tr.getMeta(plugin2);
61952
61952
  if (meta3)
61953
61953
  return meta3;
61954
61954
  return tr.selectionSet || tr.docChanged ? null : prev;
@@ -61957,11 +61957,11 @@ var require_inputRules = __commonJS({
61957
61957
  props: {
61958
61958
  handleTextInput(view, from, to, text) {
61959
61959
  const markType = (0, utils_1.getMarkType)(view, opts);
61960
- return run3(markType, view, from, to, text, { input: plugin, cursor: cursorPlugin });
61960
+ return run3(markType, view, from, to, text, { input: plugin2, cursor: cursorPlugin });
61961
61961
  }
61962
61962
  }
61963
61963
  });
61964
- return plugin;
61964
+ return plugin2;
61965
61965
  }
61966
61966
  exports2.createInputRule = createInputRule;
61967
61967
  }
@@ -61975,13 +61975,13 @@ var require_actions = __commonJS({
61975
61975
  exports2.stepOutside = exports2.onDelete = exports2.onBackspace = exports2.onArrowLeft = exports2.onArrowRight = exports2.onBacktick = exports2.stepOutsideNextTrAndPass = void 0;
61976
61976
  var prosemirror_state_1 = require_dist4();
61977
61977
  var utils_1 = require_utils6();
61978
- function stepOutsideNextTrAndPass(view, plugin, action = "next") {
61978
+ function stepOutsideNextTrAndPass(view, plugin2, action = "next") {
61979
61979
  const meta3 = { action };
61980
- view.dispatch(view.state.tr.setMeta(plugin, meta3));
61980
+ view.dispatch(view.state.tr.setMeta(plugin2, meta3));
61981
61981
  return false;
61982
61982
  }
61983
61983
  exports2.stepOutsideNextTrAndPass = stepOutsideNextTrAndPass;
61984
- function onBacktick(view, plugin, event, markType) {
61984
+ function onBacktick(view, plugin2, event, markType) {
61985
61985
  if (view.state.selection.empty)
61986
61986
  return false;
61987
61987
  if (event.metaKey || event.shiftKey || event.altKey || event.ctrlKey)
@@ -61995,16 +61995,16 @@ var require_actions = __commonJS({
61995
61995
  return true;
61996
61996
  }
61997
61997
  exports2.onBacktick = onBacktick;
61998
- function onArrowRightInside(view, plugin, event, markType) {
61998
+ function onArrowRightInside(view, plugin2, event, markType) {
61999
61999
  var _a2;
62000
62000
  if (event.metaKey)
62001
- return stepOutsideNextTrAndPass(view, plugin);
62001
+ return stepOutsideNextTrAndPass(view, plugin2);
62002
62002
  if (event.shiftKey || event.altKey || event.ctrlKey)
62003
62003
  return false;
62004
62004
  const { selection, doc } = view.state;
62005
62005
  if (!selection.empty)
62006
62006
  return false;
62007
- const pluginState = plugin.getState(view.state);
62007
+ const pluginState = plugin2.getState(view.state);
62008
62008
  const pos = selection.$from;
62009
62009
  const inCode = !!markType.isInSet(pos.marks());
62010
62010
  const nextCode = !!markType.isInSet((_a2 = pos.marksAcross((0, utils_1.safeResolve)(doc, selection.from + 1))) !== null && _a2 !== void 0 ? _a2 : []);
@@ -62024,26 +62024,26 @@ var require_actions = __commonJS({
62024
62024
  }
62025
62025
  return false;
62026
62026
  }
62027
- function onArrowRight(view, plugin, event, markType) {
62028
- const handled = onArrowRightInside(view, plugin, event, markType);
62027
+ function onArrowRight(view, plugin2, event, markType) {
62028
+ const handled = onArrowRightInside(view, plugin2, event, markType);
62029
62029
  if (handled)
62030
62030
  return true;
62031
62031
  const { selection } = view.state;
62032
62032
  const pos = selection.$from;
62033
62033
  if (selection.empty && pos.parentOffset === pos.parent.nodeSize - 2) {
62034
- return stepOutsideNextTrAndPass(view, plugin);
62034
+ return stepOutsideNextTrAndPass(view, plugin2);
62035
62035
  }
62036
62036
  return false;
62037
62037
  }
62038
62038
  exports2.onArrowRight = onArrowRight;
62039
- function onArrowLeftInside(view, plugin, event, markType) {
62039
+ function onArrowLeftInside(view, plugin2, event, markType) {
62040
62040
  var _a2;
62041
62041
  if (event.metaKey)
62042
- return stepOutsideNextTrAndPass(view, plugin);
62042
+ return stepOutsideNextTrAndPass(view, plugin2);
62043
62043
  if (event.shiftKey || event.altKey || event.ctrlKey)
62044
62044
  return false;
62045
62045
  const { selection, doc } = view.state;
62046
- const pluginState = plugin.getState(view.state);
62046
+ const pluginState = plugin2.getState(view.state);
62047
62047
  const inCode = !!markType.isInSet(selection.$from.marks());
62048
62048
  const nextCode = !!markType.isInSet((_a2 = (0, utils_1.safeResolve)(doc, selection.empty ? selection.from - 1 : selection.from + 1).marks()) !== null && _a2 !== void 0 ? _a2 : []);
62049
62049
  if (inCode && (pluginState === null || pluginState === void 0 ? void 0 : pluginState.side) === -1 && selection.$from.parentOffset === 0) {
@@ -62097,23 +62097,23 @@ var require_actions = __commonJS({
62097
62097
  }
62098
62098
  return false;
62099
62099
  }
62100
- function onArrowLeft(view, plugin, event, markType) {
62101
- const handled = onArrowLeftInside(view, plugin, event, markType);
62100
+ function onArrowLeft(view, plugin2, event, markType) {
62101
+ const handled = onArrowLeftInside(view, plugin2, event, markType);
62102
62102
  if (handled)
62103
62103
  return true;
62104
62104
  const { selection } = view.state;
62105
62105
  const pos = selection.$from;
62106
- const pluginState = plugin.getState(view.state);
62106
+ const pluginState = plugin2.getState(view.state);
62107
62107
  if (pos.pos === 1 && pos.parentOffset === 0 && (pluginState === null || pluginState === void 0 ? void 0 : pluginState.side) === -1) {
62108
62108
  return true;
62109
62109
  }
62110
62110
  if (selection.empty && pos.parentOffset === 0) {
62111
- return stepOutsideNextTrAndPass(view, plugin);
62111
+ return stepOutsideNextTrAndPass(view, plugin2);
62112
62112
  }
62113
62113
  return false;
62114
62114
  }
62115
62115
  exports2.onArrowLeft = onArrowLeft;
62116
- function onBackspace(view, plugin, event, markType) {
62116
+ function onBackspace(view, plugin2, event, markType) {
62117
62117
  if (event.metaKey || event.shiftKey || event.altKey || event.ctrlKey)
62118
62118
  return false;
62119
62119
  const { selection, doc } = view.state;
@@ -62122,9 +62122,9 @@ var require_actions = __commonJS({
62122
62122
  const startOfLine = from.parentOffset === 0;
62123
62123
  const toCode = !!markType.isInSet((0, utils_1.safeResolve)(doc, selection.to + 1).marks());
62124
62124
  if ((!fromCode || startOfLine) && !toCode) {
62125
- return stepOutsideNextTrAndPass(view, plugin);
62125
+ return stepOutsideNextTrAndPass(view, plugin2);
62126
62126
  }
62127
- const pluginState = plugin.getState(view.state);
62127
+ const pluginState = plugin2.getState(view.state);
62128
62128
  if (selection.empty && (pluginState === null || pluginState === void 0 ? void 0 : pluginState.side) === -1) {
62129
62129
  const tr = view.state.tr.delete(selection.from - 1, selection.from);
62130
62130
  view.dispatch(tr);
@@ -62133,7 +62133,7 @@ var require_actions = __commonJS({
62133
62133
  return false;
62134
62134
  }
62135
62135
  exports2.onBackspace = onBackspace;
62136
- function onDelete(view, plugin, event, markType) {
62136
+ function onDelete(view, plugin2, event, markType) {
62137
62137
  if (event.metaKey || event.shiftKey || event.altKey || event.ctrlKey)
62138
62138
  return false;
62139
62139
  const { selection, doc } = view.state;
@@ -62141,7 +62141,7 @@ var require_actions = __commonJS({
62141
62141
  const startOfLine = selection.$from.parentOffset === 0;
62142
62142
  const toCode = !!markType.isInSet((0, utils_1.safeResolve)(doc, selection.to + 2).marks());
62143
62143
  if ((!fromCode || startOfLine) && !toCode) {
62144
- return stepOutsideNextTrAndPass(view, plugin);
62144
+ return stepOutsideNextTrAndPass(view, plugin2);
62145
62145
  }
62146
62146
  return false;
62147
62147
  }
@@ -62182,12 +62182,12 @@ var require_plugin = __commonJS({
62182
62182
  return span4;
62183
62183
  }
62184
62184
  function getDecorationPlugin(opts) {
62185
- const plugin = new prosemirror_state_1.Plugin({
62185
+ const plugin2 = new prosemirror_state_1.Plugin({
62186
62186
  key: utils_1.pluginKey,
62187
62187
  appendTransaction: (trs, oldState, newState) => {
62188
62188
  var _a2;
62189
- const prev = plugin.getState(oldState);
62190
- const meta3 = (_a2 = trs[0]) === null || _a2 === void 0 ? void 0 : _a2.getMeta(plugin);
62189
+ const prev = plugin2.getState(oldState);
62190
+ const meta3 = (_a2 = trs[0]) === null || _a2 === void 0 ? void 0 : _a2.getMeta(plugin2);
62191
62191
  if ((prev === null || prev === void 0 ? void 0 : prev.next) || (meta3 === null || meta3 === void 0 ? void 0 : meta3.action) === "click") {
62192
62192
  return (0, actions_1.stepOutside)(newState, (0, utils_1.getMarkType)(newState, opts));
62193
62193
  }
@@ -62197,7 +62197,7 @@ var require_plugin = __commonJS({
62197
62197
  init: () => null,
62198
62198
  apply(tr, value3, oldState, state) {
62199
62199
  var _a2;
62200
- const meta3 = tr.getMeta(plugin);
62200
+ const meta3 = tr.getMeta(plugin2);
62201
62201
  if ((meta3 === null || meta3 === void 0 ? void 0 : meta3.action) === "next")
62202
62202
  return { next: true };
62203
62203
  const markType = (0, utils_1.getMarkType)(state, opts);
@@ -62225,12 +62225,12 @@ var require_plugin = __commonJS({
62225
62225
  props: {
62226
62226
  attributes: (state) => {
62227
62227
  var _a2;
62228
- const { active: active2 = false } = (_a2 = plugin.getState(state)) !== null && _a2 !== void 0 ? _a2 : {};
62228
+ const { active: active2 = false } = (_a2 = plugin2.getState(state)) !== null && _a2 !== void 0 ? _a2 : {};
62229
62229
  return Object.assign({}, active2 ? { class: "no-cursor" } : {});
62230
62230
  },
62231
62231
  decorations: (state) => {
62232
62232
  var _a2;
62233
- const { active: active2, side } = (_a2 = plugin.getState(state)) !== null && _a2 !== void 0 ? _a2 : {};
62233
+ const { active: active2, side } = (_a2 = plugin2.getState(state)) !== null && _a2 !== void 0 ? _a2 : {};
62234
62234
  if (!active2)
62235
62235
  return prosemirror_view_1.DecorationSet.empty;
62236
62236
  const deco = prosemirror_view_1.Decoration.widget(state.selection.from, toDom, { side });
@@ -62239,35 +62239,35 @@ var require_plugin = __commonJS({
62239
62239
  handleKeyDown(view, event) {
62240
62240
  switch (event.key) {
62241
62241
  case "`":
62242
- return (0, actions_1.onBacktick)(view, plugin, event, (0, utils_1.getMarkType)(view, opts));
62242
+ return (0, actions_1.onBacktick)(view, plugin2, event, (0, utils_1.getMarkType)(view, opts));
62243
62243
  case "ArrowRight":
62244
- return (0, actions_1.onArrowRight)(view, plugin, event, (0, utils_1.getMarkType)(view, opts));
62244
+ return (0, actions_1.onArrowRight)(view, plugin2, event, (0, utils_1.getMarkType)(view, opts));
62245
62245
  case "ArrowLeft":
62246
- return (0, actions_1.onArrowLeft)(view, plugin, event, (0, utils_1.getMarkType)(view, opts));
62246
+ return (0, actions_1.onArrowLeft)(view, plugin2, event, (0, utils_1.getMarkType)(view, opts));
62247
62247
  case "Backspace":
62248
- return (0, actions_1.onBackspace)(view, plugin, event, (0, utils_1.getMarkType)(view, opts));
62248
+ return (0, actions_1.onBackspace)(view, plugin2, event, (0, utils_1.getMarkType)(view, opts));
62249
62249
  case "Delete":
62250
- return (0, actions_1.onDelete)(view, plugin, event, (0, utils_1.getMarkType)(view, opts));
62250
+ return (0, actions_1.onDelete)(view, plugin2, event, (0, utils_1.getMarkType)(view, opts));
62251
62251
  case "ArrowUp":
62252
62252
  case "ArrowDown":
62253
62253
  case "Home":
62254
62254
  case "End":
62255
- return (0, actions_1.stepOutsideNextTrAndPass)(view, plugin);
62255
+ return (0, actions_1.stepOutsideNextTrAndPass)(view, plugin2);
62256
62256
  case "e":
62257
62257
  case "a":
62258
62258
  if (!event.ctrlKey)
62259
62259
  return false;
62260
- return (0, actions_1.stepOutsideNextTrAndPass)(view, plugin);
62260
+ return (0, actions_1.stepOutsideNextTrAndPass)(view, plugin2);
62261
62261
  default:
62262
62262
  return false;
62263
62263
  }
62264
62264
  },
62265
62265
  handleClick(view) {
62266
- return (0, actions_1.stepOutsideNextTrAndPass)(view, plugin, "click");
62266
+ return (0, actions_1.stepOutsideNextTrAndPass)(view, plugin2, "click");
62267
62267
  }
62268
62268
  }
62269
62269
  });
62270
- return plugin;
62270
+ return plugin2;
62271
62271
  }
62272
62272
  exports2.getDecorationPlugin = getDecorationPlugin;
62273
62273
  function codemark(opts) {
@@ -75508,9 +75508,9 @@ var require_index_cjs4 = __commonJS({
75508
75508
  }
75509
75509
  return this;
75510
75510
  };
75511
- MarkdownIt.prototype.use = function(plugin) {
75511
+ MarkdownIt.prototype.use = function(plugin2) {
75512
75512
  const args2 = [this].concat(Array.prototype.slice.call(arguments, 1));
75513
- plugin.apply(plugin, args2);
75513
+ plugin2.apply(plugin2, args2);
75514
75514
  return this;
75515
75515
  };
75516
75516
  MarkdownIt.prototype.parse = function(src, env) {
@@ -77233,7 +77233,7 @@ var require_client5 = __commonJS({
77233
77233
  createMarkupOperations: () => createMarkupOperations
77234
77234
  });
77235
77235
  module2.exports = __toCommonJS2(client_exports);
77236
- var import_core51 = require_lib4();
77236
+ var import_core52 = require_lib4();
77237
77237
  var import_collaborator_client2 = require_lib7();
77238
77238
  var import_text4 = require_lib9();
77239
77239
  var import_text_markdown3 = require_lib17();
@@ -77247,8 +77247,8 @@ var require_client5 = __commonJS({
77247
77247
  this.workspace = workspace;
77248
77248
  this.token = token;
77249
77249
  this.config = config3;
77250
- this.refUrl = (0, import_core51.concatLink)(this.url, `/browse?workspace=${workspace}`);
77251
- this.imageUrl = (0, import_core51.concatLink)(this.url, `/files?workspace=${workspace}&file=`);
77250
+ this.refUrl = (0, import_core52.concatLink)(this.url, `/browse?workspace=${workspace}`);
77251
+ this.imageUrl = (0, import_core52.concatLink)(this.url, `/files?workspace=${workspace}&file=`);
77252
77252
  this.collaborator = (0, import_collaborator_client2.getClient)(workspace, token, config3.COLLABORATOR_URL);
77253
77253
  }
77254
77254
  static {
@@ -77258,7 +77258,7 @@ var require_client5 = __commonJS({
77258
77258
  imageUrl;
77259
77259
  refUrl;
77260
77260
  async fetchMarkup(objectClass, objectId, objectAttr, doc, format7) {
77261
- const collabId = (0, import_core51.makeCollabId)(objectClass, objectId, objectAttr);
77261
+ const collabId = (0, import_core52.makeCollabId)(objectClass, objectId, objectAttr);
77262
77262
  const markup = await this.collaborator.getMarkup(collabId, doc);
77263
77263
  const json3 = (0, import_text4.markupToJSON)(markup);
77264
77264
  switch (format7) {
@@ -77287,7 +77287,7 @@ var require_client5 = __commonJS({
77287
77287
  default:
77288
77288
  throw new Error("Unknown content format");
77289
77289
  }
77290
- const collabId = (0, import_core51.makeCollabId)(objectClass, objectId, objectAttr);
77290
+ const collabId = (0, import_core52.makeCollabId)(objectClass, objectId, objectAttr);
77291
77291
  return await this.collaborator.createMarkup(collabId, markup);
77292
77292
  }
77293
77293
  };
@@ -81111,7 +81111,7 @@ var require_rpc = __commonJS({
81111
81111
  rpcJSONReplacer: () => rpcJSONReplacer
81112
81112
  });
81113
81113
  module2.exports = __toCommonJS2(rpc_exports);
81114
- var import_platform3 = __toESM2(require_lib());
81114
+ var import_platform4 = __toESM2(require_lib());
81115
81115
  var import_msgpackr = require_node3();
81116
81116
  function isTotalArray(value3) {
81117
81117
  return Array.isArray(value3) && (value3.total !== void 0 || value3.lookupMap !== void 0);
@@ -81214,7 +81214,7 @@ var require_rpc = __commonJS({
81214
81214
  readRequest(request2, binary) {
81215
81215
  const result = this.protoDeserialize(request2, binary);
81216
81216
  if (typeof result.method !== "string") {
81217
- throw new import_platform3.PlatformError(new import_platform3.Status(import_platform3.Severity.ERROR, import_platform3.default.status.BadRequest, {}));
81217
+ throw new import_platform4.PlatformError(new import_platform4.Status(import_platform4.Severity.ERROR, import_platform4.default.status.BadRequest, {}));
81218
81218
  }
81219
81219
  return result;
81220
81220
  }
@@ -81771,9 +81771,9 @@ var require_connection2 = __commonJS({
81771
81771
  });
81772
81772
  module2.exports = __toCommonJS2(connection_exports);
81773
81773
  var import_analytics = require_lib2();
81774
- var import_client30 = __toESM2(require_lib6());
81775
- var import_core51 = __toESM2(require_lib4());
81776
- var import_platform3 = __toESM2(require_lib());
81774
+ var import_client31 = __toESM2(require_lib6());
81775
+ var import_core52 = __toESM2(require_lib4());
81776
+ var import_platform4 = __toESM2(require_lib());
81777
81777
  var import_rpc = require_lib18();
81778
81778
  var import_snappyjs = require_snappyjs();
81779
81779
  var SECOND = 1e3;
@@ -81816,7 +81816,7 @@ var require_connection2 = __commonJS({
81816
81816
  const sKey = "session.id." + this.url;
81817
81817
  let sessionId = sessionStorage.getItem(sKey) ?? void 0;
81818
81818
  if (sessionId === void 0) {
81819
- sessionId = (0, import_core51.generateId)();
81819
+ sessionId = (0, import_core52.generateId)();
81820
81820
  console.log("Generate new SessionId", sessionId);
81821
81821
  this.sessionId = sessionId;
81822
81822
  } else {
@@ -81827,7 +81827,7 @@ var require_connection2 = __commonJS({
81827
81827
  sessionStorage.setItem(sKey, sessionId);
81828
81828
  });
81829
81829
  } else {
81830
- this.sessionId = (0, import_core51.generateId)();
81830
+ this.sessionId = (0, import_core52.generateId)();
81831
81831
  }
81832
81832
  this.rpcHandler = opt?.useGlobalRPCHandler === true ? globalRPCHandler : new import_rpc.RPCHandler();
81833
81833
  this.pushHandler(handler);
@@ -81882,7 +81882,7 @@ var require_connection2 = __commonJS({
81882
81882
  }
81883
81883
  if (!this.closed) {
81884
81884
  void this.sendRequest({
81885
- method: import_client30.pingConst,
81885
+ method: import_client31.pingConst,
81886
81886
  params: [],
81887
81887
  once: true,
81888
81888
  handleResult: /* @__PURE__ */ __name(async (result) => {
@@ -81915,7 +81915,7 @@ var require_connection2 = __commonJS({
81915
81915
  }
81916
81916
  }
81917
81917
  isConnected() {
81918
- return this.websocket != null && this.websocket.readyState === import_client30.ClientSocketReadyState.OPEN && this.helloReceived;
81918
+ return this.websocket != null && this.websocket.readyState === import_client31.ClientSocketReadyState.OPEN && this.helloReceived;
81919
81919
  }
81920
81920
  delay = 0;
81921
81921
  onConnectHandlers = [];
@@ -81980,8 +81980,8 @@ var require_connection2 = __commonJS({
81980
81980
  }
81981
81981
  if (resp.error !== void 0) {
81982
81982
  if (resp.terminate === true) {
81983
- if (resp.error.code !== import_platform3.default.status.WorkspaceArchived && resp.error.code !== import_platform3.default.status.WorkspaceNotFound) {
81984
- import_analytics.Analytics.handleError(new import_platform3.PlatformError(resp.error));
81983
+ if (resp.error.code !== import_platform4.default.status.WorkspaceArchived && resp.error.code !== import_platform4.default.status.WorkspaceNotFound) {
81984
+ import_analytics.Analytics.handleError(new import_platform4.PlatformError(resp.error));
81985
81985
  }
81986
81986
  this.closed = true;
81987
81987
  this.websocket?.close();
@@ -81999,7 +81999,7 @@ var require_connection2 = __commonJS({
81999
81999
  }
82000
82000
  }
82001
82001
  if (promise4 !== void 0) {
82002
- promise4.reject(new import_platform3.PlatformError(resp.error));
82002
+ promise4.reject(new import_platform4.PlatformError(resp.error));
82003
82003
  }
82004
82004
  }
82005
82005
  return;
@@ -82007,7 +82007,7 @@ var require_connection2 = __commonJS({
82007
82007
  if (resp.id === -1) {
82008
82008
  this.delay = 0;
82009
82009
  if (resp.result?.state === "upgrading") {
82010
- void this.onConnect?.(import_core51.ClientConnectEvent.Maintenance, void 0, resp.result.stats);
82010
+ void this.onConnect?.(import_core52.ClientConnectEvent.Maintenance, void 0, resp.result.stats);
82011
82011
  this.upgrading = true;
82012
82012
  this.delay = 3;
82013
82013
  return;
@@ -82042,7 +82042,7 @@ var require_connection2 = __commonJS({
82042
82042
  v.reconnect?.();
82043
82043
  }
82044
82044
  void this.onConnect?.(
82045
- helloResp.reconnect === true ? import_core51.ClientConnectEvent.Reconnected : import_core51.ClientConnectEvent.Connected,
82045
+ helloResp.reconnect === true ? import_core52.ClientConnectEvent.Reconnected : import_core52.ClientConnectEvent.Connected,
82046
82046
  helloResp.lastTx,
82047
82047
  this.sessionId
82048
82048
  )?.catch((err) => {
@@ -82055,8 +82055,8 @@ var require_connection2 = __commonJS({
82055
82055
  }
82056
82056
  return;
82057
82057
  }
82058
- if (resp.result === import_client30.pingConst) {
82059
- void this.sendRequest({ method: import_client30.pingConst, params: [] }).catch((err) => {
82058
+ if (resp.result === import_client31.pingConst) {
82059
+ void this.sendRequest({ method: import_client31.pingConst, params: [] }).catch((err) => {
82060
82060
  this.ctx.error("failed to send ping", { err });
82061
82061
  });
82062
82062
  return;
@@ -82092,7 +82092,7 @@ var require_connection2 = __commonJS({
82092
82092
  }
82093
82093
  result = result.concat(c.data);
82094
82094
  }
82095
- resp.result = (0, import_core51.toFindResult)(result, total, lookupMap);
82095
+ resp.result = (0, import_core52.toFindResult)(result, total, lookupMap);
82096
82096
  resp.chunk = void 0;
82097
82097
  } else {
82098
82098
  return;
@@ -82121,7 +82121,7 @@ var require_connection2 = __commonJS({
82121
82121
  this.workspace,
82122
82122
  this.user
82123
82123
  );
82124
- promise4.reject(new import_platform3.PlatformError(resp.error));
82124
+ promise4.reject(new import_platform4.PlatformError(resp.error));
82125
82125
  } else {
82126
82126
  if (request2?.handleResult !== void 0) {
82127
82127
  void request2.handleResult(resp.result).then(() => {
@@ -82136,7 +82136,7 @@ var require_connection2 = __commonJS({
82136
82136
  } else {
82137
82137
  const txArr = Array.isArray(resp.result) ? resp.result : [resp.result];
82138
82138
  for (const tx of txArr) {
82139
- if (tx?._class === import_core51.default.class.TxModelUpgrade) {
82139
+ if (tx?._class === import_core52.default.class.TxModelUpgrade) {
82140
82140
  console.log("Processing upgrade", this.workspace, this.user);
82141
82141
  this.opt?.onUpgrade?.();
82142
82142
  return;
@@ -82148,15 +82148,15 @@ var require_connection2 = __commonJS({
82148
82148
  }
82149
82149
  }
82150
82150
  checkArrayBufferPing(data) {
82151
- if (data.byteLength === import_client30.pingConst.length || data.byteLength === import_client30.pongConst.length) {
82151
+ if (data.byteLength === import_client31.pingConst.length || data.byteLength === import_client31.pongConst.length) {
82152
82152
  const text = new TextDecoder().decode(data);
82153
- if (text === import_client30.pingConst) {
82154
- void this.sendRequest({ method: import_client30.pingConst, params: [] }).catch((err) => {
82153
+ if (text === import_client31.pingConst) {
82154
+ void this.sendRequest({ method: import_client31.pingConst, params: [] }).catch((err) => {
82155
82155
  this.ctx.error("failed to send ping", { err });
82156
82156
  });
82157
82157
  return true;
82158
82158
  }
82159
- if (text === import_client30.pongConst) {
82159
+ if (text === import_client31.pongConst) {
82160
82160
  this.pingResponse = Date.now();
82161
82161
  return true;
82162
82162
  }
@@ -82166,7 +82166,7 @@ var require_connection2 = __commonJS({
82166
82166
  openConnection(ctx, socketId) {
82167
82167
  this.binaryMode = false;
82168
82168
  this.helloReceived = false;
82169
- const clientSocketFactory = this.opt?.socketFactory ?? (0, import_platform3.getMetadata)(import_client30.default.metadata.ClientSocketFactory) ?? ((url4) => {
82169
+ const clientSocketFactory = this.opt?.socketFactory ?? (0, import_platform4.getMetadata)(import_client31.default.metadata.ClientSocketFactory) ?? ((url4) => {
82170
82170
  const s = new WebSocket(url4);
82171
82171
  return s;
82172
82172
  });
@@ -82201,12 +82201,12 @@ var require_connection2 = __commonJS({
82201
82201
  if (this.websocket !== wsocket) {
82202
82202
  return;
82203
82203
  }
82204
- if (event.data === import_client30.pongConst) {
82204
+ if (event.data === import_client31.pongConst) {
82205
82205
  this.pingResponse = Date.now();
82206
82206
  return;
82207
82207
  }
82208
- if (event.data === import_client30.pingConst) {
82209
- void this.sendRequest({ method: import_client30.pingConst, params: [] }).catch((err) => {
82208
+ if (event.data === import_client31.pingConst) {
82209
+ void this.sendRequest({ method: import_client31.pingConst, params: [] }).catch((err) => {
82210
82210
  this.ctx.error("failed to send ping", { err });
82211
82211
  });
82212
82212
  return;
@@ -82271,8 +82271,8 @@ var require_connection2 = __commonJS({
82271
82271
  if (this.websocket !== wsocket) {
82272
82272
  return;
82273
82273
  }
82274
- const useBinary = this.opt?.useBinaryProtocol ?? (0, import_platform3.getMetadata)(import_client30.default.metadata.UseBinaryProtocol) ?? true;
82275
- this.compressionMode = this.opt?.useProtocolCompression ?? (0, import_platform3.getMetadata)(import_client30.default.metadata.UseProtocolCompression) ?? false;
82274
+ const useBinary = this.opt?.useBinaryProtocol ?? (0, import_platform4.getMetadata)(import_client31.default.metadata.UseBinaryProtocol) ?? true;
82275
+ this.compressionMode = this.opt?.useProtocolCompression ?? (0, import_platform4.getMetadata)(import_client31.default.metadata.UseProtocolCompression) ?? false;
82276
82276
  const helloRequest = {
82277
82277
  method: "hello",
82278
82278
  params: [],
@@ -82298,7 +82298,7 @@ var require_connection2 = __commonJS({
82298
82298
  {},
82299
82299
  async (ctx) => {
82300
82300
  if (this.closed) {
82301
- throw new import_platform3.PlatformError(new import_platform3.Status(import_platform3.Severity.ERROR, import_platform3.default.status.ConnectionClosed, {}));
82301
+ throw new import_platform4.PlatformError(new import_platform4.Status(import_platform4.Severity.ERROR, import_platform4.default.status.ConnectionClosed, {}));
82302
82302
  }
82303
82303
  if (this.slowDownTimer > 0) {
82304
82304
  await new Promise((resolve2) => setTimeout(resolve2, this.slowDownTimer));
@@ -82318,13 +82318,13 @@ var require_connection2 = __commonJS({
82318
82318
  if (w instanceof Promise) {
82319
82319
  await w;
82320
82320
  }
82321
- if (data.method !== import_client30.pingConst) {
82321
+ if (data.method !== import_client31.pingConst) {
82322
82322
  this.requests.set(id, promise4);
82323
82323
  }
82324
82324
  promise4.sendData = () => {
82325
- if (this.websocket?.readyState === import_client30.ClientSocketReadyState.OPEN) {
82325
+ if (this.websocket?.readyState === import_client31.ClientSocketReadyState.OPEN) {
82326
82326
  promise4.startTime = Date.now();
82327
- if (data.method !== import_client30.pingConst) {
82327
+ if (data.method !== import_client31.pingConst) {
82328
82328
  const dta = this.rpcHandler.serialize(
82329
82329
  {
82330
82330
  method: data.method,
@@ -82337,7 +82337,7 @@ var require_connection2 = __commonJS({
82337
82337
  );
82338
82338
  this.websocket?.send(dta);
82339
82339
  } else {
82340
- this.websocket?.send(import_client30.pingConst);
82340
+ this.websocket?.send(import_client31.pingConst);
82341
82341
  }
82342
82342
  }
82343
82343
  };
@@ -82351,7 +82351,7 @@ var require_connection2 = __commonJS({
82351
82351
  };
82352
82352
  }
82353
82353
  promise4.sendData();
82354
- if (data.method !== import_client30.pingConst) {
82354
+ if (data.method !== import_client31.pingConst) {
82355
82355
  return await promise4.promise;
82356
82356
  }
82357
82357
  },
@@ -82366,7 +82366,7 @@ var require_connection2 = __commonJS({
82366
82366
  }
82367
82367
  getAccount() {
82368
82368
  if (this.account !== void 0) {
82369
- return Promise.resolve((0, import_core51.clone)(this.account));
82369
+ return Promise.resolve((0, import_core52.clone)(this.account));
82370
82370
  }
82371
82371
  return this.sendRequest({ method: "getAccount", params: [] });
82372
82372
  }
@@ -82424,10 +82424,10 @@ var require_connection2 = __commonJS({
82424
82424
  method: "tx",
82425
82425
  params: [tx],
82426
82426
  retry: /* @__PURE__ */ __name(async () => {
82427
- if (tx._class === import_core51.default.class.TxApplyIf) {
82428
- return (await this.findAll(import_core51.default.class.Tx, { _id: tx.txes[0]._id }, { limit: 1 })).length === 0;
82427
+ if (tx._class === import_core52.default.class.TxApplyIf) {
82428
+ return (await this.findAll(import_core52.default.class.Tx, { _id: tx.txes[0]._id }, { limit: 1 })).length === 0;
82429
82429
  }
82430
- return (await this.findAll(import_core51.default.class.Tx, { _id: tx._id }, { limit: 1 })).length === 0;
82430
+ return (await this.findAll(import_core52.default.class.Tx, { _id: tx._id }, { limit: 1 })).length === 0;
82431
82431
  }, "retry")
82432
82432
  });
82433
82433
  }
@@ -82467,7 +82467,7 @@ var require_connection2 = __commonJS({
82467
82467
  };
82468
82468
  function connect(url4, handler, workspace, user, opt) {
82469
82469
  return new Connection(
82470
- opt?.ctx?.newChild?.("connection", {}) ?? new import_core51.MeasureMetricsContext("connection", {}),
82470
+ opt?.ctx?.newChild?.("connection", {}) ?? new import_core52.MeasureMetricsContext("connection", {}),
82471
82471
  url4,
82472
82472
  handler,
82473
82473
  workspace,
@@ -82517,14 +82517,14 @@ var require_lib19 = __commonJS({
82517
82517
  default: () => index_default
82518
82518
  });
82519
82519
  module2.exports = __toCommonJS2(index_exports2);
82520
- var import_client30 = __toESM2(require_lib6());
82521
- var import_core51 = __toESM2(require_lib4());
82522
- var import_platform3 = __toESM2(require_lib());
82520
+ var import_client31 = __toESM2(require_lib6());
82521
+ var import_core52 = __toESM2(require_lib4());
82522
+ var import_platform4 = __toESM2(require_lib());
82523
82523
  var import_connection = require_connection2();
82524
82524
  var dbRequest;
82525
82525
  var dbPromise = Promise.resolve(void 0);
82526
82526
  if (typeof localStorage !== "undefined") {
82527
- const st = (0, import_core51.platformNow)();
82527
+ const st = (0, import_core52.platformNow)();
82528
82528
  dbPromise = new Promise((resolve2) => {
82529
82529
  dbRequest = indexedDB.open("model.db.persistence", 2);
82530
82530
  dbRequest.onupgradeneeded = function() {
@@ -82535,7 +82535,7 @@ var require_lib19 = __commonJS({
82535
82535
  };
82536
82536
  dbRequest.onsuccess = function() {
82537
82537
  const db = dbRequest.result;
82538
- console.log("init DB complete", (0, import_core51.platformNow)() - st);
82538
+ console.log("init DB complete", (0, import_core52.platformNow)() - st);
82539
82539
  resolve2(db);
82540
82540
  };
82541
82541
  });
@@ -82561,21 +82561,21 @@ var require_lib19 = __commonJS({
82561
82561
  return {
82562
82562
  function: {
82563
82563
  GetClient: /* @__PURE__ */ __name(async (token, endpoint, opt) => {
82564
- const filterModel = (0, import_platform3.getMetadata)(import_client30.default.metadata.FilterModel) ?? "none";
82565
- const extraFilter = (0, import_platform3.getMetadata)(import_client30.default.metadata.ExtraFilter) ?? [];
82564
+ const filterModel = (0, import_platform4.getMetadata)(import_client31.default.metadata.FilterModel) ?? "none";
82565
+ const extraFilter = (0, import_platform4.getMetadata)(import_client31.default.metadata.ExtraFilter) ?? [];
82566
82566
  const handler = /* @__PURE__ */ __name(async (handler2) => {
82567
- const url4 = (0, import_core51.concatLink)(endpoint, `/${token}`);
82567
+ const url4 = (0, import_core52.concatLink)(endpoint, `/${token}`);
82568
82568
  const upgradeHandler = /* @__PURE__ */ __name((...txes) => {
82569
82569
  for (const tx of txes) {
82570
- if (tx?._class === import_core51.default.class.TxModelUpgrade) {
82570
+ if (tx?._class === import_core52.default.class.TxModelUpgrade) {
82571
82571
  opt?.onUpgrade?.();
82572
82572
  return;
82573
82573
  }
82574
- if (tx?._class === import_core51.default.class.TxWorkspaceEvent) {
82574
+ if (tx?._class === import_core52.default.class.TxWorkspaceEvent) {
82575
82575
  const event = tx;
82576
- if (event.event === import_core51.WorkspaceEvent.MaintenanceNotification) {
82577
- void (0, import_platform3.setPlatformStatus)(
82578
- new import_platform3.Status(import_platform3.Severity.WARNING, import_platform3.default.status.MaintenanceWarning, {
82576
+ if (event.event === import_core52.WorkspaceEvent.MaintenanceNotification) {
82577
+ void (0, import_platform4.setPlatformStatus)(
82578
+ new import_platform4.Status(import_platform4.Severity.WARNING, import_platform4.default.status.MaintenanceWarning, {
82579
82579
  time: event.params.timeMinutes,
82580
82580
  message: event.params.message ?? ""
82581
82581
  })
@@ -82590,7 +82590,7 @@ var require_lib19 = __commonJS({
82590
82590
  throw new Error("Workspace or account not found in token");
82591
82591
  }
82592
82592
  const newOpt = { ...opt };
82593
- const connectTimeout = opt?.connectionTimeout ?? (0, import_platform3.getMetadata)(import_client30.default.metadata.ConnectionTimeout);
82593
+ const connectTimeout = opt?.connectionTimeout ?? (0, import_platform4.getMetadata)(import_client31.default.metadata.ConnectionTimeout);
82594
82594
  let connectPromise;
82595
82595
  if ((connectTimeout ?? 0) > 0) {
82596
82596
  connectPromise = new Promise((resolve2, reject) => {
@@ -82611,7 +82611,7 @@ var require_lib19 = __commonJS({
82611
82611
  reject(error2);
82612
82612
  return;
82613
82613
  }
82614
- if (event !== import_core51.ClientConnectEvent.Maintenance) {
82614
+ if (event !== import_core52.ClientConnectEvent.Maintenance) {
82615
82615
  clearTimeout(connectTO);
82616
82616
  resolve2();
82617
82617
  }
@@ -82633,7 +82633,7 @@ var require_lib19 = __commonJS({
82633
82633
  }
82634
82634
  return txes;
82635
82635
  }, "modelFilter");
82636
- const client = (0, import_core51.createClient)(handler, modelFilter, createModelPersistence(getWSFromToken(token)), opt?.ctx);
82636
+ const client = (0, import_core52.createClient)(handler, modelFilter, createModelPersistence(getWSFromToken(token)), opt?.ctx);
82637
82637
  return await client;
82638
82638
  }, "GetClient")
82639
82639
  }
@@ -82641,17 +82641,17 @@ var require_lib19 = __commonJS({
82641
82641
  }, "default");
82642
82642
  function returnUITxes(txes, extraFilter) {
82643
82643
  const configs = /* @__PURE__ */ new Map();
82644
- (0, import_core51.fillConfiguration)(txes, configs);
82645
- const allowedPlugins = [...(0, import_platform3.getPlugins)(), ...(0, import_platform3.getMetadata)(import_client30.default.metadata.ExtraPlugins) ?? []];
82644
+ (0, import_core52.fillConfiguration)(txes, configs);
82645
+ const allowedPlugins = [...(0, import_platform4.getPlugins)(), ...(0, import_platform4.getMetadata)(import_client31.default.metadata.ExtraPlugins) ?? []];
82646
82646
  const excludedPlugins = Array.from(configs.values()).filter(
82647
82647
  (it) => !it.enabled || !allowedPlugins.includes(it.pluginId) || extraFilter.includes(it.pluginId)
82648
82648
  );
82649
- return (0, import_core51.pluginFilterTx)(excludedPlugins, configs, txes);
82649
+ return (0, import_core52.pluginFilterTx)(excludedPlugins, configs, txes);
82650
82650
  }
82651
82651
  __name(returnUITxes, "returnUITxes");
82652
82652
  function returnClientTxes(txes) {
82653
82653
  const configs = /* @__PURE__ */ new Map();
82654
- (0, import_core51.fillConfiguration)(txes, configs);
82654
+ (0, import_core52.fillConfiguration)(txes, configs);
82655
82655
  const excludedPlugins = Array.from(configs.values()).filter((it) => !it.enabled || it.pluginId.startsWith("server-"));
82656
82656
  const toExclude = /* @__PURE__ */ new Set([
82657
82657
  "workbench:class:Application",
@@ -82677,8 +82677,8 @@ var require_lib19 = __commonJS({
82677
82677
  "setting:class:WorkspaceSettingCategory",
82678
82678
  "notification:class:NotificationProvider"
82679
82679
  ]);
82680
- const result = (0, import_core51.pluginFilterTx)(excludedPlugins, configs, txes).filter((tx) => {
82681
- if (tx?._class === import_core51.default.class.TxCreateDoc || tx?._class === import_core51.default.class.TxUpdateDoc || tx?._class === import_core51.default.class.TxRemoveDoc) {
82680
+ const result = (0, import_core52.pluginFilterTx)(excludedPlugins, configs, txes).filter((tx) => {
82681
+ if (tx?._class === import_core52.default.class.TxCreateDoc || tx?._class === import_core52.default.class.TxUpdateDoc || tx?._class === import_core52.default.class.TxRemoveDoc) {
82682
82682
  const cud = tx;
82683
82683
  if (toExclude.has(cud.objectClass)) {
82684
82684
  return false;
@@ -82690,7 +82690,7 @@ var require_lib19 = __commonJS({
82690
82690
  }
82691
82691
  __name(returnClientTxes, "returnClientTxes");
82692
82692
  function createModelPersistence(workspace) {
82693
- const overrideStore = (0, import_platform3.getMetadata)(import_client30.default.metadata.OverridePersistenceStore);
82693
+ const overrideStore = (0, import_platform4.getMetadata)(import_client31.default.metadata.OverridePersistenceStore);
82694
82694
  if (overrideStore !== void 0) {
82695
82695
  return overrideStore;
82696
82696
  }
@@ -82787,9 +82787,9 @@ var require_client6 = __commonJS({
82787
82787
  });
82788
82788
  module2.exports = __toCommonJS2(client_exports);
82789
82789
  var import_account_client2 = require_lib5();
82790
- var import_client30 = __toESM2(require_lib6());
82791
- var import_core51 = require_lib4();
82792
- var import_platform3 = require_lib();
82790
+ var import_client31 = __toESM2(require_lib6());
82791
+ var import_core52 = require_lib4();
82792
+ var import_platform4 = require_lib();
82793
82793
  var import_config8 = require_config();
82794
82794
  var import_markup11 = require_markup();
82795
82795
  var import_utils14 = require_utils9();
@@ -82805,7 +82805,7 @@ var require_client6 = __commonJS({
82805
82805
  const account = {
82806
82806
  uuid: wsLoginInfo.account,
82807
82807
  role: wsLoginInfo.role,
82808
- primarySocialId: (0, import_core51.pickPrimarySocialId)(socialIds)._id,
82808
+ primarySocialId: (0, import_core52.pickPrimarySocialId)(socialIds)._id,
82809
82809
  socialIds: socialIds.map((si) => si._id),
82810
82810
  fullSocialIds: socialIds
82811
82811
  };
@@ -82813,9 +82813,9 @@ var require_client6 = __commonJS({
82813
82813
  }
82814
82814
  __name(connect, "connect");
82815
82815
  async function createClient(url4, endpoint, token, workspaceUuid, account, config3, options) {
82816
- (0, import_platform3.addLocation)(import_client30.clientId, () => Promise.resolve().then(() => __toESM(require_lib19())));
82816
+ (0, import_platform4.addLocation)(import_client31.clientId, () => Promise.resolve().then(() => __toESM(require_lib19())));
82817
82817
  const { socketFactory, connectionTimeout } = options;
82818
- const clientFactory = await (0, import_platform3.getResource)(import_client30.default.function.GetClient);
82818
+ const clientFactory = await (0, import_platform4.getResource)(import_client31.default.function.GetClient);
82819
82819
  const connection = await clientFactory(token, endpoint, {
82820
82820
  socketFactory,
82821
82821
  connectionTimeout
@@ -82831,7 +82831,7 @@ var require_client6 = __commonJS({
82831
82831
  this.config = config3;
82832
82832
  this.connection = connection;
82833
82833
  this.account = account;
82834
- this.client = new import_core51.TxOperations(connection, account.primarySocialId);
82834
+ this.client = new import_core52.TxOperations(connection, account.primarySocialId);
82835
82835
  this.markup = (0, import_markup11.createMarkupOperations)(url4, workspace, token, config3);
82836
82836
  }
82837
82837
  static {
@@ -82871,7 +82871,7 @@ var require_client6 = __commonJS({
82871
82871
  }
82872
82872
  // DocOperations
82873
82873
  async createDoc(_class, space, attributes, id) {
82874
- id ??= (0, import_core51.generateId)();
82874
+ id ??= (0, import_core52.generateId)();
82875
82875
  const data = await this.processMarkup(_class, id, attributes);
82876
82876
  return await this.client.createDoc(_class, space, data, id);
82877
82877
  }
@@ -82884,7 +82884,7 @@ var require_client6 = __commonJS({
82884
82884
  }
82885
82885
  // CollectionOperations
82886
82886
  async addCollection(_class, space, attachedTo, attachedToClass, collection, attributes, id) {
82887
- id ??= (0, import_core51.generateId)();
82887
+ id ??= (0, import_core52.generateId)();
82888
82888
  const data = await this.processMarkup(_class, id, attributes);
82889
82889
  return await this.client.addCollection(_class, space, attachedTo, attachedToClass, collection, data, id);
82890
82890
  }
@@ -83211,8 +83211,8 @@ var require_rest = __commonJS({
83211
83211
  createRestClient: () => createRestClient2
83212
83212
  });
83213
83213
  module2.exports = __toCommonJS2(rest_exports);
83214
- var import_core51 = require_lib4();
83215
- var import_platform3 = require_lib();
83214
+ var import_core52 = require_lib4();
83215
+ var import_platform4 = require_lib();
83216
83216
  var import_utils14 = require_utils9();
83217
83217
  var import_utils22 = require_utils10();
83218
83218
  function createRestClient2(endpoint, workspaceId, token) {
@@ -83266,18 +83266,18 @@ var require_rest = __commonJS({
83266
83266
  if (options !== void 0 && Object.keys(options).length > 0) {
83267
83267
  params.append("options", JSON.stringify(options));
83268
83268
  }
83269
- const requestUrl = (0, import_core51.concatLink)(this.endpoint, `/api/v1/find-all/${this.workspace}?${params.toString()}`);
83269
+ const requestUrl = (0, import_core52.concatLink)(this.endpoint, `/api/v1/find-all/${this.workspace}?${params.toString()}`);
83270
83270
  const result = await (0, import_utils22.withRetry)(async () => {
83271
83271
  const response = await fetch(requestUrl, this.requestInit());
83272
83272
  if (!response.ok) {
83273
83273
  await this.checkRateLimits(response);
83274
- throw new import_platform3.PlatformError((0, import_platform3.unknownError)(response.statusText));
83274
+ throw new import_platform4.PlatformError((0, import_platform4.unknownError)(response.statusText));
83275
83275
  }
83276
83276
  this.updateRateLimit(response);
83277
83277
  return await (0, import_utils22.extractJson)(response);
83278
83278
  }, isRLE);
83279
83279
  if (result.error !== void 0) {
83280
- throw new import_platform3.PlatformError(result.error);
83280
+ throw new import_platform4.PlatformError(result.error);
83281
83281
  }
83282
83282
  if (result.lookupMap !== void 0) {
83283
83283
  for (const d of result) {
@@ -83340,24 +83340,24 @@ var require_rest = __commonJS({
83340
83340
  }
83341
83341
  }
83342
83342
  async getAccount() {
83343
- const requestUrl = (0, import_core51.concatLink)(this.endpoint, `/api/v1/account/${this.workspace}`);
83343
+ const requestUrl = (0, import_core52.concatLink)(this.endpoint, `/api/v1/account/${this.workspace}`);
83344
83344
  await this.checkRate();
83345
83345
  const result = await (0, import_utils22.withRetry)(async () => {
83346
83346
  const response = await fetch(requestUrl, this.requestInit());
83347
83347
  if (!response.ok) {
83348
83348
  await this.checkRateLimits(response);
83349
- throw new import_platform3.PlatformError((0, import_platform3.unknownError)(response.statusText));
83349
+ throw new import_platform4.PlatformError((0, import_platform4.unknownError)(response.statusText));
83350
83350
  }
83351
83351
  this.updateRateLimit(response);
83352
83352
  return await (0, import_utils22.extractJson)(response);
83353
83353
  });
83354
83354
  if (result.error !== void 0) {
83355
- throw new import_platform3.PlatformError(result.error);
83355
+ throw new import_platform4.PlatformError(result.error);
83356
83356
  }
83357
83357
  return result;
83358
83358
  }
83359
83359
  async getModel(full = false) {
83360
- const requestUrl = new URL((0, import_core51.concatLink)(this.endpoint, `/api/v1/load-model/${this.workspace}`));
83360
+ const requestUrl = new URL((0, import_core52.concatLink)(this.endpoint, `/api/v1/load-model/${this.workspace}`));
83361
83361
  if (full) {
83362
83362
  requestUrl.searchParams.append("full", "true");
83363
83363
  }
@@ -83366,18 +83366,18 @@ var require_rest = __commonJS({
83366
83366
  const response = await fetch(requestUrl, this.requestInit());
83367
83367
  if (!response.ok) {
83368
83368
  await this.checkRateLimits(response);
83369
- throw new import_platform3.PlatformError((0, import_platform3.unknownError)(response.statusText));
83369
+ throw new import_platform4.PlatformError((0, import_platform4.unknownError)(response.statusText));
83370
83370
  }
83371
83371
  this.updateRateLimit(response);
83372
83372
  const modelResponse = await (0, import_utils22.extractJson)(response);
83373
- const hierarchy = new import_core51.Hierarchy();
83374
- const model = new import_core51.ModelDb(hierarchy);
83375
- const ctx = new import_core51.MeasureMetricsContext("loadModel", {});
83376
- (0, import_core51.buildModel)(ctx, modelResponse, void 0, hierarchy, model);
83373
+ const hierarchy = new import_core52.Hierarchy();
83374
+ const model = new import_core52.ModelDb(hierarchy);
83375
+ const ctx = new import_core52.MeasureMetricsContext("loadModel", {});
83376
+ (0, import_core52.buildModel)(ctx, modelResponse, void 0, hierarchy, model);
83377
83377
  return { hierarchy, model };
83378
83378
  }, isRLE);
83379
83379
  if (result.error !== void 0) {
83380
- throw new import_platform3.PlatformError(result.error);
83380
+ throw new import_platform4.PlatformError(result.error);
83381
83381
  }
83382
83382
  return result;
83383
83383
  }
@@ -83385,7 +83385,7 @@ var require_rest = __commonJS({
83385
83385
  return (await this.findAll(_class, query, { ...options, limit: 1 })).shift();
83386
83386
  }
83387
83387
  async tx(tx) {
83388
- const requestUrl = (0, import_core51.concatLink)(this.endpoint, `/api/v1/tx/${this.workspace}`);
83388
+ const requestUrl = (0, import_core52.concatLink)(this.endpoint, `/api/v1/tx/${this.workspace}`);
83389
83389
  await this.checkRate();
83390
83390
  const result = await (0, import_utils22.withRetry)(async () => {
83391
83391
  const response = await fetch(requestUrl, {
@@ -83396,13 +83396,13 @@ var require_rest = __commonJS({
83396
83396
  });
83397
83397
  if (!response.ok) {
83398
83398
  await this.checkRateLimits(response);
83399
- throw new import_platform3.PlatformError((0, import_platform3.unknownError)(response.statusText));
83399
+ throw new import_platform4.PlatformError((0, import_platform4.unknownError)(response.statusText));
83400
83400
  }
83401
83401
  this.updateRateLimit(response);
83402
83402
  return await (0, import_utils22.extractJson)(response);
83403
83403
  }, isRLE);
83404
83404
  if (result.error !== void 0) {
83405
- throw new import_platform3.PlatformError(result.error);
83405
+ throw new import_platform4.PlatformError(result.error);
83406
83406
  }
83407
83407
  return result;
83408
83408
  }
@@ -83419,7 +83419,7 @@ var require_rest = __commonJS({
83419
83419
  if (options.limit != null) {
83420
83420
  params.append("limit", `${options.limit}`);
83421
83421
  }
83422
- const requestUrl = (0, import_core51.concatLink)(this.endpoint, `/api/v1/search-fulltext/${this.workspace}?${params.toString()}`);
83422
+ const requestUrl = (0, import_core52.concatLink)(this.endpoint, `/api/v1/search-fulltext/${this.workspace}?${params.toString()}`);
83423
83423
  const response = await fetch(requestUrl, {
83424
83424
  method: "GET",
83425
83425
  headers: this.jsonHeaders(),
@@ -83427,18 +83427,18 @@ var require_rest = __commonJS({
83427
83427
  });
83428
83428
  if (!response.ok) {
83429
83429
  await this.checkRateLimits(response);
83430
- throw new import_platform3.PlatformError((0, import_platform3.unknownError)(response.statusText));
83430
+ throw new import_platform4.PlatformError((0, import_platform4.unknownError)(response.statusText));
83431
83431
  }
83432
83432
  this.updateRateLimit(response);
83433
83433
  return await (0, import_utils22.extractJson)(response);
83434
83434
  });
83435
83435
  if (result.error !== void 0) {
83436
- throw new import_platform3.PlatformError(result.error);
83436
+ throw new import_platform4.PlatformError(result.error);
83437
83437
  }
83438
83438
  return result;
83439
83439
  }
83440
83440
  async domainRequest(domain3, params, options) {
83441
- const requestUrl = (0, import_core51.concatLink)(this.endpoint, `/api/v1/request/${domain3}/${this.workspace}`);
83441
+ const requestUrl = (0, import_core52.concatLink)(this.endpoint, `/api/v1/request/${domain3}/${this.workspace}`);
83442
83442
  await this.checkRate();
83443
83443
  return await (0, import_utils22.withRetry)(async () => {
83444
83444
  const response = await fetch(requestUrl, {
@@ -83449,7 +83449,7 @@ var require_rest = __commonJS({
83449
83449
  });
83450
83450
  if (!response.ok) {
83451
83451
  await this.checkRateLimits(response);
83452
- throw new import_platform3.PlatformError((0, import_platform3.unknownError)(response.statusText));
83452
+ throw new import_platform4.PlatformError((0, import_platform4.unknownError)(response.statusText));
83453
83453
  }
83454
83454
  this.updateRateLimit(response);
83455
83455
  const value3 = await (0, import_utils22.extractJson)(response);
@@ -83457,7 +83457,7 @@ var require_rest = __commonJS({
83457
83457
  }, isRLE);
83458
83458
  }
83459
83459
  async ensurePerson(socialType, socialValue, firstName, lastName) {
83460
- const requestUrl = (0, import_core51.concatLink)(this.endpoint, `/api/v1/ensure-person/${this.workspace}`);
83460
+ const requestUrl = (0, import_core52.concatLink)(this.endpoint, `/api/v1/ensure-person/${this.workspace}`);
83461
83461
  await this.checkRate();
83462
83462
  const result = await (0, import_utils22.withRetry)(async () => {
83463
83463
  const response = await fetch(requestUrl, {
@@ -83473,13 +83473,13 @@ var require_rest = __commonJS({
83473
83473
  });
83474
83474
  if (!response.ok) {
83475
83475
  await this.checkRateLimits(response);
83476
- throw new import_platform3.PlatformError((0, import_platform3.unknownError)(response.statusText));
83476
+ throw new import_platform4.PlatformError((0, import_platform4.unknownError)(response.statusText));
83477
83477
  }
83478
83478
  this.updateRateLimit(response);
83479
83479
  return await (0, import_utils22.extractJson)(response);
83480
83480
  }, isRLE);
83481
83481
  if (result.error !== void 0) {
83482
- throw new import_platform3.PlatformError(result.error);
83482
+ throw new import_platform4.PlatformError(result.error);
83483
83483
  }
83484
83484
  return result;
83485
83485
  }
@@ -83514,13 +83514,13 @@ var require_tx2 = __commonJS({
83514
83514
  createRestTxOperations: () => createRestTxOperations2
83515
83515
  });
83516
83516
  module2.exports = __toCommonJS2(tx_exports);
83517
- var import_core51 = require_lib4();
83517
+ var import_core52 = require_lib4();
83518
83518
  var import_rest = require_rest();
83519
83519
  async function createRestTxOperations2(endpoint, workspaceId, token, fullModel = false) {
83520
83520
  const restClient = new import_rest.RestClientImpl(endpoint, workspaceId, token);
83521
83521
  const account = await restClient.getAccount();
83522
83522
  const { hierarchy, model } = await restClient.getModel(fullModel);
83523
- return new import_core51.TxOperations(new RestTxClient(restClient, hierarchy, model, account), account.socialIds[0]);
83523
+ return new import_core52.TxOperations(new RestTxClient(restClient, hierarchy, model, account), account.socialIds[0]);
83524
83524
  }
83525
83525
  __name(createRestTxOperations2, "createRestTxOperations");
83526
83526
  var RestTxClient = class {
@@ -83541,7 +83541,7 @@ var require_tx2 = __commonJS({
83541
83541
  const result = data.map((v) => {
83542
83542
  return this.hierarchy.updateLookupMixin(_class, v, options);
83543
83543
  });
83544
- return (0, import_core51.toFindResult)(result, data.total);
83544
+ return (0, import_core52.toFindResult)(result, data.total);
83545
83545
  }
83546
83546
  async domainRequest(domain3, params, options) {
83547
83547
  return await this.client.domainRequest(domain3, params, options);
@@ -83723,7 +83723,7 @@ var require_client7 = __commonJS({
83723
83723
  createStorageClient: () => createStorageClient2
83724
83724
  });
83725
83725
  module2.exports = __toCommonJS2(client_exports);
83726
- var import_core51 = __toESM2(require_lib4());
83726
+ var import_core52 = __toESM2(require_lib4());
83727
83727
  var import_stream2 = require("stream");
83728
83728
  var import_config8 = require_config();
83729
83729
  var import_error = require_error3();
@@ -83760,13 +83760,13 @@ var require_client7 = __commonJS({
83760
83760
  const size13 = parseInt(headers.get("Content-Length") ?? "0", 10);
83761
83761
  return {
83762
83762
  provider: "",
83763
- _class: import_core51.default.class.Blob,
83763
+ _class: import_core52.default.class.Blob,
83764
83764
  _id: objectName,
83765
83765
  contentType: headers.get("Content-Type") ?? "",
83766
83766
  size: isNaN(size13) ? 0 : size13 ?? 0,
83767
83767
  etag: headers.get("ETag") ?? "",
83768
- space: import_core51.default.space.Configuration,
83769
- modifiedBy: import_core51.default.account.System,
83768
+ space: import_core52.default.space.Configuration,
83769
+ modifiedBy: import_core52.default.account.System,
83770
83770
  modifiedOn: isNaN(lastModified) ? 0 : lastModified,
83771
83771
  version: null
83772
83772
  };
@@ -83801,11 +83801,11 @@ var require_client7 = __commonJS({
83801
83801
  if (Object.hasOwn(result[0], "id")) {
83802
83802
  const fileResult = result[0];
83803
83803
  return {
83804
- _class: import_core51.default.class.Blob,
83804
+ _class: import_core52.default.class.Blob,
83805
83805
  _id: fileResult.id,
83806
- space: import_core51.default.space.Configuration,
83806
+ space: import_core52.default.space.Configuration,
83807
83807
  modifiedOn: fileResult.metadata.lastModified,
83808
- modifiedBy: import_core51.default.account.System,
83808
+ modifiedBy: import_core52.default.account.System,
83809
83809
  provider: "",
83810
83810
  contentType: fileResult.metadata.contentType,
83811
83811
  etag: fileResult.metadata.etag,
@@ -83879,11 +83879,11 @@ var require_client7 = __commonJS({
83879
83879
  async function connectStorage(url4, options, config3) {
83880
83880
  config3 ??= await (0, import_config8.loadServerConfig)(url4);
83881
83881
  const token = await (0, import_utils14.getWorkspaceToken)(url4, options, config3);
83882
- const filesUrl = (config3.FILES_URL.startsWith("/") ? (0, import_core51.concatLink)(url4, config3.FILES_URL) : config3.FILES_URL).replace(
83882
+ const filesUrl = (config3.FILES_URL.startsWith("/") ? (0, import_core52.concatLink)(url4, config3.FILES_URL) : config3.FILES_URL).replace(
83883
83883
  ":workspace",
83884
83884
  token.workspaceId
83885
83885
  );
83886
- const uploadUrl = (config3.UPLOAD_URL.startsWith("/") ? (0, import_core51.concatLink)(url4, config3.UPLOAD_URL) : config3.UPLOAD_URL).replace(":workspace", token.workspaceId);
83886
+ const uploadUrl = (config3.UPLOAD_URL.startsWith("/") ? (0, import_core52.concatLink)(url4, config3.UPLOAD_URL) : config3.UPLOAD_URL).replace(":workspace", token.workspaceId);
83887
83887
  return new StorageClientImpl(filesUrl, uploadUrl, token.token, token.workspaceId);
83888
83888
  }
83889
83889
  __name(connectStorage, "connectStorage");
@@ -83936,11 +83936,11 @@ var require_storage2 = __commonJS({
83936
83936
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
83937
83937
  var storage_exports = {};
83938
83938
  __export2(storage_exports, {
83939
- connectStorage: () => import_client30.connectStorage,
83940
- createStorageClient: () => import_client30.createStorageClient
83939
+ connectStorage: () => import_client31.connectStorage,
83940
+ createStorageClient: () => import_client31.createStorageClient
83941
83941
  });
83942
83942
  module2.exports = __toCommonJS2(storage_exports);
83943
- var import_client30 = require_client7();
83943
+ var import_client31 = require_client7();
83944
83944
  __reExport2(storage_exports, require_error3(), module2.exports);
83945
83945
  __reExport2(storage_exports, require_types8(), module2.exports);
83946
83946
  }
@@ -114383,9 +114383,9 @@ var require_lib23 = __commonJS({
114383
114383
  default: () => index_default
114384
114384
  });
114385
114385
  module2.exports = __toCommonJS2(index_exports2);
114386
- var import_platform3 = require_lib();
114386
+ var import_platform4 = require_lib();
114387
114387
  var activityId = "activity";
114388
- var index_default = (0, import_platform3.plugin)(activityId, {
114388
+ var index_default = (0, import_platform4.plugin)(activityId, {
114389
114389
  mixin: {
114390
114390
  ActivityDoc: "",
114391
114391
  ActivityAttributeUpdatesPresenter: "",
@@ -114553,10 +114553,10 @@ var require_lib24 = __commonJS({
114553
114553
  default: () => index_default
114554
114554
  });
114555
114555
  module2.exports = __toCommonJS2(index_exports2);
114556
- var import_platform3 = require_lib();
114556
+ var import_platform4 = require_lib();
114557
114557
  __reExport2(index_exports2, require_analytics(), module2.exports);
114558
114558
  var attachmentId = "attachment";
114559
- var index_default = (0, import_platform3.plugin)(attachmentId, {
114559
+ var index_default = (0, import_platform4.plugin)(attachmentId, {
114560
114560
  component: {
114561
114561
  Attachments: "",
114562
114562
  Photos: "",
@@ -114652,7 +114652,7 @@ var require_utils15 = __commonJS({
114652
114652
  getWeekday: () => getWeekday
114653
114653
  });
114654
114654
  module2.exports = __toCommonJS2(utils_exports);
114655
- var import_core51 = require_lib4();
114655
+ var import_core52 = require_lib4();
114656
114656
  var import__ = __toESM2(require_lib25());
114657
114657
  function getInstance(event, date7) {
114658
114658
  const diff8 = event.dueDate - event.date;
@@ -114664,7 +114664,7 @@ var require_utils15 = __commonJS({
114664
114664
  originalStartTime: date7,
114665
114665
  _class: import__.default.class.ReccuringInstance,
114666
114666
  eventId: generateEventId3(),
114667
- _id: (0, import_core51.generateId)(),
114667
+ _id: (0, import_core52.generateId)(),
114668
114668
  virtual: true
114669
114669
  };
114670
114670
  }
@@ -114977,7 +114977,7 @@ var require_utils15 = __commonJS({
114977
114977
  }
114978
114978
  __name(getAllEvents, "getAllEvents");
114979
114979
  function generateEventId3() {
114980
- const id = (0, import_core51.generateId)();
114980
+ const id = (0, import_core52.generateId)();
114981
114981
  return encodeToBase32Hex(id);
114982
114982
  }
114983
114983
  __name(generateEventId3, "generateEventId");
@@ -115051,7 +115051,7 @@ var require_lib25 = __commonJS({
115051
115051
  default: () => index_default
115052
115052
  });
115053
115053
  module2.exports = __toCommonJS2(index_exports2);
115054
- var import_platform3 = require_lib();
115054
+ var import_platform4 = require_lib();
115055
115055
  __reExport2(index_exports2, require_utils15(), module2.exports);
115056
115056
  var AccessLevel5 = /* @__PURE__ */ ((AccessLevel22) => {
115057
115057
  AccessLevel22["FreeBusyReader"] = "freeBusyReader";
@@ -115063,7 +115063,7 @@ var require_lib25 = __commonJS({
115063
115063
  var calendarIntegrationKind = "google-calendar";
115064
115064
  var caldavIntegrationKind = "caldav";
115065
115065
  var calendarId = "calendar";
115066
- var calendarPlugin = (0, import_platform3.plugin)(calendarId, {
115066
+ var calendarPlugin = (0, import_platform4.plugin)(calendarId, {
115067
115067
  class: {
115068
115068
  Calendar: "",
115069
115069
  ExternalCalendar: "",
@@ -115262,11 +115262,11 @@ var require_lib26 = __commonJS({
115262
115262
  default: () => index_default
115263
115263
  });
115264
115264
  module2.exports = __toCommonJS2(index_exports2);
115265
- var import_platform3 = require_lib();
115265
+ var import_platform4 = require_lib();
115266
115266
  __reExport2(index_exports2, require_analytics2(), module2.exports);
115267
115267
  var cardId = "card";
115268
115268
  var DOMAIN_CARD = "card";
115269
- var cardPlugin2 = (0, import_platform3.plugin)(cardId, {
115269
+ var cardPlugin2 = (0, import_platform4.plugin)(cardId, {
115270
115270
  class: {
115271
115271
  Card: "",
115272
115272
  MasterTag: "",
@@ -115391,7 +115391,7 @@ var require_utils16 = __commonJS({
115391
115391
  });
115392
115392
  module2.exports = __toCommonJS2(utils_exports);
115393
115393
  var import_fast_equals = require_cjs();
115394
- var import_core51 = __toESM2(require_lib4());
115394
+ var import_core52 = __toESM2(require_lib4());
115395
115395
  var import__ = __toESM2(require_lib27());
115396
115396
  async function getDirectChannel(client, me, employeeAccount) {
115397
115397
  const accIds = [me, employeeAccount].sort();
@@ -115401,7 +115401,7 @@ var require_utils16 = __commonJS({
115401
115401
  return dm._id;
115402
115402
  }
115403
115403
  }
115404
- return await client.createDoc(import__.default.class.DirectMessage, import_core51.default.space.Space, {
115404
+ return await client.createDoc(import__.default.class.DirectMessage, import_core52.default.space.Space, {
115405
115405
  name: "",
115406
115406
  description: "",
115407
115407
  private: true,
@@ -115475,11 +115475,11 @@ var require_lib27 = __commonJS({
115475
115475
  default: () => index_default
115476
115476
  });
115477
115477
  module2.exports = __toCommonJS2(index_exports2);
115478
- var import_platform3 = require_lib();
115478
+ var import_platform4 = require_lib();
115479
115479
  __reExport2(index_exports2, require_utils16(), module2.exports);
115480
115480
  __reExport2(index_exports2, require_analytics3(), module2.exports);
115481
115481
  var chunterId = "chunter";
115482
- var index_default = (0, import_platform3.plugin)(chunterId, {
115482
+ var index_default = (0, import_platform4.plugin)(chunterId, {
115483
115483
  icon: {
115484
115484
  Chunter: "",
115485
115485
  Hashtag: "",
@@ -115705,18 +115705,18 @@ var require_cache4 = __commonJS({
115705
115705
  default: () => ContactCache
115706
115706
  });
115707
115707
  module2.exports = __toCommonJS2(cache_exports);
115708
- var import_core51 = __toESM2(require_lib4());
115708
+ var import_core52 = __toESM2(require_lib4());
115709
115709
  var import__ = __toESM2(require_lib28());
115710
115710
  function isCreateTx(tx) {
115711
- return tx._class === import_core51.default.class.TxCreateDoc;
115711
+ return tx._class === import_core52.default.class.TxCreateDoc;
115712
115712
  }
115713
115713
  __name(isCreateTx, "isCreateTx");
115714
115714
  function isUpdateTx(tx) {
115715
- return tx._class === import_core51.default.class.TxUpdateDoc;
115715
+ return tx._class === import_core52.default.class.TxUpdateDoc;
115716
115716
  }
115717
115717
  __name(isUpdateTx, "isUpdateTx");
115718
115718
  function isMixinTx(tx) {
115719
- return tx._class === import_core51.default.class.TxMixin;
115719
+ return tx._class === import_core52.default.class.TxMixin;
115720
115720
  }
115721
115721
  __name(isMixinTx, "isMixinTx");
115722
115722
  function isPersonTx(tx) {
@@ -115823,7 +115823,7 @@ var require_cache4 = __commonJS({
115823
115823
  const ref = tx.objectId;
115824
115824
  const person = this._personByRef.get(ref);
115825
115825
  if (person === void 0) return;
115826
- const createdPerson = import_core51.TxProcessor.createDoc2Doc(tx);
115826
+ const createdPerson = import_core52.TxProcessor.createDoc2Doc(tx);
115827
115827
  this._personByRef.set(ref, createdPerson);
115828
115828
  const personIds = Array.from(this._personIdsByPersonRef.get(ref) ?? []);
115829
115829
  for (const personId of personIds) {
@@ -115841,7 +115841,7 @@ var require_cache4 = __commonJS({
115841
115841
  const newPersonRef = tx.attachedTo;
115842
115842
  this._personRefByPersonId.set(personId, newPersonRef);
115843
115843
  this.addPersonIdToPersonRef(newPersonRef, personId);
115844
- const createdSocialId = import_core51.TxProcessor.createDoc2Doc(tx);
115844
+ const createdSocialId = import_core52.TxProcessor.createDoc2Doc(tx);
115845
115845
  this._socialIdByPersonId.set(personId, createdSocialId);
115846
115846
  this.broadcastChange({
115847
115847
  personRef: newPersonRef,
@@ -115852,7 +115852,7 @@ var require_cache4 = __commonJS({
115852
115852
  const ref = tx.objectId;
115853
115853
  const person = this._personByRef.get(ref);
115854
115854
  if (person == null) return;
115855
- const updatedPerson = isUpdateTx(tx) ? import_core51.TxProcessor.updateDoc2Doc(person, tx) : import_core51.TxProcessor.updateMixin4Doc(person, tx);
115855
+ const updatedPerson = isUpdateTx(tx) ? import_core52.TxProcessor.updateDoc2Doc(person, tx) : import_core52.TxProcessor.updateMixin4Doc(person, tx);
115856
115856
  this._personByRef.set(ref, updatedPerson);
115857
115857
  const personIds = Array.from(this._personIdsByPersonRef.get(ref) ?? []);
115858
115858
  for (const personId of personIds) {
@@ -115967,8 +115967,8 @@ var require_utils17 = __commonJS({
115967
115967
  setCurrentEmployeeSpace: () => setCurrentEmployeeSpace
115968
115968
  });
115969
115969
  module2.exports = __toCommonJS2(utils_exports);
115970
- var import_core51 = require_lib4();
115971
- var import_platform3 = require_lib();
115970
+ var import_core52 = require_lib4();
115971
+ var import_platform4 = require_lib();
115972
115972
  var import__ = __toESM2(require_lib28());
115973
115973
  var import_types12 = require_types10();
115974
115974
  var import_cache2 = __toESM2(require_cache4());
@@ -116112,7 +116112,7 @@ var require_utils17 = __commonJS({
116112
116112
  }
116113
116113
  __name(getLastName, "getLastName");
116114
116114
  function formatName2(name, lastNameFirst) {
116115
- const lastNameFirstCombined = lastNameFirst !== void 0 ? lastNameFirst === "true" : (0, import_platform3.getMetadata)(import__.default.metadata.LastNameFirst) === true;
116115
+ const lastNameFirstCombined = lastNameFirst !== void 0 ? lastNameFirst === "true" : (0, import_platform4.getMetadata)(import__.default.metadata.LastNameFirst) === true;
116116
116116
  return lastNameFirstCombined ? getLastName(name) + " " + getFirstName(name) : getFirstName(name) + " " + getLastName(name);
116117
116117
  }
116118
116118
  __name(formatName2, "formatName");
@@ -116171,7 +116171,7 @@ var require_utils17 = __commonJS({
116171
116171
  if (socialIds.length === 0) {
116172
116172
  return;
116173
116173
  }
116174
- return (0, import_core51.pickPrimarySocialId)(socialIds)._id;
116174
+ return (0, import_core52.pickPrimarySocialId)(socialIds)._id;
116175
116175
  }
116176
116176
  __name(getPrimarySocialId, "getPrimarySocialId");
116177
116177
  async function getAllSocialStringsByPersonId(client, personId) {
@@ -116210,12 +116210,12 @@ var require_utils17 = __commonJS({
116210
116210
  __name(getSocialStringsByEmployee, "getSocialStringsByEmployee");
116211
116211
  async function getAllAccounts(client) {
116212
116212
  const employees = await client.findAll(import__.default.mixin.Employee, { active: true });
116213
- return employees.map((it) => it.personUuid).filter(import_core51.notEmpty);
116213
+ return employees.map((it) => it.personUuid).filter(import_core52.notEmpty);
116214
116214
  }
116215
116215
  __name(getAllAccounts, "getAllAccounts");
116216
116216
  async function getAllUserAccounts(client) {
116217
116217
  const employees = await client.findAll(import__.default.mixin.Employee, { active: true });
116218
- return employees.map((it) => it.personUuid).filter(import_core51.notEmpty);
116218
+ return employees.map((it) => it.personUuid).filter(import_core52.notEmpty);
116219
116219
  }
116220
116220
  __name(getAllUserAccounts, "getAllUserAccounts");
116221
116221
  async function ensureEmployee(ctx, me, client, socialIds, getGlobalPerson) {
@@ -116224,7 +116224,7 @@ var require_utils17 = __commonJS({
116224
116224
  }
116225
116225
  __name(ensureEmployee, "ensureEmployee");
116226
116226
  async function ensureEmployeeForPerson(ctx, me, person, client, socialIds, globalPerson) {
116227
- const txFactory = new import_core51.TxFactory(me.primarySocialId);
116227
+ const txFactory = new import_core52.TxFactory(me.primarySocialId);
116228
116228
  const personByUuid = await client.findOne(import__.default.class.Person, { personUuid: person.uuid });
116229
116229
  let personRef = personByUuid?._id;
116230
116230
  if (personRef === void 0) {
@@ -116245,7 +116245,7 @@ var require_utils17 = __commonJS({
116245
116245
  city: globalPerson.city,
116246
116246
  avatarType: import__.AvatarType.COLOR
116247
116247
  };
116248
- personRef = (0, import_core51.generateId)();
116248
+ personRef = (0, import_core52.generateId)();
116249
116249
  const createPersonTx = txFactory.createTxCreateDoc(import__.default.class.Person, import__.default.space.Contacts, data, personRef);
116250
116250
  await client.tx(createPersonTx);
116251
116251
  });
@@ -116255,7 +116255,7 @@ var require_utils17 = __commonJS({
116255
116255
  });
116256
116256
  await client.tx(updatePersonTx);
116257
116257
  }
116258
- const existingIdentifiers = (0, import_core51.toIdMap)(
116258
+ const existingIdentifiers = (0, import_core52.toIdMap)(
116259
116259
  await client.findAll(import__.default.class.SocialIdentity, { _id: { $in: person.socialIds } })
116260
116260
  );
116261
116261
  for (const socialId of socialIds) {
@@ -116280,7 +116280,7 @@ var require_utils17 = __commonJS({
116280
116280
  collection: "socialIds",
116281
116281
  type: socialId.type,
116282
116282
  value: socialId.value,
116283
- key: (0, import_core51.buildSocialIdString)(socialId),
116283
+ key: (0, import_core52.buildSocialIdString)(socialId),
116284
116284
  // TODO: fill it in trigger or on DB level as stored calculated column or smth?
116285
116285
  verifiedOn: socialId.verifiedOn,
116286
116286
  isDeleted: socialId.isDeleted
@@ -116321,9 +116321,9 @@ var require_utils17 = __commonJS({
116321
116321
  }
116322
116322
  }
116323
116323
  }
116324
- const employeeRole = person.role === import_core51.AccountRole.Guest || person.role === import_core51.AccountRole.ReadOnlyGuest ? "GUEST" : "USER";
116324
+ const employeeRole = person.role === import_core52.AccountRole.Guest || person.role === import_core52.AccountRole.ReadOnlyGuest ? "GUEST" : "USER";
116325
116325
  const employee = await client.findOne(import__.default.mixin.Employee, { _id: personRef });
116326
- if (employee === void 0 || !import_core51.Hierarchy.hasMixin(employee, import__.default.mixin.Employee) || !employee.active || employee.role !== employeeRole) {
116326
+ if (employee === void 0 || !import_core52.Hierarchy.hasMixin(employee, import__.default.mixin.Employee) || !employee.active || employee.role !== employeeRole) {
116327
116327
  await ctx.with("create-employee", {}, async () => {
116328
116328
  if (personRef === void 0) {
116329
116329
  console.error("Person not found");
@@ -116363,7 +116363,7 @@ var require_utils17 = __commonJS({
116363
116363
  }
116364
116364
  __name(loadCachesForPersonId, "loadCachesForPersonId");
116365
116365
  async function loadCachesForPersonIds(client, personIds) {
116366
- const sidObjsMap = (0, import_core51.toIdMap)(
116366
+ const sidObjsMap = (0, import_core52.toIdMap)(
116367
116367
  await client.findAll(
116368
116368
  import__.default.class.SocialIdentity,
116369
116369
  {
@@ -116398,7 +116398,7 @@ var require_utils17 = __commonJS({
116398
116398
  }
116399
116399
  __name(loadCachesForPersonRef, "loadCachesForPersonRef");
116400
116400
  async function loadCachesForPersonRefs(client, personRefs) {
116401
- const persons = (0, import_core51.toIdMap)(
116401
+ const persons = (0, import_core52.toIdMap)(
116402
116402
  await client.findAll(
116403
116403
  import__.default.class.Person,
116404
116404
  {
@@ -116441,7 +116441,7 @@ var require_utils17 = __commonJS({
116441
116441
  personIds.map((pid) => {
116442
116442
  const ref = contactCache.personRefByPersonId.get(pid);
116443
116443
  return ref != null ? [pid, ref] : void 0;
116444
- }).filter(import_core51.notEmpty)
116444
+ }).filter(import_core52.notEmpty)
116445
116445
  );
116446
116446
  }
116447
116447
  __name(getPersonRefsByPersonIdsFromCache, "getPersonRefsByPersonIdsFromCache");
@@ -116488,7 +116488,7 @@ var require_utils17 = __commonJS({
116488
116488
  personIds.map((pid) => {
116489
116489
  const person = contactCache.personByPersonId.get(pid);
116490
116490
  return person != null ? [pid, person] : void 0;
116491
- }).filter(import_core51.notEmpty)
116491
+ }).filter(import_core52.notEmpty)
116492
116492
  );
116493
116493
  }
116494
116494
  __name(getPersonsByPersonIdsFromCache, "getPersonsByPersonIdsFromCache");
@@ -116535,7 +116535,7 @@ var require_utils17 = __commonJS({
116535
116535
  personRefs.map((personRef) => {
116536
116536
  const person = contactCache.personByRef.get(personRef);
116537
116537
  return person != null ? [personRef, person] : void 0;
116538
- }).filter(import_core51.notEmpty)
116538
+ }).filter(import_core52.notEmpty)
116539
116539
  );
116540
116540
  }
116541
116541
  __name(getPersonsByPersonRefsFromCache, "getPersonsByPersonRefsFromCache");
@@ -116654,7 +116654,7 @@ var require_avatar = __commonJS({
116654
116654
  getAvatarUrlInfo: () => getAvatarUrlInfo
116655
116655
  });
116656
116656
  module2.exports = __toCommonJS2(avatar_exports);
116657
- var import_platform3 = require_lib();
116657
+ var import_platform4 = require_lib();
116658
116658
  var import__ = __toESM2(require_lib28());
116659
116659
  var providers = /* @__PURE__ */ new Map();
116660
116660
  async function getAvatarProvider(client, providerId) {
@@ -116676,7 +116676,7 @@ var require_avatar = __commonJS({
116676
116676
  const avatarProviderId = (0, import__.getAvatarProviderId)(avatar.avatarType);
116677
116677
  const avatarProvider = avatarProviderId !== void 0 ? await getAvatarProvider(client, avatarProviderId) : void 0;
116678
116678
  if (avatarProvider !== void 0) {
116679
- const getUrlHandler = await (0, import_platform3.getResource)(avatarProvider.getUrl);
116679
+ const getUrlHandler = await (0, import_platform4.getResource)(avatarProvider.getUrl);
116680
116680
  ({ url: url4, srcSet, color } = await getUrlHandler(avatar, displayName, width));
116681
116681
  }
116682
116682
  }
@@ -116691,7 +116691,7 @@ var require_avatar = __commonJS({
116691
116691
  if (name == null) {
116692
116692
  return "";
116693
116693
  }
116694
- const lastFirst = (0, import_platform3.getMetadata)(import__.default.metadata.LastNameFirst) === true;
116694
+ const lastFirst = (0, import_platform4.getMetadata)(import__.default.metadata.LastNameFirst) === true;
116695
116695
  const fname = (0, import__.getFirstName)(name ?? "").trim()[0] ?? "";
116696
116696
  const lname = (0, import__.getLastName)(name ?? "").trim()[0] ?? "";
116697
116697
  return lastFirst ? lname + fname : fname + lname;
@@ -116730,7 +116730,7 @@ var require_lib28 = __commonJS({
116730
116730
  default: () => index_default
116731
116731
  });
116732
116732
  module2.exports = __toCommonJS2(index_exports2);
116733
- var import_platform3 = require_lib();
116733
+ var import_platform4 = require_lib();
116734
116734
  __reExport2(index_exports2, require_types10(), module2.exports);
116735
116735
  __reExport2(index_exports2, require_utils17(), module2.exports);
116736
116736
  __reExport2(index_exports2, require_analytics4(), module2.exports);
@@ -116743,7 +116743,7 @@ var require_lib28 = __commonJS({
116743
116743
  return AvatarType22;
116744
116744
  })(AvatarType3 || {});
116745
116745
  var contactId = "contact";
116746
- var contactPlugin = (0, import_platform3.plugin)(contactId, {
116746
+ var contactPlugin = (0, import_platform4.plugin)(contactId, {
116747
116747
  class: {
116748
116748
  AvatarProvider: "",
116749
116749
  ChannelProvider: "",
@@ -116978,9 +116978,9 @@ var require_plugin2 = __commonJS({
116978
116978
  documentPlugin: () => documentPlugin2
116979
116979
  });
116980
116980
  module2.exports = __toCommonJS2(plugin_exports);
116981
- var import_platform3 = require_lib();
116981
+ var import_platform4 = require_lib();
116982
116982
  var documentId = "document";
116983
- var documentPlugin2 = (0, import_platform3.plugin)(documentId, {
116983
+ var documentPlugin2 = (0, import_platform4.plugin)(documentId, {
116984
116984
  class: {
116985
116985
  Document: "",
116986
116986
  DocumentSnapshot: "",
@@ -117140,9 +117140,9 @@ var require_utils18 = __commonJS({
117140
117140
  getFirstRank: () => getFirstRank
117141
117141
  });
117142
117142
  module2.exports = __toCommonJS2(utils_exports);
117143
- var import_core51 = require_lib4();
117143
+ var import_core52 = require_lib4();
117144
117144
  var import_plugin = __toESM2(require_plugin2());
117145
- async function getFirstRank(client, space, parent, sort3 = import_core51.SortingOrder.Descending, extra = {}) {
117145
+ async function getFirstRank(client, space, parent, sort3 = import_core52.SortingOrder.Descending, extra = {}) {
117146
117146
  const doc = await client.findOne(
117147
117147
  import_plugin.default.class.Document,
117148
117148
  { space, parent, ...extra },
@@ -117243,13 +117243,13 @@ var require_lib30 = __commonJS({
117243
117243
  notificationId: () => notificationId
117244
117244
  });
117245
117245
  module2.exports = __toCommonJS2(index_exports2);
117246
- var import_platform3 = require_lib();
117246
+ var import_platform4 = require_lib();
117247
117247
  __reExport2(index_exports2, require_types12(), module2.exports);
117248
117248
  var DOMAIN_NOTIFICATION = "notification";
117249
117249
  var DOMAIN_DOC_NOTIFY = "notification-dnc";
117250
117250
  var DOMAIN_USER_NOTIFY = "notification-user";
117251
117251
  var notificationId = "notification";
117252
- var notification2 = (0, import_platform3.plugin)(notificationId, {
117252
+ var notification2 = (0, import_platform4.plugin)(notificationId, {
117253
117253
  mixin: {
117254
117254
  Collaborators: "",
117255
117255
  NotificationObjectPresenter: "",
@@ -117429,10 +117429,10 @@ var require_lib31 = __commonJS({
117429
117429
  tagsId: () => tagsId
117430
117430
  });
117431
117431
  module2.exports = __toCommonJS2(index_exports2);
117432
- var import_platform3 = require_lib();
117432
+ var import_platform4 = require_lib();
117433
117433
  __reExport2(index_exports2, require_analytics6(), module2.exports);
117434
117434
  var tagsId = "tags";
117435
- var tagsPlugin = (0, import_platform3.plugin)(tagsId, {
117435
+ var tagsPlugin = (0, import_platform4.plugin)(tagsId, {
117436
117436
  class: {
117437
117437
  TagElement: "",
117438
117438
  TagReference: "",
@@ -118765,8 +118765,8 @@ var require_utils20 = __commonJS({
118765
118765
  updateProjectType: () => updateProjectType
118766
118766
  });
118767
118767
  module2.exports = __toCommonJS2(utils_exports);
118768
- var import_core51 = __toESM2(require_lib4());
118769
- var import_platform3 = require_lib();
118768
+ var import_core52 = __toESM2(require_lib4());
118769
+ var import_platform4 = require_lib();
118770
118770
  var import__ = __toESM2(require_lib34());
118771
118771
  var import_rank4 = require_lib33();
118772
118772
  var import_rank22 = require_lib33();
@@ -118801,7 +118801,7 @@ var require_utils20 = __commonJS({
118801
118801
  if (exists5 !== void 0) {
118802
118802
  return exists5._id;
118803
118803
  }
118804
- const res = await client.createDoc(_class, import_core51.default.space.Model, data);
118804
+ const res = await client.createDoc(_class, import_core52.default.space.Model, data);
118805
118805
  return res;
118806
118806
  }
118807
118807
  __name(createState, "createState");
@@ -118831,7 +118831,7 @@ var require_utils20 = __commonJS({
118831
118831
  function findStatusAttr(h, _class) {
118832
118832
  const attrs = h.getAllAttributes(_class);
118833
118833
  for (const it of attrs.values()) {
118834
- if (it.type._class === import_core51.default.class.RefTo && h.isDerived(it.type.to, import_core51.default.class.Status)) {
118834
+ if (it.type._class === import_core52.default.class.RefTo && h.isDerived(it.type.to, import_core52.default.class.Status)) {
118835
118835
  return it;
118836
118836
  }
118837
118837
  }
@@ -118863,7 +118863,7 @@ var require_utils20 = __commonJS({
118863
118863
  const targetProjectClassId = `${_id}:type:mixin`;
118864
118864
  const tmpl = await client.createDoc(
118865
118865
  import__.default.class.ProjectType,
118866
- import_core51.default.space.Model,
118866
+ import_core52.default.space.Model,
118867
118867
  {
118868
118868
  description: data.description,
118869
118869
  shortDescription: data.shortDescription,
@@ -118878,17 +118878,17 @@ var require_utils20 = __commonJS({
118878
118878
  _id
118879
118879
  );
118880
118880
  await client.createDoc(
118881
- import_core51.default.class.Mixin,
118882
- import_core51.default.space.Model,
118881
+ import_core52.default.class.Mixin,
118882
+ import_core52.default.space.Model,
118883
118883
  {
118884
118884
  extends: categoryObj.baseClass,
118885
- kind: import_core51.ClassifierKind.MIXIN,
118886
- label: (0, import_platform3.getEmbeddedLabel)(data.name),
118885
+ kind: import_core52.ClassifierKind.MIXIN,
118886
+ label: (0, import_platform4.getEmbeddedLabel)(data.name),
118887
118887
  icon: baseClassClass.icon
118888
118888
  },
118889
118889
  targetProjectClassId
118890
118890
  );
118891
- await client.createMixin(targetProjectClassId, import_core51.default.class.Mixin, import_core51.default.space.Model, import__.default.mixin.ProjectTypeClass, {
118891
+ await client.createMixin(targetProjectClassId, import_core52.default.class.Mixin, import_core52.default.space.Model, import__.default.mixin.ProjectTypeClass, {
118892
118892
  projectType: _id
118893
118893
  });
118894
118894
  return tmpl;
@@ -118897,7 +118897,7 @@ var require_utils20 = __commonJS({
118897
118897
  async function updateProjectType(client, projectType, tasks) {
118898
118898
  const current = await client.findOne(import__.default.class.ProjectType, { _id: projectType });
118899
118899
  if (current === void 0) {
118900
- throw new import_platform3.PlatformError((0, import_platform3.unknownStatus)("No project type found"));
118900
+ throw new import_platform4.PlatformError((0, import_platform4.unknownStatus)("No project type found"));
118901
118901
  }
118902
118902
  const _tasks = [...current.tasks];
118903
118903
  const tasksData = /* @__PURE__ */ new Map();
@@ -118947,22 +118947,22 @@ var require_utils20 = __commonJS({
118947
118947
  const targetClassId = `${taskId}:type:mixin`;
118948
118948
  tdata.targetClass = targetClassId;
118949
118949
  await client.createDoc(
118950
- import_core51.default.class.Mixin,
118951
- import_core51.default.space.Model,
118950
+ import_core52.default.class.Mixin,
118951
+ import_core52.default.space.Model,
118952
118952
  {
118953
118953
  extends: data.ofClass,
118954
- kind: import_core51.ClassifierKind.MIXIN,
118954
+ kind: import_core52.ClassifierKind.MIXIN,
118955
118955
  label: ofClassClass.label,
118956
118956
  icon: ofClassClass.icon
118957
118957
  },
118958
118958
  targetClassId
118959
118959
  );
118960
- await client.createMixin(targetClassId, import_core51.default.class.Mixin, import_core51.default.space.Model, import__.default.mixin.TaskTypeClass, {
118960
+ await client.createMixin(targetClassId, import_core52.default.class.Mixin, import_core52.default.space.Model, import__.default.mixin.TaskTypeClass, {
118961
118961
  taskType: taskId,
118962
118962
  projectType: _id
118963
118963
  });
118964
118964
  }
118965
- await client.createDoc(import__.default.class.TaskType, import_core51.default.space.Model, tdata, taskId);
118965
+ await client.createDoc(import__.default.class.TaskType, import_core52.default.space.Model, tdata, taskId);
118966
118966
  tasksData.set(taskId, tdata);
118967
118967
  _tasks.push(taskId);
118968
118968
  }
@@ -119001,7 +119001,7 @@ var require_lib34 = __commonJS({
119001
119001
  taskId: () => taskId
119002
119002
  });
119003
119003
  module2.exports = __toCommonJS2(index_exports2);
119004
- var import_platform3 = require_lib();
119004
+ var import_platform4 = require_lib();
119005
119005
  __reExport2(index_exports2, require_utils20(), module2.exports);
119006
119006
  var TaskOrdering = /* @__PURE__ */ ((TaskOrdering2) => {
119007
119007
  TaskOrdering2["State"] = "state";
@@ -119011,7 +119011,7 @@ var require_lib34 = __commonJS({
119011
119011
  return TaskOrdering2;
119012
119012
  })(TaskOrdering || {});
119013
119013
  var taskId = "task";
119014
- var task2 = (0, import_platform3.plugin)(taskId, {
119014
+ var task2 = (0, import_platform4.plugin)(taskId, {
119015
119015
  app: {
119016
119016
  Tasks: ""
119017
119017
  },
@@ -119171,7 +119171,7 @@ var require_lib35 = __commonJS({
119171
119171
  timeId: () => timeId
119172
119172
  });
119173
119173
  module2.exports = __toCommonJS2(index_exports2);
119174
- var import_platform3 = require_lib();
119174
+ var import_platform4 = require_lib();
119175
119175
  __reExport2(index_exports2, require_analytics7(), module2.exports);
119176
119176
  var timeId = "time";
119177
119177
  var ToDoPriority = /* @__PURE__ */ ((ToDoPriority2) => {
@@ -119182,7 +119182,7 @@ var require_lib35 = __commonJS({
119182
119182
  ToDoPriority2[ToDoPriority2["Urgent"] = 4] = "Urgent";
119183
119183
  return ToDoPriority2;
119184
119184
  })(ToDoPriority || {});
119185
- var index_default = (0, import_platform3.plugin)(timeId, {
119185
+ var index_default = (0, import_platform4.plugin)(timeId, {
119186
119186
  component: {
119187
119187
  Me: "",
119188
119188
  Team: "",
@@ -119327,7 +119327,7 @@ var require_lib36 = __commonJS({
119327
119327
  trackerId: () => trackerId
119328
119328
  });
119329
119329
  module2.exports = __toCommonJS2(index_exports2);
119330
- var import_platform3 = require_lib();
119330
+ var import_platform4 = require_lib();
119331
119331
  __reExport2(index_exports2, require_analytics8(), module2.exports);
119332
119332
  __reExport2(index_exports2, require_analytics8(), module2.exports);
119333
119333
  var TimeReportDayType2 = /* @__PURE__ */ ((TimeReportDayType22) => {
@@ -119374,7 +119374,7 @@ var require_lib36 = __commonJS({
119374
119374
  return MilestoneStatus22;
119375
119375
  })(MilestoneStatus2 || {});
119376
119376
  var trackerId = "tracker";
119377
- var pluginState = (0, import_platform3.plugin)(trackerId, {
119377
+ var pluginState = (0, import_platform4.plugin)(trackerId, {
119378
119378
  class: {
119379
119379
  Project: "",
119380
119380
  Issue: "",
@@ -151255,6 +151255,196 @@ var NotificationContextNotFoundError = class extends Schema_exports.TaggedError(
151255
151255
  }
151256
151256
  };
151257
151257
 
151258
+ // src/domain/schemas/processes.ts
151259
+ var ProcessId = NonEmptyString2.pipe(Schema_exports.brand("ProcessId"));
151260
+ var ProcessIdentifier = NonEmptyString2.pipe(Schema_exports.brand("ProcessIdentifier"));
151261
+ var ProcessExecutionId = NonEmptyString2.pipe(Schema_exports.brand("ProcessExecutionId"));
151262
+ var ProcessStateId = NonEmptyString2.pipe(Schema_exports.brand("ProcessStateId"));
151263
+ var ProcessCardIdentifier = NonEmptyString2.pipe(Schema_exports.brand("ProcessCardIdentifier"));
151264
+ var ProcessMasterTagIdentifier = NonEmptyString2.pipe(Schema_exports.brand("ProcessMasterTagIdentifier"));
151265
+ var ProcessExecutionStatusSchema = Schema_exports.Literal("active", "done", "cancelled");
151266
+ var ProcessCandidateSchema = Schema_exports.Struct({
151267
+ id: ProcessId,
151268
+ name: NonEmptyString2,
151269
+ masterTagId: MasterTagId,
151270
+ masterTagName: Schema_exports.optional(NonEmptyString2)
151271
+ });
151272
+ var ProcessSummarySchema = Schema_exports.Struct({
151273
+ id: ProcessId,
151274
+ name: NonEmptyString2,
151275
+ description: Schema_exports.optional(Schema_exports.String),
151276
+ masterTagId: MasterTagId,
151277
+ masterTagName: Schema_exports.optional(NonEmptyString2),
151278
+ autoStart: Schema_exports.Boolean,
151279
+ automationOnly: Schema_exports.Boolean,
151280
+ parallelExecutionForbidden: Schema_exports.Boolean,
151281
+ stateCount: Schema_exports.NonNegativeInt,
151282
+ transitionCount: Schema_exports.NonNegativeInt
151283
+ });
151284
+ var ProcessStateSummarySchema = Schema_exports.Struct({
151285
+ id: ProcessStateId,
151286
+ title: NonEmptyString2
151287
+ });
151288
+ var ProcessTransitionSummarySchema = Schema_exports.Struct({
151289
+ id: NonEmptyString2,
151290
+ fromStateId: Schema_exports.optional(ProcessStateId),
151291
+ fromStateTitle: Schema_exports.optional(NonEmptyString2),
151292
+ toStateId: ProcessStateId,
151293
+ toStateTitle: Schema_exports.optional(NonEmptyString2),
151294
+ triggerId: NonEmptyString2,
151295
+ actionCount: Schema_exports.NonNegativeInt
151296
+ });
151297
+ var ProcessDetailSchema = ProcessSummarySchema.pipe(
151298
+ Schema_exports.extend(Schema_exports.Struct({
151299
+ initialStateId: Schema_exports.optional(ProcessStateId),
151300
+ states: Schema_exports.Array(ProcessStateSummarySchema),
151301
+ transitions: Schema_exports.Array(ProcessTransitionSummarySchema)
151302
+ }))
151303
+ );
151304
+ var ProcessExecutionSummarySchema = Schema_exports.Struct({
151305
+ id: ProcessExecutionId,
151306
+ processId: ProcessId,
151307
+ processName: Schema_exports.optional(NonEmptyString2),
151308
+ cardId: CardId,
151309
+ cardTitle: Schema_exports.optional(NonEmptyString2),
151310
+ currentStateId: ProcessStateId,
151311
+ currentStateTitle: Schema_exports.optional(NonEmptyString2),
151312
+ status: ProcessExecutionStatusSchema,
151313
+ errorCount: Schema_exports.NonNegativeInt,
151314
+ hasError: Schema_exports.Boolean,
151315
+ hasParent: Schema_exports.Boolean,
151316
+ parentExecutionId: Schema_exports.optional(ProcessExecutionId),
151317
+ modifiedOn: Schema_exports.optional(Timestamp)
151318
+ });
151319
+ var ListProcessesParamsSchema = Schema_exports.Struct({
151320
+ masterTag: Schema_exports.optional(ProcessMasterTagIdentifier.annotations({
151321
+ description: "Optional master tag/card type ID or display label. Use this when you only want workflows attached to one Huly card/document type."
151322
+ })),
151323
+ limit: Schema_exports.optional(LimitParam.annotations({
151324
+ description: "Maximum number of process definitions to return (default: 50, maximum: 200)."
151325
+ }))
151326
+ }).annotations({
151327
+ title: "ListProcessesParams",
151328
+ description: "Parameters for listing Huly Process workflow definitions."
151329
+ });
151330
+ var GetProcessParamsSchema = Schema_exports.Struct({
151331
+ process: ProcessIdentifier.annotations({
151332
+ description: "Process/workflow ID or exact display name. Ambiguous names fail with candidate IDs instead of guessing."
151333
+ })
151334
+ }).annotations({
151335
+ title: "GetProcessParams",
151336
+ description: "Parameters for retrieving one Huly Process workflow definition."
151337
+ });
151338
+ var ListExecutionsParamsSchema = Schema_exports.Struct({
151339
+ process: Schema_exports.optional(ProcessIdentifier.annotations({
151340
+ description: "Optional process/workflow ID or exact display name. Ambiguous names fail with candidate IDs instead of guessing."
151341
+ })),
151342
+ card: Schema_exports.optional(ProcessCardIdentifier.annotations({
151343
+ description: "Optional card/document ID or exact title. If a title matches multiple cards, the call fails with candidates."
151344
+ })),
151345
+ status: Schema_exports.optional(ProcessExecutionStatusSchema.annotations({
151346
+ description: "Optional execution status filter: active, done, or cancelled."
151347
+ })),
151348
+ limit: Schema_exports.optional(LimitParam.annotations({
151349
+ description: "Maximum number of executions to return (default: 50, maximum: 200)."
151350
+ }))
151351
+ }).annotations({
151352
+ title: "ListExecutionsParams",
151353
+ description: "Parameters for listing read-only Huly Process workflow executions."
151354
+ });
151355
+ var ListProcessesResultSchema = Schema_exports.Struct({
151356
+ processes: Schema_exports.Array(ProcessSummarySchema),
151357
+ total: Schema_exports.NonNegativeInt
151358
+ });
151359
+ var ListExecutionsResultSchema = Schema_exports.Struct({
151360
+ executions: Schema_exports.Array(ProcessExecutionSummarySchema),
151361
+ total: Schema_exports.NonNegativeInt
151362
+ });
151363
+ var listProcessesParamsJsonSchema = JSONSchema_exports.make(ListProcessesParamsSchema);
151364
+ var getProcessParamsJsonSchema = JSONSchema_exports.make(GetProcessParamsSchema);
151365
+ var listExecutionsParamsJsonSchema = JSONSchema_exports.make(ListExecutionsParamsSchema);
151366
+ var parseListProcessesParams = Schema_exports.decodeUnknown(ListProcessesParamsSchema);
151367
+ var parseGetProcessParams = Schema_exports.decodeUnknown(GetProcessParamsSchema);
151368
+ var parseListExecutionsParams = Schema_exports.decodeUnknown(ListExecutionsParamsSchema);
151369
+
151370
+ // src/huly/errors-processes.ts
151371
+ var candidateList = (candidates) => candidates.map(
151372
+ (candidate) => candidate.masterTagName === void 0 ? `${candidate.name} (${candidate.id}, masterTag ${candidate.masterTagId})` : `${candidate.name} (${candidate.id}, ${candidate.masterTagName})`
151373
+ ).join("; ");
151374
+ var ProcessNotFoundError = class extends Schema_exports.TaggedError()(
151375
+ "ProcessNotFoundError",
151376
+ {
151377
+ identifier: Schema_exports.String,
151378
+ candidates: Schema_exports.Array(ProcessCandidateSchema)
151379
+ }
151380
+ ) {
151381
+ get message() {
151382
+ const suffix = this.candidates.length === 0 ? "" : ` Available processes: ${candidateList(this.candidates)}`;
151383
+ return `Process '${this.identifier}' not found.${suffix}`;
151384
+ }
151385
+ };
151386
+ var ProcessIdentifierAmbiguousError = class extends Schema_exports.TaggedError()(
151387
+ "ProcessIdentifierAmbiguousError",
151388
+ {
151389
+ identifier: Schema_exports.String,
151390
+ candidates: Schema_exports.Array(ProcessCandidateSchema)
151391
+ }
151392
+ ) {
151393
+ get message() {
151394
+ return `Process name '${this.identifier}' is ambiguous. Use one of these process IDs: ${candidateList(this.candidates)}`;
151395
+ }
151396
+ };
151397
+ var ProcessMasterTagNotFoundError = class extends Schema_exports.TaggedError()(
151398
+ "ProcessMasterTagNotFoundError",
151399
+ {
151400
+ identifier: Schema_exports.String
151401
+ }
151402
+ ) {
151403
+ get message() {
151404
+ return `Process master tag/card type '${this.identifier}' not found`;
151405
+ }
151406
+ };
151407
+ var ProcessMasterTagAmbiguousError = class extends Schema_exports.TaggedError()(
151408
+ "ProcessMasterTagAmbiguousError",
151409
+ {
151410
+ identifier: Schema_exports.String,
151411
+ candidates: Schema_exports.Array(Schema_exports.Struct({
151412
+ id: MasterTagId,
151413
+ name: NonEmptyString2
151414
+ }))
151415
+ }
151416
+ ) {
151417
+ get message() {
151418
+ const candidates = this.candidates.map((candidate) => `${candidate.name} (${candidate.id})`).join("; ");
151419
+ return `Process master tag/card type '${this.identifier}' is ambiguous. Use one of these IDs: ${candidates}`;
151420
+ }
151421
+ };
151422
+ var ProcessCardIdentifierAmbiguousError = class extends Schema_exports.TaggedError()(
151423
+ "ProcessCardIdentifierAmbiguousError",
151424
+ {
151425
+ identifier: Schema_exports.String,
151426
+ candidates: Schema_exports.Array(Schema_exports.Struct({
151427
+ id: CardId,
151428
+ title: NonEmptyString2
151429
+ }))
151430
+ }
151431
+ ) {
151432
+ get message() {
151433
+ const candidates = this.candidates.map((candidate) => `${candidate.title} (${candidate.id})`).join("; ");
151434
+ return `Card/document title '${this.identifier}' is ambiguous. Use one of these card IDs: ${candidates}`;
151435
+ }
151436
+ };
151437
+ var ProcessCardNotFoundError = class extends Schema_exports.TaggedError()(
151438
+ "ProcessCardNotFoundError",
151439
+ {
151440
+ identifier: Schema_exports.String
151441
+ }
151442
+ ) {
151443
+ get message() {
151444
+ return `Card/document '${this.identifier}' not found`;
151445
+ }
151446
+ };
151447
+
151258
151448
  // src/huly/errors-test-management.ts
151259
151449
  var TestProjectNotFoundError = class extends Schema_exports.TaggedError()(
151260
151450
  "TestProjectNotFoundError",
@@ -151480,7 +151670,13 @@ var HulyDomainError = Schema_exports.Union(
151480
151670
  FunnelNotFoundError,
151481
151671
  LeadNotFoundError,
151482
151672
  FileTooLargeError,
151483
- InvalidContentTypeError
151673
+ InvalidContentTypeError,
151674
+ ProcessNotFoundError,
151675
+ ProcessIdentifierAmbiguousError,
151676
+ ProcessMasterTagAmbiguousError,
151677
+ ProcessMasterTagNotFoundError,
151678
+ ProcessCardIdentifierAmbiguousError,
151679
+ ProcessCardNotFoundError
151484
151680
  );
151485
151681
 
151486
151682
  // src/huly/operations/markup.ts
@@ -171401,7 +171597,7 @@ var PostHog = class extends PostHogBackendClient {
171401
171597
  };
171402
171598
 
171403
171599
  // src/version.ts
171404
- var VERSION = true ? "0.12.0" : "0.0.0-dev";
171600
+ var VERSION = true ? "0.14.0" : "0.0.0-dev";
171405
171601
 
171406
171602
  // src/telemetry/posthog.ts
171407
171603
  var POSTHOG_API_KEY = "phc_TGfFqCGdnF0p68wuFzd5WSw1IsBvOJW0YgoMJDyZPjm";
@@ -171575,7 +171771,13 @@ var INVALID_PARAMS_TAGS = /* @__PURE__ */ new Set([
171575
171771
  "FunnelNotFoundError",
171576
171772
  "LeadNotFoundError",
171577
171773
  "FileTooLargeError",
171578
- "InvalidContentTypeError"
171774
+ "InvalidContentTypeError",
171775
+ "ProcessNotFoundError",
171776
+ "ProcessIdentifierAmbiguousError",
171777
+ "ProcessMasterTagAmbiguousError",
171778
+ "ProcessMasterTagNotFoundError",
171779
+ "ProcessCardIdentifierAmbiguousError",
171780
+ "ProcessCardNotFoundError"
171579
171781
  ]);
171580
171782
  var INTERNAL_ERROR_PREFIX = {
171581
171783
  FileUploadError: "File upload error",
@@ -171894,6 +172096,7 @@ var import_core22 = __toESM(require_lib4(), 1);
171894
172096
  var import_core19 = __toESM(require_lib4(), 1);
171895
172097
 
171896
172098
  // src/huly/operations/query-helpers.ts
172099
+ var hulyQuery = (query) => query;
171897
172100
  var escapeLikeWildcards = (input) => input.replace(/\\/g, "\\\\").replace(/%/g, "\\%").replace(/_/g, "\\_");
171898
172101
  var withLookup = (options, lookups) => ({
171899
172102
  ...options,
@@ -171903,12 +172106,12 @@ var withLookup = (options, lookups) => ({
171903
172106
  }
171904
172107
  });
171905
172108
  var findOneOrFail = (client, _class, query, onNotFound, options) => Effect_exports.flatMap(
171906
- client.findOne(_class, query, options),
172109
+ client.findOne(_class, hulyQuery(query), options),
171907
172110
  (result) => result !== void 0 ? Effect_exports.succeed(result) : Effect_exports.fail(onNotFound())
171908
172111
  );
171909
172112
  var findByNameOrId = (client, _class, primaryQuery, fallbackQuery, options) => Effect_exports.flatMap(
171910
- client.findOne(_class, primaryQuery, options),
171911
- (result) => result !== void 0 ? Effect_exports.succeed(result) : client.findOne(_class, fallbackQuery, options)
172113
+ client.findOne(_class, hulyQuery(primaryQuery), options),
172114
+ (result) => result !== void 0 ? Effect_exports.succeed(result) : client.findOne(_class, hulyQuery(fallbackQuery), options)
171912
172115
  );
171913
172116
  var findByNameOrIdOrFail = (client, _class, primaryQuery, fallbackQuery, onNotFound, options) => Effect_exports.flatMap(
171914
172117
  findByNameOrId(client, _class, primaryQuery, fallbackQuery, options),
@@ -172457,7 +172660,7 @@ var listTeamspaces = (params) => Effect_exports.gen(function* () {
172457
172660
  const limit = clampLimit(params.limit);
172458
172661
  const teamspaces = yield* client.findAll(
172459
172662
  documentPlugin.class.Teamspace,
172460
- query,
172663
+ hulyQuery(query),
172461
172664
  {
172462
172665
  limit,
172463
172666
  sort: {
@@ -172482,7 +172685,7 @@ var getTeamspace = (params) => Effect_exports.gen(function* () {
172482
172685
  const { client, teamspace } = yield* findTeamspace(params.teamspace, { includeArchived: true });
172483
172686
  const docs = yield* client.findAll(
172484
172687
  documentPlugin.class.Document,
172485
- { space: teamspace._id },
172688
+ hulyQuery({ space: teamspace._id }),
172486
172689
  { limit: 1, total: true }
172487
172690
  );
172488
172691
  return {
@@ -172498,7 +172701,7 @@ var createTeamspace = (params) => Effect_exports.gen(function* () {
172498
172701
  const client = yield* HulyClient;
172499
172702
  const existing = yield* client.findOne(
172500
172703
  documentPlugin.class.Teamspace,
172501
- { name: params.name, archived: false }
172704
+ hulyQuery({ name: params.name, archived: false })
172502
172705
  );
172503
172706
  if (existing !== void 0) {
172504
172707
  return {
@@ -172579,7 +172782,7 @@ var listDocuments = (params) => Effect_exports.gen(function* () {
172579
172782
  }
172580
172783
  const documents = yield* client.findAll(
172581
172784
  documentPlugin.class.Document,
172582
- query,
172785
+ hulyQuery(query),
172583
172786
  {
172584
172787
  limit,
172585
172788
  sort: {
@@ -172644,7 +172847,7 @@ var createDocument = (params) => Effect_exports.gen(function* () {
172644
172847
  });
172645
172848
  const lastDoc = yield* client.findOne(
172646
172849
  documentPlugin.class.Document,
172647
- { space: teamspace._id },
172850
+ hulyQuery({ space: teamspace._id }),
172648
172851
  { sort: { rank: import_core21.SortingOrder.Descending } }
172649
172852
  );
172650
172853
  const rank = (0, import_rank.makeRank)(lastDoc?.rank, void 0);
@@ -172718,7 +172921,7 @@ var findProjectWithStatuses = (projectIdentifier) => Effect_exports.gen(function
172718
172921
  const statusDocsResult = yield* Effect_exports.either(
172719
172922
  client.findAll(
172720
172923
  core.class.Status,
172721
- { _id: { $in: statusRefs } }
172924
+ hulyQuery({ _id: { $in: statusRefs } })
172722
172925
  )
172723
172926
  );
172724
172927
  if (statusDocsResult._tag === "Right") {
@@ -172751,7 +172954,7 @@ var findProjectWithStatuses = (projectIdentifier) => Effect_exports.gen(function
172751
172954
  }
172752
172955
  }
172753
172956
  const defaultStatusId = project3.defaultIssueStatus || statuses[0]?._id;
172754
- return { client, project: project3, statuses, defaultStatusId };
172957
+ return { client, defaultStatusId, project: project3, projectType, statuses };
172755
172958
  });
172756
172959
  var parseIssueIdentifier = (identifier2, projectIdentifier) => {
172757
172960
  const idStr = String(identifier2).trim();
@@ -172779,16 +172982,16 @@ var findIssueInProject = (client, project3, identifierStr) => Effect_exports.gen
172779
172982
  );
172780
172983
  const issue2 = (yield* client.findOne(
172781
172984
  tracker.class.Issue,
172782
- {
172985
+ hulyQuery({
172783
172986
  space: project3._id,
172784
172987
  identifier: fullIdentifier
172785
- }
172988
+ })
172786
172989
  )) ?? (number8 !== null ? yield* client.findOne(
172787
172990
  tracker.class.Issue,
172788
- {
172991
+ hulyQuery({
172789
172992
  space: project3._id,
172790
172993
  number: number8
172791
- }
172994
+ })
172792
172995
  ) : void 0);
172793
172996
  if (issue2 === void 0) {
172794
172997
  return yield* new IssueNotFoundError({
@@ -175166,6 +175369,9 @@ var CreateIssueParamsSchema = Schema_exports.Struct({
175166
175369
  status: Schema_exports.optional(StatusName.annotations({
175167
175370
  description: "Initial status (uses project default if not specified)"
175168
175371
  })),
175372
+ taskType: Schema_exports.optional(TaskTypeRefSchema.annotations({
175373
+ description: "Issue/task type ID or display name. Resolved within the target project's project type; use list_task_types or get_project_type to discover valid values. If omitted, creates the default Issue type."
175374
+ })),
175169
175375
  parentIssue: Schema_exports.optional(IssueIdentifier.annotations({
175170
175376
  description: "Parent issue identifier (e.g., 'HULY-42') to create as sub-issue"
175171
175377
  })),
@@ -175205,6 +175411,9 @@ var UpdateIssueParamsSchema = Schema_exports.Struct({
175205
175411
  status: Schema_exports.optional(StatusName.annotations({
175206
175412
  description: "New status"
175207
175413
  })),
175414
+ taskType: Schema_exports.optional(TaskTypeRefSchema.annotations({
175415
+ description: "New issue/task type ID or display name. Resolved within the target project's project type; status is preserved only if valid for that task type. Use list_task_types or get_project_type to discover valid values."
175416
+ })),
175208
175417
  dueDate: Schema_exports.optional(
175209
175418
  Schema_exports.NullOr(Timestamp).annotations({
175210
175419
  description: "Due date as Unix timestamp in milliseconds (e.g., 1719792000000 for 2024-07-01), or null to clear"
@@ -180699,6 +180908,14 @@ var toIssueId = (value3) => IssueId.make(value3);
180699
180908
  var toObjectClassName = (value3) => ObjectClassName.make(value3);
180700
180909
  var toTeamspaceIdentifier = (value3) => TeamspaceIdentifier.make(value3);
180701
180910
  var toDocumentId = (value3) => DocumentId.make(value3);
180911
+ var blockingIssueFindOptions = {
180912
+ projection: {
180913
+ _id: 1,
180914
+ _class: 1,
180915
+ identifier: 1,
180916
+ blockedBy: 1
180917
+ }
180918
+ };
180702
180919
  var resolveTargetIssue = (client, sourceProject, targetIssueStr) => Effect_exports.gen(function* () {
180703
180920
  const { fullIdentifier } = parseIssueIdentifier(targetIssueStr, sourceProject.identifier);
180704
180921
  const match16 = fullIdentifier.match(/^([A-Z]+)-\d+$/i);
@@ -180857,7 +181074,7 @@ var listIssueRelations = (params) => Effect_exports.gen(function* () {
180857
181074
  const toIssueRef = toRef;
180858
181075
  const issues = yield* client.findAll(
180859
181076
  tracker.class.Issue,
180860
- { _id: { $in: allIssueIds.map(toIssueRef) } }
181077
+ hulyQuery({ _id: { $in: allIssueIds.map(toIssueRef) } })
180861
181078
  );
180862
181079
  for (const i of issues) {
180863
181080
  idToIdentifier.set(String(i._id), i.identifier);
@@ -180875,7 +181092,8 @@ var listIssueRelations = (params) => Effect_exports.gen(function* () {
180875
181092
  });
180876
181093
  const blockingIssueCandidates = yield* client.findAll(
180877
181094
  tracker.class.Issue,
180878
- { "blockedBy._id": toRef(issue2._id) }
181095
+ hulyQuery({ blockedBy: makeRelatedDoc(issue2) }),
181096
+ blockingIssueFindOptions
180879
181097
  );
180880
181098
  const blocks = blockingIssueCandidates.filter((candidate) => candidate._id !== issue2._id && hasRelationById(candidate.blockedBy, issue2._id)).map(toIssueEntry);
180881
181099
  const documents = [];
@@ -180883,7 +181101,7 @@ var listIssueRelations = (params) => Effect_exports.gen(function* () {
180883
181101
  const toDocRef = toRef;
180884
181102
  const docs = yield* client.findAll(
180885
181103
  documentPlugin.class.Document,
180886
- { _id: { $in: docRelationsRefs.map((r) => toDocRef(r._id)) } }
181104
+ hulyQuery({ _id: { $in: docRelationsRefs.map((r) => toDocRef(r._id)) } })
180887
181105
  );
180888
181106
  const docMap = new Map(docs.map((d) => [String(d._id), d]));
180889
181107
  const spaceIds = [...new Set(docs.map((d) => d.space))];
@@ -180891,7 +181109,7 @@ var listIssueRelations = (params) => Effect_exports.gen(function* () {
180891
181109
  if (spaceIds.length > 0) {
180892
181110
  const teamspaces = yield* client.findAll(
180893
181111
  documentPlugin.class.Teamspace,
180894
- { _id: { $in: spaceIds.map(toRef) } }
181112
+ hulyQuery({ _id: { $in: spaceIds.map(toRef) } })
180895
181113
  );
180896
181114
  for (const ts of teamspaces) {
180897
181115
  tsNameMap.set(String(ts._id), ts.name);
@@ -181223,7 +181441,7 @@ var listIssues = (params) => Effect_exports.gen(function* () {
181223
181441
  const limit = clampLimit(params.limit);
181224
181442
  const issues = yield* client.findAll(
181225
181443
  tracker.class.Issue,
181226
- query,
181444
+ hulyQuery(query),
181227
181445
  withLookup(
181228
181446
  {
181229
181447
  limit,
@@ -181264,16 +181482,16 @@ var getIssue = (params) => Effect_exports.gen(function* () {
181264
181482
  const { fullIdentifier, number: number8 } = parseIssueIdentifier(params.identifier, params.project);
181265
181483
  const issue2 = (yield* client.findOne(
181266
181484
  tracker.class.Issue,
181267
- { space: project3._id, identifier: fullIdentifier }
181485
+ hulyQuery({ space: project3._id, identifier: fullIdentifier })
181268
181486
  )) ?? (number8 !== null ? yield* client.findOne(
181269
181487
  tracker.class.Issue,
181270
- { space: project3._id, number: number8 }
181488
+ hulyQuery({ space: project3._id, number: number8 })
181271
181489
  ) : void 0);
181272
181490
  if (issue2 === void 0) {
181273
181491
  return yield* new IssueNotFoundError({ identifier: params.identifier, project: params.project });
181274
181492
  }
181275
181493
  const statusName = resolveStatusName(statuses, issue2.status);
181276
- const person = issue2.assignee !== null ? yield* client.findOne(contact.class.Person, { _id: issue2.assignee }) : void 0;
181494
+ const person = issue2.assignee !== null ? yield* client.findOne(contact.class.Person, hulyQuery({ _id: issue2.assignee })) : void 0;
181277
181495
  const description = issue2.description ? yield* client.fetchMarkup(
181278
181496
  issue2._class,
181279
181497
  issue2._id,
@@ -181320,6 +181538,14 @@ var extractUpdatedSequence = (txResult) => {
181320
181538
  const decoded = Schema_exports.decodeUnknownOption(TxIncResult)(txResult);
181321
181539
  return decoded._tag === "Some" ? decoded.value.object.sequence : void 0;
181322
181540
  };
181541
+ var requireUpdatedSequence = (txResult, projectIdentifier) => {
181542
+ const sequence = extractUpdatedSequence(txResult);
181543
+ return sequence === void 0 ? Effect_exports.fail(
181544
+ new HulyError({
181545
+ message: `Project '${projectIdentifier}' sequence increment did not return the updated sequence; issue creation stopped to avoid a duplicate identifier.`
181546
+ })
181547
+ ) : Effect_exports.succeed(sequence);
181548
+ };
181323
181549
  var resolveAssignee = (client, assigneeIdentifier) => Effect_exports.gen(function* () {
181324
181550
  const person = yield* findPersonByEmailOrName(client, assigneeIdentifier);
181325
181551
  if (person === void 0) {
@@ -181327,35 +181553,81 @@ var resolveAssignee = (client, assigneeIdentifier) => Effect_exports.gen(functio
181327
181553
  }
181328
181554
  return person;
181329
181555
  });
181556
+ var TASK_TYPE_DISCOVERY_HINT = "Use list_task_types or get_project_type to discover valid task types and statuses.";
181557
+ var taskTypeMatches = (taskType, taskTypeRef) => String(taskType._id) === String(taskTypeRef) || normalizeForComparison(taskType.name) === normalizeForComparison(taskTypeRef);
181558
+ var describeTaskTypeOptions = (taskTypes) => taskTypes.length === 0 ? "No task types are configured for this project type." : `Available task types: ${taskTypes.map((taskType) => `${taskType.name} (${taskType._id})`).join(", ")}.`;
181559
+ var mergeTaskTypes = (first2, second) => {
181560
+ const taskTypesById = /* @__PURE__ */ new Map();
181561
+ for (const taskType of [...first2, ...second]) {
181562
+ taskTypesById.set(String(taskType._id), taskType);
181563
+ }
181564
+ return [...taskTypesById.values()];
181565
+ };
181566
+ var resolveTaskTypeWorkflow = (client, project3, projectType, projectStatuses, taskTypeRef, projectIdentifier) => Effect_exports.gen(function* () {
181567
+ const workflowProjectType = projectType ?? (yield* client.findOne(task.class.ProjectType, hulyQuery({ _id: project3.type })));
181568
+ if (workflowProjectType === void 0) {
181569
+ return yield* Effect_exports.fail(
181570
+ new HulyError({
181571
+ message: `Project '${projectIdentifier}' does not expose a project type/workflow, so taskType cannot be resolved. ${TASK_TYPE_DISCOVERY_HINT}`
181572
+ })
181573
+ );
181574
+ }
181575
+ const taskTypesByProjectTypeList = yield* client.findAll(
181576
+ task.class.TaskType,
181577
+ hulyQuery({ _id: { $in: [...workflowProjectType.tasks] } })
181578
+ );
181579
+ const taskTypesByParent = yield* client.findAll(
181580
+ task.class.TaskType,
181581
+ hulyQuery({ parent: workflowProjectType._id })
181582
+ );
181583
+ const taskTypes = mergeTaskTypes([...taskTypesByProjectTypeList], [...taskTypesByParent]);
181584
+ const matches = [...taskTypes].filter((candidate) => taskTypeMatches(candidate, taskTypeRef));
181585
+ const selectedTaskType = matches.length === 1 ? matches[0] : void 0;
181586
+ if (selectedTaskType === void 0) {
181587
+ const reason = matches.length === 0 ? "was not found" : "matched more than one task type";
181588
+ return yield* Effect_exports.fail(
181589
+ new HulyError({
181590
+ message: `Task type '${taskTypeRef}' ${reason} in project '${projectIdentifier}' workflow. ${describeTaskTypeOptions([...taskTypes])} ${TASK_TYPE_DISCOVERY_HINT}`
181591
+ })
181592
+ );
181593
+ }
181594
+ const scopedStatuses = selectedTaskType.statuses.flatMap(
181595
+ (statusId) => projectStatuses.filter((status) => status._id === statusId)
181596
+ );
181597
+ const defaultStatusId = selectedTaskType.statuses.includes(project3.defaultIssueStatus) ? project3.defaultIssueStatus : selectedTaskType.statuses.at(0);
181598
+ return { defaultStatusId, statuses: scopedStatuses, taskType: selectedTaskType };
181599
+ });
181600
+ var validStatusNames = (workflow) => workflow.statuses.length === 0 ? workflow.taskType.statuses.join(", ") : workflow.statuses.map((status) => status.name).join(", ");
181601
+ var resolveStatusForTaskType = (workflow, statusName, projectIdentifier) => {
181602
+ const normalizedStatusName = normalizeForComparison(statusName);
181603
+ const match16 = workflow.statuses.find((status) => normalizeForComparison(status.name) === normalizedStatusName);
181604
+ const statusNames = validStatusNames(workflow);
181605
+ return match16 !== void 0 ? Effect_exports.succeed(match16._id) : Effect_exports.fail(
181606
+ new HulyError({
181607
+ message: `Status '${statusName}' is not valid for task type '${workflow.taskType.name}' in project '${projectIdentifier}'. Valid statuses for this task type: ${statusNames}. ${TASK_TYPE_DISCOVERY_HINT}`
181608
+ })
181609
+ );
181610
+ };
181611
+ var chooseStatusForTaskType = (workflow, requestedStatus, currentStatus, projectIdentifier) => {
181612
+ if (requestedStatus !== void 0) {
181613
+ return resolveStatusForTaskType(workflow, requestedStatus, projectIdentifier);
181614
+ }
181615
+ if (currentStatus !== void 0 && workflow.taskType.statuses.includes(currentStatus)) {
181616
+ return Effect_exports.succeed(currentStatus);
181617
+ }
181618
+ return workflow.defaultStatusId !== void 0 ? Effect_exports.succeed(workflow.defaultStatusId) : Effect_exports.fail(
181619
+ new HulyError({
181620
+ message: `Task type '${workflow.taskType.name}' in project '${projectIdentifier}' has no valid status. ${TASK_TYPE_DISCOVERY_HINT}`
181621
+ })
181622
+ );
181623
+ };
181330
181624
  var createIssue = (params) => Effect_exports.gen(function* () {
181331
- const { client, defaultStatusId, project: project3, statuses } = yield* findProjectWithStatuses(params.project);
181625
+ const { client, defaultStatusId, project: project3, projectType, statuses } = yield* findProjectWithStatuses(params.project);
181332
181626
  const issueId = (0, import_core37.generateId)();
181333
- const incOps = { $inc: { sequence: 1 } };
181334
- const incResult = yield* client.updateDoc(
181335
- tracker.class.Project,
181336
- toRef("core:space:Space"),
181337
- project3._id,
181338
- incOps,
181339
- true
181340
- );
181341
- const sequence = extractUpdatedSequence(incResult) ?? project3.sequence + 1;
181342
- const statusRef = params.status !== void 0 ? yield* resolveStatusByName(statuses, params.status, params.project) : defaultStatusId !== void 0 ? defaultStatusId : yield* Effect_exports.fail(new InvalidStatusError({ status: "(default)", project: params.project }));
181627
+ const taskTypeWorkflow = params.taskType === void 0 ? void 0 : yield* resolveTaskTypeWorkflow(client, project3, projectType, statuses, params.taskType, params.project);
181628
+ const taskTypeStatusRef = taskTypeWorkflow === void 0 ? void 0 : yield* chooseStatusForTaskType(taskTypeWorkflow, params.status, void 0, params.project);
181629
+ const statusRef = taskTypeStatusRef !== void 0 ? taskTypeStatusRef : params.status !== void 0 ? yield* resolveStatusByName(statuses, params.status, params.project) : defaultStatusId !== void 0 ? defaultStatusId : yield* Effect_exports.fail(new InvalidStatusError({ status: "(default)", project: params.project }));
181343
181630
  const assigneeRef = params.assignee !== void 0 ? (yield* resolveAssignee(client, params.assignee))._id : null;
181344
- const lastIssue = yield* client.findOne(
181345
- tracker.class.Issue,
181346
- { space: project3._id },
181347
- { sort: { rank: import_core37.SortingOrder.Descending } }
181348
- );
181349
- const rank = (0, import_rank3.makeRank)(lastIssue?.rank, void 0);
181350
- const descriptionMarkupRef = params.description !== void 0 && params.description.trim() !== "" ? yield* client.uploadMarkup(
181351
- tracker.class.Issue,
181352
- issueId,
181353
- "description",
181354
- params.description,
181355
- "markdown"
181356
- ) : null;
181357
- const priority = stringToPriority(params.priority || "no-priority");
181358
- const identifier2 = `${project3.identifier}-${sequence}`;
181359
181631
  const parentIssueParam = params.parentIssue;
181360
181632
  const { attachedTo, attachedToClass, collection, parents } = parentIssueParam !== void 0 ? yield* Effect_exports.gen(function* () {
181361
181633
  const parentIssue = yield* findIssueInProject(client, project3, parentIssueParam);
@@ -181379,12 +181651,36 @@ var createIssue = (params) => Effect_exports.gen(function* () {
181379
181651
  collection: "issues",
181380
181652
  parents: []
181381
181653
  };
181654
+ const incOps = { $inc: { sequence: 1 } };
181655
+ const incResult = yield* client.updateDoc(
181656
+ tracker.class.Project,
181657
+ toRef("core:space:Space"),
181658
+ project3._id,
181659
+ incOps,
181660
+ true
181661
+ );
181662
+ const sequence = yield* requireUpdatedSequence(incResult, params.project);
181663
+ const lastIssue = yield* client.findOne(
181664
+ tracker.class.Issue,
181665
+ hulyQuery({ space: project3._id }),
181666
+ { sort: { rank: import_core37.SortingOrder.Descending } }
181667
+ );
181668
+ const rank = (0, import_rank3.makeRank)(lastIssue?.rank, void 0);
181669
+ const descriptionMarkupRef = params.description !== void 0 && params.description.trim() !== "" ? yield* client.uploadMarkup(
181670
+ tracker.class.Issue,
181671
+ issueId,
181672
+ "description",
181673
+ params.description,
181674
+ "markdown"
181675
+ ) : null;
181676
+ const priority = stringToPriority(params.priority || "no-priority");
181677
+ const identifier2 = `${project3.identifier}-${sequence}`;
181382
181678
  const issueData = {
181383
181679
  title: params.title,
181384
181680
  description: descriptionMarkupRef,
181385
181681
  status: statusRef,
181386
181682
  number: sequence,
181387
- kind: tracker.taskTypes.Issue,
181683
+ kind: taskTypeWorkflow?.taskType._id ?? tracker.taskTypes.Issue,
181388
181684
  identifier: identifier2,
181389
181685
  priority,
181390
181686
  assignee: assigneeRef,
@@ -181412,7 +181708,15 @@ var createIssue = (params) => Effect_exports.gen(function* () {
181412
181708
  });
181413
181709
  var updateIssue = (params) => Effect_exports.gen(function* () {
181414
181710
  const { client, issue: issue2, project: project3 } = yield* findProjectAndIssue(params);
181415
- const statuses = params.status !== void 0 ? (yield* findProjectWithStatuses(params.project)).statuses : [];
181711
+ const workflowData = params.status !== void 0 || params.taskType !== void 0 ? yield* findProjectWithStatuses(params.project) : { projectType: void 0, statuses: [] };
181712
+ const taskTypeWorkflow = params.taskType === void 0 ? void 0 : yield* resolveTaskTypeWorkflow(
181713
+ client,
181714
+ project3,
181715
+ workflowData.projectType,
181716
+ workflowData.statuses,
181717
+ params.taskType,
181718
+ params.project
181719
+ );
181416
181720
  const updateOps = {};
181417
181721
  let descriptionUpdatedInPlace = false;
181418
181722
  if (params.title !== void 0) {
@@ -181441,8 +181745,16 @@ var updateIssue = (params) => Effect_exports.gen(function* () {
181441
181745
  updateOps.description = descriptionMarkupRef;
181442
181746
  }
181443
181747
  }
181444
- if (params.status !== void 0) {
181445
- updateOps.status = yield* resolveStatusByName(statuses, params.status, params.project);
181748
+ if (taskTypeWorkflow !== void 0) {
181749
+ const nextStatus = yield* chooseStatusForTaskType(taskTypeWorkflow, params.status, issue2.status, params.project);
181750
+ if (taskTypeWorkflow.taskType._id !== issue2.kind) {
181751
+ updateOps.kind = taskTypeWorkflow.taskType._id;
181752
+ }
181753
+ if (nextStatus !== issue2.status) {
181754
+ updateOps.status = nextStatus;
181755
+ }
181756
+ } else if (params.status !== void 0) {
181757
+ updateOps.status = yield* resolveStatusByName(workflowData.statuses, params.status, params.project);
181446
181758
  }
181447
181759
  if (params.priority !== void 0) {
181448
181760
  updateOps.priority = stringToPriority(params.priority);
@@ -181963,16 +182275,16 @@ var issueClassRef2 = toRef(tracker.class.Issue);
181963
182275
  var findTagByIdOrTitle = (client, idOrTitle) => Effect_exports.gen(function* () {
181964
182276
  const tag2 = (yield* client.findOne(
181965
182277
  tags.class.TagElement,
181966
- {
182278
+ hulyQuery({
181967
182279
  _id: toRef(idOrTitle),
181968
182280
  targetClass: issueClassRef2
181969
- }
182281
+ })
181970
182282
  )) ?? (yield* client.findOne(
181971
182283
  tags.class.TagElement,
181972
- {
182284
+ hulyQuery({
181973
182285
  title: idOrTitle,
181974
182286
  targetClass: issueClassRef2
181975
- }
182287
+ })
181976
182288
  ));
181977
182289
  return tag2;
181978
182290
  });
@@ -182003,7 +182315,7 @@ var listLabels = (params) => Effect_exports.gen(function* () {
182003
182315
  }
182004
182316
  const elements = yield* client.findAll(
182005
182317
  tags.class.TagElement,
182006
- query,
182318
+ hulyQuery(query),
182007
182319
  {
182008
182320
  limit,
182009
182321
  sort: { modifiedOn: import_core40.SortingOrder.Descending }
@@ -182022,10 +182334,10 @@ var createLabel = (params) => Effect_exports.gen(function* () {
182022
182334
  const client = yield* HulyClient;
182023
182335
  const existing = yield* client.findOne(
182024
182336
  tags.class.TagElement,
182025
- {
182337
+ hulyQuery({
182026
182338
  title: params.title,
182027
182339
  targetClass: issueClassRef2
182028
- }
182340
+ })
182029
182341
  );
182030
182342
  if (existing !== void 0) {
182031
182343
  return { id: TagElementId.make(existing._id), title: existing.title, created: false };
@@ -182087,10 +182399,10 @@ var removeIssueLabel = (params) => Effect_exports.gen(function* () {
182087
182399
  const labelTitle = params.label.trim();
182088
182400
  const tagRefs = yield* client.findAll(
182089
182401
  tags.class.TagReference,
182090
- {
182402
+ hulyQuery({
182091
182403
  attachedTo: issue2._id,
182092
182404
  attachedToClass: tracker.class.Issue
182093
- }
182405
+ })
182094
182406
  );
182095
182407
  const matchingRef = tagRefs.find(
182096
182408
  (r) => r.title.toLowerCase() === labelTitle.toLowerCase()
@@ -182133,7 +182445,7 @@ var issueTools = [
182133
182445
  },
182134
182446
  {
182135
182447
  name: "create_issue",
182136
- description: "Create a new issue in a Huly project. Optionally create as a sub-issue by specifying parentIssue. Description supports markdown formatting. Returns the created issue identifier.",
182448
+ description: "Create a new issue in a Huly project. Optionally set taskType by ID or display name; it is resolved within the target project's project type, and status is validated against that task type's workflow. Use list_task_types or get_project_type to discover valid task types and statuses. Optionally create as a sub-issue by specifying parentIssue. Description supports markdown formatting. Returns the created issue identifier.",
182137
182449
  category: CATEGORY11,
182138
182450
  inputSchema: createIssueParamsJsonSchema,
182139
182451
  handler: createToolHandler(
@@ -182144,7 +182456,7 @@ var issueTools = [
182144
182456
  },
182145
182457
  {
182146
182458
  name: "update_issue",
182147
- description: "Update fields on an existing Huly issue. Only provided fields are modified. Description updates support markdown.",
182459
+ description: "Update fields on an existing Huly issue. Optionally set taskType by ID or display name; it is resolved within the target project's project type, and the status is preserved only when valid for the new task type. Use list_task_types or get_project_type to discover valid task types and statuses. Only provided fields are modified. Description updates support markdown.",
182148
182460
  category: CATEGORY11,
182149
182461
  inputSchema: updateIssueParamsJsonSchema,
182150
182462
  handler: createToolHandler(
@@ -183351,8 +183663,300 @@ var notificationTools = [
183351
183663
  }
183352
183664
  ];
183353
183665
 
183354
- // src/huly/operations/projects.ts
183666
+ // src/huly/operations/processes.ts
183355
183667
  var import_core44 = __toESM(require_lib4(), 1);
183668
+
183669
+ // src/huly/process-plugin.ts
183670
+ var import_platform2 = __toESM(require_lib(), 1);
183671
+ var processId = "process";
183672
+ var processPlugin = (0, import_platform2.plugin)(processId, {
183673
+ class: {
183674
+ Process: "",
183675
+ Execution: "",
183676
+ State: "",
183677
+ Transition: ""
183678
+ }
183679
+ });
183680
+
183681
+ // src/huly/operations/processes.ts
183682
+ var encodeOrConnectionError = (schema, value3, operation) => Schema_exports.encode(schema)(value3).pipe(
183683
+ Effect_exports.as(value3),
183684
+ Effect_exports.mapError(
183685
+ (parseError2) => new HulyConnectionError({
183686
+ message: `${operation} response failed schema validation: ${parseError2.message}`,
183687
+ cause: parseError2
183688
+ })
183689
+ )
183690
+ );
183691
+ var nonEmpty = (value3) => value3 === void 0 || value3.trim() === "" ? void 0 : value3;
183692
+ var looksLikeMasterTagId = (identifier2) => identifier2.startsWith("card:");
183693
+ var looksLikeCardId = (identifier2) => identifier2.startsWith("card:") || identifier2.startsWith("card-") || /^[0-9a-f]{24}$/i.test(identifier2);
183694
+ var masterTagLabel = (tag2) => nonEmpty(tag2.label);
183695
+ var masterTagDisplay = (tag2) => ({
183696
+ id: tag2._id,
183697
+ name: masterTagLabel(tag2) ?? String(tag2._id)
183698
+ });
183699
+ var findMasterTagsByIds = (client, ids3) => ids3.length === 0 ? Effect_exports.succeed(/* @__PURE__ */ new Map()) : Effect_exports.gen(function* () {
183700
+ const uniqueIds = Array.from(new Set(ids3));
183701
+ const [masterTags, tags2] = yield* Effect_exports.all([
183702
+ client.findAll(cardPlugin.class.MasterTag, { _id: { $in: uniqueIds } }),
183703
+ client.findAll(cardPlugin.class.Tag, { _id: { $in: uniqueIds } })
183704
+ ]);
183705
+ const entries2 = [...masterTags, ...tags2].map((tag2) => {
183706
+ const display = masterTagDisplay(tag2);
183707
+ return [display.id, display];
183708
+ });
183709
+ return new Map(entries2);
183710
+ });
183711
+ var loadProcessDefinitionData = (client, processes) => Effect_exports.gen(function* () {
183712
+ if (processes.length === 0) return [];
183713
+ const processIds = processes.map((process4) => process4._id);
183714
+ const [masterTags, states, transitions] = yield* Effect_exports.all([
183715
+ findMasterTagsByIds(client, processes.map((process4) => process4.masterTag)),
183716
+ client.findAll(processPlugin.class.State, { process: { $in: processIds } }),
183717
+ client.findAll(processPlugin.class.Transition, { process: { $in: processIds } })
183718
+ ]);
183719
+ return processes.map((process4) => ({
183720
+ process: process4,
183721
+ masterTagName: masterTags.get(process4.masterTag)?.name,
183722
+ stateCount: states.filter((state) => state.process === process4._id).length,
183723
+ transitionCount: transitions.filter((transition) => transition.process === process4._id).length
183724
+ }));
183725
+ });
183726
+ var processCandidate = (data) => ({
183727
+ id: ProcessId.make(data.process._id),
183728
+ name: data.process.name,
183729
+ masterTagId: MasterTagId.make(data.process.masterTag),
183730
+ masterTagName: data.masterTagName
183731
+ });
183732
+ var processSummary = (data) => ({
183733
+ ...processCandidate(data),
183734
+ description: nonEmpty(data.process.description),
183735
+ autoStart: data.process.autoStart ?? false,
183736
+ automationOnly: data.process.automationOnly ?? false,
183737
+ parallelExecutionForbidden: data.process.parallelExecutionForbidden ?? false,
183738
+ stateCount: data.stateCount,
183739
+ transitionCount: data.transitionCount
183740
+ });
183741
+ var stateTitleMap = (states) => new Map(states.map((state) => [state._id, state.title]));
183742
+ var transitionSummary = (transition, titles) => ({
183743
+ id: transition._id,
183744
+ fromStateId: transition.from === null ? void 0 : ProcessStateId.make(transition.from),
183745
+ fromStateTitle: transition.from === null ? void 0 : titles.get(transition.from),
183746
+ toStateId: ProcessStateId.make(transition.to),
183747
+ toStateTitle: titles.get(transition.to),
183748
+ triggerId: transition.trigger,
183749
+ actionCount: transition.actions.length
183750
+ });
183751
+ var initialStateId = (transitions) => {
183752
+ const initialTransition = transitions.find((transition) => transition.from === null);
183753
+ return initialTransition === void 0 ? void 0 : ProcessStateId.make(initialTransition.to);
183754
+ };
183755
+ var processDetail = (data) => {
183756
+ const titles = stateTitleMap(data.states);
183757
+ return {
183758
+ ...processSummary(data),
183759
+ initialStateId: initialStateId(data.transitions),
183760
+ states: data.states.map((state) => ({
183761
+ id: ProcessStateId.make(state._id),
183762
+ title: state.title
183763
+ })),
183764
+ transitions: data.transitions.map((transition) => transitionSummary(transition, titles))
183765
+ };
183766
+ };
183767
+ var resolveProcess = (client, identifier2) => Effect_exports.gen(function* () {
183768
+ const byId = yield* client.findOne(
183769
+ processPlugin.class.Process,
183770
+ { _id: toRef(identifier2) }
183771
+ );
183772
+ if (byId !== void 0) return byId;
183773
+ const allProcesses = yield* client.findAll(
183774
+ processPlugin.class.Process,
183775
+ {},
183776
+ { sort: { name: import_core44.SortingOrder.Ascending } }
183777
+ );
183778
+ const matches = [...allProcesses].filter(
183779
+ (process4) => normalizeForComparison(process4.name) === normalizeForComparison(identifier2)
183780
+ );
183781
+ if (matches.length === 1) return matches[0];
183782
+ const data = yield* loadProcessDefinitionData(client, matches.length === 0 ? [...allProcesses] : matches);
183783
+ const candidates = data.map(processCandidate);
183784
+ return yield* matches.length === 0 ? Effect_exports.fail(new ProcessNotFoundError({ identifier: identifier2, candidates })) : Effect_exports.fail(new ProcessIdentifierAmbiguousError({ identifier: identifier2, candidates }));
183785
+ });
183786
+ var resolveMasterTag = (client, identifier2) => Effect_exports.gen(function* () {
183787
+ const [masterTags, tags2] = yield* Effect_exports.all([
183788
+ client.findAll(cardPlugin.class.MasterTag, {}),
183789
+ client.findAll(cardPlugin.class.Tag, {})
183790
+ ]);
183791
+ const allTags = [...masterTags, ...tags2];
183792
+ const byId = allTags.find((tag2) => tag2._id === identifier2);
183793
+ if (byId !== void 0) return byId._id;
183794
+ const matches = allTags.filter(
183795
+ (tag2) => normalizeForComparison(masterTagLabel(tag2) ?? "") === normalizeForComparison(identifier2)
183796
+ );
183797
+ if (matches.length === 1) return matches[0]._id;
183798
+ if (matches.length === 0) {
183799
+ return yield* looksLikeMasterTagId(identifier2) ? Effect_exports.succeed(toRef(identifier2)) : Effect_exports.fail(new ProcessMasterTagNotFoundError({ identifier: identifier2 }));
183800
+ }
183801
+ return yield* Effect_exports.fail(
183802
+ new ProcessMasterTagAmbiguousError({
183803
+ identifier: identifier2,
183804
+ candidates: matches.map((tag2) => ({
183805
+ id: MasterTagId.make(tag2._id),
183806
+ name: masterTagLabel(tag2) ?? String(tag2._id)
183807
+ }))
183808
+ })
183809
+ );
183810
+ });
183811
+ var resolveCardFilter = (client, identifier2) => Effect_exports.gen(function* () {
183812
+ const byId = yield* client.findOne(cardPlugin.class.Card, { _id: toRef(identifier2) });
183813
+ if (byId !== void 0) return byId._id;
183814
+ const byTitle = yield* client.findAll(cardPlugin.class.Card, { title: identifier2 });
183815
+ if (byTitle.length === 1) return byTitle[0]._id;
183816
+ if (byTitle.length > 1) {
183817
+ return yield* Effect_exports.fail(
183818
+ new ProcessCardIdentifierAmbiguousError({
183819
+ identifier: identifier2,
183820
+ candidates: byTitle.map((card) => ({
183821
+ id: CardId.make(card._id),
183822
+ title: card.title
183823
+ }))
183824
+ })
183825
+ );
183826
+ }
183827
+ return yield* looksLikeCardId(identifier2) ? Effect_exports.succeed(toRef(identifier2)) : Effect_exports.fail(new ProcessCardNotFoundError({ identifier: identifier2 }));
183828
+ });
183829
+ var findCardsByIds = (client, ids3) => ids3.length === 0 ? Effect_exports.succeed(/* @__PURE__ */ new Map()) : client.findAll(cardPlugin.class.Card, { _id: { $in: Array.from(new Set(ids3)) } }).pipe(
183830
+ Effect_exports.map((cards) => new Map(cards.map((card) => [card._id, card])))
183831
+ );
183832
+ var findStatesByIds = (client, ids3) => ids3.length === 0 ? Effect_exports.succeed(/* @__PURE__ */ new Map()) : client.findAll(
183833
+ processPlugin.class.State,
183834
+ { _id: { $in: Array.from(new Set(ids3)) } }
183835
+ ).pipe(Effect_exports.map((states) => new Map(states.map((state) => [state._id, state]))));
183836
+ var executionSummary = (execution, processes, states, cards) => ({
183837
+ id: ProcessExecutionId.make(execution._id),
183838
+ processId: ProcessId.make(execution.process),
183839
+ processName: processes.get(execution.process)?.name,
183840
+ cardId: CardId.make(execution.card),
183841
+ cardTitle: cards.get(execution.card)?.title,
183842
+ currentStateId: ProcessStateId.make(execution.currentState),
183843
+ currentStateTitle: states.get(execution.currentState)?.title,
183844
+ status: execution.status,
183845
+ errorCount: execution.error?.length ?? 0,
183846
+ hasError: (execution.error?.length ?? 0) > 0,
183847
+ hasParent: execution.parentId !== void 0,
183848
+ parentExecutionId: execution.parentId === void 0 ? void 0 : ProcessExecutionId.make(execution.parentId),
183849
+ modifiedOn: execution.modifiedOn
183850
+ });
183851
+ var listProcesses = (params) => Effect_exports.gen(function* () {
183852
+ const client = yield* HulyClient;
183853
+ const masterTag = params.masterTag === void 0 ? void 0 : yield* resolveMasterTag(client, params.masterTag);
183854
+ const query = masterTag === void 0 ? {} : { masterTag };
183855
+ const processes = yield* client.findAll(
183856
+ processPlugin.class.Process,
183857
+ query,
183858
+ { limit: clampLimit(params.limit), sort: { name: import_core44.SortingOrder.Ascending } }
183859
+ );
183860
+ const data = yield* loadProcessDefinitionData(client, [...processes]);
183861
+ const result = {
183862
+ processes: data.map(processSummary),
183863
+ total: data.length
183864
+ };
183865
+ return yield* encodeOrConnectionError(ListProcessesResultSchema, result, "listProcesses");
183866
+ });
183867
+ var getProcess = (params) => Effect_exports.gen(function* () {
183868
+ const client = yield* HulyClient;
183869
+ const process4 = yield* resolveProcess(client, params.process);
183870
+ const [data] = yield* loadProcessDefinitionData(client, [process4]);
183871
+ const [states, transitions] = yield* Effect_exports.all([
183872
+ client.findAll(
183873
+ processPlugin.class.State,
183874
+ { process: process4._id },
183875
+ { sort: { rank: import_core44.SortingOrder.Ascending } }
183876
+ ),
183877
+ client.findAll(
183878
+ processPlugin.class.Transition,
183879
+ { process: process4._id },
183880
+ { sort: { rank: import_core44.SortingOrder.Ascending } }
183881
+ )
183882
+ ]);
183883
+ const result = processDetail({ ...data, states: [...states], transitions: [...transitions] });
183884
+ return yield* encodeOrConnectionError(ProcessDetailSchema, result, "getProcess");
183885
+ });
183886
+ var listExecutions = (params) => Effect_exports.gen(function* () {
183887
+ const client = yield* HulyClient;
183888
+ const process4 = params.process === void 0 ? void 0 : yield* resolveProcess(client, params.process);
183889
+ const card = params.card === void 0 ? void 0 : yield* resolveCardFilter(client, params.card);
183890
+ const query = {
183891
+ ...process4 === void 0 ? {} : { process: process4._id },
183892
+ ...card === void 0 ? {} : { card },
183893
+ ...params.status === void 0 ? {} : { status: params.status }
183894
+ };
183895
+ const executions = yield* client.findAll(
183896
+ processPlugin.class.Execution,
183897
+ query,
183898
+ { limit: clampLimit(params.limit), sort: { modifiedOn: import_core44.SortingOrder.Descending } }
183899
+ );
183900
+ const processIds = executions.map((execution) => execution.process);
183901
+ const processLookup = processIds.length === 0 ? Effect_exports.succeed(/* @__PURE__ */ new Map()) : client.findAll(
183902
+ processPlugin.class.Process,
183903
+ { _id: { $in: Array.from(new Set(processIds)) } }
183904
+ ).pipe(Effect_exports.map((items) => new Map(items.map((item) => [item._id, item]))));
183905
+ const [processes, states, cards] = yield* Effect_exports.all([
183906
+ processLookup,
183907
+ findStatesByIds(client, executions.map((execution) => execution.currentState)),
183908
+ findCardsByIds(client, executions.map((execution) => execution.card))
183909
+ ]);
183910
+ const result = {
183911
+ executions: executions.map((execution) => executionSummary(execution, processes, states, cards)),
183912
+ total: executions.length
183913
+ };
183914
+ return yield* encodeOrConnectionError(ListExecutionsResultSchema, result, "listExecutions");
183915
+ });
183916
+
183917
+ // src/mcp/tools/processes.ts
183918
+ var CATEGORY16 = "processes";
183919
+ var processTools = [
183920
+ {
183921
+ name: "list_processes",
183922
+ description: "List read-only Huly Process workflow definitions. Optionally filter by the master tag/card type that workflows attach to. Returns process IDs, names, attached card type, automation flags, and state/transition counts.",
183923
+ category: CATEGORY16,
183924
+ inputSchema: listProcessesParamsJsonSchema,
183925
+ handler: createEncodedToolHandler(
183926
+ "list_processes",
183927
+ parseListProcessesParams,
183928
+ listProcesses,
183929
+ ListProcessesResultSchema
183930
+ )
183931
+ },
183932
+ {
183933
+ name: "get_process",
183934
+ description: "Get one Huly Process workflow definition by process ID or exact display name. If a name is ambiguous, the tool returns a typed error with candidate IDs instead of guessing.",
183935
+ category: CATEGORY16,
183936
+ inputSchema: getProcessParamsJsonSchema,
183937
+ handler: createEncodedToolHandler(
183938
+ "get_process",
183939
+ parseGetProcessParams,
183940
+ getProcess,
183941
+ ProcessDetailSchema
183942
+ )
183943
+ },
183944
+ {
183945
+ name: "list_process_executions",
183946
+ description: "List read-only Huly Process workflow executions. Supports filters by process ID/name, card/document ID/title, and status. Rows are enriched with process name, card title, and current state title when available.",
183947
+ category: CATEGORY16,
183948
+ inputSchema: listExecutionsParamsJsonSchema,
183949
+ handler: createEncodedToolHandler(
183950
+ "list_process_executions",
183951
+ parseListExecutionsParams,
183952
+ listExecutions,
183953
+ ListExecutionsResultSchema
183954
+ )
183955
+ }
183956
+ ];
183957
+
183958
+ // src/huly/operations/projects.ts
183959
+ var import_core45 = __toESM(require_lib4(), 1);
183356
183960
  var import_tracker6 = __toESM(require_lib36(), 1);
183357
183961
  var listProjects = (params) => Effect_exports.gen(function* () {
183358
183962
  const client = yield* HulyClient;
@@ -183367,7 +183971,7 @@ var listProjects = (params) => Effect_exports.gen(function* () {
183367
183971
  {
183368
183972
  limit,
183369
183973
  sort: {
183370
- name: import_core44.SortingOrder.Ascending
183974
+ name: import_core45.SortingOrder.Ascending
183371
183975
  }
183372
183976
  }
183373
183977
  );
@@ -183436,7 +184040,7 @@ var createProject = (params) => Effect_exports.gen(function* () {
183436
184040
  created: false
183437
184041
  };
183438
184042
  }
183439
- const projectId = (0, import_core44.generateId)();
184043
+ const projectId = (0, import_core45.generateId)();
183440
184044
  const projectData = {
183441
184045
  name: params.name,
183442
184046
  description: params.description ?? "",
@@ -183498,12 +184102,12 @@ var deleteProject = (params) => Effect_exports.gen(function* () {
183498
184102
  });
183499
184103
 
183500
184104
  // src/mcp/tools/projects.ts
183501
- var CATEGORY16 = "projects";
184105
+ var CATEGORY17 = "projects";
183502
184106
  var projectTools = [
183503
184107
  {
183504
184108
  name: "list_projects",
183505
184109
  description: "List all Huly projects. Returns projects sorted by name. Supports filtering by archived status.",
183506
- category: CATEGORY16,
184110
+ category: CATEGORY17,
183507
184111
  inputSchema: listProjectsParamsJsonSchema,
183508
184112
  handler: createToolHandler(
183509
184113
  "list_projects",
@@ -183514,7 +184118,7 @@ var projectTools = [
183514
184118
  {
183515
184119
  name: "get_project",
183516
184120
  description: "Get full details of a Huly project including its statuses. Returns project name, description, archived flag, default status, and all available statuses.",
183517
- category: CATEGORY16,
184121
+ category: CATEGORY17,
183518
184122
  inputSchema: getProjectParamsJsonSchema,
183519
184123
  handler: createToolHandler(
183520
184124
  "get_project",
@@ -183525,7 +184129,7 @@ var projectTools = [
183525
184129
  {
183526
184130
  name: "list_statuses",
183527
184131
  description: "List all issue statuses for a Huly project with category info. Returns status name, isDone, isCanceled, and isDefault flags. Use this to discover valid statuses before creating or updating issues.",
183528
- category: CATEGORY16,
184132
+ category: CATEGORY17,
183529
184133
  inputSchema: listStatusesParamsJsonSchema,
183530
184134
  handler: createToolHandler(
183531
184135
  "list_statuses",
@@ -183536,7 +184140,7 @@ var projectTools = [
183536
184140
  {
183537
184141
  name: "create_project",
183538
184142
  description: "Create a new Huly tracker project. Idempotent: returns existing project if one with the same identifier already exists (created=false). Identifier must be 1-5 uppercase alphanumeric chars starting with a letter.",
183539
- category: CATEGORY16,
184143
+ category: CATEGORY17,
183540
184144
  inputSchema: createProjectParamsJsonSchema,
183541
184145
  handler: createToolHandler(
183542
184146
  "create_project",
@@ -183547,7 +184151,7 @@ var projectTools = [
183547
184151
  {
183548
184152
  name: "update_project",
183549
184153
  description: "Update a Huly project. Only provided fields are modified. Set description to null to clear it.",
183550
- category: CATEGORY16,
184154
+ category: CATEGORY17,
183551
184155
  inputSchema: updateProjectParamsJsonSchema,
183552
184156
  handler: createToolHandler(
183553
184157
  "update_project",
@@ -183558,7 +184162,7 @@ var projectTools = [
183558
184162
  {
183559
184163
  name: "delete_project",
183560
184164
  description: "Permanently delete a Huly project. All issues, milestones, and components in this project will be orphaned. This action cannot be undone.",
183561
- category: CATEGORY16,
184165
+ category: CATEGORY17,
183562
184166
  inputSchema: deleteProjectParamsJsonSchema,
183563
184167
  handler: createToolHandler(
183564
184168
  "delete_project",
@@ -183601,12 +184205,12 @@ var fulltextSearch = (params) => Effect_exports.gen(function* () {
183601
184205
  });
183602
184206
 
183603
184207
  // src/mcp/tools/search.ts
183604
- var CATEGORY17 = "search";
184208
+ var CATEGORY18 = "search";
183605
184209
  var searchTools = [
183606
184210
  {
183607
184211
  name: "fulltext_search",
183608
184212
  description: "Perform a global fulltext search across all Huly content. Searches issues, documents, messages, and other indexed content. Returns matching items sorted by relevance (newest first).",
183609
- category: CATEGORY17,
184213
+ category: CATEGORY18,
183610
184214
  inputSchema: fulltextSearchParamsJsonSchema,
183611
184215
  handler: createToolHandler(
183612
184216
  "fulltext_search",
@@ -183629,12 +184233,12 @@ var uploadFile = (params) => Effect_exports.gen(function* () {
183629
184233
  });
183630
184234
 
183631
184235
  // src/mcp/tools/storage.ts
183632
- var CATEGORY18 = "storage";
184236
+ var CATEGORY19 = "storage";
183633
184237
  var storageTools = [
183634
184238
  {
183635
184239
  name: "upload_file",
183636
184240
  description: "Upload a file to Huly storage. Provide ONE of: filePath (local file - preferred), fileUrl (fetch from URL), or data (base64 - for small files only). Returns blob ID and URL for referencing the file.",
183637
- category: CATEGORY18,
184241
+ category: CATEGORY19,
183638
184242
  inputSchema: uploadFileParamsJsonSchema,
183639
184243
  handler: createStorageToolHandler(
183640
184244
  "upload_file",
@@ -183645,12 +184249,12 @@ var storageTools = [
183645
184249
  ];
183646
184250
 
183647
184251
  // src/mcp/tools/tag-categories.ts
183648
- var CATEGORY19 = "tag-categories";
184252
+ var CATEGORY20 = "tag-categories";
183649
184253
  var tagCategoryTools = [
183650
184254
  {
183651
184255
  name: "list_tag_categories",
183652
184256
  description: "List tag/label categories in the workspace. Categories group labels (e.g., 'Priority Labels', 'Type Labels'). Optional targetClass filter (defaults to all).",
183653
- category: CATEGORY19,
184257
+ category: CATEGORY20,
183654
184258
  inputSchema: listTagCategoriesParamsJsonSchema,
183655
184259
  handler: createToolHandler(
183656
184260
  "list_tag_categories",
@@ -183661,7 +184265,7 @@ var tagCategoryTools = [
183661
184265
  {
183662
184266
  name: "create_tag_category",
183663
184267
  description: "Create a new tag/label category. Idempotent: returns existing category if one with the same label and targetClass already exists (created=false). Defaults targetClass to tracker issues.",
183664
- category: CATEGORY19,
184268
+ category: CATEGORY20,
183665
184269
  inputSchema: createTagCategoryParamsJsonSchema,
183666
184270
  handler: createToolHandler(
183667
184271
  "create_tag_category",
@@ -183672,7 +184276,7 @@ var tagCategoryTools = [
183672
184276
  {
183673
184277
  name: "update_tag_category",
183674
184278
  description: "Update a tag/label category. Accepts category ID or label name. Only provided fields are modified.",
183675
- category: CATEGORY19,
184279
+ category: CATEGORY20,
183676
184280
  inputSchema: updateTagCategoryParamsJsonSchema,
183677
184281
  handler: createToolHandler(
183678
184282
  "update_tag_category",
@@ -183683,7 +184287,7 @@ var tagCategoryTools = [
183683
184287
  {
183684
184288
  name: "delete_tag_category",
183685
184289
  description: "Permanently delete a tag/label category. Accepts category ID or label name. Labels in this category will be orphaned (not deleted). This action cannot be undone.",
183686
- category: CATEGORY19,
184290
+ category: CATEGORY20,
183687
184291
  inputSchema: deleteTagCategoryParamsJsonSchema,
183688
184292
  handler: createToolHandler(
183689
184293
  "delete_tag_category",
@@ -183694,8 +184298,8 @@ var tagCategoryTools = [
183694
184298
  ];
183695
184299
 
183696
184300
  // src/huly/operations/task-management.ts
183697
- var import_core45 = __toESM(require_lib4(), 1);
183698
- var import_platform2 = __toESM(require_lib(), 1);
184301
+ var import_core46 = __toESM(require_lib4(), 1);
184302
+ var import_platform3 = __toESM(require_lib(), 1);
183699
184303
  var CATEGORY_TO_REF = {
183700
184304
  backlog: task.statusCategory.UnStarted,
183701
184305
  todo: task.statusCategory.ToDo,
@@ -183722,7 +184326,7 @@ var STATUS_CATEGORIES = [
183722
184326
  ];
183723
184327
  var WORKFLOW_WARNING = "This changes workspace-level tracker configuration for every project using this project type.";
183724
184328
  var toCategoryValue = (category) => category === void 0 ? "unknown" : REF_TO_CATEGORY.get(category) ?? "unknown";
183725
- var encodeOrConnectionError = (schema, value3, operation) => Schema_exports.encode(schema)(value3).pipe(
184329
+ var encodeOrConnectionError2 = (schema, value3, operation) => Schema_exports.encode(schema)(value3).pipe(
183726
184330
  Effect_exports.as(value3),
183727
184331
  Effect_exports.mapError(
183728
184332
  (parseError2) => new HulyConnectionError({
@@ -183732,16 +184336,16 @@ var encodeOrConnectionError = (schema, value3, operation) => Schema_exports.enco
183732
184336
  )
183733
184337
  );
183734
184338
  var uniqueStatusIds = (projectType) => Array.from(new Set(projectType.statuses.map((status) => status._id)));
183735
- var getStatusDocs = (client, statusIds) => statusIds.length === 0 ? Effect_exports.succeed([]) : client.findAll(core.class.Status, { _id: { $in: [...statusIds] } }).pipe(
184339
+ var getStatusDocs = (client, statusIds) => statusIds.length === 0 ? Effect_exports.succeed([]) : client.findAll(core.class.Status, hulyQuery({ _id: { $in: [...statusIds] } })).pipe(
183736
184340
  Effect_exports.map((result) => [...result])
183737
184341
  );
183738
- var getTaskTypes = (client, taskTypeIds) => taskTypeIds.length === 0 ? Effect_exports.succeed([]) : client.findAll(task.class.TaskType, { _id: { $in: [...taskTypeIds] } }).pipe(
184342
+ var getTaskTypes = (client, taskTypeIds) => taskTypeIds.length === 0 ? Effect_exports.succeed([]) : client.findAll(task.class.TaskType, hulyQuery({ _id: { $in: [...taskTypeIds] } })).pipe(
183739
184343
  Effect_exports.map((result) => [...result])
183740
184344
  );
183741
- var getTaskTypesByProjectType = (client, projectTypeId) => client.findAll(task.class.TaskType, { parent: projectTypeId }).pipe(
184345
+ var getTaskTypesByProjectType = (client, projectTypeId) => client.findAll(task.class.TaskType, hulyQuery({ parent: projectTypeId })).pipe(
183742
184346
  Effect_exports.map((result) => [...result])
183743
184347
  );
183744
- var getRecoverableStatusesByName = (client, name) => client.findAll(core.class.Status, { ofAttribute: tracker.attribute.IssueStatus }).pipe(
184348
+ var getRecoverableStatusesByName = (client, name) => client.findAll(core.class.Status, hulyQuery({ ofAttribute: tracker.attribute.IssueStatus })).pipe(
183745
184349
  Effect_exports.map(
183746
184350
  (result) => [...result].filter((status) => normalizeForComparison(status.name) === normalizeForComparison(name))
183747
184351
  ),
@@ -183796,8 +184400,8 @@ var projectTypeDetail = (data) => ({
183796
184400
  });
183797
184401
  var listAllProjectTypes = (client) => client.findAll(
183798
184402
  task.class.ProjectType,
183799
- {},
183800
- { sort: { name: import_core45.SortingOrder.Ascending } }
184403
+ hulyQuery({}),
184404
+ { sort: { name: import_core46.SortingOrder.Ascending } }
183801
184405
  ).pipe(Effect_exports.map((result) => [...result]));
183802
184406
  var resolveProjectType = (client, projectTypeRef) => Effect_exports.gen(function* () {
183803
184407
  const projectTypes = yield* listAllProjectTypes(client);
@@ -183840,13 +184444,13 @@ var listProjectTypes = (_params) => Effect_exports.gen(function* () {
183840
184444
  projectTypes: workflowData.map(projectTypeSummary),
183841
184445
  total: workflowData.length
183842
184446
  };
183843
- return yield* encodeOrConnectionError(ListProjectTypesResultSchema, result, "listProjectTypes");
184447
+ return yield* encodeOrConnectionError2(ListProjectTypesResultSchema, result, "listProjectTypes");
183844
184448
  });
183845
184449
  var getProjectType = (params) => Effect_exports.gen(function* () {
183846
184450
  const client = yield* HulyClient;
183847
184451
  const projectType = yield* resolveProjectType(client, params.projectType);
183848
184452
  const workflowData = yield* loadWorkflowData(client, projectType);
183849
- return yield* encodeOrConnectionError(ProjectTypeDetailSchema, projectTypeDetail(workflowData), "getProjectType");
184453
+ return yield* encodeOrConnectionError2(ProjectTypeDetailSchema, projectTypeDetail(workflowData), "getProjectType");
183850
184454
  });
183851
184455
  var listTaskTypes = (params) => Effect_exports.gen(function* () {
183852
184456
  const client = yield* HulyClient;
@@ -183856,7 +184460,7 @@ var listTaskTypes = (params) => Effect_exports.gen(function* () {
183856
184460
  (data) => data.taskTypes.map((taskType) => taskTypeSummary(data.projectType, taskType))
183857
184461
  );
183858
184462
  const result = { taskTypes, total: taskTypes.length };
183859
- return yield* encodeOrConnectionError(ListTaskTypesResultSchema, result, "listTaskTypes");
184463
+ return yield* encodeOrConnectionError2(ListTaskTypesResultSchema, result, "listTaskTypes");
183860
184464
  });
183861
184465
  var createTaskType = (params) => Effect_exports.gen(function* () {
183862
184466
  const client = yield* HulyClient;
@@ -183890,7 +184494,7 @@ var createTaskType = (params) => Effect_exports.gen(function* () {
183890
184494
  affectedTaskTypeIds: [TaskTypeId.make(existing._id)],
183891
184495
  warning: WORKFLOW_WARNING
183892
184496
  };
183893
- return yield* encodeOrConnectionError(CreateTaskTypeResultSchema, result2, "createTaskType");
184497
+ return yield* encodeOrConnectionError2(CreateTaskTypeResultSchema, result2, "createTaskType");
183894
184498
  }
183895
184499
  const template = params.templateTaskType === void 0 ? workflowData.taskTypes.at(0) : yield* resolveTaskType(workflowData.taskTypes, params.templateTaskType);
183896
184500
  if (template === void 0) {
@@ -183898,7 +184502,7 @@ var createTaskType = (params) => Effect_exports.gen(function* () {
183898
184502
  new HulyError({ message: `Project type '${projectType.name}' has no task type to copy.` })
183899
184503
  );
183900
184504
  }
183901
- const taskTypeId = (0, import_core45.generateId)();
184505
+ const taskTypeId = (0, import_core46.generateId)();
183902
184506
  const targetClassId = `${taskTypeId}:type:mixin`;
183903
184507
  const targetClassRef = toRef(targetClassId);
183904
184508
  yield* client.createDoc(
@@ -183906,8 +184510,8 @@ var createTaskType = (params) => Effect_exports.gen(function* () {
183906
184510
  core.space.Model,
183907
184511
  {
183908
184512
  extends: template.ofClass,
183909
- kind: import_core45.ClassifierKind.MIXIN,
183910
- label: (0, import_platform2.getEmbeddedLabel)(params.name),
184513
+ kind: import_core46.ClassifierKind.MIXIN,
184514
+ label: (0, import_platform3.getEmbeddedLabel)(params.name),
183911
184515
  ...template.icon === void 0 ? {} : { icon: template.icon }
183912
184516
  },
183913
184517
  toRef(targetClassId)
@@ -183975,7 +184579,7 @@ var createTaskType = (params) => Effect_exports.gen(function* () {
183975
184579
  affectedTaskTypeIds: [TaskTypeId.make(taskTypeId)],
183976
184580
  warning: WORKFLOW_WARNING
183977
184581
  };
183978
- return yield* encodeOrConnectionError(CreateTaskTypeResultSchema, result, "createTaskType");
184582
+ return yield* encodeOrConnectionError2(CreateTaskTypeResultSchema, result, "createTaskType");
183979
184583
  });
183980
184584
  var createIssueStatus = (params) => Effect_exports.gen(function* () {
183981
184585
  const client = yield* HulyClient;
@@ -183988,7 +184592,7 @@ var createIssueStatus = (params) => Effect_exports.gen(function* () {
183988
184592
  [...workflowData.statuses, ...statusesByName],
183989
184593
  params.name
183990
184594
  );
183991
- const statusId = existingStatus?._id ?? (0, import_core45.generateId)();
184595
+ const statusId = existingStatus?._id ?? (0, import_core46.generateId)();
183992
184596
  if (existingStatus !== void 0) {
183993
184597
  yield* requireStatusCategoryMatch(existingStatus, params.category);
183994
184598
  }
@@ -184049,37 +184653,37 @@ var createIssueStatus = (params) => Effect_exports.gen(function* () {
184049
184653
  affectedTaskTypeIds: targetTaskTypes.map((taskType) => TaskTypeId.make(taskType._id)),
184050
184654
  warning: WORKFLOW_WARNING
184051
184655
  };
184052
- return yield* encodeOrConnectionError(CreateIssueStatusResultSchema, result, "createIssueStatus");
184656
+ return yield* encodeOrConnectionError2(CreateIssueStatusResultSchema, result, "createIssueStatus");
184053
184657
  });
184054
184658
 
184055
184659
  // src/mcp/tools/task-management.ts
184056
- var CATEGORY20 = "task-management";
184660
+ var CATEGORY21 = "task-management";
184057
184661
  var taskManagementTools = [
184058
184662
  {
184059
184663
  name: "list_project_types",
184060
184664
  description: "List Huly tracker project types/workflow templates. Returns ID, display name, descriptor, task type count, status count, and whether the type appears to be the default Classic tracker type.",
184061
- category: CATEGORY20,
184665
+ category: CATEGORY21,
184062
184666
  inputSchema: listProjectTypesParamsJsonSchema,
184063
184667
  handler: createToolHandler("list_project_types", parseListProjectTypesParams, listProjectTypes)
184064
184668
  },
184065
184669
  {
184066
184670
  name: "get_project_type",
184067
184671
  description: "Inspect one Huly tracker project type in a single call. Accepts projectType as ID or display name; when omitted, uses the unambiguous Classic tracker type. Returns task types, statuses, categories, and task-type-to-status mappings.",
184068
- category: CATEGORY20,
184672
+ category: CATEGORY21,
184069
184673
  inputSchema: getProjectTypeParamsJsonSchema,
184070
184674
  handler: createToolHandler("get_project_type", parseGetProjectTypeParams, getProjectType)
184071
184675
  },
184072
184676
  {
184073
184677
  name: "list_task_types",
184074
184678
  description: "List Huly issue/task types. Optionally filter by projectType ID or display name. Returns task type identity, parent project type, kind, issue class, and available status count.",
184075
- category: CATEGORY20,
184679
+ category: CATEGORY21,
184076
184680
  inputSchema: listTaskTypesParamsJsonSchema,
184077
184681
  handler: createToolHandler("list_task_types", parseListTaskTypesParams, listTaskTypes)
184078
184682
  },
184079
184683
  {
184080
184684
  name: "create_task_type",
184081
184685
  description: "Add a Huly issue/task type to a project type idempotently by normalized name. Copies required workflow configuration from an existing template task type unless templateTaskType is supplied. Returns created, IDs, affected task type IDs, and a workspace-level workflow warning.",
184082
- category: CATEGORY20,
184686
+ category: CATEGORY21,
184083
184687
  inputSchema: createTaskTypeParamsJsonSchema,
184084
184688
  annotations: { idempotentHint: true },
184085
184689
  handler: createToolHandler("create_task_type", parseCreateTaskTypeParams, createTaskType)
@@ -184087,7 +184691,7 @@ var taskManagementTools = [
184087
184691
  {
184088
184692
  name: "create_issue_status",
184089
184693
  description: "Add a Huly issue workflow status idempotently by normalized name within a project type and task type scope. Accepts category as backlog, todo, active, done, or canceled; taskType may be ID or display name, and omission applies the status to every task type in the project type.",
184090
- category: CATEGORY20,
184694
+ category: CATEGORY21,
184091
184695
  inputSchema: createIssueStatusParamsJsonSchema,
184092
184696
  annotations: { idempotentHint: true },
184093
184697
  handler: createToolHandler("create_issue_status", parseCreateIssueStatusParams, createIssueStatus)
@@ -184095,7 +184699,7 @@ var taskManagementTools = [
184095
184699
  ];
184096
184700
 
184097
184701
  // src/huly/operations/test-management-core.ts
184098
- var import_core46 = __toESM(require_lib4(), 1);
184702
+ var import_core47 = __toESM(require_lib4(), 1);
184099
184703
 
184100
184704
  // src/huly/test-management-classes.ts
184101
184705
  var testManagement = {
@@ -184249,7 +184853,7 @@ var listTestProjects = (params) => Effect_exports.gen(function* () {
184249
184853
  {},
184250
184854
  {
184251
184855
  limit,
184252
- sort: { name: import_core46.SortingOrder.Ascending }
184856
+ sort: { name: import_core47.SortingOrder.Ascending }
184253
184857
  }
184254
184858
  );
184255
184859
  return {
@@ -184271,7 +184875,7 @@ var listTestSuites = (params) => Effect_exports.gen(function* () {
184271
184875
  query,
184272
184876
  {
184273
184877
  limit,
184274
- sort: { modifiedOn: import_core46.SortingOrder.Descending }
184878
+ sort: { modifiedOn: import_core47.SortingOrder.Descending }
184275
184879
  }
184276
184880
  );
184277
184881
  return {
@@ -184304,7 +184908,7 @@ var createTestSuite = (params) => Effect_exports.gen(function* () {
184304
184908
  if (existing !== void 0) {
184305
184909
  return { id: TestSuiteId.make(existing._id), name: existing.name, created: false };
184306
184910
  }
184307
- const suiteId = (0, import_core46.generateId)();
184911
+ const suiteId = (0, import_core47.generateId)();
184308
184912
  const suiteData = {
184309
184913
  name: params.name,
184310
184914
  description: params.description ?? "",
@@ -184374,7 +184978,7 @@ var listTestCases = (params) => Effect_exports.gen(function* () {
184374
184978
  query,
184375
184979
  {
184376
184980
  limit,
184377
- sort: { modifiedOn: import_core46.SortingOrder.Descending }
184981
+ sort: { modifiedOn: import_core47.SortingOrder.Descending }
184378
184982
  }
184379
184983
  );
184380
184984
  return {
@@ -184402,7 +185006,7 @@ var createTestCase = (params) => Effect_exports.gen(function* () {
184402
185006
  const client = yield* HulyClient;
184403
185007
  const project3 = yield* findTestProject(client, params.project);
184404
185008
  const suite = yield* findTestSuite(client, project3, params.suite);
184405
- const caseId = (0, import_core46.generateId)();
185009
+ const caseId = (0, import_core47.generateId)();
184406
185010
  const assigneeRef = params.assignee !== void 0 ? toRef((yield* resolveAssignee2(params.assignee))._id) : null;
184407
185011
  const typeEnum = params.type !== void 0 ? stringToTestCaseType(params.type) ?? 0 /* Functional */ : 0 /* Functional */;
184408
185012
  const priorityEnum = params.priority !== void 0 ? stringToTestCasePriority(params.priority) ?? 1 /* Medium */ : 1 /* Medium */;
@@ -184506,12 +185110,12 @@ var deleteTestCase = (params) => Effect_exports.gen(function* () {
184506
185110
  });
184507
185111
 
184508
185112
  // src/mcp/tools/test-management-core.ts
184509
- var CATEGORY21 = "test-management";
185113
+ var CATEGORY22 = "test-management";
184510
185114
  var testManagementCoreTools = [
184511
185115
  {
184512
185116
  name: "list_test_projects",
184513
185117
  description: "List test management projects. Returns test projects sorted by name. These are separate from tracker projects.",
184514
- category: CATEGORY21,
185118
+ category: CATEGORY22,
184515
185119
  inputSchema: listTestProjectsParamsJsonSchema,
184516
185120
  handler: createToolHandler(
184517
185121
  "list_test_projects",
@@ -184522,7 +185126,7 @@ var testManagementCoreTools = [
184522
185126
  {
184523
185127
  name: "list_test_suites",
184524
185128
  description: "List test suites in a test project. Accepts project ID or name. Optional parent filter for nested suites.",
184525
- category: CATEGORY21,
185129
+ category: CATEGORY22,
184526
185130
  inputSchema: listTestSuitesParamsJsonSchema,
184527
185131
  handler: createToolHandler(
184528
185132
  "list_test_suites",
@@ -184533,7 +185137,7 @@ var testManagementCoreTools = [
184533
185137
  {
184534
185138
  name: "get_test_suite",
184535
185139
  description: "Get a single test suite by ID or name within a test project. Returns suite details and test case count.",
184536
- category: CATEGORY21,
185140
+ category: CATEGORY22,
184537
185141
  inputSchema: getTestSuiteParamsJsonSchema,
184538
185142
  handler: createToolHandler(
184539
185143
  "get_test_suite",
@@ -184544,7 +185148,7 @@ var testManagementCoreTools = [
184544
185148
  {
184545
185149
  name: "create_test_suite",
184546
185150
  description: "Create a test suite in a test project. Idempotent: returns existing suite if one with the same name exists (created=false). Optional parent for nesting.",
184547
- category: CATEGORY21,
185151
+ category: CATEGORY22,
184548
185152
  inputSchema: createTestSuiteParamsJsonSchema,
184549
185153
  handler: createToolHandler(
184550
185154
  "create_test_suite",
@@ -184555,7 +185159,7 @@ var testManagementCoreTools = [
184555
185159
  {
184556
185160
  name: "update_test_suite",
184557
185161
  description: "Update a test suite. Accepts suite ID or name. Only provided fields are modified.",
184558
- category: CATEGORY21,
185162
+ category: CATEGORY22,
184559
185163
  inputSchema: updateTestSuiteParamsJsonSchema,
184560
185164
  handler: createToolHandler(
184561
185165
  "update_test_suite",
@@ -184566,7 +185170,7 @@ var testManagementCoreTools = [
184566
185170
  {
184567
185171
  name: "delete_test_suite",
184568
185172
  description: "Permanently delete a test suite. Accepts suite ID or name. This action cannot be undone.",
184569
- category: CATEGORY21,
185173
+ category: CATEGORY22,
184570
185174
  inputSchema: deleteTestSuiteParamsJsonSchema,
184571
185175
  handler: createToolHandler(
184572
185176
  "delete_test_suite",
@@ -184577,7 +185181,7 @@ var testManagementCoreTools = [
184577
185181
  {
184578
185182
  name: "list_test_cases",
184579
185183
  description: "List test cases in a test project. Optional filters: suite (ID or name), assignee (name or email).",
184580
- category: CATEGORY21,
185184
+ category: CATEGORY22,
184581
185185
  inputSchema: listTestCasesParamsJsonSchema,
184582
185186
  handler: createToolHandler(
184583
185187
  "list_test_cases",
@@ -184588,7 +185192,7 @@ var testManagementCoreTools = [
184588
185192
  {
184589
185193
  name: "get_test_case",
184590
185194
  description: "Get a single test case by ID or name within a test project.",
184591
- category: CATEGORY21,
185195
+ category: CATEGORY22,
184592
185196
  inputSchema: getTestCaseParamsJsonSchema,
184593
185197
  handler: createToolHandler(
184594
185198
  "get_test_case",
@@ -184599,7 +185203,7 @@ var testManagementCoreTools = [
184599
185203
  {
184600
185204
  name: "create_test_case",
184601
185205
  description: "Create a test case attached to a suite. Requires project and suite. Defaults: type=functional, priority=medium, status=draft.",
184602
- category: CATEGORY21,
185206
+ category: CATEGORY22,
184603
185207
  inputSchema: createTestCaseParamsJsonSchema,
184604
185208
  handler: createToolHandler(
184605
185209
  "create_test_case",
@@ -184610,7 +185214,7 @@ var testManagementCoreTools = [
184610
185214
  {
184611
185215
  name: "update_test_case",
184612
185216
  description: "Update a test case. Accepts test case ID or name. Only provided fields are modified. Set assignee to null to unassign.",
184613
- category: CATEGORY21,
185217
+ category: CATEGORY22,
184614
185218
  inputSchema: updateTestCaseParamsJsonSchema,
184615
185219
  handler: createToolHandler(
184616
185220
  "update_test_case",
@@ -184621,7 +185225,7 @@ var testManagementCoreTools = [
184621
185225
  {
184622
185226
  name: "delete_test_case",
184623
185227
  description: "Permanently delete a test case. Accepts test case ID or name. This action cannot be undone.",
184624
- category: CATEGORY21,
185228
+ category: CATEGORY22,
184625
185229
  inputSchema: deleteTestCaseParamsJsonSchema,
184626
185230
  handler: createToolHandler(
184627
185231
  "delete_test_case",
@@ -184632,7 +185236,7 @@ var testManagementCoreTools = [
184632
185236
  ];
184633
185237
 
184634
185238
  // src/huly/operations/test-management-plans.ts
184635
- var import_core47 = __toESM(require_lib4(), 1);
185239
+ var import_core48 = __toESM(require_lib4(), 1);
184636
185240
  var toPlanSummary = (p) => ({
184637
185241
  id: TestPlanId.make(p._id),
184638
185242
  name: p.name
@@ -184650,7 +185254,7 @@ var listTestPlans = (params) => Effect_exports.gen(function* () {
184650
185254
  const plans = yield* client.findAll(
184651
185255
  testManagement.class.TestPlan,
184652
185256
  { space: project3._id },
184653
- { limit, sort: { modifiedOn: import_core47.SortingOrder.Descending } }
185257
+ { limit, sort: { modifiedOn: import_core48.SortingOrder.Descending } }
184654
185258
  );
184655
185259
  return { plans: plans.map(toPlanSummary), total: plans.total };
184656
185260
  });
@@ -184685,7 +185289,7 @@ var createTestPlan = (params) => Effect_exports.gen(function* () {
184685
185289
  if (existing !== void 0) {
184686
185290
  return { id: TestPlanId.make(existing._id), name: existing.name, created: false };
184687
185291
  }
184688
- const planId = (0, import_core47.generateId)();
185292
+ const planId = (0, import_core48.generateId)();
184689
185293
  const descRef = params.description !== void 0 && params.description.trim() !== "" ? yield* client.uploadMarkup(
184690
185294
  testManagement.class.TestPlan,
184691
185295
  planId,
@@ -184767,7 +185371,7 @@ var removeTestPlanItem = (params) => Effect_exports.gen(function* () {
184767
185371
  });
184768
185372
 
184769
185373
  // src/huly/operations/test-management-runs.ts
184770
- var import_core48 = __toESM(require_lib4(), 1);
185374
+ var import_core49 = __toESM(require_lib4(), 1);
184771
185375
  var BATCH_CONCURRENCY = 10;
184772
185376
  var toRunSummary = (r) => ({
184773
185377
  id: TestRunId.make(r._id),
@@ -184788,7 +185392,7 @@ var listTestRuns = (params) => Effect_exports.gen(function* () {
184788
185392
  const runs = yield* client.findAll(
184789
185393
  testManagement.class.TestRun,
184790
185394
  { space: project3._id },
184791
- { limit, sort: { modifiedOn: import_core48.SortingOrder.Descending } }
185395
+ { limit, sort: { modifiedOn: import_core49.SortingOrder.Descending } }
184792
185396
  );
184793
185397
  return { runs: runs.map(toRunSummary), total: runs.total };
184794
185398
  });
@@ -184817,7 +185421,7 @@ var getTestRun = (params) => Effect_exports.gen(function* () {
184817
185421
  var createTestRun = (params) => Effect_exports.gen(function* () {
184818
185422
  const client = yield* HulyClient;
184819
185423
  const project3 = yield* findTestProject(client, params.project);
184820
- const runId = (0, import_core48.generateId)();
185424
+ const runId = (0, import_core49.generateId)();
184821
185425
  const descRef = params.description !== void 0 && params.description.trim() !== "" ? yield* client.uploadMarkup(
184822
185426
  testManagement.class.TestRun,
184823
185427
  runId,
@@ -184874,7 +185478,7 @@ var listTestResults = (params) => Effect_exports.gen(function* () {
184874
185478
  const results = yield* client.findAll(
184875
185479
  testManagement.class.TestResult,
184876
185480
  { attachedTo: run3._id },
184877
- { limit, sort: { modifiedOn: import_core48.SortingOrder.Descending } }
185481
+ { limit, sort: { modifiedOn: import_core49.SortingOrder.Descending } }
184878
185482
  );
184879
185483
  return { results: results.map(toResultSummary), total: results.total };
184880
185484
  });
@@ -184975,7 +185579,7 @@ var runTestPlan = (params) => Effect_exports.gen(function* () {
184975
185579
  }
184976
185580
  return { item, tc };
184977
185581
  }), { concurrency: BATCH_CONCURRENCY });
184978
- const runId = (0, import_core48.generateId)();
185582
+ const runId = (0, import_core49.generateId)();
184979
185583
  const runName = params.runName ?? `${plan.name} - Run`;
184980
185584
  yield* client.createDoc(testManagement.class.TestRun, project3._id, {
184981
185585
  name: runName,
@@ -185005,41 +185609,41 @@ var runTestPlan = (params) => Effect_exports.gen(function* () {
185005
185609
  });
185006
185610
 
185007
185611
  // src/mcp/tools/test-management-plans.ts
185008
- var CATEGORY22 = "test-management";
185612
+ var CATEGORY23 = "test-management";
185009
185613
  var testManagementPlansTools = [
185010
185614
  // --- Test Plans ---
185011
185615
  {
185012
185616
  name: "list_test_plans",
185013
185617
  description: "List test plans in a test management project. Returns plan names and IDs. Requires project ID or name.",
185014
- category: CATEGORY22,
185618
+ category: CATEGORY23,
185015
185619
  inputSchema: listTestPlansParamsJsonSchema,
185016
185620
  handler: createToolHandler("list_test_plans", parseListTestPlansParams, listTestPlans)
185017
185621
  },
185018
185622
  {
185019
185623
  name: "get_test_plan",
185020
185624
  description: "Get test plan details including its items (test cases). Accepts plan ID or name within a project.",
185021
- category: CATEGORY22,
185625
+ category: CATEGORY23,
185022
185626
  inputSchema: getTestPlanParamsJsonSchema,
185023
185627
  handler: createToolHandler("get_test_plan", parseGetTestPlanParams, getTestPlan)
185024
185628
  },
185025
185629
  {
185026
185630
  name: "create_test_plan",
185027
185631
  description: "Create a test plan in a project. Idempotent: returns existing plan if one with the same name exists (created=false).",
185028
- category: CATEGORY22,
185632
+ category: CATEGORY23,
185029
185633
  inputSchema: createTestPlanParamsJsonSchema,
185030
185634
  handler: createToolHandler("create_test_plan", parseCreateTestPlanParams, createTestPlan)
185031
185635
  },
185032
185636
  {
185033
185637
  name: "update_test_plan",
185034
185638
  description: "Update a test plan's name or description. Only provided fields are modified. Pass description=null to clear.",
185035
- category: CATEGORY22,
185639
+ category: CATEGORY23,
185036
185640
  inputSchema: updateTestPlanParamsJsonSchema,
185037
185641
  handler: createToolHandler("update_test_plan", parseUpdateTestPlanParams, updateTestPlan)
185038
185642
  },
185039
185643
  {
185040
185644
  name: "delete_test_plan",
185041
185645
  description: "Permanently delete a test plan. This does not delete associated test runs. Cannot be undone.",
185042
- category: CATEGORY22,
185646
+ category: CATEGORY23,
185043
185647
  inputSchema: deleteTestPlanParamsJsonSchema,
185044
185648
  handler: createToolHandler("delete_test_plan", parseDeleteTestPlanParams, deleteTestPlan)
185045
185649
  },
@@ -185047,14 +185651,14 @@ var testManagementPlansTools = [
185047
185651
  {
185048
185652
  name: "add_test_plan_item",
185049
185653
  description: "Add a test case to a test plan. Resolves test case by ID or name. Optionally assign a person by email or name.",
185050
- category: CATEGORY22,
185654
+ category: CATEGORY23,
185051
185655
  inputSchema: addTestPlanItemParamsJsonSchema,
185052
185656
  handler: createToolHandler("add_test_plan_item", parseAddTestPlanItemParams, addTestPlanItem)
185053
185657
  },
185054
185658
  {
185055
185659
  name: "remove_test_plan_item",
185056
185660
  description: "Remove a test case from a test plan by item ID. Get item IDs from get_test_plan.",
185057
- category: CATEGORY22,
185661
+ category: CATEGORY23,
185058
185662
  inputSchema: removeTestPlanItemParamsJsonSchema,
185059
185663
  handler: createToolHandler("remove_test_plan_item", parseRemoveTestPlanItemParams, removeTestPlanItem)
185060
185664
  },
@@ -185062,35 +185666,35 @@ var testManagementPlansTools = [
185062
185666
  {
185063
185667
  name: "list_test_runs",
185064
185668
  description: "List test runs in a test management project. Returns run names, IDs, and due dates.",
185065
- category: CATEGORY22,
185669
+ category: CATEGORY23,
185066
185670
  inputSchema: listTestRunsParamsJsonSchema,
185067
185671
  handler: createToolHandler("list_test_runs", parseListTestRunsParams, listTestRuns)
185068
185672
  },
185069
185673
  {
185070
185674
  name: "get_test_run",
185071
185675
  description: "Get test run details including all results. Accepts run ID or name within a project.",
185072
- category: CATEGORY22,
185676
+ category: CATEGORY23,
185073
185677
  inputSchema: getTestRunParamsJsonSchema,
185074
185678
  handler: createToolHandler("get_test_run", parseGetTestRunParams, getTestRun)
185075
185679
  },
185076
185680
  {
185077
185681
  name: "create_test_run",
185078
185682
  description: "Create a test run in a project. For bulk creation from a plan, use run_test_plan instead.",
185079
- category: CATEGORY22,
185683
+ category: CATEGORY23,
185080
185684
  inputSchema: createTestRunParamsJsonSchema,
185081
185685
  handler: createToolHandler("create_test_run", parseCreateTestRunParams, createTestRun)
185082
185686
  },
185083
185687
  {
185084
185688
  name: "update_test_run",
185085
185689
  description: "Update a test run's name, description, or due date. Only provided fields are modified. Pass null to clear optional fields.",
185086
- category: CATEGORY22,
185690
+ category: CATEGORY23,
185087
185691
  inputSchema: updateTestRunParamsJsonSchema,
185088
185692
  handler: createToolHandler("update_test_run", parseUpdateTestRunParams, updateTestRun)
185089
185693
  },
185090
185694
  {
185091
185695
  name: "delete_test_run",
185092
185696
  description: "Permanently delete a test run. This does not delete associated test results. Cannot be undone.",
185093
- category: CATEGORY22,
185697
+ category: CATEGORY23,
185094
185698
  inputSchema: deleteTestRunParamsJsonSchema,
185095
185699
  handler: createToolHandler("delete_test_run", parseDeleteTestRunParams, deleteTestRun)
185096
185700
  },
@@ -185098,35 +185702,35 @@ var testManagementPlansTools = [
185098
185702
  {
185099
185703
  name: "list_test_results",
185100
185704
  description: "List test results in a test run. Returns result names, statuses, and assignees.",
185101
- category: CATEGORY22,
185705
+ category: CATEGORY23,
185102
185706
  inputSchema: listTestResultsParamsJsonSchema,
185103
185707
  handler: createToolHandler("list_test_results", parseListTestResultsParams, listTestResults)
185104
185708
  },
185105
185709
  {
185106
185710
  name: "get_test_result",
185107
185711
  description: "Get test result details. Accepts result ID or name.",
185108
- category: CATEGORY22,
185712
+ category: CATEGORY23,
185109
185713
  inputSchema: getTestResultParamsJsonSchema,
185110
185714
  handler: createToolHandler("get_test_result", parseGetTestResultParams, getTestResult)
185111
185715
  },
185112
185716
  {
185113
185717
  name: "create_test_result",
185114
185718
  description: "Create a test result in a run. Resolves test case by ID or name. Status defaults to 'untested'.",
185115
- category: CATEGORY22,
185719
+ category: CATEGORY23,
185116
185720
  inputSchema: createTestResultParamsJsonSchema,
185117
185721
  handler: createToolHandler("create_test_result", parseCreateTestResultParams, createTestResult)
185118
185722
  },
185119
185723
  {
185120
185724
  name: "update_test_result",
185121
185725
  description: "Update a test result's status, assignee, or description. Status values: untested, blocked, passed, failed.",
185122
- category: CATEGORY22,
185726
+ category: CATEGORY23,
185123
185727
  inputSchema: updateTestResultParamsJsonSchema,
185124
185728
  handler: createToolHandler("update_test_result", parseUpdateTestResultParams, updateTestResult)
185125
185729
  },
185126
185730
  {
185127
185731
  name: "delete_test_result",
185128
185732
  description: "Permanently delete a test result. Cannot be undone.",
185129
- category: CATEGORY22,
185733
+ category: CATEGORY23,
185130
185734
  inputSchema: deleteTestResultParamsJsonSchema,
185131
185735
  handler: createToolHandler("delete_test_result", parseDeleteTestResultParams, deleteTestResult)
185132
185736
  },
@@ -185134,7 +185738,7 @@ var testManagementPlansTools = [
185134
185738
  {
185135
185739
  name: "run_test_plan",
185136
185740
  description: "Execute a test plan: creates a test run and one test result per plan item. Returns the run ID and count of results created. Optionally name the run and set a due date.",
185137
- category: CATEGORY22,
185741
+ category: CATEGORY23,
185138
185742
  inputSchema: runTestPlanParamsJsonSchema,
185139
185743
  annotations: {
185140
185744
  title: "Run Test Plan",
@@ -185149,7 +185753,7 @@ var testManagementPlansTools = [
185149
185753
 
185150
185754
  // src/huly/operations/time.ts
185151
185755
  var import_calendar7 = __toESM(require_lib25(), 1);
185152
- var import_core49 = __toESM(require_lib4(), 1);
185756
+ var import_core50 = __toESM(require_lib4(), 1);
185153
185757
  var import_tracker7 = __toESM(require_lib36(), 1);
185154
185758
  var serverPopulatedCalendar = toRef("");
185155
185759
  var serverPopulatedPersonId = "";
@@ -185159,7 +185763,7 @@ var logTime = (params) => Effect_exports.gen(function* () {
185159
185763
  project: params.project,
185160
185764
  identifier: params.identifier
185161
185765
  });
185162
- const reportId = (0, import_core49.generateId)();
185766
+ const reportId = (0, import_core50.generateId)();
185163
185767
  const now2 = yield* Clock_exports.currentTimeMillis;
185164
185768
  const reportData = {
185165
185769
  employee: null,
@@ -185199,7 +185803,7 @@ var getTimeReport = (params) => Effect_exports.gen(function* () {
185199
185803
  const reports = yield* client.findAll(
185200
185804
  tracker.class.TimeSpendReport,
185201
185805
  { attachedTo: issue2._id },
185202
- { sort: { date: import_core49.SortingOrder.Descending } }
185806
+ { sort: { date: import_core50.SortingOrder.Descending } }
185203
185807
  );
185204
185808
  const employeeIds = [
185205
185809
  ...new Set(
@@ -185251,7 +185855,7 @@ var listTimeSpendReports = (params) => Effect_exports.gen(function* () {
185251
185855
  tracker.class.TimeSpendReport,
185252
185856
  query,
185253
185857
  withLookup(
185254
- { limit, sort: { date: import_core49.SortingOrder.Descending } },
185858
+ { limit, sort: { date: import_core50.SortingOrder.Descending } },
185255
185859
  {
185256
185860
  attachedTo: tracker.class.Issue,
185257
185861
  employee: contact.class.Person
@@ -185280,7 +185884,7 @@ var getDetailedTimeReport = (params) => Effect_exports.gen(function* () {
185280
185884
  tracker.class.TimeSpendReport,
185281
185885
  query,
185282
185886
  withLookup(
185283
- { sort: { date: import_core49.SortingOrder.Descending } },
185887
+ { sort: { date: import_core50.SortingOrder.Descending } },
185284
185888
  {
185285
185889
  attachedTo: tracker.class.Issue,
185286
185890
  employee: contact.class.Person
@@ -185358,7 +185962,7 @@ var listWorkSlots = (params) => Effect_exports.gen(function* () {
185358
185962
  const slots = yield* client.findAll(
185359
185963
  time3.class.WorkSlot,
185360
185964
  query,
185361
- { limit, sort: { date: import_core49.SortingOrder.Descending } }
185965
+ { limit, sort: { date: import_core50.SortingOrder.Descending } }
185362
185966
  );
185363
185967
  return slots.map((s) => ({
185364
185968
  id: WorkSlotId.make(s._id),
@@ -185370,7 +185974,7 @@ var listWorkSlots = (params) => Effect_exports.gen(function* () {
185370
185974
  });
185371
185975
  var createWorkSlot = (params) => Effect_exports.gen(function* () {
185372
185976
  const client = yield* HulyClient;
185373
- const slotId = (0, import_core49.generateId)();
185977
+ const slotId = (0, import_core50.generateId)();
185374
185978
  const slotData = {
185375
185979
  date: params.date,
185376
185980
  dueDate: params.dueDate,
@@ -185421,12 +186025,12 @@ var stopTimer = (params) => Effect_exports.gen(function* () {
185421
186025
  });
185422
186026
 
185423
186027
  // src/mcp/tools/time.ts
185424
- var CATEGORY23 = "time tracking";
186028
+ var CATEGORY24 = "time tracking";
185425
186029
  var timeTools = [
185426
186030
  {
185427
186031
  name: "log_time",
185428
186032
  description: "Log time spent on a Huly issue. Records a time entry with optional description. Time value is in minutes.",
185429
- category: CATEGORY23,
186033
+ category: CATEGORY24,
185430
186034
  inputSchema: logTimeParamsJsonSchema,
185431
186035
  handler: createEncodedToolHandler(
185432
186036
  "log_time",
@@ -185438,7 +186042,7 @@ var timeTools = [
185438
186042
  {
185439
186043
  name: "get_time_report",
185440
186044
  description: "Get time tracking report for a specific Huly issue. Shows total time, estimation, remaining time, and all time entries.",
185441
- category: CATEGORY23,
186045
+ category: CATEGORY24,
185442
186046
  inputSchema: getTimeReportParamsJsonSchema,
185443
186047
  handler: createEncodedToolHandler(
185444
186048
  "get_time_report",
@@ -185450,7 +186054,7 @@ var timeTools = [
185450
186054
  {
185451
186055
  name: "list_time_spend_reports",
185452
186056
  description: "List all time entries across issues. Supports filtering by project and date range. Returns entries sorted by date (newest first).",
185453
- category: CATEGORY23,
186057
+ category: CATEGORY24,
185454
186058
  inputSchema: listTimeSpendReportsParamsJsonSchema,
185455
186059
  handler: createEncodedToolHandler(
185456
186060
  "list_time_spend_reports",
@@ -185462,7 +186066,7 @@ var timeTools = [
185462
186066
  {
185463
186067
  name: "get_detailed_time_report",
185464
186068
  description: "Get detailed time breakdown for a project. Shows total time grouped by issue and by employee. Supports date range filtering.",
185465
- category: CATEGORY23,
186069
+ category: CATEGORY24,
185466
186070
  inputSchema: getDetailedTimeReportParamsJsonSchema,
185467
186071
  handler: createEncodedToolHandler(
185468
186072
  "get_detailed_time_report",
@@ -185474,7 +186078,7 @@ var timeTools = [
185474
186078
  {
185475
186079
  name: "list_work_slots",
185476
186080
  description: "List scheduled work slots. Shows planned time blocks attached to ToDos. Supports filtering by employee and date range.",
185477
- category: CATEGORY23,
186081
+ category: CATEGORY24,
185478
186082
  inputSchema: listWorkSlotsParamsJsonSchema,
185479
186083
  handler: createEncodedToolHandler(
185480
186084
  "list_work_slots",
@@ -185486,7 +186090,7 @@ var timeTools = [
185486
186090
  {
185487
186091
  name: "create_work_slot",
185488
186092
  description: "Create a scheduled work slot. Attaches a time block to a ToDo for planning purposes.",
185489
- category: CATEGORY23,
186093
+ category: CATEGORY24,
185490
186094
  inputSchema: createWorkSlotParamsJsonSchema,
185491
186095
  handler: createEncodedToolHandler(
185492
186096
  "create_work_slot",
@@ -185498,7 +186102,7 @@ var timeTools = [
185498
186102
  {
185499
186103
  name: "start_timer",
185500
186104
  description: "Start a client-side timer on a Huly issue. Validates the issue exists and returns a start timestamp. Use log_time to record the elapsed time when done.",
185501
- category: CATEGORY23,
186105
+ category: CATEGORY24,
185502
186106
  inputSchema: startTimerParamsJsonSchema,
185503
186107
  handler: createEncodedToolHandler(
185504
186108
  "start_timer",
@@ -185510,7 +186114,7 @@ var timeTools = [
185510
186114
  {
185511
186115
  name: "stop_timer",
185512
186116
  description: "Stop a client-side timer on a Huly issue. Returns the stop timestamp. Calculate elapsed time from start/stop timestamps and use log_time to record it.",
185513
- category: CATEGORY23,
186117
+ category: CATEGORY24,
185514
186118
  inputSchema: stopTimerParamsJsonSchema,
185515
186119
  handler: createEncodedToolHandler(
185516
186120
  "stop_timer",
@@ -185522,15 +186126,15 @@ var timeTools = [
185522
186126
  ];
185523
186127
 
185524
186128
  // src/huly/operations/workspace.ts
185525
- var import_core50 = __toESM(require_lib4(), 1);
186129
+ var import_core51 = __toESM(require_lib4(), 1);
185526
186130
  var accountRoleMap = {
185527
- READONLYGUEST: import_core50.AccountRole.ReadOnlyGuest,
185528
- DocGuest: import_core50.AccountRole.DocGuest,
185529
- GUEST: import_core50.AccountRole.Guest,
185530
- USER: import_core50.AccountRole.User,
185531
- MAINTAINER: import_core50.AccountRole.Maintainer,
185532
- OWNER: import_core50.AccountRole.Owner,
185533
- ADMIN: import_core50.AccountRole.Admin
186131
+ READONLYGUEST: import_core51.AccountRole.ReadOnlyGuest,
186132
+ DocGuest: import_core51.AccountRole.DocGuest,
186133
+ GUEST: import_core51.AccountRole.Guest,
186134
+ USER: import_core51.AccountRole.User,
186135
+ MAINTAINER: import_core51.AccountRole.Maintainer,
186136
+ OWNER: import_core51.AccountRole.Owner,
186137
+ ADMIN: import_core51.AccountRole.Admin
185534
186138
  };
185535
186139
  var toHulyAccountRole = (role) => accountRoleMap[role];
185536
186140
  var formatVersion = (info) => `${info.versionMajor}.${info.versionMinor}.${info.versionPatch}`;
@@ -185705,12 +186309,12 @@ var getRegions = () => Effect_exports.gen(function* () {
185705
186309
  });
185706
186310
 
185707
186311
  // src/mcp/tools/workspace.ts
185708
- var CATEGORY24 = "workspace";
186312
+ var CATEGORY25 = "workspace";
185709
186313
  var workspaceTools = [
185710
186314
  {
185711
186315
  name: "list_workspace_members",
185712
186316
  description: "List members in the current Huly workspace with their roles. Returns members with account IDs and roles.",
185713
- category: CATEGORY24,
186317
+ category: CATEGORY25,
185714
186318
  inputSchema: listWorkspaceMembersParamsJsonSchema,
185715
186319
  handler: createEncodedWorkspaceToolHandler(
185716
186320
  "list_workspace_members",
@@ -185722,7 +186326,7 @@ var workspaceTools = [
185722
186326
  {
185723
186327
  name: "update_member_role",
185724
186328
  description: "Update a workspace member's role. Requires appropriate permissions. Valid roles: READONLYGUEST, DocGuest, GUEST, USER, MAINTAINER, OWNER, ADMIN.",
185725
- category: CATEGORY24,
186329
+ category: CATEGORY25,
185726
186330
  inputSchema: updateMemberRoleParamsJsonSchema,
185727
186331
  handler: createEncodedWorkspaceToolHandler(
185728
186332
  "update_member_role",
@@ -185734,7 +186338,7 @@ var workspaceTools = [
185734
186338
  {
185735
186339
  name: "get_workspace_info",
185736
186340
  description: "Get information about the current workspace including name, URL, region, and settings.",
185737
- category: CATEGORY24,
186341
+ category: CATEGORY25,
185738
186342
  inputSchema: emptyParamsJsonSchema,
185739
186343
  handler: createEncodedNoParamsWorkspaceToolHandler(
185740
186344
  "get_workspace_info",
@@ -185745,7 +186349,7 @@ var workspaceTools = [
185745
186349
  {
185746
186350
  name: "list_workspaces",
185747
186351
  description: "List all workspaces accessible to the current user. Returns workspace summaries sorted by last visit.",
185748
- category: CATEGORY24,
186352
+ category: CATEGORY25,
185749
186353
  inputSchema: listWorkspacesParamsJsonSchema,
185750
186354
  handler: createEncodedWorkspaceToolHandler(
185751
186355
  "list_workspaces",
@@ -185757,7 +186361,7 @@ var workspaceTools = [
185757
186361
  {
185758
186362
  name: "create_workspace",
185759
186363
  description: "Create a new Huly workspace. Returns the workspace UUID and URL. Optionally specify a region.",
185760
- category: CATEGORY24,
186364
+ category: CATEGORY25,
185761
186365
  inputSchema: createWorkspaceParamsJsonSchema,
185762
186366
  handler: createEncodedWorkspaceToolHandler(
185763
186367
  "create_workspace",
@@ -185769,7 +186373,7 @@ var workspaceTools = [
185769
186373
  {
185770
186374
  name: "delete_workspace",
185771
186375
  description: "Permanently delete the current workspace. This action cannot be undone. Use with extreme caution.",
185772
- category: CATEGORY24,
186376
+ category: CATEGORY25,
185773
186377
  inputSchema: emptyParamsJsonSchema,
185774
186378
  handler: createEncodedNoParamsWorkspaceToolHandler(
185775
186379
  "delete_workspace",
@@ -185780,7 +186384,7 @@ var workspaceTools = [
185780
186384
  {
185781
186385
  name: "get_user_profile",
185782
186386
  description: "Get the current user's profile information including bio, location, and social links.",
185783
- category: CATEGORY24,
186387
+ category: CATEGORY25,
185784
186388
  inputSchema: emptyParamsJsonSchema,
185785
186389
  handler: createEncodedNoParamsWorkspaceToolHandler(
185786
186390
  "get_user_profile",
@@ -185791,7 +186395,7 @@ var workspaceTools = [
185791
186395
  {
185792
186396
  name: "update_user_profile",
185793
186397
  description: "Update the current user's profile. Supports bio, city, country, website, social links, and public visibility.",
185794
- category: CATEGORY24,
186398
+ category: CATEGORY25,
185795
186399
  inputSchema: updateUserProfileParamsJsonSchema,
185796
186400
  handler: createEncodedWorkspaceToolHandler(
185797
186401
  "update_user_profile",
@@ -185803,7 +186407,7 @@ var workspaceTools = [
185803
186407
  {
185804
186408
  name: "update_guest_settings",
185805
186409
  description: "Update workspace guest settings. Control read-only guest access and guest sign-up permissions.",
185806
- category: CATEGORY24,
186410
+ category: CATEGORY25,
185807
186411
  inputSchema: updateGuestSettingsParamsJsonSchema,
185808
186412
  handler: createEncodedWorkspaceToolHandler(
185809
186413
  "update_guest_settings",
@@ -185815,7 +186419,7 @@ var workspaceTools = [
185815
186419
  {
185816
186420
  name: "create_access_link",
185817
186421
  description: "Create a Huly workspace access link. Defaults to role GUEST. Supports anonymous reusable guest links by setting personalized=false with notBefore and expiration, and can restrict access to specific Huly space IDs via spaces.",
185818
- category: CATEGORY24,
186422
+ category: CATEGORY25,
185819
186423
  inputSchema: createAccessLinkParamsJsonSchema,
185820
186424
  handler: createEncodedWorkspaceToolHandler(
185821
186425
  "create_access_link",
@@ -185827,7 +186431,7 @@ var workspaceTools = [
185827
186431
  {
185828
186432
  name: "get_regions",
185829
186433
  description: "Get available regions for workspace creation. Returns region codes and display names.",
185830
- category: CATEGORY24,
186434
+ category: CATEGORY25,
185831
186435
  inputSchema: getRegionsParamsJsonSchema,
185832
186436
  handler: createEncodedWorkspaceToolHandler(
185833
186437
  "get_regions",
@@ -185860,6 +186464,7 @@ var allTools = [
185860
186464
  ...searchTools,
185861
186465
  ...activityTools,
185862
186466
  ...notificationTools,
186467
+ ...processTools,
185863
186468
  ...workspaceTools,
185864
186469
  ...taskManagementTools,
185865
186470
  ...testManagementCoreTools,