@firfi/huly-mcp 0.1.40 → 0.1.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -31019,7 +31019,7 @@ var require_utils2 = __commonJS({
31019
31019
  escapeLikeForRegexp: () => escapeLikeForRegexp,
31020
31020
  fillConfiguration: () => fillConfiguration,
31021
31021
  fillDefaults: () => fillDefaults,
31022
- generateId: () => generateId14,
31022
+ generateId: () => generateId15,
31023
31023
  generateUuid: () => generateUuid,
31024
31024
  getBranding: () => getBranding,
31025
31025
  getCurrentAccount: () => getCurrentAccount,
@@ -31080,10 +31080,10 @@ var require_utils2 = __commonJS({
31080
31080
  return toHex(val, 6);
31081
31081
  }
31082
31082
  __name(count3, "count");
31083
- function generateId14(join4 = "") {
31083
+ function generateId15(join4 = "") {
31084
31084
  return timestamp() + join4 + random4 + join4 + count3();
31085
31085
  }
31086
- __name(generateId14, "generateId");
31086
+ __name(generateId15, "generateId");
31087
31087
  function generateUuid() {
31088
31088
  return crypto.randomUUID();
31089
31089
  }
@@ -34037,15 +34037,15 @@ var require_storage = __commonJS({
34037
34037
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
34038
34038
  var storage_exports = {};
34039
34039
  __export2(storage_exports, {
34040
- SortingOrder: () => SortingOrder18,
34040
+ SortingOrder: () => SortingOrder19,
34041
34041
  shouldShowArchived: () => shouldShowArchived
34042
34042
  });
34043
34043
  module2.exports = __toCommonJS2(storage_exports);
34044
- var SortingOrder18 = /* @__PURE__ */ ((SortingOrder22) => {
34044
+ var SortingOrder19 = /* @__PURE__ */ ((SortingOrder22) => {
34045
34045
  SortingOrder22[SortingOrder22["Ascending"] = 1] = "Ascending";
34046
34046
  SortingOrder22[SortingOrder22["Descending"] = -1] = "Descending";
34047
34047
  return SortingOrder22;
34048
- })(SortingOrder18 || {});
34048
+ })(SortingOrder19 || {});
34049
34049
  function shouldShowArchived(query, options) {
34050
34050
  if (options?.showArchived !== void 0) {
34051
34051
  return options.showArchived;
@@ -34475,7 +34475,7 @@ var require_client3 = __commonJS({
34475
34475
  getClient: () => getClient
34476
34476
  });
34477
34477
  module2.exports = __toCommonJS2(client_exports);
34478
- var import_core37 = require_lib4();
34478
+ var import_core38 = require_lib4();
34479
34479
  var import_platform2 = __toESM2(require_lib());
34480
34480
  var import_utils14 = require_utils3();
34481
34481
  function getClient(accountsUrl, token, retryTimeoutMs) {
@@ -34511,7 +34511,7 @@ var require_client3 = __commonJS({
34511
34511
  rpc;
34512
34512
  async getProviders() {
34513
34513
  return await withRetryUntilMaxAttempts(async () => {
34514
- const response = await fetch((0, import_core37.concatLink)(this.url, "/providers"));
34514
+ const response = await fetch((0, import_core38.concatLink)(this.url, "/providers"));
34515
34515
  return await response.json();
34516
34516
  })();
34517
34517
  }
@@ -35152,7 +35152,7 @@ var require_client3 = __commonJS({
35152
35152
  await this.rpc(request2);
35153
35153
  }
35154
35154
  async setCookie() {
35155
- const url4 = (0, import_core37.concatLink)(this.url, "/cookie");
35155
+ const url4 = (0, import_core38.concatLink)(this.url, "/cookie");
35156
35156
  const response = await fetch(url4, { ...this.request, method: "PUT" });
35157
35157
  if (!response.ok) {
35158
35158
  const result = await response.json();
@@ -35162,7 +35162,7 @@ var require_client3 = __commonJS({
35162
35162
  }
35163
35163
  }
35164
35164
  async deleteCookie() {
35165
- const url4 = (0, import_core37.concatLink)(this.url, "/cookie");
35165
+ const url4 = (0, import_core38.concatLink)(this.url, "/cookie");
35166
35166
  const response = await fetch(url4, { ...this.request, method: "DELETE" });
35167
35167
  if (!response.ok) {
35168
35168
  const result = await response.json();
@@ -35412,9 +35412,9 @@ var require_config = __commonJS({
35412
35412
  loadServerConfig: () => loadServerConfig4
35413
35413
  });
35414
35414
  module2.exports = __toCommonJS2(config_exports3);
35415
- var import_core37 = require_lib4();
35415
+ var import_core38 = require_lib4();
35416
35416
  async function loadServerConfig4(url4) {
35417
- const configUrl = (0, import_core37.concatLink)(url4, "/config.json");
35417
+ const configUrl = (0, import_core38.concatLink)(url4, "/config.json");
35418
35418
  const res = await fetch(configUrl, { keepalive: true });
35419
35419
  if (res.ok) {
35420
35420
  return await res.json();
@@ -35500,7 +35500,7 @@ var require_client4 = __commonJS({
35500
35500
  getClient: () => getClient
35501
35501
  });
35502
35502
  module2.exports = __toCommonJS2(client_exports);
35503
- var import_core37 = require_lib4();
35503
+ var import_core38 = require_lib4();
35504
35504
  var import_utils14 = require_utils4();
35505
35505
  function getClient(workspaceId, token, collaboratorUrl) {
35506
35506
  const url4 = collaboratorUrl.replaceAll("wss://", "https://").replace("ws://", "http://");
@@ -35519,7 +35519,7 @@ var require_client4 = __commonJS({
35519
35519
  async rpc(document2, method, payload) {
35520
35520
  const workspace = this.workspace;
35521
35521
  const documentId = (0, import_utils14.encodeDocumentId)(workspace, document2);
35522
- const url4 = (0, import_core37.concatLink)(this.collaboratorUrl, `/rpc/${encodeURIComponent(documentId)}`);
35522
+ const url4 = (0, import_core38.concatLink)(this.collaboratorUrl, `/rpc/${encodeURIComponent(documentId)}`);
35523
35523
  const res = await fetch(url4, {
35524
35524
  method: "POST",
35525
35525
  headers: {
@@ -53086,9 +53086,9 @@ var require_image = __commonJS({
53086
53086
  ImageNode: () => ImageNode
53087
53087
  });
53088
53088
  module2.exports = __toCommonJS2(image_exports);
53089
- var import_core37 = require_dist16();
53089
+ var import_core38 = require_dist16();
53090
53090
  var import_utils14 = require_utils5();
53091
- var ImageNode = import_core37.Node.create({
53091
+ var ImageNode = import_core38.Node.create({
53092
53092
  name: "image",
53093
53093
  addOptions() {
53094
53094
  return {
@@ -53147,7 +53147,7 @@ var require_image = __commonJS({
53147
53147
  "data-type": this.name,
53148
53148
  "data-align": node.attrs.align
53149
53149
  };
53150
- const imgAttributes = (0, import_core37.mergeAttributes)(
53150
+ const imgAttributes = (0, import_core38.mergeAttributes)(
53151
53151
  {
53152
53152
  "data-type": this.name
53153
53153
  },
@@ -53191,9 +53191,9 @@ var require_reference = __commonJS({
53191
53191
  ReferenceNode: () => ReferenceNode
53192
53192
  });
53193
53193
  module2.exports = __toCommonJS2(reference_exports);
53194
- var import_core37 = require_dist16();
53194
+ var import_core38 = require_dist16();
53195
53195
  var import_utils14 = require_utils5();
53196
- var ReferenceNode = import_core37.Node.create({
53196
+ var ReferenceNode = import_core38.Node.create({
53197
53197
  name: "reference",
53198
53198
  group: "inline",
53199
53199
  inline: true,
@@ -53228,7 +53228,7 @@ var require_reference = __commonJS({
53228
53228
  renderHTML({ node, HTMLAttributes }) {
53229
53229
  return [
53230
53230
  "span",
53231
- (0, import_core37.mergeAttributes)(
53231
+ (0, import_core38.mergeAttributes)(
53232
53232
  {
53233
53233
  "data-type": this.name,
53234
53234
  "data-id": node.attrs.id,
@@ -53287,8 +53287,8 @@ var require_emoji = __commonJS({
53287
53287
  EmojiNode: () => EmojiNode
53288
53288
  });
53289
53289
  module2.exports = __toCommonJS2(emoji_exports);
53290
- var import_core37 = require_dist16();
53291
- var EmojiNode = import_core37.Node.create({
53290
+ var import_core38 = require_dist16();
53291
+ var EmojiNode = import_core38.Node.create({
53292
53292
  name: "emoji",
53293
53293
  group: "inline",
53294
53294
  inline: true,
@@ -53328,7 +53328,7 @@ var require_emoji = __commonJS({
53328
53328
  addNodeView() {
53329
53329
  return ({ node, HTMLAttributes }) => {
53330
53330
  const container = document.createElement("span");
53331
- const containerAttributes = (0, import_core37.mergeAttributes)(
53331
+ const containerAttributes = (0, import_core38.mergeAttributes)(
53332
53332
  {
53333
53333
  "data-type": this.name,
53334
53334
  class: "emoji"
@@ -53361,7 +53361,7 @@ var require_emoji = __commonJS({
53361
53361
  if (node.attrs.kind === "image") {
53362
53362
  return [
53363
53363
  "span",
53364
- (0, import_core37.mergeAttributes)(
53364
+ (0, import_core38.mergeAttributes)(
53365
53365
  {
53366
53366
  "data-type": this.name,
53367
53367
  class: "emoji"
@@ -53370,7 +53370,7 @@ var require_emoji = __commonJS({
53370
53370
  ),
53371
53371
  [
53372
53372
  "img",
53373
- (0, import_core37.mergeAttributes)({
53373
+ (0, import_core38.mergeAttributes)({
53374
53374
  "data-type": this.name,
53375
53375
  src: node.attrs.image,
53376
53376
  alt: node.attrs.emoji
@@ -53380,7 +53380,7 @@ var require_emoji = __commonJS({
53380
53380
  }
53381
53381
  return [
53382
53382
  "span",
53383
- (0, import_core37.mergeAttributes)(
53383
+ (0, import_core38.mergeAttributes)(
53384
53384
  {
53385
53385
  "data-type": this.name,
53386
53386
  class: "emoji"
@@ -53688,8 +53688,8 @@ var require_file = __commonJS({
53688
53688
  FileNode: () => FileNode
53689
53689
  });
53690
53690
  module2.exports = __toCommonJS2(file_exports);
53691
- var import_core37 = require_dist16();
53692
- var FileNode = import_core37.Node.create({
53691
+ var import_core38 = require_dist16();
53692
+ var FileNode = import_core38.Node.create({
53693
53693
  name: "file",
53694
53694
  addOptions() {
53695
53695
  return {
@@ -53999,7 +53999,7 @@ var require_codeblock = __commonJS({
53999
53999
  tildeInputRegex: () => tildeInputRegex
54000
54000
  });
54001
54001
  module2.exports = __toCommonJS2(codeblock_exports);
54002
- var import_core37 = require_dist16();
54002
+ var import_core38 = require_dist16();
54003
54003
  var import_extension_code_block = __toESM2(require_dist19());
54004
54004
  var codeBlockOptions = {
54005
54005
  defaultLanguage: "plaintext",
@@ -54045,11 +54045,11 @@ var require_codeblock = __commonJS({
54045
54045
  },
54046
54046
  addInputRules() {
54047
54047
  return [
54048
- (0, import_core37.textblockTypeInputRule)({
54048
+ (0, import_core38.textblockTypeInputRule)({
54049
54049
  find: backtickInputRegex,
54050
54050
  type: this.type
54051
54051
  }),
54052
- (0, import_core37.textblockTypeInputRule)({
54052
+ (0, import_core38.textblockTypeInputRule)({
54053
54053
  find: tildeInputRegex,
54054
54054
  type: this.type
54055
54055
  })
@@ -54085,8 +54085,8 @@ var require_comment = __commonJS({
54085
54085
  CommentNode: () => CommentNode
54086
54086
  });
54087
54087
  module2.exports = __toCommonJS2(comment_exports);
54088
- var import_core37 = require_dist16();
54089
- var CommentNode = import_core37.Node.create({
54088
+ var import_core38 = require_dist16();
54089
+ var CommentNode = import_core38.Node.create({
54090
54090
  name: "comment",
54091
54091
  group: "inline",
54092
54092
  inline: true,
@@ -54132,8 +54132,8 @@ var require_markdown = __commonJS({
54132
54132
  MarkdownNode: () => MarkdownNode
54133
54133
  });
54134
54134
  module2.exports = __toCommonJS2(markdown_exports);
54135
- var import_core37 = require_dist16();
54136
- var MarkdownNode = import_core37.Node.create({
54135
+ var import_core38 = require_dist16();
54136
+ var MarkdownNode = import_core38.Node.create({
54137
54137
  name: "markdown",
54138
54138
  group: "block",
54139
54139
  content: "text*",
@@ -54151,7 +54151,7 @@ var require_markdown = __commonJS({
54151
54151
  renderHTML({ node, HTMLAttributes }) {
54152
54152
  return [
54153
54153
  "pre",
54154
- (0, import_core37.mergeAttributes)({ "data-type": this.name }, this.options.HTMLAttributes, HTMLAttributes),
54154
+ (0, import_core38.mergeAttributes)({ "data-type": this.name }, this.options.HTMLAttributes, HTMLAttributes),
54155
54155
  ["code", {}, 0]
54156
54156
  ];
54157
54157
  }
@@ -54185,8 +54185,8 @@ var require_embed = __commonJS({
54185
54185
  EmbedNode: () => EmbedNode
54186
54186
  });
54187
54187
  module2.exports = __toCommonJS2(embed_exports);
54188
- var import_core37 = require_dist16();
54189
- var EmbedNode = import_core37.Node.create({
54188
+ var import_core38 = require_dist16();
54189
+ var EmbedNode = import_core38.Node.create({
54190
54190
  name: "embed",
54191
54191
  addOptions() {
54192
54192
  return {};
@@ -54211,7 +54211,7 @@ var require_embed = __commonJS({
54211
54211
  ];
54212
54212
  },
54213
54213
  renderHTML({ HTMLAttributes }) {
54214
- return ["figure", { "data-type": this.name }, ["iframe", (0, import_core37.mergeAttributes)(HTMLAttributes)]];
54214
+ return ["figure", { "data-type": this.name }, ["iframe", (0, import_core38.mergeAttributes)(HTMLAttributes)]];
54215
54215
  }
54216
54216
  });
54217
54217
  }
@@ -54285,7 +54285,7 @@ var require_noteBase = __commonJS({
54285
54285
  name: () => name
54286
54286
  });
54287
54287
  module2.exports = __toCommonJS2(noteBase_exports);
54288
- var import_core37 = require_dist16();
54288
+ var import_core38 = require_dist16();
54289
54289
  var import_nodes = require_nodes();
54290
54290
  var name = "note";
54291
54291
  var NoteKind = /* @__PURE__ */ ((NoteKind2) => {
@@ -54300,7 +54300,7 @@ var require_noteBase = __commonJS({
54300
54300
  NoteKind2["PrimaryLight"] = "primary-light";
54301
54301
  return NoteKind2;
54302
54302
  })(NoteKind || {});
54303
- var NoteBaseExtension = import_core37.Mark.create({
54303
+ var NoteBaseExtension = import_core38.Mark.create({
54304
54304
  name,
54305
54305
  parseHTML() {
54306
54306
  return [
@@ -54357,9 +54357,9 @@ var require_qmsInlineCommentMark = __commonJS({
54357
54357
  QMSInlineCommentMark: () => QMSInlineCommentMark
54358
54358
  });
54359
54359
  module2.exports = __toCommonJS2(qmsInlineCommentMark_exports);
54360
- var import_core37 = require_dist16();
54360
+ var import_core38 = require_dist16();
54361
54361
  var NAME2 = "node-uuid";
54362
- var QMSInlineCommentMark = import_core37.Mark.create({
54362
+ var QMSInlineCommentMark = import_core38.Mark.create({
54363
54363
  name: NAME2,
54364
54364
  inline: true,
54365
54365
  parseHTML() {
@@ -54404,9 +54404,9 @@ var require_kit = __commonJS({
54404
54404
  mergeKitOptions: () => mergeKitOptions
54405
54405
  });
54406
54406
  module2.exports = __toCommonJS2(kit_exports);
54407
- var import_core37 = require_dist16();
54407
+ var import_core38 = require_dist16();
54408
54408
  function extensionKit(name, fn2) {
54409
- return import_core37.Extension.create({
54409
+ return import_core38.Extension.create({
54410
54410
  name,
54411
54411
  addExtensions() {
54412
54412
  const e = /* @__PURE__ */ __name((extension, options) => {
@@ -61435,9 +61435,9 @@ var require_colors = __commonJS({
61435
61435
  TextColor: () => TextColor
61436
61436
  });
61437
61437
  module2.exports = __toCommonJS2(colors_exports);
61438
- var import_core37 = require_dist16();
61438
+ var import_core38 = require_dist16();
61439
61439
  var import_extension_text_style = require_dist20();
61440
- var BackgroundColor = import_core37.Extension.create({
61440
+ var BackgroundColor = import_core38.Extension.create({
61441
61441
  name: "backgroundColor",
61442
61442
  addOptions() {
61443
61443
  return {
@@ -61478,7 +61478,7 @@ var require_colors = __commonJS({
61478
61478
  };
61479
61479
  }
61480
61480
  });
61481
- var TextColor = import_core37.Extension.create({
61481
+ var TextColor = import_core38.Extension.create({
61482
61482
  name: "textColor",
61483
61483
  addOptions() {
61484
61484
  return {
@@ -61550,10 +61550,10 @@ var require_inlineComment = __commonJS({
61550
61550
  InlineCommentPasteFixPlugin: () => InlineCommentPasteFixPlugin
61551
61551
  });
61552
61552
  module2.exports = __toCommonJS2(inlineComment_exports);
61553
- var import_core37 = require_dist16();
61553
+ var import_core38 = require_dist16();
61554
61554
  var import_model = require_dist10();
61555
61555
  var import_state = require_dist5();
61556
- var InlineCommentMark = import_core37.Mark.create({
61556
+ var InlineCommentMark = import_core38.Mark.create({
61557
61557
  name: "inline-comment",
61558
61558
  excludes: "",
61559
61559
  inclusive: false,
@@ -77071,7 +77071,7 @@ var require_client5 = __commonJS({
77071
77071
  createMarkupOperations: () => createMarkupOperations
77072
77072
  });
77073
77073
  module2.exports = __toCommonJS2(client_exports);
77074
- var import_core37 = require_lib4();
77074
+ var import_core38 = require_lib4();
77075
77075
  var import_collaborator_client2 = require_lib7();
77076
77076
  var import_text3 = require_lib9();
77077
77077
  var import_text_markdown3 = require_lib17();
@@ -77085,8 +77085,8 @@ var require_client5 = __commonJS({
77085
77085
  this.workspace = workspace;
77086
77086
  this.token = token;
77087
77087
  this.config = config3;
77088
- this.refUrl = (0, import_core37.concatLink)(this.url, `/browse?workspace=${workspace}`);
77089
- this.imageUrl = (0, import_core37.concatLink)(this.url, `/files?workspace=${workspace}&file=`);
77088
+ this.refUrl = (0, import_core38.concatLink)(this.url, `/browse?workspace=${workspace}`);
77089
+ this.imageUrl = (0, import_core38.concatLink)(this.url, `/files?workspace=${workspace}&file=`);
77090
77090
  this.collaborator = (0, import_collaborator_client2.getClient)(workspace, token, config3.COLLABORATOR_URL);
77091
77091
  }
77092
77092
  static {
@@ -77096,7 +77096,7 @@ var require_client5 = __commonJS({
77096
77096
  imageUrl;
77097
77097
  refUrl;
77098
77098
  async fetchMarkup(objectClass, objectId, objectAttr, doc, format7) {
77099
- const collabId = (0, import_core37.makeCollabId)(objectClass, objectId, objectAttr);
77099
+ const collabId = (0, import_core38.makeCollabId)(objectClass, objectId, objectAttr);
77100
77100
  const markup = await this.collaborator.getMarkup(collabId, doc);
77101
77101
  const json3 = (0, import_text3.markupToJSON)(markup);
77102
77102
  switch (format7) {
@@ -77125,7 +77125,7 @@ var require_client5 = __commonJS({
77125
77125
  default:
77126
77126
  throw new Error("Unknown content format");
77127
77127
  }
77128
- const collabId = (0, import_core37.makeCollabId)(objectClass, objectId, objectAttr);
77128
+ const collabId = (0, import_core38.makeCollabId)(objectClass, objectId, objectAttr);
77129
77129
  return await this.collaborator.createMarkup(collabId, markup);
77130
77130
  }
77131
77131
  };
@@ -81609,8 +81609,8 @@ var require_connection2 = __commonJS({
81609
81609
  });
81610
81610
  module2.exports = __toCommonJS2(connection_exports);
81611
81611
  var import_analytics = require_lib2();
81612
- var import_client17 = __toESM2(require_lib6());
81613
- var import_core37 = __toESM2(require_lib4());
81612
+ var import_client18 = __toESM2(require_lib6());
81613
+ var import_core38 = __toESM2(require_lib4());
81614
81614
  var import_platform2 = __toESM2(require_lib());
81615
81615
  var import_rpc = require_lib18();
81616
81616
  var import_snappyjs = require_snappyjs();
@@ -81654,7 +81654,7 @@ var require_connection2 = __commonJS({
81654
81654
  const sKey = "session.id." + this.url;
81655
81655
  let sessionId = sessionStorage.getItem(sKey) ?? void 0;
81656
81656
  if (sessionId === void 0) {
81657
- sessionId = (0, import_core37.generateId)();
81657
+ sessionId = (0, import_core38.generateId)();
81658
81658
  console.log("Generate new SessionId", sessionId);
81659
81659
  this.sessionId = sessionId;
81660
81660
  } else {
@@ -81665,7 +81665,7 @@ var require_connection2 = __commonJS({
81665
81665
  sessionStorage.setItem(sKey, sessionId);
81666
81666
  });
81667
81667
  } else {
81668
- this.sessionId = (0, import_core37.generateId)();
81668
+ this.sessionId = (0, import_core38.generateId)();
81669
81669
  }
81670
81670
  this.rpcHandler = opt?.useGlobalRPCHandler === true ? globalRPCHandler : new import_rpc.RPCHandler();
81671
81671
  this.pushHandler(handler);
@@ -81720,7 +81720,7 @@ var require_connection2 = __commonJS({
81720
81720
  }
81721
81721
  if (!this.closed) {
81722
81722
  void this.sendRequest({
81723
- method: import_client17.pingConst,
81723
+ method: import_client18.pingConst,
81724
81724
  params: [],
81725
81725
  once: true,
81726
81726
  handleResult: /* @__PURE__ */ __name(async (result) => {
@@ -81753,7 +81753,7 @@ var require_connection2 = __commonJS({
81753
81753
  }
81754
81754
  }
81755
81755
  isConnected() {
81756
- return this.websocket != null && this.websocket.readyState === import_client17.ClientSocketReadyState.OPEN && this.helloReceived;
81756
+ return this.websocket != null && this.websocket.readyState === import_client18.ClientSocketReadyState.OPEN && this.helloReceived;
81757
81757
  }
81758
81758
  delay = 0;
81759
81759
  onConnectHandlers = [];
@@ -81845,7 +81845,7 @@ var require_connection2 = __commonJS({
81845
81845
  if (resp.id === -1) {
81846
81846
  this.delay = 0;
81847
81847
  if (resp.result?.state === "upgrading") {
81848
- void this.onConnect?.(import_core37.ClientConnectEvent.Maintenance, void 0, resp.result.stats);
81848
+ void this.onConnect?.(import_core38.ClientConnectEvent.Maintenance, void 0, resp.result.stats);
81849
81849
  this.upgrading = true;
81850
81850
  this.delay = 3;
81851
81851
  return;
@@ -81880,7 +81880,7 @@ var require_connection2 = __commonJS({
81880
81880
  v.reconnect?.();
81881
81881
  }
81882
81882
  void this.onConnect?.(
81883
- helloResp.reconnect === true ? import_core37.ClientConnectEvent.Reconnected : import_core37.ClientConnectEvent.Connected,
81883
+ helloResp.reconnect === true ? import_core38.ClientConnectEvent.Reconnected : import_core38.ClientConnectEvent.Connected,
81884
81884
  helloResp.lastTx,
81885
81885
  this.sessionId
81886
81886
  )?.catch((err) => {
@@ -81893,8 +81893,8 @@ var require_connection2 = __commonJS({
81893
81893
  }
81894
81894
  return;
81895
81895
  }
81896
- if (resp.result === import_client17.pingConst) {
81897
- void this.sendRequest({ method: import_client17.pingConst, params: [] }).catch((err) => {
81896
+ if (resp.result === import_client18.pingConst) {
81897
+ void this.sendRequest({ method: import_client18.pingConst, params: [] }).catch((err) => {
81898
81898
  this.ctx.error("failed to send ping", { err });
81899
81899
  });
81900
81900
  return;
@@ -81930,7 +81930,7 @@ var require_connection2 = __commonJS({
81930
81930
  }
81931
81931
  result = result.concat(c.data);
81932
81932
  }
81933
- resp.result = (0, import_core37.toFindResult)(result, total, lookupMap);
81933
+ resp.result = (0, import_core38.toFindResult)(result, total, lookupMap);
81934
81934
  resp.chunk = void 0;
81935
81935
  } else {
81936
81936
  return;
@@ -81974,7 +81974,7 @@ var require_connection2 = __commonJS({
81974
81974
  } else {
81975
81975
  const txArr = Array.isArray(resp.result) ? resp.result : [resp.result];
81976
81976
  for (const tx of txArr) {
81977
- if (tx?._class === import_core37.default.class.TxModelUpgrade) {
81977
+ if (tx?._class === import_core38.default.class.TxModelUpgrade) {
81978
81978
  console.log("Processing upgrade", this.workspace, this.user);
81979
81979
  this.opt?.onUpgrade?.();
81980
81980
  return;
@@ -81986,15 +81986,15 @@ var require_connection2 = __commonJS({
81986
81986
  }
81987
81987
  }
81988
81988
  checkArrayBufferPing(data) {
81989
- if (data.byteLength === import_client17.pingConst.length || data.byteLength === import_client17.pongConst.length) {
81989
+ if (data.byteLength === import_client18.pingConst.length || data.byteLength === import_client18.pongConst.length) {
81990
81990
  const text = new TextDecoder().decode(data);
81991
- if (text === import_client17.pingConst) {
81992
- void this.sendRequest({ method: import_client17.pingConst, params: [] }).catch((err) => {
81991
+ if (text === import_client18.pingConst) {
81992
+ void this.sendRequest({ method: import_client18.pingConst, params: [] }).catch((err) => {
81993
81993
  this.ctx.error("failed to send ping", { err });
81994
81994
  });
81995
81995
  return true;
81996
81996
  }
81997
- if (text === import_client17.pongConst) {
81997
+ if (text === import_client18.pongConst) {
81998
81998
  this.pingResponse = Date.now();
81999
81999
  return true;
82000
82000
  }
@@ -82004,7 +82004,7 @@ var require_connection2 = __commonJS({
82004
82004
  openConnection(ctx, socketId) {
82005
82005
  this.binaryMode = false;
82006
82006
  this.helloReceived = false;
82007
- const clientSocketFactory = this.opt?.socketFactory ?? (0, import_platform2.getMetadata)(import_client17.default.metadata.ClientSocketFactory) ?? ((url4) => {
82007
+ const clientSocketFactory = this.opt?.socketFactory ?? (0, import_platform2.getMetadata)(import_client18.default.metadata.ClientSocketFactory) ?? ((url4) => {
82008
82008
  const s = new WebSocket(url4);
82009
82009
  return s;
82010
82010
  });
@@ -82039,12 +82039,12 @@ var require_connection2 = __commonJS({
82039
82039
  if (this.websocket !== wsocket) {
82040
82040
  return;
82041
82041
  }
82042
- if (event.data === import_client17.pongConst) {
82042
+ if (event.data === import_client18.pongConst) {
82043
82043
  this.pingResponse = Date.now();
82044
82044
  return;
82045
82045
  }
82046
- if (event.data === import_client17.pingConst) {
82047
- void this.sendRequest({ method: import_client17.pingConst, params: [] }).catch((err) => {
82046
+ if (event.data === import_client18.pingConst) {
82047
+ void this.sendRequest({ method: import_client18.pingConst, params: [] }).catch((err) => {
82048
82048
  this.ctx.error("failed to send ping", { err });
82049
82049
  });
82050
82050
  return;
@@ -82109,8 +82109,8 @@ var require_connection2 = __commonJS({
82109
82109
  if (this.websocket !== wsocket) {
82110
82110
  return;
82111
82111
  }
82112
- const useBinary = this.opt?.useBinaryProtocol ?? (0, import_platform2.getMetadata)(import_client17.default.metadata.UseBinaryProtocol) ?? true;
82113
- this.compressionMode = this.opt?.useProtocolCompression ?? (0, import_platform2.getMetadata)(import_client17.default.metadata.UseProtocolCompression) ?? false;
82112
+ const useBinary = this.opt?.useBinaryProtocol ?? (0, import_platform2.getMetadata)(import_client18.default.metadata.UseBinaryProtocol) ?? true;
82113
+ this.compressionMode = this.opt?.useProtocolCompression ?? (0, import_platform2.getMetadata)(import_client18.default.metadata.UseProtocolCompression) ?? false;
82114
82114
  const helloRequest = {
82115
82115
  method: "hello",
82116
82116
  params: [],
@@ -82156,13 +82156,13 @@ var require_connection2 = __commonJS({
82156
82156
  if (w instanceof Promise) {
82157
82157
  await w;
82158
82158
  }
82159
- if (data.method !== import_client17.pingConst) {
82159
+ if (data.method !== import_client18.pingConst) {
82160
82160
  this.requests.set(id, promise4);
82161
82161
  }
82162
82162
  promise4.sendData = () => {
82163
- if (this.websocket?.readyState === import_client17.ClientSocketReadyState.OPEN) {
82163
+ if (this.websocket?.readyState === import_client18.ClientSocketReadyState.OPEN) {
82164
82164
  promise4.startTime = Date.now();
82165
- if (data.method !== import_client17.pingConst) {
82165
+ if (data.method !== import_client18.pingConst) {
82166
82166
  const dta = this.rpcHandler.serialize(
82167
82167
  {
82168
82168
  method: data.method,
@@ -82175,7 +82175,7 @@ var require_connection2 = __commonJS({
82175
82175
  );
82176
82176
  this.websocket?.send(dta);
82177
82177
  } else {
82178
- this.websocket?.send(import_client17.pingConst);
82178
+ this.websocket?.send(import_client18.pingConst);
82179
82179
  }
82180
82180
  }
82181
82181
  };
@@ -82189,7 +82189,7 @@ var require_connection2 = __commonJS({
82189
82189
  };
82190
82190
  }
82191
82191
  promise4.sendData();
82192
- if (data.method !== import_client17.pingConst) {
82192
+ if (data.method !== import_client18.pingConst) {
82193
82193
  return await promise4.promise;
82194
82194
  }
82195
82195
  },
@@ -82204,7 +82204,7 @@ var require_connection2 = __commonJS({
82204
82204
  }
82205
82205
  getAccount() {
82206
82206
  if (this.account !== void 0) {
82207
- return Promise.resolve((0, import_core37.clone)(this.account));
82207
+ return Promise.resolve((0, import_core38.clone)(this.account));
82208
82208
  }
82209
82209
  return this.sendRequest({ method: "getAccount", params: [] });
82210
82210
  }
@@ -82262,10 +82262,10 @@ var require_connection2 = __commonJS({
82262
82262
  method: "tx",
82263
82263
  params: [tx],
82264
82264
  retry: /* @__PURE__ */ __name(async () => {
82265
- if (tx._class === import_core37.default.class.TxApplyIf) {
82266
- return (await this.findAll(import_core37.default.class.Tx, { _id: tx.txes[0]._id }, { limit: 1 })).length === 0;
82265
+ if (tx._class === import_core38.default.class.TxApplyIf) {
82266
+ return (await this.findAll(import_core38.default.class.Tx, { _id: tx.txes[0]._id }, { limit: 1 })).length === 0;
82267
82267
  }
82268
- return (await this.findAll(import_core37.default.class.Tx, { _id: tx._id }, { limit: 1 })).length === 0;
82268
+ return (await this.findAll(import_core38.default.class.Tx, { _id: tx._id }, { limit: 1 })).length === 0;
82269
82269
  }, "retry")
82270
82270
  });
82271
82271
  }
@@ -82305,7 +82305,7 @@ var require_connection2 = __commonJS({
82305
82305
  };
82306
82306
  function connect(url4, handler, workspace, user, opt) {
82307
82307
  return new Connection(
82308
- opt?.ctx?.newChild?.("connection", {}) ?? new import_core37.MeasureMetricsContext("connection", {}),
82308
+ opt?.ctx?.newChild?.("connection", {}) ?? new import_core38.MeasureMetricsContext("connection", {}),
82309
82309
  url4,
82310
82310
  handler,
82311
82311
  workspace,
@@ -82355,14 +82355,14 @@ var require_lib19 = __commonJS({
82355
82355
  default: () => index_default
82356
82356
  });
82357
82357
  module2.exports = __toCommonJS2(index_exports2);
82358
- var import_client17 = __toESM2(require_lib6());
82359
- var import_core37 = __toESM2(require_lib4());
82358
+ var import_client18 = __toESM2(require_lib6());
82359
+ var import_core38 = __toESM2(require_lib4());
82360
82360
  var import_platform2 = __toESM2(require_lib());
82361
82361
  var import_connection = require_connection2();
82362
82362
  var dbRequest;
82363
82363
  var dbPromise = Promise.resolve(void 0);
82364
82364
  if (typeof localStorage !== "undefined") {
82365
- const st = (0, import_core37.platformNow)();
82365
+ const st = (0, import_core38.platformNow)();
82366
82366
  dbPromise = new Promise((resolve2) => {
82367
82367
  dbRequest = indexedDB.open("model.db.persistence", 2);
82368
82368
  dbRequest.onupgradeneeded = function() {
@@ -82373,7 +82373,7 @@ var require_lib19 = __commonJS({
82373
82373
  };
82374
82374
  dbRequest.onsuccess = function() {
82375
82375
  const db = dbRequest.result;
82376
- console.log("init DB complete", (0, import_core37.platformNow)() - st);
82376
+ console.log("init DB complete", (0, import_core38.platformNow)() - st);
82377
82377
  resolve2(db);
82378
82378
  };
82379
82379
  });
@@ -82399,19 +82399,19 @@ var require_lib19 = __commonJS({
82399
82399
  return {
82400
82400
  function: {
82401
82401
  GetClient: /* @__PURE__ */ __name(async (token, endpoint, opt) => {
82402
- const filterModel = (0, import_platform2.getMetadata)(import_client17.default.metadata.FilterModel) ?? "none";
82403
- const extraFilter = (0, import_platform2.getMetadata)(import_client17.default.metadata.ExtraFilter) ?? [];
82402
+ const filterModel = (0, import_platform2.getMetadata)(import_client18.default.metadata.FilterModel) ?? "none";
82403
+ const extraFilter = (0, import_platform2.getMetadata)(import_client18.default.metadata.ExtraFilter) ?? [];
82404
82404
  const handler = /* @__PURE__ */ __name(async (handler2) => {
82405
- const url4 = (0, import_core37.concatLink)(endpoint, `/${token}`);
82405
+ const url4 = (0, import_core38.concatLink)(endpoint, `/${token}`);
82406
82406
  const upgradeHandler = /* @__PURE__ */ __name((...txes) => {
82407
82407
  for (const tx of txes) {
82408
- if (tx?._class === import_core37.default.class.TxModelUpgrade) {
82408
+ if (tx?._class === import_core38.default.class.TxModelUpgrade) {
82409
82409
  opt?.onUpgrade?.();
82410
82410
  return;
82411
82411
  }
82412
- if (tx?._class === import_core37.default.class.TxWorkspaceEvent) {
82412
+ if (tx?._class === import_core38.default.class.TxWorkspaceEvent) {
82413
82413
  const event = tx;
82414
- if (event.event === import_core37.WorkspaceEvent.MaintenanceNotification) {
82414
+ if (event.event === import_core38.WorkspaceEvent.MaintenanceNotification) {
82415
82415
  void (0, import_platform2.setPlatformStatus)(
82416
82416
  new import_platform2.Status(import_platform2.Severity.WARNING, import_platform2.default.status.MaintenanceWarning, {
82417
82417
  time: event.params.timeMinutes,
@@ -82428,7 +82428,7 @@ var require_lib19 = __commonJS({
82428
82428
  throw new Error("Workspace or account not found in token");
82429
82429
  }
82430
82430
  const newOpt = { ...opt };
82431
- const connectTimeout = opt?.connectionTimeout ?? (0, import_platform2.getMetadata)(import_client17.default.metadata.ConnectionTimeout);
82431
+ const connectTimeout = opt?.connectionTimeout ?? (0, import_platform2.getMetadata)(import_client18.default.metadata.ConnectionTimeout);
82432
82432
  let connectPromise;
82433
82433
  if ((connectTimeout ?? 0) > 0) {
82434
82434
  connectPromise = new Promise((resolve2, reject) => {
@@ -82449,7 +82449,7 @@ var require_lib19 = __commonJS({
82449
82449
  reject(error2);
82450
82450
  return;
82451
82451
  }
82452
- if (event !== import_core37.ClientConnectEvent.Maintenance) {
82452
+ if (event !== import_core38.ClientConnectEvent.Maintenance) {
82453
82453
  clearTimeout(connectTO);
82454
82454
  resolve2();
82455
82455
  }
@@ -82471,7 +82471,7 @@ var require_lib19 = __commonJS({
82471
82471
  }
82472
82472
  return txes;
82473
82473
  }, "modelFilter");
82474
- const client = (0, import_core37.createClient)(handler, modelFilter, createModelPersistence(getWSFromToken(token)), opt?.ctx);
82474
+ const client = (0, import_core38.createClient)(handler, modelFilter, createModelPersistence(getWSFromToken(token)), opt?.ctx);
82475
82475
  return await client;
82476
82476
  }, "GetClient")
82477
82477
  }
@@ -82479,17 +82479,17 @@ var require_lib19 = __commonJS({
82479
82479
  }, "default");
82480
82480
  function returnUITxes(txes, extraFilter) {
82481
82481
  const configs = /* @__PURE__ */ new Map();
82482
- (0, import_core37.fillConfiguration)(txes, configs);
82483
- const allowedPlugins = [...(0, import_platform2.getPlugins)(), ...(0, import_platform2.getMetadata)(import_client17.default.metadata.ExtraPlugins) ?? []];
82482
+ (0, import_core38.fillConfiguration)(txes, configs);
82483
+ const allowedPlugins = [...(0, import_platform2.getPlugins)(), ...(0, import_platform2.getMetadata)(import_client18.default.metadata.ExtraPlugins) ?? []];
82484
82484
  const excludedPlugins = Array.from(configs.values()).filter(
82485
82485
  (it) => !it.enabled || !allowedPlugins.includes(it.pluginId) || extraFilter.includes(it.pluginId)
82486
82486
  );
82487
- return (0, import_core37.pluginFilterTx)(excludedPlugins, configs, txes);
82487
+ return (0, import_core38.pluginFilterTx)(excludedPlugins, configs, txes);
82488
82488
  }
82489
82489
  __name(returnUITxes, "returnUITxes");
82490
82490
  function returnClientTxes(txes) {
82491
82491
  const configs = /* @__PURE__ */ new Map();
82492
- (0, import_core37.fillConfiguration)(txes, configs);
82492
+ (0, import_core38.fillConfiguration)(txes, configs);
82493
82493
  const excludedPlugins = Array.from(configs.values()).filter((it) => !it.enabled || it.pluginId.startsWith("server-"));
82494
82494
  const toExclude = /* @__PURE__ */ new Set([
82495
82495
  "workbench:class:Application",
@@ -82515,8 +82515,8 @@ var require_lib19 = __commonJS({
82515
82515
  "setting:class:WorkspaceSettingCategory",
82516
82516
  "notification:class:NotificationProvider"
82517
82517
  ]);
82518
- const result = (0, import_core37.pluginFilterTx)(excludedPlugins, configs, txes).filter((tx) => {
82519
- if (tx?._class === import_core37.default.class.TxCreateDoc || tx?._class === import_core37.default.class.TxUpdateDoc || tx?._class === import_core37.default.class.TxRemoveDoc) {
82518
+ const result = (0, import_core38.pluginFilterTx)(excludedPlugins, configs, txes).filter((tx) => {
82519
+ if (tx?._class === import_core38.default.class.TxCreateDoc || tx?._class === import_core38.default.class.TxUpdateDoc || tx?._class === import_core38.default.class.TxRemoveDoc) {
82520
82520
  const cud = tx;
82521
82521
  if (toExclude.has(cud.objectClass)) {
82522
82522
  return false;
@@ -82528,7 +82528,7 @@ var require_lib19 = __commonJS({
82528
82528
  }
82529
82529
  __name(returnClientTxes, "returnClientTxes");
82530
82530
  function createModelPersistence(workspace) {
82531
- const overrideStore = (0, import_platform2.getMetadata)(import_client17.default.metadata.OverridePersistenceStore);
82531
+ const overrideStore = (0, import_platform2.getMetadata)(import_client18.default.metadata.OverridePersistenceStore);
82532
82532
  if (overrideStore !== void 0) {
82533
82533
  return overrideStore;
82534
82534
  }
@@ -82625,8 +82625,8 @@ var require_client6 = __commonJS({
82625
82625
  });
82626
82626
  module2.exports = __toCommonJS2(client_exports);
82627
82627
  var import_account_client2 = require_lib5();
82628
- var import_client17 = __toESM2(require_lib6());
82629
- var import_core37 = require_lib4();
82628
+ var import_client18 = __toESM2(require_lib6());
82629
+ var import_core38 = require_lib4();
82630
82630
  var import_platform2 = require_lib();
82631
82631
  var import_config8 = require_config();
82632
82632
  var import_markup = require_markup();
@@ -82643,7 +82643,7 @@ var require_client6 = __commonJS({
82643
82643
  const account = {
82644
82644
  uuid: wsLoginInfo.account,
82645
82645
  role: wsLoginInfo.role,
82646
- primarySocialId: (0, import_core37.pickPrimarySocialId)(socialIds)._id,
82646
+ primarySocialId: (0, import_core38.pickPrimarySocialId)(socialIds)._id,
82647
82647
  socialIds: socialIds.map((si) => si._id),
82648
82648
  fullSocialIds: socialIds
82649
82649
  };
@@ -82651,9 +82651,9 @@ var require_client6 = __commonJS({
82651
82651
  }
82652
82652
  __name(connect, "connect");
82653
82653
  async function createClient(url4, endpoint, token, workspaceUuid, account, config3, options) {
82654
- (0, import_platform2.addLocation)(import_client17.clientId, () => Promise.resolve().then(() => __toESM(require_lib19())));
82654
+ (0, import_platform2.addLocation)(import_client18.clientId, () => Promise.resolve().then(() => __toESM(require_lib19())));
82655
82655
  const { socketFactory, connectionTimeout } = options;
82656
- const clientFactory = await (0, import_platform2.getResource)(import_client17.default.function.GetClient);
82656
+ const clientFactory = await (0, import_platform2.getResource)(import_client18.default.function.GetClient);
82657
82657
  const connection = await clientFactory(token, endpoint, {
82658
82658
  socketFactory,
82659
82659
  connectionTimeout
@@ -82669,7 +82669,7 @@ var require_client6 = __commonJS({
82669
82669
  this.config = config3;
82670
82670
  this.connection = connection;
82671
82671
  this.account = account;
82672
- this.client = new import_core37.TxOperations(connection, account.primarySocialId);
82672
+ this.client = new import_core38.TxOperations(connection, account.primarySocialId);
82673
82673
  this.markup = (0, import_markup.createMarkupOperations)(url4, workspace, token, config3);
82674
82674
  }
82675
82675
  static {
@@ -82709,7 +82709,7 @@ var require_client6 = __commonJS({
82709
82709
  }
82710
82710
  // DocOperations
82711
82711
  async createDoc(_class, space, attributes, id) {
82712
- id ??= (0, import_core37.generateId)();
82712
+ id ??= (0, import_core38.generateId)();
82713
82713
  const data = await this.processMarkup(_class, id, attributes);
82714
82714
  return await this.client.createDoc(_class, space, data, id);
82715
82715
  }
@@ -82722,7 +82722,7 @@ var require_client6 = __commonJS({
82722
82722
  }
82723
82723
  // CollectionOperations
82724
82724
  async addCollection(_class, space, attachedTo, attachedToClass, collection, attributes, id) {
82725
- id ??= (0, import_core37.generateId)();
82725
+ id ??= (0, import_core38.generateId)();
82726
82726
  const data = await this.processMarkup(_class, id, attributes);
82727
82727
  return await this.client.addCollection(_class, space, attachedTo, attachedToClass, collection, data, id);
82728
82728
  }
@@ -83049,7 +83049,7 @@ var require_rest = __commonJS({
83049
83049
  createRestClient: () => createRestClient
83050
83050
  });
83051
83051
  module2.exports = __toCommonJS2(rest_exports);
83052
- var import_core37 = require_lib4();
83052
+ var import_core38 = require_lib4();
83053
83053
  var import_platform2 = require_lib();
83054
83054
  var import_utils14 = require_utils9();
83055
83055
  var import_utils22 = require_utils10();
@@ -83104,7 +83104,7 @@ var require_rest = __commonJS({
83104
83104
  if (options !== void 0 && Object.keys(options).length > 0) {
83105
83105
  params.append("options", JSON.stringify(options));
83106
83106
  }
83107
- const requestUrl = (0, import_core37.concatLink)(this.endpoint, `/api/v1/find-all/${this.workspace}?${params.toString()}`);
83107
+ const requestUrl = (0, import_core38.concatLink)(this.endpoint, `/api/v1/find-all/${this.workspace}?${params.toString()}`);
83108
83108
  const result = await (0, import_utils22.withRetry)(async () => {
83109
83109
  const response = await fetch(requestUrl, this.requestInit());
83110
83110
  if (!response.ok) {
@@ -83178,7 +83178,7 @@ var require_rest = __commonJS({
83178
83178
  }
83179
83179
  }
83180
83180
  async getAccount() {
83181
- const requestUrl = (0, import_core37.concatLink)(this.endpoint, `/api/v1/account/${this.workspace}`);
83181
+ const requestUrl = (0, import_core38.concatLink)(this.endpoint, `/api/v1/account/${this.workspace}`);
83182
83182
  await this.checkRate();
83183
83183
  const result = await (0, import_utils22.withRetry)(async () => {
83184
83184
  const response = await fetch(requestUrl, this.requestInit());
@@ -83195,7 +83195,7 @@ var require_rest = __commonJS({
83195
83195
  return result;
83196
83196
  }
83197
83197
  async getModel(full = false) {
83198
- const requestUrl = new URL((0, import_core37.concatLink)(this.endpoint, `/api/v1/load-model/${this.workspace}`));
83198
+ const requestUrl = new URL((0, import_core38.concatLink)(this.endpoint, `/api/v1/load-model/${this.workspace}`));
83199
83199
  if (full) {
83200
83200
  requestUrl.searchParams.append("full", "true");
83201
83201
  }
@@ -83208,10 +83208,10 @@ var require_rest = __commonJS({
83208
83208
  }
83209
83209
  this.updateRateLimit(response);
83210
83210
  const modelResponse = await (0, import_utils22.extractJson)(response);
83211
- const hierarchy = new import_core37.Hierarchy();
83212
- const model = new import_core37.ModelDb(hierarchy);
83213
- const ctx = new import_core37.MeasureMetricsContext("loadModel", {});
83214
- (0, import_core37.buildModel)(ctx, modelResponse, void 0, hierarchy, model);
83211
+ const hierarchy = new import_core38.Hierarchy();
83212
+ const model = new import_core38.ModelDb(hierarchy);
83213
+ const ctx = new import_core38.MeasureMetricsContext("loadModel", {});
83214
+ (0, import_core38.buildModel)(ctx, modelResponse, void 0, hierarchy, model);
83215
83215
  return { hierarchy, model };
83216
83216
  }, isRLE);
83217
83217
  if (result.error !== void 0) {
@@ -83223,7 +83223,7 @@ var require_rest = __commonJS({
83223
83223
  return (await this.findAll(_class, query, { ...options, limit: 1 })).shift();
83224
83224
  }
83225
83225
  async tx(tx) {
83226
- const requestUrl = (0, import_core37.concatLink)(this.endpoint, `/api/v1/tx/${this.workspace}`);
83226
+ const requestUrl = (0, import_core38.concatLink)(this.endpoint, `/api/v1/tx/${this.workspace}`);
83227
83227
  await this.checkRate();
83228
83228
  const result = await (0, import_utils22.withRetry)(async () => {
83229
83229
  const response = await fetch(requestUrl, {
@@ -83257,7 +83257,7 @@ var require_rest = __commonJS({
83257
83257
  if (options.limit != null) {
83258
83258
  params.append("limit", `${options.limit}`);
83259
83259
  }
83260
- const requestUrl = (0, import_core37.concatLink)(this.endpoint, `/api/v1/search-fulltext/${this.workspace}?${params.toString()}`);
83260
+ const requestUrl = (0, import_core38.concatLink)(this.endpoint, `/api/v1/search-fulltext/${this.workspace}?${params.toString()}`);
83261
83261
  const response = await fetch(requestUrl, {
83262
83262
  method: "GET",
83263
83263
  headers: this.jsonHeaders(),
@@ -83276,7 +83276,7 @@ var require_rest = __commonJS({
83276
83276
  return result;
83277
83277
  }
83278
83278
  async domainRequest(domain3, params, options) {
83279
- const requestUrl = (0, import_core37.concatLink)(this.endpoint, `/api/v1/request/${domain3}/${this.workspace}`);
83279
+ const requestUrl = (0, import_core38.concatLink)(this.endpoint, `/api/v1/request/${domain3}/${this.workspace}`);
83280
83280
  await this.checkRate();
83281
83281
  return await (0, import_utils22.withRetry)(async () => {
83282
83282
  const response = await fetch(requestUrl, {
@@ -83295,7 +83295,7 @@ var require_rest = __commonJS({
83295
83295
  }, isRLE);
83296
83296
  }
83297
83297
  async ensurePerson(socialType, socialValue, firstName, lastName) {
83298
- const requestUrl = (0, import_core37.concatLink)(this.endpoint, `/api/v1/ensure-person/${this.workspace}`);
83298
+ const requestUrl = (0, import_core38.concatLink)(this.endpoint, `/api/v1/ensure-person/${this.workspace}`);
83299
83299
  await this.checkRate();
83300
83300
  const result = await (0, import_utils22.withRetry)(async () => {
83301
83301
  const response = await fetch(requestUrl, {
@@ -83352,13 +83352,13 @@ var require_tx2 = __commonJS({
83352
83352
  createRestTxOperations: () => createRestTxOperations2
83353
83353
  });
83354
83354
  module2.exports = __toCommonJS2(tx_exports);
83355
- var import_core37 = require_lib4();
83355
+ var import_core38 = require_lib4();
83356
83356
  var import_rest = require_rest();
83357
83357
  async function createRestTxOperations2(endpoint, workspaceId, token, fullModel = false) {
83358
83358
  const restClient = new import_rest.RestClientImpl(endpoint, workspaceId, token);
83359
83359
  const account = await restClient.getAccount();
83360
83360
  const { hierarchy, model } = await restClient.getModel(fullModel);
83361
- return new import_core37.TxOperations(new RestTxClient(restClient, hierarchy, model, account), account.socialIds[0]);
83361
+ return new import_core38.TxOperations(new RestTxClient(restClient, hierarchy, model, account), account.socialIds[0]);
83362
83362
  }
83363
83363
  __name(createRestTxOperations2, "createRestTxOperations");
83364
83364
  var RestTxClient = class {
@@ -83379,7 +83379,7 @@ var require_tx2 = __commonJS({
83379
83379
  const result = data.map((v) => {
83380
83380
  return this.hierarchy.updateLookupMixin(_class, v, options);
83381
83381
  });
83382
- return (0, import_core37.toFindResult)(result, data.total);
83382
+ return (0, import_core38.toFindResult)(result, data.total);
83383
83383
  }
83384
83384
  async domainRequest(domain3, params, options) {
83385
83385
  return await this.client.domainRequest(domain3, params, options);
@@ -83561,7 +83561,7 @@ var require_client7 = __commonJS({
83561
83561
  createStorageClient: () => createStorageClient2
83562
83562
  });
83563
83563
  module2.exports = __toCommonJS2(client_exports);
83564
- var import_core37 = __toESM2(require_lib4());
83564
+ var import_core38 = __toESM2(require_lib4());
83565
83565
  var import_stream2 = require("stream");
83566
83566
  var import_config8 = require_config();
83567
83567
  var import_error = require_error3();
@@ -83598,13 +83598,13 @@ var require_client7 = __commonJS({
83598
83598
  const size13 = parseInt(headers.get("Content-Length") ?? "0", 10);
83599
83599
  return {
83600
83600
  provider: "",
83601
- _class: import_core37.default.class.Blob,
83601
+ _class: import_core38.default.class.Blob,
83602
83602
  _id: objectName,
83603
83603
  contentType: headers.get("Content-Type") ?? "",
83604
83604
  size: isNaN(size13) ? 0 : size13 ?? 0,
83605
83605
  etag: headers.get("ETag") ?? "",
83606
- space: import_core37.default.space.Configuration,
83607
- modifiedBy: import_core37.default.account.System,
83606
+ space: import_core38.default.space.Configuration,
83607
+ modifiedBy: import_core38.default.account.System,
83608
83608
  modifiedOn: isNaN(lastModified) ? 0 : lastModified,
83609
83609
  version: null
83610
83610
  };
@@ -83639,11 +83639,11 @@ var require_client7 = __commonJS({
83639
83639
  if (Object.hasOwn(result[0], "id")) {
83640
83640
  const fileResult = result[0];
83641
83641
  return {
83642
- _class: import_core37.default.class.Blob,
83642
+ _class: import_core38.default.class.Blob,
83643
83643
  _id: fileResult.id,
83644
- space: import_core37.default.space.Configuration,
83644
+ space: import_core38.default.space.Configuration,
83645
83645
  modifiedOn: fileResult.metadata.lastModified,
83646
- modifiedBy: import_core37.default.account.System,
83646
+ modifiedBy: import_core38.default.account.System,
83647
83647
  provider: "",
83648
83648
  contentType: fileResult.metadata.contentType,
83649
83649
  etag: fileResult.metadata.etag,
@@ -83717,11 +83717,11 @@ var require_client7 = __commonJS({
83717
83717
  async function connectStorage(url4, options, config3) {
83718
83718
  config3 ??= await (0, import_config8.loadServerConfig)(url4);
83719
83719
  const token = await (0, import_utils14.getWorkspaceToken)(url4, options, config3);
83720
- const filesUrl = (config3.FILES_URL.startsWith("/") ? (0, import_core37.concatLink)(url4, config3.FILES_URL) : config3.FILES_URL).replace(
83720
+ const filesUrl = (config3.FILES_URL.startsWith("/") ? (0, import_core38.concatLink)(url4, config3.FILES_URL) : config3.FILES_URL).replace(
83721
83721
  ":workspace",
83722
83722
  token.workspaceId
83723
83723
  );
83724
- const uploadUrl = (config3.UPLOAD_URL.startsWith("/") ? (0, import_core37.concatLink)(url4, config3.UPLOAD_URL) : config3.UPLOAD_URL).replace(":workspace", token.workspaceId);
83724
+ const uploadUrl = (config3.UPLOAD_URL.startsWith("/") ? (0, import_core38.concatLink)(url4, config3.UPLOAD_URL) : config3.UPLOAD_URL).replace(":workspace", token.workspaceId);
83725
83725
  return new StorageClientImpl(filesUrl, uploadUrl, token.token, token.workspaceId);
83726
83726
  }
83727
83727
  __name(connectStorage, "connectStorage");
@@ -83774,11 +83774,11 @@ var require_storage2 = __commonJS({
83774
83774
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
83775
83775
  var storage_exports = {};
83776
83776
  __export2(storage_exports, {
83777
- connectStorage: () => import_client17.connectStorage,
83778
- createStorageClient: () => import_client17.createStorageClient
83777
+ connectStorage: () => import_client18.connectStorage,
83778
+ createStorageClient: () => import_client18.createStorageClient
83779
83779
  });
83780
83780
  module2.exports = __toCommonJS2(storage_exports);
83781
- var import_client17 = require_client7();
83781
+ var import_client18 = require_client7();
83782
83782
  __reExport2(storage_exports, require_error3(), module2.exports);
83783
83783
  __reExport2(storage_exports, require_types8(), module2.exports);
83784
83784
  }
@@ -84434,7 +84434,7 @@ var require_utils11 = __commonJS({
84434
84434
  getWeekday: () => getWeekday
84435
84435
  });
84436
84436
  module2.exports = __toCommonJS2(utils_exports);
84437
- var import_core37 = require_lib4();
84437
+ var import_core38 = require_lib4();
84438
84438
  var import__ = __toESM2(require_lib24());
84439
84439
  function getInstance(event, date7) {
84440
84440
  const diff8 = event.dueDate - event.date;
@@ -84446,7 +84446,7 @@ var require_utils11 = __commonJS({
84446
84446
  originalStartTime: date7,
84447
84447
  _class: import__.default.class.ReccuringInstance,
84448
84448
  eventId: generateEventId2(),
84449
- _id: (0, import_core37.generateId)(),
84449
+ _id: (0, import_core38.generateId)(),
84450
84450
  virtual: true
84451
84451
  };
84452
84452
  }
@@ -84759,7 +84759,7 @@ var require_utils11 = __commonJS({
84759
84759
  }
84760
84760
  __name(getAllEvents, "getAllEvents");
84761
84761
  function generateEventId2() {
84762
- const id = (0, import_core37.generateId)();
84762
+ const id = (0, import_core38.generateId)();
84763
84763
  return encodeToBase32Hex(id);
84764
84764
  }
84765
84765
  __name(generateEventId2, "generateEventId");
@@ -84977,6 +84977,164 @@ var require_lib24 = __commonJS({
84977
84977
  }
84978
84978
  });
84979
84979
 
84980
+ // node_modules/.pnpm/@hcengineering+card@0.7.0/node_modules/@hcengineering/card/lib/analytics.js
84981
+ var require_analytics3 = __commonJS({
84982
+ "node_modules/.pnpm/@hcengineering+card@0.7.0/node_modules/@hcengineering/card/lib/analytics.js"(exports2, module2) {
84983
+ "use strict";
84984
+ var __defProp2 = Object.defineProperty;
84985
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
84986
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
84987
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
84988
+ var __export2 = (target, all8) => {
84989
+ for (var name in all8)
84990
+ __defProp2(target, name, { get: all8[name], enumerable: true });
84991
+ };
84992
+ var __copyProps2 = (to, from, except, desc) => {
84993
+ if (from && typeof from === "object" || typeof from === "function") {
84994
+ for (let key of __getOwnPropNames2(from))
84995
+ if (!__hasOwnProp2.call(to, key) && key !== except)
84996
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
84997
+ }
84998
+ return to;
84999
+ };
85000
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
85001
+ var analytics_exports = {};
85002
+ __export2(analytics_exports, {
85003
+ CardEvents: () => CardEvents
85004
+ });
85005
+ module2.exports = __toCommonJS2(analytics_exports);
85006
+ var CardEvents = /* @__PURE__ */ ((CardEvents2) => {
85007
+ CardEvents2["TypeCreated"] = "card.card.TypeCreated";
85008
+ CardEvents2["TagCreated"] = "card.card.TagCreated";
85009
+ CardEvents2["RelationCreated"] = "card.card.RelationCreated";
85010
+ CardEvents2["CardCreated"] = "card.card.Created";
85011
+ CardEvents2["CardOpened"] = "card.card.Opened";
85012
+ CardEvents2["TypeChanged"] = "card.card.TypeChanged";
85013
+ return CardEvents2;
85014
+ })(CardEvents || {});
85015
+ }
85016
+ });
85017
+
85018
+ // node_modules/.pnpm/@hcengineering+card@0.7.0/node_modules/@hcengineering/card/lib/index.js
85019
+ var require_lib25 = __commonJS({
85020
+ "node_modules/.pnpm/@hcengineering+card@0.7.0/node_modules/@hcengineering/card/lib/index.js"(exports2, module2) {
85021
+ "use strict";
85022
+ var __defProp2 = Object.defineProperty;
85023
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
85024
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
85025
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
85026
+ var __export2 = (target, all8) => {
85027
+ for (var name in all8)
85028
+ __defProp2(target, name, { get: all8[name], enumerable: true });
85029
+ };
85030
+ var __copyProps2 = (to, from, except, desc) => {
85031
+ if (from && typeof from === "object" || typeof from === "function") {
85032
+ for (let key of __getOwnPropNames2(from))
85033
+ if (!__hasOwnProp2.call(to, key) && key !== except)
85034
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
85035
+ }
85036
+ return to;
85037
+ };
85038
+ var __reExport2 = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default"));
85039
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
85040
+ var index_exports2 = {};
85041
+ __export2(index_exports2, {
85042
+ DOMAIN_CARD: () => DOMAIN_CARD,
85043
+ cardId: () => cardId,
85044
+ default: () => index_default
85045
+ });
85046
+ module2.exports = __toCommonJS2(index_exports2);
85047
+ var import_platform2 = require_lib();
85048
+ __reExport2(index_exports2, require_analytics3(), module2.exports);
85049
+ var cardId = "card";
85050
+ var DOMAIN_CARD = "card";
85051
+ var cardPlugin2 = (0, import_platform2.plugin)(cardId, {
85052
+ class: {
85053
+ Card: "",
85054
+ MasterTag: "",
85055
+ Tag: "",
85056
+ MasterTagEditorSection: "",
85057
+ CardSpace: "",
85058
+ Role: "",
85059
+ CardSection: "",
85060
+ FavoriteCard: ""
85061
+ },
85062
+ mixin: {
85063
+ CardViewDefaults: "",
85064
+ CreateCardExtension: ""
85065
+ },
85066
+ space: {
85067
+ Default: ""
85068
+ },
85069
+ types: {
85070
+ File: "",
85071
+ Document: ""
85072
+ },
85073
+ icon: {
85074
+ MasterTags: "",
85075
+ MasterTag: "",
85076
+ Tag: "",
85077
+ Tags: "",
85078
+ Card: "",
85079
+ File: "",
85080
+ View: "",
85081
+ Document: "",
85082
+ Home: "",
85083
+ Space: "",
85084
+ Expand: "",
85085
+ Feed: "",
85086
+ All: ""
85087
+ },
85088
+ extensions: {
85089
+ EditCardExtension: ""
85090
+ },
85091
+ string: {
85092
+ MasterTag: "",
85093
+ MasterTags: "",
85094
+ Tags: "",
85095
+ Tag: "",
85096
+ Card: "",
85097
+ Cards: "",
85098
+ CardApplication: "",
85099
+ Views: "",
85100
+ Labels: "",
85101
+ GetIndividualPublicLink: "",
85102
+ AddTag: "",
85103
+ Feed: "",
85104
+ AllCards: ""
85105
+ },
85106
+ section: {
85107
+ Attachments: "",
85108
+ Children: "",
85109
+ Content: "",
85110
+ Properties: "",
85111
+ Relations: ""
85112
+ },
85113
+ ids: {
85114
+ CardWidget: ""
85115
+ },
85116
+ component: {
85117
+ LabelsPresenter: "",
85118
+ CardTagColored: "",
85119
+ CardTagsColored: "",
85120
+ CardIcon: "",
85121
+ CardArrayEditor: "",
85122
+ CardFeedView: ""
85123
+ },
85124
+ function: {
85125
+ OpenCardInSidebar: "",
85126
+ GetSpaceAccessPublicLink: "",
85127
+ CanGetSpaceAccessPublicLink: ""
85128
+ },
85129
+ label: {
85130
+ Subscribed: "",
85131
+ NewMessages: ""
85132
+ }
85133
+ });
85134
+ var index_default = cardPlugin2;
85135
+ }
85136
+ });
85137
+
84980
85138
  // node_modules/.pnpm/@hcengineering+chunter@0.7.0/node_modules/@hcengineering/chunter/lib/utils.js
84981
85139
  var require_utils12 = __commonJS({
84982
85140
  "node_modules/.pnpm/@hcengineering+chunter@0.7.0/node_modules/@hcengineering/chunter/lib/utils.js"(exports2, module2) {
@@ -85015,8 +85173,8 @@ var require_utils12 = __commonJS({
85015
85173
  });
85016
85174
  module2.exports = __toCommonJS2(utils_exports);
85017
85175
  var import_fast_equals = require_cjs();
85018
- var import_core37 = __toESM2(require_lib4());
85019
- var import__ = __toESM2(require_lib25());
85176
+ var import_core38 = __toESM2(require_lib4());
85177
+ var import__ = __toESM2(require_lib26());
85020
85178
  async function getDirectChannel(client, me, employeeAccount) {
85021
85179
  const accIds = [me, employeeAccount].sort();
85022
85180
  const existingDms = await client.findAll(import__.default.class.DirectMessage, {});
@@ -85025,7 +85183,7 @@ var require_utils12 = __commonJS({
85025
85183
  return dm._id;
85026
85184
  }
85027
85185
  }
85028
- return await client.createDoc(import__.default.class.DirectMessage, import_core37.default.space.Space, {
85186
+ return await client.createDoc(import__.default.class.DirectMessage, import_core38.default.space.Space, {
85029
85187
  name: "",
85030
85188
  description: "",
85031
85189
  private: true,
@@ -85038,7 +85196,7 @@ var require_utils12 = __commonJS({
85038
85196
  });
85039
85197
 
85040
85198
  // node_modules/.pnpm/@hcengineering+chunter@0.7.0/node_modules/@hcengineering/chunter/lib/analytics.js
85041
- var require_analytics3 = __commonJS({
85199
+ var require_analytics4 = __commonJS({
85042
85200
  "node_modules/.pnpm/@hcengineering+chunter@0.7.0/node_modules/@hcengineering/chunter/lib/analytics.js"(exports2, module2) {
85043
85201
  "use strict";
85044
85202
  var __defProp2 = Object.defineProperty;
@@ -85072,7 +85230,7 @@ var require_analytics3 = __commonJS({
85072
85230
  });
85073
85231
 
85074
85232
  // node_modules/.pnpm/@hcengineering+chunter@0.7.0/node_modules/@hcengineering/chunter/lib/index.js
85075
- var require_lib25 = __commonJS({
85233
+ var require_lib26 = __commonJS({
85076
85234
  "node_modules/.pnpm/@hcengineering+chunter@0.7.0/node_modules/@hcengineering/chunter/lib/index.js"(exports2, module2) {
85077
85235
  "use strict";
85078
85236
  var __defProp2 = Object.defineProperty;
@@ -85101,7 +85259,7 @@ var require_lib25 = __commonJS({
85101
85259
  module2.exports = __toCommonJS2(index_exports2);
85102
85260
  var import_platform2 = require_lib();
85103
85261
  __reExport2(index_exports2, require_utils12(), module2.exports);
85104
- __reExport2(index_exports2, require_analytics3(), module2.exports);
85262
+ __reExport2(index_exports2, require_analytics4(), module2.exports);
85105
85263
  var chunterId = "chunter";
85106
85264
  var index_default = (0, import_platform2.plugin)(chunterId, {
85107
85265
  icon: {
@@ -85329,18 +85487,18 @@ var require_cache4 = __commonJS({
85329
85487
  default: () => ContactCache
85330
85488
  });
85331
85489
  module2.exports = __toCommonJS2(cache_exports);
85332
- var import_core37 = __toESM2(require_lib4());
85333
- var import__ = __toESM2(require_lib26());
85490
+ var import_core38 = __toESM2(require_lib4());
85491
+ var import__ = __toESM2(require_lib27());
85334
85492
  function isCreateTx(tx) {
85335
- return tx._class === import_core37.default.class.TxCreateDoc;
85493
+ return tx._class === import_core38.default.class.TxCreateDoc;
85336
85494
  }
85337
85495
  __name(isCreateTx, "isCreateTx");
85338
85496
  function isUpdateTx(tx) {
85339
- return tx._class === import_core37.default.class.TxUpdateDoc;
85497
+ return tx._class === import_core38.default.class.TxUpdateDoc;
85340
85498
  }
85341
85499
  __name(isUpdateTx, "isUpdateTx");
85342
85500
  function isMixinTx(tx) {
85343
- return tx._class === import_core37.default.class.TxMixin;
85501
+ return tx._class === import_core38.default.class.TxMixin;
85344
85502
  }
85345
85503
  __name(isMixinTx, "isMixinTx");
85346
85504
  function isPersonTx(tx) {
@@ -85447,7 +85605,7 @@ var require_cache4 = __commonJS({
85447
85605
  const ref = tx.objectId;
85448
85606
  const person = this._personByRef.get(ref);
85449
85607
  if (person === void 0) return;
85450
- const createdPerson = import_core37.TxProcessor.createDoc2Doc(tx);
85608
+ const createdPerson = import_core38.TxProcessor.createDoc2Doc(tx);
85451
85609
  this._personByRef.set(ref, createdPerson);
85452
85610
  const personIds = Array.from(this._personIdsByPersonRef.get(ref) ?? []);
85453
85611
  for (const personId of personIds) {
@@ -85465,7 +85623,7 @@ var require_cache4 = __commonJS({
85465
85623
  const newPersonRef = tx.attachedTo;
85466
85624
  this._personRefByPersonId.set(personId, newPersonRef);
85467
85625
  this.addPersonIdToPersonRef(newPersonRef, personId);
85468
- const createdSocialId = import_core37.TxProcessor.createDoc2Doc(tx);
85626
+ const createdSocialId = import_core38.TxProcessor.createDoc2Doc(tx);
85469
85627
  this._socialIdByPersonId.set(personId, createdSocialId);
85470
85628
  this.broadcastChange({
85471
85629
  personRef: newPersonRef,
@@ -85476,7 +85634,7 @@ var require_cache4 = __commonJS({
85476
85634
  const ref = tx.objectId;
85477
85635
  const person = this._personByRef.get(ref);
85478
85636
  if (person == null) return;
85479
- const updatedPerson = isUpdateTx(tx) ? import_core37.TxProcessor.updateDoc2Doc(person, tx) : import_core37.TxProcessor.updateMixin4Doc(person, tx);
85637
+ const updatedPerson = isUpdateTx(tx) ? import_core38.TxProcessor.updateDoc2Doc(person, tx) : import_core38.TxProcessor.updateMixin4Doc(person, tx);
85480
85638
  this._personByRef.set(ref, updatedPerson);
85481
85639
  const personIds = Array.from(this._personIdsByPersonRef.get(ref) ?? []);
85482
85640
  for (const personId of personIds) {
@@ -85591,9 +85749,9 @@ var require_utils13 = __commonJS({
85591
85749
  setCurrentEmployeeSpace: () => setCurrentEmployeeSpace
85592
85750
  });
85593
85751
  module2.exports = __toCommonJS2(utils_exports);
85594
- var import_core37 = require_lib4();
85752
+ var import_core38 = require_lib4();
85595
85753
  var import_platform2 = require_lib();
85596
- var import__ = __toESM2(require_lib26());
85754
+ var import__ = __toESM2(require_lib27());
85597
85755
  var import_types11 = require_types9();
85598
85756
  var import_cache2 = __toESM2(require_cache4());
85599
85757
  var currentEmployee;
@@ -85795,7 +85953,7 @@ var require_utils13 = __commonJS({
85795
85953
  if (socialIds.length === 0) {
85796
85954
  return;
85797
85955
  }
85798
- return (0, import_core37.pickPrimarySocialId)(socialIds)._id;
85956
+ return (0, import_core38.pickPrimarySocialId)(socialIds)._id;
85799
85957
  }
85800
85958
  __name(getPrimarySocialId, "getPrimarySocialId");
85801
85959
  async function getAllSocialStringsByPersonId(client, personId) {
@@ -85834,12 +85992,12 @@ var require_utils13 = __commonJS({
85834
85992
  __name(getSocialStringsByEmployee, "getSocialStringsByEmployee");
85835
85993
  async function getAllAccounts(client) {
85836
85994
  const employees = await client.findAll(import__.default.mixin.Employee, { active: true });
85837
- return employees.map((it) => it.personUuid).filter(import_core37.notEmpty);
85995
+ return employees.map((it) => it.personUuid).filter(import_core38.notEmpty);
85838
85996
  }
85839
85997
  __name(getAllAccounts, "getAllAccounts");
85840
85998
  async function getAllUserAccounts(client) {
85841
85999
  const employees = await client.findAll(import__.default.mixin.Employee, { active: true });
85842
- return employees.map((it) => it.personUuid).filter(import_core37.notEmpty);
86000
+ return employees.map((it) => it.personUuid).filter(import_core38.notEmpty);
85843
86001
  }
85844
86002
  __name(getAllUserAccounts, "getAllUserAccounts");
85845
86003
  async function ensureEmployee(ctx, me, client, socialIds, getGlobalPerson) {
@@ -85848,7 +86006,7 @@ var require_utils13 = __commonJS({
85848
86006
  }
85849
86007
  __name(ensureEmployee, "ensureEmployee");
85850
86008
  async function ensureEmployeeForPerson(ctx, me, person, client, socialIds, globalPerson) {
85851
- const txFactory = new import_core37.TxFactory(me.primarySocialId);
86009
+ const txFactory = new import_core38.TxFactory(me.primarySocialId);
85852
86010
  const personByUuid = await client.findOne(import__.default.class.Person, { personUuid: person.uuid });
85853
86011
  let personRef = personByUuid?._id;
85854
86012
  if (personRef === void 0) {
@@ -85869,7 +86027,7 @@ var require_utils13 = __commonJS({
85869
86027
  city: globalPerson.city,
85870
86028
  avatarType: import__.AvatarType.COLOR
85871
86029
  };
85872
- personRef = (0, import_core37.generateId)();
86030
+ personRef = (0, import_core38.generateId)();
85873
86031
  const createPersonTx = txFactory.createTxCreateDoc(import__.default.class.Person, import__.default.space.Contacts, data, personRef);
85874
86032
  await client.tx(createPersonTx);
85875
86033
  });
@@ -85879,7 +86037,7 @@ var require_utils13 = __commonJS({
85879
86037
  });
85880
86038
  await client.tx(updatePersonTx);
85881
86039
  }
85882
- const existingIdentifiers = (0, import_core37.toIdMap)(
86040
+ const existingIdentifiers = (0, import_core38.toIdMap)(
85883
86041
  await client.findAll(import__.default.class.SocialIdentity, { _id: { $in: person.socialIds } })
85884
86042
  );
85885
86043
  for (const socialId of socialIds) {
@@ -85904,7 +86062,7 @@ var require_utils13 = __commonJS({
85904
86062
  collection: "socialIds",
85905
86063
  type: socialId.type,
85906
86064
  value: socialId.value,
85907
- key: (0, import_core37.buildSocialIdString)(socialId),
86065
+ key: (0, import_core38.buildSocialIdString)(socialId),
85908
86066
  // TODO: fill it in trigger or on DB level as stored calculated column or smth?
85909
86067
  verifiedOn: socialId.verifiedOn,
85910
86068
  isDeleted: socialId.isDeleted
@@ -85945,9 +86103,9 @@ var require_utils13 = __commonJS({
85945
86103
  }
85946
86104
  }
85947
86105
  }
85948
- const employeeRole = person.role === import_core37.AccountRole.Guest || person.role === import_core37.AccountRole.ReadOnlyGuest ? "GUEST" : "USER";
86106
+ const employeeRole = person.role === import_core38.AccountRole.Guest || person.role === import_core38.AccountRole.ReadOnlyGuest ? "GUEST" : "USER";
85949
86107
  const employee = await client.findOne(import__.default.mixin.Employee, { _id: personRef });
85950
- if (employee === void 0 || !import_core37.Hierarchy.hasMixin(employee, import__.default.mixin.Employee) || !employee.active || employee.role !== employeeRole) {
86108
+ if (employee === void 0 || !import_core38.Hierarchy.hasMixin(employee, import__.default.mixin.Employee) || !employee.active || employee.role !== employeeRole) {
85951
86109
  await ctx.with("create-employee", {}, async () => {
85952
86110
  if (personRef === void 0) {
85953
86111
  console.error("Person not found");
@@ -85987,7 +86145,7 @@ var require_utils13 = __commonJS({
85987
86145
  }
85988
86146
  __name(loadCachesForPersonId, "loadCachesForPersonId");
85989
86147
  async function loadCachesForPersonIds(client, personIds) {
85990
- const sidObjsMap = (0, import_core37.toIdMap)(
86148
+ const sidObjsMap = (0, import_core38.toIdMap)(
85991
86149
  await client.findAll(
85992
86150
  import__.default.class.SocialIdentity,
85993
86151
  {
@@ -86022,7 +86180,7 @@ var require_utils13 = __commonJS({
86022
86180
  }
86023
86181
  __name(loadCachesForPersonRef, "loadCachesForPersonRef");
86024
86182
  async function loadCachesForPersonRefs(client, personRefs) {
86025
- const persons = (0, import_core37.toIdMap)(
86183
+ const persons = (0, import_core38.toIdMap)(
86026
86184
  await client.findAll(
86027
86185
  import__.default.class.Person,
86028
86186
  {
@@ -86065,7 +86223,7 @@ var require_utils13 = __commonJS({
86065
86223
  personIds.map((pid) => {
86066
86224
  const ref = contactCache.personRefByPersonId.get(pid);
86067
86225
  return ref != null ? [pid, ref] : void 0;
86068
- }).filter(import_core37.notEmpty)
86226
+ }).filter(import_core38.notEmpty)
86069
86227
  );
86070
86228
  }
86071
86229
  __name(getPersonRefsByPersonIdsFromCache, "getPersonRefsByPersonIdsFromCache");
@@ -86112,7 +86270,7 @@ var require_utils13 = __commonJS({
86112
86270
  personIds.map((pid) => {
86113
86271
  const person = contactCache.personByPersonId.get(pid);
86114
86272
  return person != null ? [pid, person] : void 0;
86115
- }).filter(import_core37.notEmpty)
86273
+ }).filter(import_core38.notEmpty)
86116
86274
  );
86117
86275
  }
86118
86276
  __name(getPersonsByPersonIdsFromCache, "getPersonsByPersonIdsFromCache");
@@ -86159,7 +86317,7 @@ var require_utils13 = __commonJS({
86159
86317
  personRefs.map((personRef) => {
86160
86318
  const person = contactCache.personByRef.get(personRef);
86161
86319
  return person != null ? [personRef, person] : void 0;
86162
- }).filter(import_core37.notEmpty)
86320
+ }).filter(import_core38.notEmpty)
86163
86321
  );
86164
86322
  }
86165
86323
  __name(getPersonsByPersonRefsFromCache, "getPersonsByPersonRefsFromCache");
@@ -86205,7 +86363,7 @@ var require_utils13 = __commonJS({
86205
86363
  });
86206
86364
 
86207
86365
  // node_modules/.pnpm/@hcengineering+contact@0.7.0/node_modules/@hcengineering/contact/lib/analytics.js
86208
- var require_analytics4 = __commonJS({
86366
+ var require_analytics5 = __commonJS({
86209
86367
  "node_modules/.pnpm/@hcengineering+contact@0.7.0/node_modules/@hcengineering/contact/lib/analytics.js"(exports2, module2) {
86210
86368
  "use strict";
86211
86369
  var __defProp2 = Object.defineProperty;
@@ -86279,7 +86437,7 @@ var require_avatar = __commonJS({
86279
86437
  });
86280
86438
  module2.exports = __toCommonJS2(avatar_exports);
86281
86439
  var import_platform2 = require_lib();
86282
- var import__ = __toESM2(require_lib26());
86440
+ var import__ = __toESM2(require_lib27());
86283
86441
  var providers = /* @__PURE__ */ new Map();
86284
86442
  async function getAvatarProvider(client, providerId) {
86285
86443
  const provider = providers.get(providerId);
@@ -86325,7 +86483,7 @@ var require_avatar = __commonJS({
86325
86483
  });
86326
86484
 
86327
86485
  // node_modules/.pnpm/@hcengineering+contact@0.7.0/node_modules/@hcengineering/contact/lib/index.js
86328
- var require_lib26 = __commonJS({
86486
+ var require_lib27 = __commonJS({
86329
86487
  "node_modules/.pnpm/@hcengineering+contact@0.7.0/node_modules/@hcengineering/contact/lib/index.js"(exports2, module2) {
86330
86488
  "use strict";
86331
86489
  var __defProp2 = Object.defineProperty;
@@ -86357,7 +86515,7 @@ var require_lib26 = __commonJS({
86357
86515
  var import_platform2 = require_lib();
86358
86516
  __reExport2(index_exports2, require_types9(), module2.exports);
86359
86517
  __reExport2(index_exports2, require_utils13(), module2.exports);
86360
- __reExport2(index_exports2, require_analytics4(), module2.exports);
86518
+ __reExport2(index_exports2, require_analytics5(), module2.exports);
86361
86519
  __reExport2(index_exports2, require_avatar(), module2.exports);
86362
86520
  var AvatarType2 = /* @__PURE__ */ ((AvatarType22) => {
86363
86521
  AvatarType22["COLOR"] = "color";
@@ -86668,7 +86826,7 @@ var require_plugin2 = __commonJS({
86668
86826
  });
86669
86827
 
86670
86828
  // node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/analytics.js
86671
- var require_analytics5 = __commonJS({
86829
+ var require_analytics6 = __commonJS({
86672
86830
  "node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/analytics.js"(exports2, module2) {
86673
86831
  "use strict";
86674
86832
  var __defProp2 = Object.defineProperty;
@@ -86764,9 +86922,9 @@ var require_utils14 = __commonJS({
86764
86922
  getFirstRank: () => getFirstRank
86765
86923
  });
86766
86924
  module2.exports = __toCommonJS2(utils_exports);
86767
- var import_core37 = require_lib4();
86925
+ var import_core38 = require_lib4();
86768
86926
  var import_plugin = __toESM2(require_plugin2());
86769
- async function getFirstRank(client, space, parent, sort3 = import_core37.SortingOrder.Descending, extra = {}) {
86927
+ async function getFirstRank(client, space, parent, sort3 = import_core38.SortingOrder.Descending, extra = {}) {
86770
86928
  const doc = await client.findOne(
86771
86929
  import_plugin.default.class.Document,
86772
86930
  { space, parent, ...extra },
@@ -86779,7 +86937,7 @@ var require_utils14 = __commonJS({
86779
86937
  });
86780
86938
 
86781
86939
  // node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/index.js
86782
- var require_lib27 = __commonJS({
86940
+ var require_lib28 = __commonJS({
86783
86941
  "node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/index.js"(exports2, module2) {
86784
86942
  "use strict";
86785
86943
  var __defProp2 = Object.defineProperty;
@@ -86807,7 +86965,7 @@ var require_lib27 = __commonJS({
86807
86965
  });
86808
86966
  module2.exports = __toCommonJS2(index_exports2);
86809
86967
  var import_plugin = require_plugin2();
86810
- __reExport2(index_exports2, require_analytics5(), module2.exports);
86968
+ __reExport2(index_exports2, require_analytics6(), module2.exports);
86811
86969
  __reExport2(index_exports2, require_types10(), module2.exports);
86812
86970
  __reExport2(index_exports2, require_utils14(), module2.exports);
86813
86971
  var index_default = import_plugin.documentPlugin;
@@ -86837,7 +86995,7 @@ var require_types11 = __commonJS({
86837
86995
  });
86838
86996
 
86839
86997
  // node_modules/.pnpm/@hcengineering+notification@0.7.0/node_modules/@hcengineering/notification/lib/index.js
86840
- var require_lib28 = __commonJS({
86998
+ var require_lib29 = __commonJS({
86841
86999
  "node_modules/.pnpm/@hcengineering+notification@0.7.0/node_modules/@hcengineering/notification/lib/index.js"(exports2, module2) {
86842
87000
  "use strict";
86843
87001
  var __defProp2 = Object.defineProperty;
@@ -86990,7 +87148,7 @@ var require_lib28 = __commonJS({
86990
87148
  });
86991
87149
 
86992
87150
  // node_modules/.pnpm/@hcengineering+tags@0.7.0/node_modules/@hcengineering/tags/lib/analytics.js
86993
- var require_analytics6 = __commonJS({
87151
+ var require_analytics7 = __commonJS({
86994
87152
  "node_modules/.pnpm/@hcengineering+tags@0.7.0/node_modules/@hcengineering/tags/lib/analytics.js"(exports2, module2) {
86995
87153
  "use strict";
86996
87154
  var __defProp2 = Object.defineProperty;
@@ -87024,7 +87182,7 @@ var require_analytics6 = __commonJS({
87024
87182
  });
87025
87183
 
87026
87184
  // node_modules/.pnpm/@hcengineering+tags@0.7.0/node_modules/@hcengineering/tags/lib/index.js
87027
- var require_lib29 = __commonJS({
87185
+ var require_lib30 = __commonJS({
87028
87186
  "node_modules/.pnpm/@hcengineering+tags@0.7.0/node_modules/@hcengineering/tags/lib/index.js"(exports2, module2) {
87029
87187
  "use strict";
87030
87188
  var __defProp2 = Object.defineProperty;
@@ -87054,7 +87212,7 @@ var require_lib29 = __commonJS({
87054
87212
  });
87055
87213
  module2.exports = __toCommonJS2(index_exports2);
87056
87214
  var import_platform2 = require_lib();
87057
- __reExport2(index_exports2, require_analytics6(), module2.exports);
87215
+ __reExport2(index_exports2, require_analytics7(), module2.exports);
87058
87216
  var tagsId = "tags";
87059
87217
  var tagsPlugin = (0, import_platform2.plugin)(tagsId, {
87060
87218
  class: {
@@ -88208,7 +88366,7 @@ var require_lexoRank2 = __commonJS({
88208
88366
  });
88209
88367
 
88210
88368
  // node_modules/.pnpm/lexorank@1.0.5/node_modules/lexorank/lib/index.js
88211
- var require_lib30 = __commonJS({
88369
+ var require_lib31 = __commonJS({
88212
88370
  "node_modules/.pnpm/lexorank@1.0.5/node_modules/lexorank/lib/index.js"(exports2) {
88213
88371
  "use strict";
88214
88372
  var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
@@ -88268,11 +88426,11 @@ var require_utils15 = __commonJS({
88268
88426
  var utils_exports = {};
88269
88427
  __export2(utils_exports, {
88270
88428
  genRanks: () => genRanks,
88271
- makeRank: () => makeRank3
88429
+ makeRank: () => makeRank4
88272
88430
  });
88273
88431
  module2.exports = __toCommonJS2(utils_exports);
88274
88432
  var import_lexoRankBucket = __toESM2(require_lexoRankBucket());
88275
- var import_lexorank = require_lib30();
88433
+ var import_lexorank = require_lib31();
88276
88434
  function genRanks(count3) {
88277
88435
  const sys = new import_lexorank.LexoNumeralSystem36();
88278
88436
  const base = 36;
@@ -88287,7 +88445,7 @@ var require_utils15 = __commonJS({
88287
88445
  return res;
88288
88446
  }
88289
88447
  __name(genRanks, "genRanks");
88290
- function makeRank3(prev, next4) {
88448
+ function makeRank4(prev, next4) {
88291
88449
  try {
88292
88450
  if (prev != null && prev.trim() === "") {
88293
88451
  prev = void 0;
@@ -88312,12 +88470,12 @@ var require_utils15 = __commonJS({
88312
88470
  throw new Error(`Failed to make rank: ${prev} ${next4} ${err.message}`);
88313
88471
  }
88314
88472
  }
88315
- __name(makeRank3, "makeRank");
88473
+ __name(makeRank4, "makeRank");
88316
88474
  }
88317
88475
  });
88318
88476
 
88319
88477
  // node_modules/.pnpm/@hcengineering+rank@0.7.17/node_modules/@hcengineering/rank/lib/index.js
88320
- var require_lib31 = __commonJS({
88478
+ var require_lib32 = __commonJS({
88321
88479
  "node_modules/.pnpm/@hcengineering+rank@0.7.17/node_modules/@hcengineering/rank/lib/index.js"(exports2, module2) {
88322
88480
  "use strict";
88323
88481
  var __defProp2 = Object.defineProperty;
@@ -88389,13 +88547,13 @@ var require_utils16 = __commonJS({
88389
88547
  updateProjectType: () => updateProjectType
88390
88548
  });
88391
88549
  module2.exports = __toCommonJS2(utils_exports);
88392
- var import_core37 = __toESM2(require_lib4());
88550
+ var import_core38 = __toESM2(require_lib4());
88393
88551
  var import_platform2 = require_lib();
88394
- var import__ = __toESM2(require_lib32());
88395
- var import_rank3 = require_lib31();
88396
- var import_rank22 = require_lib31();
88552
+ var import__ = __toESM2(require_lib33());
88553
+ var import_rank4 = require_lib32();
88554
+ var import_rank22 = require_lib32();
88397
88555
  var calcRank = /* @__PURE__ */ __name((prev, next4) => {
88398
- return (0, import_rank3.makeRank)(prev?.rank, next4?.rank);
88556
+ return (0, import_rank4.makeRank)(prev?.rank, next4?.rank);
88399
88557
  }, "calcRank");
88400
88558
  function getProjectTypeStates(projectType, types, statuses) {
88401
88559
  if (projectType === void 0) return [];
@@ -88425,7 +88583,7 @@ var require_utils16 = __commonJS({
88425
88583
  if (exists5 !== void 0) {
88426
88584
  return exists5._id;
88427
88585
  }
88428
- const res = await client.createDoc(_class, import_core37.default.space.Model, data);
88586
+ const res = await client.createDoc(_class, import_core38.default.space.Model, data);
88429
88587
  return res;
88430
88588
  }
88431
88589
  __name(createState, "createState");
@@ -88455,7 +88613,7 @@ var require_utils16 = __commonJS({
88455
88613
  function findStatusAttr(h, _class) {
88456
88614
  const attrs = h.getAllAttributes(_class);
88457
88615
  for (const it of attrs.values()) {
88458
- if (it.type._class === import_core37.default.class.RefTo && h.isDerived(it.type.to, import_core37.default.class.Status)) {
88616
+ if (it.type._class === import_core38.default.class.RefTo && h.isDerived(it.type.to, import_core38.default.class.Status)) {
88459
88617
  return it;
88460
88618
  }
88461
88619
  }
@@ -88487,7 +88645,7 @@ var require_utils16 = __commonJS({
88487
88645
  const targetProjectClassId = `${_id}:type:mixin`;
88488
88646
  const tmpl = await client.createDoc(
88489
88647
  import__.default.class.ProjectType,
88490
- import_core37.default.space.Model,
88648
+ import_core38.default.space.Model,
88491
88649
  {
88492
88650
  description: data.description,
88493
88651
  shortDescription: data.shortDescription,
@@ -88502,17 +88660,17 @@ var require_utils16 = __commonJS({
88502
88660
  _id
88503
88661
  );
88504
88662
  await client.createDoc(
88505
- import_core37.default.class.Mixin,
88506
- import_core37.default.space.Model,
88663
+ import_core38.default.class.Mixin,
88664
+ import_core38.default.space.Model,
88507
88665
  {
88508
88666
  extends: categoryObj.baseClass,
88509
- kind: import_core37.ClassifierKind.MIXIN,
88667
+ kind: import_core38.ClassifierKind.MIXIN,
88510
88668
  label: (0, import_platform2.getEmbeddedLabel)(data.name),
88511
88669
  icon: baseClassClass.icon
88512
88670
  },
88513
88671
  targetProjectClassId
88514
88672
  );
88515
- await client.createMixin(targetProjectClassId, import_core37.default.class.Mixin, import_core37.default.space.Model, import__.default.mixin.ProjectTypeClass, {
88673
+ await client.createMixin(targetProjectClassId, import_core38.default.class.Mixin, import_core38.default.space.Model, import__.default.mixin.ProjectTypeClass, {
88516
88674
  projectType: _id
88517
88675
  });
88518
88676
  return tmpl;
@@ -88571,22 +88729,22 @@ var require_utils16 = __commonJS({
88571
88729
  const targetClassId = `${taskId}:type:mixin`;
88572
88730
  tdata.targetClass = targetClassId;
88573
88731
  await client.createDoc(
88574
- import_core37.default.class.Mixin,
88575
- import_core37.default.space.Model,
88732
+ import_core38.default.class.Mixin,
88733
+ import_core38.default.space.Model,
88576
88734
  {
88577
88735
  extends: data.ofClass,
88578
- kind: import_core37.ClassifierKind.MIXIN,
88736
+ kind: import_core38.ClassifierKind.MIXIN,
88579
88737
  label: ofClassClass.label,
88580
88738
  icon: ofClassClass.icon
88581
88739
  },
88582
88740
  targetClassId
88583
88741
  );
88584
- await client.createMixin(targetClassId, import_core37.default.class.Mixin, import_core37.default.space.Model, import__.default.mixin.TaskTypeClass, {
88742
+ await client.createMixin(targetClassId, import_core38.default.class.Mixin, import_core38.default.space.Model, import__.default.mixin.TaskTypeClass, {
88585
88743
  taskType: taskId,
88586
88744
  projectType: _id
88587
88745
  });
88588
88746
  }
88589
- await client.createDoc(import__.default.class.TaskType, import_core37.default.space.Model, tdata, taskId);
88747
+ await client.createDoc(import__.default.class.TaskType, import_core38.default.space.Model, tdata, taskId);
88590
88748
  tasksData.set(taskId, tdata);
88591
88749
  _tasks.push(taskId);
88592
88750
  }
@@ -88597,7 +88755,7 @@ var require_utils16 = __commonJS({
88597
88755
  });
88598
88756
 
88599
88757
  // node_modules/.pnpm/@hcengineering+task@0.7.0/node_modules/@hcengineering/task/lib/index.js
88600
- var require_lib32 = __commonJS({
88758
+ var require_lib33 = __commonJS({
88601
88759
  "node_modules/.pnpm/@hcengineering+task@0.7.0/node_modules/@hcengineering/task/lib/index.js"(exports2, module2) {
88602
88760
  "use strict";
88603
88761
  var __defProp2 = Object.defineProperty;
@@ -88732,7 +88890,7 @@ var require_lib32 = __commonJS({
88732
88890
  });
88733
88891
 
88734
88892
  // node_modules/.pnpm/@hcengineering+time@0.7.0/node_modules/@hcengineering/time/lib/analytics.js
88735
- var require_analytics7 = __commonJS({
88893
+ var require_analytics8 = __commonJS({
88736
88894
  "node_modules/.pnpm/@hcengineering+time@0.7.0/node_modules/@hcengineering/time/lib/analytics.js"(exports2, module2) {
88737
88895
  "use strict";
88738
88896
  var __defProp2 = Object.defineProperty;
@@ -88767,7 +88925,7 @@ var require_analytics7 = __commonJS({
88767
88925
  });
88768
88926
 
88769
88927
  // node_modules/.pnpm/@hcengineering+time@0.7.0/node_modules/@hcengineering/time/lib/index.js
88770
- var require_lib33 = __commonJS({
88928
+ var require_lib34 = __commonJS({
88771
88929
  "node_modules/.pnpm/@hcengineering+time@0.7.0/node_modules/@hcengineering/time/lib/index.js"(exports2, module2) {
88772
88930
  "use strict";
88773
88931
  var __defProp2 = Object.defineProperty;
@@ -88796,7 +88954,7 @@ var require_lib33 = __commonJS({
88796
88954
  });
88797
88955
  module2.exports = __toCommonJS2(index_exports2);
88798
88956
  var import_platform2 = require_lib();
88799
- __reExport2(index_exports2, require_analytics7(), module2.exports);
88957
+ __reExport2(index_exports2, require_analytics8(), module2.exports);
88800
88958
  var timeId = "time";
88801
88959
  var ToDoPriority = /* @__PURE__ */ ((ToDoPriority2) => {
88802
88960
  ToDoPriority2[ToDoPriority2["High"] = 0] = "High";
@@ -94056,7 +94214,7 @@ var require_streams = __commonJS({
94056
94214
  });
94057
94215
 
94058
94216
  // node_modules/.pnpm/iconv-lite@0.7.2/node_modules/iconv-lite/lib/index.js
94059
- var require_lib34 = __commonJS({
94217
+ var require_lib35 = __commonJS({
94060
94218
  "node_modules/.pnpm/iconv-lite@0.7.2/node_modules/iconv-lite/lib/index.js"(exports2, module2) {
94061
94219
  "use strict";
94062
94220
  var Buffer2 = require_safer().Buffer;
@@ -94232,7 +94390,7 @@ var require_raw_body = __commonJS({
94232
94390
  var asyncHooks = tryRequireAsyncHooks();
94233
94391
  var bytes = require_bytes();
94234
94392
  var createError = require_http_errors();
94235
- var iconv = require_lib34();
94393
+ var iconv = require_lib35();
94236
94394
  var unpipe = require_unpipe();
94237
94395
  module2.exports = getRawBody;
94238
94396
  var ICONV_ENCODING_MESSAGE_REGEXP = /^Encoding not recognized: /;
@@ -104404,7 +104562,7 @@ var require_read = __commonJS({
104404
104562
  "use strict";
104405
104563
  var createError = require_http_errors();
104406
104564
  var getBody = require_raw_body();
104407
- var iconv = require_lib34();
104565
+ var iconv = require_lib35();
104408
104566
  var onFinished = require_on_finished();
104409
104567
  var zlib = require("node:zlib");
104410
104568
  var hasBody = require_type_is().hasBody;
@@ -107172,7 +107330,7 @@ var require_parse3 = __commonJS({
107172
107330
  });
107173
107331
 
107174
107332
  // node_modules/.pnpm/qs@6.14.2/node_modules/qs/lib/index.js
107175
- var require_lib35 = __commonJS({
107333
+ var require_lib36 = __commonJS({
107176
107334
  "node_modules/.pnpm/qs@6.14.2/node_modules/qs/lib/index.js"(exports2, module2) {
107177
107335
  "use strict";
107178
107336
  var stringify2 = require_stringify3();
@@ -107193,7 +107351,7 @@ var require_urlencoded = __commonJS({
107193
107351
  var createError = require_http_errors();
107194
107352
  var debug = require_src()("body-parser:urlencoded");
107195
107353
  var read = require_read();
107196
- var qs = require_lib35();
107354
+ var qs = require_lib36();
107197
107355
  var { normalizeOptions } = require_utils17();
107198
107356
  module2.exports = urlencoded;
107199
107357
  function urlencoded(options) {
@@ -108574,7 +108732,7 @@ var require_utils19 = __commonJS({
108574
108732
  var etag = require_etag();
108575
108733
  var mime = require_mime_types();
108576
108734
  var proxyaddr = require_proxy_addr();
108577
- var qs = require_lib35();
108735
+ var qs = require_lib36();
108578
108736
  var querystring = require("node:querystring");
108579
108737
  var { Buffer: Buffer2 } = require("node:buffer");
108580
108738
  exports2.methods = METHODS.map((method) => method.toLowerCase());
@@ -153707,6 +153865,38 @@ var AttachmentNotFoundError = class extends Schema_exports.TaggedError()(
153707
153865
  return `Attachment '${this.attachmentId}' not found`;
153708
153866
  }
153709
153867
  };
153868
+ var CardSpaceNotFoundError = class extends Schema_exports.TaggedError()(
153869
+ "CardSpaceNotFoundError",
153870
+ {
153871
+ identifier: Schema_exports.String
153872
+ }
153873
+ ) {
153874
+ get message() {
153875
+ return `Card space '${this.identifier}' not found`;
153876
+ }
153877
+ };
153878
+ var CardNotFoundError = class extends Schema_exports.TaggedError()(
153879
+ "CardNotFoundError",
153880
+ {
153881
+ identifier: Schema_exports.String,
153882
+ cardSpace: Schema_exports.String
153883
+ }
153884
+ ) {
153885
+ get message() {
153886
+ return `Card '${this.identifier}' not found in card space '${this.cardSpace}'`;
153887
+ }
153888
+ };
153889
+ var MasterTagNotFoundError = class extends Schema_exports.TaggedError()(
153890
+ "MasterTagNotFoundError",
153891
+ {
153892
+ identifier: Schema_exports.String,
153893
+ cardSpace: Schema_exports.String
153894
+ }
153895
+ ) {
153896
+ get message() {
153897
+ return `Master tag '${this.identifier}' not found in card space '${this.cardSpace}'`;
153898
+ }
153899
+ };
153710
153900
  var TagNotFoundError = class extends Schema_exports.TaggedError()(
153711
153901
  "TagNotFoundError",
153712
153902
  {
@@ -153820,6 +154010,9 @@ var HulyDomainError = Schema_exports.Union(
153820
154010
  ReactionNotFoundError,
153821
154011
  SavedMessageNotFoundError,
153822
154012
  AttachmentNotFoundError,
154013
+ CardSpaceNotFoundError,
154014
+ CardNotFoundError,
154015
+ MasterTagNotFoundError,
153823
154016
  TagNotFoundError,
153824
154017
  ComponentNotFoundError,
153825
154018
  IssueTemplateNotFoundError,
@@ -154068,7 +154261,10 @@ var ThreadReplyId = HulyRef("ThreadReplyId");
154068
154261
  var ActivityMessageId = HulyRef("ActivityMessageId");
154069
154262
  var AttachmentId = HulyRef("AttachmentId");
154070
154263
  var BlobId = HulyRef("BlobId");
154264
+ var CardId = HulyRef("CardId");
154265
+ var CardSpaceId = HulyRef("CardSpaceId");
154071
154266
  var DocumentId = HulyRef("DocumentId");
154267
+ var MasterTagId = HulyRef("MasterTagId");
154072
154268
  var TeamspaceId = HulyRef("TeamspaceId");
154073
154269
  var NotificationId = HulyRef("NotificationId");
154074
154270
  var NotificationContextId = HulyRef("NotificationContextId");
@@ -154116,7 +154312,10 @@ var MilestoneIdentifier = NonEmptyString2.pipe(Schema_exports.brand("MilestoneId
154116
154312
  var TemplateIdentifier = NonEmptyString2.pipe(Schema_exports.brand("TemplateIdentifier"));
154117
154313
  var ChannelIdentifier = NonEmptyString2.pipe(Schema_exports.brand("ChannelIdentifier"));
154118
154314
  var TeamspaceIdentifier = NonEmptyString2.pipe(Schema_exports.brand("TeamspaceIdentifier"));
154315
+ var CardIdentifier = NonEmptyString2.pipe(Schema_exports.brand("CardIdentifier"));
154316
+ var CardSpaceIdentifier = NonEmptyString2.pipe(Schema_exports.brand("CardSpaceIdentifier"));
154119
154317
  var DocumentIdentifier = NonEmptyString2.pipe(Schema_exports.brand("DocumentIdentifier"));
154318
+ var MasterTagIdentifier = NonEmptyString2.pipe(Schema_exports.brand("MasterTagIdentifier"));
154120
154319
  var TagIdentifier = NonEmptyString2.pipe(Schema_exports.brand("TagIdentifier"));
154121
154320
  var MemberReference = Schema_exports.String.pipe(Schema_exports.brand("MemberReference"));
154122
154321
 
@@ -154124,14 +154323,15 @@ var MemberReference = Schema_exports.String.pipe(Schema_exports.brand("MemberRef
154124
154323
  var activity = require_lib22().default;
154125
154324
  var attachment = require_lib23().default;
154126
154325
  var calendar = require_lib24().default;
154127
- var chunter = require_lib25().default;
154128
- var contact = require_lib26().default;
154326
+ var cardPlugin = require_lib25().default;
154327
+ var chunter = require_lib26().default;
154328
+ var contact = require_lib27().default;
154129
154329
  var core = require_lib4().default;
154130
- var documentPlugin = require_lib27().default;
154131
- var notification = require_lib28().default;
154132
- var tags = require_lib29().default;
154133
- var task = require_lib32().default;
154134
- var time = require_lib33().default;
154330
+ var documentPlugin = require_lib28().default;
154331
+ var notification = require_lib29().default;
154332
+ var tags = require_lib30().default;
154333
+ var task = require_lib33().default;
154334
+ var time = require_lib34().default;
154135
154335
  var tracker = require_lib21().default;
154136
154336
 
154137
154337
  // src/huly/operations/query-helpers.ts
@@ -173723,7 +173923,7 @@ var PostHog = class extends PostHogBackendClient {
173723
173923
  };
173724
173924
 
173725
173925
  // src/version.ts
173726
- var VERSION = true ? "0.1.39" : "0.0.0-dev";
173926
+ var VERSION = true ? "0.1.40" : "0.0.0-dev";
173727
173927
 
173728
173928
  // src/telemetry/posthog.ts
173729
173929
  var POSTHOG_API_KEY = "phc_TGfFqCGdnF0p68wuFzd5WSw1IsBvOJW0YgoMJDyZPjm";
@@ -174540,7 +174740,7 @@ var import_core21 = __toESM(require_lib4(), 1);
174540
174740
 
174541
174741
  // src/huly/operations/documents.ts
174542
174742
  var import_core20 = __toESM(require_lib4(), 1);
174543
- var import_rank = __toESM(require_lib31(), 1);
174743
+ var import_rank = __toESM(require_lib32(), 1);
174544
174744
  var findTeamspace = (identifier2) => Effect_exports.gen(function* () {
174545
174745
  const client = yield* HulyClient;
174546
174746
  const teamspace = yield* findByNameOrId(
@@ -175830,6 +176030,124 @@ var listProjectsParamsJsonSchema = JSONSchema_exports.make(ListProjectsParamsSch
175830
176030
  var parseListProjectsParams = Schema_exports.decodeUnknown(ListProjectsParamsSchema);
175831
176031
  var parseProject = Schema_exports.decodeUnknown(ProjectSchema);
175832
176032
 
176033
+ // src/domain/schemas/cards.ts
176034
+ var ListCardSpacesParamsSchema = Schema_exports.Struct({
176035
+ includeArchived: Schema_exports.optional(Schema_exports.Boolean.annotations({
176036
+ description: "Include archived card spaces in results (default: false, showing only active)"
176037
+ })),
176038
+ limit: Schema_exports.optional(
176039
+ LimitParam.annotations({
176040
+ description: "Maximum number of card spaces to return (default: 50)"
176041
+ })
176042
+ )
176043
+ }).annotations({
176044
+ title: "ListCardSpacesParams",
176045
+ description: "Parameters for listing card spaces"
176046
+ });
176047
+ var ListMasterTagsParamsSchema = Schema_exports.Struct({
176048
+ cardSpace: CardSpaceIdentifier.annotations({
176049
+ description: "Card space name or ID"
176050
+ })
176051
+ }).annotations({
176052
+ title: "ListMasterTagsParams",
176053
+ description: "Parameters for listing master tags (card types) available in a card space"
176054
+ });
176055
+ var ListCardsParamsSchema = Schema_exports.Struct({
176056
+ cardSpace: CardSpaceIdentifier.annotations({
176057
+ description: "Card space name or ID"
176058
+ }),
176059
+ type: Schema_exports.optional(MasterTagIdentifier.annotations({
176060
+ description: "Filter by master tag (card type) name or ID"
176061
+ })),
176062
+ titleSearch: Schema_exports.optional(Schema_exports.String.annotations({
176063
+ description: "Search cards by title substring (case-insensitive)"
176064
+ })),
176065
+ contentSearch: Schema_exports.optional(Schema_exports.String.annotations({
176066
+ description: "Search cards by content (fulltext search)"
176067
+ })),
176068
+ limit: Schema_exports.optional(
176069
+ LimitParam.annotations({
176070
+ description: "Maximum number of cards to return (default: 50)"
176071
+ })
176072
+ )
176073
+ }).annotations({
176074
+ title: "ListCardsParams",
176075
+ description: "Parameters for listing cards in a card space"
176076
+ });
176077
+ var GetCardParamsSchema = Schema_exports.Struct({
176078
+ cardSpace: CardSpaceIdentifier.annotations({
176079
+ description: "Card space name or ID"
176080
+ }),
176081
+ card: CardIdentifier.annotations({
176082
+ description: "Card title or ID"
176083
+ })
176084
+ }).annotations({
176085
+ title: "GetCardParams",
176086
+ description: "Parameters for getting a single card"
176087
+ });
176088
+ var CreateCardParamsSchema = Schema_exports.Struct({
176089
+ cardSpace: CardSpaceIdentifier.annotations({
176090
+ description: "Card space name or ID"
176091
+ }),
176092
+ type: MasterTagIdentifier.annotations({
176093
+ description: "Master tag (card type) name or ID"
176094
+ }),
176095
+ title: NonEmptyString2.annotations({
176096
+ description: "Card title"
176097
+ }),
176098
+ content: Schema_exports.optional(Schema_exports.String.annotations({
176099
+ description: "Card content (markdown supported)"
176100
+ })),
176101
+ parent: Schema_exports.optional(CardIdentifier.annotations({
176102
+ description: "Parent card title or ID (for creating child cards)"
176103
+ }))
176104
+ }).annotations({
176105
+ title: "CreateCardParams",
176106
+ description: "Parameters for creating a card"
176107
+ });
176108
+ var UpdateCardParamsSchema = Schema_exports.Struct({
176109
+ cardSpace: CardSpaceIdentifier.annotations({
176110
+ description: "Card space name or ID"
176111
+ }),
176112
+ card: CardIdentifier.annotations({
176113
+ description: "Card title or ID"
176114
+ }),
176115
+ title: Schema_exports.optional(NonEmptyString2.annotations({
176116
+ description: "New card title"
176117
+ })),
176118
+ content: Schema_exports.optional(Schema_exports.String.annotations({
176119
+ description: "New card content (markdown supported)"
176120
+ }))
176121
+ }).annotations({
176122
+ title: "UpdateCardParams",
176123
+ description: "Parameters for updating a card"
176124
+ });
176125
+ var DeleteCardParamsSchema = Schema_exports.Struct({
176126
+ cardSpace: CardSpaceIdentifier.annotations({
176127
+ description: "Card space name or ID"
176128
+ }),
176129
+ card: CardIdentifier.annotations({
176130
+ description: "Card title or ID"
176131
+ })
176132
+ }).annotations({
176133
+ title: "DeleteCardParams",
176134
+ description: "Parameters for deleting a card"
176135
+ });
176136
+ var listCardSpacesParamsJsonSchema = JSONSchema_exports.make(ListCardSpacesParamsSchema);
176137
+ var listMasterTagsParamsJsonSchema = JSONSchema_exports.make(ListMasterTagsParamsSchema);
176138
+ var listCardsParamsJsonSchema = JSONSchema_exports.make(ListCardsParamsSchema);
176139
+ var getCardParamsJsonSchema = JSONSchema_exports.make(GetCardParamsSchema);
176140
+ var createCardParamsJsonSchema = JSONSchema_exports.make(CreateCardParamsSchema);
176141
+ var updateCardParamsJsonSchema = JSONSchema_exports.make(UpdateCardParamsSchema);
176142
+ var deleteCardParamsJsonSchema = JSONSchema_exports.make(DeleteCardParamsSchema);
176143
+ var parseListCardSpacesParams = Schema_exports.decodeUnknown(ListCardSpacesParamsSchema);
176144
+ var parseListMasterTagsParams = Schema_exports.decodeUnknown(ListMasterTagsParamsSchema);
176145
+ var parseListCardsParams = Schema_exports.decodeUnknown(ListCardsParamsSchema);
176146
+ var parseGetCardParams = Schema_exports.decodeUnknown(GetCardParamsSchema);
176147
+ var parseCreateCardParams = Schema_exports.decodeUnknown(CreateCardParamsSchema);
176148
+ var parseUpdateCardParams = Schema_exports.decodeUnknown(UpdateCardParamsSchema);
176149
+ var parseDeleteCardParams = Schema_exports.decodeUnknown(DeleteCardParamsSchema);
176150
+
175833
176151
  // src/utils/normalize.ts
175834
176152
  var normalizeForComparison = (s) => s.replace(/[-_ ]/g, "").toLowerCase();
175835
176153
 
@@ -177565,8 +177883,365 @@ var parseUpdateUserProfileParams = Schema_exports.decodeUnknown(UpdateUserProfil
177565
177883
  var parseUpdateGuestSettingsParams = Schema_exports.decodeUnknown(UpdateGuestSettingsParamsSchema);
177566
177884
  var parseGetRegionsParams = Schema_exports.decodeUnknown(GetRegionsParamsSchema);
177567
177885
 
177568
- // src/huly/operations/channels.ts
177886
+ // src/huly/operations/cards.ts
177569
177887
  var import_core23 = __toESM(require_lib4(), 1);
177888
+ var import_rank2 = __toESM(require_lib32(), 1);
177889
+ var findCardSpace = (identifier2) => Effect_exports.gen(function* () {
177890
+ const client = yield* HulyClient;
177891
+ const cardSpace = yield* findByNameOrId(
177892
+ client,
177893
+ cardPlugin.class.CardSpace,
177894
+ { name: identifier2, archived: false },
177895
+ { _id: toRef(identifier2) }
177896
+ );
177897
+ if (cardSpace === void 0) {
177898
+ return yield* new CardSpaceNotFoundError({ identifier: identifier2 });
177899
+ }
177900
+ return { cardSpace, client };
177901
+ });
177902
+ var findCardSpaceAndCard = (params) => Effect_exports.gen(function* () {
177903
+ const { cardSpace, client } = yield* findCardSpace(params.cardSpace);
177904
+ const card = yield* findByNameOrId(
177905
+ client,
177906
+ cardPlugin.class.Card,
177907
+ { space: cardSpace._id, title: params.card },
177908
+ { space: cardSpace._id, _id: toRef(params.card) }
177909
+ );
177910
+ if (card === void 0) {
177911
+ return yield* new CardNotFoundError({
177912
+ identifier: params.card,
177913
+ cardSpace: params.cardSpace
177914
+ });
177915
+ }
177916
+ return { card, cardSpace, client };
177917
+ });
177918
+ var findMasterTag = (client, cardSpace, identifier2) => Effect_exports.gen(function* () {
177919
+ const typeRefs = cardSpace.types;
177920
+ if (typeRefs.length === 0) {
177921
+ return yield* new MasterTagNotFoundError({
177922
+ identifier: identifier2,
177923
+ cardSpace: cardSpace.name
177924
+ });
177925
+ }
177926
+ const allTags = yield* client.findAll(
177927
+ cardPlugin.class.MasterTag,
177928
+ { _id: { $in: typeRefs } }
177929
+ );
177930
+ const byName = allTags.find((t) => t.label === identifier2);
177931
+ if (byName !== void 0) return byName;
177932
+ const byId = allTags.find((t) => t._id === identifier2);
177933
+ if (byId !== void 0) return byId;
177934
+ return yield* new MasterTagNotFoundError({
177935
+ identifier: identifier2,
177936
+ cardSpace: cardSpace.name
177937
+ });
177938
+ });
177939
+ var listCardSpaces = (params) => Effect_exports.gen(function* () {
177940
+ const client = yield* HulyClient;
177941
+ const query = {};
177942
+ if (!params.includeArchived) {
177943
+ query.archived = false;
177944
+ }
177945
+ const limit = clampLimit(params.limit);
177946
+ const spaces = yield* client.findAll(
177947
+ cardPlugin.class.CardSpace,
177948
+ query,
177949
+ {
177950
+ limit,
177951
+ sort: {
177952
+ name: import_core23.SortingOrder.Ascending
177953
+ }
177954
+ }
177955
+ );
177956
+ const summaries = spaces.map((s) => ({
177957
+ id: CardSpaceId.make(s._id),
177958
+ name: s.name,
177959
+ description: s.description || void 0,
177960
+ types: s.types.map(String)
177961
+ }));
177962
+ return {
177963
+ cardSpaces: summaries,
177964
+ total: spaces.total
177965
+ };
177966
+ });
177967
+ var listMasterTags = (params) => Effect_exports.gen(function* () {
177968
+ const { cardSpace, client } = yield* findCardSpace(params.cardSpace);
177969
+ const typeRefs = cardSpace.types;
177970
+ if (typeRefs.length === 0) {
177971
+ return { masterTags: [], total: 0 };
177972
+ }
177973
+ const tags2 = yield* client.findAll(
177974
+ cardPlugin.class.MasterTag,
177975
+ { _id: { $in: typeRefs } }
177976
+ );
177977
+ const summaries = tags2.map((t) => ({
177978
+ id: MasterTagId.make(t._id),
177979
+ name: t.label
177980
+ }));
177981
+ return {
177982
+ masterTags: summaries,
177983
+ total: tags2.total
177984
+ };
177985
+ });
177986
+ var listCards = (params) => Effect_exports.gen(function* () {
177987
+ const { cardSpace, client } = yield* findCardSpace(params.cardSpace);
177988
+ const limit = clampLimit(params.limit);
177989
+ const query = {
177990
+ space: cardSpace._id
177991
+ };
177992
+ if (params.type !== void 0) {
177993
+ const masterTag = yield* findMasterTag(client, cardSpace, params.type);
177994
+ query._class = masterTag._id;
177995
+ }
177996
+ if (params.titleSearch !== void 0 && params.titleSearch.trim() !== "") {
177997
+ query.title = { $like: `%${escapeLikeWildcards(params.titleSearch)}%` };
177998
+ }
177999
+ if (params.contentSearch !== void 0 && params.contentSearch.trim() !== "") {
178000
+ query.$search = params.contentSearch;
178001
+ }
178002
+ const cards = yield* client.findAll(
178003
+ cardPlugin.class.Card,
178004
+ query,
178005
+ {
178006
+ limit,
178007
+ sort: {
178008
+ modifiedOn: import_core23.SortingOrder.Descending
178009
+ }
178010
+ }
178011
+ );
178012
+ const summaries = cards.map((c) => ({
178013
+ id: CardId.make(c._id),
178014
+ title: c.title,
178015
+ type: String(c._class),
178016
+ modifiedOn: c.modifiedOn
178017
+ }));
178018
+ return {
178019
+ cards: summaries,
178020
+ total: cards.total
178021
+ };
178022
+ });
178023
+ var getCard = (params) => Effect_exports.gen(function* () {
178024
+ const { card, cardSpace, client } = yield* findCardSpaceAndCard({
178025
+ card: params.card,
178026
+ cardSpace: params.cardSpace
178027
+ });
178028
+ let content;
178029
+ if (card.content) {
178030
+ content = yield* client.fetchMarkup(
178031
+ card._class,
178032
+ card._id,
178033
+ "content",
178034
+ card.content,
178035
+ "markdown"
178036
+ );
178037
+ }
178038
+ return {
178039
+ id: CardId.make(card._id),
178040
+ title: card.title,
178041
+ content,
178042
+ type: String(card._class),
178043
+ parent: card.parent ? String(card.parent) : void 0,
178044
+ children: card.children,
178045
+ cardSpace: cardSpace.name,
178046
+ modifiedOn: card.modifiedOn,
178047
+ createdOn: card.createdOn
178048
+ };
178049
+ });
178050
+ var createCard = (params) => Effect_exports.gen(function* () {
178051
+ const { cardSpace, client } = yield* findCardSpace(params.cardSpace);
178052
+ const masterTag = yield* findMasterTag(client, cardSpace, params.type);
178053
+ const cardId = (0, import_core23.generateId)();
178054
+ const lastCard = yield* client.findOne(
178055
+ cardPlugin.class.Card,
178056
+ { space: cardSpace._id },
178057
+ { sort: { rank: import_core23.SortingOrder.Descending } }
178058
+ );
178059
+ const rank = (0, import_rank2.makeRank)(lastCard?.rank, void 0);
178060
+ const contentMarkupRef = yield* client.uploadMarkup(
178061
+ masterTag._id,
178062
+ cardId,
178063
+ "content",
178064
+ params.content ?? "",
178065
+ "markdown"
178066
+ );
178067
+ let parentRef = null;
178068
+ let parentInfo = [];
178069
+ if (params.parent !== void 0) {
178070
+ const parentCard = yield* findByNameOrId(
178071
+ client,
178072
+ cardPlugin.class.Card,
178073
+ { space: cardSpace._id, title: params.parent },
178074
+ { space: cardSpace._id, _id: toRef(params.parent) }
178075
+ );
178076
+ if (parentCard === void 0) {
178077
+ return yield* new CardNotFoundError({
178078
+ identifier: params.parent,
178079
+ cardSpace: cardSpace.name
178080
+ });
178081
+ }
178082
+ parentRef = parentCard._id;
178083
+ parentInfo = [
178084
+ ...parentCard.parentInfo,
178085
+ { _id: parentCard._id, _class: parentCard._class, title: parentCard.title }
178086
+ ];
178087
+ }
178088
+ const cardData = {
178089
+ title: params.title,
178090
+ content: contentMarkupRef,
178091
+ blobs: {},
178092
+ parentInfo,
178093
+ parent: parentRef,
178094
+ rank
178095
+ };
178096
+ yield* client.createDoc(
178097
+ masterTag._id,
178098
+ cardSpace._id,
178099
+ cardData,
178100
+ cardId
178101
+ );
178102
+ return { id: CardId.make(cardId), title: params.title };
178103
+ });
178104
+ var updateCard = (params) => Effect_exports.gen(function* () {
178105
+ const { card, cardSpace, client } = yield* findCardSpaceAndCard({
178106
+ card: params.card,
178107
+ cardSpace: params.cardSpace
178108
+ });
178109
+ const updateOps = {};
178110
+ let contentUpdatedInPlace = false;
178111
+ if (params.title !== void 0) {
178112
+ updateOps.title = params.title;
178113
+ }
178114
+ if (params.content !== void 0) {
178115
+ if (card.content) {
178116
+ yield* client.updateMarkup(
178117
+ card._class,
178118
+ card._id,
178119
+ "content",
178120
+ params.content,
178121
+ "markdown"
178122
+ );
178123
+ contentUpdatedInPlace = true;
178124
+ } else {
178125
+ const contentMarkupRef = yield* client.uploadMarkup(
178126
+ card._class,
178127
+ card._id,
178128
+ "content",
178129
+ params.content,
178130
+ "markdown"
178131
+ );
178132
+ updateOps.content = contentMarkupRef;
178133
+ }
178134
+ }
178135
+ if (Object.keys(updateOps).length === 0 && !contentUpdatedInPlace) {
178136
+ return { id: CardId.make(card._id), updated: false };
178137
+ }
178138
+ if (Object.keys(updateOps).length > 0) {
178139
+ yield* client.updateDoc(
178140
+ card._class,
178141
+ cardSpace._id,
178142
+ card._id,
178143
+ updateOps
178144
+ );
178145
+ }
178146
+ return { id: CardId.make(card._id), updated: true };
178147
+ });
178148
+ var deleteCard = (params) => Effect_exports.gen(function* () {
178149
+ const { card, cardSpace, client } = yield* findCardSpaceAndCard({
178150
+ card: params.card,
178151
+ cardSpace: params.cardSpace
178152
+ });
178153
+ yield* client.removeDoc(
178154
+ card._class,
178155
+ cardSpace._id,
178156
+ card._id
178157
+ );
178158
+ return { id: CardId.make(card._id), deleted: true };
178159
+ });
178160
+
178161
+ // src/mcp/tools/cards.ts
178162
+ var CATEGORY4 = "cards";
178163
+ var cardTools = [
178164
+ {
178165
+ name: "list_card_spaces",
178166
+ description: "List all Huly card spaces. Returns card spaces sorted by name. Card spaces are containers for cards.",
178167
+ category: CATEGORY4,
178168
+ inputSchema: listCardSpacesParamsJsonSchema,
178169
+ handler: createToolHandler(
178170
+ "list_card_spaces",
178171
+ parseListCardSpacesParams,
178172
+ listCardSpaces
178173
+ )
178174
+ },
178175
+ {
178176
+ name: "list_master_tags",
178177
+ description: "List master tags (card types) available in a Huly card space. Master tags define the type/schema of cards that can be created in a space.",
178178
+ category: CATEGORY4,
178179
+ inputSchema: listMasterTagsParamsJsonSchema,
178180
+ handler: createToolHandler(
178181
+ "list_master_tags",
178182
+ parseListMasterTagsParams,
178183
+ listMasterTags
178184
+ )
178185
+ },
178186
+ {
178187
+ name: "list_cards",
178188
+ description: "List cards in a Huly card space. Returns cards sorted by modification date (newest first). Supports filtering by type (master tag), title substring, and content search.",
178189
+ category: CATEGORY4,
178190
+ inputSchema: listCardsParamsJsonSchema,
178191
+ handler: createToolHandler(
178192
+ "list_cards",
178193
+ parseListCardsParams,
178194
+ listCards
178195
+ )
178196
+ },
178197
+ {
178198
+ name: "get_card",
178199
+ description: "Retrieve full details for a Huly card including markdown content. Use this to view card content and metadata.",
178200
+ category: CATEGORY4,
178201
+ inputSchema: getCardParamsJsonSchema,
178202
+ handler: createToolHandler(
178203
+ "get_card",
178204
+ parseGetCardParams,
178205
+ getCard
178206
+ )
178207
+ },
178208
+ {
178209
+ name: "create_card",
178210
+ description: "Create a new card in a Huly card space. Requires a master tag (card type). Content supports markdown formatting. Returns the created card id.",
178211
+ category: CATEGORY4,
178212
+ inputSchema: createCardParamsJsonSchema,
178213
+ handler: createToolHandler(
178214
+ "create_card",
178215
+ parseCreateCardParams,
178216
+ createCard
178217
+ )
178218
+ },
178219
+ {
178220
+ name: "update_card",
178221
+ description: "Update fields on an existing Huly card. Only provided fields are modified. Content updates support markdown.",
178222
+ category: CATEGORY4,
178223
+ inputSchema: updateCardParamsJsonSchema,
178224
+ handler: createToolHandler(
178225
+ "update_card",
178226
+ parseUpdateCardParams,
178227
+ updateCard
178228
+ )
178229
+ },
178230
+ {
178231
+ name: "delete_card",
178232
+ description: "Permanently delete a Huly card. This action cannot be undone.",
178233
+ category: CATEGORY4,
178234
+ inputSchema: deleteCardParamsJsonSchema,
178235
+ handler: createToolHandler(
178236
+ "delete_card",
178237
+ parseDeleteCardParams,
178238
+ deleteCard
178239
+ )
178240
+ }
178241
+ ];
178242
+
178243
+ // src/huly/operations/channels.ts
178244
+ var import_core24 = __toESM(require_lib4(), 1);
177570
178245
  var import_text2 = __toESM(require_lib9(), 1);
177571
178246
  var import_text_markdown2 = __toESM(require_lib17(), 1);
177572
178247
  var personIdsAsSocialIdentityRefs = (ids3) => ids3;
@@ -177653,7 +178328,7 @@ var listChannels = (params) => Effect_exports.gen(function* () {
177653
178328
  {
177654
178329
  limit,
177655
178330
  sort: {
177656
- name: import_core23.SortingOrder.Ascending
178331
+ name: import_core24.SortingOrder.Ascending
177657
178332
  }
177658
178333
  }
177659
178334
  );
@@ -177695,7 +178370,7 @@ var getChannel = (params) => Effect_exports.gen(function* () {
177695
178370
  });
177696
178371
  var createChannel = (params) => Effect_exports.gen(function* () {
177697
178372
  const client = yield* HulyClient;
177698
- const channelId = (0, import_core23.generateId)();
178373
+ const channelId = (0, import_core24.generateId)();
177699
178374
  const channelData = {
177700
178375
  name: params.name,
177701
178376
  topic: params.topic || "",
@@ -177752,7 +178427,7 @@ var listChannelMessages = (params) => Effect_exports.gen(function* () {
177752
178427
  {
177753
178428
  limit,
177754
178429
  sort: {
177755
- createdOn: import_core23.SortingOrder.Descending
178430
+ createdOn: import_core24.SortingOrder.Descending
177756
178431
  }
177757
178432
  }
177758
178433
  );
@@ -177780,7 +178455,7 @@ var listChannelMessages = (params) => Effect_exports.gen(function* () {
177780
178455
  });
177781
178456
  var sendChannelMessage = (params) => Effect_exports.gen(function* () {
177782
178457
  const { channel, client } = yield* findChannel(params.channel);
177783
- const messageId = (0, import_core23.generateId)();
178458
+ const messageId = (0, import_core24.generateId)();
177784
178459
  const markup = markdownToMarkupString(params.body);
177785
178460
  const messageData = {
177786
178461
  message: markup,
@@ -177806,7 +178481,7 @@ var listDirectMessages = (params) => Effect_exports.gen(function* () {
177806
178481
  {
177807
178482
  limit,
177808
178483
  sort: {
177809
- modifiedOn: import_core23.SortingOrder.Descending
178484
+ modifiedOn: import_core24.SortingOrder.Descending
177810
178485
  }
177811
178486
  }
177812
178487
  );
@@ -177832,7 +178507,7 @@ var listDirectMessages = (params) => Effect_exports.gen(function* () {
177832
178507
  });
177833
178508
 
177834
178509
  // src/huly/operations/threads.ts
177835
- var import_core24 = __toESM(require_lib4(), 1);
178510
+ var import_core25 = __toESM(require_lib4(), 1);
177836
178511
  var findMessage = (channelIdentifier, messageId) => Effect_exports.gen(function* () {
177837
178512
  const { channel, client } = yield* findChannel(channelIdentifier);
177838
178513
  const message = yield* client.findOne(
@@ -177876,7 +178551,7 @@ var listThreadReplies = (params) => Effect_exports.gen(function* () {
177876
178551
  {
177877
178552
  limit,
177878
178553
  sort: {
177879
- createdOn: import_core24.SortingOrder.Ascending
178554
+ createdOn: import_core25.SortingOrder.Ascending
177880
178555
  }
177881
178556
  }
177882
178557
  );
@@ -177903,7 +178578,7 @@ var listThreadReplies = (params) => Effect_exports.gen(function* () {
177903
178578
  });
177904
178579
  var addThreadReply = (params) => Effect_exports.gen(function* () {
177905
178580
  const { channel, client, message } = yield* findMessage(params.channel, params.messageId);
177906
- const replyId = (0, import_core24.generateId)();
178581
+ const replyId = (0, import_core25.generateId)();
177907
178582
  const markup = markdownToMarkupString(params.body);
177908
178583
  const replyData = {
177909
178584
  message: markup,
@@ -177954,12 +178629,12 @@ var deleteThreadReply = (params) => Effect_exports.gen(function* () {
177954
178629
  });
177955
178630
 
177956
178631
  // src/mcp/tools/channels.ts
177957
- var CATEGORY4 = "channels";
178632
+ var CATEGORY5 = "channels";
177958
178633
  var channelTools = [
177959
178634
  {
177960
178635
  name: "list_channels",
177961
178636
  description: "List all Huly channels. Returns channels sorted by name. Supports filtering by archived status. Supports searching by name substring (nameSearch) and topic substring (topicSearch).",
177962
- category: CATEGORY4,
178637
+ category: CATEGORY5,
177963
178638
  inputSchema: listChannelsParamsJsonSchema,
177964
178639
  handler: createToolHandler(
177965
178640
  "list_channels",
@@ -177970,7 +178645,7 @@ var channelTools = [
177970
178645
  {
177971
178646
  name: "get_channel",
177972
178647
  description: "Retrieve full details for a Huly channel including topic and member list.",
177973
- category: CATEGORY4,
178648
+ category: CATEGORY5,
177974
178649
  inputSchema: getChannelParamsJsonSchema,
177975
178650
  handler: createToolHandler(
177976
178651
  "get_channel",
@@ -177981,7 +178656,7 @@ var channelTools = [
177981
178656
  {
177982
178657
  name: "create_channel",
177983
178658
  description: "Create a new channel in Huly. Returns the created channel ID and name.",
177984
- category: CATEGORY4,
178659
+ category: CATEGORY5,
177985
178660
  inputSchema: createChannelParamsJsonSchema,
177986
178661
  handler: createToolHandler(
177987
178662
  "create_channel",
@@ -177992,7 +178667,7 @@ var channelTools = [
177992
178667
  {
177993
178668
  name: "update_channel",
177994
178669
  description: "Update fields on an existing Huly channel. Only provided fields are modified.",
177995
- category: CATEGORY4,
178670
+ category: CATEGORY5,
177996
178671
  inputSchema: updateChannelParamsJsonSchema,
177997
178672
  handler: createToolHandler(
177998
178673
  "update_channel",
@@ -178003,7 +178678,7 @@ var channelTools = [
178003
178678
  {
178004
178679
  name: "delete_channel",
178005
178680
  description: "Permanently delete a Huly channel. This action cannot be undone.",
178006
- category: CATEGORY4,
178681
+ category: CATEGORY5,
178007
178682
  inputSchema: deleteChannelParamsJsonSchema,
178008
178683
  handler: createToolHandler(
178009
178684
  "delete_channel",
@@ -178014,7 +178689,7 @@ var channelTools = [
178014
178689
  {
178015
178690
  name: "list_channel_messages",
178016
178691
  description: "List messages in a Huly channel. Returns messages sorted by date (newest first).",
178017
- category: CATEGORY4,
178692
+ category: CATEGORY5,
178018
178693
  inputSchema: listChannelMessagesParamsJsonSchema,
178019
178694
  handler: createToolHandler(
178020
178695
  "list_channel_messages",
@@ -178025,7 +178700,7 @@ var channelTools = [
178025
178700
  {
178026
178701
  name: "send_channel_message",
178027
178702
  description: "Send a message to a Huly channel. Message body supports markdown formatting.",
178028
- category: CATEGORY4,
178703
+ category: CATEGORY5,
178029
178704
  inputSchema: sendChannelMessageParamsJsonSchema,
178030
178705
  handler: createToolHandler(
178031
178706
  "send_channel_message",
@@ -178036,7 +178711,7 @@ var channelTools = [
178036
178711
  {
178037
178712
  name: "list_direct_messages",
178038
178713
  description: "List direct message conversations in Huly. Returns conversations sorted by date (newest first).",
178039
- category: CATEGORY4,
178714
+ category: CATEGORY5,
178040
178715
  inputSchema: listDirectMessagesParamsJsonSchema,
178041
178716
  handler: createToolHandler(
178042
178717
  "list_direct_messages",
@@ -178047,7 +178722,7 @@ var channelTools = [
178047
178722
  {
178048
178723
  name: "list_thread_replies",
178049
178724
  description: "List replies in a message thread. Returns replies sorted by date (oldest first).",
178050
- category: CATEGORY4,
178725
+ category: CATEGORY5,
178051
178726
  inputSchema: listThreadRepliesParamsJsonSchema,
178052
178727
  handler: createToolHandler(
178053
178728
  "list_thread_replies",
@@ -178058,7 +178733,7 @@ var channelTools = [
178058
178733
  {
178059
178734
  name: "add_thread_reply",
178060
178735
  description: "Add a reply to a message thread. Reply body supports markdown formatting.",
178061
- category: CATEGORY4,
178736
+ category: CATEGORY5,
178062
178737
  inputSchema: addThreadReplyParamsJsonSchema,
178063
178738
  handler: createToolHandler(
178064
178739
  "add_thread_reply",
@@ -178069,7 +178744,7 @@ var channelTools = [
178069
178744
  {
178070
178745
  name: "update_thread_reply",
178071
178746
  description: "Update a thread reply. Only the body can be modified.",
178072
- category: CATEGORY4,
178747
+ category: CATEGORY5,
178073
178748
  inputSchema: updateThreadReplyParamsJsonSchema,
178074
178749
  handler: createToolHandler(
178075
178750
  "update_thread_reply",
@@ -178080,7 +178755,7 @@ var channelTools = [
178080
178755
  {
178081
178756
  name: "delete_thread_reply",
178082
178757
  description: "Permanently delete a thread reply. This action cannot be undone.",
178083
- category: CATEGORY4,
178758
+ category: CATEGORY5,
178084
178759
  inputSchema: deleteThreadReplyParamsJsonSchema,
178085
178760
  handler: createToolHandler(
178086
178761
  "delete_thread_reply",
@@ -178091,7 +178766,7 @@ var channelTools = [
178091
178766
  ];
178092
178767
 
178093
178768
  // src/huly/operations/comments.ts
178094
- var import_core25 = __toESM(require_lib4(), 1);
178769
+ var import_core26 = __toESM(require_lib4(), 1);
178095
178770
  var findProjectAndIssue2 = (params) => findProjectAndIssue({ project: params.project, identifier: params.issueIdentifier });
178096
178771
  var findComment = (params) => Effect_exports.gen(function* () {
178097
178772
  const { client, issue: issue2, project: project3 } = yield* findProjectAndIssue2({
@@ -178129,7 +178804,7 @@ var listComments = (params) => Effect_exports.gen(function* () {
178129
178804
  {
178130
178805
  limit,
178131
178806
  sort: {
178132
- createdOn: import_core25.SortingOrder.Ascending
178807
+ createdOn: import_core26.SortingOrder.Ascending
178133
178808
  }
178134
178809
  }
178135
178810
  );
@@ -178148,7 +178823,7 @@ var addComment = (params) => Effect_exports.gen(function* () {
178148
178823
  project: params.project,
178149
178824
  issueIdentifier: params.issueIdentifier
178150
178825
  });
178151
- const commentId = (0, import_core25.generateId)();
178826
+ const commentId = (0, import_core26.generateId)();
178152
178827
  const commentData = {
178153
178828
  message: params.body
178154
178829
  };
@@ -178206,12 +178881,12 @@ var deleteComment = (params) => Effect_exports.gen(function* () {
178206
178881
  });
178207
178882
 
178208
178883
  // src/mcp/tools/comments.ts
178209
- var CATEGORY5 = "comments";
178884
+ var CATEGORY6 = "comments";
178210
178885
  var commentTools = [
178211
178886
  {
178212
178887
  name: "list_comments",
178213
178888
  description: "List comments on a Huly issue. Returns comments sorted by creation date (oldest first).",
178214
- category: CATEGORY5,
178889
+ category: CATEGORY6,
178215
178890
  inputSchema: listCommentsParamsJsonSchema,
178216
178891
  handler: createToolHandler(
178217
178892
  "list_comments",
@@ -178222,7 +178897,7 @@ var commentTools = [
178222
178897
  {
178223
178898
  name: "add_comment",
178224
178899
  description: "Add a comment to a Huly issue. Comment body supports markdown formatting.",
178225
- category: CATEGORY5,
178900
+ category: CATEGORY6,
178226
178901
  inputSchema: addCommentParamsJsonSchema,
178227
178902
  handler: createToolHandler(
178228
178903
  "add_comment",
@@ -178233,7 +178908,7 @@ var commentTools = [
178233
178908
  {
178234
178909
  name: "update_comment",
178235
178910
  description: "Update an existing comment on a Huly issue. Comment body supports markdown formatting.",
178236
- category: CATEGORY5,
178911
+ category: CATEGORY6,
178237
178912
  inputSchema: updateCommentParamsJsonSchema,
178238
178913
  handler: createToolHandler(
178239
178914
  "update_comment",
@@ -178244,7 +178919,7 @@ var commentTools = [
178244
178919
  {
178245
178920
  name: "delete_comment",
178246
178921
  description: "Delete a comment from a Huly issue. This action cannot be undone.",
178247
- category: CATEGORY5,
178922
+ category: CATEGORY6,
178248
178923
  inputSchema: deleteCommentParamsJsonSchema,
178249
178924
  handler: createToolHandler(
178250
178925
  "delete_comment",
@@ -178255,8 +178930,8 @@ var commentTools = [
178255
178930
  ];
178256
178931
 
178257
178932
  // src/huly/operations/contacts.ts
178258
- var import_contact = __toESM(require_lib26(), 1);
178259
- var import_core26 = __toESM(require_lib4(), 1);
178933
+ var import_contact = __toESM(require_lib27(), 1);
178934
+ var import_core27 = __toESM(require_lib4(), 1);
178260
178935
  var formatName = (firstName, lastName) => `${lastName},${firstName}`;
178261
178936
  var parseName = (name) => {
178262
178937
  const parts2 = name.split(",");
@@ -178315,7 +178990,7 @@ var listPersons = (params) => Effect_exports.gen(function* () {
178315
178990
  query,
178316
178991
  {
178317
178992
  limit,
178318
- sort: { modifiedOn: import_core26.SortingOrder.Descending }
178993
+ sort: { modifiedOn: import_core27.SortingOrder.Descending }
178319
178994
  }
178320
178995
  );
178321
178996
  const personIds = persons.map((p) => p._id);
@@ -178385,7 +179060,7 @@ var getPerson = (params) => Effect_exports.gen(function* () {
178385
179060
  });
178386
179061
  var createPerson = (params) => Effect_exports.gen(function* () {
178387
179062
  const client = yield* HulyClient;
178388
- const personId = (0, import_core26.generateId)();
179063
+ const personId = (0, import_core27.generateId)();
178389
179064
  const personData = {
178390
179065
  name: formatName(params.firstName, params.lastName),
178391
179066
  // Huly API requires city field to be set, even if empty
@@ -178461,7 +179136,7 @@ var listEmployees = (params) => Effect_exports.gen(function* () {
178461
179136
  {},
178462
179137
  {
178463
179138
  limit,
178464
- sort: { modifiedOn: import_core26.SortingOrder.Descending }
179139
+ sort: { modifiedOn: import_core27.SortingOrder.Descending }
178465
179140
  }
178466
179141
  );
178467
179142
  const employeeIds = employees.map((e) => e._id);
@@ -178486,7 +179161,7 @@ var listOrganizations = (params) => Effect_exports.gen(function* () {
178486
179161
  {},
178487
179162
  {
178488
179163
  limit,
178489
- sort: { modifiedOn: import_core26.SortingOrder.Descending }
179164
+ sort: { modifiedOn: import_core27.SortingOrder.Descending }
178490
179165
  }
178491
179166
  );
178492
179167
  return orgs.map((org) => ({
@@ -178499,7 +179174,7 @@ var listOrganizations = (params) => Effect_exports.gen(function* () {
178499
179174
  });
178500
179175
  var createOrganization = (params) => Effect_exports.gen(function* () {
178501
179176
  const client = yield* HulyClient;
178502
- const orgId = (0, import_core26.generateId)();
179177
+ const orgId = (0, import_core27.generateId)();
178503
179178
  const orgData = {
178504
179179
  name: params.name,
178505
179180
  city: "",
@@ -178541,12 +179216,12 @@ var createOrganization = (params) => Effect_exports.gen(function* () {
178541
179216
  });
178542
179217
 
178543
179218
  // src/mcp/tools/contacts.ts
178544
- var CATEGORY6 = "contacts";
179219
+ var CATEGORY7 = "contacts";
178545
179220
  var contactTools = [
178546
179221
  {
178547
179222
  name: "list_persons",
178548
179223
  description: "List all persons in the Huly workspace. Returns persons sorted by modification date (newest first). Supports searching by name substring (nameSearch) and email substring (emailSearch).",
178549
- category: CATEGORY6,
179224
+ category: CATEGORY7,
178550
179225
  inputSchema: listPersonsParamsJsonSchema,
178551
179226
  handler: createToolHandler(
178552
179227
  "list_persons",
@@ -178557,7 +179232,7 @@ var contactTools = [
178557
179232
  {
178558
179233
  name: "get_person",
178559
179234
  description: "Retrieve full details for a person including contact channels. Use personId or email to identify the person.",
178560
- category: CATEGORY6,
179235
+ category: CATEGORY7,
178561
179236
  inputSchema: getPersonParamsJsonSchema,
178562
179237
  handler: createToolHandler(
178563
179238
  "get_person",
@@ -178568,7 +179243,7 @@ var contactTools = [
178568
179243
  {
178569
179244
  name: "create_person",
178570
179245
  description: "Create a new person in Huly. Returns the created person ID.",
178571
- category: CATEGORY6,
179246
+ category: CATEGORY7,
178572
179247
  inputSchema: createPersonParamsJsonSchema,
178573
179248
  handler: createToolHandler(
178574
179249
  "create_person",
@@ -178579,7 +179254,7 @@ var contactTools = [
178579
179254
  {
178580
179255
  name: "update_person",
178581
179256
  description: "Update fields on an existing person. Only provided fields are modified.",
178582
- category: CATEGORY6,
179257
+ category: CATEGORY7,
178583
179258
  inputSchema: updatePersonParamsJsonSchema,
178584
179259
  handler: createToolHandler(
178585
179260
  "update_person",
@@ -178590,7 +179265,7 @@ var contactTools = [
178590
179265
  {
178591
179266
  name: "delete_person",
178592
179267
  description: "Permanently delete a person from Huly. This action cannot be undone.",
178593
- category: CATEGORY6,
179268
+ category: CATEGORY7,
178594
179269
  inputSchema: deletePersonParamsJsonSchema,
178595
179270
  handler: createToolHandler(
178596
179271
  "delete_person",
@@ -178601,7 +179276,7 @@ var contactTools = [
178601
179276
  {
178602
179277
  name: "list_employees",
178603
179278
  description: "List employees (persons who are team members). Returns employees sorted by modification date (newest first).",
178604
- category: CATEGORY6,
179279
+ category: CATEGORY7,
178605
179280
  inputSchema: listEmployeesParamsJsonSchema,
178606
179281
  handler: createToolHandler(
178607
179282
  "list_employees",
@@ -178612,7 +179287,7 @@ var contactTools = [
178612
179287
  {
178613
179288
  name: "list_organizations",
178614
179289
  description: "List all organizations in the Huly workspace. Returns organizations sorted by modification date (newest first).",
178615
- category: CATEGORY6,
179290
+ category: CATEGORY7,
178616
179291
  inputSchema: listOrganizationsParamsJsonSchema,
178617
179292
  handler: createToolHandler(
178618
179293
  "list_organizations",
@@ -178623,7 +179298,7 @@ var contactTools = [
178623
179298
  {
178624
179299
  name: "create_organization",
178625
179300
  description: "Create a new organization in Huly. Optionally add members by person ID or email. Returns the created organization ID.",
178626
- category: CATEGORY6,
179301
+ category: CATEGORY7,
178627
179302
  inputSchema: createOrganizationParamsJsonSchema,
178628
179303
  handler: createToolHandler(
178629
179304
  "create_organization",
@@ -178634,7 +179309,7 @@ var contactTools = [
178634
179309
  ];
178635
179310
 
178636
179311
  // src/huly/operations/components.ts
178637
- var import_core27 = __toESM(require_lib4(), 1);
179312
+ var import_core28 = __toESM(require_lib4(), 1);
178638
179313
 
178639
179314
  // src/utils/assertions.ts
178640
179315
  var AssertionError = class extends Error {
@@ -178691,7 +179366,7 @@ var listComponents = (params) => Effect_exports.gen(function* () {
178691
179366
  { space: project3._id },
178692
179367
  {
178693
179368
  limit,
178694
- sort: { modifiedOn: import_core27.SortingOrder.Descending }
179369
+ sort: { modifiedOn: import_core28.SortingOrder.Descending }
178695
179370
  }
178696
179371
  );
178697
179372
  const leadIds = [
@@ -178740,7 +179415,7 @@ var getComponent = (params) => Effect_exports.gen(function* () {
178740
179415
  });
178741
179416
  var createComponent = (params) => Effect_exports.gen(function* () {
178742
179417
  const { client, project: project3 } = yield* findProject(params.project);
178743
- const componentId = (0, import_core27.generateId)();
179418
+ const componentId = (0, import_core28.generateId)();
178744
179419
  let leadRef = null;
178745
179420
  if (params.lead !== void 0) {
178746
179421
  const person = yield* findPersonByEmailOrName(client, params.lead);
@@ -178981,12 +179656,12 @@ var previewDeletion = (params) => {
178981
179656
  };
178982
179657
 
178983
179658
  // src/mcp/tools/deletion.ts
178984
- var CATEGORY7 = "issues";
179659
+ var CATEGORY8 = "issues";
178985
179660
  var deletionTools = [
178986
179661
  {
178987
179662
  name: "preview_deletion",
178988
179663
  description: "Preview the impact of deleting a Huly entity before actually deleting it. Shows affected sub-entities, relations, and warnings. Supports issues, projects, components, and milestones. Use this to understand cascade effects before calling a delete operation.",
178989
- category: CATEGORY7,
179664
+ category: CATEGORY8,
178990
179665
  inputSchema: previewDeletionParamsJsonSchema,
178991
179666
  handler: createToolHandler(
178992
179667
  "preview_deletion",
@@ -178997,12 +179672,12 @@ var deletionTools = [
178997
179672
  ];
178998
179673
 
178999
179674
  // src/mcp/tools/documents.ts
179000
- var CATEGORY8 = "documents";
179675
+ var CATEGORY9 = "documents";
179001
179676
  var documentTools = [
179002
179677
  {
179003
179678
  name: "list_teamspaces",
179004
179679
  description: "List all Huly document teamspaces. Returns teamspaces sorted by name. Supports filtering by archived status.",
179005
- category: CATEGORY8,
179680
+ category: CATEGORY9,
179006
179681
  inputSchema: listTeamspacesParamsJsonSchema,
179007
179682
  handler: createToolHandler(
179008
179683
  "list_teamspaces",
@@ -179013,7 +179688,7 @@ var documentTools = [
179013
179688
  {
179014
179689
  name: "list_documents",
179015
179690
  description: "List documents in a Huly teamspace. Returns documents sorted by modification date (newest first). Supports searching by title substring (titleSearch) and content (contentSearch).",
179016
- category: CATEGORY8,
179691
+ category: CATEGORY9,
179017
179692
  inputSchema: listDocumentsParamsJsonSchema,
179018
179693
  handler: createToolHandler(
179019
179694
  "list_documents",
@@ -179024,7 +179699,7 @@ var documentTools = [
179024
179699
  {
179025
179700
  name: "get_document",
179026
179701
  description: "Retrieve full details for a Huly document including markdown content. Use this to view document content and metadata.",
179027
- category: CATEGORY8,
179702
+ category: CATEGORY9,
179028
179703
  inputSchema: getDocumentParamsJsonSchema,
179029
179704
  handler: createToolHandler(
179030
179705
  "get_document",
@@ -179035,7 +179710,7 @@ var documentTools = [
179035
179710
  {
179036
179711
  name: "create_document",
179037
179712
  description: "Create a new document in a Huly teamspace. Content supports markdown formatting. Returns the created document id.",
179038
- category: CATEGORY8,
179713
+ category: CATEGORY9,
179039
179714
  inputSchema: createDocumentParamsJsonSchema,
179040
179715
  handler: createToolHandler(
179041
179716
  "create_document",
@@ -179046,7 +179721,7 @@ var documentTools = [
179046
179721
  {
179047
179722
  name: "update_document",
179048
179723
  description: "Update fields on an existing Huly document. Only provided fields are modified. Content updates support markdown.",
179049
- category: CATEGORY8,
179724
+ category: CATEGORY9,
179050
179725
  inputSchema: updateDocumentParamsJsonSchema,
179051
179726
  handler: createToolHandler(
179052
179727
  "update_document",
@@ -179057,7 +179732,7 @@ var documentTools = [
179057
179732
  {
179058
179733
  name: "delete_document",
179059
179734
  description: "Permanently delete a Huly document. This action cannot be undone.",
179060
- category: CATEGORY8,
179735
+ category: CATEGORY9,
179061
179736
  inputSchema: deleteDocumentParamsJsonSchema,
179062
179737
  handler: createToolHandler(
179063
179738
  "delete_document",
@@ -179068,11 +179743,11 @@ var documentTools = [
179068
179743
  ];
179069
179744
 
179070
179745
  // src/huly/operations/issue-templates.ts
179071
- var import_core29 = __toESM(require_lib4(), 1);
179746
+ var import_core30 = __toESM(require_lib4(), 1);
179072
179747
 
179073
179748
  // src/huly/operations/issues.ts
179074
- var import_core28 = __toESM(require_lib4(), 1);
179075
- var import_rank2 = __toESM(require_lib31(), 1);
179749
+ var import_core29 = __toESM(require_lib4(), 1);
179750
+ var import_rank3 = __toESM(require_lib32(), 1);
179076
179751
  var import_tracker2 = __toESM(require_lib21(), 1);
179077
179752
  var TxIncResult = Schema_exports.Struct({
179078
179753
  object: Schema_exports.Struct({
@@ -179171,7 +179846,7 @@ var listIssues = (params) => Effect_exports.gen(function* () {
179171
179846
  {
179172
179847
  limit,
179173
179848
  sort: {
179174
- modifiedOn: import_core28.SortingOrder.Descending
179849
+ modifiedOn: import_core29.SortingOrder.Descending
179175
179850
  }
179176
179851
  },
179177
179852
  { assignee: contact.class.Person }
@@ -179257,7 +179932,7 @@ var createIssue = (params) => Effect_exports.gen(function* () {
179257
179932
  statuses: []
179258
179933
  }));
179259
179934
  const { client, project: project3, statuses } = result;
179260
- const issueId = (0, import_core28.generateId)();
179935
+ const issueId = (0, import_core29.generateId)();
179261
179936
  const incOps = { $inc: { sequence: 1 } };
179262
179937
  const incResult = yield* client.updateDoc(
179263
179938
  tracker.class.Project,
@@ -179279,9 +179954,9 @@ var createIssue = (params) => Effect_exports.gen(function* () {
179279
179954
  const lastIssue = yield* client.findOne(
179280
179955
  tracker.class.Issue,
179281
179956
  { space: project3._id },
179282
- { sort: { rank: import_core28.SortingOrder.Descending } }
179957
+ { sort: { rank: import_core29.SortingOrder.Descending } }
179283
179958
  );
179284
- const rank = (0, import_rank2.makeRank)(lastIssue?.rank, void 0);
179959
+ const rank = (0, import_rank3.makeRank)(lastIssue?.rank, void 0);
179285
179960
  let descriptionMarkupRef = null;
179286
179961
  if (params.description !== void 0 && params.description.trim() !== "") {
179287
179962
  descriptionMarkupRef = yield* client.uploadMarkup(
@@ -179431,7 +180106,7 @@ var addLabel = (params) => Effect_exports.gen(function* () {
179431
180106
  }
179432
180107
  );
179433
180108
  if (tagElement === void 0) {
179434
- const tagElementId = (0, import_core28.generateId)();
180109
+ const tagElementId = (0, import_core29.generateId)();
179435
180110
  const tagElementData = {
179436
180111
  title: labelTitle,
179437
180112
  description: "",
@@ -179517,7 +180192,7 @@ var listIssueTemplates = (params) => Effect_exports.gen(function* () {
179517
180192
  { space: project3._id },
179518
180193
  {
179519
180194
  limit,
179520
- sort: { modifiedOn: import_core29.SortingOrder.Descending }
180195
+ sort: { modifiedOn: import_core30.SortingOrder.Descending }
179521
180196
  }
179522
180197
  );
179523
180198
  const summaries = templates.map((t) => ({
@@ -179566,7 +180241,7 @@ var getIssueTemplate = (params) => Effect_exports.gen(function* () {
179566
180241
  });
179567
180242
  var createIssueTemplate = (params) => Effect_exports.gen(function* () {
179568
180243
  const { client, project: project3 } = yield* findProject(params.project);
179569
- const templateId = (0, import_core29.generateId)();
180244
+ const templateId = (0, import_core30.generateId)();
179570
180245
  let assigneeRef = null;
179571
180246
  if (params.assignee !== void 0) {
179572
180247
  const person = yield* findPersonByEmailOrName(client, params.assignee);
@@ -179708,7 +180383,7 @@ var deleteIssueTemplate = (params) => Effect_exports.gen(function* () {
179708
180383
  });
179709
180384
 
179710
180385
  // src/huly/operations/labels.ts
179711
- var import_core30 = __toESM(require_lib4(), 1);
180386
+ var import_core31 = __toESM(require_lib4(), 1);
179712
180387
  var issueClassRef = toRef(tracker.class.Issue);
179713
180388
  var findTagByIdOrTitle = (client, idOrTitle) => Effect_exports.gen(function* () {
179714
180389
  let tag2 = yield* client.findOne(
@@ -179744,7 +180419,7 @@ var listLabels = (params) => Effect_exports.gen(function* () {
179744
180419
  { targetClass: issueClassRef },
179745
180420
  {
179746
180421
  limit,
179747
- sort: { modifiedOn: import_core30.SortingOrder.Descending }
180422
+ sort: { modifiedOn: import_core31.SortingOrder.Descending }
179748
180423
  }
179749
180424
  );
179750
180425
  return elements.map((e) => ({
@@ -179767,7 +180442,7 @@ var createLabel = (params) => Effect_exports.gen(function* () {
179767
180442
  if (existing !== void 0) {
179768
180443
  return { id: TagElementId.make(existing._id), title: existing.title, created: false };
179769
180444
  }
179770
- const tagId = (0, import_core30.generateId)();
180445
+ const tagId = (0, import_core31.generateId)();
179771
180446
  const color = params.color ?? 0;
179772
180447
  const tagData = {
179773
180448
  title: params.title,
@@ -180002,12 +180677,12 @@ var listIssueRelations = (params) => Effect_exports.gen(function* () {
180002
180677
  });
180003
180678
 
180004
180679
  // src/mcp/tools/issues.ts
180005
- var CATEGORY9 = "issues";
180680
+ var CATEGORY10 = "issues";
180006
180681
  var issueTools = [
180007
180682
  {
180008
180683
  name: "list_issues",
180009
180684
  description: "Query Huly issues with optional filters. Returns issues sorted by modification date (newest first). Supports filtering by project, status, assignee, and milestone. Supports searching by title substring (titleSearch) and description content (descriptionSearch).",
180010
- category: CATEGORY9,
180685
+ category: CATEGORY10,
180011
180686
  inputSchema: listIssuesParamsJsonSchema,
180012
180687
  handler: createToolHandler(
180013
180688
  "list_issues",
@@ -180018,7 +180693,7 @@ var issueTools = [
180018
180693
  {
180019
180694
  name: "get_issue",
180020
180695
  description: "Retrieve full details for a Huly issue including markdown description. Use this to view issue content, comments, or full metadata.",
180021
- category: CATEGORY9,
180696
+ category: CATEGORY10,
180022
180697
  inputSchema: getIssueParamsJsonSchema,
180023
180698
  handler: createToolHandler(
180024
180699
  "get_issue",
@@ -180029,7 +180704,7 @@ var issueTools = [
180029
180704
  {
180030
180705
  name: "create_issue",
180031
180706
  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.",
180032
- category: CATEGORY9,
180707
+ category: CATEGORY10,
180033
180708
  inputSchema: createIssueParamsJsonSchema,
180034
180709
  handler: createToolHandler(
180035
180710
  "create_issue",
@@ -180040,7 +180715,7 @@ var issueTools = [
180040
180715
  {
180041
180716
  name: "update_issue",
180042
180717
  description: "Update fields on an existing Huly issue. Only provided fields are modified. Description updates support markdown.",
180043
- category: CATEGORY9,
180718
+ category: CATEGORY10,
180044
180719
  inputSchema: updateIssueParamsJsonSchema,
180045
180720
  handler: createToolHandler(
180046
180721
  "update_issue",
@@ -180051,7 +180726,7 @@ var issueTools = [
180051
180726
  {
180052
180727
  name: "add_issue_label",
180053
180728
  description: "Add a tag/label to a Huly issue. Creates the tag if it doesn't exist in the project.",
180054
- category: CATEGORY9,
180729
+ category: CATEGORY10,
180055
180730
  inputSchema: addLabelParamsJsonSchema,
180056
180731
  handler: createToolHandler(
180057
180732
  "add_issue_label",
@@ -180062,7 +180737,7 @@ var issueTools = [
180062
180737
  {
180063
180738
  name: "remove_issue_label",
180064
180739
  description: "Remove a tag/label from a Huly issue. Detaches the label reference; does not delete the label definition.",
180065
- category: CATEGORY9,
180740
+ category: CATEGORY10,
180066
180741
  inputSchema: removeLabelParamsJsonSchema,
180067
180742
  handler: createToolHandler(
180068
180743
  "remove_issue_label",
@@ -180073,7 +180748,7 @@ var issueTools = [
180073
180748
  {
180074
180749
  name: "delete_issue",
180075
180750
  description: "Permanently delete a Huly issue. This action cannot be undone.",
180076
- category: CATEGORY9,
180751
+ category: CATEGORY10,
180077
180752
  inputSchema: deleteIssueParamsJsonSchema,
180078
180753
  handler: createToolHandler(
180079
180754
  "delete_issue",
@@ -180084,7 +180759,7 @@ var issueTools = [
180084
180759
  {
180085
180760
  name: "list_components",
180086
180761
  description: "List components in a Huly project. Components organize issues by area/feature. Returns components sorted by modification date (newest first).",
180087
- category: CATEGORY9,
180762
+ category: CATEGORY10,
180088
180763
  inputSchema: listComponentsParamsJsonSchema,
180089
180764
  handler: createToolHandler(
180090
180765
  "list_components",
@@ -180095,7 +180770,7 @@ var issueTools = [
180095
180770
  {
180096
180771
  name: "get_component",
180097
180772
  description: "Retrieve full details for a Huly component. Use this to view component content and metadata.",
180098
- category: CATEGORY9,
180773
+ category: CATEGORY10,
180099
180774
  inputSchema: getComponentParamsJsonSchema,
180100
180775
  handler: createToolHandler(
180101
180776
  "get_component",
@@ -180106,7 +180781,7 @@ var issueTools = [
180106
180781
  {
180107
180782
  name: "create_component",
180108
180783
  description: "Create a new component in a Huly project. Components help organize issues by area/feature. Returns the created component ID and label.",
180109
- category: CATEGORY9,
180784
+ category: CATEGORY10,
180110
180785
  inputSchema: createComponentParamsJsonSchema,
180111
180786
  handler: createToolHandler(
180112
180787
  "create_component",
@@ -180117,7 +180792,7 @@ var issueTools = [
180117
180792
  {
180118
180793
  name: "update_component",
180119
180794
  description: "Update fields on an existing Huly component. Only provided fields are modified.",
180120
- category: CATEGORY9,
180795
+ category: CATEGORY10,
180121
180796
  inputSchema: updateComponentParamsJsonSchema,
180122
180797
  handler: createToolHandler(
180123
180798
  "update_component",
@@ -180128,7 +180803,7 @@ var issueTools = [
180128
180803
  {
180129
180804
  name: "set_issue_component",
180130
180805
  description: "Set or clear the component on a Huly issue. Pass null for component to clear it.",
180131
- category: CATEGORY9,
180806
+ category: CATEGORY10,
180132
180807
  inputSchema: setIssueComponentParamsJsonSchema,
180133
180808
  handler: createToolHandler(
180134
180809
  "set_issue_component",
@@ -180139,7 +180814,7 @@ var issueTools = [
180139
180814
  {
180140
180815
  name: "delete_component",
180141
180816
  description: "Permanently delete a Huly component. This action cannot be undone.",
180142
- category: CATEGORY9,
180817
+ category: CATEGORY10,
180143
180818
  inputSchema: deleteComponentParamsJsonSchema,
180144
180819
  handler: createToolHandler(
180145
180820
  "delete_component",
@@ -180150,7 +180825,7 @@ var issueTools = [
180150
180825
  {
180151
180826
  name: "list_issue_templates",
180152
180827
  description: "List issue templates in a Huly project. Templates define reusable issue configurations. Returns templates sorted by modification date (newest first).",
180153
- category: CATEGORY9,
180828
+ category: CATEGORY10,
180154
180829
  inputSchema: listIssueTemplatesParamsJsonSchema,
180155
180830
  handler: createToolHandler(
180156
180831
  "list_issue_templates",
@@ -180161,7 +180836,7 @@ var issueTools = [
180161
180836
  {
180162
180837
  name: "get_issue_template",
180163
180838
  description: "Retrieve full details for a Huly issue template. Use this to view template content and default values.",
180164
- category: CATEGORY9,
180839
+ category: CATEGORY10,
180165
180840
  inputSchema: getIssueTemplateParamsJsonSchema,
180166
180841
  handler: createToolHandler(
180167
180842
  "get_issue_template",
@@ -180172,7 +180847,7 @@ var issueTools = [
180172
180847
  {
180173
180848
  name: "create_issue_template",
180174
180849
  description: "Create a new issue template in a Huly project. Templates define default values for new issues. Returns the created template ID and title.",
180175
- category: CATEGORY9,
180850
+ category: CATEGORY10,
180176
180851
  inputSchema: createIssueTemplateParamsJsonSchema,
180177
180852
  handler: createToolHandler(
180178
180853
  "create_issue_template",
@@ -180183,7 +180858,7 @@ var issueTools = [
180183
180858
  {
180184
180859
  name: "create_issue_from_template",
180185
180860
  description: "Create a new issue from a template. Applies template defaults, allowing overrides for specific fields. Returns the created issue identifier.",
180186
- category: CATEGORY9,
180861
+ category: CATEGORY10,
180187
180862
  inputSchema: createIssueFromTemplateParamsJsonSchema,
180188
180863
  handler: createToolHandler(
180189
180864
  "create_issue_from_template",
@@ -180194,7 +180869,7 @@ var issueTools = [
180194
180869
  {
180195
180870
  name: "update_issue_template",
180196
180871
  description: "Update fields on an existing Huly issue template. Only provided fields are modified.",
180197
- category: CATEGORY9,
180872
+ category: CATEGORY10,
180198
180873
  inputSchema: updateIssueTemplateParamsJsonSchema,
180199
180874
  handler: createToolHandler(
180200
180875
  "update_issue_template",
@@ -180205,7 +180880,7 @@ var issueTools = [
180205
180880
  {
180206
180881
  name: "delete_issue_template",
180207
180882
  description: "Permanently delete a Huly issue template. This action cannot be undone.",
180208
- category: CATEGORY9,
180883
+ category: CATEGORY10,
180209
180884
  inputSchema: deleteIssueTemplateParamsJsonSchema,
180210
180885
  handler: createToolHandler(
180211
180886
  "delete_issue_template",
@@ -180216,7 +180891,7 @@ var issueTools = [
180216
180891
  {
180217
180892
  name: "add_issue_relation",
180218
180893
  description: "Add a relation between two issues. Relation types: 'blocks' (source blocks target \u2014 pushes into target's blockedBy), 'is-blocked-by' (source is blocked by target \u2014 pushes into source's blockedBy), 'relates-to' (bidirectional link \u2014 updates both sides). targetIssue accepts cross-project identifiers like 'OTHER-42'. No-op if the relation already exists.",
180219
- category: CATEGORY9,
180894
+ category: CATEGORY10,
180220
180895
  inputSchema: addIssueRelationParamsJsonSchema,
180221
180896
  handler: createToolHandler(
180222
180897
  "add_issue_relation",
@@ -180227,7 +180902,7 @@ var issueTools = [
180227
180902
  {
180228
180903
  name: "remove_issue_relation",
180229
180904
  description: "Remove a relation between two issues. Mirrors add_issue_relation: 'blocks' pulls from target's blockedBy, 'is-blocked-by' pulls from source's blockedBy, 'relates-to' pulls from both sides. No-op if the relation doesn't exist.",
180230
- category: CATEGORY9,
180905
+ category: CATEGORY10,
180231
180906
  inputSchema: removeIssueRelationParamsJsonSchema,
180232
180907
  handler: createToolHandler(
180233
180908
  "remove_issue_relation",
@@ -180238,7 +180913,7 @@ var issueTools = [
180238
180913
  {
180239
180914
  name: "list_issue_relations",
180240
180915
  description: "List all relations of an issue. Returns blockedBy (issues blocking this one) and relations (bidirectional links) with resolved identifiers. Does NOT return issues that this issue blocks \u2014 use list_issue_relations on the target issue to see that.",
180241
- category: CATEGORY9,
180916
+ category: CATEGORY10,
180242
180917
  inputSchema: listIssueRelationsParamsJsonSchema,
180243
180918
  handler: createToolHandler(
180244
180919
  "list_issue_relations",
@@ -180249,12 +180924,12 @@ var issueTools = [
180249
180924
  ];
180250
180925
 
180251
180926
  // src/mcp/tools/labels.ts
180252
- var CATEGORY10 = "labels";
180927
+ var CATEGORY11 = "labels";
180253
180928
  var labelTools = [
180254
180929
  {
180255
180930
  name: "list_labels",
180256
180931
  description: "List label/tag definitions in the workspace. Labels are global (not project-scoped). Returns labels for tracker issues sorted by modification date (newest first).",
180257
- category: CATEGORY10,
180932
+ category: CATEGORY11,
180258
180933
  inputSchema: listLabelsParamsJsonSchema,
180259
180934
  handler: createToolHandler(
180260
180935
  "list_labels",
@@ -180265,7 +180940,7 @@ var labelTools = [
180265
180940
  {
180266
180941
  name: "create_label",
180267
180942
  description: "Create a new label/tag definition in the workspace. Labels are global and can be attached to any issue. Returns existing label if one with the same title already exists (created=false). Use add_issue_label to attach a label to a specific issue.",
180268
- category: CATEGORY10,
180943
+ category: CATEGORY11,
180269
180944
  inputSchema: createLabelParamsJsonSchema,
180270
180945
  handler: createToolHandler(
180271
180946
  "create_label",
@@ -180276,7 +180951,7 @@ var labelTools = [
180276
180951
  {
180277
180952
  name: "update_label",
180278
180953
  description: "Update a label/tag definition. Accepts label ID or title. Only provided fields are modified.",
180279
- category: CATEGORY10,
180954
+ category: CATEGORY11,
180280
180955
  inputSchema: updateLabelParamsJsonSchema,
180281
180956
  handler: createToolHandler(
180282
180957
  "update_label",
@@ -180287,7 +180962,7 @@ var labelTools = [
180287
180962
  {
180288
180963
  name: "delete_label",
180289
180964
  description: "Permanently delete a label/tag definition. Accepts label ID or title. This action cannot be undone.",
180290
- category: CATEGORY10,
180965
+ category: CATEGORY11,
180291
180966
  inputSchema: deleteLabelParamsJsonSchema,
180292
180967
  handler: createToolHandler(
180293
180968
  "delete_label",
@@ -180298,7 +180973,7 @@ var labelTools = [
180298
180973
  ];
180299
180974
 
180300
180975
  // src/huly/operations/milestones.ts
180301
- var import_core31 = __toESM(require_lib4(), 1);
180976
+ var import_core32 = __toESM(require_lib4(), 1);
180302
180977
  var import_tracker3 = __toESM(require_lib21(), 1);
180303
180978
  var milestoneStatusToStringMap = {
180304
180979
  [import_tracker3.MilestoneStatus.Planned]: "planned",
@@ -180342,7 +181017,7 @@ var listMilestones = (params) => Effect_exports.gen(function* () {
180342
181017
  { space: project3._id },
180343
181018
  {
180344
181019
  limit,
180345
- sort: { modifiedOn: import_core31.SortingOrder.Descending }
181020
+ sort: { modifiedOn: import_core32.SortingOrder.Descending }
180346
181021
  }
180347
181022
  );
180348
181023
  const summaries = milestones.map((m) => ({
@@ -180370,7 +181045,7 @@ var getMilestone = (params) => Effect_exports.gen(function* () {
180370
181045
  });
180371
181046
  var createMilestone = (params) => Effect_exports.gen(function* () {
180372
181047
  const { client, project: project3 } = yield* findProject(params.project);
180373
- const milestoneId = (0, import_core31.generateId)();
181048
+ const milestoneId = (0, import_core32.generateId)();
180374
181049
  const milestoneData = {
180375
181050
  label: params.label,
180376
181051
  description: params.description ?? "",
@@ -180438,12 +181113,12 @@ var deleteMilestone = (params) => Effect_exports.gen(function* () {
180438
181113
  });
180439
181114
 
180440
181115
  // src/mcp/tools/milestones.ts
180441
- var CATEGORY11 = "milestones";
181116
+ var CATEGORY12 = "milestones";
180442
181117
  var milestoneTools = [
180443
181118
  {
180444
181119
  name: "list_milestones",
180445
181120
  description: "List milestones in a Huly project. Returns milestones sorted by modification date (newest first).",
180446
- category: CATEGORY11,
181121
+ category: CATEGORY12,
180447
181122
  inputSchema: listMilestonesParamsJsonSchema,
180448
181123
  handler: createToolHandler(
180449
181124
  "list_milestones",
@@ -180454,7 +181129,7 @@ var milestoneTools = [
180454
181129
  {
180455
181130
  name: "get_milestone",
180456
181131
  description: "Retrieve full details for a Huly milestone. Use this to view milestone content and metadata.",
180457
- category: CATEGORY11,
181132
+ category: CATEGORY12,
180458
181133
  inputSchema: getMilestoneParamsJsonSchema,
180459
181134
  handler: createToolHandler(
180460
181135
  "get_milestone",
@@ -180465,7 +181140,7 @@ var milestoneTools = [
180465
181140
  {
180466
181141
  name: "create_milestone",
180467
181142
  description: "Create a new milestone in a Huly project. Returns the created milestone ID and label.",
180468
- category: CATEGORY11,
181143
+ category: CATEGORY12,
180469
181144
  inputSchema: createMilestoneParamsJsonSchema,
180470
181145
  handler: createToolHandler(
180471
181146
  "create_milestone",
@@ -180476,7 +181151,7 @@ var milestoneTools = [
180476
181151
  {
180477
181152
  name: "update_milestone",
180478
181153
  description: "Update fields on an existing Huly milestone. Only provided fields are modified.",
180479
- category: CATEGORY11,
181154
+ category: CATEGORY12,
180480
181155
  inputSchema: updateMilestoneParamsJsonSchema,
180481
181156
  handler: createToolHandler(
180482
181157
  "update_milestone",
@@ -180487,7 +181162,7 @@ var milestoneTools = [
180487
181162
  {
180488
181163
  name: "set_issue_milestone",
180489
181164
  description: "Set or clear the milestone on a Huly issue. Pass null for milestone to clear it.",
180490
- category: CATEGORY11,
181165
+ category: CATEGORY12,
180491
181166
  inputSchema: setIssueMilestoneParamsJsonSchema,
180492
181167
  handler: createToolHandler(
180493
181168
  "set_issue_milestone",
@@ -180498,7 +181173,7 @@ var milestoneTools = [
180498
181173
  {
180499
181174
  name: "delete_milestone",
180500
181175
  description: "Permanently delete a Huly milestone. This action cannot be undone.",
180501
- category: CATEGORY11,
181176
+ category: CATEGORY12,
180502
181177
  inputSchema: deleteMilestoneParamsJsonSchema,
180503
181178
  handler: createToolHandler(
180504
181179
  "delete_milestone",
@@ -180509,7 +181184,7 @@ var milestoneTools = [
180509
181184
  ];
180510
181185
 
180511
181186
  // src/huly/operations/notifications.ts
180512
- var import_core32 = __toESM(require_lib4(), 1);
181187
+ var import_core33 = __toESM(require_lib4(), 1);
180513
181188
  var toDocNotifyContextSummary = (ctx) => ({
180514
181189
  id: NotificationContextId.make(ctx._id),
180515
181190
  objectId: ctx.objectId,
@@ -180555,7 +181230,7 @@ var listNotifications = (params) => Effect_exports.gen(function* () {
180555
181230
  {
180556
181231
  limit,
180557
181232
  sort: {
180558
- modifiedOn: import_core32.SortingOrder.Descending
181233
+ modifiedOn: import_core33.SortingOrder.Descending
180559
181234
  }
180560
181235
  }
180561
181236
  );
@@ -180697,7 +181372,7 @@ var listNotificationContexts = (params) => Effect_exports.gen(function* () {
180697
181372
  {
180698
181373
  limit,
180699
181374
  sort: {
180700
- lastUpdateTimestamp: import_core32.SortingOrder.Descending
181375
+ lastUpdateTimestamp: import_core33.SortingOrder.Descending
180701
181376
  }
180702
181377
  }
180703
181378
  );
@@ -180766,12 +181441,12 @@ var getUnreadNotificationCount = () => Effect_exports.gen(function* () {
180766
181441
  });
180767
181442
 
180768
181443
  // src/mcp/tools/notifications.ts
180769
- var CATEGORY12 = "notifications";
181444
+ var CATEGORY13 = "notifications";
180770
181445
  var notificationTools = [
180771
181446
  {
180772
181447
  name: "list_notifications",
180773
181448
  description: "List inbox notifications. Returns notifications sorted by modification date (newest first). Supports filtering by read/archived status.",
180774
- category: CATEGORY12,
181449
+ category: CATEGORY13,
180775
181450
  inputSchema: listNotificationsParamsJsonSchema,
180776
181451
  handler: createToolHandler(
180777
181452
  "list_notifications",
@@ -180782,7 +181457,7 @@ var notificationTools = [
180782
181457
  {
180783
181458
  name: "get_notification",
180784
181459
  description: "Retrieve full details for a notification. Use this to view notification content and metadata.",
180785
- category: CATEGORY12,
181460
+ category: CATEGORY13,
180786
181461
  inputSchema: getNotificationParamsJsonSchema,
180787
181462
  handler: createToolHandler(
180788
181463
  "get_notification",
@@ -180793,7 +181468,7 @@ var notificationTools = [
180793
181468
  {
180794
181469
  name: "mark_notification_read",
180795
181470
  description: "Mark a notification as read.",
180796
- category: CATEGORY12,
181471
+ category: CATEGORY13,
180797
181472
  inputSchema: markNotificationReadParamsJsonSchema,
180798
181473
  handler: createToolHandler(
180799
181474
  "mark_notification_read",
@@ -180804,7 +181479,7 @@ var notificationTools = [
180804
181479
  {
180805
181480
  name: "mark_all_notifications_read",
180806
181481
  description: "Mark all unread notifications as read. Returns the count of notifications marked.",
180807
- category: CATEGORY12,
181482
+ category: CATEGORY13,
180808
181483
  inputSchema: emptyParamsJsonSchema,
180809
181484
  handler: createToolHandler(
180810
181485
  "mark_all_notifications_read",
@@ -180815,7 +181490,7 @@ var notificationTools = [
180815
181490
  {
180816
181491
  name: "archive_notification",
180817
181492
  description: "Archive a notification. Archived notifications are hidden from the main inbox view.",
180818
- category: CATEGORY12,
181493
+ category: CATEGORY13,
180819
181494
  inputSchema: archiveNotificationParamsJsonSchema,
180820
181495
  handler: createToolHandler(
180821
181496
  "archive_notification",
@@ -180826,7 +181501,7 @@ var notificationTools = [
180826
181501
  {
180827
181502
  name: "archive_all_notifications",
180828
181503
  description: "Archive all notifications. Returns the count of notifications archived.",
180829
- category: CATEGORY12,
181504
+ category: CATEGORY13,
180830
181505
  inputSchema: emptyParamsJsonSchema,
180831
181506
  handler: createToolHandler(
180832
181507
  "archive_all_notifications",
@@ -180837,7 +181512,7 @@ var notificationTools = [
180837
181512
  {
180838
181513
  name: "delete_notification",
180839
181514
  description: "Permanently delete a notification. This action cannot be undone.",
180840
- category: CATEGORY12,
181515
+ category: CATEGORY13,
180841
181516
  inputSchema: deleteNotificationParamsJsonSchema,
180842
181517
  handler: createToolHandler(
180843
181518
  "delete_notification",
@@ -180848,7 +181523,7 @@ var notificationTools = [
180848
181523
  {
180849
181524
  name: "get_notification_context",
180850
181525
  description: "Get notification context for an entity. Returns tracking information for a specific object.",
180851
- category: CATEGORY12,
181526
+ category: CATEGORY13,
180852
181527
  inputSchema: getNotificationContextParamsJsonSchema,
180853
181528
  handler: createToolHandler(
180854
181529
  "get_notification_context",
@@ -180859,7 +181534,7 @@ var notificationTools = [
180859
181534
  {
180860
181535
  name: "list_notification_contexts",
180861
181536
  description: "List notification contexts. Returns contexts sorted by last update timestamp (newest first). Supports filtering by pinned status.",
180862
- category: CATEGORY12,
181537
+ category: CATEGORY13,
180863
181538
  inputSchema: listNotificationContextsParamsJsonSchema,
180864
181539
  handler: createToolHandler(
180865
181540
  "list_notification_contexts",
@@ -180870,7 +181545,7 @@ var notificationTools = [
180870
181545
  {
180871
181546
  name: "pin_notification_context",
180872
181547
  description: "Pin or unpin a notification context. Pinned contexts are highlighted in the inbox.",
180873
- category: CATEGORY12,
181548
+ category: CATEGORY13,
180874
181549
  inputSchema: pinNotificationContextParamsJsonSchema,
180875
181550
  handler: createToolHandler(
180876
181551
  "pin_notification_context",
@@ -180881,7 +181556,7 @@ var notificationTools = [
180881
181556
  {
180882
181557
  name: "list_notification_settings",
180883
181558
  description: "List notification provider settings. Returns current notification preferences.",
180884
- category: CATEGORY12,
181559
+ category: CATEGORY13,
180885
181560
  inputSchema: listNotificationSettingsParamsJsonSchema,
180886
181561
  handler: createToolHandler(
180887
181562
  "list_notification_settings",
@@ -180892,7 +181567,7 @@ var notificationTools = [
180892
181567
  {
180893
181568
  name: "update_notification_provider_setting",
180894
181569
  description: "Update notification provider setting. Enable or disable notifications for a specific provider.",
180895
- category: CATEGORY12,
181570
+ category: CATEGORY13,
180896
181571
  inputSchema: updateNotificationProviderSettingParamsJsonSchema,
180897
181572
  handler: createToolHandler(
180898
181573
  "update_notification_provider_setting",
@@ -180903,7 +181578,7 @@ var notificationTools = [
180903
181578
  {
180904
181579
  name: "get_unread_notification_count",
180905
181580
  description: "Get the count of unread notifications.",
180906
- category: CATEGORY12,
181581
+ category: CATEGORY13,
180907
181582
  inputSchema: emptyParamsJsonSchema,
180908
181583
  handler: createToolHandler(
180909
181584
  "get_unread_notification_count",
@@ -180914,7 +181589,7 @@ var notificationTools = [
180914
181589
  ];
180915
181590
 
180916
181591
  // src/huly/operations/projects.ts
180917
- var import_core33 = __toESM(require_lib4(), 1);
181592
+ var import_core34 = __toESM(require_lib4(), 1);
180918
181593
  var import_tracker4 = __toESM(require_lib21(), 1);
180919
181594
  var listProjects = (params) => Effect_exports.gen(function* () {
180920
181595
  const client = yield* HulyClient;
@@ -180929,7 +181604,7 @@ var listProjects = (params) => Effect_exports.gen(function* () {
180929
181604
  {
180930
181605
  limit,
180931
181606
  sort: {
180932
- name: import_core33.SortingOrder.Ascending
181607
+ name: import_core34.SortingOrder.Ascending
180933
181608
  }
180934
181609
  }
180935
181610
  );
@@ -180947,12 +181622,12 @@ var listProjects = (params) => Effect_exports.gen(function* () {
180947
181622
  });
180948
181623
 
180949
181624
  // src/mcp/tools/projects.ts
180950
- var CATEGORY13 = "projects";
181625
+ var CATEGORY14 = "projects";
180951
181626
  var projectTools = [
180952
181627
  {
180953
181628
  name: "list_projects",
180954
181629
  description: "List all Huly projects. Returns projects sorted by name. Supports filtering by archived status.",
180955
- category: CATEGORY13,
181630
+ category: CATEGORY14,
180956
181631
  inputSchema: listProjectsParamsJsonSchema,
180957
181632
  handler: createToolHandler(
180958
181633
  "list_projects",
@@ -180963,7 +181638,7 @@ var projectTools = [
180963
181638
  ];
180964
181639
 
180965
181640
  // src/huly/operations/search.ts
180966
- var import_core34 = __toESM(require_lib4(), 1);
181641
+ var import_core35 = __toESM(require_lib4(), 1);
180967
181642
  var fulltextSearch = (params) => Effect_exports.gen(function* () {
180968
181643
  const client = yield* HulyClient;
180969
181644
  const limit = clampLimit(params.limit);
@@ -180973,7 +181648,7 @@ var fulltextSearch = (params) => Effect_exports.gen(function* () {
180973
181648
  {
180974
181649
  limit,
180975
181650
  sort: {
180976
- modifiedOn: import_core34.SortingOrder.Descending
181651
+ modifiedOn: import_core35.SortingOrder.Descending
180977
181652
  }
180978
181653
  }
180979
181654
  );
@@ -180992,12 +181667,12 @@ var fulltextSearch = (params) => Effect_exports.gen(function* () {
180992
181667
  });
180993
181668
 
180994
181669
  // src/mcp/tools/search.ts
180995
- var CATEGORY14 = "search";
181670
+ var CATEGORY15 = "search";
180996
181671
  var searchTools = [
180997
181672
  {
180998
181673
  name: "fulltext_search",
180999
181674
  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).",
181000
- category: CATEGORY14,
181675
+ category: CATEGORY15,
181001
181676
  inputSchema: fulltextSearchParamsJsonSchema,
181002
181677
  handler: createToolHandler(
181003
181678
  "fulltext_search",
@@ -181020,12 +181695,12 @@ var uploadFile = (params) => Effect_exports.gen(function* () {
181020
181695
  });
181021
181696
 
181022
181697
  // src/mcp/tools/storage.ts
181023
- var CATEGORY15 = "storage";
181698
+ var CATEGORY16 = "storage";
181024
181699
  var storageTools = [
181025
181700
  {
181026
181701
  name: "upload_file",
181027
181702
  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.",
181028
- category: CATEGORY15,
181703
+ category: CATEGORY16,
181029
181704
  inputSchema: uploadFileParamsJsonSchema,
181030
181705
  handler: createStorageToolHandler(
181031
181706
  "upload_file",
@@ -181037,7 +181712,7 @@ var storageTools = [
181037
181712
 
181038
181713
  // src/huly/operations/time.ts
181039
181714
  var import_calendar5 = __toESM(require_lib24(), 1);
181040
- var import_core35 = __toESM(require_lib4(), 1);
181715
+ var import_core36 = __toESM(require_lib4(), 1);
181041
181716
  var import_tracker5 = __toESM(require_lib21(), 1);
181042
181717
  var serverPopulatedCalendar = toRef("");
181043
181718
  var serverPopulatedPersonId = "";
@@ -181047,7 +181722,7 @@ var logTime = (params) => Effect_exports.gen(function* () {
181047
181722
  project: params.project,
181048
181723
  identifier: params.identifier
181049
181724
  });
181050
- const reportId = (0, import_core35.generateId)();
181725
+ const reportId = (0, import_core36.generateId)();
181051
181726
  const reportData = {
181052
181727
  employee: null,
181053
181728
  date: Date.now(),
@@ -181086,7 +181761,7 @@ var getTimeReport = (params) => Effect_exports.gen(function* () {
181086
181761
  const reports = yield* client.findAll(
181087
181762
  tracker.class.TimeSpendReport,
181088
181763
  { attachedTo: issue2._id },
181089
- { sort: { date: import_core35.SortingOrder.Descending } }
181764
+ { sort: { date: import_core36.SortingOrder.Descending } }
181090
181765
  );
181091
181766
  const employeeIds = [
181092
181767
  ...new Set(
@@ -181138,7 +181813,7 @@ var listTimeSpendReports = (params) => Effect_exports.gen(function* () {
181138
181813
  tracker.class.TimeSpendReport,
181139
181814
  query,
181140
181815
  withLookup(
181141
- { limit, sort: { date: import_core35.SortingOrder.Descending } },
181816
+ { limit, sort: { date: import_core36.SortingOrder.Descending } },
181142
181817
  {
181143
181818
  attachedTo: tracker.class.Issue,
181144
181819
  employee: contact.class.Person
@@ -181167,7 +181842,7 @@ var getDetailedTimeReport = (params) => Effect_exports.gen(function* () {
181167
181842
  tracker.class.TimeSpendReport,
181168
181843
  query,
181169
181844
  withLookup(
181170
- { sort: { date: import_core35.SortingOrder.Descending } },
181845
+ { sort: { date: import_core36.SortingOrder.Descending } },
181171
181846
  {
181172
181847
  attachedTo: tracker.class.Issue,
181173
181848
  employee: contact.class.Person
@@ -181243,7 +181918,7 @@ var listWorkSlots = (params) => Effect_exports.gen(function* () {
181243
181918
  const slots = yield* client.findAll(
181244
181919
  time.class.WorkSlot,
181245
181920
  query,
181246
- { limit, sort: { date: import_core35.SortingOrder.Descending } }
181921
+ { limit, sort: { date: import_core36.SortingOrder.Descending } }
181247
181922
  );
181248
181923
  return slots.map((s) => ({
181249
181924
  id: s._id,
@@ -181255,7 +181930,7 @@ var listWorkSlots = (params) => Effect_exports.gen(function* () {
181255
181930
  });
181256
181931
  var createWorkSlot = (params) => Effect_exports.gen(function* () {
181257
181932
  const client = yield* HulyClient;
181258
- const slotId = (0, import_core35.generateId)();
181933
+ const slotId = (0, import_core36.generateId)();
181259
181934
  const slotData = {
181260
181935
  date: params.date,
181261
181936
  dueDate: params.dueDate,
@@ -181306,12 +181981,12 @@ var stopTimer = (params) => Effect_exports.gen(function* () {
181306
181981
  });
181307
181982
 
181308
181983
  // src/mcp/tools/time.ts
181309
- var CATEGORY16 = "time tracking";
181984
+ var CATEGORY17 = "time tracking";
181310
181985
  var timeTools = [
181311
181986
  {
181312
181987
  name: "log_time",
181313
181988
  description: "Log time spent on a Huly issue. Records a time entry with optional description. Time value is in minutes.",
181314
- category: CATEGORY16,
181989
+ category: CATEGORY17,
181315
181990
  inputSchema: logTimeParamsJsonSchema,
181316
181991
  handler: createToolHandler(
181317
181992
  "log_time",
@@ -181322,7 +181997,7 @@ var timeTools = [
181322
181997
  {
181323
181998
  name: "get_time_report",
181324
181999
  description: "Get time tracking report for a specific Huly issue. Shows total time, estimation, remaining time, and all time entries.",
181325
- category: CATEGORY16,
182000
+ category: CATEGORY17,
181326
182001
  inputSchema: getTimeReportParamsJsonSchema,
181327
182002
  handler: createToolHandler(
181328
182003
  "get_time_report",
@@ -181333,7 +182008,7 @@ var timeTools = [
181333
182008
  {
181334
182009
  name: "list_time_spend_reports",
181335
182010
  description: "List all time entries across issues. Supports filtering by project and date range. Returns entries sorted by date (newest first).",
181336
- category: CATEGORY16,
182011
+ category: CATEGORY17,
181337
182012
  inputSchema: listTimeSpendReportsParamsJsonSchema,
181338
182013
  handler: createToolHandler(
181339
182014
  "list_time_spend_reports",
@@ -181344,7 +182019,7 @@ var timeTools = [
181344
182019
  {
181345
182020
  name: "get_detailed_time_report",
181346
182021
  description: "Get detailed time breakdown for a project. Shows total time grouped by issue and by employee. Supports date range filtering.",
181347
- category: CATEGORY16,
182022
+ category: CATEGORY17,
181348
182023
  inputSchema: getDetailedTimeReportParamsJsonSchema,
181349
182024
  handler: createToolHandler(
181350
182025
  "get_detailed_time_report",
@@ -181355,7 +182030,7 @@ var timeTools = [
181355
182030
  {
181356
182031
  name: "list_work_slots",
181357
182032
  description: "List scheduled work slots. Shows planned time blocks attached to ToDos. Supports filtering by employee and date range.",
181358
- category: CATEGORY16,
182033
+ category: CATEGORY17,
181359
182034
  inputSchema: listWorkSlotsParamsJsonSchema,
181360
182035
  handler: createToolHandler(
181361
182036
  "list_work_slots",
@@ -181366,7 +182041,7 @@ var timeTools = [
181366
182041
  {
181367
182042
  name: "create_work_slot",
181368
182043
  description: "Create a scheduled work slot. Attaches a time block to a ToDo for planning purposes.",
181369
- category: CATEGORY16,
182044
+ category: CATEGORY17,
181370
182045
  inputSchema: createWorkSlotParamsJsonSchema,
181371
182046
  handler: createToolHandler(
181372
182047
  "create_work_slot",
@@ -181377,7 +182052,7 @@ var timeTools = [
181377
182052
  {
181378
182053
  name: "start_timer",
181379
182054
  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.",
181380
- category: CATEGORY16,
182055
+ category: CATEGORY17,
181381
182056
  inputSchema: startTimerParamsJsonSchema,
181382
182057
  handler: createToolHandler(
181383
182058
  "start_timer",
@@ -181388,7 +182063,7 @@ var timeTools = [
181388
182063
  {
181389
182064
  name: "stop_timer",
181390
182065
  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.",
181391
- category: CATEGORY16,
182066
+ category: CATEGORY17,
181392
182067
  inputSchema: stopTimerParamsJsonSchema,
181393
182068
  handler: createToolHandler(
181394
182069
  "stop_timer",
@@ -181399,15 +182074,15 @@ var timeTools = [
181399
182074
  ];
181400
182075
 
181401
182076
  // src/huly/operations/workspace.ts
181402
- var import_core36 = __toESM(require_lib4(), 1);
182077
+ var import_core37 = __toESM(require_lib4(), 1);
181403
182078
  var accountRoleMap = {
181404
- READONLYGUEST: import_core36.AccountRole.ReadOnlyGuest,
181405
- DocGuest: import_core36.AccountRole.DocGuest,
181406
- GUEST: import_core36.AccountRole.Guest,
181407
- USER: import_core36.AccountRole.User,
181408
- MAINTAINER: import_core36.AccountRole.Maintainer,
181409
- OWNER: import_core36.AccountRole.Owner,
181410
- ADMIN: import_core36.AccountRole.Admin
182079
+ READONLYGUEST: import_core37.AccountRole.ReadOnlyGuest,
182080
+ DocGuest: import_core37.AccountRole.DocGuest,
182081
+ GUEST: import_core37.AccountRole.Guest,
182082
+ USER: import_core37.AccountRole.User,
182083
+ MAINTAINER: import_core37.AccountRole.Maintainer,
182084
+ OWNER: import_core37.AccountRole.Owner,
182085
+ ADMIN: import_core37.AccountRole.Admin
181411
182086
  };
181412
182087
  var toHulyAccountRole = (role) => accountRoleMap[role];
181413
182088
  var formatVersion = (info) => `${info.versionMajor}.${info.versionMinor}.${info.versionPatch}`;
@@ -181563,12 +182238,12 @@ var getRegions = () => Effect_exports.gen(function* () {
181563
182238
  });
181564
182239
 
181565
182240
  // src/mcp/tools/workspace.ts
181566
- var CATEGORY17 = "workspace";
182241
+ var CATEGORY18 = "workspace";
181567
182242
  var workspaceTools = [
181568
182243
  {
181569
182244
  name: "list_workspace_members",
181570
182245
  description: "List members in the current Huly workspace with their roles. Returns members with account IDs and roles.",
181571
- category: CATEGORY17,
182246
+ category: CATEGORY18,
181572
182247
  inputSchema: listWorkspaceMembersParamsJsonSchema,
181573
182248
  handler: createWorkspaceToolHandler(
181574
182249
  "list_workspace_members",
@@ -181579,7 +182254,7 @@ var workspaceTools = [
181579
182254
  {
181580
182255
  name: "update_member_role",
181581
182256
  description: "Update a workspace member's role. Requires appropriate permissions. Valid roles: READONLYGUEST, DocGuest, GUEST, USER, MAINTAINER, OWNER, ADMIN.",
181582
- category: CATEGORY17,
182257
+ category: CATEGORY18,
181583
182258
  inputSchema: updateMemberRoleParamsJsonSchema,
181584
182259
  handler: createWorkspaceToolHandler(
181585
182260
  "update_member_role",
@@ -181590,7 +182265,7 @@ var workspaceTools = [
181590
182265
  {
181591
182266
  name: "get_workspace_info",
181592
182267
  description: "Get information about the current workspace including name, URL, region, and settings.",
181593
- category: CATEGORY17,
182268
+ category: CATEGORY18,
181594
182269
  inputSchema: emptyParamsJsonSchema,
181595
182270
  handler: createNoParamsWorkspaceToolHandler(
181596
182271
  getWorkspaceInfo
@@ -181599,7 +182274,7 @@ var workspaceTools = [
181599
182274
  {
181600
182275
  name: "list_workspaces",
181601
182276
  description: "List all workspaces accessible to the current user. Returns workspace summaries sorted by last visit.",
181602
- category: CATEGORY17,
182277
+ category: CATEGORY18,
181603
182278
  inputSchema: listWorkspacesParamsJsonSchema,
181604
182279
  handler: createWorkspaceToolHandler(
181605
182280
  "list_workspaces",
@@ -181610,7 +182285,7 @@ var workspaceTools = [
181610
182285
  {
181611
182286
  name: "create_workspace",
181612
182287
  description: "Create a new Huly workspace. Returns the workspace UUID and URL. Optionally specify a region.",
181613
- category: CATEGORY17,
182288
+ category: CATEGORY18,
181614
182289
  inputSchema: createWorkspaceParamsJsonSchema,
181615
182290
  handler: createWorkspaceToolHandler(
181616
182291
  "create_workspace",
@@ -181621,7 +182296,7 @@ var workspaceTools = [
181621
182296
  {
181622
182297
  name: "delete_workspace",
181623
182298
  description: "Permanently delete the current workspace. This action cannot be undone. Use with extreme caution.",
181624
- category: CATEGORY17,
182299
+ category: CATEGORY18,
181625
182300
  inputSchema: emptyParamsJsonSchema,
181626
182301
  handler: createNoParamsWorkspaceToolHandler(
181627
182302
  deleteWorkspace
@@ -181630,7 +182305,7 @@ var workspaceTools = [
181630
182305
  {
181631
182306
  name: "get_user_profile",
181632
182307
  description: "Get the current user's profile information including bio, location, and social links.",
181633
- category: CATEGORY17,
182308
+ category: CATEGORY18,
181634
182309
  inputSchema: emptyParamsJsonSchema,
181635
182310
  handler: createNoParamsWorkspaceToolHandler(
181636
182311
  getUserProfile
@@ -181639,7 +182314,7 @@ var workspaceTools = [
181639
182314
  {
181640
182315
  name: "update_user_profile",
181641
182316
  description: "Update the current user's profile. Supports bio, city, country, website, social links, and public visibility.",
181642
- category: CATEGORY17,
182317
+ category: CATEGORY18,
181643
182318
  inputSchema: updateUserProfileParamsJsonSchema,
181644
182319
  handler: createWorkspaceToolHandler(
181645
182320
  "update_user_profile",
@@ -181650,7 +182325,7 @@ var workspaceTools = [
181650
182325
  {
181651
182326
  name: "update_guest_settings",
181652
182327
  description: "Update workspace guest settings. Control read-only guest access and guest sign-up permissions.",
181653
- category: CATEGORY17,
182328
+ category: CATEGORY18,
181654
182329
  inputSchema: updateGuestSettingsParamsJsonSchema,
181655
182330
  handler: createWorkspaceToolHandler(
181656
182331
  "update_guest_settings",
@@ -181661,7 +182336,7 @@ var workspaceTools = [
181661
182336
  {
181662
182337
  name: "get_regions",
181663
182338
  description: "Get available regions for workspace creation. Returns region codes and display names.",
181664
- category: CATEGORY17,
182339
+ category: CATEGORY18,
181665
182340
  inputSchema: getRegionsParamsJsonSchema,
181666
182341
  handler: createWorkspaceToolHandler(
181667
182342
  "get_regions",
@@ -181684,6 +182359,7 @@ var allTools = [
181684
182359
  ...attachmentTools,
181685
182360
  ...contactTools,
181686
182361
  ...channelTools,
182362
+ ...cardTools,
181687
182363
  ...calendarTools,
181688
182364
  ...timeTools,
181689
182365
  ...searchTools,