@wirecat/tg-cli 0.112.0 → 0.113.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/dist/bin/tg.js +2 -2
  2. package/dist/bundle/{adapter-ILDV2YSZ.js → adapter-EQKEFGPB.js} +45 -45
  3. package/dist/bundle/{all-profiles-4SH2Q4WV.js → all-profiles-TTBFF663.js} +8 -8
  4. package/dist/bundle/{anthropic-64SM23YO.js → anthropic-XPZS7267.js} +5 -5
  5. package/dist/bundle/{app-server-SSYZWCDJ.js → app-server-ZSZ7KRAY.js} +42 -42
  6. package/dist/bundle/{bot-api-OHAGQMES.js → bot-api-X7BOVNIO.js} +46 -46
  7. package/dist/bundle/{bot-history-AUFO7UL2.js → bot-history-DWIUIPN5.js} +15 -15
  8. package/dist/bundle/{bun-AHZX63TR.js → bun-ZGZVAJU2.js} +2 -2
  9. package/dist/bundle/{bun-sqlite-KBIIODPV.js → bun-sqlite-UN2UJ6SI.js} +4 -4
  10. package/dist/bundle/{chunk-DFUTZGEV.js → chunk-3MAYYFKY.js} +1 -1
  11. package/dist/bundle/{chunk-B3Y2KZRS.js → chunk-452UZ2PU.js} +110 -95
  12. package/dist/bundle/{chunk-SC2DUQAK.js → chunk-4GLMEES6.js} +1 -1
  13. package/dist/bundle/{chunk-BTAET4U3.js → chunk-4SQB5VKL.js} +1 -1
  14. package/dist/bundle/{chunk-GM44UNGL.js → chunk-5NF7M4MN.js} +1 -1
  15. package/dist/bundle/{chunk-JXTYTAWE.js → chunk-6F6K3LWV.js} +11 -11
  16. package/dist/bundle/{chunk-XSYJKEA5.js → chunk-6OKGHHRL.js} +4 -4
  17. package/dist/bundle/{chunk-DNYGJAEP.js → chunk-6WJ5M2Q4.js} +4 -4
  18. package/dist/bundle/{chunk-NQKPXVLX.js → chunk-7IWDS2CM.js} +2 -2
  19. package/dist/bundle/{chunk-3AJO4GER.js → chunk-AGUCXSSM.js} +5 -5
  20. package/dist/bundle/{chunk-E4EJ2UTT.js → chunk-AVUIWZTP.js} +2 -2
  21. package/dist/bundle/{chunk-JIGYVVWA.js → chunk-BI5YJZJB.js} +31 -27
  22. package/dist/bundle/{chunk-MCXVGHL6.js → chunk-EGR5IJCG.js} +32 -25
  23. package/dist/bundle/{chunk-K7VOCHVS.js → chunk-ENXO43TV.js} +6 -6
  24. package/dist/bundle/{chunk-D5JP2YWG.js → chunk-G74QMORP.js} +2 -2
  25. package/dist/bundle/{chunk-4JXZKMXV.js → chunk-GX4LRLVD.js} +68 -59
  26. package/dist/bundle/{chunk-EO7PQE3J.js → chunk-HNN7EKIM.js} +90 -73
  27. package/dist/bundle/{chunk-UXCWUEN7.js → chunk-HO53POQG.js} +5 -5
  28. package/dist/bundle/{chunk-2IGZLBTE.js → chunk-IDUYRTPF.js} +2 -2
  29. package/dist/bundle/{chunk-JPRYFDOJ.js → chunk-IYKRHDX6.js} +44 -44
  30. package/dist/bundle/{chunk-BIERCQVG.js → chunk-J6USEBA6.js} +313 -258
  31. package/dist/bundle/{chunk-KYYAHIG2.js → chunk-JDQSX2JQ.js} +416 -337
  32. package/dist/bundle/{chunk-EPAOLRUL.js → chunk-JO45BOYE.js} +2 -2
  33. package/dist/bundle/{chunk-SFJFBIYP.js → chunk-JRTZ5I6M.js} +2 -2
  34. package/dist/bundle/{chunk-6KGENDPF.js → chunk-JW7BMJ6O.js} +2 -2
  35. package/dist/bundle/{chunk-5BNYW5RA.js → chunk-K3F46QVN.js} +2 -2
  36. package/dist/bundle/{chunk-JYOQMYNJ.js → chunk-KK3JVOOV.js} +30 -30
  37. package/dist/bundle/{chunk-GW7JRFTF.js → chunk-KOWQVHXI.js} +3 -3
  38. package/dist/bundle/{chunk-KLNQXUDX.js → chunk-KQ23JWLJ.js} +20 -18
  39. package/dist/bundle/{chunk-UVRD447S.js → chunk-KVLCIZUK.js} +3 -3
  40. package/dist/bundle/{chunk-UQOSZ2XX.js → chunk-MTX5EDYJ.js} +636 -473
  41. package/dist/bundle/{chunk-RANORATG.js → chunk-OC4RRFKH.js} +4 -4
  42. package/dist/bundle/{chunk-3GL4AOOG.js → chunk-OQR442B6.js} +1 -1
  43. package/dist/bundle/{chunk-3W7BU2BL.js → chunk-OSBAISA5.js} +6 -6
  44. package/dist/bundle/{chunk-COTC7HF3.js → chunk-OYNSFQ7K.js} +1 -1
  45. package/dist/bundle/{chunk-QL4WBCL5.js → chunk-PCRLXJRH.js} +11 -7
  46. package/dist/bundle/{chunk-PXUHQO66.js → chunk-PHPNA2HU.js} +11 -11
  47. package/dist/bundle/{chunk-RHYMEHYK.js → chunk-PHYDBR5M.js} +2 -2
  48. package/dist/bundle/{chunk-NKACHGB2.js → chunk-Q264PYGE.js} +40 -14
  49. package/dist/bundle/{chunk-ICEJKOKO.js → chunk-T4TTRFP5.js} +7 -7
  50. package/dist/bundle/{chunk-JLB5LEXJ.js → chunk-T5RM4Y35.js} +3 -3
  51. package/dist/bundle/{chunk-TOBJGMMA.js → chunk-TQ6EA7TB.js} +11 -11
  52. package/dist/bundle/{chunk-RPNRCFEE.js → chunk-TUD4MU7S.js} +2 -2
  53. package/dist/bundle/{chunk-TUJEJ4D5.js → chunk-U3MJQLZQ.js} +13 -13
  54. package/dist/bundle/{chunk-4IDJ7QCG.js → chunk-UE75KPAC.js} +4 -4
  55. package/dist/bundle/{chunk-7MFJFVUN.js → chunk-UIVLDKWT.js} +1 -1
  56. package/dist/bundle/{chunk-WI2S6INJ.js → chunk-VDATXIO4.js} +6 -6
  57. package/dist/bundle/{chunk-WWKXTKCE.js → chunk-VDEXNNMH.js} +4 -4
  58. package/dist/bundle/{chunk-5W72OARG.js → chunk-VVA4555T.js} +8 -8
  59. package/dist/bundle/{chunk-QMJGHSGN.js → chunk-WSAHUQ6K.js} +3 -3
  60. package/dist/bundle/{chunk-KGYPSBTI.js → chunk-XXNJF3ZM.js} +32 -26
  61. package/dist/bundle/{chunk-GSGS62LX.js → chunk-XZ2ZHIAO.js} +1 -1
  62. package/dist/bundle/{chunk-RC7EBLHM.js → chunk-Z6TRIW2O.js} +8 -8
  63. package/dist/bundle/{chunk-PDVSMGWO.js → chunk-ZID2Y4XU.js} +2 -2
  64. package/dist/bundle/command-contract-GV67H22L.js +32 -0
  65. package/dist/bundle/{decode-FR3QHHJI.js → decode-AMQVTEMW.js} +4 -4
  66. package/dist/bundle/{echarts-VTV4C2OS.js → echarts-ECYONFQJ.js} +2 -2
  67. package/dist/bundle/{embed-US7X5P5D.js → embed-VZYBZEWI.js} +5 -5
  68. package/dist/bundle/{embedder-63Z7ZBYG.js → embedder-GSWBGHRK.js} +8 -8
  69. package/dist/bundle/{entry-B4J7IAG3.js → entry-LALZILY4.js} +5 -5
  70. package/dist/bundle/{first-run-MXPPUGII.js → first-run-LEAI623Q.js} +9 -9
  71. package/dist/bundle/first-screen-MOCVLE23.js +30 -0
  72. package/dist/bundle/{identity-AQWKU7SM.js → identity-54HA5GN6.js} +3 -3
  73. package/dist/bundle/{instructions-GBR6DJTK.js → instructions-AXLQQS3G.js} +1 -1
  74. package/dist/bundle/{mcp-YJEQYYTR.js → mcp-VVMPUDSL.js} +2 -2
  75. package/dist/bundle/{node-QXGPMDH2.js → node-7JHC5K77.js} +2 -2
  76. package/dist/bundle/{node-sqlite-L6CAMXQ2.js → node-sqlite-LYJEK46T.js} +4 -4
  77. package/dist/bundle/{oauth-5RK6J4SG.js → oauth-BROPKI3K.js} +6 -6
  78. package/dist/bundle/{open-A3IAG7U6.js → open-C6XQ46JK.js} +3 -3
  79. package/dist/bundle/{openai-YKNGCHVV.js → openai-VWSU7ZDD.js} +13 -13
  80. package/dist/bundle/{process-CGLNXFIU.js → process-QKEFL5HL.js} +1 -1
  81. package/dist/bundle/{program-AEDR6R5P.js → program-ACY7O33O.js} +48 -48
  82. package/dist/bundle/{prompt-65CSCL2T.js → prompt-EGULVW2F.js} +4 -4
  83. package/dist/bundle/{proxy-transport-U3QOYMQF.js → proxy-transport-KIMADLQ2.js} +4 -4
  84. package/dist/bundle/{recognize-ECRO6CFK.js → recognize-UMTKLWVR.js} +3 -3
  85. package/dist/bundle/{remote-6IEFZFGO.js → remote-DABI7PSQ.js} +6 -6
  86. package/dist/bundle/{rerank-23GXWT2V.js → rerank-ZFATWWBE.js} +6 -6
  87. package/dist/bundle/{serve-S65YTPZN.js → serve-B7YYCMGN.js} +8 -8
  88. package/dist/bundle/{server-MVTBK7GV.js → server-DGKZISZH.js} +32 -32
  89. package/dist/bundle/server-UC7UWUIS.js +56 -0
  90. package/dist/bundle/{state-TH3UVQAW.js → state-AQ2PABA5.js} +5 -5
  91. package/dist/bundle/{store-2WFTUSNG.js → store-46GJTFLJ.js} +10 -10
  92. package/dist/bundle/store-maintenance-command-FCFKHGRM.js +45 -0
  93. package/dist/bundle/tg.js +4 -4
  94. package/dist/version.d.ts +1 -1
  95. package/dist/version.js +1 -1
  96. package/package.json +3 -3
  97. package/dist/bundle/command-contract-4KVJJZ46.js +0 -32
  98. package/dist/bundle/first-screen-GFYHUBBD.js +0 -30
  99. package/dist/bundle/server-IH24WEAC.js +0 -56
  100. package/dist/bundle/store-maintenance-command-PUOU2CL6.js +0 -45
  101. /package/dist/bundle/{chunk-WJWLHLQ7.js → chunk-HPXYN7F3.js} +0 -0
@@ -8,7 +8,7 @@ import {
8
8
  sameOrdinaryFile,
9
9
  syncDirectory,
10
10
  writeFileAtomic
11
- } from "./chunk-TUJEJ4D5.js";
11
+ } from "./chunk-U3MJQLZQ.js";
12
12
  import {
13
13
  Command,
14
14
  DEFAULT_IMAGE_MODEL,
@@ -47,23 +47,23 @@ import {
47
47
  typedCommand,
48
48
  vectorModelKey,
49
49
  withAttempt
50
- } from "./chunk-4JXZKMXV.js";
50
+ } from "./chunk-GX4LRLVD.js";
51
51
  import {
52
52
  isCliFailure
53
- } from "./chunk-RC7EBLHM.js";
53
+ } from "./chunk-Z6TRIW2O.js";
54
54
  import {
55
55
  isNewer,
56
56
  updateCommand
57
- } from "./chunk-3AJO4GER.js";
57
+ } from "./chunk-AGUCXSSM.js";
58
58
  import {
59
59
  readOnlyLockOf
60
- } from "./chunk-2IGZLBTE.js";
60
+ } from "./chunk-IDUYRTPF.js";
61
61
  import {
62
62
  MAX_MODEL_IMAGE_BYTES
63
- } from "./chunk-RPNRCFEE.js";
63
+ } from "./chunk-TUD4MU7S.js";
64
64
  import {
65
65
  remoteKey
66
- } from "./chunk-JLB5LEXJ.js";
66
+ } from "./chunk-T5RM4Y35.js";
67
67
  import {
68
68
  Unzip,
69
69
  UnzipInflate,
@@ -74,11 +74,11 @@ import {
74
74
  placedText,
75
75
  runEmbedders,
76
76
  textModelsDirectory
77
- } from "./chunk-K7VOCHVS.js";
77
+ } from "./chunk-ENXO43TV.js";
78
78
  import {
79
79
  installFiles,
80
80
  megabytes
81
- } from "./chunk-WWKXTKCE.js";
81
+ } from "./chunk-VDEXNNMH.js";
82
82
  import {
83
83
  AGENDA_COLUMNS,
84
84
  CHAT_COLUMNS,
@@ -126,6 +126,7 @@ import {
126
126
  hasStems,
127
127
  hasText,
128
128
  historyStartKey,
129
+ hitFiles,
129
130
  inSource,
130
131
  inboxKey,
131
132
  isAccountList,
@@ -150,7 +151,7 @@ import {
150
151
  threadConversation,
151
152
  validateAst,
152
153
  validateFields
153
- } from "./chunk-BIERCQVG.js";
154
+ } from "./chunk-J6USEBA6.js";
154
155
  import {
155
156
  EVENT_QUERY,
156
157
  MEETING_PROJECT_EVIDENCE_QUERY,
@@ -195,27 +196,27 @@ import {
195
196
  validateQuery,
196
197
  walkQuery,
197
198
  zonedMoment
198
- } from "./chunk-EO7PQE3J.js";
199
+ } from "./chunk-HNN7EKIM.js";
199
200
  import {
200
201
  DEFAULT_STEMMERS,
201
202
  createStemmer,
202
203
  fold,
203
204
  normalize
204
- } from "./chunk-5W72OARG.js";
205
+ } from "./chunk-VVA4555T.js";
205
206
  import {
206
207
  DEFAULT_TASK_CATEGORIES,
207
208
  FALLBACK_CATEGORY
208
- } from "./chunk-WI2S6INJ.js";
209
+ } from "./chunk-VDATXIO4.js";
209
210
  import {
210
211
  storePath,
211
212
  wirecatDirectory
212
- } from "./chunk-RHYMEHYK.js";
213
+ } from "./chunk-PHYDBR5M.js";
213
214
  import {
214
215
  resolvePaths,
215
216
  singleLine,
216
217
  visibleControls,
217
218
  writeSecurely
218
- } from "./chunk-KLNQXUDX.js";
219
+ } from "./chunk-KQ23JWLJ.js";
219
220
  import {
220
221
  CliError,
221
222
  array,
@@ -240,7 +241,7 @@ import {
240
241
  string,
241
242
  transform,
242
243
  unknown
243
- } from "./chunk-QL4WBCL5.js";
244
+ } from "./chunk-PCRLXJRH.js";
244
245
  import {
245
246
  importFrom,
246
247
  resolveFrom
@@ -16860,7 +16861,7 @@ var require_lib3 = __commonJS({
16860
16861
  }
16861
16862
  });
16862
16863
 
16863
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/conversations/link.js
16864
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/conversations/link.js
16864
16865
  var RULES_VERSION = 5;
16865
16866
  var LOOK_BACK = 50;
16866
16867
  var SAME_SENDER_WITHIN = 10;
@@ -16950,15 +16951,15 @@ var latest = /* @__PURE__ */ __name((window3, matches) => {
16950
16951
  var sameThread = /* @__PURE__ */ __name((a, b) => a.threadId === b.threadId, "sameThread");
16951
16952
  var link = /* @__PURE__ */ __name((message, parentId, source, kind, confidence, method) => ({ messageId: message.id, parentId, source, kind, confidence, method }), "link");
16952
16953
 
16953
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/ports/traits.js
16954
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/ports/traits.js
16954
16955
  var syncsOneChat = /* @__PURE__ */ __name((messenger) => messenger.history !== "store" || messenger.historyOnDemand === true, "syncsOneChat");
16955
16956
 
16956
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/sends/send-id.js
16957
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/sends/send-id.js
16957
16958
  import { randomBytes } from "node:crypto";
16958
16959
  var newSendId = /* @__PURE__ */ __name(() => randomBytes(8).readBigInt64BE().toString(), "newSendId");
16959
16960
  var newOperationId = newSendId;
16960
16961
 
16961
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/sends/upload.js
16962
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/sends/upload.js
16962
16963
  import { openAsBlob, realpathSync } from "node:fs";
16963
16964
  import { open, stat } from "node:fs/promises";
16964
16965
  import { basename, dirname, extname, isAbsolute, relative, resolve, sep } from "node:path";
@@ -17179,7 +17180,7 @@ var readStickerFile = /* @__PURE__ */ __name(async (path, maxBytes, read) => {
17179
17180
  return { name, source };
17180
17181
  }, "readStickerFile");
17181
17182
 
17182
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/cli/messenger/lacks.js
17183
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/cli/messenger/lacks.js
17183
17184
  var COMMAND_NEEDS = {
17184
17185
  "account update": ["updateProfile", "change the profile"],
17185
17186
  "account sessions list": ["sessions", "list the account's sessions"],
@@ -17229,7 +17230,7 @@ var hideNever = /* @__PURE__ */ __name((messenger, group) => {
17229
17230
  return group;
17230
17231
  }, "hideNever");
17231
17232
 
17232
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/members-audit.js
17233
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/members-audit.js
17233
17234
  var AUDIT_PAGE = 200;
17234
17235
  var AUDIT_BUDGET = 10;
17235
17236
  var AUDIT_PAUSE_MS = 1e3;
@@ -17309,7 +17310,7 @@ var burstJoins = /* @__PURE__ */ __name((members) => {
17309
17310
  return found;
17310
17311
  }, "burstJoins");
17311
17312
 
17312
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/meetings/cli/query-options.js
17313
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/meetings/cli/query-options.js
17313
17314
  var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
17314
17315
  command.allowUnknownOption();
17315
17316
  const parse = command.parseOptions.bind(command);
@@ -17329,7 +17330,7 @@ var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
17329
17330
  return command;
17330
17331
  }, "queryWordsAfterOptions");
17331
17332
 
17332
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/meetings/cli/passage.js
17333
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/meetings/cli/passage.js
17333
17334
  var count = /* @__PURE__ */ __name((value) => {
17334
17335
  if (!/^(0|[1-9]\d*)$/.test(value) || !Number.isSafeInteger(Number(value)))
17335
17336
  throw new CliError("validation_error", "expected a nonnegative safe integer");
@@ -17371,7 +17372,7 @@ var addMeetingPassageCommandDefinition = /* @__PURE__ */ __name((program, deps)
17371
17372
  var createMeetingPassageCommand = sharedCommand(createMeetingPassageCommandDefinition);
17372
17373
  var addMeetingPassageCommand = sharedCommand(addMeetingPassageCommandDefinition);
17373
17374
 
17374
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/meetings/cli/project-evidence.js
17375
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/meetings/cli/project-evidence.js
17375
17376
  var integer2 = /* @__PURE__ */ __name((value) => {
17376
17377
  if (!/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
17377
17378
  throw new CliError("validation_error", "expected a positive safe integer");
@@ -17394,7 +17395,7 @@ ${fieldsHelp(MEETING_PROJECT_EVIDENCE_QUERY)}`).option("--limit <n>", "hits in o
17394
17395
  }, "addMeetingProjectEvidenceCommandDefinition");
17395
17396
  var addMeetingProjectEvidenceCommand = sharedCommand(addMeetingProjectEvidenceCommandDefinition);
17396
17397
 
17397
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/meetings/cli/search.js
17398
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/meetings/cli/search.js
17398
17399
  var ZONED = /(?:Z|[+-]\d{2}:?\d{2})$/i;
17399
17400
  var moment = /* @__PURE__ */ __name((flag, end, readIn) => (value) => {
17400
17401
  const zone = timezoneOf();
@@ -17480,7 +17481,7 @@ var addMeetingSearchCommandDefinition = /* @__PURE__ */ __name((program, deps) =
17480
17481
  var createMeetingSearchCommand = sharedCommand(createMeetingSearchCommandDefinition);
17481
17482
  var addMeetingSearchCommand = sharedCommand(addMeetingSearchCommandDefinition);
17482
17483
 
17483
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/meetings/cli/index.js
17484
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/meetings/cli/index.js
17484
17485
  var integer4 = /* @__PURE__ */ __name((text2) => {
17485
17486
  if (!/^[1-9]\d*$/.test(text2) || !Number.isSafeInteger(Number(text2)))
17486
17487
  throw new InvalidArgumentError("expected a positive integer");
@@ -17600,13 +17601,14 @@ ${fieldsHelp(EVENT_QUERY, MEETING_QUERY_GUIDE)}`);
17600
17601
  }, "addMeetingCommandsDefinition");
17601
17602
  var addMeetingCommands = sharedCommand(addMeetingCommandsDefinition);
17602
17603
 
17603
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/cli/list-query.js
17604
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/cli/list-query.js
17604
17605
  var LIST_QUERY_GUIDE = "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md";
17606
+ var QUERY_ARGUMENT = "field:value terms that narrow the list \u2014 the fields are below";
17605
17607
  var withQuery = /* @__PURE__ */ __name((command, registry) => {
17606
17608
  const query = defineQuery(registry);
17607
17609
  annotate(command, { query, output: { entity: registry.entity } });
17608
17610
  const shown = askable(query);
17609
- queryWordsAfterOptions(command).argument("[query...]", shown.length > 0 ? "field:value terms that narrow the list \u2014 the fields are below" : "field:value terms; this list filters by none yet");
17611
+ queryWordsAfterOptions(command).argument("[query...]", shown.length > 0 ? QUERY_ARGUMENT : "field:value terms; this list filters by none yet");
17610
17612
  if (shown.length > 0)
17611
17613
  command.addHelpText("after", `
17612
17614
  ${fieldsHelp({ ...query, fields: shown }, LIST_QUERY_GUIDE)}`);
@@ -17661,7 +17663,7 @@ var pagedList = /* @__PURE__ */ __name((command, { limit, page, all }, { items,
17661
17663
  }), "pagedList");
17662
17664
  var askable = /* @__PURE__ */ __name((registry) => registry.backend === "native" ? registry.fields.filter((field) => field.native) : registry.fields, "askable");
17663
17665
  var nativeTerms = /* @__PURE__ */ __name((ast, command) => new Map([...nativeTermLists(ast, command)].map(([field, [node]]) => [field, node])), "nativeTerms");
17664
- var nativeTermLists = /* @__PURE__ */ __name((ast, command, repeatable = []) => {
17666
+ var nativeTermLists = /* @__PURE__ */ __name((ast, command, repeatable = [], negatable = []) => {
17665
17667
  const terms = /* @__PURE__ */ new Map();
17666
17668
  if (!ast)
17667
17669
  return terms;
@@ -17669,8 +17671,14 @@ var nativeTermLists = /* @__PURE__ */ __name((ast, command, repeatable = []) =>
17669
17671
  const add = /* @__PURE__ */ __name((node) => {
17670
17672
  if (node.kind === "boolean") {
17671
17673
  for (const clause of node.clauses) {
17674
+ const excluded = clause.occur === "must_not" && clause.node.kind === "predicate" && negatable.includes(clause.node.field);
17675
+ if (excluded && clause.node.kind === "predicate") {
17676
+ const key = `-${clause.node.field}`;
17677
+ terms.set(key, [...terms.get(key) ?? [], clause.node]);
17678
+ continue;
17679
+ }
17672
17680
  if (clause.occur !== "must")
17673
- queryError("query.unsupported-placement", clause.node.span, "this list takes only field:value terms joined by AND", context2);
17681
+ queryError("query.unsupported-placement", clause.node.span, negatable.length ? `this list takes only field:value terms joined by AND, and -field:value for ${negatable.join(", ")}` : "this list takes only field:value terms joined by AND", context2);
17674
17682
  add(clause.node);
17675
17683
  }
17676
17684
  return;
@@ -17726,7 +17734,7 @@ var termField = /* @__PURE__ */ __name((name, type, example, more = {}) => nativ
17726
17734
  var queryHelp = /* @__PURE__ */ __name((registry) => `
17727
17735
  ${fieldsHelp(registry, LIST_QUERY_GUIDE)}`, "queryHelp");
17728
17736
 
17729
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/cli/paging.js
17737
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/cli/paging.js
17730
17738
  var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
17731
17739
  if (!/^\d+$/.test(value.trim()) || Number(value) < 1)
17732
17740
  throw new CliError("validation_error", `${flag} takes a whole number from 1 upwards, not "${value}"`);
@@ -17735,7 +17743,7 @@ var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
17735
17743
  var withPaging = /* @__PURE__ */ __name((command) => command.option("--limit <n>", "how many to show", positiveCount("--limit")).option("--page <n>", "which page, starting at 1", positiveCount("--page")).option("--all", "every row, no paging"), "withPaging");
17736
17744
  var window = /* @__PURE__ */ __name(({ limit, page, all }) => all ? { offset: 0 } : { limit, offset: (page - 1) * limit }, "window");
17737
17745
 
17738
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/cli/messenger/chat-answers.js
17746
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/cli/messenger/chat-answers.js
17739
17747
  var defined = /* @__PURE__ */ __name((record2) => Object.fromEntries(Object.entries(record2).filter(([, value]) => value !== void 0)), "defined");
17740
17748
  var chatRef = /* @__PURE__ */ __name((account, chat) => formatReference({ type: "chat", provider: account.provider, account: account.account, chat }), "chatRef");
17741
17749
  var settingsOf = /* @__PURE__ */ __name((settings) => defined({
@@ -17997,7 +18005,7 @@ var sessionAnswer = /* @__PURE__ */ __name(({ current, client, device, location,
17997
18005
  ...createdAt === void 0 ? {} : { created_at: createdAt }
17998
18006
  }), "sessionAnswer");
17999
18007
 
18000
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/deps.js
18008
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/deps.js
18001
18009
  var accountStore = /* @__PURE__ */ __name(async (deps) => (await deps.store()).forAccount(await deps.account()), "accountStore");
18002
18010
  var crossAccount = /* @__PURE__ */ __name((deps, _reason) => deps.store(), "crossAccount");
18003
18011
  var NO_LOCAL_STORE = "this answer comes from the messenger, not from the local store";
@@ -18032,7 +18040,7 @@ var storeIfOpen = /* @__PURE__ */ __name(async (deps) => {
18032
18040
  var fromStore = /* @__PURE__ */ __name((deps) => deps.offline || deps.reads === "store", "fromStore");
18033
18041
  var nothingStored = /* @__PURE__ */ __name((messenger) => `nothing stored for this chat yet \u2014 keep \`${typedCommand(messenger.app.command, "serve")}\` running`, "nothingStored");
18034
18042
  var PUSHED = "this messenger's history is read from the local store";
18035
- var OFFLINE = "--offline answers only from what is kept locally: `chats list|show`, `messages list|show|context`, `contacts list|show` and `review`";
18043
+ var OFFLINE = "--offline answers only from what is kept locally: `chats list|show`, `messages list|show|context|download`, `contacts list|show` and `review`";
18036
18044
  var onlineDeps = /* @__PURE__ */ __name((messenger, adapter, guard, where = {}) => ({
18037
18045
  messenger,
18038
18046
  ...where,
@@ -18062,7 +18070,7 @@ var storedDeps = /* @__PURE__ */ __name((messenger, store, account, guard) => ({
18062
18070
  }), "storedDeps");
18063
18071
  var storeModeDeps = /* @__PURE__ */ __name((messenger, store, account, guard) => ({ ...storedDeps(messenger, store, account, guard), offline: false, reads: "store" }), "storeModeDeps");
18064
18072
 
18065
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/resolve.js
18073
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/resolve.js
18066
18074
  var isId = /* @__PURE__ */ __name((reference) => /^-?\d+$/.test(reference.trim()), "isId");
18067
18075
  var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase(), "foldName");
18068
18076
  var pickChat = /* @__PURE__ */ __name((reference, chats) => {
@@ -18100,7 +18108,7 @@ ${lines3}`, { candidates });
18100
18108
  }, "ambiguous");
18101
18109
  var isPresent = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isPresent");
18102
18110
 
18103
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/ports/messenger.js
18111
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/ports/messenger.js
18104
18112
  var throughWrapper = /* @__PURE__ */ __name((inner, handled, wrap = (_, call) => call) => new Proxy(handled, {
18105
18113
  get: /* @__PURE__ */ __name((own, key) => {
18106
18114
  if (key in own)
@@ -18117,7 +18125,7 @@ var capability = /* @__PURE__ */ __name((adapter, method, what) => {
18117
18125
  return found.bind(adapter);
18118
18126
  }, "capability");
18119
18127
 
18120
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/moment.js
18128
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/moment.js
18121
18129
  var AGO = /^(\d+)(m|h|d)$/;
18122
18130
  var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
18123
18131
  var DATE = /^\d{4}-\d{2}-\d{2}/;
@@ -18157,7 +18165,7 @@ var dateWindow = /* @__PURE__ */ __name(({ sinceTime, untilTime, zone, now = Dat
18157
18165
  };
18158
18166
  }, "dateWindow");
18159
18167
 
18160
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/questions.js
18168
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/questions.js
18161
18169
  var LINKS = /https?:\/\/\S+/g;
18162
18170
  var unanswered = /* @__PURE__ */ __name((messages, { answerers: answerers2, before: before2 }) => questions(messages, { answerers: answerers2 }).filter(({ question, answer }) => answer === void 0 && Date.parse(question.timestamp) < before2).map(({ question }) => question), "unanswered");
18163
18171
  var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2 }) => {
@@ -18184,7 +18192,7 @@ var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2 }) =>
18184
18192
  });
18185
18193
  }, "questions");
18186
18194
 
18187
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/task-categories.js
18195
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/task-categories.js
18188
18196
  var names = /* @__PURE__ */ __name((categories) => categories.map(({ name }) => name).join(", "), "names");
18189
18197
  var taskCategoryOf = /* @__PURE__ */ __name((categories = DEFAULT_TASK_CATEGORIES, flag = "--category") => (typed) => {
18190
18198
  const name = typed.trim().toLowerCase();
@@ -18234,7 +18242,7 @@ var categorize = /* @__PURE__ */ __name((text2, categories = DEFAULT_TASK_CATEGO
18234
18242
  return best.name;
18235
18243
  }, "categorize");
18236
18244
 
18237
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/task-rules.js
18245
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/task-rules.js
18238
18246
  var taskAccount = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "taskAccount");
18239
18247
  var RULES_IN = {
18240
18248
  dialog: "all",
@@ -18440,7 +18448,7 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account, chatId
18440
18448
  return passes;
18441
18449
  }, "applyTaskRulesToChats");
18442
18450
 
18443
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/botcheck/check.js
18451
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/botcheck/check.js
18444
18452
  var DAY_MS = 864e5;
18445
18453
  var NEW_DAYS = 30;
18446
18454
  var SAME_TEXT_MIN = 20;
@@ -18517,7 +18525,7 @@ var scorePerson = /* @__PURE__ */ __name(({ subject, provider, activity, photos,
18517
18525
  };
18518
18526
  }, "scorePerson");
18519
18527
 
18520
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/botcheck/registries.js
18528
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/botcheck/registries.js
18521
18529
  var REGISTRIES = {
18522
18530
  cas: { title: "Combot Anti-Spam (CAS)", docs: "https://cas.chat/api" },
18523
18531
  lols: { title: "lols.bot", docs: "https://api.lols.bot/lols-bot.json" }
@@ -18602,7 +18610,7 @@ var notCovered = /* @__PURE__ */ __name((messenger, now = /* @__PURE__ */ new Da
18602
18610
  detail: `lists Telegram accounts only, not ${messenger} ones`
18603
18611
  })), "notCovered");
18604
18612
 
18605
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/botcheck/service.js
18613
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/botcheck/service.js
18606
18614
  var ACTIVITY_MESSAGES = 1e3;
18607
18615
  var botCheckService = /* @__PURE__ */ __name((deps) => {
18608
18616
  const subjectOf = /* @__PURE__ */ __name(async (reference) => {
@@ -18690,7 +18698,7 @@ var botCheckService = /* @__PURE__ */ __name((deps) => {
18690
18698
  };
18691
18699
  }, "botCheckService");
18692
18700
 
18693
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/domain/thread.js
18701
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/thread.js
18694
18702
  var threadIdOf = /* @__PURE__ */ __name((value) => {
18695
18703
  if (value === void 0)
18696
18704
  return void 0;
@@ -18700,7 +18708,7 @@ var threadIdOf = /* @__PURE__ */ __name((value) => {
18700
18708
  return id2;
18701
18709
  }, "threadIdOf");
18702
18710
 
18703
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/chat-stats.js
18711
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/chat-stats.js
18704
18712
  var TOP_POSTS = 5;
18705
18713
  var JOINS = /* @__PURE__ */ new Set(["join", "add"]);
18706
18714
  var LEAVES = /* @__PURE__ */ new Set(["leave", "remove"]);
@@ -18817,7 +18825,7 @@ var median = /* @__PURE__ */ __name((values) => {
18817
18825
  return Math.round(sorted.length % 2 === 0 ? ((sorted[middle - 1] ?? upper) + upper) / 2 : upper);
18818
18826
  }, "median");
18819
18827
 
18820
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/member-history.js
18828
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/member-history.js
18821
18829
  var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
18822
18830
  const events = [];
18823
18831
  for (const stay of stays) {
@@ -18849,7 +18857,7 @@ var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
18849
18857
  return events.filter(({ at }) => Date.parse(at) >= since).sort((a, b) => Date.parse(a.at) - Date.parse(b.at) || a.id.localeCompare(b.id));
18850
18858
  }, "memberEvents");
18851
18859
 
18852
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/message-resolution.js
18860
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/message-resolution.js
18853
18861
  var readChatId = /* @__PURE__ */ __name(async (deps, reference, store, account) => {
18854
18862
  if (deps.reads !== "store")
18855
18863
  return keptChatId(deps.messenger, reference, store, account);
@@ -18996,7 +19004,7 @@ var senderAmong = /* @__PURE__ */ __name(async (store, accounts, reference) => {
18996
19004
  }
18997
19005
  }, "senderAmong");
18998
19006
 
18999
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/chats.js
19007
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/chats.js
19000
19008
  var EVENTS_DAYS = 7;
19001
19009
  var TRACKED_DAYS = 30;
19002
19010
  var STATS_PAGE = 1e3;
@@ -19291,7 +19299,7 @@ var storedMembers = /* @__PURE__ */ __name(async (store, chatId) => {
19291
19299
  return members.length === 0 ? null : members;
19292
19300
  }, "storedMembers");
19293
19301
 
19294
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/inbox.js
19302
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/inbox.js
19295
19303
  var INBOX_CHATS = 20;
19296
19304
  var REVIEW_DAYS = 3;
19297
19305
  var UNANSWERED_HOURS = 24;
@@ -19499,7 +19507,7 @@ var inboxService = /* @__PURE__ */ __name((deps) => {
19499
19507
  };
19500
19508
  }, "inboxService");
19501
19509
 
19502
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/domain/formatting.js
19510
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/formatting.js
19503
19511
  var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "the messenger formatter returned invalid text spans"), "invalid");
19504
19512
  var validateFormattedText = /* @__PURE__ */ __name((formatted2) => {
19505
19513
  const { text: text2, spans } = formatted2;
@@ -19559,7 +19567,7 @@ var visibleFormattedText = /* @__PURE__ */ __name((formatted2) => {
19559
19567
  };
19560
19568
  }, "visibleFormattedText");
19561
19569
 
19562
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/moderation/check.js
19570
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/moderation/check.js
19563
19571
  var INVITE = /max\.ru\/join\/|(t|telegram)\.me\/(\+|joinchat\/)|tg:\/\/join/i;
19564
19572
  var LINK2 = /https?:\/\/\S+/i;
19565
19573
  var STRENGTH = { report: 0, delete: 1, remove: 2 };
@@ -19747,7 +19755,7 @@ var nextPoint = /* @__PURE__ */ __name((rows, found) => {
19747
19755
  }, "nextPoint");
19748
19756
  var someUndone = /* @__PURE__ */ __name((rows) => rows.some(undone), "someUndone");
19749
19757
 
19750
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/moderation/rules.js
19758
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/moderation/rules.js
19751
19759
  import { existsSync, readFileSync } from "node:fs";
19752
19760
  import { join } from "node:path";
19753
19761
  var RULE_ACTIONS = ["report", "delete", "remove"];
@@ -19890,7 +19898,7 @@ var assign = /* @__PURE__ */ __name((rules, key, value) => {
19890
19898
  return { ...rules, [head]: { ...rules[head], [tail]: value } };
19891
19899
  }, "assign");
19892
19900
 
19893
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/person-context.js
19901
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/person-context.js
19894
19902
  var CONTEXT_MESSAGES = 10;
19895
19903
  var CONTEXT_BYTES = 64 * 1024;
19896
19904
  var toContext = /* @__PURE__ */ __name((key, message, chatTitle) => ({
@@ -19967,11 +19975,17 @@ var eventsOnce = /* @__PURE__ */ __name(async (store, filter, limit) => {
19967
19975
  return { items, cut: true };
19968
19976
  }, "eventsOnce");
19969
19977
  var readsOf = /* @__PURE__ */ __name((record2, asked) => record2.identities.flatMap((identity) => (identity.provider === asked.provider ? [asked.account] : identity.accounts).filter((account) => identity.accounts.includes(account)).map((account) => ({ key: { provider: identity.provider, account }, identity }))), "readsOf");
19970
- var personContext = /* @__PURE__ */ __name(async (store, asked, reference, { messages = CONTEXT_MESSAGES, bytes: bytes2 = CONTEXT_BYTES, since, now = Date.now() } = {}) => {
19978
+ var personContext = /* @__PURE__ */ __name(async (store, asked, reference, options = {}) => {
19971
19979
  const found = pickPerson(reference, await store.people.people(asked.provider, { account: asked.account }));
19972
19980
  const record2 = await store.people.personOf({ provider: asked.provider, id: found.id });
19973
19981
  if (!record2)
19974
19982
  throw new CliError("not_found", `no person ${found.id} in the store`);
19983
+ return {
19984
+ person: { ...record2, provider: asked.provider, id: found.id },
19985
+ ...await recordContext(store, record2, readsOf(record2, asked), options)
19986
+ };
19987
+ }, "personContext");
19988
+ var recordContext = /* @__PURE__ */ __name(async (store, record2, reads, { messages = CONTEXT_MESSAGES, bytes: bytes2 = CONTEXT_BYTES, since, now = Date.now() } = {}) => {
19975
19989
  const recent = /* @__PURE__ */ __name((message) => since === void 0 || Date.parse(message.timestamp) >= since, "recent");
19976
19990
  const shared = [];
19977
19991
  const notRead = [];
@@ -19980,7 +19994,7 @@ var personContext = /* @__PURE__ */ __name(async (store, asked, reference, { mes
19980
19994
  const theirs = [];
19981
19995
  const mentions = [];
19982
19996
  let cut = false;
19983
- for (const { key, identity } of readsOf(record2, asked)) {
19997
+ for (const { key, identity } of reads) {
19984
19998
  const chats = await store.chats.chatsWith(key, identity.id);
19985
19999
  for (const chat of chats) {
19986
20000
  shared.push({ ...key, chatId: chat.id, title: chat.title, kind: chat.kind, lastMessageAt: chat.lastMessageAt });
@@ -20048,7 +20062,6 @@ var personContext = /* @__PURE__ */ __name(async (store, asked, reference, { mes
20048
20062
  cut ||= direct.length > messages || groups.length > messages || mentions.length > messages;
20049
20063
  const kept = withinBytes(lists, bytes2);
20050
20064
  return {
20051
- person: { ...record2, provider: asked.provider, id: found.id },
20052
20065
  shared: shared.sort((a, b) => Date.parse(b.lastMessageAt ?? "") - Date.parse(a.lastMessageAt ?? "")),
20053
20066
  last: {
20054
20067
  fromThem: each.find((message) => !message.outgoing) ?? null,
@@ -20066,7 +20079,7 @@ var personContext = /* @__PURE__ */ __name(async (store, asked, reference, { mes
20066
20079
  complete: notRead.length === 0,
20067
20080
  notRead
20068
20081
  };
20069
- }, "personContext");
20082
+ }, "recordContext");
20070
20083
  var withinBytes = /* @__PURE__ */ __name((lists, bytes2) => {
20071
20084
  let used = 0;
20072
20085
  let cut = false;
@@ -20146,10 +20159,10 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
20146
20159
  };
20147
20160
  }, "personMessages");
20148
20161
 
20149
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
20162
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
20150
20163
  import { createHash } from "node:crypto";
20151
20164
 
20152
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/meeting-reference.js
20165
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/meeting-reference.js
20153
20166
  var missing2 = /* @__PURE__ */ __name(() => new CliError("not_found", "the meeting evidence is unavailable for this account"), "missing");
20154
20167
  var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId, reference, options = {}) => {
20155
20168
  const parsed = parseMeetingReference(reference);
@@ -20167,7 +20180,7 @@ var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId,
20167
20180
  return { parsed, meeting };
20168
20181
  }, "authorizedMeetingMetadata");
20169
20182
 
20170
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
20183
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
20171
20184
  var hash = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
20172
20185
  var checkMeetingCancelled = /* @__PURE__ */ __name((signal) => {
20173
20186
  if (signal?.aborted)
@@ -20366,7 +20379,7 @@ var readMeetingEvidence = /* @__PURE__ */ __name(async (store, accountId, refere
20366
20379
  return { ...packet, fingerprint: hash(packet) };
20367
20380
  }, "readMeetingEvidence");
20368
20381
 
20369
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/person-meeting-context.js
20382
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/person-meeting-context.js
20370
20383
  var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference, options) => {
20371
20384
  const { meetings = 10, cues = 5, bytes: bytes2 = 64 * 1024, scanLimit = 1e3, since, signal } = options;
20372
20385
  const requestedAccounts = options.accountIds;
@@ -20465,7 +20478,7 @@ var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference,
20465
20478
  };
20466
20479
  }, "personMeetingContext");
20467
20480
 
20468
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/person-preparation.js
20481
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/person-preparation.js
20469
20482
  var PREPARE_BYTES = 96 * 1024;
20470
20483
  var MEETINGS = 5;
20471
20484
  var CUES = 3;
@@ -20582,7 +20595,7 @@ var meetingsOf = /* @__PURE__ */ __name(async (store, uid, stored, since, left)
20582
20595
  }
20583
20596
  }, "meetingsOf");
20584
20597
 
20585
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/person-profile.js
20598
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/person-profile.js
20586
20599
  var personProfile = /* @__PURE__ */ __name(async (deps, person, known2) => {
20587
20600
  const online = deps.offline ? void 0 : await deps.connection();
20588
20601
  const held = await storeIfOpen(deps);
@@ -20652,7 +20665,7 @@ var quiet = /* @__PURE__ */ __name((facts) => facts.chats.map(({ id: id2, title,
20652
20665
  complete: false
20653
20666
  })), "quiet");
20654
20667
 
20655
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/person-timeline.js
20668
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/person-timeline.js
20656
20669
  var TIMELINE_ITEMS = 50;
20657
20670
  var TIMELINE_MAX = 500;
20658
20671
  var SCOPES = ["personal", "work"];
@@ -20707,7 +20720,7 @@ var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { sc
20707
20720
  };
20708
20721
  }, "personTimeline");
20709
20722
 
20710
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/people.js
20723
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/people.js
20711
20724
  var peopleService = /* @__PURE__ */ __name((deps) => {
20712
20725
  const localCard = /* @__PURE__ */ __name(async (card, includeNotes = false) => {
20713
20726
  const held = await storeIfOpen(deps);
@@ -20934,7 +20947,7 @@ var withoutPhone = /* @__PURE__ */ __name((answer) => {
20934
20947
  return rest;
20935
20948
  }, "withoutPhone");
20936
20949
 
20937
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/task-tag-filters.js
20950
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/task-tag-filters.js
20938
20951
  var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
20939
20952
  const tags = /* @__PURE__ */ new Map();
20940
20953
  for (const node of query ? walkQuery(query.root) : [])
@@ -20943,7 +20956,7 @@ var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
20943
20956
  return tags;
20944
20957
  }, "taskTagFilters");
20945
20958
 
20946
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/tasks.js
20959
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/tasks.js
20947
20960
  var TASK_QUERY = {
20948
20961
  entity: "task",
20949
20962
  backend: "sql",
@@ -21423,7 +21436,7 @@ var taskView = /* @__PURE__ */ __name(async (store, account, task2) => {
21423
21436
  };
21424
21437
  }, "taskView");
21425
21438
 
21426
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/chat-coverage.js
21439
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/chat-coverage.js
21427
21440
  var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
21428
21441
  const ids = [...new Set(chatIds)];
21429
21442
  if (ids.length === 0)
@@ -21449,7 +21462,7 @@ var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
21449
21462
  }));
21450
21463
  }, "chatCoverage");
21451
21464
 
21452
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/context/evidence-response.js
21465
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/context/evidence-response.js
21453
21466
  var contextSourceKey = /* @__PURE__ */ __name((source) => JSON.stringify([source.kind, source.accountId, source.provider, source.account]), "contextSourceKey");
21454
21467
  var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
21455
21468
  const fail2 = /* @__PURE__ */ __name(() => {
@@ -21513,7 +21526,7 @@ var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
21513
21526
  }
21514
21527
  }, "validateContextEvidencePage");
21515
21528
 
21516
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/context/read-budget.js
21529
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/context/read-budget.js
21517
21530
  var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
21518
21531
  if (!limits || typeof limits !== "object" || Array.isArray(limits))
21519
21532
  throw new CliError("validation_error", "limits needs a context read allowance");
@@ -21566,7 +21579,7 @@ var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
21566
21579
  };
21567
21580
  }, "contextReadBudget");
21568
21581
 
21569
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/context-evidence.js
21582
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/context-evidence.js
21570
21583
  var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits) => {
21571
21584
  if (!port || typeof port.read !== "function")
21572
21585
  throw new CliError("configuration_error", "context evidence reader is unavailable");
@@ -21610,7 +21623,7 @@ var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits)
21610
21623
  };
21611
21624
  }, "createContextEvidenceReader");
21612
21625
 
21613
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/excerpt.js
21626
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/excerpt.js
21614
21627
  var queryWords = /* @__PURE__ */ __name((query) => query.toLowerCase().split(/\s+/).map((word) => word.replace(/^[\p{L}_]+:/u, "").replace(/~\d+$/u, "").replace(/^[^\p{L}\p{N}]+|[^\p{L}\p{N}]+$/gu, "")).filter((word) => word.length > 2 && !["and", "or", "not"].includes(word)), "queryWords");
21615
21628
  var excerpt = /* @__PURE__ */ __name((text2, query, size2 = 240, options = {}) => {
21616
21629
  const flat = text2.replace(/\s+/g, " ").trim();
@@ -21626,18 +21639,18 @@ var excerpt = /* @__PURE__ */ __name((text2, query, size2 = 240, options = {}) =
21626
21639
  }, "excerpt");
21627
21640
  var withExcerpt = /* @__PURE__ */ __name(({ matchedText, ...hit }, query) => ({ ...hit, excerpt: excerpt(matchedText ?? hit.text, query) }), "withExcerpt");
21628
21641
 
21629
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/media-archive.js
21642
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/media-archive.js
21630
21643
  import { setTimeout as sleep } from "node:timers/promises";
21631
21644
 
21632
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
21645
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
21633
21646
  import { lstat } from "node:fs/promises";
21634
21647
 
21635
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
21648
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
21636
21649
  import { createHash as createHash3, randomUUID as randomUUID2 } from "node:crypto";
21637
21650
  import { open as open3, rename as rename2, unlink as unlink2 } from "node:fs/promises";
21638
21651
  import { join as join3 } from "node:path";
21639
21652
 
21640
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-metadata.js
21653
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-metadata.js
21641
21654
  import { createHash as createHash2 } from "node:crypto";
21642
21655
  var metadataLimit = 16384;
21643
21656
  var partialIdentity = /* @__PURE__ */ __name((locator) => JSON.stringify([locator.provider, locator.account, locator.occurrenceId, locator.assetId]), "partialIdentity");
@@ -21697,7 +21710,7 @@ var readPartialMetadata = /* @__PURE__ */ __name(async (path, locator, maxBytes,
21697
21710
  }
21698
21711
  }, "readPartialMetadata");
21699
21712
 
21700
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-writer.js
21713
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-writer.js
21701
21714
  import { randomUUID } from "node:crypto";
21702
21715
  import { open as open2, rename, unlink } from "node:fs/promises";
21703
21716
  import { join as join2 } from "node:path";
@@ -21789,7 +21802,7 @@ var partialWriter = /* @__PURE__ */ __name(async (input) => {
21789
21802
  };
21790
21803
  }, "partialWriter");
21791
21804
 
21792
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
21805
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
21793
21806
  var NativeRecordingPartialStore = class {
21794
21807
  static {
21795
21808
  __name(this, "NativeRecordingPartialStore");
@@ -21896,12 +21909,12 @@ var NativeRecordingPartialStore = class {
21896
21909
  }
21897
21910
  };
21898
21911
 
21899
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
21912
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
21900
21913
  import { createHash as createHash4 } from "node:crypto";
21901
21914
  import { link as link2 } from "node:fs/promises";
21902
21915
  import { basename as basename2, dirname as dirname2, join as join5, resolve as resolve2 } from "node:path";
21903
21916
 
21904
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-files.js
21917
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-files.js
21905
21918
  import { unlink as unlink3 } from "node:fs/promises";
21906
21919
  var verifiedPublicationFile = /* @__PURE__ */ __name(async (path, expected, signal, writable = false) => {
21907
21920
  signal?.throwIfAborted();
@@ -21936,7 +21949,7 @@ var commitPublication = /* @__PURE__ */ __name(async (root, partialPath, finalPa
21936
21949
  signal?.throwIfAborted();
21937
21950
  }, "commitPublication");
21938
21951
 
21939
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-journal.js
21952
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-journal.js
21940
21953
  import { randomUUID as randomUUID3 } from "node:crypto";
21941
21954
  import { open as open4, rename as rename3, unlink as unlink4 } from "node:fs/promises";
21942
21955
  import { join as join4 } from "node:path";
@@ -22009,7 +22022,7 @@ var writePublicationJournal = /* @__PURE__ */ __name(async (root, path, prefix,
22009
22022
  }
22010
22023
  }, "writePublicationJournal");
22011
22024
 
22012
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
22025
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
22013
22026
  var NativeRecordingPublication = class {
22014
22027
  static {
22015
22028
  __name(this, "NativeRecordingPublication");
@@ -22082,7 +22095,7 @@ var NativeRecordingPublication = class {
22082
22095
  }
22083
22096
  };
22084
22097
 
22085
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/media-archive-manifest.js
22098
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/media-archive-manifest.js
22086
22099
  import { createHash as createHash5 } from "node:crypto";
22087
22100
  import { readdir } from "node:fs/promises";
22088
22101
  import { isAbsolute as isAbsolute2, join as join6, resolve as resolve3 } from "node:path";
@@ -22169,7 +22182,7 @@ var commitMediaEntry = /* @__PURE__ */ __name((root, one, beforePublish) => writ
22169
22182
  beforePublish
22170
22183
  }), "commitMediaEntry");
22171
22184
 
22172
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
22185
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
22173
22186
  var validator = '"media-completed-v1"';
22174
22187
  var maximumFileBytes = 64 * 1024 * 1024 * 1024;
22175
22188
  var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2, beforeWrite, signal, metadata = {}) => {
@@ -22270,7 +22283,7 @@ var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2
22270
22283
  return entry;
22271
22284
  }, "archiveMediaFile");
22272
22285
 
22273
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/media-archive-locks.js
22286
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/media-archive-locks.js
22274
22287
  import { mkdir, realpath } from "node:fs/promises";
22275
22288
  import { join as join7, resolve as resolve4 } from "node:path";
22276
22289
  var archiveLocations = /* @__PURE__ */ __name(async (initial, signal) => {
@@ -22337,7 +22350,7 @@ var withMediaArchiveLocks = /* @__PURE__ */ __name(async (directory2, signal, ru
22337
22350
  throw new CliError("validation_error", "archive locations changed during locking; run the command again");
22338
22351
  }, "withMediaArchiveLocks");
22339
22352
 
22340
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/media-archive.js
22353
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/media-archive.js
22341
22354
  var validateMediaSince = /* @__PURE__ */ __name((value, flag = "--since-time") => {
22342
22355
  if (value === void 0)
22343
22356
  return void 0;
@@ -22490,7 +22503,7 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options) => {
22490
22503
  }, { create: true });
22491
22504
  }, "archiveMedia");
22492
22505
 
22493
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/media-archive-move.js
22506
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/media-archive-move.js
22494
22507
  import { realpath as realpath2, unlink as unlink5 } from "node:fs/promises";
22495
22508
  import { basename as basename3, dirname as dirname3, join as join8, resolve as resolve5 } from "node:path";
22496
22509
  var canonicalDestination = /* @__PURE__ */ __name(async (directory2) => {
@@ -22643,7 +22656,7 @@ var moveMediaArchive = /* @__PURE__ */ __name(async (options) => {
22643
22656
  }, { additional: [target2], createAdditional: !options.dryRun });
22644
22657
  }, "moveMediaArchive");
22645
22658
 
22646
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/model-downloads.js
22659
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/model-downloads.js
22647
22660
  var bytesOf = /* @__PURE__ */ __name((model) => model.files.reduce((sum2, file2) => sum2 + file2.bytes, 0), "bytesOf");
22648
22661
  var nativeRuntime = /* @__PURE__ */ __name(async ({ env, progress = /* @__PURE__ */ __name(() => {
22649
22662
  }, "progress") }) => {
@@ -22666,7 +22679,7 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
22666
22679
  }
22667
22680
  await nativeRuntime({ env, progress });
22668
22681
  progress(`${model.id}: loading it once to check it works`);
22669
- const { openEmbedder: openEmbedder2 } = await import("./embed-US7X5P5D.js");
22682
+ const { openEmbedder: openEmbedder2 } = await import("./embed-VZYBZEWI.js");
22670
22683
  const embedder = await openEmbedder2(model, directory2);
22671
22684
  try {
22672
22685
  const [vector] = await embedder.embed(["check"], "query");
@@ -22687,7 +22700,7 @@ var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /
22687
22700
  }
22688
22701
  await nativeRuntime({ env, progress });
22689
22702
  progress(`${model.id}: loading it once to check it works`);
22690
- const { openReranker } = await import("./rerank-23GXWT2V.js");
22703
+ const { openReranker } = await import("./rerank-ZFATWWBE.js");
22691
22704
  const reranker = await openReranker(model, directory2);
22692
22705
  try {
22693
22706
  await reranker.score("check", ["check"]);
@@ -22705,7 +22718,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
22705
22718
  await installFiles(placedImage(model, directory2), { progress });
22706
22719
  }
22707
22720
  progress(`${model.id}: loading it once to check it works`);
22708
- const { openPictureEmbedder } = await import("./embedder-63Z7ZBYG.js");
22721
+ const { openPictureEmbedder } = await import("./embedder-GSWBGHRK.js");
22709
22722
  const embedder = await openPictureEmbedder(model, directory2);
22710
22723
  try {
22711
22724
  const vector = await embedder.embedQuery("check");
@@ -22717,7 +22730,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
22717
22730
  return { model, directory: directory2 };
22718
22731
  }, "downloadImageModel");
22719
22732
 
22720
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/project-gathering-around.js
22733
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/project-gathering-around.js
22721
22734
  var storedMessageNeighbours = /* @__PURE__ */ __name((messages) => ({
22722
22735
  async around(ref, window3) {
22723
22736
  const at = parseLocator(ref);
@@ -22812,7 +22825,7 @@ var storedNeighbours = /* @__PURE__ */ __name((store) => {
22812
22825
  };
22813
22826
  }, "storedNeighbours");
22814
22827
 
22815
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/project-gathering-request.js
22828
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/project-gathering-request.js
22816
22829
  import { createHash as createHash6 } from "node:crypto";
22817
22830
  var DAY = 864e5;
22818
22831
  var MAX_TIME = 864e13;
@@ -23128,7 +23141,7 @@ var decodeCheckpoint = /* @__PURE__ */ __name((text2, plan) => {
23128
23141
  return value;
23129
23142
  }, "decodeCheckpoint");
23130
23143
 
23131
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/project-gathering.js
23144
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/project-gathering.js
23132
23145
  var terminal = /* @__PURE__ */ new Set(["done", "unavailable", "failed"]);
23133
23146
  var PAGE2 = 20;
23134
23147
  var PEOPLE = 20;
@@ -23532,7 +23545,7 @@ var peopleOf = /* @__PURE__ */ __name((items, senderOf) => {
23532
23545
  return [...byKey.values()].sort((a, b) => b.items - a.items || a.name.localeCompare(b.name));
23533
23546
  }, "peopleOf");
23534
23547
 
23535
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-matching.js
23548
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-matching.js
23536
23549
  var normalizedText = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "normalizedText");
23537
23550
  var termsOf = /* @__PURE__ */ __name((entry) => [
23538
23551
  { name: entry.name, kind: "canonical" },
@@ -23576,7 +23589,7 @@ var matchVocabularyTerms = /* @__PURE__ */ __name((catalog, texts) => {
23576
23589
  return result.sort((a, b) => Number(a.entry.id) - Number(b.entry.id));
23577
23590
  }, "matchVocabularyTerms");
23578
23591
 
23579
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/project-gathering-mentions.js
23592
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/project-gathering-mentions.js
23580
23593
  var KINDS = ["project", "tag", "topic"];
23581
23594
  var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering, options = {}) => {
23582
23595
  if (typeof vocabulary?.vocabulary !== "function")
@@ -23631,7 +23644,7 @@ var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering,
23631
23644
  };
23632
23645
  }, "findEvidenceMentions");
23633
23646
 
23634
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/stored-project-gathering.js
23647
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/stored-project-gathering.js
23635
23648
  var PROJECT_ID = /^project:[1-9]\d*$/;
23636
23649
  var canonicalProjectRef = /* @__PURE__ */ __name(async (store, reference) => {
23637
23650
  if (PROJECT_ID.test(reference)) {
@@ -23797,7 +23810,7 @@ var gatherStoredProject = /* @__PURE__ */ __name(async (store, input) => {
23797
23810
  return { projectRef: project.ref, unreadSources: [...unread, ...unreadChats, ...members.left], ...gathered, mentions };
23798
23811
  }, "gatherStoredProject");
23799
23812
 
23800
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/account.js
23813
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/account.js
23801
23814
  var accountService = /* @__PURE__ */ __name((deps) => {
23802
23815
  const online = /* @__PURE__ */ __name(async (command) => {
23803
23816
  if (deps.offline)
@@ -23869,7 +23882,7 @@ var accountService = /* @__PURE__ */ __name((deps) => {
23869
23882
  };
23870
23883
  }, "accountService");
23871
23884
 
23872
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/domain/send-time.js
23885
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/send-time.js
23873
23886
  var MINUTE = 6e4;
23874
23887
  var YEAR = 365 * 24 * 60 * MINUTE;
23875
23888
  var DELAY = /^(\d+)(m|h|d)$/;
@@ -23888,7 +23901,7 @@ var sendTime = /* @__PURE__ */ __name((value, now = Date.now(), flag = "--at-tim
23888
23901
  return new Date(at - at % MINUTE).toISOString();
23889
23902
  }, "sendTime");
23890
23903
 
23891
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/admin.js
23904
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/admin.js
23892
23905
  var recordMembership = /* @__PURE__ */ __name(async (deps, operationId, done2, change, fix, write) => {
23893
23906
  try {
23894
23907
  const held = await accountStoreIfOpen(deps);
@@ -24135,7 +24148,7 @@ var linkLimits = /* @__PURE__ */ __name(({ approval, expires, maxUses }) => {
24135
24148
  return expires === void 0 ? void 0 : sendTime(expires, Date.now(), "--expire-time");
24136
24149
  }, "linkLimits");
24137
24150
 
24138
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/mail-search.js
24151
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/mail-search.js
24139
24152
  var THREADS_PAGE = 500;
24140
24153
  var threadsOf = /* @__PURE__ */ __name(async (store, key) => {
24141
24154
  const account = await store.accounts.storedAccount(key).catch(() => void 0);
@@ -24214,7 +24227,7 @@ var readMail = /* @__PURE__ */ __name(async (store, locator, { before: before2 =
24214
24227
  return thread.slice(Math.max(0, at - before2), at + after + 1).map((hit) => hit.id === message ? { ...hit, anchor: true } : hit);
24215
24228
  }, "readMail");
24216
24229
 
24217
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/search-kind.js
24230
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/search-kind.js
24218
24231
  var NO_MAIL = "no_mail";
24219
24232
  var MAIL = "email";
24220
24233
  var listContextOf = /* @__PURE__ */ __name(async (store, account, app, stored) => {
@@ -24261,7 +24274,7 @@ var accountsOfKind = /* @__PURE__ */ __name((kind, chosen, held, explicit, comma
24261
24274
  return chosenMail.map(({ provider, account }) => ({ provider, account }));
24262
24275
  }, "accountsOfKind");
24263
24276
 
24264
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/messages-search.js
24277
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/messages-search.js
24265
24278
  var MAIL_FIELDS = /* @__PURE__ */ new Set(["to", "cc", "bcc", "subject", "mailbox", "label", "is"]);
24266
24279
  var positiveSources = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "in" ? [node.value.toLowerCase()] : [] : node.clauses.filter(({ occur }) => occur !== "must_not").flatMap(({ node: node2 }) => positiveSources(node2)), "positiveSources");
24267
24280
  var prepareLucene = /* @__PURE__ */ __name(async (store, account, request, messenger) => {
@@ -24609,7 +24622,7 @@ var statsLucene = /* @__PURE__ */ __name(async (store, account, request, messeng
24609
24622
  };
24610
24623
  }, "statsLucene");
24611
24624
 
24612
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/rankings-selection.js
24625
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/rankings-selection.js
24613
24626
  var RANKING_SELECTION_BYTES = 64 * 1024;
24614
24627
  var object = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0, "object");
24615
24628
  function invalid3(message = "ranking selection is invalid \u2014 obtain a new drilldown from stats top") {
@@ -24778,7 +24791,7 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
24778
24791
  };
24779
24792
  }, "readRankingSelection");
24780
24793
 
24781
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/search-record.js
24794
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/search-record.js
24782
24795
  var canonical = /* @__PURE__ */ __name((value, nested = false) => Array.isArray(value) ? value.map((one) => canonical(one, true)) : value !== null && typeof value === "object" ? Object.fromEntries(Object.entries(value).filter(([, one]) => one !== void 0 && (nested || one !== false)).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([key, one]) => [key, canonical(one, true)])) : value, "canonical");
24783
24796
  var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
24784
24797
  command,
@@ -24788,7 +24801,7 @@ var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
24788
24801
  fieldsVersion: FIELD_VERSION
24789
24802
  }), "searchRecordOf");
24790
24803
 
24791
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/admin-statistics.js
24804
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/admin-statistics.js
24792
24805
  function invalid4(message) {
24793
24806
  throw new CliError("validation_error", message);
24794
24807
  }
@@ -25082,7 +25095,7 @@ var adminStatisticsService = /* @__PURE__ */ __name((deps) => ({
25082
25095
  }, "evidence")
25083
25096
  }), "adminStatisticsService");
25084
25097
 
25085
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/agenda.js
25098
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/agenda.js
25086
25099
  var DAY2 = 864e5;
25087
25100
  var CLAIMS = ["none", "mine", "others", "any"];
25088
25101
  var TASK_FIELDS = /* @__PURE__ */ new Set(["tag", "category", "claimed"]);
@@ -25324,10 +25337,10 @@ var agendaItem = /* @__PURE__ */ __name((shown) => {
25324
25337
  };
25325
25338
  }, "agendaItem");
25326
25339
 
25327
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/archive.js
25340
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/archive.js
25328
25341
  import { setTimeout as sleep3 } from "node:timers/promises";
25329
25342
 
25330
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/backfill-estimate.js
25343
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/backfill-estimate.js
25331
25344
  var REQUEST_MS = 400;
25332
25345
  var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, maxPages, pauseMs }) => {
25333
25346
  const lowest = ranges[0];
@@ -25350,13 +25363,13 @@ var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, max
25350
25363
  };
25351
25364
  }, "estimateBackfill");
25352
25365
 
25353
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/domain/recovery.js
25366
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/recovery.js
25354
25367
  var withRecovery = /* @__PURE__ */ __name((error) => ({
25355
25368
  ...error,
25356
25369
  retryable: typeof error.retryable === "boolean" ? error.retryable : error.code === "rate_limited" || error.status === 429
25357
25370
  }), "withRecovery");
25358
25371
 
25359
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/batch.js
25372
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/batch.js
25360
25373
  var actionable = /* @__PURE__ */ __name((error) => {
25361
25374
  if (isCliFailure(error))
25362
25375
  return withRecovery({ code: error.code, message: error.message, ...error.details });
@@ -25439,7 +25452,7 @@ var mergeBatches = /* @__PURE__ */ __name((a, b) => {
25439
25452
  };
25440
25453
  }, "mergeBatches");
25441
25454
 
25442
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/patience.js
25455
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/patience.js
25443
25456
  import { setTimeout as sleep2 } from "node:timers/promises";
25444
25457
  var LONGEST_WAIT_MS = 5 * 60 * 1e3;
25445
25458
  var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
@@ -25462,7 +25475,7 @@ var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
25462
25475
  }
25463
25476
  }, "patiently");
25464
25477
 
25465
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/images/context/index.js
25478
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/images/context/index.js
25466
25479
  var CONTEXT_MESSAGES2 = 3;
25467
25480
  var CONTEXT_MINUTES = 10;
25468
25481
  var MAX_CHARS = 1200;
@@ -25486,12 +25499,12 @@ var context = {
25486
25499
  }, "describe")
25487
25500
  };
25488
25501
 
25489
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/images/registry.js
25502
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/images/registry.js
25490
25503
  var BUILT_INS = [context];
25491
25504
  var providers = [...BUILT_INS];
25492
25505
  var registeredImageProviders = /* @__PURE__ */ __name(() => providers, "registeredImageProviders");
25493
25506
 
25494
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/conversations.js
25507
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/conversations.js
25495
25508
  var READ_PAGE = 5e3;
25496
25509
  var CHAIN = 50;
25497
25510
  var CONVERSATION_QUERY = {
@@ -25643,7 +25656,7 @@ var sized = /* @__PURE__ */ __name((size2) => {
25643
25656
  return size2;
25644
25657
  }, "sized");
25645
25658
 
25646
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/embeddings-maintenance.js
25659
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/embeddings-maintenance.js
25647
25660
  var REFRESH_BOUNDS = { maxChats: 20, maxChunks: 2e3 };
25648
25661
  var MESSAGE_PAGE = 5e3;
25649
25662
  var PER_SESSION = 8;
@@ -25662,7 +25675,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
25662
25675
  price: remote.price,
25663
25676
  installed: true,
25664
25677
  perBatch: PER_REQUEST * concurrency,
25665
- open: /* @__PURE__ */ __name(async () => (await import("./remote-6IEFZFGO.js")).openRemote(remote, apiKey, { concurrency }), "open")
25678
+ open: /* @__PURE__ */ __name(async () => (await import("./remote-DABI7PSQ.js")).openRemote(remote, apiKey, { concurrency }), "open")
25666
25679
  };
25667
25680
  }
25668
25681
  const model = textModel(choice);
@@ -25679,7 +25692,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
25679
25692
  if (!isTextModelInstalled(model, directory2))
25680
25693
  throw notDownloaded(model.id);
25681
25694
  if (apart) {
25682
- const { openProcess } = await import("./process-CGLNXFIU.js");
25695
+ const { openProcess } = await import("./process-QKEFL5HL.js");
25683
25696
  return openProcess(model, directory2, { threads: threads ?? defaultThreads() });
25684
25697
  }
25685
25698
  return openEmbedder(model, directory2, { threads: threads ?? defaultThreads() });
@@ -25968,7 +25981,7 @@ var shaped = /* @__PURE__ */ __name(({ chatId, builtAt, algorithmVersion, pendin
25968
25981
  return { ...one, state };
25969
25982
  }, "shaped");
25970
25983
 
25971
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/search-catchup.js
25984
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/search-catchup.js
25972
25985
  var CATCH_UP_BOUNDS = { maxChunks: 500, maxMessages: 1e4, timeMs: 3e4 };
25973
25986
  var validateCatchUpBounds = /* @__PURE__ */ __name((options) => {
25974
25987
  for (const [key, value, maximum] of [
@@ -26021,7 +26034,7 @@ var catchUpSearch = /* @__PURE__ */ __name(async (deps, chat, options, signal, c
26021
26034
  }
26022
26035
  }, "catchUpSearch");
26023
26036
 
26024
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/archive.js
26037
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/archive.js
26025
26038
  var pushed = /* @__PURE__ */ __name((deps, what) => {
26026
26039
  if (deps.reads === "store") {
26027
26040
  throw new CliError("validation_error", `${what} asks for older history, and this messenger pushes its history instead \u2014 keep \`${typedCommand(deps.messenger.app.command, "serve")}\` running`);
@@ -26342,7 +26355,7 @@ var timeOfKey = /* @__PURE__ */ __name(async (store, account, chatId, key, byTim
26342
26355
  return message?.timestamp ?? fallback;
26343
26356
  }, "timeOfKey");
26344
26357
 
26345
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/archive-gaps.js
26358
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/archive-gaps.js
26346
26359
  import { createHash as createHash7, randomUUID as randomUUID4 } from "node:crypto";
26347
26360
  var GAP_BOUNDS = { maxGaps: 5, limit: 500, timeMs: 3e4 };
26348
26361
  var validateRepair = /* @__PURE__ */ __name((messenger, options) => {
@@ -26479,12 +26492,12 @@ var gapsService = /* @__PURE__ */ __name((deps) => {
26479
26492
  return { plan, repair };
26480
26493
  }, "gapsService");
26481
26494
 
26482
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/attachments.js
26495
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/attachments.js
26483
26496
  import { createHash as createHash9 } from "node:crypto";
26484
- import { constants as constants2 } from "node:fs";
26485
- import { open as open6, readFile, stat as stat2 } from "node:fs/promises";
26497
+ import { constants as constants2, mkdirSync as mkdirSync2 } from "node:fs";
26498
+ import { lstat as lstat4, open as open6, readFile, stat as stat2 } from "node:fs/promises";
26486
26499
 
26487
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/attachments/directory.js
26500
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/attachments/directory.js
26488
26501
  import { lstat as lstat2, readdir as readdir2, realpath as realpath3 } from "node:fs/promises";
26489
26502
  import { basename as basename4, join as join9, relative as relative2, sep as sep2 } from "node:path";
26490
26503
  var MAX_FILES = 1e4;
@@ -26555,15 +26568,15 @@ var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app,
26555
26568
  return choices;
26556
26569
  }, "directoryPaths");
26557
26570
 
26558
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/attachments/documents.js
26571
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/attachments/documents.js
26559
26572
  import { posix } from "node:path";
26560
26573
 
26561
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/attachments/container.js
26574
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/attachments/container.js
26562
26575
  import { setImmediate as tick } from "node:timers/promises";
26563
26576
  import { crc32 } from "node:zlib";
26564
26577
  var import_xmldom = __toESM(require_lib(), 1);
26565
26578
 
26566
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/attachments/encoding.js
26579
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/attachments/encoding.js
26567
26580
  var import_chardet = __toESM(require_lib2(), 1);
26568
26581
  var import_iconv_lite = __toESM(require_lib3(), 1);
26569
26582
  var SAMPLE = 65536;
@@ -26665,7 +26678,7 @@ var decodeXml = /* @__PURE__ */ __name((bytes2) => {
26665
26678
  return result.text;
26666
26679
  }, "decodeXml");
26667
26680
 
26668
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/attachments/container.js
26681
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/attachments/container.js
26669
26682
  var MAX_PART = 10 * 1024 * 1024;
26670
26683
  var MAX_ENTRIES = 1e3;
26671
26684
  var decoder = new TextDecoder("utf-8", { fatal: true });
@@ -26880,7 +26893,7 @@ var elements = /* @__PURE__ */ __name((node, name, namespace) => {
26880
26893
  return found;
26881
26894
  }, "elements");
26882
26895
 
26883
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/attachments/sheets.js
26896
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/attachments/sheets.js
26884
26897
  var columnName = /* @__PURE__ */ __name((column) => {
26885
26898
  let name = "";
26886
26899
  for (let rest = column; rest > 0; rest = Math.floor((rest - 1) / 26))
@@ -26935,7 +26948,7 @@ var sheetText = /* @__PURE__ */ __name((sheets2, maxChars = MAX_TEXT_CHARS) => {
26935
26948
  return { text: parts.join("").trim(), truncated: false };
26936
26949
  }, "sheetText");
26937
26950
 
26938
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/attachments/documents.js
26951
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/attachments/documents.js
26939
26952
  var OFFICE = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
26940
26953
  var TEXT = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
26941
26954
  var TABLE = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
@@ -27335,10 +27348,10 @@ var readDocument = /* @__PURE__ */ __name(async (bytes2, kind, signal) => {
27335
27348
  }
27336
27349
  }, "readDocument");
27337
27350
 
27338
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/attachments/extract.js
27351
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/attachments/extract.js
27339
27352
  import { extname as extname3 } from "node:path";
27340
27353
 
27341
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/readers/engine.js
27354
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/readers/engine.js
27342
27355
  import { readFileSync as readFileSync2 } from "node:fs";
27343
27356
  import { dirname as dirname4, extname as extname2, join as join10 } from "node:path";
27344
27357
  import { fileURLToPath } from "node:url";
@@ -27399,7 +27412,7 @@ var derived = /* @__PURE__ */ __name((bytes2, extractor, read) => {
27399
27412
  }
27400
27413
  }, "derived");
27401
27414
 
27402
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/readers/image/index.js
27415
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/readers/image/index.js
27403
27416
  var IMAGES = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".webp", ".gif", ".heic", ".tif", ".tiff", ".bmp"]);
27404
27417
  var image2 = {
27405
27418
  id: "image",
@@ -27408,7 +27421,7 @@ var image2 = {
27408
27421
  read: /* @__PURE__ */ __name(async () => ({ status: "needs-agent" }), "read")
27409
27422
  };
27410
27423
 
27411
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/readers/doc/index.js
27424
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/readers/doc/index.js
27412
27425
  var OLE = "\xD0\xCF\xE0\xA1\xB1\xE1";
27413
27426
  var doc = {
27414
27427
  id: "doc",
@@ -27420,7 +27433,7 @@ var doc = {
27420
27433
  }), "read")
27421
27434
  };
27422
27435
 
27423
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/readers/docx/index.js
27436
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/readers/docx/index.js
27424
27437
  var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
27425
27438
  var docx = {
27426
27439
  id: "docx",
@@ -27433,7 +27446,7 @@ var docx = {
27433
27446
  }), "read")
27434
27447
  };
27435
27448
 
27436
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/attachments/markup.js
27449
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/attachments/markup.js
27437
27450
  var import_iconv_lite2 = __toESM(require_lib3(), 1);
27438
27451
  var RTF_SKIPPED = /* @__PURE__ */ new Set([
27439
27452
  "fonttbl",
@@ -27609,7 +27622,7 @@ var htmlText = /* @__PURE__ */ __name((source) => {
27609
27622
  }, "htmlText");
27610
27623
  var safeChar = /* @__PURE__ */ __name((code, fallback) => code > 0 && code <= 1114111 ? String.fromCodePoint(code) : fallback, "safeChar");
27611
27624
 
27612
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/readers/html/page.js
27625
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/readers/html/page.js
27613
27626
  var clean = /* @__PURE__ */ __name((value) => typeof value === "string" ? value.replace(/\s+/g, " ").trim() : "", "clean");
27614
27627
  var namesIn = /* @__PURE__ */ __name((value) => [value].flat().map((entry) => typeof entry === "string" ? clean(entry) : clean(entry?.name)).filter(Boolean).join(", "), "namesIn");
27615
27628
  var jsonLdNodes = /* @__PURE__ */ __name((document) => {
@@ -27665,7 +27678,7 @@ var markdownSections = /* @__PURE__ */ __name((text2) => {
27665
27678
  return found.map((section, index) => ({ ...section, end: found[index + 1]?.start ?? text2.length }));
27666
27679
  }, "markdownSections");
27667
27680
 
27668
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/readers/html/index.js
27681
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/readers/html/index.js
27669
27682
  var HTML = /* @__PURE__ */ new Set([".html", ".htm", ".xhtml"]);
27670
27683
  var first = /* @__PURE__ */ __name((...values) => values.find((value) => typeof value === "string" && value !== ""), "first");
27671
27684
  var loaded = /* @__PURE__ */ __name(async (load, name) => {
@@ -27736,7 +27749,7 @@ var html = {
27736
27749
  }, "read")
27737
27750
  };
27738
27751
 
27739
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/readers/office/index.js
27752
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/readers/office/index.js
27740
27753
  var office = {
27741
27754
  id: "office",
27742
27755
  version: documentExtractor("odt"),
@@ -27747,7 +27760,7 @@ var office = {
27747
27760
  }, "read")
27748
27761
  };
27749
27762
 
27750
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/readers/pdf/index.js
27763
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/readers/pdf/index.js
27751
27764
  var pdf = {
27752
27765
  id: "pdf",
27753
27766
  version: "unpdf",
@@ -27814,7 +27827,7 @@ var pdf = {
27814
27827
  }), "read")
27815
27828
  };
27816
27829
 
27817
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/readers/plain/index.js
27830
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/readers/plain/index.js
27818
27831
  var PLAIN = /* @__PURE__ */ new Set([".txt", ".md", ".markdown", ".csv", ".tsv", ".json", ".log"]);
27819
27832
  var isPlain = /* @__PURE__ */ __name((hint) => PLAIN.has(extensionOf(hint)) || hint.mime?.startsWith("text/") || hint.mime === "application/json", "isPlain");
27820
27833
  var readPlain = /* @__PURE__ */ __name((bytes2) => {
@@ -27834,7 +27847,7 @@ var plain = {
27834
27847
  read: /* @__PURE__ */ __name(async (bytes2) => readPlain(bytes2), "read")
27835
27848
  };
27836
27849
 
27837
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/readers/rtf/index.js
27850
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/readers/rtf/index.js
27838
27851
  var rtf = {
27839
27852
  id: "rtf",
27840
27853
  version: "v1",
@@ -27842,10 +27855,10 @@ var rtf = {
27842
27855
  read: /* @__PURE__ */ __name(async (bytes2) => derived(bytes2, "rtf:v1", rtfText), "read")
27843
27856
  };
27844
27857
 
27845
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
27858
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
27846
27859
  import { basename as basename5 } from "node:path";
27847
27860
 
27848
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/attachments/csv-spans.js
27861
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/attachments/csv-spans.js
27849
27862
  var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) => {
27850
27863
  const cells = [];
27851
27864
  let row = 1, column = 1, start = 0, quoted = false, truncated = false;
@@ -27883,7 +27896,7 @@ var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) =
27883
27896
  return { cells, truncated };
27884
27897
  }, "delimitedSpans");
27885
27898
 
27886
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
27899
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
27887
27900
  var DELIMITED = {
27888
27901
  ".csv": ",",
27889
27902
  ".tsv": " ",
@@ -27922,7 +27935,7 @@ var sheets = {
27922
27935
  }, "read")
27923
27936
  };
27924
27937
 
27925
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/readers/registry.js
27938
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/readers/registry.js
27926
27939
  var BUILT_INS2 = [office, pdf, docx, doc, rtf, html, sheets, plain, image2];
27927
27940
  var HEAD_BYTES = 1024;
27928
27941
  var readers = [...BUILT_INS2];
@@ -27932,7 +27945,7 @@ var readWithRegistry = /* @__PURE__ */ __name(async (bytes2, hint, context2) =>
27932
27945
  return reader ? reader.read(bytes2, hint, context2) : { status: "unsupported" };
27933
27946
  }, "readWithRegistry");
27934
27947
 
27935
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/attachments/extract.js
27948
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/attachments/extract.js
27936
27949
  var importEngine = /* @__PURE__ */ __name((name) => importFrom(new URL("attachments/extract.js", import.meta.resolve("@wirecat/cli-core")).href, name), "importEngine");
27937
27950
  var extensionOf2 = /* @__PURE__ */ __name(({ name, path }) => extname3(name ?? path).toLowerCase(), "extensionOf");
27938
27951
  var extractText = /* @__PURE__ */ __name(async (bytes2, hint, load, signal, env = process.env) => {
@@ -29011,7 +29024,7 @@ function imageSize(input) {
29011
29024
  }
29012
29025
  __name(imageSize, "imageSize");
29013
29026
 
29014
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/attachments/ocr.js
29027
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/attachments/ocr.js
29015
29028
  var MAX_PAGES = 20;
29016
29029
  var MAX_PIXELS = 2e7;
29017
29030
  var cancelled2 = /* @__PURE__ */ __name((signal) => {
@@ -29162,7 +29175,7 @@ var ocrPdf = /* @__PURE__ */ __name(async (bytes2, pipeline2, load, signal) => {
29162
29175
  }
29163
29176
  }, "ocrPdf");
29164
29177
 
29165
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/attachments/pdf-preview.js
29178
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/attachments/pdf-preview.js
29166
29179
  var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = importEngine, env = process.env) => {
29167
29180
  const limits = pdfPreviewLimits(env);
29168
29181
  const cancelled4 = /* @__PURE__ */ __name(() => {
@@ -29239,7 +29252,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
29239
29252
  }
29240
29253
  }, "pdfPreview");
29241
29254
 
29242
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/attachments/transfer.js
29255
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/attachments/transfer.js
29243
29256
  import { createHash as createHash8 } from "node:crypto";
29244
29257
  import { constants } from "node:fs";
29245
29258
  import { lstat as lstat3, open as open5 } from "node:fs/promises";
@@ -29347,7 +29360,121 @@ var transferMime = /* @__PURE__ */ __name((head, hint, name = null) => {
29347
29360
  return hint !== null && /^[a-z0-9.+-]+\/[a-z0-9.+-]+$/i.test(hint) ? hint : "application/octet-stream";
29348
29361
  }, "transferMime");
29349
29362
 
29350
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/attachments.js
29363
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/file-download.js
29364
+ import { createWriteStream, mkdirSync } from "node:fs";
29365
+ import { link as link3, rm } from "node:fs/promises";
29366
+ import { join as join11, resolve as resolve6 } from "node:path";
29367
+ import { Readable, Transform } from "node:stream";
29368
+ import { pipeline } from "node:stream/promises";
29369
+ var refreshedFiles = /* @__PURE__ */ __name((files) => files.flatMap(({ kind, name, position, providerRef }) => providerRef === void 0 || Object.keys(providerRef).length === 0 ? [] : [
29370
+ {
29371
+ kind,
29372
+ providerRef,
29373
+ ...name === void 0 ? {} : { name },
29374
+ ...position === void 0 ? {} : { position }
29375
+ }
29376
+ ]), "refreshedFiles");
29377
+ var recordPaths = /* @__PURE__ */ __name(async (messages, chat, message, files, saved, warn, onFailure) => {
29378
+ const downloaded = saved.map((one, index) => ({
29379
+ kind: one.kind,
29380
+ path: one.path,
29381
+ ...files[index]?.name === void 0 ? {} : { name: files[index]?.name },
29382
+ ...files[index]?.position === void 0 ? {} : { position: files[index]?.position },
29383
+ ...files[index]?.providerRef === void 0 ? {} : { providerRef: files[index]?.providerRef }
29384
+ }));
29385
+ try {
29386
+ const kept = await messages.keepDownloaded(chat, message, downloaded);
29387
+ if (kept < downloaded.length && downloaded.some(({ providerRef }) => Object.keys(providerRef ?? {}).length > 0))
29388
+ warn(`message ${message}: a new file reference from the messenger was not saved; the next download asks again`);
29389
+ return kept;
29390
+ } catch (error) {
29391
+ onFailure?.(error);
29392
+ warn(`not recorded in the local store where message ${message}'s files went: ${error.message}`);
29393
+ return 0;
29394
+ }
29395
+ }, "recordPaths");
29396
+ var downloadMessage = /* @__PURE__ */ __name(async (messages, chat, message, output, warn) => {
29397
+ const { files } = await messages.download(chat, message);
29398
+ mkdirSync(output, { recursive: true });
29399
+ const result = await saveFiles(messages, chat, message, files, output, { unique: true, warn });
29400
+ if (result.batch.failed > 0)
29401
+ throw new CliError("provider_error", "some attachments failed; completed downloads are retained", {
29402
+ batch: result.batch,
29403
+ saved: result.saved
29404
+ });
29405
+ return result.saved;
29406
+ }, "downloadMessage");
29407
+ var saveFiles = /* @__PURE__ */ __name(async (messages, chat, message, files, output, { unique = false, warn, onSaved, batch = batchProgress() }) => {
29408
+ const saved = [];
29409
+ const successful = [];
29410
+ for (const [index, file2] of files.entries()) {
29411
+ if (batch.stopped)
29412
+ break;
29413
+ try {
29414
+ const one = await save(file2, output, `${message}-${index + 1}`, { unique });
29415
+ saved.push(one);
29416
+ successful.push(file2);
29417
+ batch.ok();
29418
+ onSaved?.(one);
29419
+ } catch (error) {
29420
+ const issue = batch.fail(message, "download", error, (file2.position ?? index) + 1);
29421
+ warn(`message ${message}, attachment ${(file2.position ?? index) + 1}: ${issue.code} \u2014 ${issue.message}`);
29422
+ }
29423
+ }
29424
+ await recordPaths(messages, chat, message, successful, saved, warn, (error) => batch.fail(message, "record_downloads", error));
29425
+ return { saved, batch: batch.result() };
29426
+ }, "saveFiles");
29427
+ var EXTENSIONS = {
29428
+ "image/jpeg": "jpg",
29429
+ "image/png": "png",
29430
+ "image/webp": "webp",
29431
+ "image/gif": "gif",
29432
+ "video/mp4": "mp4",
29433
+ "video/webm": "webm",
29434
+ "audio/mpeg": "mp3",
29435
+ "audio/ogg": "ogg",
29436
+ "audio/mp4": "m4a",
29437
+ "application/pdf": "pdf"
29438
+ };
29439
+ var BY_KIND = { photo: "jpg" };
29440
+ var save = /* @__PURE__ */ __name(async (file2, directory2, fallbackName, { unique = false } = {}) => {
29441
+ const own = safeName(file2.name);
29442
+ const fileName = /* @__PURE__ */ __name(() => {
29443
+ const extension = EXTENSIONS[file2.mime ?? ""] ?? BY_KIND[file2.kind];
29444
+ return own ?? (extension ? `${fallbackName}.${extension}` : fallbackName);
29445
+ }, "fileName");
29446
+ const partial = join11(directory2, `.${fileName()}.${process.pid}.part`);
29447
+ let bytes2 = 0;
29448
+ const counting = new Transform({
29449
+ transform(chunk, _encoding, done2) {
29450
+ bytes2 += chunk.length;
29451
+ done2(null, chunk);
29452
+ }
29453
+ });
29454
+ try {
29455
+ await pipeline(Readable.from(file2.bytes()), counting, createWriteStream(partial, { flags: "wx", mode: 384 }));
29456
+ const name = fileName();
29457
+ const names2 = unique && own ? [name, `${fallbackName}-${own}`] : [name];
29458
+ for (const candidate of names2) {
29459
+ const path2 = resolve6(join11(directory2, candidate));
29460
+ const taken = await link3(partial, path2).then(() => false, (error) => {
29461
+ if (error.code === "EEXIST")
29462
+ return true;
29463
+ throw error;
29464
+ });
29465
+ if (!taken)
29466
+ return { kind: file2.kind, path: path2, bytes: bytes2 };
29467
+ }
29468
+ const path = resolve6(join11(directory2, names2.at(-1) ?? name));
29469
+ if (unique)
29470
+ return { kind: file2.kind, path, bytes: bytes2, existing: true };
29471
+ throw new CliError("validation_error", `${path} already exists \u2014 nothing was overwritten; choose --output-dir`);
29472
+ } finally {
29473
+ await rm(partial, { force: true });
29474
+ }
29475
+ }, "save");
29476
+
29477
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/attachments.js
29351
29478
  var ATTACHMENT_QUERY = {
29352
29479
  entity: "attachment",
29353
29480
  backend: "sql",
@@ -29702,6 +29829,48 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
29702
29829
  ...preview
29703
29830
  };
29704
29831
  }, "show"),
29832
+ saveHeld: /* @__PURE__ */ __name(async ({ chat, message, attachment: attachment2, output }) => {
29833
+ if (attachment2 !== void 0 && (!Number.isSafeInteger(attachment2) || attachment2 < 1))
29834
+ throw new CliError("validation_error", "attachment must be a position from 1");
29835
+ const store = await accountStore(deps);
29836
+ const { account } = store;
29837
+ const { chatId, messageId } = await messageOf(deps, store, chat, message);
29838
+ const ref = formatLocator({ ...account, chat: chatId, message: messageId });
29839
+ const files = (await store.attachments.attachments({ chatId, messageId, limit: 1e3 })).filter(({ kind }) => !NOT_FILES.has(kind));
29840
+ if (files.length === 0)
29841
+ throw new CliError("not_found", `the local store holds no file of ${ref}`);
29842
+ const chosen = attachment2 === void 0 ? files : files.filter(({ position }) => position === attachment2 - 1);
29843
+ if (chosen.length === 0)
29844
+ throw new CliError("not_found", `${ref} has no file at position ${attachment2}; its files are at ${files.map(({ position }) => position + 1).join(", ")}`);
29845
+ const env = deps.env ?? process.env;
29846
+ const held = await Promise.all(chosen.map(async (file2) => {
29847
+ const missing4 = new CliError("not_found", `file ${file2.position + 1} of ${ref} is not saved on this computer; run messages download without --offline`);
29848
+ if (file2.localPath === null)
29849
+ throw missing4;
29850
+ if (refusedPlace(file2.localPath, deps.messenger.app, env))
29851
+ throw new CliError("validation_error", "cannot copy known credential files, the WireCat apps' own files or the message store");
29852
+ const found = await lstat4(file2.localPath).catch(() => void 0);
29853
+ if (!found)
29854
+ throw missing4;
29855
+ if (!found.isFile())
29856
+ throw new CliError("validation_error", "the saved attachment must be a regular file");
29857
+ return { file: file2, path: file2.localPath };
29858
+ }));
29859
+ mkdirSync2(output, { recursive: true });
29860
+ const saved = [];
29861
+ for (const { file: file2, path } of held)
29862
+ saved.push(await save({
29863
+ kind: file2.kind,
29864
+ ...file2.name === null ? {} : { name: file2.name },
29865
+ ...file2.mime === null ? {} : { mime: file2.mime },
29866
+ position: file2.position,
29867
+ bytes: /* @__PURE__ */ __name(async function* () {
29868
+ const handle = await open6(path, constants2.O_RDONLY | (constants2.O_NOFOLLOW ?? 0));
29869
+ yield* handle.createReadStream();
29870
+ }, "bytes")
29871
+ }, output, `${messageId}-${file2.position + 1}`));
29872
+ return saved;
29873
+ }, "saveHeld"),
29705
29874
  setText: /* @__PURE__ */ __name(async ({ chat, message, attachment: attachment2, text: text2 }) => {
29706
29875
  if (text2.trim() === "")
29707
29876
  throw new CliError("validation_error", "the text is empty \u2014 nothing to keep");
@@ -29728,7 +29897,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
29728
29897
  }, "setText")
29729
29898
  }), "attachmentsService");
29730
29899
 
29731
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/chat-documents.js
29900
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/chat-documents.js
29732
29901
  var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
29733
29902
  list: /* @__PURE__ */ __name(async (chat, { limit, offset, ref }) => {
29734
29903
  const store = await accountStore(deps);
@@ -29758,7 +29927,7 @@ var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
29758
29927
  }, "list")
29759
29928
  }), "chatDocumentsService");
29760
29929
 
29761
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/retention.js
29930
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/retention.js
29762
29931
  var observationDuration = /* @__PURE__ */ __name((text2, flag) => {
29763
29932
  const match = /^(\d+(?:\.\d+)?)([smhdw])$/.exec(text2);
29764
29933
  const units2 = { s: 1e3, m: 6e4, h: 36e5, d: 864e5, w: 6048e5 };
@@ -29845,7 +30014,7 @@ var isRetentionSelection = /* @__PURE__ */ __name((selection) => {
29845
30014
  }
29846
30015
  }, "isRetentionSelection");
29847
30016
 
29848
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/counters.js
30017
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/counters.js
29849
30018
  var counterFields = /* @__PURE__ */ __name((text2 = "views,reactions,comments") => {
29850
30019
  const fields = text2.split(",").map((one) => one.trim());
29851
30020
  if (!fields.length || fields.some((one) => !COUNTER_FIELDS.includes(one)) || new Set(fields).size !== fields.length)
@@ -30052,7 +30221,7 @@ var countersService = /* @__PURE__ */ __name((deps) => {
30052
30221
  };
30053
30222
  }, "countersService");
30054
30223
 
30055
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/search-refresh.js
30224
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/search-refresh.js
30056
30225
  var SYNC_KEY = "messages.sync-first";
30057
30226
  var SYNC_BOUNDS = { maxChats: 5, timeMs: 3e4, maxMessages: 500 };
30058
30227
  var keyOf2 = /* @__PURE__ */ __name((chat) => JSON.stringify([chat.account.provider, chat.account.account, chat.chatId]), "keyOf");
@@ -30184,7 +30353,7 @@ var withRefresh = /* @__PURE__ */ __name((found, refreshed) => ({
30184
30353
  ...!refreshed || refreshed.complete ? {} : { coverage: { ...found.coverage, state: "stale" } }
30185
30354
  }), "withRefresh");
30186
30355
 
30187
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/embeddings-search.js
30356
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/embeddings-search.js
30188
30357
  var CANDIDATES = 50;
30189
30358
  var WORD_HITS = 200;
30190
30359
  var RRF_K = 60;
@@ -30459,13 +30628,13 @@ var meanOf = /* @__PURE__ */ __name((vectors) => {
30459
30628
  return mean.map((value) => value / length);
30460
30629
  }, "meanOf");
30461
30630
 
30462
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/embeddings.js
30631
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/embeddings.js
30463
30632
  var embeddingsService = /* @__PURE__ */ __name((deps) => ({
30464
30633
  ...embeddingsMaintenance(deps),
30465
30634
  ...embeddingsSearch(deps)
30466
30635
  }), "embeddingsService");
30467
30636
 
30468
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/folders.js
30637
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/folders.js
30469
30638
  var foldersService = /* @__PURE__ */ __name((deps) => {
30470
30639
  const online = /* @__PURE__ */ __name(async (command) => {
30471
30640
  if (deps.offline)
@@ -30606,7 +30775,7 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
30606
30775
  };
30607
30776
  }, "foldersService");
30608
30777
 
30609
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/mentions.js
30778
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/mentions.js
30610
30779
  var REVIEW_COUNT = 500;
30611
30780
  var mentionsService = /* @__PURE__ */ __name((deps) => {
30612
30781
  const located = /* @__PURE__ */ __name(async () => {
@@ -30685,7 +30854,14 @@ var mentionsService = /* @__PURE__ */ __name((deps) => {
30685
30854
  };
30686
30855
  }, "mentionsService");
30687
30856
 
30688
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/domain/message-link.js
30857
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/message-link.js
30858
+ var fileLinks = /* @__PURE__ */ __name((attachments) => hitFiles(attachments).map(({ position, kind, name }) => ({
30859
+ position,
30860
+ kind,
30861
+ ...name === void 0 ? {} : { name },
30862
+ url: null,
30863
+ reason: "unsupported_provider"
30864
+ })), "fileLinks");
30689
30865
  var messageLinkTarget = /* @__PURE__ */ __name((reference, message, provider) => {
30690
30866
  if (isLocator(reference)) {
30691
30867
  if (message !== void 0)
@@ -30732,7 +30908,7 @@ var validatePermalink = /* @__PURE__ */ __name((link4) => {
30732
30908
  return { url: link4.url, access: link4.access, reason: link4.reason };
30733
30909
  }, "validatePermalink");
30734
30910
 
30735
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/domain/pin-duration.js
30911
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/pin-duration.js
30736
30912
  var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
30737
30913
  if (seconds % 86400 === 0 && seconds > 86400)
30738
30914
  return `${seconds / 86400}d`;
@@ -30764,7 +30940,7 @@ var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-tim
30764
30940
  return seconds;
30765
30941
  }, "pinDurationOf");
30766
30942
 
30767
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/sends/send-as.js
30943
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/sends/send-as.js
30768
30944
  var sendAsCheck = /* @__PURE__ */ __name((connection, sendAs) => {
30769
30945
  if (sendAs === void 0) {
30770
30946
  const saved = connection.savedSender?.bind(connection);
@@ -30789,7 +30965,7 @@ var typedSendAs = /* @__PURE__ */ __name((typed) => {
30789
30965
  return sendAs;
30790
30966
  }, "typedSendAs");
30791
30967
 
30792
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/search/total.js
30968
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/search/total.js
30793
30969
  var TOTAL_CAP = 1e4;
30794
30970
  var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
30795
30971
  const least = shown + (hasMore ? 1 : 0);
@@ -30800,7 +30976,7 @@ var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
30800
30976
  return { value: count4, relation: exact ? "eq" : "gte" };
30801
30977
  }, "totalOf");
30802
30978
 
30803
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/search/lucene/meaning-parts.js
30979
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/search/lucene/meaning-parts.js
30804
30980
  var WORD_FIELDS = /* @__PURE__ */ new Set(["text", "exact"]);
30805
30981
  var fieldsOfQuery = /* @__PURE__ */ __name((root, everything) => {
30806
30982
  let narrows = false;
@@ -30829,7 +31005,7 @@ var meaningWords = /* @__PURE__ */ __name((root) => {
30829
31005
  return wanted(root).join(" ").trim();
30830
31006
  }, "meaningWords");
30831
31007
 
30832
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/search/question-plan.js
31008
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/search/question-plan.js
30833
31009
  var words = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}]+/gu) ?? [], "words");
30834
31010
  var scaffolding = new Set(words("what which how many much who where when is are was were do does did can could should we the a an for of to under from in on at has have \u0441\u043A\u043E\u043B\u044C\u043A\u043E \u043A\u0430\u043A\u043E\u0439 \u043A\u0430\u043A\u0430\u044F \u043A\u0430\u043A\u0438\u0435 \u043A\u0430\u043A\u043E\u0435 \u043A\u0442\u043E \u043A\u043E\u043C\u0443 \u043A\u0435\u043C \u0433\u0434\u0435 \u043A\u043E\u0433\u0434\u0430 \u043A\u0430\u043A \u0447\u0442\u043E \u0432\u043E \u043F\u043E \u043D\u0430 \u0432 \u043A \u0441 \u0443 \u0447\u0435\u0440\u0435\u0437 \u043B\u0438 \u0434\u043E\u043B\u0436\u0435\u043D \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0443\u0436\u043D\u043E \u0438\u0434\u0451\u0442 \u0438\u0434\u0435\u0442 \u043C\u043E\u0436\u043D\u043E \u043C\u043E\u0436\u0435\u0442 \u043C\u043E\u0433\u0443\u0442"));
30835
31011
  var questionWord = /\b(?:what|which|how|who|where|when|can|could|should)\b|(?:^|\s)(?:сколько|какой|какая|какие|какое|кто|кому|кем|где|когда|как|что|можно|может|могут|ли)(?:\s|$)/iu;
@@ -30944,7 +31120,7 @@ function planQuestion(text2, strict = false) {
30944
31120
  }
30945
31121
  __name(planQuestion, "planQuestion");
30946
31122
 
30947
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/messages-combined.js
31123
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/messages-combined.js
30948
31124
  var COMBINED_DEFAULTS = { candidateDepth: 300, rrfK: 60, rerank: "all", chatCap: 0 };
30949
31125
  var tokensOf = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}\p{Co}\p{M}]+/gu) ?? [], "tokensOf");
30950
31126
  var searchCombined = /* @__PURE__ */ __name(async (store, account, request, messenger = {}, options = COMBINED_DEFAULTS) => {
@@ -31137,7 +31313,7 @@ var signals = /* @__PURE__ */ __name((hit, terms, corrections, execution, mode,
31137
31313
  return mode === "coverage" ? coverage * 4 : mode === "proximity" ? proximity : mode === "phrase" ? phrase : coverage * 4 + proximity + phrase;
31138
31314
  }, "signals");
31139
31315
 
31140
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/messages-discovery.js
31316
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/messages-discovery.js
31141
31317
  var MEANING_DEPTH = 100;
31142
31318
  var RRF_K2 = 60;
31143
31319
  var RERANK_DEPTH = 50;
@@ -31465,7 +31641,7 @@ var mixedWithReranker = /* @__PURE__ */ __name((head, scores) => {
31465
31641
  })).sort((a, b) => b.mixed - a.mixed).map(({ hit }) => hit);
31466
31642
  }, "mixedWithReranker");
31467
31643
 
31468
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/thread-context.js
31644
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/thread-context.js
31469
31645
  var THREAD_BOUNDS = { maxHops: 8, maxMessages: 50, maxBytes: 65536, withinMs: 864e5 };
31470
31646
  var bytes = /* @__PURE__ */ __name((items, links) => Buffer.byteLength(JSON.stringify({ items, links }), "utf8"), "bytes");
31471
31647
  var threadBounds = /* @__PURE__ */ __name((options = {}) => {
@@ -31664,7 +31840,7 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account, chat, mess
31664
31840
  return result;
31665
31841
  }, "readThreadContext");
31666
31842
 
31667
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/messages-archive-search.js
31843
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/messages-archive-search.js
31668
31844
  var SEARCH_FILL_MS = 200;
31669
31845
  var statsStore = /* @__PURE__ */ __name(async (store, account, request, messenger = {}) => {
31670
31846
  const stop = Date.now() + SEARCH_FILL_MS;
@@ -31731,12 +31907,12 @@ var accountOf2 = /* @__PURE__ */ __name((hit) => {
31731
31907
  }, "accountOf");
31732
31908
  var keyOf3 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}/${account}`, "keyOf");
31733
31909
 
31734
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/pictures.js
31910
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/pictures.js
31735
31911
  import { createHash as createHash10 } from "node:crypto";
31736
31912
  import { readFile as readFile2, stat as stat3 } from "node:fs/promises";
31737
31913
  import { setTimeout as sleep4 } from "node:timers/promises";
31738
31914
 
31739
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/domain/models.js
31915
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/models.js
31740
31916
  var GROUP_SETTINGS = [
31741
31917
  "allCanPin",
31742
31918
  "onlyAdminsAdd",
@@ -31750,121 +31926,7 @@ var ADMIN_RIGHTS = ["read", "members", "admins", "info", "pin", "link", "post",
31750
31926
  var senderIsMe = /* @__PURE__ */ __name((message, account) => message.outgoing === true || message.senderId !== null && String(message.senderId) === account, "senderIsMe");
31751
31927
  var MEDIA_KINDS = ["photo", "video", "file", "audio", "link"];
31752
31928
 
31753
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/file-download.js
31754
- import { createWriteStream, mkdirSync } from "node:fs";
31755
- import { link as link3, rm } from "node:fs/promises";
31756
- import { join as join11, resolve as resolve6 } from "node:path";
31757
- import { Readable, Transform } from "node:stream";
31758
- import { pipeline } from "node:stream/promises";
31759
- var refreshedFiles = /* @__PURE__ */ __name((files) => files.flatMap(({ kind, name, position, providerRef }) => providerRef === void 0 || Object.keys(providerRef).length === 0 ? [] : [
31760
- {
31761
- kind,
31762
- providerRef,
31763
- ...name === void 0 ? {} : { name },
31764
- ...position === void 0 ? {} : { position }
31765
- }
31766
- ]), "refreshedFiles");
31767
- var recordPaths = /* @__PURE__ */ __name(async (messages, chat, message, files, saved, warn, onFailure) => {
31768
- const downloaded = saved.map((one, index) => ({
31769
- kind: one.kind,
31770
- path: one.path,
31771
- ...files[index]?.name === void 0 ? {} : { name: files[index]?.name },
31772
- ...files[index]?.position === void 0 ? {} : { position: files[index]?.position },
31773
- ...files[index]?.providerRef === void 0 ? {} : { providerRef: files[index]?.providerRef }
31774
- }));
31775
- try {
31776
- const kept = await messages.keepDownloaded(chat, message, downloaded);
31777
- if (kept < downloaded.length && downloaded.some(({ providerRef }) => Object.keys(providerRef ?? {}).length > 0))
31778
- warn(`message ${message}: a new file reference from the messenger was not saved; the next download asks again`);
31779
- return kept;
31780
- } catch (error) {
31781
- onFailure?.(error);
31782
- warn(`not recorded in the local store where message ${message}'s files went: ${error.message}`);
31783
- return 0;
31784
- }
31785
- }, "recordPaths");
31786
- var downloadMessage = /* @__PURE__ */ __name(async (messages, chat, message, output, warn) => {
31787
- const { files } = await messages.download(chat, message);
31788
- mkdirSync(output, { recursive: true });
31789
- const result = await saveFiles(messages, chat, message, files, output, { unique: true, warn });
31790
- if (result.batch.failed > 0)
31791
- throw new CliError("provider_error", "some attachments failed; completed downloads are retained", {
31792
- batch: result.batch,
31793
- saved: result.saved
31794
- });
31795
- return result.saved;
31796
- }, "downloadMessage");
31797
- var saveFiles = /* @__PURE__ */ __name(async (messages, chat, message, files, output, { unique = false, warn, onSaved, batch = batchProgress() }) => {
31798
- const saved = [];
31799
- const successful = [];
31800
- for (const [index, file2] of files.entries()) {
31801
- if (batch.stopped)
31802
- break;
31803
- try {
31804
- const one = await save(file2, output, `${message}-${index + 1}`, { unique });
31805
- saved.push(one);
31806
- successful.push(file2);
31807
- batch.ok();
31808
- onSaved?.(one);
31809
- } catch (error) {
31810
- const issue = batch.fail(message, "download", error, (file2.position ?? index) + 1);
31811
- warn(`message ${message}, attachment ${(file2.position ?? index) + 1}: ${issue.code} \u2014 ${issue.message}`);
31812
- }
31813
- }
31814
- await recordPaths(messages, chat, message, successful, saved, warn, (error) => batch.fail(message, "record_downloads", error));
31815
- return { saved, batch: batch.result() };
31816
- }, "saveFiles");
31817
- var EXTENSIONS = {
31818
- "image/jpeg": "jpg",
31819
- "image/png": "png",
31820
- "image/webp": "webp",
31821
- "image/gif": "gif",
31822
- "video/mp4": "mp4",
31823
- "video/webm": "webm",
31824
- "audio/mpeg": "mp3",
31825
- "audio/ogg": "ogg",
31826
- "audio/mp4": "m4a",
31827
- "application/pdf": "pdf"
31828
- };
31829
- var BY_KIND = { photo: "jpg" };
31830
- var save = /* @__PURE__ */ __name(async (file2, directory2, fallbackName, { unique = false } = {}) => {
31831
- const own = safeName(file2.name);
31832
- const fileName = /* @__PURE__ */ __name(() => {
31833
- const extension = EXTENSIONS[file2.mime ?? ""] ?? BY_KIND[file2.kind];
31834
- return own ?? (extension ? `${fallbackName}.${extension}` : fallbackName);
31835
- }, "fileName");
31836
- const partial = join11(directory2, `.${fileName()}.${process.pid}.part`);
31837
- let bytes2 = 0;
31838
- const counting = new Transform({
31839
- transform(chunk, _encoding, done2) {
31840
- bytes2 += chunk.length;
31841
- done2(null, chunk);
31842
- }
31843
- });
31844
- try {
31845
- await pipeline(Readable.from(file2.bytes()), counting, createWriteStream(partial, { flags: "wx", mode: 384 }));
31846
- const name = fileName();
31847
- const names2 = unique && own ? [name, `${fallbackName}-${own}`] : [name];
31848
- for (const candidate of names2) {
31849
- const path2 = resolve6(join11(directory2, candidate));
31850
- const taken = await link3(partial, path2).then(() => false, (error) => {
31851
- if (error.code === "EEXIST")
31852
- return true;
31853
- throw error;
31854
- });
31855
- if (!taken)
31856
- return { kind: file2.kind, path: path2, bytes: bytes2 };
31857
- }
31858
- const path = resolve6(join11(directory2, names2.at(-1) ?? name));
31859
- if (unique)
31860
- return { kind: file2.kind, path, bytes: bytes2, existing: true };
31861
- throw new CliError("validation_error", `${path} already exists \u2014 nothing was overwritten; choose --output-dir`);
31862
- } finally {
31863
- await rm(partial, { force: true });
31864
- }
31865
- }, "save");
31866
-
31867
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/pictures.js
31929
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/pictures.js
31868
31930
  var PICTURE_MAX_BYTES = 25 * 1024 * 1024;
31869
31931
  var PICTURE_FLOOR = 0.25;
31870
31932
  var PAGE5 = 50;
@@ -31881,7 +31943,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
31881
31943
  const directory2 = imageModelsDirectory(deps.env);
31882
31944
  if (!isImageModelInstalled(model2, directory2))
31883
31945
  throw new CliError("not_found", missingModel(model2.id), { reason: "model.not-downloaded", model: model2.id });
31884
- const { openPictureEmbedder } = await import("./embedder-63Z7ZBYG.js");
31946
+ const { openPictureEmbedder } = await import("./embedder-GSWBGHRK.js");
31885
31947
  return openPictureEmbedder(model2, directory2);
31886
31948
  }, "open");
31887
31949
  const embedder = /* @__PURE__ */ __name(() => {
@@ -32078,7 +32140,7 @@ var withPictures = /* @__PURE__ */ __name((messages, pictures) => ({
32078
32140
  }, "search")
32079
32141
  }), "withPictures");
32080
32142
 
32081
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/messages-meaning.js
32143
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/messages-meaning.js
32082
32144
  var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, shared, within) => {
32083
32145
  const target2 = embeddingTarget(deps, DEFAULT_TEXT_MODEL);
32084
32146
  const skipped = /* @__PURE__ */ __name((reason, step) => ({
@@ -32127,7 +32189,7 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
32127
32189
  }
32128
32190
  }, "meaningLane");
32129
32191
 
32130
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/messages-rerank.js
32192
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/messages-rerank.js
32131
32193
  var rerankLane = /* @__PURE__ */ __name((deps) => {
32132
32194
  const choice = deps.reranker ?? DEFAULT_RERANK_MODEL;
32133
32195
  if (choice === "off")
@@ -32139,9 +32201,9 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
32139
32201
  return { skipped: { reason: `${model.id} is not downloaded`, step: "models.download", model: model.id } };
32140
32202
  try {
32141
32203
  const warm = deps.embedders;
32142
- const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-CGLNXFIU.js")).openRerankerProcess(model, directory2, {
32204
+ const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-QKEFL5HL.js")).openRerankerProcess(model, directory2, {
32143
32205
  threads: defaultThreads()
32144
- })) : await (await import("./rerank-23GXWT2V.js")).openReranker(model, directory2);
32206
+ })) : await (await import("./rerank-ZFATWWBE.js")).openReranker(model, directory2);
32145
32207
  return {
32146
32208
  model: model.id,
32147
32209
  score: /* @__PURE__ */ __name((question, passages) => reranker.score(plainWords(question), passages), "score"),
@@ -32161,17 +32223,17 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
32161
32223
  };
32162
32224
  }, "rerankLane");
32163
32225
 
32164
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/document-pictures.js
32226
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/document-pictures.js
32165
32227
  var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}) => {
32166
32228
  const model = imageModel(DEFAULT_IMAGE_MODEL);
32167
32229
  const directory2 = imageModelsDirectory(env);
32168
32230
  if (!isImageModelInstalled(model, directory2))
32169
32231
  throw new CliError("not_found", `the picture model is not downloaded \u2014 ${command === void 0 ? "install it with a WireCat CLI that has `images models download` (tg, max or wa); they share the model folder" : `\`${command} images models download ${model.id}\` fetches it`}`, { reason: "model.not-downloaded", model: model.id });
32170
- const { openPictureEmbedder } = await import("./embedder-63Z7ZBYG.js");
32232
+ const { openPictureEmbedder } = await import("./embedder-GSWBGHRK.js");
32171
32233
  return openPictureEmbedder(model, directory2);
32172
32234
  }, "openPictureEmbedderFor");
32173
32235
 
32174
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/document-source.js
32236
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/document-source.js
32175
32237
  var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file2) => {
32176
32238
  const metadata = note.frontMatter;
32177
32239
  const account = accounts.find(({ id: id2 }) => String(id2) === note.folderId);
@@ -32186,7 +32248,7 @@ var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file2) =>
32186
32248
  };
32187
32249
  }, "documentSource");
32188
32250
 
32189
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/notes-title-tier.js
32251
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/notes-title-tier.js
32190
32252
  var plainQueryWords = /* @__PURE__ */ __name((query) => {
32191
32253
  let root;
32192
32254
  try {
@@ -32213,7 +32275,7 @@ var titleTiers = /* @__PURE__ */ __name((hits, words2) => {
32213
32275
  return [...hits].sort((a, b) => rank(a) - rank(b));
32214
32276
  }, "titleTiers");
32215
32277
 
32216
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/notes-search.js
32278
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/notes-search.js
32217
32279
  var storeQuery = /* @__PURE__ */ __name(async (store, text2, { exact, timezone } = {}) => resolvedQuery(store, parsedQuery(text2, exact), timezone), "storeQuery");
32218
32280
  var parsedQuery = /* @__PURE__ */ __name((text2, exact) => validateFields(parseLucene(text2, { ...SEARCH_QUERY, defaultField: exact ? "exact" : "text" })).root, "parsedQuery");
32219
32281
  var resolvedQuery = /* @__PURE__ */ __name(async (store, root, timezone) => {
@@ -32623,7 +32685,7 @@ var searchNotesOf = /* @__PURE__ */ __name(async (store, account, text2, { accou
32623
32685
  };
32624
32686
  }, "searchNotesOf");
32625
32687
 
32626
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/events-search.js
32688
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/events-search.js
32627
32689
  var MAX_EVENTS_OFFSET = 1e3;
32628
32690
  var iso3 = /* @__PURE__ */ __name((at) => at === null ? null : new Date(at).toISOString(), "iso");
32629
32691
  var accountIdsOf = /* @__PURE__ */ __name(async (store, accounts) => {
@@ -32735,7 +32797,7 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
32735
32797
  };
32736
32798
  }, "searchEvents");
32737
32799
 
32738
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/search-all.js
32800
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/search-all.js
32739
32801
  var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events"];
32740
32802
  var skippable = /* @__PURE__ */ __name((error) => error instanceof CliError && (error.code === "validation_error" || error.code === "not_found"), "skippable");
32741
32803
  var filtersBeside = /* @__PURE__ */ __name((text2) => {
@@ -32804,6 +32866,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
32804
32866
  from: hit.email?.from ? { name: hit.email.from.name ?? hit.email.from.address, ref: hit.email.from.ref } : { name: hit.senderName, ref: null },
32805
32867
  senderIsMe: senderIsMe(hit, at.account),
32806
32868
  ...hit.email ? { email: hit.email } : {},
32869
+ attachments: hitFiles(hit.attachments),
32807
32870
  foundBy
32808
32871
  };
32809
32872
  }, "itemOf");
@@ -32943,7 +33006,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
32943
33006
  };
32944
33007
  }, "searchAll");
32945
33008
 
32946
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/search-all-meetings.js
33009
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/search-all-meetings.js
32947
33010
  var RESOURCES_SEARCHED_WITH_MEETINGS = [...RESOURCES_SEARCHED, "meetings"];
32948
33011
  var whole3 = /* @__PURE__ */ __name((value, minimum, maximum, label) => {
32949
33012
  if (!Number.isSafeInteger(value) || value < minimum || value > maximum)
@@ -33036,7 +33099,8 @@ var collectMeetings = /* @__PURE__ */ __name(async (store, account, request, que
33036
33099
  meetingId: hit.meetingId,
33037
33100
  scope: hit.scope,
33038
33101
  id: hit.id,
33039
- startMs: hit.startMs
33102
+ startMs: hit.startMs,
33103
+ ...hit.scope === "transcript" && hit.ref !== void 0 ? { cueRef: hit.ref, speakerName: hit.speakerName ?? null } : {}
33040
33104
  }
33041
33105
  });
33042
33106
  if (collected.items.length > request.limit) {
@@ -33190,9 +33254,9 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account, source, re
33190
33254
  return { ...found, skipped: [...skipped, ...empty2, ...unnamed, ...found.skipped] };
33191
33255
  }, "searchAllOfSource");
33192
33256
 
33193
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/server-search.js
33257
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/server-search.js
33194
33258
  var SERVER_SEARCH_KEY = "messages.server-search";
33195
- var SERVER_BOUNDS = { timeMs: 5e3, perCall: 100, maxCalls: 3 };
33259
+ var SERVER_BOUNDS = { timeMs: 5e3, perCall: 100, maxCalls: 3, maxMessageBytes: 5e6 };
33196
33260
  var DEFAULT_BACKEND = "both";
33197
33261
  var sourceKey = /* @__PURE__ */ __name((chatId, id2) => JSON.stringify([chatId, id2]), "sourceKey");
33198
33262
  var merge = /* @__PURE__ */ __name((one, other) => {
@@ -33379,8 +33443,12 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
33379
33443
  return { report, sources };
33380
33444
  }, "searchServer");
33381
33445
 
33382
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/messages.js
33446
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/messages.js
33383
33447
  var DELETE_AT_ONCE = 10;
33448
+ var filesOf = /* @__PURE__ */ __name(({ attachments }) => {
33449
+ const files = fileLinks(attachments);
33450
+ return files.length > 0 ? { files } : {};
33451
+ }, "filesOf");
33384
33452
  var messagesService = /* @__PURE__ */ __name((deps) => {
33385
33453
  const { guard } = deps;
33386
33454
  const inStore = /* @__PURE__ */ __name(async (read) => read(await deps.store(), await deps.account()), "inStore");
@@ -33530,13 +33598,15 @@ var messagesService = /* @__PURE__ */ __name((deps) => {
33530
33598
  const store = await deps.store();
33531
33599
  const chat2 = await readChatId(deps, target2.chat, store, account);
33532
33600
  const found2 = await store.messages.around(account, chat2, target2.message, { before: 0, after: 0 });
33533
- if (!found2.some((item) => item.id === target2.message && item.chatId === chat2))
33601
+ const held2 = found2.find((item) => item.id === target2.message && item.chatId === chat2);
33602
+ if (!held2)
33534
33603
  throw new CliError("not_found", "no such message in this account's stored chat");
33535
33604
  return {
33536
33605
  locator: formatLocator({ ...account, chat: chat2, message: target2.message }),
33537
33606
  url: null,
33538
33607
  access: "unavailable",
33539
- reason: deps.offline ? "offline" : "unsupported_provider"
33608
+ reason: deps.offline ? "offline" : "unsupported_provider",
33609
+ ...filesOf(held2)
33540
33610
  };
33541
33611
  }
33542
33612
  const connection = await deps.connection();
@@ -33544,20 +33614,27 @@ var messagesService = /* @__PURE__ */ __name((deps) => {
33544
33614
  throw new CliError("authentication_error", "the connected account differs from the recorded profile; refresh the session before linking");
33545
33615
  const { id: chat } = await connection.resolve(target2.chat);
33546
33616
  const locator = formatLocator({ ...account, chat, message: target2.message });
33547
- if (connection.permalink)
33548
- return { locator, ...validatePermalink(await connection.permalink(chat, target2.message)) };
33617
+ if (connection.permalink) {
33618
+ const permalink = validatePermalink(await connection.permalink(chat, target2.message));
33619
+ const held2 = await deps.store().then((store) => store.messages.around(account, chat, target2.message, { before: 0, after: 0 })).then((found2) => found2.find((item) => item.id === target2.message && item.chatId === chat)).catch(() => void 0);
33620
+ return { locator, ...permalink, ...held2 ? filesOf(held2) : {} };
33621
+ }
33549
33622
  const found = await capability(connection, "around", "read a message")(chat, target2.message, {
33550
33623
  before: 0,
33551
33624
  after: 0
33552
33625
  });
33553
- if (!found.some((item) => item.id === target2.message && item.chatId === chat))
33626
+ const held = found.find((item) => item.id === target2.message && item.chatId === chat);
33627
+ if (!held)
33554
33628
  throw new CliError("not_found", "no such message in this chat");
33555
- return { locator, url: null, access: "unavailable", reason: "unsupported_provider" };
33629
+ return { locator, url: null, access: "unavailable", reason: "unsupported_provider", ...filesOf(held) };
33556
33630
  }, "link"),
33557
- download: /* @__PURE__ */ __name(async (chat, message) => {
33631
+ download: /* @__PURE__ */ __name(async (reference, message) => {
33632
+ const target2 = messageLinkTarget(reference, message, deps.messenger.provider);
33633
+ if (target2.account !== void 0 && target2.account !== (await deps.account()).account)
33634
+ throw new CliError("validation_error", "that locator belongs to another account; select its profile first");
33558
33635
  const connection = await deps.connection();
33559
33636
  const download = capability(connection, "download", "download attachments");
33560
- return download((await connection.resolve(chat)).id, message);
33637
+ return download((await connection.resolve(target2.chat)).id, target2.message);
33561
33638
  }, "download"),
33562
33639
  keepDownloaded: /* @__PURE__ */ __name((chat, message, files) => inStore(async (store, account) => {
33563
33640
  const chatId = await storedChatId(deps.messenger, chat, store, account).catch(() => void 0) ?? (await (await deps.connection()).resolve(chat)).id;
@@ -33805,7 +33882,7 @@ var checkMediaOptions = /* @__PURE__ */ __name((messenger, asked, attachments) =
33805
33882
  throw new CliError("validation_error", `${MEDIA_FLAGS[first2]} needs a --photo or --file`);
33806
33883
  }, "checkMediaOptions");
33807
33884
 
33808
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/domain/channel-tags.js
33885
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/channel-tags.js
33809
33886
  var CHANNEL_TAG_RULES_VERSION = "keywords-v1";
33810
33887
  var RULES = {
33811
33888
  ai: [/\b(ai|gpt|llm|machine learning|artificial intelligence)\b/iu, /нейросет|искусственн/iu],
@@ -33820,7 +33897,7 @@ var classifyChannel = /* @__PURE__ */ __name((metadata) => Object.entries(RULES)
33820
33897
  return fields.length ? [{ tag, score: fields.length / 3, fields }] : [];
33821
33898
  }), "classifyChannel");
33822
33899
 
33823
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/metadata.js
33900
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/metadata.js
33824
33901
  var metadataService = /* @__PURE__ */ __name((deps) => {
33825
33902
  const held = /* @__PURE__ */ __name(async (reference, { includeLeft = false } = {}) => {
33826
33903
  const store = await deps.store();
@@ -33906,7 +33983,7 @@ var metadataService = /* @__PURE__ */ __name((deps) => {
33906
33983
  };
33907
33984
  }, "metadataService");
33908
33985
 
33909
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/moderation/run.js
33986
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/moderation/run.js
33910
33987
  var FIRST_LOOK_MS = 24 * 36e5;
33911
33988
  var moderateWith = /* @__PURE__ */ __name(async (run) => {
33912
33989
  const { chatId, title, rules, point, since, dryRun } = run;
@@ -33943,7 +34020,7 @@ var moderateWith = /* @__PURE__ */ __name(async (run) => {
33943
34020
  return { chatId, rows, notes };
33944
34021
  }, "moderateWith");
33945
34022
 
33946
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/moderation.js
34023
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/moderation.js
33947
34024
  var moderationService = /* @__PURE__ */ __name((deps) => {
33948
34025
  const file2 = /* @__PURE__ */ __name(() => new ModerationRules(moderationPathFor(deps.messenger.app, deps.profile ?? "default", deps.env ?? process.env)), "file");
33949
34026
  const group = /* @__PURE__ */ __name(async (chat) => {
@@ -34021,7 +34098,7 @@ var moderatorOf = /* @__PURE__ */ __name((adapter, deps) => ({
34021
34098
  }, "removePerson")
34022
34099
  }), "moderatorOf");
34023
34100
 
34024
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/private-people.js
34101
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/private-people.js
34025
34102
  var noteItem = /* @__PURE__ */ __name((provider, note) => ({
34026
34103
  id: note.id,
34027
34104
  contact: formatReference({ type: "contact", provider, id: note.personId }),
@@ -34065,7 +34142,7 @@ var privatePeopleService = /* @__PURE__ */ __name((deps) => {
34065
34142
  };
34066
34143
  }, "privatePeopleService");
34067
34144
 
34068
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/rankings.js
34145
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/rankings.js
34069
34146
  var empty = /* @__PURE__ */ __name(() => ({
34070
34147
  total: 0,
34071
34148
  population: 0,
@@ -34321,7 +34398,7 @@ var rankingsService = /* @__PURE__ */ __name((deps) => ({
34321
34398
  }, "evidence")
34322
34399
  }), "rankingsService");
34323
34400
 
34324
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/searches.js
34401
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/searches.js
34325
34402
  var savedSearchItem = /* @__PURE__ */ __name((one) => ({
34326
34403
  id: one.id,
34327
34404
  name: one.name,
@@ -34450,7 +34527,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
34450
34527
  };
34451
34528
  }, "searchesService");
34452
34529
 
34453
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/tags.js
34530
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/tags.js
34454
34531
  var TAGGING_QUERY = {
34455
34532
  entity: "tagging",
34456
34533
  backend: "sql",
@@ -34534,7 +34611,7 @@ var tagsService = /* @__PURE__ */ __name((deps) => {
34534
34611
  };
34535
34612
  }, "tagsService");
34536
34613
 
34537
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/topics.js
34614
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/topics.js
34538
34615
  var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden, icon }) => {
34539
34616
  const set = [closed, pinned, hidden].filter((one) => one !== void 0).length;
34540
34617
  if (title !== void 0 || icon !== void 0 || set !== 1)
@@ -34733,7 +34810,7 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
34733
34810
  };
34734
34811
  }, "topicsService");
34735
34812
 
34736
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/evidence.js
34813
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/evidence.js
34737
34814
  import { createHash as createHash11, randomUUID as randomUUID5 } from "node:crypto";
34738
34815
  var hash2 = /* @__PURE__ */ __name((value) => createHash11("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
34739
34816
  var positive = /* @__PURE__ */ __name((value, name, minimum = 1) => {
@@ -34807,7 +34884,7 @@ var prepareEvidencePacket = /* @__PURE__ */ __name(({ kind, source, page, limits
34807
34884
  return { ...content, id: randomUUID5(), fingerprint: hash2(content) };
34808
34885
  }, "prepareEvidencePacket");
34809
34886
 
34810
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/evidence-read.js
34887
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/evidence-read.js
34811
34888
  var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, limit, before: before2 }, messenger = {}) => {
34812
34889
  if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
34813
34890
  throw new CliError("validation_error", "evidence message limit must be an integer from 1 to 100");
@@ -34827,7 +34904,7 @@ var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, l
34827
34904
  return { ...packet, nextBeforeId: older && last ? last.id : null };
34828
34905
  }, "readEvidencePacket");
34829
34906
 
34830
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/meeting-project-discovery.js
34907
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/meeting-project-discovery.js
34831
34908
  var scopeKeys = [
34832
34909
  "accountId",
34833
34910
  "meetingId",
@@ -34849,7 +34926,7 @@ var optionKeys = /* @__PURE__ */ new Set([
34849
34926
  "maxVocabularyReadBytes"
34850
34927
  ]);
34851
34928
 
34852
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/context/communication-selection.js
34929
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/context/communication-selection.js
34853
34930
  var communicationFields = {
34854
34931
  sources: pipe(array(strictObject({
34855
34932
  id: pipe(string(), regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)),
@@ -34881,7 +34958,7 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
34881
34958
  return { ...input, after, before: before2 };
34882
34959
  }, "communicationRequest");
34883
34960
 
34884
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/meeting-preparation-validation.js
34961
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/meeting-preparation-validation.js
34885
34962
  var MEETING_PREPARATION_LIMITS = {
34886
34963
  meetings: { min: 1, max: 20, default: 5 },
34887
34964
  cues: { min: 1, max: 100, default: 10 },
@@ -34954,7 +35031,7 @@ var validateMeetingPreparationRequest = /* @__PURE__ */ __name((externalId, orig
34954
35031
  };
34955
35032
  }, "validateMeetingPreparationRequest");
34956
35033
 
34957
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/meeting-communications-selection.js
35034
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/meeting-communications-selection.js
34958
35035
  var validatePreparationCommunications = /* @__PURE__ */ __name((section, request, after) => {
34959
35036
  const fail2 = /* @__PURE__ */ __name(() => {
34960
35037
  throw new CliError("invalid_response", "Preparation communications returned another selection or invalid evidence");
@@ -35002,7 +35079,7 @@ var validatePreparationCommunications = /* @__PURE__ */ __name((section, request
35002
35079
  }
35003
35080
  }, "validatePreparationCommunications");
35004
35081
 
35005
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/package-upgrade.js
35082
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/package-upgrade.js
35006
35083
  var upgradePackage = /* @__PURE__ */ __name(async ({ current, command, packageName, check: check2 }, ports) => {
35007
35084
  const installer = ports.installer();
35008
35085
  const argv = updateCommand(installer, packageName);
@@ -35067,7 +35144,7 @@ var dayAfter = /* @__PURE__ */ __name((published) => {
35067
35144
  return Number.isNaN(time) ? null : new Date(time + 24 * 60 * 60 * 1e3).toISOString();
35068
35145
  }, "dayAfter");
35069
35146
 
35070
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/services/index.js
35147
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/services/index.js
35071
35148
  var servicesFor = /* @__PURE__ */ __name((deps) => {
35072
35149
  const pictures = picturesService(deps);
35073
35150
  const base = {
@@ -35103,9 +35180,9 @@ var servicesFor = /* @__PURE__ */ __name((deps) => {
35103
35180
  return deps.messenger.services ? { ...base, ...deps.messenger.services(base, deps) } : base;
35104
35181
  }, "servicesFor");
35105
35182
 
35106
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/background/relay.js
35183
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/background/relay.js
35107
35184
  import { createHash as createHash12 } from "node:crypto";
35108
- import { chmodSync, lstatSync, mkdirSync as mkdirSync2, rmSync } from "node:fs";
35185
+ import { chmodSync, lstatSync, mkdirSync as mkdirSync3, rmSync } from "node:fs";
35109
35186
  import { createConnection, createServer } from "node:net";
35110
35187
  import { tmpdir } from "node:os";
35111
35188
  import { dirname as dirname5, isAbsolute as isAbsolute3, join as join12 } from "node:path";
@@ -35133,7 +35210,7 @@ var relayPath = /* @__PURE__ */ __name((lockPath) => {
35133
35210
  return join12("/tmp", name);
35134
35211
  }, "relayPath");
35135
35212
  var privateDirectory = /* @__PURE__ */ __name((dir) => {
35136
- mkdirSync2(dir, { recursive: true, mode: 448 });
35213
+ mkdirSync3(dir, { recursive: true, mode: 448 });
35137
35214
  const stat4 = lstatSync(dir);
35138
35215
  const mine = process.getuid === void 0 || stat4.uid === process.getuid();
35139
35216
  if (!stat4.isDirectory() || !mine || (stat4.mode & 63) !== 0) {
@@ -35324,7 +35401,7 @@ var relayCommand = /* @__PURE__ */ __name((path, request, options) => new Promis
35324
35401
  }, () => finish({ error: stopped() }));
35325
35402
  }), "relayCommand");
35326
35403
 
35327
- // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-relay.js
35404
+ // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-relay.js
35328
35405
  var lentConnection = /* @__PURE__ */ __name((connection, watchers) => throughWrapper(connection, {
35329
35406
  close: /* @__PURE__ */ __name(async () => {
35330
35407
  }, "close"),
@@ -35482,6 +35559,9 @@ export {
35482
35559
  engineHint,
35483
35560
  engineStates,
35484
35561
  imageSize,
35562
+ refreshedFiles,
35563
+ downloadMessage,
35564
+ saveFiles,
35485
35565
  ATTACHMENT_QUERY,
35486
35566
  isRetentionSelection,
35487
35567
  REVIEW_DAYS,
@@ -35489,6 +35569,7 @@ export {
35489
35569
  reviewStart,
35490
35570
  kindsOf,
35491
35571
  validateFormattedText,
35572
+ messageLinkTarget,
35492
35573
  pinLengthHelp,
35493
35574
  pinDurationOf,
35494
35575
  sendAsCheck,
@@ -35501,9 +35582,6 @@ export {
35501
35582
  ADMIN_RIGHTS,
35502
35583
  senderIsMe,
35503
35584
  MEDIA_KINDS,
35504
- refreshedFiles,
35505
- downloadMessage,
35506
- saveFiles,
35507
35585
  searchNotesOf,
35508
35586
  DELETE_AT_ONCE,
35509
35587
  describe,
@@ -35551,6 +35629,7 @@ export {
35551
35629
  createMeetingSearchCommand,
35552
35630
  addMeetingCommands,
35553
35631
  LIST_QUERY_GUIDE,
35632
+ QUERY_ARGUMENT,
35554
35633
  withQuery,
35555
35634
  unfilteredQuery,
35556
35635
  listQuery,