@wirecat/cli-memo 0.131.22 → 0.131.24

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 (134) hide show
  1. package/dist/bin/memo.js +2 -2
  2. package/dist/bundle/{all-profiles-EZLU6CY7.js → all-profiles-ZCJTYGOL.js} +7 -7
  3. package/dist/bundle/{anthropic-XC34PJH5.js → anthropic-7WVLAKTX.js} +5 -5
  4. package/dist/bundle/{app-server-PRQVGA5X.js → app-server-6G3SXEHO.js} +38 -38
  5. package/dist/bundle/auto-JWPM5654.js +86 -0
  6. package/dist/bundle/{bun-CKGKUKW5.js → bun-JVBDJKBB.js} +2 -2
  7. package/dist/bundle/{bun-sqlite-S6KUSMTC.js → bun-sqlite-P4I7NVMQ.js} +4 -4
  8. package/dist/bundle/{chunk-7F6FGMCC.js → chunk-2IRCJT4O.js} +7 -7
  9. package/dist/bundle/{chunk-SO2YVKBK.js → chunk-3KNXQZMO.js} +28 -28
  10. package/dist/bundle/{chunk-WEOFWTWZ.js → chunk-3MER7NE6.js} +3 -3
  11. package/dist/bundle/{chunk-DNGHE2Q4.js → chunk-3U7OUQV2.js} +1 -1
  12. package/dist/bundle/{chunk-AIIQ7YU4.js → chunk-5YCNCXL5.js} +1 -1
  13. package/dist/bundle/{chunk-2NJUPIAO.js → chunk-AIGMYGEL.js} +1 -1
  14. package/dist/bundle/{chunk-7W3RCCRR.js → chunk-AIVUS6WA.js} +10 -10
  15. package/dist/bundle/{chunk-KUNA6MQZ.js → chunk-ALGIPJ6L.js} +1 -1
  16. package/dist/bundle/{chunk-IFWBFYXN.js → chunk-AWGV4VOA.js} +11 -11
  17. package/dist/bundle/{chunk-QMMUPDRK.js → chunk-BTQSFPIM.js} +4 -4
  18. package/dist/bundle/{chunk-SMDWUPXE.js → chunk-CM2H7NRC.js} +3 -3
  19. package/dist/bundle/{chunk-CBYZW5CC.js → chunk-CPJEQK4V.js} +45 -45
  20. package/dist/bundle/{chunk-ILC7NFS2.js → chunk-DIMX5AEE.js} +4 -4
  21. package/dist/bundle/{program-ZIRYOO2T.js → chunk-DMQ3342A.js} +881 -11256
  22. package/dist/bundle/{chunk-VQM3H422.js → chunk-EACY2ULS.js} +428 -204
  23. package/dist/bundle/{chunk-IRDGD3QQ.js → chunk-EB7LKK4K.js} +1 -1
  24. package/dist/bundle/{chunk-XA6YO24S.js → chunk-EGG3PGCM.js} +1 -1
  25. package/dist/bundle/{chunk-J35OGOCI.js → chunk-EKTZEF3Q.js} +2 -2
  26. package/dist/bundle/{chunk-SXGAIQ5X.js → chunk-ELKYINWL.js} +12 -12
  27. package/dist/bundle/{chunk-VECICKTE.js → chunk-F2ED6KG6.js} +2 -2
  28. package/dist/bundle/{chunk-RG6ITTLQ.js → chunk-FXHN2UZW.js} +19 -14
  29. package/dist/bundle/{chunk-YAUDFROV.js → chunk-GQOXFZBX.js} +673 -371
  30. package/dist/bundle/{chunk-PF3ALSAV.js → chunk-GRXVN2X7.js} +1 -1
  31. package/dist/bundle/{chunk-6JOT5KWM.js → chunk-GSEDSGJF.js} +358 -266
  32. package/dist/bundle/{chunk-XPRYBLTS.js → chunk-IC2TL7RW.js} +2 -2
  33. package/dist/bundle/{chunk-MHDLZCEO.js → chunk-IJC6MFLP.js} +8 -8
  34. package/dist/bundle/{chunk-CCOYC6HL.js → chunk-INTF3YPV.js} +2 -2
  35. package/dist/bundle/{chunk-WUCQ56RP.js → chunk-ITQBXFMC.js} +2 -2
  36. package/dist/bundle/{chunk-ZKWE5MCA.js → chunk-J6D34BFP.js} +803 -351
  37. package/dist/bundle/{chunk-3V4WIGWC.js → chunk-JCCL7RGH.js} +2 -2
  38. package/dist/bundle/{chunk-VDBFSLHP.js → chunk-JDDVGGUV.js} +5 -5
  39. package/dist/bundle/{chunk-EG2OMKWH.js → chunk-JY4LVWGZ.js} +12 -0
  40. package/dist/bundle/{chunk-RNXYDBQO.js → chunk-KQSHIQSV.js} +134 -59
  41. package/dist/bundle/{chunk-KXERKAID.js → chunk-LNXFM4FD.js} +13 -13
  42. package/dist/bundle/{chunk-RHJC4PHV.js → chunk-LWIMGWKB.js} +3 -3
  43. package/dist/bundle/{chunk-ZD3STMY7.js → chunk-M43DAAZ7.js} +1 -1
  44. package/dist/bundle/{chunk-5UOOH7VG.js → chunk-MLMSQK76.js} +1 -1
  45. package/dist/bundle/{chunk-LGNS4JVK.js → chunk-MPVW7BQZ.js} +5 -5
  46. package/dist/bundle/{chunk-HXRIV2TV.js → chunk-MROFZXAB.js} +63 -30
  47. package/dist/bundle/{chunk-UCINAEIA.js → chunk-N5H6I7WQ.js} +5 -5
  48. package/dist/bundle/{chunk-OJRLTJRS.js → chunk-NAH473ZR.js} +1 -1
  49. package/dist/bundle/{chunk-DZSWKA3K.js → chunk-ND3GBFEY.js} +1 -1
  50. package/dist/bundle/{chunk-7MLWSUEK.js → chunk-OQK2IKPB.js} +1 -1
  51. package/dist/bundle/{chunk-3B645KUY.js → chunk-Q6MFBH6Q.js} +9 -9
  52. package/dist/bundle/{chunk-BB2MGFOZ.js → chunk-R2LJDDZP.js} +3 -3
  53. package/dist/bundle/{chunk-NELE7AIX.js → chunk-R3LNQ3I4.js} +1 -1
  54. package/dist/bundle/{chunk-LR5EY5JY.js → chunk-RTESJ5O2.js} +3 -3
  55. package/dist/bundle/{chunk-5RBLNI6C.js → chunk-SKTGBVYC.js} +4 -4
  56. package/dist/bundle/{chunk-CDZZ2DZO.js → chunk-T4LW6UYQ.js} +1 -1
  57. package/dist/bundle/{chunk-RC7TIYUZ.js → chunk-UA2C4BCH.js} +8 -8
  58. package/dist/bundle/{chunk-2TBIVKBH.js → chunk-UPXUE27A.js} +5 -5
  59. package/dist/bundle/{chunk-OUF6RCRZ.js → chunk-UVR6U55E.js} +5 -5
  60. package/dist/bundle/{chunk-VXHN3SWW.js → chunk-UXCDBNAY.js} +2 -2
  61. package/dist/bundle/{chunk-MCPDL5YU.js → chunk-UY2VH3QK.js} +1 -1
  62. package/dist/bundle/{chunk-CP5N3KH3.js → chunk-VLPMB3UU.js} +4 -4
  63. package/dist/bundle/{chunk-UG2V7BQY.js → chunk-VVEFQEWP.js} +21 -21
  64. package/dist/bundle/{chunk-THGFFQCK.js → chunk-XF3LZ32F.js} +2 -2
  65. package/dist/bundle/{chunk-GV2FSWFS.js → chunk-XSI5NYGB.js} +7 -7
  66. package/dist/bundle/{chunk-4SGCOUQ6.js → chunk-ZDOVR4PA.js} +6 -6
  67. package/dist/bundle/{chunk-OFYKXQMS.js → chunk-ZLZE5P6M.js} +7 -7
  68. package/dist/bundle/{chunk-E5FQ7U7L.js → chunk-ZOYGY2PN.js} +2 -2
  69. package/dist/bundle/{command-contract-TMVGYSQQ.js → command-contract-543RRFNU.js} +13 -13
  70. package/dist/bundle/{decode-6XSZIZAA.js → decode-YHX3DQG2.js} +4 -4
  71. package/dist/bundle/{dispatch-VUMQPYMA.js → dispatch-MELZFYOS.js} +1 -1
  72. package/dist/bundle/{echarts-NGS4QG4E.js → echarts-FBVAP7BR.js} +2 -2
  73. package/dist/bundle/{embed-YNH5M6UL.js → embed-CQJ42S5C.js} +5 -5
  74. package/dist/bundle/{embedder-LLNK4JF4.js → embedder-EDXLEJ27.js} +8 -8
  75. package/dist/bundle/{entry-L42C5CHF.js → entry-HZEA7QFK.js} +6 -6
  76. package/dist/bundle/failure-62G7QSPX.js +66 -0
  77. package/dist/bundle/{failure-Z2FXWIBY.js → failure-RBNZBCZJ.js} +1 -1
  78. package/dist/bundle/{first-run-TT6KMHKA.js → first-run-JZQN7R6M.js} +8 -8
  79. package/dist/bundle/first-screen-56V3UOQE.js +30 -0
  80. package/dist/bundle/{instructions-4EJ4BBWD.js → instructions-NYVYNWVU.js} +1 -1
  81. package/dist/bundle/mcp-Y6IPYDS2.js +90 -0
  82. package/dist/bundle/memo.js +9 -9
  83. package/dist/bundle/{node-QQXKQWNC.js → node-2QE6UPGS.js} +2 -2
  84. package/dist/bundle/{node-sqlite-GJI2GMLW.js → node-sqlite-SDHZJNY7.js} +5 -5
  85. package/dist/bundle/{oauth-Q5VGUPUR.js → oauth-FFUJREKS.js} +6 -6
  86. package/dist/bundle/{open-NSXIYF3N.js → open-NT2GYX6N.js} +4 -4
  87. package/dist/bundle/{openai-LHH7MSGQ.js → openai-IQA2XR6Z.js} +9 -9
  88. package/dist/bundle/{process-PI6XUJWP.js → process-HIEJXYW6.js} +1 -1
  89. package/dist/bundle/program-DEMRKCZY.js +10972 -0
  90. package/dist/bundle/{prompt-VFXA7IKL.js → prompt-IOZAME2R.js} +4 -4
  91. package/dist/bundle/{recognize-UWAARXOH.js → recognize-2XOAZJ5N.js} +3 -3
  92. package/dist/bundle/{remote-KGEVCB2Q.js → remote-2LE7OTDA.js} +6 -6
  93. package/dist/bundle/{rerank-SCBTCBPO.js → rerank-UKOVVZM6.js} +6 -6
  94. package/dist/bundle/{serve-WPVKVR24.js → serve-S2UHPEBP.js} +8 -8
  95. package/dist/bundle/server-3YNOEPWU.js +61 -0
  96. package/dist/bundle/{server-VO5SXU5A.js → server-BG4WWQHY.js} +53 -53
  97. package/dist/bundle/server-EZWQ5KP4.js +48 -0
  98. package/dist/bundle/{setup-X6OJ3K4F.js → setup-2X7ADKFH.js} +42 -42
  99. package/dist/bundle/{state-KGHS4C6J.js → state-F5KT3CBD.js} +5 -5
  100. package/dist/bundle/{store-VCVOIQES.js → store-WBUUS7FO.js} +11 -11
  101. package/dist/bundle/store-maintenance-command-KLST56XF.js +48 -0
  102. package/dist/bundle/update-WH4CGJGP.js +69 -0
  103. package/dist/config-command.d.ts.map +1 -1
  104. package/dist/config-command.js +23 -2
  105. package/dist/config-command.js.map +1 -1
  106. package/dist/config.d.ts +11 -2
  107. package/dist/config.d.ts.map +1 -1
  108. package/dist/config.js +50 -3
  109. package/dist/config.js.map +1 -1
  110. package/dist/examples.d.ts.map +1 -1
  111. package/dist/examples.js +2 -0
  112. package/dist/examples.js.map +1 -1
  113. package/dist/mail/review-command.d.ts.map +1 -1
  114. package/dist/mail/review-command.js +6 -0
  115. package/dist/mail/review-command.js.map +1 -1
  116. package/dist/review/kinds.js +2 -2
  117. package/dist/review/kinds.js.map +1 -1
  118. package/dist/tasks/command.js +2 -2
  119. package/dist/tasks/command.js.map +1 -1
  120. package/dist/tasks/tasks.d.ts +1 -1
  121. package/dist/tasks/tasks.d.ts.map +1 -1
  122. package/dist/version.d.ts +1 -1
  123. package/dist/version.js +1 -1
  124. package/package.json +3 -3
  125. package/dist/bundle/auto-S3AYMAGB.js +0 -86
  126. package/dist/bundle/chunk-XW4KGSAA.js +0 -412
  127. package/dist/bundle/failure-TQJGSWRU.js +0 -66
  128. package/dist/bundle/first-screen-56KZKY77.js +0 -30
  129. package/dist/bundle/mcp-PNC3TI7O.js +0 -90
  130. package/dist/bundle/server-F2PSE6LG.js +0 -48
  131. package/dist/bundle/server-K5JYA3ZT.js +0 -61
  132. package/dist/bundle/store-maintenance-command-R4CP6AZN.js +0 -48
  133. package/dist/bundle/update-M6AIJ2SZ.js +0 -69
  134. /package/dist/bundle/{chunk-YYQN5ES2.js → chunk-CWOKGEL3.js} +0 -0
@@ -8,7 +8,7 @@ import {
8
8
  sameOrdinaryFile,
9
9
  syncDirectory,
10
10
  writeFileAtomic
11
- } from "./chunk-SXGAIQ5X.js";
11
+ } from "./chunk-ELKYINWL.js";
12
12
  import {
13
13
  Command,
14
14
  DEFAULT_IMAGE_MODEL,
@@ -51,17 +51,17 @@ import {
51
51
  typedCommand,
52
52
  vectorModelKey,
53
53
  withAttempt
54
- } from "./chunk-VQM3H422.js";
54
+ } from "./chunk-EACY2ULS.js";
55
55
  import {
56
56
  isCliFailure
57
- } from "./chunk-RC7TIYUZ.js";
57
+ } from "./chunk-UA2C4BCH.js";
58
58
  import {
59
59
  isNewer,
60
60
  updateCommand
61
- } from "./chunk-3V4WIGWC.js";
61
+ } from "./chunk-JCCL7RGH.js";
62
62
  import {
63
63
  readOnlyLockOf
64
- } from "./chunk-NELE7AIX.js";
64
+ } from "./chunk-R3LNQ3I4.js";
65
65
  import {
66
66
  AGENDA_COLUMNS,
67
67
  CHAT_COLUMNS,
@@ -86,10 +86,12 @@ import {
86
86
  RANKING_TOKENIZER_VERSION,
87
87
  SEARCH_QUERY,
88
88
  SnapshotBudget,
89
+ TASK_CLOSE_KIND,
89
90
  TASK_RELATION_KINDS,
90
91
  TRACKED_CHAT_COLUMNS,
91
92
  UNKNOWN_PROVIDER,
92
93
  amountsOf,
94
+ assertGenericAction,
93
95
  assertMayDecide,
94
96
  attachmentColumns,
95
97
  attachmentMaxBytes,
@@ -105,7 +107,9 @@ import {
105
107
  counterFreshness,
106
108
  counterObservationTime,
107
109
  cutChunks,
110
+ deciderAuthor,
108
111
  decodeProjectAnnotationSnapshot,
112
+ delayStats,
109
113
  dueDayOf,
110
114
  entriesOfList,
111
115
  envelopeErrors,
@@ -125,6 +129,7 @@ import {
125
129
  isFolderProvider,
126
130
  isKind,
127
131
  isLocator,
132
+ isOwnerOnlyKind,
128
133
  isQueryLimit,
129
134
  isStemmed,
130
135
  kindIn,
@@ -150,13 +155,15 @@ import {
150
155
  queryFilter,
151
156
  rankingContextRange,
152
157
  rankingOptions,
158
+ rankingQuestion,
153
159
  recordErrors,
154
160
  searchError,
155
161
  sourceOf,
156
162
  threadConversation,
157
163
  validateAst,
158
- validateFields
159
- } from "./chunk-YAUDFROV.js";
164
+ validateFields,
165
+ withoutField
166
+ } from "./chunk-GQOXFZBX.js";
160
167
  import {
161
168
  EVENT_QUERY,
162
169
  MEETING_FINDINGS_KIND,
@@ -210,23 +217,23 @@ import {
210
217
  validateQuery,
211
218
  walkQuery,
212
219
  zonedMoment
213
- } from "./chunk-RNXYDBQO.js";
220
+ } from "./chunk-KQSHIQSV.js";
214
221
  import {
215
222
  DEFAULT_STEMMERS,
216
223
  createStemmer,
217
224
  fold,
218
225
  normalize
219
- } from "./chunk-7F6FGMCC.js";
226
+ } from "./chunk-2IRCJT4O.js";
220
227
  import {
221
228
  DEFAULT_TASK_CATEGORIES,
222
229
  FALLBACK_CATEGORY
223
- } from "./chunk-2TBIVKBH.js";
230
+ } from "./chunk-UPXUE27A.js";
224
231
  import {
225
232
  MAX_MODEL_IMAGE_BYTES
226
- } from "./chunk-KUNA6MQZ.js";
233
+ } from "./chunk-ALGIPJ6L.js";
227
234
  import {
228
235
  remoteKey
229
- } from "./chunk-WUCQ56RP.js";
236
+ } from "./chunk-ITQBXFMC.js";
230
237
  import {
231
238
  Unzip,
232
239
  UnzipInflate,
@@ -237,19 +244,19 @@ import {
237
244
  placedText,
238
245
  runEmbedders,
239
246
  textModelsDirectory
240
- } from "./chunk-LGNS4JVK.js";
247
+ } from "./chunk-MPVW7BQZ.js";
241
248
  import {
242
249
  installFiles,
243
250
  megabytes
244
- } from "./chunk-LR5EY5JY.js";
251
+ } from "./chunk-RTESJ5O2.js";
245
252
  import {
246
253
  storePath,
247
254
  wirecatDirectory
248
- } from "./chunk-VXHN3SWW.js";
255
+ } from "./chunk-UXCDBNAY.js";
249
256
  import {
250
257
  resolvePaths,
251
258
  writeSecurely
252
- } from "./chunk-CDZZ2DZO.js";
259
+ } from "./chunk-T4LW6UYQ.js";
253
260
  import {
254
261
  array,
255
262
  boolean,
@@ -272,7 +279,7 @@ import {
272
279
  string,
273
280
  transform,
274
281
  unknown
275
- } from "./chunk-EG2OMKWH.js";
282
+ } from "./chunk-JY4LVWGZ.js";
276
283
  import {
277
284
  importFrom,
278
285
  resolveFrom
@@ -16898,7 +16905,7 @@ var require_lib3 = __commonJS({
16898
16905
  }
16899
16906
  });
16900
16907
 
16901
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/conversations/link.js
16908
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/conversations/link.js
16902
16909
  var RULES_VERSION = 5;
16903
16910
  var LOOK_BACK = 50;
16904
16911
  var SAME_SENDER_WITHIN = 10;
@@ -16988,13 +16995,13 @@ var latest = /* @__PURE__ */ __name((window3, matches) => {
16988
16995
  var sameThread = /* @__PURE__ */ __name((a, b) => a.threadId === b.threadId, "sameThread");
16989
16996
  var link = /* @__PURE__ */ __name((message, parentId, source, kind, confidence, method) => ({ messageId: message.id, parentId, source, kind, confidence, method }), "link");
16990
16997
 
16991
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/ports/traits.js
16998
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/ports/traits.js
16992
16999
  var syncsOneChat = /* @__PURE__ */ __name((messenger) => messenger.history !== "store" || messenger.historyOnDemand === true, "syncsOneChat");
16993
17000
 
16994
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/snapshot.js
17001
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/snapshot.js
16995
17002
  var MAX_BYTES = 16 * 1024 * 1024;
16996
17003
 
16997
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
17004
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
16998
17005
  var ORGANIZATIONS_QUERY = {
16999
17006
  entity: "organization",
17000
17007
  backend: "sql",
@@ -17029,7 +17036,7 @@ var REMINDERS_QUERY = {
17029
17036
  })
17030
17037
  };
17031
17038
 
17032
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/store/project-transfer/preview.js
17039
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/store/project-transfer/preview.js
17033
17040
  var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) => {
17034
17041
  if (!options || typeof options !== "object" || Array.isArray(options))
17035
17042
  throw new CliError("validation_error", "project preview options are required");
@@ -17051,7 +17058,7 @@ var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) =>
17051
17058
  }
17052
17059
  }, "previewProjectAnnotationSnapshot");
17053
17060
 
17054
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot.js
17061
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot.js
17055
17062
  var snapshotProjectAnnotations = /* @__PURE__ */ __name(async (options) => {
17056
17063
  if (!options || typeof options !== "object" || Array.isArray(options))
17057
17064
  throw new CliError("validation_error", "snapshot options are required");
@@ -17072,7 +17079,7 @@ var snapshotProjectAnnotations = /* @__PURE__ */ __name(async (options) => {
17072
17079
  }
17073
17080
  }, "snapshotProjectAnnotations");
17074
17081
 
17075
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/cli/messenger/lacks.js
17082
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/cli/messenger/lacks.js
17076
17083
  var COMMAND_NEEDS = {
17077
17084
  "account update": ["updateProfile", "change the profile"],
17078
17085
  "account sessions list": ["sessions", "list the account's sessions"],
@@ -17122,7 +17129,7 @@ var hideNever = /* @__PURE__ */ __name((messenger, group) => {
17122
17129
  return group;
17123
17130
  }, "hideNever");
17124
17131
 
17125
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/members-audit.js
17132
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/members-audit.js
17126
17133
  var AUDIT_PAGE = 200;
17127
17134
  var AUDIT_BUDGET = 10;
17128
17135
  var AUDIT_PAUSE_MS = 1e3;
@@ -17202,7 +17209,7 @@ var burstJoins = /* @__PURE__ */ __name((members) => {
17202
17209
  return found;
17203
17210
  }, "burstJoins");
17204
17211
 
17205
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/meetings/cli/query-options.js
17212
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/meetings/cli/query-options.js
17206
17213
  var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
17207
17214
  command.allowUnknownOption();
17208
17215
  const parse = command.parseOptions.bind(command);
@@ -17222,7 +17229,7 @@ var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
17222
17229
  return command;
17223
17230
  }, "queryWordsAfterOptions");
17224
17231
 
17225
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/meetings/cli/passage.js
17232
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/meetings/cli/passage.js
17226
17233
  var count = /* @__PURE__ */ __name((value) => {
17227
17234
  if (!/^(0|[1-9]\d*)$/.test(value) || !Number.isSafeInteger(Number(value)))
17228
17235
  throw new CliError("validation_error", "expected a nonnegative safe integer");
@@ -17264,7 +17271,7 @@ var addMeetingPassageCommandDefinition = /* @__PURE__ */ __name((program, deps)
17264
17271
  var createMeetingPassageCommand = sharedCommand(createMeetingPassageCommandDefinition);
17265
17272
  var addMeetingPassageCommand = sharedCommand(addMeetingPassageCommandDefinition);
17266
17273
 
17267
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/meetings/cli/project-evidence.js
17274
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/meetings/cli/project-evidence.js
17268
17275
  var integer2 = /* @__PURE__ */ __name((value) => {
17269
17276
  if (!/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
17270
17277
  throw new CliError("validation_error", "expected a positive safe integer");
@@ -17287,7 +17294,7 @@ ${fieldsHelp(MEETING_PROJECT_EVIDENCE_QUERY)}`).option("--limit <n>", "hits in o
17287
17294
  }, "addMeetingProjectEvidenceCommandDefinition");
17288
17295
  var addMeetingProjectEvidenceCommand = sharedCommand(addMeetingProjectEvidenceCommandDefinition);
17289
17296
 
17290
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/meetings/cli/search.js
17297
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/meetings/cli/search.js
17291
17298
  var ZONED = /(?:Z|[+-]\d{2}:?\d{2})$/i;
17292
17299
  var moment = /* @__PURE__ */ __name((flag, end, readIn) => (value) => {
17293
17300
  const zone = timezoneOf();
@@ -17373,7 +17380,7 @@ var addMeetingSearchCommandDefinition = /* @__PURE__ */ __name((program, deps) =
17373
17380
  var createMeetingSearchCommand = sharedCommand(createMeetingSearchCommandDefinition);
17374
17381
  var addMeetingSearchCommand = sharedCommand(addMeetingSearchCommandDefinition);
17375
17382
 
17376
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/meetings/cli/index.js
17383
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/meetings/cli/index.js
17377
17384
  var integer4 = /* @__PURE__ */ __name((text2) => {
17378
17385
  if (!/^[1-9]\d*$/.test(text2) || !Number.isSafeInteger(Number(text2)))
17379
17386
  throw new InvalidArgumentError("expected a positive integer");
@@ -17505,7 +17512,7 @@ ${fieldsHelp(EVENT_QUERY, MEETING_QUERY_GUIDE)}`);
17505
17512
  }, "addMeetingCommandsDefinition");
17506
17513
  var addMeetingCommands = sharedCommand(addMeetingCommandsDefinition);
17507
17514
 
17508
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/cli/list-query.js
17515
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/cli/list-query.js
17509
17516
  var LIST_QUERY_GUIDE = "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md";
17510
17517
  var QUERY_ARGUMENT = "field:value terms that narrow the list \u2014 the fields are below";
17511
17518
  var withQuery = /* @__PURE__ */ __name((command, registry) => {
@@ -17638,7 +17645,7 @@ var termField = /* @__PURE__ */ __name((name, type, example, more = {}) => nativ
17638
17645
  var queryHelp = /* @__PURE__ */ __name((registry) => `
17639
17646
  ${fieldsHelp(registry, LIST_QUERY_GUIDE)}`, "queryHelp");
17640
17647
 
17641
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/cli/paging.js
17648
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/cli/paging.js
17642
17649
  var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
17643
17650
  if (!/^\d+$/.test(value.trim()) || Number(value) < 1)
17644
17651
  throw new CliError("validation_error", `${flag} takes a whole number from 1 upwards, not "${value}"`);
@@ -17647,7 +17654,7 @@ var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
17647
17654
  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");
17648
17655
  var window = /* @__PURE__ */ __name(({ limit, page, all }) => all ? { offset: 0 } : { limit, offset: (page - 1) * limit }, "window");
17649
17656
 
17650
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/cli/messenger/chat-answers.js
17657
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/cli/messenger/chat-answers.js
17651
17658
  var defined = /* @__PURE__ */ __name((record2) => Object.fromEntries(Object.entries(record2).filter(([, value]) => value !== void 0)), "defined");
17652
17659
  var chatRef = /* @__PURE__ */ __name((account, chat) => formatReference({ type: "chat", provider: account.provider, account: account.account, chat }), "chatRef");
17653
17660
  var settingsOf = /* @__PURE__ */ __name((settings) => defined({
@@ -17909,7 +17916,7 @@ var sessionAnswer = /* @__PURE__ */ __name(({ current, client, device, location,
17909
17916
  ...createdAt === void 0 ? {} : { created_at: createdAt }
17910
17917
  }), "sessionAnswer");
17911
17918
 
17912
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/ports/messenger.js
17919
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/ports/messenger.js
17913
17920
  var throughWrapper = /* @__PURE__ */ __name((inner, handled, wrap = (_, call) => call) => new Proxy(handled, {
17914
17921
  get: /* @__PURE__ */ __name((own, key) => {
17915
17922
  if (key in own)
@@ -17926,12 +17933,12 @@ var capability = /* @__PURE__ */ __name((adapter, method, what) => {
17926
17933
  return found.bind(adapter);
17927
17934
  }, "capability");
17928
17935
 
17929
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/sends/send-id.js
17936
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/sends/send-id.js
17930
17937
  import { randomBytes } from "node:crypto";
17931
17938
  var newSendId = /* @__PURE__ */ __name(() => randomBytes(8).readBigInt64BE().toString(), "newSendId");
17932
17939
  var newOperationId = newSendId;
17933
17940
 
17934
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/deps.js
17941
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/deps.js
17935
17942
  var accountStore = /* @__PURE__ */ __name(async (deps) => (await deps.store()).forAccount(await deps.account()), "accountStore");
17936
17943
  var crossAccount = /* @__PURE__ */ __name((deps, _reason) => deps.store(), "crossAccount");
17937
17944
  var NO_LOCAL_STORE = "this answer comes from the messenger, not from the local store";
@@ -18008,7 +18015,7 @@ var storeOnlyDeps = /* @__PURE__ */ __name((store, account, { app, env }) => {
18008
18015
  return { ...storedDeps(messenger, store, account, guard), ...env === void 0 ? {} : { env } };
18009
18016
  }, "storeOnlyDeps");
18010
18017
 
18011
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/patience.js
18018
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/patience.js
18012
18019
  import { setTimeout as sleep } from "node:timers/promises";
18013
18020
  var LONGEST_WAIT_MS = 5 * 60 * 1e3;
18014
18021
  var patiently = /* @__PURE__ */ __name(async (request, note2, stop) => {
@@ -18031,10 +18038,10 @@ var patiently = /* @__PURE__ */ __name(async (request, note2, stop) => {
18031
18038
  }
18032
18039
  }, "patiently");
18033
18040
 
18034
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/archive.js
18041
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/archive.js
18035
18042
  import { setTimeout as sleep2 } from "node:timers/promises";
18036
18043
 
18037
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/backfill-estimate.js
18044
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/backfill-estimate.js
18038
18045
  var REQUEST_MS = 400;
18039
18046
  var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, maxPages, pauseMs }) => {
18040
18047
  const lowest = ranges[0];
@@ -18057,13 +18064,13 @@ var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, max
18057
18064
  };
18058
18065
  }, "estimateBackfill");
18059
18066
 
18060
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/domain/recovery.js
18067
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/domain/recovery.js
18061
18068
  var withRecovery = /* @__PURE__ */ __name((error) => ({
18062
18069
  ...error,
18063
18070
  retryable: typeof error.retryable === "boolean" ? error.retryable : error.code === "rate_limited" || error.status === 429
18064
18071
  }), "withRecovery");
18065
18072
 
18066
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/batch.js
18073
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/batch.js
18067
18074
  var actionable = /* @__PURE__ */ __name((error) => {
18068
18075
  if (isCliFailure(error))
18069
18076
  return withRecovery({ code: error.code, message: error.message, ...error.details });
@@ -18146,7 +18153,7 @@ var mergeBatches = /* @__PURE__ */ __name((a, b) => {
18146
18153
  };
18147
18154
  }, "mergeBatches");
18148
18155
 
18149
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/domain/ref-arguments.js
18156
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/domain/ref-arguments.js
18150
18157
  var TAKES = {
18151
18158
  chat: "a chat: chat:<provider>/<account>/<chat>, its id or its title",
18152
18159
  message: "a message: msg:<provider>/<account>/<chat>/<message>, or a chat and the message's id"
@@ -18206,7 +18213,7 @@ var ensureAccount = /* @__PURE__ */ __name(async (reference, scope, profilesOn)
18206
18213
  throw wrongAccount(reference, scope, profiles);
18207
18214
  }, "ensureAccount");
18208
18215
 
18209
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/resolve.js
18216
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/resolve.js
18210
18217
  var isId = /* @__PURE__ */ __name((reference) => /^-?\d+$/.test(reference.trim()), "isId");
18211
18218
  var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase(), "foldName");
18212
18219
  var pickChat = /* @__PURE__ */ __name((reference, chats) => {
@@ -18251,7 +18258,7 @@ ${lines3}`, { candidates });
18251
18258
  }, "ambiguous");
18252
18259
  var isPresent = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isPresent");
18253
18260
 
18254
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/message-resolution.js
18261
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/message-resolution.js
18255
18262
  var readChatId = /* @__PURE__ */ __name(async (deps, reference, store, account) => {
18256
18263
  if (deps.reads !== "store")
18257
18264
  return keptChatId(deps.messenger, reference, store, account);
@@ -18269,11 +18276,11 @@ var readChatId = /* @__PURE__ */ __name(async (deps, reference, store, account)
18269
18276
  }, "readChatId");
18270
18277
  var LEFT_EMPTY = "you left this chat, and the store holds none of its messages";
18271
18278
  var storedChatId = /* @__PURE__ */ __name((messenger, reference, store, account, { includeLeft = false } = {}) => {
18272
- const renamed = /* @__PURE__ */ __name((id2) => store.chats.renamedChatId(account, id2), "renamed");
18279
+ const renamed2 = /* @__PURE__ */ __name((id2) => store.chats.renamedChatId(account, id2), "renamed");
18273
18280
  const profilesOn = profilesOnAccount(store, messenger.app?.command, account.provider);
18274
18281
  const among = chatIdAmong(messenger, reference, account, {
18275
18282
  held: /* @__PURE__ */ __name(() => store.chats.chats(account, {}), "held"),
18276
- renamed,
18283
+ renamed: renamed2,
18277
18284
  left: /* @__PURE__ */ __name(async (id2) => leftIn(await store.chats.chats(account, byId(id2))), "left"),
18278
18285
  profilesOn
18279
18286
  });
@@ -18284,17 +18291,17 @@ var storedChatId = /* @__PURE__ */ __name((messenger, reference, store, account,
18284
18291
  throw error;
18285
18292
  return chatIdAmong(messenger, reference, account, {
18286
18293
  held: /* @__PURE__ */ __name(() => store.chats.chats(account, { includeLeft: true }), "held"),
18287
- renamed,
18294
+ renamed: renamed2,
18288
18295
  profilesOn
18289
18296
  });
18290
18297
  });
18291
18298
  }, "storedChatId");
18292
18299
  var keptChatId = /* @__PURE__ */ __name((messenger, reference, store, account) => storedChatId(messenger, reference, store, account, { includeLeft: true }), "keptChatId");
18293
18300
  var chatIdIn = /* @__PURE__ */ __name((messenger, reference, store, { includeLeft = false } = {}) => {
18294
- const renamed = /* @__PURE__ */ __name((id2) => store.chats.renamedChatId(id2), "renamed");
18301
+ const renamed2 = /* @__PURE__ */ __name((id2) => store.chats.renamedChatId(id2), "renamed");
18295
18302
  const among = chatIdAmong(messenger, reference, store.account, {
18296
18303
  held: /* @__PURE__ */ __name(() => store.chats.chats({}), "held"),
18297
- renamed,
18304
+ renamed: renamed2,
18298
18305
  left: /* @__PURE__ */ __name(async (id2) => leftIn(await store.chats.chats(byId(id2))), "left")
18299
18306
  });
18300
18307
  if (!includeLeft)
@@ -18304,7 +18311,7 @@ var chatIdIn = /* @__PURE__ */ __name((messenger, reference, store, { includeLef
18304
18311
  throw error;
18305
18312
  return chatIdAmong(messenger, reference, store.account, {
18306
18313
  held: /* @__PURE__ */ __name(() => store.chats.chats({ includeLeft: true }), "held"),
18307
- renamed
18314
+ renamed: renamed2
18308
18315
  });
18309
18316
  });
18310
18317
  }, "chatIdIn");
@@ -18319,7 +18326,7 @@ var profilesOnAccount = /* @__PURE__ */ __name((store, app, provider) => async (
18319
18326
  return void 0;
18320
18327
  return Object.entries((await store.accounts.profiles())[app] ?? {}).filter(([, key]) => key.provider === provider && key.account === account).map(([name]) => name);
18321
18328
  }, "profilesOnAccount");
18322
- var chatIdAmong = /* @__PURE__ */ __name(async (messenger, reference, account, { held, renamed, left, profilesOn }) => {
18329
+ var chatIdAmong = /* @__PURE__ */ __name(async (messenger, reference, account, { held, renamed: renamed2, left, profilesOn }) => {
18323
18330
  const trimmed = reference.trim();
18324
18331
  if (messenger.savedChatId && ["me", "self", "saved"].includes(trimmed.toLowerCase())) {
18325
18332
  return messenger.savedChatId(account);
@@ -18329,7 +18336,7 @@ var chatIdAmong = /* @__PURE__ */ __name(async (messenger, reference, account, {
18329
18336
  await ensureAccount(named2, { account: account.account }, profilesOn);
18330
18337
  if (named2 || /^-?\d+$/.test(trimmed)) {
18331
18338
  const typed = named2?.chat ?? trimmed;
18332
- const id2 = await renamed(typed) ?? typed;
18339
+ const id2 = await renamed2(typed) ?? typed;
18333
18340
  if (await left?.(id2))
18334
18341
  throw new CliError("not_found", `you left chat ${id2}`);
18335
18342
  return id2;
@@ -18338,7 +18345,7 @@ var chatIdAmong = /* @__PURE__ */ __name(async (messenger, reference, account, {
18338
18345
  const exact = chats.find((one2) => one2.id === trimmed);
18339
18346
  if (exact)
18340
18347
  return exact.id;
18341
- const moved = await renamed(trimmed);
18348
+ const moved = await renamed2(trimmed);
18342
18349
  if (moved !== void 0 && chats.some((one2) => one2.id === moved))
18343
18350
  return moved;
18344
18351
  if (trimmed.startsWith("@")) {
@@ -18410,7 +18417,7 @@ var senderAmong = /* @__PURE__ */ __name(async (store, accounts, reference) => {
18410
18417
  }
18411
18418
  }, "senderAmong");
18412
18419
 
18413
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/images/context/index.js
18420
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/images/context/index.js
18414
18421
  var CONTEXT_MESSAGES = 3;
18415
18422
  var CONTEXT_MINUTES = 10;
18416
18423
  var MAX_CHARS = 1200;
@@ -18434,12 +18441,12 @@ var context = {
18434
18441
  }, "describe")
18435
18442
  };
18436
18443
 
18437
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/images/registry.js
18444
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/images/registry.js
18438
18445
  var BUILT_INS = [context];
18439
18446
  var providers = [...BUILT_INS];
18440
18447
  var registeredImageProviders = /* @__PURE__ */ __name(() => providers, "registeredImageProviders");
18441
18448
 
18442
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/conversations.js
18449
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/conversations.js
18443
18450
  var READ_PAGE = 5e3;
18444
18451
  var CHAIN = 50;
18445
18452
  var CONVERSATION_QUERY = {
@@ -18591,7 +18598,7 @@ var sized = /* @__PURE__ */ __name((size4) => {
18591
18598
  return size4;
18592
18599
  }, "sized");
18593
18600
 
18594
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/embeddings-maintenance.js
18601
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/embeddings-maintenance.js
18595
18602
  var REFRESH_BOUNDS = { maxChats: 20, maxChunks: 2e3 };
18596
18603
  var MESSAGE_PAGE = 5e3;
18597
18604
  var PER_SESSION = 8;
@@ -18610,7 +18617,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
18610
18617
  price: remote.price,
18611
18618
  installed: true,
18612
18619
  perBatch: PER_REQUEST * concurrency,
18613
- open: /* @__PURE__ */ __name(async () => (await import("./remote-KGEVCB2Q.js")).openRemote(remote, apiKey, { concurrency }), "open")
18620
+ open: /* @__PURE__ */ __name(async () => (await import("./remote-2LE7OTDA.js")).openRemote(remote, apiKey, { concurrency }), "open")
18614
18621
  };
18615
18622
  }
18616
18623
  const model = textModel(choice);
@@ -18627,7 +18634,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
18627
18634
  if (!isTextModelInstalled(model, directory2))
18628
18635
  throw notDownloaded(model.id);
18629
18636
  if (apart) {
18630
- const { openProcess } = await import("./process-PI6XUJWP.js");
18637
+ const { openProcess } = await import("./process-HIEJXYW6.js");
18631
18638
  return openProcess(model, directory2, { threads: threads ?? defaultThreads() });
18632
18639
  }
18633
18640
  return openEmbedder(model, directory2, { threads: threads ?? defaultThreads() });
@@ -18916,7 +18923,7 @@ var shaped = /* @__PURE__ */ __name(({ chatId, builtAt, algorithmVersion, pendin
18916
18923
  return { ...one2, state };
18917
18924
  }, "shaped");
18918
18925
 
18919
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/search-catchup.js
18926
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/search-catchup.js
18920
18927
  var CATCH_UP_BOUNDS = { maxChunks: 500, maxMessages: 1e4, timeMs: 3e4 };
18921
18928
  var validateCatchUpBounds = /* @__PURE__ */ __name((options) => {
18922
18929
  for (const [key, value, maximum] of [
@@ -18969,7 +18976,7 @@ var catchUpSearch = /* @__PURE__ */ __name(async (deps, chat, options, signal, c
18969
18976
  }
18970
18977
  }, "catchUpSearch");
18971
18978
 
18972
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/archive.js
18979
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/archive.js
18973
18980
  var pushed = /* @__PURE__ */ __name((deps, what) => {
18974
18981
  if (deps.reads === "store") {
18975
18982
  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`);
@@ -19335,7 +19342,7 @@ var timeOfKey = /* @__PURE__ */ __name(async (store, account, chatId, key, byTim
19335
19342
  return message?.timestamp ?? fallback;
19336
19343
  }, "timeOfKey");
19337
19344
 
19338
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/questions.js
19345
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/questions.js
19339
19346
  var LINKS = /https?:\/\/\S+/g;
19340
19347
  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");
19341
19348
  var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker = "others" }) => {
@@ -19365,7 +19372,7 @@ var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker
19365
19372
  });
19366
19373
  }, "questions");
19367
19374
 
19368
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/task-categories.js
19375
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/task-categories.js
19369
19376
  var names = /* @__PURE__ */ __name((categories) => categories.map(({ name }) => name).join(", "), "names");
19370
19377
  var taskCategoryOf = /* @__PURE__ */ __name((categories = DEFAULT_TASK_CATEGORIES, flag = "--category") => (typed) => {
19371
19378
  const name = typed.trim().toLowerCase();
@@ -19422,7 +19429,7 @@ var categorize = /* @__PURE__ */ __name((text2, categories = DEFAULT_TASK_CATEGO
19422
19429
  return best.name;
19423
19430
  }, "categorize");
19424
19431
 
19425
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/task-rules.js
19432
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/task-rules.js
19426
19433
  var taskAccount = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "taskAccount");
19427
19434
  var RULES_IN = {
19428
19435
  dialog: "all",
@@ -19628,7 +19635,7 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account, chatId
19628
19635
  return passes;
19629
19636
  }, "applyTaskRulesToChats");
19630
19637
 
19631
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/context/evidence-response.js
19638
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/context/evidence-response.js
19632
19639
  var contextSourceKey = /* @__PURE__ */ __name((source) => JSON.stringify([source.kind, source.accountId, source.provider, source.account]), "contextSourceKey");
19633
19640
  var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
19634
19641
  const fail3 = /* @__PURE__ */ __name(() => {
@@ -19692,7 +19699,7 @@ var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
19692
19699
  }
19693
19700
  }, "validateContextEvidencePage");
19694
19701
 
19695
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/context/read-budget.js
19702
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/context/read-budget.js
19696
19703
  var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
19697
19704
  if (!limits || typeof limits !== "object" || Array.isArray(limits))
19698
19705
  throw new CliError("validation_error", "limits needs a context read allowance");
@@ -19745,7 +19752,7 @@ var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
19745
19752
  };
19746
19753
  }, "contextReadBudget");
19747
19754
 
19748
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/context-evidence.js
19755
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/context-evidence.js
19749
19756
  var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits) => {
19750
19757
  if (!port || typeof port.read !== "function")
19751
19758
  throw new CliError("configuration_error", "context evidence reader is unavailable");
@@ -19789,7 +19796,7 @@ var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits)
19789
19796
  };
19790
19797
  }, "createContextEvidenceReader");
19791
19798
 
19792
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/ingest.js
19799
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/ingest.js
19793
19800
  var emptyReceipt = /* @__PURE__ */ __name((dryRun) => ({
19794
19801
  dryRun,
19795
19802
  source: null,
@@ -19864,7 +19871,7 @@ var ingest = /* @__PURE__ */ __name(async (store, envelope, { account, dryRun =
19864
19871
  return receipt;
19865
19872
  }, "ingest");
19866
19873
 
19867
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-purposes.js
19874
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/project-purposes.js
19868
19875
  var BUILT_IN_PURPOSES = ["work", "sales", "support", "other"];
19869
19876
  var DEFAULT_PURPOSES = ["work"];
19870
19877
  var LINK_PURPOSE = "work";
@@ -19894,7 +19901,7 @@ var purposeList = /* @__PURE__ */ __name((value, previous = []) => [
19894
19901
  ...value.split(",").map((one2) => one2.trim()).filter(Boolean)
19895
19902
  ], "purposeList");
19896
19903
 
19897
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/moment.js
19904
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/moment.js
19898
19905
  var AGO = /^(\d+)(m|h|d)$/;
19899
19906
  var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
19900
19907
  var DATE = /^\d{4}-\d{2}-\d{2}/;
@@ -19934,7 +19941,7 @@ var dateWindow = /* @__PURE__ */ __name(({ sinceTime, untilTime, zone, now = Dat
19934
19941
  };
19935
19942
  }, "dateWindow");
19936
19943
 
19937
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/botcheck/check.js
19944
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/botcheck/check.js
19938
19945
  var DAY_MS = 864e5;
19939
19946
  var NEW_DAYS = 30;
19940
19947
  var SAME_TEXT_MIN = 20;
@@ -20011,7 +20018,7 @@ var scorePerson = /* @__PURE__ */ __name(({ subject, provider, activity, photos,
20011
20018
  };
20012
20019
  }, "scorePerson");
20013
20020
 
20014
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/botcheck/registries.js
20021
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/botcheck/registries.js
20015
20022
  var REGISTRIES = {
20016
20023
  cas: { title: "Combot Anti-Spam (CAS)", docs: "https://cas.chat/api" },
20017
20024
  lols: { title: "lols.bot", docs: "https://api.lols.bot/lols-bot.json" }
@@ -20096,7 +20103,7 @@ var notCovered = /* @__PURE__ */ __name((messenger, now = /* @__PURE__ */ new Da
20096
20103
  detail: `lists Telegram accounts only, not ${messenger} ones`
20097
20104
  })), "notCovered");
20098
20105
 
20099
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/botcheck/service.js
20106
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/botcheck/service.js
20100
20107
  var ACTIVITY_MESSAGES = 1e3;
20101
20108
  var botCheckService = /* @__PURE__ */ __name((deps) => {
20102
20109
  const subjectOf = /* @__PURE__ */ __name(async (reference) => {
@@ -20184,7 +20191,7 @@ var botCheckService = /* @__PURE__ */ __name((deps) => {
20184
20191
  };
20185
20192
  }, "botCheckService");
20186
20193
 
20187
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/domain/thread.js
20194
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/domain/thread.js
20188
20195
  var threadIdOf = /* @__PURE__ */ __name((value) => {
20189
20196
  if (value === void 0)
20190
20197
  return void 0;
@@ -20194,7 +20201,7 @@ var threadIdOf = /* @__PURE__ */ __name((value) => {
20194
20201
  return id2;
20195
20202
  }, "threadIdOf");
20196
20203
 
20197
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/chat-stats.js
20204
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/chat-stats.js
20198
20205
  var TOP_POSTS = 5;
20199
20206
  var JOINS = /* @__PURE__ */ new Set(["join", "add"]);
20200
20207
  var LEAVES = /* @__PURE__ */ new Set(["leave", "remove"]);
@@ -20311,7 +20318,7 @@ var median = /* @__PURE__ */ __name((values) => {
20311
20318
  return Math.round(sorted.length % 2 === 0 ? ((sorted[middle - 1] ?? upper) + upper) / 2 : upper);
20312
20319
  }, "median");
20313
20320
 
20314
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/member-history.js
20321
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/member-history.js
20315
20322
  var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
20316
20323
  const events = [];
20317
20324
  for (const stay of stays) {
@@ -20343,7 +20350,7 @@ var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
20343
20350
  return events.filter(({ at }) => Date.parse(at) >= since).sort((a, b) => Date.parse(a.at) - Date.parse(b.at) || a.id.localeCompare(b.id));
20344
20351
  }, "memberEvents");
20345
20352
 
20346
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/chats.js
20353
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/chats.js
20347
20354
  var EVENTS_DAYS = 7;
20348
20355
  var TRACKED_DAYS = 30;
20349
20356
  var STATS_PAGE = 1e3;
@@ -20638,7 +20645,7 @@ var storedMembers = /* @__PURE__ */ __name(async (store, chatId) => {
20638
20645
  return members.length === 0 ? null : members;
20639
20646
  }, "storedMembers");
20640
20647
 
20641
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/inbox.js
20648
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/inbox.js
20642
20649
  var INBOX_CHATS = 20;
20643
20650
  var REVIEW_DAYS = 3;
20644
20651
  var UNANSWERED_HOURS = 24;
@@ -20846,7 +20853,7 @@ var inboxService = /* @__PURE__ */ __name((deps) => {
20846
20853
  };
20847
20854
  }, "inboxService");
20848
20855
 
20849
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/person-context.js
20856
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/person-context.js
20850
20857
  var CONTEXT_MESSAGES2 = 10;
20851
20858
  var CONTEXT_BYTES = 64 * 1024;
20852
20859
  var toContext = /* @__PURE__ */ __name((key, message, chatTitle2) => ({
@@ -21107,10 +21114,10 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
21107
21114
  };
21108
21115
  }, "personMessages");
21109
21116
 
21110
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
21117
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
21111
21118
  import { createHash } from "node:crypto";
21112
21119
 
21113
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-reference.js
21120
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/meeting-reference.js
21114
21121
  var missing2 = /* @__PURE__ */ __name(() => new CliError("not_found", "the meeting evidence is unavailable for this account"), "missing");
21115
21122
  var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId, reference, options = {}) => {
21116
21123
  const parsed = parseMeetingReference(reference);
@@ -21128,7 +21135,7 @@ var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId,
21128
21135
  return { parsed, meeting };
21129
21136
  }, "authorizedMeetingMetadata");
21130
21137
 
21131
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
21138
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
21132
21139
  var hash = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
21133
21140
  var checkMeetingCancelled = /* @__PURE__ */ __name((signal) => {
21134
21141
  if (signal?.aborted)
@@ -21327,7 +21334,7 @@ var readMeetingEvidence = /* @__PURE__ */ __name(async (store, accountId, refere
21327
21334
  return { ...packet, fingerprint: hash(packet) };
21328
21335
  }, "readMeetingEvidence");
21329
21336
 
21330
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/person-meeting-context.js
21337
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/person-meeting-context.js
21331
21338
  var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference, options) => {
21332
21339
  const { meetings = 10, cues = 5, bytes: bytes2 = 64 * 1024, scanLimit = 1e3, since, signal } = options;
21333
21340
  const requestedAccounts = options.accountIds;
@@ -21426,7 +21433,7 @@ var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference,
21426
21433
  };
21427
21434
  }, "personMeetingContext");
21428
21435
 
21429
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/person-preparation.js
21436
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/person-preparation.js
21430
21437
  var PREPARE_BYTES = 96 * 1024;
21431
21438
  var MEETINGS = 5;
21432
21439
  var CUES = 3;
@@ -21543,7 +21550,7 @@ var meetingsOf = /* @__PURE__ */ __name(async (store, uid, stored, since, left)
21543
21550
  }
21544
21551
  }, "meetingsOf");
21545
21552
 
21546
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/person-profile.js
21553
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/person-profile.js
21547
21554
  var personProfile = /* @__PURE__ */ __name(async (deps, person, known2) => {
21548
21555
  const online = deps.offline ? void 0 : await deps.connection();
21549
21556
  const held = await storeIfOpen(deps);
@@ -21613,7 +21620,7 @@ var quiet = /* @__PURE__ */ __name((facts) => facts.chats.map(({ id: id2, title,
21613
21620
  complete: false
21614
21621
  })), "quiet");
21615
21622
 
21616
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/person-timeline.js
21623
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/person-timeline.js
21617
21624
  var TIMELINE_ITEMS = 50;
21618
21625
  var TIMELINE_MAX = 500;
21619
21626
  var SCOPES2 = ["personal", "work"];
@@ -21668,7 +21675,7 @@ var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { sc
21668
21675
  };
21669
21676
  }, "personTimeline");
21670
21677
 
21671
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/people.js
21678
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/people.js
21672
21679
  var peopleService = /* @__PURE__ */ __name((deps) => {
21673
21680
  const localCard = /* @__PURE__ */ __name(async (card, includeNotes = false) => {
21674
21681
  const held = await storeIfOpen(deps);
@@ -21895,7 +21902,110 @@ var withoutPhone = /* @__PURE__ */ __name((answer) => {
21895
21902
  return rest;
21896
21903
  }, "withoutPhone");
21897
21904
 
21898
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/task-tag-filters.js
21905
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/task-stats.js
21906
+ var TASK_STATS_BY = ["chat", "meeting", "project"];
21907
+ var PERIOD_FIELD = "created";
21908
+ var refuseNestedPeriod = /* @__PURE__ */ __name((node, top = true) => {
21909
+ if (node.kind === "predicate")
21910
+ return;
21911
+ const optional2 = node.clauses.some(({ occur }) => occur === "should");
21912
+ for (const { occur, node: inner } of node.clauses) {
21913
+ if (!walkQuery(inner).some(({ field }) => field === PERIOD_FIELD))
21914
+ continue;
21915
+ if (!top || optional2 || occur !== "must")
21916
+ throw new CliError("validation_error", `${PERIOD_FIELD}: sets the period of stats tasks show: give it as a required term, not inside OR or NOT`);
21917
+ refuseNestedPeriod(inner, top);
21918
+ }
21919
+ }, "refuseNestedPeriod");
21920
+ var renamed = /* @__PURE__ */ __name((node, from, to) => node.kind === "predicate" ? node.field === from ? { ...node, field: to } : node : { ...node, clauses: node.clauses.map((clause) => ({ ...clause, node: renamed(clause.node, from, to) })) }, "renamed");
21921
+ var median2 = /* @__PURE__ */ __name((values) => {
21922
+ const sorted = [...values].sort((a, b) => a - b);
21923
+ const middle = Math.floor(sorted.length / 2);
21924
+ const upper = sorted[middle] ?? 0;
21925
+ return sorted.length % 2 === 1 ? upper : ((sorted[middle - 1] ?? 0) + upper) / 2;
21926
+ }, "median");
21927
+ var mean = /* @__PURE__ */ __name((values) => Math.round(values.reduce((sum2, one2) => sum2 + one2, 0) / values.length), "mean");
21928
+ var spread = /* @__PURE__ */ __name((open7, closeMs, now) => ({
21929
+ ...closeMs.length > 0 ? { medianCloseMs: median2(closeMs) } : {},
21930
+ ...open7.length > 0 ? { meanOpenAgeMs: mean(open7.map(({ createdAt }) => now - createdAt)) } : {}
21931
+ }), "spread");
21932
+ var and = /* @__PURE__ */ __name((parts) => parts.length === 0 ? void 0 : { sql: parts.map(({ sql }) => `(${sql})`).join(" AND "), params: parts.flatMap(({ params }) => params) }, "and");
21933
+ var taskStatsOf = /* @__PURE__ */ __name(async (store, account, { by = "chat", query, timezone, group, kind }, columns, now = Date.now()) => {
21934
+ if (query)
21935
+ refuseNestedPeriod(query.root);
21936
+ const time = /* @__PURE__ */ __name((sql) => ({ type: "time", sql }), "time");
21937
+ const read2 = { ...columns, [PERIOD_FIELD]: time("t.created_at"), closed: time("t.closed_at") };
21938
+ const fixed = [
21939
+ ...group === void 0 ? [] : [{ sql: "t.source_group = ?", params: [group] }],
21940
+ ...kind === void 0 ? [] : [{ sql: "t.type = ?", params: [kind] }],
21941
+ ...by === "meeting" ? [{ sql: "t.source_kind = 'meeting'", params: [] }] : []
21942
+ ];
21943
+ const options = { command: "stats tasks show", now, ...timezone === void 0 ? {} : { zone: timezone } };
21944
+ const where = /* @__PURE__ */ __name((ast, more = []) => and([...fixed, ...more, ...ast ? [queryFilter(ast, read2, options)] : []]), "where");
21945
+ const scope = by === "project" ? { board: true } : { account: taskAccount(account) };
21946
+ const all = await store.tasks.statRows(scope, where(withoutField(query, PERIOD_FIELD)));
21947
+ const created = await store.tasks.statRows(scope, where(query));
21948
+ const closed = await store.tasks.statRows(scope, where(query && { ...query, root: renamed(query.root, PERIOD_FIELD, "closed") }, [
21949
+ { sql: "t.closed_at IS NOT NULL", params: [] }
21950
+ ]));
21951
+ const keyOf5 = /* @__PURE__ */ __name((row) => by === "project" ? String(row.projectId) : row.group ?? "", "keyOf");
21952
+ const groups = /* @__PURE__ */ new Map();
21953
+ const slot = /* @__PURE__ */ __name((row) => {
21954
+ const key = keyOf5(row);
21955
+ const found = groups.get(key) ?? { open: [], created: 0, closeMs: [] };
21956
+ groups.set(key, found);
21957
+ return found;
21958
+ }, "slot");
21959
+ for (const row of all)
21960
+ if (!isClosedState(row.state))
21961
+ slot(row).open.push(row);
21962
+ for (const row of created)
21963
+ slot(row).created++;
21964
+ for (const row of closed)
21965
+ slot(row).closeMs.push((row.closedAt ?? row.createdAt) - row.createdAt);
21966
+ const kept2 = [...groups].filter(([, one2]) => one2.open.length + one2.created + one2.closeMs.length > 0);
21967
+ const ids = kept2.map(([key]) => key);
21968
+ const names2 = by === "chat" ? await store.tasks.statNames("chat", ids, taskAccount(account)) : by === "project" ? await store.tasks.statNames("project", ids) : await meetingNames(store, ids);
21969
+ const rows = kept2.map(([key, one2]) => ({
21970
+ group: key,
21971
+ name: names2.get(key) ?? null,
21972
+ open: one2.open.length,
21973
+ created: one2.created,
21974
+ closed: one2.closeMs.length,
21975
+ ...one2.open[0] ? { oldestOpenAt: new Date(one2.open[0].createdAt) } : {},
21976
+ ...spread(one2.open, one2.closeMs, now)
21977
+ }));
21978
+ const open7 = kept2.flatMap(([, one2]) => one2.open);
21979
+ const closeMs = kept2.flatMap(([, one2]) => one2.closeMs);
21980
+ return {
21981
+ by,
21982
+ open: open7.length,
21983
+ created: created.length,
21984
+ closed: closeMs.length,
21985
+ ...spread(open7, closeMs, now),
21986
+ rows
21987
+ };
21988
+ }, "taskStatsOf");
21989
+ var meetingIdOf = /* @__PURE__ */ __name((group) => {
21990
+ try {
21991
+ return String(parseMeetingReference(group).meetingId);
21992
+ } catch {
21993
+ return void 0;
21994
+ }
21995
+ }, "meetingIdOf");
21996
+ var meetingNames = /* @__PURE__ */ __name(async (store, groups) => {
21997
+ const meetingOf = new Map(groups.flatMap((group) => {
21998
+ const id2 = meetingIdOf(group);
21999
+ return id2 === void 0 ? [] : [[group, id2]];
22000
+ }));
22001
+ const titles = await store.tasks.statNames("meeting", [...new Set(meetingOf.values())]);
22002
+ return new Map([...meetingOf].flatMap(([group, id2]) => {
22003
+ const title = titles.get(id2);
22004
+ return title === void 0 ? [] : [[group, title]];
22005
+ }));
22006
+ }, "meetingNames");
22007
+
22008
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/task-tag-filters.js
21899
22009
  var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
21900
22010
  const tags = /* @__PURE__ */ new Map();
21901
22011
  for (const node of query ? walkQuery(query.root) : [])
@@ -21904,7 +22014,7 @@ var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
21904
22014
  return tags;
21905
22015
  }, "taskTagFilters");
21906
22016
 
21907
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/tasks.js
22017
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/tasks.js
21908
22018
  var TASK_QUERY = {
21909
22019
  entity: "task",
21910
22020
  backend: "sql",
@@ -21935,6 +22045,20 @@ var TASK_QUERY = {
21935
22045
  }
21936
22046
  })
21937
22047
  };
22048
+ var TASK_STATS_QUERY = {
22049
+ entity: "task",
22050
+ backend: "sql",
22051
+ fields: [
22052
+ ...TASK_QUERY.fields.filter(({ name }) => name !== "created_at" && name !== "closed_at"),
22053
+ {
22054
+ name: PERIOD_FIELD,
22055
+ type: "time",
22056
+ operators: OPERATORS_BY_TYPE.time,
22057
+ example: `${PERIOD_FIELD}>=30d`,
22058
+ relation: "the period: created counts the tasks opened in it, closed the tasks done or dismissed in it; open is open now"
22059
+ }
22060
+ ]
22061
+ };
21938
22062
  var PAIR_DECISIONS = ["review", "unsure"];
21939
22063
  var TASK_PAIR_QUERY = {
21940
22064
  entity: "task_pair",
@@ -22021,6 +22145,13 @@ var tasksService = /* @__PURE__ */ __name((deps, categories) => {
22021
22145
  const inStore = /* @__PURE__ */ __name(async (work) => work(await deps.store(), await deps.account()), "inStore");
22022
22146
  const service = /* @__PURE__ */ __name((store) => createTaskService({ store: store.tasks }), "service");
22023
22147
  const groupOf = /* @__PURE__ */ __name(async (store, account, chat) => chat === void 0 ? void 0 : storedChatId(deps.messenger, chat, store, account, { includeLeft: true }), "groupOf");
22148
+ const queryColumns = /* @__PURE__ */ __name(async (store, account, query) => {
22149
+ const groups = /* @__PURE__ */ new Map();
22150
+ for (const node of query ? walkQuery(query.root) : [])
22151
+ if (node.field === "chat" && node.operator !== "wildcard" && !groups.has(node.value))
22152
+ groups.set(node.value, await storedChatId(deps.messenger, node.value, store, account, { includeLeft: true }));
22153
+ return taskColumns(groups, await taskTagFilters(store, query));
22154
+ }, "queryColumns");
22024
22155
  const refuseBare = /* @__PURE__ */ __name((target2) => {
22025
22156
  throw new CliError("validation_error", `no task ${singleLine(target2)} \u2014 write task:${singleLine(target2)} for a task`);
22026
22157
  }, "refuseBare");
@@ -22075,12 +22206,7 @@ var tasksService = /* @__PURE__ */ __name((deps, categories) => {
22075
22206
  const reviewAfterLink = /* @__PURE__ */ __name(async (store, id2) => !isClosedState((await store.tasks.get(id2))?.state ?? "done") ? store.tasks.reviewDuplicates(id2, { linked: true }) : 0, "reviewAfterLink");
22076
22207
  return {
22077
22208
  list: /* @__PURE__ */ __name(({ query, limit, offset, previews }) => inStore(async (store, account) => {
22078
- const groups = /* @__PURE__ */ new Map();
22079
- for (const node of query ? walkQuery(query.root) : [])
22080
- if (node.field === "chat" && node.operator !== "wildcard" && !groups.has(node.value))
22081
- groups.set(node.value, await storedChatId(deps.messenger, node.value, store, account, { includeLeft: true }));
22082
- const tags = await taskTagFilters(store, query);
22083
- const where = query ? queryFilter(query, taskColumns(groups, tags), { command: "tasks list" }) : void 0;
22209
+ const where = query ? queryFilter(query, await queryColumns(store, account, query), { command: "tasks list" }) : void 0;
22084
22210
  const rows = await store.tasks.query(taskAccount(account), where, { limit: limit + 1, offset });
22085
22211
  const shown = rows.slice(0, limit);
22086
22212
  return {
@@ -22327,13 +22453,9 @@ var tasksService = /* @__PURE__ */ __name((deps, categories) => {
22327
22453
  await owned(store, account, subject);
22328
22454
  return store.tasks.similar({ task: subject }, options);
22329
22455
  }), "similar"),
22330
- stats: /* @__PURE__ */ __name((filter = {}) => inStore(async (store, account) => {
22331
- const group = await groupOf(store, account, filter.chat);
22332
- const rows = await service(store).stats({
22333
- account: taskAccount(account),
22334
- ...filter.type === void 0 ? {} : { kind: filter.type }
22335
- });
22336
- return group === void 0 ? rows : rows.filter((one2) => one2.group === group);
22456
+ stats: /* @__PURE__ */ __name(({ chat, ...request } = {}) => inStore(async (store, account) => {
22457
+ const group = await groupOf(store, account, chat);
22458
+ return taskStatsOf(store, account, { ...request, ...group === void 0 ? {} : { group } }, await queryColumns(store, account, request.query));
22337
22459
  }), "stats")
22338
22460
  };
22339
22461
  }, "tasksService");
@@ -22384,23 +22506,16 @@ var taskView = /* @__PURE__ */ __name(async (store, account, task2) => {
22384
22506
  };
22385
22507
  }, "taskView");
22386
22508
 
22387
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/proposal-tasks.js
22509
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/proposal-tasks.js
22388
22510
  var proposalSource = /* @__PURE__ */ __name((id2) => `proposed-action:${id2}`, "proposalSource");
22389
22511
  var approveAsTask = /* @__PURE__ */ __name(async (store, id2, by) => {
22390
22512
  const proposal = await store.proposedActions.get(id2);
22391
- if (proposal.kind === MEETING_FINDINGS_KIND)
22392
- throw new CliError("validation_error", "review meeting findings through the dedicated findings command", {
22393
- reason: "meeting-findings.dedicated-review"
22394
- });
22395
- if (proposal.kind === EVIDENCE_FINDINGS_KIND)
22396
- throw new CliError("validation_error", "review evidence findings through the dedicated findings command", {
22397
- reason: "evidence-findings.dedicated-review"
22398
- });
22513
+ assertGenericAction(proposal.kind);
22399
22514
  if (proposal.status !== "proposed")
22400
22515
  throw new CliError("validation_error", `a ${proposal.status} action cannot be approved`, {
22401
22516
  reason: "proposal.wrong-state"
22402
22517
  });
22403
- assertMayDecide({ id: proposal.id, proposedBy: proposerOfAction(proposal) }, by, store.decisionPolicy);
22518
+ assertMayDecide({ id: proposal.id, kind: proposal.kind, proposedBy: proposerOfAction(proposal) }, by, store.decisionPolicy);
22404
22519
  if (proposal.account === null)
22405
22520
  throw new CliError("validation_error", "a proposal names the account that would act; this one names none");
22406
22521
  const { task: task2 } = await createTaskService({ store: store.tasks }).add({
@@ -22414,7 +22529,7 @@ var approveAsTask = /* @__PURE__ */ __name(async (store, id2, by) => {
22414
22529
  return { proposal: await store.proposedActions.approve(proposal.id, by, { task: task2.id }), task: task2 };
22415
22530
  }, "approveAsTask");
22416
22531
 
22417
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/proposals/ids.js
22532
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/proposals/ids.js
22418
22533
  var MAX_IDS = 500;
22419
22534
  var refuse = /* @__PURE__ */ __name((message) => {
22420
22535
  throw new CliError("validation_error", message, { reason: "proposal.ids" });
@@ -22434,6 +22549,8 @@ var one = /* @__PURE__ */ __name((token) => {
22434
22549
  const part = /^([1-9]\d*)\/([A-Za-z0-9_-]{1,64})$/.exec(token);
22435
22550
  if (part)
22436
22551
  return [token];
22552
+ if (/^[a-z][a-z_]*:[A-Za-z][A-Za-z0-9]*-[1-9]\d*$/.test(token))
22553
+ return [token];
22437
22554
  const prefixed = /^([a-z][a-z_]*):([1-9]\d*)(?:-(?:([a-z][a-z_]*):)?([1-9]\d*))?$/.exec(token);
22438
22555
  if (prefixed?.[1] && prefixed[2]) {
22439
22556
  const [, prefix, from, other, to] = prefixed;
@@ -22443,7 +22560,7 @@ var one = /* @__PURE__ */ __name((token) => {
22443
22560
  }
22444
22561
  if (/^[1-9]\d*-[a-z]/.test(token))
22445
22562
  return refuse(`a range stays inside one prefix: ${token}`);
22446
- return refuse(`not a proposal id: ${token}; use 17070, 17070-17079, fact:512 or 17080/f2`);
22563
+ return refuse(`not a proposal id: ${token}; use 17070, 17070-17079, fact:512, close:Q-15 or 17080/f2`);
22447
22564
  }, "one");
22448
22565
  var parseProposalIds = /* @__PURE__ */ __name((text2) => {
22449
22566
  const ids = [...new Set(text2.flatMap((arg) => arg.split(",")).flatMap((token) => one(token.trim())))];
@@ -22454,7 +22571,7 @@ var parseProposalIds = /* @__PURE__ */ __name((text2) => {
22454
22571
  return ids;
22455
22572
  }, "parseProposalIds");
22456
22573
 
22457
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/shared.js
22574
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/shared.js
22458
22575
  var proposerOfAuthor = /* @__PURE__ */ __name((author) => {
22459
22576
  if (author.type === "person")
22460
22577
  return { type: "person", id: author.id };
@@ -22496,7 +22613,7 @@ var storedStatus = /* @__PURE__ */ __name((filter) => {
22496
22613
  return status === "proposed" || status === "rejected" ? status : void 0;
22497
22614
  }, "storedStatus");
22498
22615
 
22499
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/action.js
22616
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/action.js
22500
22617
  var rowOf = /* @__PURE__ */ __name((action2) => ({
22501
22618
  id: action2.id,
22502
22619
  kind: "action",
@@ -22511,14 +22628,15 @@ var rowOf = /* @__PURE__ */ __name((action2) => ({
22511
22628
  score: null,
22512
22629
  signals: null,
22513
22630
  parts: null,
22514
- createdAt: action2.createdAt
22631
+ createdAt: action2.createdAt,
22632
+ ...isOwnerOnlyKind(action2.kind) ? { ownerOnly: true } : {}
22515
22633
  }), "rowOf");
22516
22634
  var actionKind = /* @__PURE__ */ __name((store, claimed) => ({
22517
22635
  kind: "action",
22518
22636
  list: /* @__PURE__ */ __name(async (filter) => {
22519
22637
  const status = storedStatus(filter);
22520
22638
  const actions = await store.proposedActions.list({
22521
- except: [...claimed(), MEETING_FINDINGS_KIND],
22639
+ except: [...claimed(), MEETING_FINDINGS_KIND, EVIDENCE_FINDINGS_KIND, MAIL_FINDINGS_KIND],
22522
22640
  ...status === void 0 ? {} : { status },
22523
22641
  ...pushed2(filter)
22524
22642
  });
@@ -22535,7 +22653,7 @@ var actionKind = /* @__PURE__ */ __name((store, claimed) => ({
22535
22653
  }, "decide")
22536
22654
  }), "actionKind");
22537
22655
 
22538
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/fact.js
22656
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/fact.js
22539
22657
  var STATUS = {
22540
22658
  proposed: "proposed",
22541
22659
  accepted: "confirmed",
@@ -22578,7 +22696,7 @@ var factKind = /* @__PURE__ */ __name((store) => ({
22578
22696
  }, "decide")
22579
22697
  }), "factKind");
22580
22698
 
22581
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/finance.js
22699
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/finance.js
22582
22700
  var rowOf3 = /* @__PURE__ */ __name((kind, entry) => ({
22583
22701
  id: entry.ref,
22584
22702
  kind,
@@ -22613,7 +22731,7 @@ var financeKind = /* @__PURE__ */ __name((store, kind) => ({
22613
22731
  var invoiceKind = /* @__PURE__ */ __name((store) => financeKind(store, "invoice"), "invoiceKind");
22614
22732
  var paymentKind = /* @__PURE__ */ __name((store) => financeKind(store, "payment"), "paymentKind");
22615
22733
 
22616
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/findings.js
22734
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/findings.js
22617
22735
  var FACT_SUMMARIES = {
22618
22736
  fact: /* @__PURE__ */ __name((finding) => finding.statement, "fact"),
22619
22737
  task: /* @__PURE__ */ __name((finding) => finding.title, "task"),
@@ -22685,7 +22803,7 @@ var findingsKind = /* @__PURE__ */ __name((store) => {
22685
22803
  };
22686
22804
  }, "findingsKind");
22687
22805
 
22688
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/key-document.js
22806
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/key-document.js
22689
22807
  var linkRow = /* @__PURE__ */ __name((link4) => ({
22690
22808
  id: `key:${link4.id}`,
22691
22809
  kind: "key_document",
@@ -22753,7 +22871,7 @@ var keyDocumentKind = /* @__PURE__ */ __name((store) => {
22753
22871
  };
22754
22872
  }, "keyDocumentKind");
22755
22873
 
22756
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/mail-findings.js
22874
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/mail-findings.js
22757
22875
  var summaryOf = /* @__PURE__ */ __name((finding) => {
22758
22876
  switch (finding.kind) {
22759
22877
  case "task":
@@ -22832,14 +22950,78 @@ var mailFindingsKind = /* @__PURE__ */ __name((store) => {
22832
22950
  };
22833
22951
  }, "mailFindingsKind");
22834
22952
 
22835
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/memory.js
22953
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/meeting-findings.js
22954
+ var rowOf6 = /* @__PURE__ */ __name((action2, batch) => {
22955
+ const findings = batch.input.findings;
22956
+ const projects = [...new Set(findings.map((one2) => "project" in one2 ? one2.project : void 0))];
22957
+ const outcome2 = /* @__PURE__ */ __name((id2) => batch.receipt?.items.find((item2) => item2.id === id2)?.status ?? null, "outcome");
22958
+ const references = [...new Set(findings.flatMap((finding) => finding.evidence.map((one2) => one2.reference)))];
22959
+ return {
22960
+ id: action2.id,
22961
+ kind: "meeting_findings",
22962
+ status: batch.status === "proposed" ? "proposed" : batch.receipt?.accepted.length ? "confirmed" : "rejected",
22963
+ project: projects.length === 1 && typeof projects[0] === "string" ? projects[0] : null,
22964
+ subject: references[0] ?? `meeting_findings:${action2.id}`,
22965
+ object: null,
22966
+ summary: `${findings.length} finding${findings.length === 1 ? "" : "s"}`,
22967
+ proposedBy: proposerOfAction(action2),
22968
+ reason: action2.reason,
22969
+ evidence: references.slice(0, 5),
22970
+ score: null,
22971
+ signals: null,
22972
+ parts: findings.map((finding) => ({
22973
+ id: finding.id,
22974
+ kind: finding.kind,
22975
+ summary: FACT_SUMMARIES[finding.kind]?.(finding) ?? finding.kind,
22976
+ outcome: outcome2(finding.id)
22977
+ })),
22978
+ createdAt: action2.createdAt
22979
+ };
22980
+ }, "rowOf");
22981
+ var meetingFindingsKind = /* @__PURE__ */ __name((store) => {
22982
+ const batchOf = /* @__PURE__ */ __name(async (action2) => {
22983
+ if (action2.account === null)
22984
+ throw new CliError("not_found", `meeting findings ${action2.id} name no account`);
22985
+ return { account: action2.account, batch: await store.meetingFindings.get(action2.account, action2.id) };
22986
+ }, "batchOf");
22987
+ return {
22988
+ kind: "meeting_findings",
22989
+ stored: [MEETING_FINDINGS_KIND],
22990
+ parts: true,
22991
+ ownerOnly: true,
22992
+ list: /* @__PURE__ */ __name(async (filter) => {
22993
+ const actions = await store.proposedActions.list({
22994
+ kinds: [MEETING_FINDINGS_KIND],
22995
+ ...(filter.status ?? "proposed") === "proposed" ? { status: "proposed" } : {},
22996
+ ...filter.by === void 0 ? {} : { proposedBy: filter.by },
22997
+ limit: Math.min(filter.offset + filter.limit, 500)
22998
+ });
22999
+ const rows = await Promise.all(actions.map(async (action2) => rowOf6(action2, (await batchOf(action2)).batch)));
23000
+ return kept(rows, { ...filter, limit: filter.offset + filter.limit });
23001
+ }, "list"),
23002
+ get: /* @__PURE__ */ __name(async (id2) => {
23003
+ const action2 = await store.proposedActions.get(id2);
23004
+ return rowOf6(action2, (await batchOf(action2)).batch);
23005
+ }, "get"),
23006
+ decide: /* @__PURE__ */ __name(async (id2, { confirm, by, parts }) => {
23007
+ const { account, batch } = await batchOf(await store.proposedActions.get(id2));
23008
+ const turnedDown = new Set(batch.previous.filter((one2) => one2.status === "rejected").map((one2) => one2.id));
23009
+ const accept = !confirm ? [] : parts ?? batch.input.findings.map((finding) => finding.id).filter((one2) => !turnedDown.has(one2));
23010
+ const reviewed = await store.meetingFindings.review(account, id2, { fingerprint: batch.fingerprint, accept, by });
23011
+ const made = (reviewed.receipt?.items ?? []).flatMap((item2) => item2.status === "accepted" && item2.reference && !item2.reused ? [item2.reference] : []);
23012
+ return { id: id2, kind: "meeting_findings", status: accept.length ? "confirmed" : "rejected", made };
23013
+ }, "decide")
23014
+ };
23015
+ }, "meetingFindingsKind");
23016
+
23017
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/memory.js
22836
23018
  var STATUS2 = {
22837
23019
  proposed: "proposed",
22838
23020
  confirmed: "confirmed",
22839
23021
  superseded: "confirmed",
22840
23022
  stale: "rejected"
22841
23023
  };
22842
- var rowOf6 = /* @__PURE__ */ __name((memory) => ({
23024
+ var rowOf7 = /* @__PURE__ */ __name((memory) => ({
22843
23025
  id: memory.ref,
22844
23026
  kind: "memory",
22845
23027
  status: STATUS2[memory.status],
@@ -22864,16 +23046,16 @@ var memoryKind = /* @__PURE__ */ __name((store) => ({
22864
23046
  ...pushed2(filter),
22865
23047
  ...status === "all" ? {} : { status: status === "rejected" ? "stale" : status }
22866
23048
  });
22867
- return kept(memories.map(rowOf6), filter);
23049
+ return kept(memories.map(rowOf7), filter);
22868
23050
  }, "list"),
22869
- get: /* @__PURE__ */ __name(async (id2) => rowOf6(await store.memories.get(id2)), "get"),
23051
+ get: /* @__PURE__ */ __name(async (id2) => rowOf7(await store.memories.get(id2)), "get"),
22870
23052
  decide: /* @__PURE__ */ __name(async (id2, { confirm, by }) => {
22871
23053
  const memory = confirm ? await store.memories.confirm(id2, by) : await store.memories.markStale(id2, by);
22872
23054
  return { id: id2, kind: "memory", status: confirm ? "confirmed" : "rejected", made: confirm ? [memory.ref] : [] };
22873
23055
  }, "decide")
22874
23056
  }), "memoryKind");
22875
23057
 
22876
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/relationship.js
23058
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/relationship.js
22877
23059
  var linkRow2 = /* @__PURE__ */ __name((link4) => ({
22878
23060
  id: `link:${link4.id}`,
22879
23061
  kind: "relationship",
@@ -22947,10 +23129,10 @@ var relationshipKind = /* @__PURE__ */ __name((store) => {
22947
23129
  };
22948
23130
  }, "relationshipKind");
22949
23131
 
22950
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/relationship-update.js
23132
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/relationship-update.js
22951
23133
  var KIND = "relationship_update";
22952
23134
  var summaryOf2 = /* @__PURE__ */ __name(({ changes }) => Object.entries(changes).map(([field, value]) => `${field} ${value ?? "cleared"}`).join(", "), "summaryOf");
22953
- var rowOf7 = /* @__PURE__ */ __name((action2) => {
23135
+ var rowOf8 = /* @__PURE__ */ __name((action2) => {
22954
23136
  const payload = action2.payload;
22955
23137
  return {
22956
23138
  id: action2.id,
@@ -22979,9 +23161,9 @@ var relationshipUpdateKind = /* @__PURE__ */ __name((store) => ({
22979
23161
  ...status === void 0 ? {} : { status },
22980
23162
  ...pushed2(filter)
22981
23163
  });
22982
- return kept(stored.map(rowOf7), filter);
23164
+ return kept(stored.map(rowOf8), filter);
22983
23165
  }, "list"),
22984
- get: /* @__PURE__ */ __name(async (id2) => rowOf7(await store.proposedActions.get(id2)), "get"),
23166
+ get: /* @__PURE__ */ __name(async (id2) => rowOf8(await store.proposedActions.get(id2)), "get"),
22985
23167
  decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
22986
23168
  const { relation } = await store.knowledge.decideRelationUpdate(id2, {
22987
23169
  confirm,
@@ -22997,8 +23179,77 @@ var relationshipUpdateKind = /* @__PURE__ */ __name((store) => ({
22997
23179
  }, "decide")
22998
23180
  }), "relationshipUpdateKind");
22999
23181
 
23000
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/proposals/registry.js
23182
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/task-close.js
23183
+ var rowOf9 = /* @__PURE__ */ __name((task2) => {
23184
+ const suggestion = task2.closeSuggestion;
23185
+ if (suggestion === null)
23186
+ return void 0;
23187
+ return {
23188
+ id: `close:${task2.key}`,
23189
+ kind: TASK_CLOSE_KIND,
23190
+ status: "proposed",
23191
+ project: task2.project,
23192
+ subject: task2.ref,
23193
+ object: null,
23194
+ summary: `close as ${suggestion.as}: ${task2.title}`,
23195
+ proposedBy: { type: "bot", id: suggestion.by, name: suggestion.by, kind: "agent" },
23196
+ reason: suggestion.reason,
23197
+ evidence: task2.source === null ? [] : [task2.source],
23198
+ score: suggestion.certainty,
23199
+ signals: null,
23200
+ parts: null,
23201
+ createdAt: suggestion.at
23202
+ };
23203
+ }, "rowOf");
23204
+ var taskCloseKind = /* @__PURE__ */ __name((store) => {
23205
+ const taskOf = /* @__PURE__ */ __name(async (id2) => {
23206
+ const key = id2.slice("close:".length);
23207
+ const task2 = await store.tasks.details(key).catch(() => void 0);
23208
+ const row = task2 && rowOf9(task2);
23209
+ if (!task2 || !row)
23210
+ throw new CliError("not_found", `no close waits on task ${key}`);
23211
+ return { task: task2, row };
23212
+ }, "taskOf");
23213
+ return {
23214
+ kind: TASK_CLOSE_KIND,
23215
+ prefix: "close",
23216
+ ownerOnly: true,
23217
+ list: /* @__PURE__ */ __name(async (filter) => {
23218
+ if ((filter.status ?? "proposed") !== "proposed" && filter.status !== "all")
23219
+ return [];
23220
+ const tasks = await store.tasks.find({
23221
+ status: "open",
23222
+ where: { sql: "t.close_suggested_as IS NOT NULL", params: [] },
23223
+ limit: filter.offset + filter.limit
23224
+ });
23225
+ return kept(tasks.flatMap((task2) => rowOf9(task2) ?? []), { ...filter, limit: filter.offset + filter.limit });
23226
+ }, "list"),
23227
+ get: /* @__PURE__ */ __name(async (id2) => (await taskOf(id2)).row, "get"),
23228
+ decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
23229
+ const { task: task2 } = await taskOf(id2);
23230
+ const suggestion = task2.closeSuggestion;
23231
+ if (!confirm || suggestion === null) {
23232
+ await store.tasks.suggestClose(task2.id, null, "owner");
23233
+ return { id: id2, kind: TASK_CLOSE_KIND, status: "rejected", made: [] };
23234
+ }
23235
+ if (await store.tasks.get(task2.id) === void 0)
23236
+ await store.tasks.edit(task2.id, { status: suggestion.as, ...reason === void 0 ? {} : { reason } }, deciderAuthor(by));
23237
+ else {
23238
+ const why = reason ?? suggestion.reason ?? void 0;
23239
+ await createTaskService({ store: store.tasks }).close(task2.id, {
23240
+ as: suggestion.as,
23241
+ by: "owner",
23242
+ ...why === void 0 ? {} : { reason: why }
23243
+ });
23244
+ }
23245
+ return { id: id2, kind: TASK_CLOSE_KIND, status: "confirmed", made: [task2.ref] };
23246
+ }, "decide")
23247
+ };
23248
+ }, "taskCloseKind");
23249
+
23250
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/proposals/registry.js
23001
23251
  var PREFIX = /^([a-z][a-z_]*):/;
23252
+ var marked = /* @__PURE__ */ __name((kind, row) => kind.ownerOnly ? { ...row, ownerOnly: true } : row, "marked");
23002
23253
  var refusalOf = /* @__PURE__ */ __name((id2, error) => {
23003
23254
  if (!(error instanceof CliError))
23004
23255
  throw error;
@@ -23036,12 +23287,15 @@ var emptyProposalRegistry = /* @__PURE__ */ __name((store) => {
23036
23287
  throw new CliError("validation_error", "a proposal list takes a nonnegative offset");
23037
23288
  const asked = filter.kinds === void 0 ? kinds : kinds.filter((kind) => filter.kinds?.includes(kind.kind));
23038
23289
  const wide = { ...filter, offset: 0, limit: filter.offset + filter.limit + 1 };
23039
- const rows = (await Promise.all(asked.map((kind) => kind.list(wide)))).flat();
23290
+ const rows = (await Promise.all(asked.map(async (kind) => (await kind.list(wide)).map((row) => marked(kind, row))))).flat();
23040
23291
  rows.sort((a, b) => b.createdAt.localeCompare(a.createdAt) || b.id.localeCompare(a.id));
23041
23292
  const page = rows.slice(filter.offset, filter.offset + filter.limit + 1);
23042
23293
  return { items: page.slice(0, filter.limit), hasMore: page.length > filter.limit };
23043
23294
  }, "list"),
23044
- get: /* @__PURE__ */ __name(async (id2) => (await kindOf4(id2)).get(id2), "get"),
23295
+ get: /* @__PURE__ */ __name(async (id2) => {
23296
+ const kind = await kindOf4(id2);
23297
+ return marked(kind, await kind.get(id2));
23298
+ }, "get"),
23045
23299
  decide: /* @__PURE__ */ __name(async (ids, decision) => {
23046
23300
  const parts = /* @__PURE__ */ new Map();
23047
23301
  const whole4 = /* @__PURE__ */ new Set();
@@ -23074,7 +23328,7 @@ var emptyProposalRegistry = /* @__PURE__ */ __name((store) => {
23074
23328
  refuseIds(id2, `a ${kind.kind} proposal has no parts; name ${id2} alone`);
23075
23329
  continue;
23076
23330
  }
23077
- const row = await kind.get(id2);
23331
+ const row = marked(kind, await kind.get(id2));
23078
23332
  if (row.status !== "proposed") {
23079
23333
  refused.push({
23080
23334
  id: id2,
@@ -23084,7 +23338,7 @@ var emptyProposalRegistry = /* @__PURE__ */ __name((store) => {
23084
23338
  });
23085
23339
  continue;
23086
23340
  }
23087
- const refusal2 = mayDecide(kind.ownerOnly ? { ...row, ownerOnly: true } : row, decision.by, policy);
23341
+ const refusal2 = mayDecide(row, decision.by, policy);
23088
23342
  if (refusal2) {
23089
23343
  refused.push(refusal2);
23090
23344
  continue;
@@ -23110,14 +23364,16 @@ var proposalRegistry = /* @__PURE__ */ __name((store) => {
23110
23364
  paymentKind(store),
23111
23365
  memoryKind(store),
23112
23366
  findingsKind(store),
23113
- mailFindingsKind(store)
23367
+ mailFindingsKind(store),
23368
+ meetingFindingsKind(store),
23369
+ taskCloseKind(store)
23114
23370
  ])
23115
23371
  registry.register(kind);
23116
23372
  registry.register(actionKind(store, registry.claimed));
23117
23373
  return registry;
23118
23374
  }, "proposalRegistry");
23119
23375
 
23120
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/mail/owed.js
23376
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/mail/owed.js
23121
23377
  var mailTurn = /* @__PURE__ */ __name((newest) => {
23122
23378
  if (newest === null)
23123
23379
  return null;
@@ -23126,7 +23382,7 @@ var mailTurn = /* @__PURE__ */ __name((newest) => {
23126
23382
  return newest.addressed ? "owed" : null;
23127
23383
  }, "mailTurn");
23128
23384
 
23129
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/agenda-mail.js
23385
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/agenda-mail.js
23130
23386
  var absent = /* @__PURE__ */ __name((error) => {
23131
23387
  if (error instanceof CliError && error.code === "not_found")
23132
23388
  return void 0;
@@ -23184,7 +23440,7 @@ var mailActivity = /* @__PURE__ */ __name(async (store, account, since, chats) =
23184
23440
  };
23185
23441
  }, "mailActivity");
23186
23442
 
23187
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/chat-coverage.js
23443
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/chat-coverage.js
23188
23444
  var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
23189
23445
  const ids = [...new Set(chatIds)];
23190
23446
  if (ids.length === 0)
@@ -23210,7 +23466,7 @@ var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
23210
23466
  }));
23211
23467
  }, "chatCoverage");
23212
23468
 
23213
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/agenda.js
23469
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/agenda.js
23214
23470
  var DAY = 864e5;
23215
23471
  var AGENDA_DEFAULTS = { unanswered: DAY, waiting: 7 * DAY };
23216
23472
  var CLAIMS = ["none", "mine", "others", "any"];
@@ -23457,7 +23713,7 @@ var agendaItem = /* @__PURE__ */ __name((shown) => {
23457
23713
  };
23458
23714
  }, "agendaItem");
23459
23715
 
23460
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/excerpt.js
23716
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/excerpt.js
23461
23717
  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");
23462
23718
  var excerpt = /* @__PURE__ */ __name((text2, query, size4 = 240, options = {}) => {
23463
23719
  const flat = text2.replace(/\s+/g, " ").trim();
@@ -23473,7 +23729,7 @@ var excerpt = /* @__PURE__ */ __name((text2, query, size4 = 240, options = {}) =
23473
23729
  }, "excerpt");
23474
23730
  var withExcerpt = /* @__PURE__ */ __name(({ matchedText, ...hit }, query) => ({ ...hit, excerpt: excerpt(matchedText ?? hit.text, query) }), "withExcerpt");
23475
23731
 
23476
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/link-scorers/shared.js
23732
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/link-scorers/shared.js
23477
23733
  var escaped = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
23478
23734
  var folded = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "folded");
23479
23735
  var wholeWords = /* @__PURE__ */ __name((term) => new RegExp(`(?<![\\p{L}\\p{N}\\p{M}_])${escaped(normalizeVocabularyName(term))}(?![\\p{L}\\p{N}\\p{M}_])`, "u"), "wholeWords");
@@ -23512,7 +23768,7 @@ var identitiesIn = /* @__PURE__ */ __name(async (store, people, provider) => {
23512
23768
  return found;
23513
23769
  }, "identitiesIn");
23514
23770
 
23515
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/link-scorers/alias-hits.js
23771
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/link-scorers/alias-hits.js
23516
23772
  var SEARCH_LIMIT = 500;
23517
23773
  var aliasWeight = /* @__PURE__ */ __name((hits) => hits >= 10 ? 0.55 : hits >= 3 ? 0.35 : 0, "aliasWeight");
23518
23774
  var aliasHits = {
@@ -23561,7 +23817,7 @@ var aliasHits = {
23561
23817
  }, "candidates")
23562
23818
  };
23563
23819
 
23564
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/link-scorers/chat-senders.js
23820
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/link-scorers/chat-senders.js
23565
23821
  var WEIGHT = 0.5;
23566
23822
  var LARGE_GROUP_WEIGHT = 0.2;
23567
23823
  var LARGE_GROUP = 30;
@@ -23613,7 +23869,7 @@ var chatSenders = {
23613
23869
  }, "candidates")
23614
23870
  };
23615
23871
 
23616
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/link-scorers/chat-title.js
23872
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/link-scorers/chat-title.js
23617
23873
  var WEIGHT2 = 0.7;
23618
23874
  var chatTitle = {
23619
23875
  id: "chat-title",
@@ -23652,7 +23908,7 @@ var chatTitle = {
23652
23908
  }, "candidates")
23653
23909
  };
23654
23910
 
23655
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/link-scorers/email-domain.js
23911
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/link-scorers/email-domain.js
23656
23912
  var WEIGHT3 = 0.3;
23657
23913
  var CONTACTS = 500;
23658
23914
  var MOST_PAIRS = 200;
@@ -23713,7 +23969,7 @@ var emailDomain = {
23713
23969
  }, "candidates")
23714
23970
  };
23715
23971
 
23716
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/link-scorers/mail-thread.js
23972
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/link-scorers/mail-thread.js
23717
23973
  var NAMED = 0.7;
23718
23974
  var MEMBER_ONLY = 0.3;
23719
23975
  var READ_LIMIT2 = 500;
@@ -23786,7 +24042,7 @@ var mailThread = {
23786
24042
  }, "candidates")
23787
24043
  };
23788
24044
 
23789
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/link-scorers/member-chats.js
24045
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/link-scorers/member-chats.js
23790
24046
  var WEIGHT4 = 0.5;
23791
24047
  var memberChats = {
23792
24048
  id: "member-chats",
@@ -23826,7 +24082,7 @@ var memberChats = {
23826
24082
  }, "candidates")
23827
24083
  };
23828
24084
 
23829
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/link-scorers/member-dialog.js
24085
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/link-scorers/member-dialog.js
23830
24086
  var WEIGHT5 = 0.6;
23831
24087
  var memberDialog = {
23832
24088
  id: "member-dialog",
@@ -23860,7 +24116,7 @@ var memberDialog = {
23860
24116
  }, "candidates")
23861
24117
  };
23862
24118
 
23863
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-gathering-around.js
24119
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/project-gathering-around.js
23864
24120
  var storedMessageNeighbours = /* @__PURE__ */ __name((messages) => ({
23865
24121
  async around(ref, window3) {
23866
24122
  const at = parseLocator(ref);
@@ -23956,7 +24212,7 @@ var storedNeighbours = /* @__PURE__ */ __name((store) => {
23956
24212
  };
23957
24213
  }, "storedNeighbours");
23958
24214
 
23959
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-gathering-request.js
24215
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/project-gathering-request.js
23960
24216
  import { createHash as createHash2 } from "node:crypto";
23961
24217
  var DAY2 = 864e5;
23962
24218
  var MAX_TIME = 864e13;
@@ -24272,7 +24528,7 @@ var decodeCheckpoint = /* @__PURE__ */ __name((text2, plan) => {
24272
24528
  return value;
24273
24529
  }, "decodeCheckpoint");
24274
24530
 
24275
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-gathering.js
24531
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/project-gathering.js
24276
24532
  var terminal = /* @__PURE__ */ new Set(["done", "unavailable", "failed"]);
24277
24533
  var PAGE2 = 20;
24278
24534
  var PEOPLE = 20;
@@ -24676,7 +24932,7 @@ var peopleOf = /* @__PURE__ */ __name((items, senderOf) => {
24676
24932
  return [...byKey.values()].sort((a, b) => b.items - a.items || a.name.localeCompare(b.name));
24677
24933
  }, "peopleOf");
24678
24934
 
24679
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-matching.js
24935
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-matching.js
24680
24936
  var normalizedText = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "normalizedText");
24681
24937
  var termsOf = /* @__PURE__ */ __name((entry) => [
24682
24938
  { name: entry.name, kind: "canonical" },
@@ -24720,7 +24976,7 @@ var matchVocabularyTerms = /* @__PURE__ */ __name((catalog, texts) => {
24720
24976
  return result.sort((a, b) => Number(a.entry.id) - Number(b.entry.id));
24721
24977
  }, "matchVocabularyTerms");
24722
24978
 
24723
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-gathering-mentions.js
24979
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/project-gathering-mentions.js
24724
24980
  var KINDS = ["project", "tag", "topic"];
24725
24981
  var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering, options = {}) => {
24726
24982
  if (typeof vocabulary?.vocabulary !== "function")
@@ -24775,7 +25031,7 @@ var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering,
24775
25031
  };
24776
25032
  }, "findEvidenceMentions");
24777
25033
 
24778
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/stored-project-gathering.js
25034
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/stored-project-gathering.js
24779
25035
  var storedChatCount = /* @__PURE__ */ __name((store) => async (account, chatId, { since, until }) => {
24780
25036
  const window3 = { since: new Date(since).toISOString(), until: new Date(until - 1).toISOString() };
24781
25037
  const [messages, newest, oldest] = await Promise.all([
@@ -25081,7 +25337,7 @@ var purposeHintOf = /* @__PURE__ */ __name((linked, rows, of) => {
25081
25337
  return { chat: top.ref, relationship: link4.relationship, items, of };
25082
25338
  }, "purposeHintOf");
25083
25339
 
25084
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/link-scorers/scan.js
25340
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/link-scorers/scan.js
25085
25341
  var SCORERS = [chatTitle, aliasHits, memberChats, memberDialog, chatSenders, mailThread];
25086
25342
  var PERSON_SCORERS = [emailDomain];
25087
25343
  var SCAN_BOT = { bot: "memo-scan", kind: "rule" };
@@ -25289,18 +25545,18 @@ var referenceOf = /* @__PURE__ */ __name((text2) => {
25289
25545
  }, "referenceOf");
25290
25546
  var rejectedReversed = /* @__PURE__ */ __name(async (store, candidate) => candidate.kind === "related-to" && candidate.to.startsWith("person:") && ((await store.knowledge.relationState(null, { from: candidate.to, to: candidate.from, kind: candidate.kind }))?.rejected ?? false), "rejectedReversed");
25291
25547
 
25292
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/media-archive.js
25548
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/media-archive.js
25293
25549
  import { setTimeout as sleep3 } from "node:timers/promises";
25294
25550
 
25295
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
25551
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
25296
25552
  import { lstat } from "node:fs/promises";
25297
25553
 
25298
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
25554
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
25299
25555
  import { createHash as createHash4, randomUUID as randomUUID2 } from "node:crypto";
25300
25556
  import { open as open2, rename as rename2, unlink as unlink2 } from "node:fs/promises";
25301
25557
  import { join as join2 } from "node:path";
25302
25558
 
25303
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-metadata.js
25559
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-metadata.js
25304
25560
  import { createHash as createHash3 } from "node:crypto";
25305
25561
  var metadataLimit = 16384;
25306
25562
  var partialIdentity = /* @__PURE__ */ __name((locator) => JSON.stringify([locator.provider, locator.account, locator.occurrenceId, locator.assetId]), "partialIdentity");
@@ -25360,7 +25616,7 @@ var readPartialMetadata = /* @__PURE__ */ __name(async (path, locator, maxBytes,
25360
25616
  }
25361
25617
  }, "readPartialMetadata");
25362
25618
 
25363
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-writer.js
25619
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-writer.js
25364
25620
  import { randomUUID } from "node:crypto";
25365
25621
  import { open, rename, unlink } from "node:fs/promises";
25366
25622
  import { join } from "node:path";
@@ -25452,7 +25708,7 @@ var partialWriter = /* @__PURE__ */ __name(async (input) => {
25452
25708
  };
25453
25709
  }, "partialWriter");
25454
25710
 
25455
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
25711
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
25456
25712
  var NativeRecordingPartialStore = class {
25457
25713
  static {
25458
25714
  __name(this, "NativeRecordingPartialStore");
@@ -25559,12 +25815,12 @@ var NativeRecordingPartialStore = class {
25559
25815
  }
25560
25816
  };
25561
25817
 
25562
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
25818
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
25563
25819
  import { createHash as createHash5 } from "node:crypto";
25564
25820
  import { link as link2 } from "node:fs/promises";
25565
25821
  import { basename, dirname, join as join4, resolve } from "node:path";
25566
25822
 
25567
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-files.js
25823
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-files.js
25568
25824
  import { unlink as unlink3 } from "node:fs/promises";
25569
25825
  var verifiedPublicationFile = /* @__PURE__ */ __name(async (path, expected2, signal, writable = false) => {
25570
25826
  signal?.throwIfAborted();
@@ -25599,7 +25855,7 @@ var commitPublication = /* @__PURE__ */ __name(async (root, partialPath, finalPa
25599
25855
  signal?.throwIfAborted();
25600
25856
  }, "commitPublication");
25601
25857
 
25602
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-journal.js
25858
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-journal.js
25603
25859
  import { randomUUID as randomUUID3 } from "node:crypto";
25604
25860
  import { open as open3, rename as rename3, unlink as unlink4 } from "node:fs/promises";
25605
25861
  import { join as join3 } from "node:path";
@@ -25672,7 +25928,7 @@ var writePublicationJournal = /* @__PURE__ */ __name(async (root, path, prefix,
25672
25928
  }
25673
25929
  }, "writePublicationJournal");
25674
25930
 
25675
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
25931
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
25676
25932
  var NativeRecordingPublication = class {
25677
25933
  static {
25678
25934
  __name(this, "NativeRecordingPublication");
@@ -25745,7 +26001,7 @@ var NativeRecordingPublication = class {
25745
26001
  }
25746
26002
  };
25747
26003
 
25748
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/media-archive-manifest.js
26004
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/media-archive-manifest.js
25749
26005
  import { createHash as createHash6 } from "node:crypto";
25750
26006
  import { readdir } from "node:fs/promises";
25751
26007
  import { isAbsolute, join as join5, resolve as resolve2 } from "node:path";
@@ -25832,7 +26088,7 @@ var commitMediaEntry = /* @__PURE__ */ __name((root, one2, beforePublish) => wri
25832
26088
  beforePublish
25833
26089
  }), "commitMediaEntry");
25834
26090
 
25835
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
26091
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
25836
26092
  var validator = '"media-completed-v1"';
25837
26093
  var maximumFileBytes = 64 * 1024 * 1024 * 1024;
25838
26094
  var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2, beforeWrite, signal, metadata = {}) => {
@@ -25933,7 +26189,7 @@ var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2
25933
26189
  return entry;
25934
26190
  }, "archiveMediaFile");
25935
26191
 
25936
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/media-archive-locks.js
26192
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/media-archive-locks.js
25937
26193
  import { mkdir, realpath } from "node:fs/promises";
25938
26194
  import { join as join6, resolve as resolve3 } from "node:path";
25939
26195
  var archiveLocations = /* @__PURE__ */ __name(async (initial, signal) => {
@@ -26000,7 +26256,7 @@ var withMediaArchiveLocks = /* @__PURE__ */ __name(async (directory2, signal, ru
26000
26256
  throw new CliError("validation_error", "archive locations changed during locking; run the command again");
26001
26257
  }, "withMediaArchiveLocks");
26002
26258
 
26003
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/media-archive.js
26259
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/media-archive.js
26004
26260
  var validateMediaSince = /* @__PURE__ */ __name((value, flag = "--since-time") => {
26005
26261
  if (value === void 0)
26006
26262
  return void 0;
@@ -26153,7 +26409,7 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options) => {
26153
26409
  }, { create: true });
26154
26410
  }, "archiveMedia");
26155
26411
 
26156
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/media-archive-move.js
26412
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/media-archive-move.js
26157
26413
  import { realpath as realpath2, unlink as unlink5 } from "node:fs/promises";
26158
26414
  import { basename as basename2, dirname as dirname2, join as join7, resolve as resolve4 } from "node:path";
26159
26415
  var canonicalDestination = /* @__PURE__ */ __name(async (directory2) => {
@@ -26306,7 +26562,7 @@ var moveMediaArchive = /* @__PURE__ */ __name(async (options) => {
26306
26562
  }, { additional: [target2], createAdditional: !options.dryRun });
26307
26563
  }, "moveMediaArchive");
26308
26564
 
26309
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/model-downloads.js
26565
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/model-downloads.js
26310
26566
  var bytesOf = /* @__PURE__ */ __name((model) => model.files.reduce((sum2, file2) => sum2 + file2.bytes, 0), "bytesOf");
26311
26567
  var nativeRuntime = /* @__PURE__ */ __name(async ({ env, progress = /* @__PURE__ */ __name(() => {
26312
26568
  }, "progress") }) => {
@@ -26329,7 +26585,7 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
26329
26585
  }
26330
26586
  await nativeRuntime({ env, progress });
26331
26587
  progress(`${model.id}: loading it once to check it works`);
26332
- const { openEmbedder: openEmbedder2 } = await import("./embed-YNH5M6UL.js");
26588
+ const { openEmbedder: openEmbedder2 } = await import("./embed-CQJ42S5C.js");
26333
26589
  const embedder = await openEmbedder2(model, directory2);
26334
26590
  try {
26335
26591
  const [vector] = await embedder.embed(["check"], "query");
@@ -26350,7 +26606,7 @@ var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /
26350
26606
  }
26351
26607
  await nativeRuntime({ env, progress });
26352
26608
  progress(`${model.id}: loading it once to check it works`);
26353
- const { openReranker } = await import("./rerank-SCBTCBPO.js");
26609
+ const { openReranker } = await import("./rerank-UKOVVZM6.js");
26354
26610
  const reranker = await openReranker(model, directory2);
26355
26611
  try {
26356
26612
  await reranker.score("check", ["check"]);
@@ -26368,7 +26624,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
26368
26624
  await installFiles(placedImage(model, directory2), { progress });
26369
26625
  }
26370
26626
  progress(`${model.id}: loading it once to check it works`);
26371
- const { openPictureEmbedder } = await import("./embedder-LLNK4JF4.js");
26627
+ const { openPictureEmbedder } = await import("./embedder-EDXLEJ27.js");
26372
26628
  const embedder = await openPictureEmbedder(model, directory2);
26373
26629
  try {
26374
26630
  const vector = await embedder.embedQuery("check");
@@ -26380,7 +26636,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
26380
26636
  return { model, directory: directory2 };
26381
26637
  }, "downloadImageModel");
26382
26638
 
26383
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/domain/money-words.js
26639
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/domain/money-words.js
26384
26640
  var MONEY_REQUEST = "money-request";
26385
26641
  var MONEY_DONE = "money-done";
26386
26642
  var PROMISE = "promise";
@@ -26414,10 +26670,10 @@ var MONEY_WORDS = [
26414
26670
  }
26415
26671
  ];
26416
26672
 
26417
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/money-words.js
26673
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/money-words.js
26418
26674
  var moneyClassesOf = /* @__PURE__ */ __name((text2) => listsHit(text2, MONEY_WORDS), "moneyClassesOf");
26419
26675
 
26420
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/domain/status-words.js
26676
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/domain/status-words.js
26421
26677
  var words = /* @__PURE__ */ __name((forms) => new RegExp(`(?<![\\p{L}\\p{N}])(?:${forms.join("|")})(?![\\p{L}\\p{N}])`, "iu"), "words");
26422
26678
  var MONEY_DONE_FORMS = words([
26423
26679
  "\u043E\u043F\u043B\u0430\u0442\u0438\u043B[\u0430\u0438]?",
@@ -26457,7 +26713,7 @@ var PROMISE_FORMS = words([
26457
26713
  "estar\xE1 listo"
26458
26714
  ]);
26459
26715
 
26460
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-status/items.js
26716
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/project-status/items.js
26461
26717
  var EXCERPT_CHARS = 80;
26462
26718
  var excerpt2 = /* @__PURE__ */ __name((text2) => {
26463
26719
  const flat = text2.replace(/\s+/g, " ").trim();
@@ -26479,7 +26735,7 @@ var whoOf = /* @__PURE__ */ __name((message) => ({
26479
26735
  var fromOwner = /* @__PURE__ */ __name((message) => message.outgoing === true, "fromOwner");
26480
26736
  var day = /* @__PURE__ */ __name((at) => new Date(at).toISOString().slice(0, 10), "day");
26481
26737
 
26482
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-status/signals/amounts.js
26738
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/project-status/signals/amounts.js
26483
26739
  var MONEY = DEFAULT_TASK_CATEGORIES.filter((category) => category.name === "money");
26484
26740
  var verbOf = /* @__PURE__ */ __name((text2) => {
26485
26741
  if (MONEY_DONE_FORMS.test(text2))
@@ -26559,7 +26815,7 @@ var amounts = {
26559
26815
  attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state === "open" ? [{ chat: item2.chat, weight: 2, why: "money open" }] : []), "attention")
26560
26816
  };
26561
26817
 
26562
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-status/signals/children.js
26818
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/project-status/signals/children.js
26563
26819
  var children = {
26564
26820
  id: "children",
26565
26821
  version: 1,
@@ -26588,7 +26844,7 @@ var children = {
26588
26844
  }, "read")
26589
26845
  };
26590
26846
 
26591
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-status/signals/coverage.js
26847
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/project-status/signals/coverage.js
26592
26848
  var coverage = {
26593
26849
  id: "coverage",
26594
26850
  version: 1,
@@ -26617,7 +26873,7 @@ var coverage = {
26617
26873
  attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state !== "complete" && item2.data.beforeHeld ? [{ chat: item2.chat, weight: 3, why: "held in part" }] : []), "attention")
26618
26874
  };
26619
26875
 
26620
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-status/signals/last-message.js
26876
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/project-status/signals/last-message.js
26621
26877
  var lastMessage = {
26622
26878
  id: "last-message",
26623
26879
  version: 1,
@@ -26639,7 +26895,7 @@ var lastMessage = {
26639
26895
  }, "read")
26640
26896
  };
26641
26897
 
26642
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-status/signals/payments.js
26898
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/project-status/signals/payments.js
26643
26899
  var holding = /* @__PURE__ */ __name((row) => row.review !== "rejected", "holding");
26644
26900
  var item = /* @__PURE__ */ __name((row, at, data) => ({
26645
26901
  signal: "payments",
@@ -26689,7 +26945,7 @@ var payments = {
26689
26945
  }, "read")
26690
26946
  };
26691
26947
 
26692
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-status/signals/promises.js
26948
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/project-status/signals/promises.js
26693
26949
  var PATTERNS_PER_CHAT = 3;
26694
26950
  var DAY3 = 864e5;
26695
26951
  var KINDS2 = /* @__PURE__ */ new Set(["promise", "request"]);
@@ -26778,7 +27034,7 @@ var promises = {
26778
27034
  }, "read")
26779
27035
  };
26780
27036
 
26781
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-status/signals/questions.js
27037
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/project-status/signals/questions.js
26782
27038
  var PER_SIDE = 5;
26783
27039
  var WEEK = 7 * 864e5;
26784
27040
  var NOBODY = /* @__PURE__ */ new Set();
@@ -26809,7 +27065,7 @@ var questions2 = {
26809
27065
  }, "attention")
26810
27066
  };
26811
27067
 
26812
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-status/signals/reply-next.js
27068
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/project-status/signals/reply-next.js
26813
27069
  var targetOf = /* @__PURE__ */ __name((message, chat, owners) => {
26814
27070
  const byId2 = /* @__PURE__ */ __name((id2) => chat.messages.find((one2) => one2.id === id2), "byId");
26815
27071
  const quoted = message.replyTo ?? (message.replyToId === void 0 ? void 0 : byId2(message.replyToId));
@@ -26877,7 +27133,7 @@ var replyNext = {
26877
27133
  attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.next === "owner" ? [{ chat: item2.chat, weight: 2, why: "your move" }] : []), "attention")
26878
27134
  };
26879
27135
 
26880
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-status/signals/topics.js
27136
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/project-status/signals/topics.js
26881
27137
  var escaped2 = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
26882
27138
  var wholeWord = /* @__PURE__ */ __name((word) => new RegExp(`(?<![\\p{L}\\p{N}])${escaped2(word)}(?![\\p{L}\\p{N}])`, "u"), "wholeWord");
26883
27139
  var matcherOf = /* @__PURE__ */ __name((query) => {
@@ -26923,7 +27179,7 @@ var topics = {
26923
27179
  }, "read")
26924
27180
  };
26925
27181
 
26926
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-status/signals/index.js
27182
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/project-status/signals/index.js
26927
27183
  var STATUS_SIGNALS = [
26928
27184
  lastMessage,
26929
27185
  replyNext,
@@ -26936,7 +27192,7 @@ var STATUS_SIGNALS = [
26936
27192
  children
26937
27193
  ];
26938
27194
 
26939
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-status/index.js
27195
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/project-status/index.js
26940
27196
  var DAY4 = 864e5;
26941
27197
  var STATUS_WINDOW = 300;
26942
27198
  var STATUS_CHATS = 16;
@@ -27118,7 +27374,7 @@ var projectStatus = /* @__PURE__ */ __name(async (store, input) => {
27118
27374
  };
27119
27375
  }, "projectStatus");
27120
27376
 
27121
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/account.js
27377
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/account.js
27122
27378
  var accountService = /* @__PURE__ */ __name((deps) => {
27123
27379
  const online = /* @__PURE__ */ __name(async (command) => {
27124
27380
  if (deps.offline)
@@ -27190,7 +27446,7 @@ var accountService = /* @__PURE__ */ __name((deps) => {
27190
27446
  };
27191
27447
  }, "accountService");
27192
27448
 
27193
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/domain/send-time.js
27449
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/domain/send-time.js
27194
27450
  var MINUTE = 6e4;
27195
27451
  var YEAR = 365 * 24 * 60 * MINUTE;
27196
27452
  var DELAY = /^(\d+)(m|h|d)$/;
@@ -27209,7 +27465,7 @@ var sendTime = /* @__PURE__ */ __name((value, now = Date.now(), flag = "--at-tim
27209
27465
  return new Date(at - at % MINUTE).toISOString();
27210
27466
  }, "sendTime");
27211
27467
 
27212
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/admin.js
27468
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/admin.js
27213
27469
  var recordMembership = /* @__PURE__ */ __name(async (deps, operationId, done2, change, fix, write2) => {
27214
27470
  try {
27215
27471
  const held = await accountStoreIfOpen(deps);
@@ -27456,7 +27712,7 @@ var linkLimits = /* @__PURE__ */ __name(({ approval, expires, maxUses }) => {
27456
27712
  return expires === void 0 ? void 0 : sendTime(expires, Date.now(), "--expire-time");
27457
27713
  }, "linkLimits");
27458
27714
 
27459
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/mail-search.js
27715
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/mail-search.js
27460
27716
  var THREADS_PAGE = 500;
27461
27717
  var threadsOf = /* @__PURE__ */ __name(async (store, key) => {
27462
27718
  const account = await store.accounts.storedAccount(key).catch(() => void 0);
@@ -27535,7 +27791,7 @@ var readMail = /* @__PURE__ */ __name(async (store, locator, { before: before2 =
27535
27791
  return thread.slice(Math.max(0, at - before2), at + after + 1).map((hit) => hit.id === message ? { ...hit, anchor: true } : hit);
27536
27792
  }, "readMail");
27537
27793
 
27538
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/search-kind.js
27794
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/search-kind.js
27539
27795
  var NO_MAIL = "no_mail";
27540
27796
  var MAIL = "email";
27541
27797
  var listContextOf = /* @__PURE__ */ __name(async (store, account, app, stored) => {
@@ -27582,7 +27838,7 @@ var accountsOfKind = /* @__PURE__ */ __name((kind, chosen, held, explicit, comma
27582
27838
  return chosenMail.map(({ provider, account }) => ({ provider, account }));
27583
27839
  }, "accountsOfKind");
27584
27840
 
27585
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/messages-search.js
27841
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/messages-search.js
27586
27842
  var MAIL_FIELDS = /* @__PURE__ */ new Set(["to", "cc", "bcc", "subject", "mailbox", "label", "is"]);
27587
27843
  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");
27588
27844
  var prepareLucene = /* @__PURE__ */ __name(async (store, account, request, messenger) => {
@@ -27930,7 +28186,7 @@ var statsLucene = /* @__PURE__ */ __name(async (store, account, request, messeng
27930
28186
  };
27931
28187
  }, "statsLucene");
27932
28188
 
27933
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/rankings-selection.js
28189
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/rankings-selection.js
27934
28190
  var RANKING_SELECTION_BYTES = 64 * 1024;
27935
28191
  var object = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0, "object");
27936
28192
  function invalid(message = "ranking selection is invalid \u2014 obtain a new drilldown from stats top") {
@@ -28099,7 +28355,7 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
28099
28355
  };
28100
28356
  }, "readRankingSelection");
28101
28357
 
28102
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/search-record.js
28358
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/search-record.js
28103
28359
  var canonical = /* @__PURE__ */ __name((value, nested = false) => Array.isArray(value) ? value.map((one2) => canonical(one2, true)) : value !== null && typeof value === "object" ? Object.fromEntries(Object.entries(value).filter(([, one2]) => one2 !== void 0 && (nested || one2 !== false)).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([key, one2]) => [key, canonical(one2, true)])) : value, "canonical");
28104
28360
  var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
28105
28361
  command,
@@ -28109,7 +28365,7 @@ var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
28109
28365
  fieldsVersion: FIELD_VERSION
28110
28366
  }), "searchRecordOf");
28111
28367
 
28112
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/admin-statistics.js
28368
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/admin-statistics.js
28113
28369
  function invalid2(message) {
28114
28370
  throw new CliError("validation_error", message);
28115
28371
  }
@@ -28403,7 +28659,7 @@ var adminStatisticsService = /* @__PURE__ */ __name((deps) => ({
28403
28659
  }, "evidence")
28404
28660
  }), "adminStatisticsService");
28405
28661
 
28406
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/archive-gaps.js
28662
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/archive-gaps.js
28407
28663
  import { createHash as createHash7, randomUUID as randomUUID4 } from "node:crypto";
28408
28664
  var GAP_BOUNDS = { maxGaps: 5, limit: 500, timeMs: 3e4 };
28409
28665
  var validateRepair = /* @__PURE__ */ __name((messenger, options) => {
@@ -28540,16 +28796,16 @@ var gapsService = /* @__PURE__ */ __name((deps) => {
28540
28796
  return { plan, repair };
28541
28797
  }, "gapsService");
28542
28798
 
28543
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/attachments.js
28799
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/attachments.js
28544
28800
  import { createHash as createHash9 } from "node:crypto";
28545
28801
  import { constants as constants2, mkdirSync as mkdirSync2 } from "node:fs";
28546
28802
  import { lstat as lstat4, open as open6, readFile, stat as stat2 } from "node:fs/promises";
28547
28803
 
28548
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/directory.js
28804
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/attachments/directory.js
28549
28805
  import { lstat as lstat2, readdir as readdir2, realpath as realpath3 } from "node:fs/promises";
28550
28806
  import { basename as basename4, join as join8, relative as relative2, sep as sep2 } from "node:path";
28551
28807
 
28552
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/sends/upload.js
28808
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/sends/upload.js
28553
28809
  import { openAsBlob, realpathSync } from "node:fs";
28554
28810
  import { open as open4, stat } from "node:fs/promises";
28555
28811
  import { basename as basename3, dirname as dirname3, extname, isAbsolute as isAbsolute2, relative, resolve as resolve5, sep } from "node:path";
@@ -28751,7 +29007,7 @@ var readStickerFile = /* @__PURE__ */ __name(async (path, maxBytes, read2) => {
28751
29007
  return { name, source };
28752
29008
  }, "readStickerFile");
28753
29009
 
28754
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/directory.js
29010
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/attachments/directory.js
28755
29011
  var MAX_FILES = 1e4;
28756
29012
  var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app, env) => {
28757
29013
  if (refusedPlace(directory2, app, env))
@@ -28820,15 +29076,15 @@ var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app,
28820
29076
  return choices;
28821
29077
  }, "directoryPaths");
28822
29078
 
28823
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/documents.js
29079
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/attachments/documents.js
28824
29080
  import { posix } from "node:path";
28825
29081
 
28826
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/container.js
29082
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/attachments/container.js
28827
29083
  import { setImmediate as tick } from "node:timers/promises";
28828
29084
  import { crc32 } from "node:zlib";
28829
29085
  var import_xmldom = __toESM(require_lib(), 1);
28830
29086
 
28831
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/encoding.js
29087
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/attachments/encoding.js
28832
29088
  var import_chardet = __toESM(require_lib2(), 1);
28833
29089
  var import_iconv_lite = __toESM(require_lib3(), 1);
28834
29090
  var SAMPLE = 65536;
@@ -28893,11 +29149,11 @@ var sample = /* @__PURE__ */ __name((bytes2) => {
28893
29149
  return result;
28894
29150
  }, "sample");
28895
29151
  var decodeText = /* @__PURE__ */ __name((bytes2) => {
28896
- const marked = bom(bytes2);
28897
- if (marked === "unsupported")
29152
+ const marked2 = bom(bytes2);
29153
+ if (marked2 === "unsupported")
28898
29154
  return { error: "unsupported_encoding" };
28899
- if (marked)
28900
- return decode(bytes2, marked);
29155
+ if (marked2)
29156
+ return decode(bytes2, marked2);
28901
29157
  const utf8 = decode(bytes2, "utf-8");
28902
29158
  if (!("error" in utf8) || utf8.error === "binary")
28903
29159
  return utf8;
@@ -28920,17 +29176,17 @@ var decodeText = /* @__PURE__ */ __name((bytes2) => {
28920
29176
  return decode(bytes2, best[0]);
28921
29177
  }, "decodeText");
28922
29178
  var decodeXml = /* @__PURE__ */ __name((bytes2) => {
28923
- const marked = bom(bytes2);
28924
- if (marked === "unsupported")
29179
+ const marked2 = bom(bytes2);
29180
+ if (marked2 === "unsupported")
28925
29181
  throw new Error("unsupported_encoding");
28926
29182
  const declaration = new TextDecoder("ascii").decode(bytes2.subarray(0, 256)).match(/^\s*<\?xml[^>]*\bencoding=["']([^"']+)["']/i);
28927
- const result = decode(bytes2, marked ?? declaration?.[1] ?? "utf-8");
29183
+ const result = decode(bytes2, marked2 ?? declaration?.[1] ?? "utf-8");
28928
29184
  if ("error" in result)
28929
29185
  throw new Error(result.error);
28930
29186
  return result.text;
28931
29187
  }, "decodeXml");
28932
29188
 
28933
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/container.js
29189
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/attachments/container.js
28934
29190
  var MAX_PART = 10 * 1024 * 1024;
28935
29191
  var MAX_ENTRIES = 1e3;
28936
29192
  var decoder = new TextDecoder("utf-8", { fatal: true });
@@ -29145,7 +29401,7 @@ var elements = /* @__PURE__ */ __name((node, name, namespace) => {
29145
29401
  return found;
29146
29402
  }, "elements");
29147
29403
 
29148
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/sheets.js
29404
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/attachments/sheets.js
29149
29405
  var columnName = /* @__PURE__ */ __name((column) => {
29150
29406
  let name = "";
29151
29407
  for (let rest = column; rest > 0; rest = Math.floor((rest - 1) / 26))
@@ -29200,7 +29456,7 @@ var sheetText = /* @__PURE__ */ __name((sheets2, maxChars = MAX_TEXT_CHARS) => {
29200
29456
  return { text: parts.join("").trim(), truncated: false };
29201
29457
  }, "sheetText");
29202
29458
 
29203
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/documents.js
29459
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/attachments/documents.js
29204
29460
  var OFFICE = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
29205
29461
  var TEXT = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
29206
29462
  var TABLE = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
@@ -29600,10 +29856,10 @@ var readDocument = /* @__PURE__ */ __name(async (bytes2, kind, signal) => {
29600
29856
  }
29601
29857
  }, "readDocument");
29602
29858
 
29603
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/extract.js
29859
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/attachments/extract.js
29604
29860
  import { extname as extname3 } from "node:path";
29605
29861
 
29606
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/readers/engine.js
29862
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/readers/engine.js
29607
29863
  import { readFileSync } from "node:fs";
29608
29864
  import { dirname as dirname4, extname as extname2, join as join9 } from "node:path";
29609
29865
  import { fileURLToPath } from "node:url";
@@ -29664,7 +29920,7 @@ var derived = /* @__PURE__ */ __name((bytes2, extractor, read2) => {
29664
29920
  }
29665
29921
  }, "derived");
29666
29922
 
29667
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/readers/image/index.js
29923
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/readers/image/index.js
29668
29924
  var IMAGES = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".webp", ".gif", ".heic", ".tif", ".tiff", ".bmp"]);
29669
29925
  var image2 = {
29670
29926
  id: "image",
@@ -29673,7 +29929,7 @@ var image2 = {
29673
29929
  read: /* @__PURE__ */ __name(async () => ({ status: "needs-agent" }), "read")
29674
29930
  };
29675
29931
 
29676
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/readers/doc/index.js
29932
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/readers/doc/index.js
29677
29933
  var OLE = "\xD0\xCF\xE0\xA1\xB1\xE1";
29678
29934
  var doc = {
29679
29935
  id: "doc",
@@ -29685,7 +29941,7 @@ var doc = {
29685
29941
  }), "read")
29686
29942
  };
29687
29943
 
29688
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/readers/docx/index.js
29944
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/readers/docx/index.js
29689
29945
  var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
29690
29946
  var docx = {
29691
29947
  id: "docx",
@@ -29698,7 +29954,7 @@ var docx = {
29698
29954
  }), "read")
29699
29955
  };
29700
29956
 
29701
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/markup.js
29957
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/attachments/markup.js
29702
29958
  var import_iconv_lite2 = __toESM(require_lib3(), 1);
29703
29959
  var RTF_SKIPPED = /* @__PURE__ */ new Set([
29704
29960
  "fonttbl",
@@ -29874,7 +30130,7 @@ var htmlText = /* @__PURE__ */ __name((source) => {
29874
30130
  }, "htmlText");
29875
30131
  var safeChar = /* @__PURE__ */ __name((code, fallback) => code > 0 && code <= 1114111 ? String.fromCodePoint(code) : fallback, "safeChar");
29876
30132
 
29877
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/readers/html/page.js
30133
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/readers/html/page.js
29878
30134
  var clean = /* @__PURE__ */ __name((value) => typeof value === "string" ? value.replace(/\s+/g, " ").trim() : "", "clean");
29879
30135
  var namesIn = /* @__PURE__ */ __name((value) => [value].flat().map((entry) => typeof entry === "string" ? clean(entry) : clean(entry?.name)).filter(Boolean).join(", "), "namesIn");
29880
30136
  var jsonLdNodes = /* @__PURE__ */ __name((document) => {
@@ -29930,7 +30186,7 @@ var markdownSections = /* @__PURE__ */ __name((text2) => {
29930
30186
  return found.map((section, index) => ({ ...section, end: found[index + 1]?.start ?? text2.length }));
29931
30187
  }, "markdownSections");
29932
30188
 
29933
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/readers/html/index.js
30189
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/readers/html/index.js
29934
30190
  var HTML = /* @__PURE__ */ new Set([".html", ".htm", ".xhtml"]);
29935
30191
  var first = /* @__PURE__ */ __name((...values) => values.find((value) => typeof value === "string" && value !== ""), "first");
29936
30192
  var loaded = /* @__PURE__ */ __name(async (load, name) => {
@@ -30001,7 +30257,7 @@ var html = {
30001
30257
  }, "read")
30002
30258
  };
30003
30259
 
30004
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/readers/office/index.js
30260
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/readers/office/index.js
30005
30261
  var office = {
30006
30262
  id: "office",
30007
30263
  version: documentExtractor("odt"),
@@ -30012,7 +30268,7 @@ var office = {
30012
30268
  }, "read")
30013
30269
  };
30014
30270
 
30015
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/readers/pdf/index.js
30271
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/readers/pdf/index.js
30016
30272
  var pdf = {
30017
30273
  id: "pdf",
30018
30274
  version: "unpdf",
@@ -30079,7 +30335,7 @@ var pdf = {
30079
30335
  }), "read")
30080
30336
  };
30081
30337
 
30082
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/readers/plain/index.js
30338
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/readers/plain/index.js
30083
30339
  var PLAIN = /* @__PURE__ */ new Set([".txt", ".md", ".markdown", ".csv", ".tsv", ".json", ".log"]);
30084
30340
  var isPlain = /* @__PURE__ */ __name((hint) => PLAIN.has(extensionOf(hint)) || hint.mime?.startsWith("text/") || hint.mime === "application/json", "isPlain");
30085
30341
  var readPlain = /* @__PURE__ */ __name((bytes2) => {
@@ -30099,7 +30355,7 @@ var plain = {
30099
30355
  read: /* @__PURE__ */ __name(async (bytes2) => readPlain(bytes2), "read")
30100
30356
  };
30101
30357
 
30102
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/readers/rtf/index.js
30358
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/readers/rtf/index.js
30103
30359
  var rtf = {
30104
30360
  id: "rtf",
30105
30361
  version: "v1",
@@ -30107,10 +30363,10 @@ var rtf = {
30107
30363
  read: /* @__PURE__ */ __name(async (bytes2) => derived(bytes2, "rtf:v1", rtfText), "read")
30108
30364
  };
30109
30365
 
30110
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
30366
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
30111
30367
  import { basename as basename5 } from "node:path";
30112
30368
 
30113
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/csv-spans.js
30369
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/attachments/csv-spans.js
30114
30370
  var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) => {
30115
30371
  const cells = [];
30116
30372
  let row = 1, column = 1, start = 0, quoted = false, truncated = false;
@@ -30148,7 +30404,7 @@ var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) =
30148
30404
  return { cells, truncated };
30149
30405
  }, "delimitedSpans");
30150
30406
 
30151
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
30407
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
30152
30408
  var DELIMITED = {
30153
30409
  ".csv": ",",
30154
30410
  ".tsv": " ",
@@ -30187,7 +30443,7 @@ var sheets = {
30187
30443
  }, "read")
30188
30444
  };
30189
30445
 
30190
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/readers/registry.js
30446
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/readers/registry.js
30191
30447
  var BUILT_INS2 = [office, pdf, docx, doc, rtf, html, sheets, plain, image2];
30192
30448
  var HEAD_BYTES = 1024;
30193
30449
  var readers = [...BUILT_INS2];
@@ -30197,7 +30453,7 @@ var readWithRegistry = /* @__PURE__ */ __name(async (bytes2, hint, context2) =>
30197
30453
  return reader ? reader.read(bytes2, hint, context2) : { status: "unsupported" };
30198
30454
  }, "readWithRegistry");
30199
30455
 
30200
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/extract.js
30456
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/attachments/extract.js
30201
30457
  var importEngine = /* @__PURE__ */ __name((name) => importFrom(new URL("attachments/extract.js", import.meta.resolve("@wirecat/cli-core")).href, name), "importEngine");
30202
30458
  var extensionOf2 = /* @__PURE__ */ __name(({ name, path }) => extname3(name ?? path).toLowerCase(), "extensionOf");
30203
30459
  var extractText = /* @__PURE__ */ __name(async (bytes2, hint, load, signal, env = process.env) => {
@@ -31276,7 +31532,7 @@ function imageSize(input) {
31276
31532
  }
31277
31533
  __name(imageSize, "imageSize");
31278
31534
 
31279
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/ocr.js
31535
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/attachments/ocr.js
31280
31536
  var MAX_PAGES = 20;
31281
31537
  var MAX_PIXELS = 2e7;
31282
31538
  var cancelled2 = /* @__PURE__ */ __name((signal) => {
@@ -31427,7 +31683,7 @@ var ocrPdf = /* @__PURE__ */ __name(async (bytes2, pipeline2, load, signal) => {
31427
31683
  }
31428
31684
  }, "ocrPdf");
31429
31685
 
31430
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/pdf-preview.js
31686
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/attachments/pdf-preview.js
31431
31687
  var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = importEngine, env = process.env) => {
31432
31688
  const limits = pdfPreviewLimits(env);
31433
31689
  const cancelled4 = /* @__PURE__ */ __name(() => {
@@ -31504,7 +31760,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
31504
31760
  }
31505
31761
  }, "pdfPreview");
31506
31762
 
31507
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/transfer.js
31763
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/attachments/transfer.js
31508
31764
  import { createHash as createHash8 } from "node:crypto";
31509
31765
  import { constants } from "node:fs";
31510
31766
  import { lstat as lstat3, open as open5 } from "node:fs/promises";
@@ -31612,7 +31868,7 @@ var transferMime = /* @__PURE__ */ __name((head, hint, name = null) => {
31612
31868
  return hint !== null && /^[a-z0-9.+-]+\/[a-z0-9.+-]+$/i.test(hint) ? hint : "application/octet-stream";
31613
31869
  }, "transferMime");
31614
31870
 
31615
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/file-download.js
31871
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/file-download.js
31616
31872
  import { createWriteStream, mkdirSync } from "node:fs";
31617
31873
  import { link as link3, rm } from "node:fs/promises";
31618
31874
  import { join as join10, resolve as resolve6 } from "node:path";
@@ -31726,7 +31982,7 @@ var save = /* @__PURE__ */ __name(async (file2, directory2, fallbackName, { uniq
31726
31982
  }
31727
31983
  }, "save");
31728
31984
 
31729
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/attachments.js
31985
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/attachments.js
31730
31986
  var ATTACHMENT_QUERY = {
31731
31987
  entity: "attachment",
31732
31988
  backend: "sql",
@@ -32149,7 +32405,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
32149
32405
  }, "setText")
32150
32406
  }), "attachmentsService");
32151
32407
 
32152
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/chat-documents.js
32408
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/chat-documents.js
32153
32409
  var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
32154
32410
  list: /* @__PURE__ */ __name(async (chat, { limit, offset, ref }) => {
32155
32411
  const store = await accountStore(deps);
@@ -32179,7 +32435,7 @@ var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
32179
32435
  }, "list")
32180
32436
  }), "chatDocumentsService");
32181
32437
 
32182
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/retention.js
32438
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/retention.js
32183
32439
  var observationDuration = /* @__PURE__ */ __name((text2, flag) => {
32184
32440
  const match = /^(\d+(?:\.\d+)?)([smhdw])$/.exec(text2);
32185
32441
  const units2 = { s: 1e3, m: 6e4, h: 36e5, d: 864e5, w: 6048e5 };
@@ -32266,7 +32522,7 @@ var isRetentionSelection = /* @__PURE__ */ __name((selection) => {
32266
32522
  }
32267
32523
  }, "isRetentionSelection");
32268
32524
 
32269
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/counters.js
32525
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/counters.js
32270
32526
  var counterFields = /* @__PURE__ */ __name((text2 = "views,reactions,comments") => {
32271
32527
  const fields = text2.split(",").map((one2) => one2.trim());
32272
32528
  if (!fields.length || fields.some((one2) => !COUNTER_FIELDS.includes(one2)) || new Set(fields).size !== fields.length)
@@ -32473,7 +32729,7 @@ var countersService = /* @__PURE__ */ __name((deps) => {
32473
32729
  };
32474
32730
  }, "countersService");
32475
32731
 
32476
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/search-refresh.js
32732
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/search-refresh.js
32477
32733
  var SYNC_KEY = "messages.sync-first";
32478
32734
  var SYNC_BOUNDS = { maxChats: 5, timeMs: 3e4, maxMessages: 500 };
32479
32735
  var keyOf2 = /* @__PURE__ */ __name((chat) => JSON.stringify([chat.account.provider, chat.account.account, chat.chatId]), "keyOf");
@@ -32605,7 +32861,7 @@ var withRefresh = /* @__PURE__ */ __name((found, refreshed) => ({
32605
32861
  ...!refreshed || refreshed.complete ? {} : { coverage: { ...found.coverage, state: "stale" } }
32606
32862
  }), "withRefresh");
32607
32863
 
32608
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/embeddings-search.js
32864
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/embeddings-search.js
32609
32865
  var CANDIDATES = 50;
32610
32866
  var WORD_HITS = 200;
32611
32867
  var RRF_K = 60;
@@ -32723,7 +32979,7 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
32723
32979
  }, deps.messenger);
32724
32980
  const eligibility = filter === void 0 ? void 0 : await store.queries.conversationEligibility(prepared.execution);
32725
32981
  const selected = prepared.selectedChat;
32726
- const scopeOf3 = /* @__PURE__ */ __name((one2) => selected ? selected.account.provider === one2.provider && selected.account.account === one2.account ? { chatId: selected.chatId } : null : {}, "scopeOf");
32982
+ const scopeOf4 = /* @__PURE__ */ __name((one2) => selected ? selected.account.provider === one2.provider && selected.account.account === one2.account ? { chatId: selected.chatId } : null : {}, "scopeOf");
32727
32983
  const words3 = await byWords(query, prepared, eligibility?.conversations, since);
32728
32984
  const meaning = [];
32729
32985
  const sources = words3.sources;
@@ -32731,7 +32987,7 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
32731
32987
  await withEmbedder(deps, target2, choice, {}, async (embedder) => {
32732
32988
  const [vector] = await embedder.embed([query], "query");
32733
32989
  for (const one2 of prepared.scopeAccounts) {
32734
- const scope = scopeOf3(one2);
32990
+ const scope = scopeOf4(one2);
32735
32991
  if (scope === null)
32736
32992
  continue;
32737
32993
  const hits = await store.vectors.nearestConversations(one2, {
@@ -32765,7 +33021,7 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
32765
33021
  const scoped = [];
32766
33022
  const elsewhere = [];
32767
33023
  for (const one2 of prepared.scopeAccounts) {
32768
- const scope = scopeOf3(one2);
33024
+ const scope = scopeOf4(one2);
32769
33025
  if (scope === null)
32770
33026
  continue;
32771
33027
  const eligibleChats = eligibility?.chats.filter(({ account: account2 }) => account2.provider === one2.provider && account2.account === one2.account).map(({ chat: chat2 }) => chat2);
@@ -32871,22 +33127,22 @@ var searchReadiness = /* @__PURE__ */ __name((chats, meaning, outside) => {
32871
33127
  };
32872
33128
  }, "searchReadiness");
32873
33129
  var meanOf = /* @__PURE__ */ __name((vectors) => {
32874
- const mean = new Float32Array(vectors[0]?.length ?? 0);
33130
+ const mean2 = new Float32Array(vectors[0]?.length ?? 0);
32875
33131
  for (const vector of vectors) {
32876
- for (let index = 0; index < mean.length; index++)
32877
- mean[index] = mean[index] + vector[index];
33132
+ for (let index = 0; index < mean2.length; index++)
33133
+ mean2[index] = mean2[index] + vector[index];
32878
33134
  }
32879
- const length = Math.hypot(...mean) || 1;
32880
- return mean.map((value) => value / length);
33135
+ const length = Math.hypot(...mean2) || 1;
33136
+ return mean2.map((value) => value / length);
32881
33137
  }, "meanOf");
32882
33138
 
32883
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/embeddings.js
33139
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/embeddings.js
32884
33140
  var embeddingsService = /* @__PURE__ */ __name((deps) => ({
32885
33141
  ...embeddingsMaintenance(deps),
32886
33142
  ...embeddingsSearch(deps)
32887
33143
  }), "embeddingsService");
32888
33144
 
32889
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/folders.js
33145
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/folders.js
32890
33146
  var foldersService = /* @__PURE__ */ __name((deps) => {
32891
33147
  const online = /* @__PURE__ */ __name(async (command) => {
32892
33148
  if (deps.offline)
@@ -33027,7 +33283,7 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
33027
33283
  };
33028
33284
  }, "foldersService");
33029
33285
 
33030
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/mentions.js
33286
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/mentions.js
33031
33287
  var REVIEW_COUNT = 500;
33032
33288
  var mentionsService = /* @__PURE__ */ __name((deps) => {
33033
33289
  const located = /* @__PURE__ */ __name(async () => {
@@ -33106,7 +33362,7 @@ var mentionsService = /* @__PURE__ */ __name((deps) => {
33106
33362
  };
33107
33363
  }, "mentionsService");
33108
33364
 
33109
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/domain/formatting.js
33365
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/domain/formatting.js
33110
33366
  var invalid3 = /* @__PURE__ */ __name(() => new CliError("validation_error", "the messenger formatter returned invalid text spans"), "invalid");
33111
33367
  var validateFormattedText = /* @__PURE__ */ __name((formatted2) => {
33112
33368
  const { text: text2, spans } = formatted2;
@@ -33166,7 +33422,7 @@ var visibleFormattedText = /* @__PURE__ */ __name((formatted2) => {
33166
33422
  };
33167
33423
  }, "visibleFormattedText");
33168
33424
 
33169
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/domain/message-link.js
33425
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/domain/message-link.js
33170
33426
  var fileLinks = /* @__PURE__ */ __name((attachments) => hitFiles(attachments).map(({ position, kind, name }) => ({
33171
33427
  position,
33172
33428
  kind,
@@ -33215,7 +33471,7 @@ var validatePermalink = /* @__PURE__ */ __name((link4) => {
33215
33471
  return { url: link4.url, access: link4.access, reason: link4.reason };
33216
33472
  }, "validatePermalink");
33217
33473
 
33218
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/domain/pin-duration.js
33474
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/domain/pin-duration.js
33219
33475
  var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
33220
33476
  if (seconds % 86400 === 0 && seconds > 86400)
33221
33477
  return `${seconds / 86400}d`;
@@ -33247,7 +33503,7 @@ var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-tim
33247
33503
  return seconds;
33248
33504
  }, "pinDurationOf");
33249
33505
 
33250
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/sends/send-as.js
33506
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/sends/send-as.js
33251
33507
  var sendAsCheck = /* @__PURE__ */ __name((connection, sendAs) => {
33252
33508
  if (sendAs === void 0) {
33253
33509
  const saved = connection.savedSender?.bind(connection);
@@ -33272,7 +33528,7 @@ var typedSendAs = /* @__PURE__ */ __name((typed) => {
33272
33528
  return sendAs;
33273
33529
  }, "typedSendAs");
33274
33530
 
33275
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/search/total.js
33531
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/search/total.js
33276
33532
  var TOTAL_CAP = 1e4;
33277
33533
  var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
33278
33534
  const least = shown + (hasMore ? 1 : 0);
@@ -33283,7 +33539,7 @@ var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
33283
33539
  return { value: count4, relation: exact ? "eq" : "gte" };
33284
33540
  }, "totalOf");
33285
33541
 
33286
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/search/lucene/meaning-parts.js
33542
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/search/lucene/meaning-parts.js
33287
33543
  var WORD_FIELDS = /* @__PURE__ */ new Set(["text", "exact"]);
33288
33544
  var fieldsOfQuery = /* @__PURE__ */ __name((root, everything) => {
33289
33545
  let narrows = false;
@@ -33312,7 +33568,7 @@ var meaningWords = /* @__PURE__ */ __name((root) => {
33312
33568
  return wanted(root).join(" ").trim();
33313
33569
  }, "meaningWords");
33314
33570
 
33315
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/search/question-plan.js
33571
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/search/question-plan.js
33316
33572
  var words2 = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}]+/gu) ?? [], "words");
33317
33573
  var scaffolding = new Set(words2("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"));
33318
33574
  var questionWord = /\b(?:what|which|how|who|where|when|can|could|should)\b|(?:^|\s)(?:сколько|какой|какая|какие|какое|кто|кому|кем|где|когда|как|что|можно|может|могут|ли)(?:\s|$)/iu;
@@ -33426,8 +33682,25 @@ function planQuestion(text2, strict = false) {
33426
33682
  return { changed: true, natural: true, queries, scope, terms, rankingTerms: original, removed, aliases: changes };
33427
33683
  }
33428
33684
  __name(planQuestion, "planQuestion");
33685
+ var questionText = /* @__PURE__ */ __name((text2) => text2.replace(new RegExp("(?<=\\p{L})\\?(?=\\s|$)", "gu"), "").replace(/"(?:[^"\\]|\\.)*"|(?<=\d):(?=\d)/gu, (found) => found === ":" ? " " : found), "questionText");
33686
+ var lookupTerms = /* @__PURE__ */ __name((plan) => [
33687
+ ...new Set(plan.terms.concat(plan.aliases.flatMap((alias) => words2(alias.split(" -> ")[1] ?? ""))))
33688
+ ], "lookupTerms");
33689
+ var anyOfTerms = /* @__PURE__ */ __name((terms, scope) => `(${terms.join(" OR ")})${scope ? ` ${scope}` : ""}`, "anyOfTerms");
33690
+ var questionLookup = /* @__PURE__ */ __name((text2) => {
33691
+ let plan;
33692
+ try {
33693
+ plan = planQuestion(questionText(text2));
33694
+ } catch (error) {
33695
+ if (error instanceof CliError)
33696
+ return void 0;
33697
+ throw error;
33698
+ }
33699
+ const terms = plan.changed ? lookupTerms(plan) : [];
33700
+ return terms.length ? anyOfTerms(terms, plan.scope) : void 0;
33701
+ }, "questionLookup");
33429
33702
 
33430
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/messages-combined.js
33703
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/messages-combined.js
33431
33704
  var COMBINED_DEFAULTS = { candidateDepth: 300, rrfK: 60, rerank: "all", chatCap: 0 };
33432
33705
  var tokensOf = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}\p{Co}\p{M}]+/gu) ?? [], "tokensOf");
33433
33706
  var searchCombined = /* @__PURE__ */ __name(async (store, account, request, messenger = {}, options = COMBINED_DEFAULTS) => {
@@ -33620,7 +33893,7 @@ var signals = /* @__PURE__ */ __name((hit, terms, corrections, execution, mode,
33620
33893
  return mode === "coverage" ? coverage2 * 4 : mode === "proximity" ? proximity : mode === "phrase" ? phrase : coverage2 * 4 + proximity + phrase;
33621
33894
  }, "signals");
33622
33895
 
33623
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/messages-discovery.js
33896
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/messages-discovery.js
33624
33897
  var MEANING_DEPTH = 100;
33625
33898
  var RRF_K2 = 60;
33626
33899
  var RERANK_DEPTH = 50;
@@ -33642,10 +33915,7 @@ var EVERY_MESSAGE = {
33642
33915
  upper_inclusive: true
33643
33916
  };
33644
33917
  var scopeOf2 = /* @__PURE__ */ __name((root) => root === void 0 ? {} : { ast: { version: 1, language: "lucene-v1", root } }, "scopeOf");
33645
- var discoveryRequest = /* @__PURE__ */ __name((asked) => asked.ast !== void 0 || asked.exact || !asked.text ? asked : {
33646
- ...asked,
33647
- text: asked.text.replace(new RegExp("(?<=\\p{L})\\?(?=\\s|$)", "gu"), "").replace(/"(?:[^"\\]|\\.)*"|(?<=\d):(?=\d)/gu, (found) => found === ":" ? " " : found)
33648
- }, "discoveryRequest");
33918
+ var discoveryRequest = /* @__PURE__ */ __name((asked) => asked.ast !== void 0 || asked.exact || !asked.text ? asked : { ...asked, text: questionText(asked.text) }, "discoveryRequest");
33649
33919
  var searchDiscovery = /* @__PURE__ */ __name(async (store, account, asked, messenger = {}, meaning, rerank) => {
33650
33920
  const request = discoveryRequest(asked);
33651
33921
  const original = await prepareLucene(store, account, request, messenger);
@@ -33659,7 +33929,7 @@ var searchDiscovery = /* @__PURE__ */ __name(async (store, account, asked, messe
33659
33929
  const question = root === void 0 ? text2 : meaningWords(root);
33660
33930
  if (!question)
33661
33931
  return searchLucene(store, account, request, messenger);
33662
- const terms = root === void 0 ? [...new Set(plan.terms.concat(plan.aliases.flatMap((alias) => words2(alias.split(" -> ")[1] ?? ""))))] : [...new Set(words2(question))];
33932
+ const terms = root === void 0 ? lookupTerms(plan) : [...new Set(words2(question))];
33663
33933
  if (!terms.length)
33664
33934
  return searchLucene(store, account, request, messenger);
33665
33935
  if (terms.length > 64)
@@ -33696,7 +33966,7 @@ var searchDiscovery = /* @__PURE__ */ __name(async (store, account, asked, messe
33696
33966
  truncated ||= found.hasMore || found.query.combined.truncated;
33697
33967
  }
33698
33968
  check2();
33699
- const relaxed = root === void 0 ? `(${terms.join(" OR ")})${plan.scope ? ` ${plan.scope}` : ""}` : text2;
33969
+ const relaxed = root === void 0 ? anyOfTerms(terms, plan.scope) : text2;
33700
33970
  const partialRequest = { ...request, text: relaxed, ast: void 0, limit: 300, context: 0, thread: void 0 };
33701
33971
  const partial = await searchLucene(store, account, partialRequest, messenger);
33702
33972
  add(partial.items);
@@ -33948,7 +34218,7 @@ var mixedWithReranker = /* @__PURE__ */ __name((head, scores) => {
33948
34218
  })).sort((a, b) => b.mixed - a.mixed).map(({ hit }) => hit);
33949
34219
  }, "mixedWithReranker");
33950
34220
 
33951
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/thread-context.js
34221
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/thread-context.js
33952
34222
  var THREAD_BOUNDS = { maxHops: 8, maxMessages: 50, maxBytes: 65536, withinMs: 864e5 };
33953
34223
  var bytes = /* @__PURE__ */ __name((items, links) => Buffer.byteLength(JSON.stringify({ items, links }), "utf8"), "bytes");
33954
34224
  var threadBounds = /* @__PURE__ */ __name((options = {}) => {
@@ -34147,7 +34417,7 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account, chat, mess
34147
34417
  return result;
34148
34418
  }, "readThreadContext");
34149
34419
 
34150
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/messages-archive-search.js
34420
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/messages-archive-search.js
34151
34421
  var SEARCH_FILL_MS = 200;
34152
34422
  var statsStore = /* @__PURE__ */ __name(async (store, account, request, messenger = {}) => {
34153
34423
  const stop = Date.now() + SEARCH_FILL_MS;
@@ -34214,12 +34484,12 @@ var accountOf2 = /* @__PURE__ */ __name((hit) => {
34214
34484
  }, "accountOf");
34215
34485
  var keyOf3 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}/${account}`, "keyOf");
34216
34486
 
34217
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/pictures.js
34487
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/pictures.js
34218
34488
  import { createHash as createHash10 } from "node:crypto";
34219
34489
  import { readFile as readFile2, stat as stat3 } from "node:fs/promises";
34220
34490
  import { setTimeout as sleep4 } from "node:timers/promises";
34221
34491
 
34222
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/domain/models.js
34492
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/domain/models.js
34223
34493
  var GROUP_SETTINGS = [
34224
34494
  "allCanPin",
34225
34495
  "onlyAdminsAdd",
@@ -34233,7 +34503,7 @@ var ADMIN_RIGHTS = ["read", "members", "admins", "info", "pin", "link", "post",
34233
34503
  var senderIsMe = /* @__PURE__ */ __name((message, account) => message.outgoing === true || message.senderId !== null && String(message.senderId) === account, "senderIsMe");
34234
34504
  var MEDIA_KINDS = ["photo", "video", "file", "audio", "link"];
34235
34505
 
34236
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/pictures.js
34506
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/pictures.js
34237
34507
  var PICTURE_MAX_BYTES = 25 * 1024 * 1024;
34238
34508
  var PICTURE_FLOOR = 0.25;
34239
34509
  var PAGE4 = 50;
@@ -34250,7 +34520,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
34250
34520
  const directory2 = imageModelsDirectory(deps.env);
34251
34521
  if (!isImageModelInstalled(model2, directory2))
34252
34522
  throw new CliError("not_found", missingModel(model2.id), { reason: "model.not-downloaded", model: model2.id });
34253
- const { openPictureEmbedder } = await import("./embedder-LLNK4JF4.js");
34523
+ const { openPictureEmbedder } = await import("./embedder-EDXLEJ27.js");
34254
34524
  return openPictureEmbedder(model2, directory2);
34255
34525
  }, "open");
34256
34526
  const embedder = /* @__PURE__ */ __name(() => {
@@ -34447,7 +34717,7 @@ var withPictures = /* @__PURE__ */ __name((messages, pictures) => ({
34447
34717
  }, "search")
34448
34718
  }), "withPictures");
34449
34719
 
34450
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/messages-meaning.js
34720
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/messages-meaning.js
34451
34721
  var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, shared, within) => {
34452
34722
  const target2 = embeddingTarget(deps, DEFAULT_TEXT_MODEL);
34453
34723
  const skipped = /* @__PURE__ */ __name((reason, step) => ({
@@ -34458,9 +34728,16 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
34458
34728
  const store = await deps.store();
34459
34729
  const ready = [];
34460
34730
  const without = [];
34461
- for (const one2 of accounts)
34462
- (await store.vectors.hasMessageVectors(one2, target2.key) ? ready : without).push(one2);
34463
- if (ready.length === 0)
34731
+ const mail = /* @__PURE__ */ new Map();
34732
+ const stored = await store.accounts.storedAccounts();
34733
+ for (const one2 of accounts) {
34734
+ const id2 = one2.provider === "email" ? stored.find(({ provider, account }) => provider === one2.provider && account === one2.account)?.id : void 0;
34735
+ if (id2 !== void 0)
34736
+ mail.set(one2, Number(id2));
34737
+ else
34738
+ (await store.vectors.hasMessageVectors(one2, target2.key) ? ready : without).push(one2);
34739
+ }
34740
+ if (ready.length === 0 && mail.size === 0)
34464
34741
  return skipped("no message has a vector yet", "conversations.rebuild");
34465
34742
  const words3 = plainWords(question);
34466
34743
  try {
@@ -34478,12 +34755,24 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
34478
34755
  for (const { chatId, messageId, score } of near2)
34479
34756
  ranked.push({ ...one2, chatId, id: messageId, score });
34480
34757
  }
34758
+ for (const [one2, accountId] of mail) {
34759
+ const near2 = await store.mail.nearest(target2.key, query, {
34760
+ accountId,
34761
+ limit: MEANING_DEPTH
34762
+ });
34763
+ if (near2.length === 0)
34764
+ without.push(one2);
34765
+ for (const { threadExternalId, externalId, score } of near2)
34766
+ ranked.push({ ...one2, chatId: threadExternalId, id: externalId, score });
34767
+ }
34481
34768
  }, "lookUp");
34482
34769
  if (shared && !deps.embedders)
34483
34770
  await lookUp(await shared.get(target2.key, () => target2.open()));
34484
34771
  else
34485
34772
  await withEmbedder(deps, target2, DEFAULT_TEXT_MODEL, {}, lookUp);
34486
34773
  }
34774
+ if (ranked.length === 0 && without.length === accounts.length)
34775
+ return skipped("no message has a vector yet", "conversations.rebuild");
34487
34776
  return {
34488
34777
  model: target2.id,
34489
34778
  ranked: ranked.sort((a, b) => b.score - a.score).slice(0, MEANING_DEPTH),
@@ -34496,7 +34785,7 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
34496
34785
  }
34497
34786
  }, "meaningLane");
34498
34787
 
34499
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/messages-rerank.js
34788
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/messages-rerank.js
34500
34789
  var rerankLane = /* @__PURE__ */ __name((deps) => {
34501
34790
  const choice = deps.reranker ?? DEFAULT_RERANK_MODEL;
34502
34791
  if (choice === "off")
@@ -34508,9 +34797,9 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
34508
34797
  return { skipped: { reason: `${model.id} is not downloaded`, step: "models.download", model: model.id } };
34509
34798
  try {
34510
34799
  const warm = deps.embedders;
34511
- const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-PI6XUJWP.js")).openRerankerProcess(model, directory2, {
34800
+ const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-HIEJXYW6.js")).openRerankerProcess(model, directory2, {
34512
34801
  threads: defaultThreads()
34513
- })) : await (await import("./rerank-SCBTCBPO.js")).openReranker(model, directory2);
34802
+ })) : await (await import("./rerank-UKOVVZM6.js")).openReranker(model, directory2);
34514
34803
  return {
34515
34804
  model: model.id,
34516
34805
  score: /* @__PURE__ */ __name((question, passages) => reranker.score(plainWords(question), passages), "score"),
@@ -34530,17 +34819,17 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
34530
34819
  };
34531
34820
  }, "rerankLane");
34532
34821
 
34533
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/document-pictures.js
34822
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/document-pictures.js
34534
34823
  var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}) => {
34535
34824
  const model = imageModel(DEFAULT_IMAGE_MODEL);
34536
34825
  const directory2 = imageModelsDirectory(env);
34537
34826
  if (!isImageModelInstalled(model, directory2))
34538
34827
  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 });
34539
- const { openPictureEmbedder } = await import("./embedder-LLNK4JF4.js");
34828
+ const { openPictureEmbedder } = await import("./embedder-EDXLEJ27.js");
34540
34829
  return openPictureEmbedder(model, directory2);
34541
34830
  }, "openPictureEmbedderFor");
34542
34831
 
34543
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/document-source.js
34832
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/document-source.js
34544
34833
  var documentSource = /* @__PURE__ */ __name((note2, accounts, profiles, file2) => {
34545
34834
  const metadata = note2.frontMatter;
34546
34835
  const account = accounts.find(({ id: id2 }) => String(id2) === note2.folderId);
@@ -34555,7 +34844,7 @@ var documentSource = /* @__PURE__ */ __name((note2, accounts, profiles, file2) =
34555
34844
  };
34556
34845
  }, "documentSource");
34557
34846
 
34558
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/notes-title-tier.js
34847
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/notes-title-tier.js
34559
34848
  var plainQueryWords = /* @__PURE__ */ __name((query) => {
34560
34849
  let root;
34561
34850
  try {
@@ -34582,7 +34871,7 @@ var titleTiers = /* @__PURE__ */ __name((hits, words3) => {
34582
34871
  return [...hits].sort((a, b) => rank(a) - rank(b));
34583
34872
  }, "titleTiers");
34584
34873
 
34585
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/notes-search.js
34874
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/notes-search.js
34586
34875
  var storeQuery = /* @__PURE__ */ __name(async (store, text2, { exact, timezone } = {}) => resolvedQuery(store, parsedQuery(text2, exact), timezone), "storeQuery");
34587
34876
  var parsedQuery = /* @__PURE__ */ __name((text2, exact) => validateFields(parseLucene(text2, { ...SEARCH_QUERY, defaultField: exact ? "exact" : "text" })).root, "parsedQuery");
34588
34877
  var resolvedQuery = /* @__PURE__ */ __name(async (store, root, timezone) => {
@@ -34823,19 +35112,21 @@ var notesTotal = /* @__PURE__ */ __name(async (store, text2, { exact, scope, sho
34823
35112
  const count4 = (/* @__PURE__ */ new Set([...words3.refs, ...others])).size + (words3.hasMore ? 1 : 0);
34824
35113
  return totalOf(count4, shown, hasMore, othersComplete);
34825
35114
  }, "notesTotal");
34826
- var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offset = 0, tag, filter: expression, folderIds, withInternal, source: given, exact = false, timezone, env, command, embedders, pictures: withPictures2 = false, pictureLimit = 5, pictureEmbedder } = {}) => {
35115
+ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offset = 0, tag, filter: expression, folderIds, withInternal, source: given, exact = false, discover = false, timezone, env, command, embedders, pictures: withPictures2 = false, pictureLimit = 5, pictureEmbedder } = {}) => {
34827
35116
  const typed = noteSourceOfQuery(query);
34828
35117
  const source = given ?? typed.source;
34829
35118
  const rest = typed.source !== void 0 && typed.source === source ? typed.rest : query;
34830
35119
  const label = tag === void 0 ? void 0 : normalizeTag(tag);
34831
35120
  const filter = [expression ? `(${expression})` : "", label === void 0 ? "" : `tag:${label}`].filter(Boolean).join(" AND ") || void 0;
34832
- const parsed = query.trim() ? parsedQuery(query, exact) : void 0;
35121
+ const lookup2 = discover && !exact ? questionLookup(query) : void 0;
35122
+ const parsed = query.trim() ? parsedQuery(lookup2 === void 0 ? query : questionText(query), exact) : void 0;
34833
35123
  const words3 = parsed === void 0 ? "" : meaningWords(parsed);
34834
35124
  const narrowing = allOf([
34835
35125
  ...parsed === void 0 ? [] : [fieldsOfQuery2(parsed)].filter((node) => node !== void 0),
34836
35126
  ...filter === void 0 ? [] : [parsedQuery(filter)]
34837
35127
  ]);
34838
- const text2 = [query.trim() ? `(${query})` : "", filter ?? ""].filter(Boolean).join(" AND ");
35128
+ const asked = lookup2 ?? query;
35129
+ const text2 = [asked.trim() ? `(${asked})` : "", filter ?? ""].filter(Boolean).join(" AND ");
34839
35130
  const window3 = offset + limit;
34840
35131
  const scope = {
34841
35132
  ...folderIds === void 0 ? {} : { folderIds },
@@ -34845,6 +35136,7 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
34845
35136
  };
34846
35137
  let meaningSkipped;
34847
35138
  let meaning;
35139
+ const cosines = /* @__PURE__ */ new Map();
34848
35140
  let meaningRefs;
34849
35141
  let meaningComplete = true;
34850
35142
  if (exact)
@@ -34871,8 +35163,10 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
34871
35163
  nearest = ranked2.slice(0, depth);
34872
35164
  }
34873
35165
  const allowed = await matching(store, nearest.map(({ ref }) => ref), narrowing, scope);
34874
- meaning = nearest.flatMap(({ ref }) => {
35166
+ meaning = nearest.flatMap(({ ref, score }) => {
34875
35167
  const found = allowed.get(ref);
35168
+ if (found)
35169
+ cosines.set(ref, score);
34876
35170
  return found ? [{ ref, ...found }] : [];
34877
35171
  });
34878
35172
  meaningRefs ??= new Set(meaning.map(({ ref }) => ref));
@@ -34903,9 +35197,11 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
34903
35197
  if (tierRefs.has(ref))
34904
35198
  return;
34905
35199
  const held = ranked.get(ref) ?? { note: note2, at, score: 0, foundBy: [] };
34906
- held.score += 1 / (RRF_K3 + rank + 1);
34907
35200
  held.foundBy.push(by);
34908
35201
  ranked.set(ref, held);
35202
+ if (by === "meaning" && lookup2 !== void 0 && held.foundBy.includes("words"))
35203
+ return;
35204
+ held.score += 1 / (RRF_K3 + rank + 1);
34909
35205
  }), "add");
34910
35206
  add(matched.items, "words");
34911
35207
  if (meaning !== void 0)
@@ -34938,7 +35234,8 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
34938
35234
  updated_at: at,
34939
35235
  excerpt: firstLine(note2.text, words3),
34940
35236
  links,
34941
- found_by: foundBy
35237
+ found_by: foundBy,
35238
+ ...cosines.has(ref) ? { meaning_score: cosines.get(ref) } : {}
34942
35239
  });
34943
35240
  for (const link4 of new Map(links.map((link5) => [link5.to ?? `?${link5.target_text}`, link5])).values()) {
34944
35241
  const key = link4.to ?? `?${link4.target_text}`;
@@ -35017,7 +35314,7 @@ var searchNotesOf = /* @__PURE__ */ __name(async (store, account, text2, { accou
35017
35314
  };
35018
35315
  }, "searchNotesOf");
35019
35316
 
35020
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/events-search.js
35317
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/events-search.js
35021
35318
  var MAX_EVENTS_OFFSET = 1e3;
35022
35319
  var iso3 = /* @__PURE__ */ __name((at) => at === null ? null : new Date(at).toISOString(), "iso");
35023
35320
  var accountIdsOf = /* @__PURE__ */ __name(async (store, accounts) => {
@@ -35051,17 +35348,18 @@ var nearestEvents = /* @__PURE__ */ __name(async (store, words3, { limit, accoun
35051
35348
  return (await store.calendar.nearest(key, vector, { limit, ...accountIds ? { accountIds } : {} })).filter(({ score }) => score > floor);
35052
35349
  }, "nearestEvents");
35053
35350
  var keyOf4 = /* @__PURE__ */ __name(({ event }) => event.eventSeriesId === null ? `e${event.id}` : `s${event.eventSeriesId}`, "keyOf");
35054
- var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, offset = 0, accounts, exact, newest, timezone, signal, candidates, env, command, embedders } = {}) => {
35351
+ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, offset = 0, accounts, exact, discover, newest, timezone, signal, candidates, env, command, embedders } = {}) => {
35055
35352
  if (!query.trim())
35056
35353
  throw new CliError("validation_error", "say what to find in the events");
35057
- const { root, stemmer } = await storeQuery(store, query, {
35354
+ const asked = discover && !exact && !newest ? questionLookup(query) : void 0;
35355
+ const { root, stemmer } = await storeQuery(store, asked ?? query, {
35058
35356
  ...exact ? { exact: true } : {},
35059
35357
  ...timezone === void 0 ? {} : { timezone }
35060
35358
  });
35061
35359
  const accountIds = accounts === void 0 ? void 0 : await accountIdsOf(store, accounts);
35062
35360
  if (accountIds?.length === 0)
35063
35361
  return { query, by: "words", hits: [], has_more: false };
35064
- const words3 = plainQueryWords(query);
35362
+ const words3 = plainQueryWords(asked === void 0 ? query : questionText(query));
35065
35363
  const window3 = offset + limit;
35066
35364
  let meaningSkipped;
35067
35365
  let meaning;
@@ -35117,19 +35415,23 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
35117
35415
  }), "add");
35118
35416
  add(found.items, "words");
35119
35417
  add(meaning, "meaning");
35418
+ const cosines = new Map(meaning.map((hit) => [keyOf4(hit), hit.score]));
35120
35419
  const ordered = [...ranked.values()].sort((a, b) => b.score - a.score);
35121
35420
  const hasMore = ordered.length > window3 || found.hasMore;
35122
35421
  return {
35123
35422
  query,
35124
35423
  by,
35125
- hits: ordered.slice(offset, window3).map(({ hit, by: halves }) => foundEvent(hit, query, halves)),
35424
+ hits: ordered.slice(offset, window3).map(({ hit, by: halves }) => {
35425
+ const cosine = cosines.get(keyOf4(hit));
35426
+ return { ...foundEvent(hit, query, halves), ...cosine === void 0 ? {} : { meaning_score: cosine } };
35427
+ }),
35126
35428
  has_more: hasMore,
35127
35429
  ...hasMore && window3 <= MAX_EVENTS_OFFSET ? { next_offset: window3 } : {},
35128
35430
  ...truncated
35129
35431
  };
35130
35432
  }, "searchEvents");
35131
35433
 
35132
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/search-all.js
35434
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/search-all.js
35133
35435
  var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events"];
35134
35436
  var skippable = /* @__PURE__ */ __name((error) => error instanceof CliError && (error.code === "validation_error" || error.code === "not_found"), "skippable");
35135
35437
  var filtersBeside = /* @__PURE__ */ __name((text2) => {
@@ -35154,11 +35456,14 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
35154
35456
  let hasMore = false;
35155
35457
  let notes;
35156
35458
  let events;
35157
- let messagesBy;
35459
+ const by = {};
35158
35460
  let server;
35461
+ const discover = !request.exact && questionLookup(request.text) !== void 0;
35462
+ const cosines = /* @__PURE__ */ new Map();
35159
35463
  let coverage2;
35160
35464
  const messagesOf = /* @__PURE__ */ __name(async (kind) => {
35161
35465
  const given = request.scope?.[kind];
35466
+ const discovers = discover && (kind === "mail" || request.backend !== "server");
35162
35467
  const query = {
35163
35468
  text: request.text,
35164
35469
  kind,
@@ -35171,6 +35476,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
35171
35476
  } : {},
35172
35477
  limit: window3,
35173
35478
  ...request.exact ? { exact: true } : {},
35479
+ ...discovers ? { discover: true } : {},
35174
35480
  ...request.timezone === void 0 ? {} : { timezone: request.timezone },
35175
35481
  ...request.signal === void 0 ? {} : { signal: request.signal }
35176
35482
  };
@@ -35203,7 +35509,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
35203
35509
  };
35204
35510
  }, "itemOf");
35205
35511
  const byWords = found.items.map((hit) => itemOf3(hit, ["words"]));
35206
- if (kind === "mail" || !meaning || request.exact || request.backend === "server")
35512
+ if (!meaning || request.exact || kind === "messages" && request.backend === "server")
35207
35513
  return byWords;
35208
35514
  const filters = filtersBeside(request.text);
35209
35515
  const lane = filters === void 0 ? {
@@ -35213,19 +35519,22 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
35213
35519
  }
35214
35520
  } : await meaning(request.text, read2, embedders);
35215
35521
  if ("skipped" in lane) {
35216
- messagesBy = { by: "words", meaningSkipped: lane.skipped };
35522
+ by[kind] = { by: "words", meaningSkipped: lane.skipped };
35217
35523
  return byWords;
35218
35524
  }
35219
- messagesBy = { by: "words and meaning", ...lane.partly ? { meaningSkipped: lane.partly } : {} };
35525
+ by[kind] = { by: "words and meaning", ...lane.partly ? { meaningSkipped: lane.partly } : {} };
35220
35526
  const near2 = await nearEligible(store, account, query, messenger, lane.ranked, filters ? { text: filters } : {});
35221
35527
  const fused2 = /* @__PURE__ */ new Map();
35222
35528
  byWords.forEach((item2, rank) => {
35223
35529
  fused2.set(item2.ref, { item: item2, score: 1 / (RRF_K3 + rank + 1) });
35224
35530
  });
35225
35531
  near2.forEach((hit, rank) => {
35532
+ cosines.set(hit.locator, hit.cosine);
35226
35533
  const held = fused2.get(hit.locator);
35227
35534
  if (held)
35228
35535
  held.item.foundBy = ["words", "meaning"];
35536
+ if (held && discovers)
35537
+ return;
35229
35538
  fused2.set(hit.locator, {
35230
35539
  item: held?.item ?? itemOf3(hit, ["meaning"]),
35231
35540
  score: (held?.score ?? 0) + 1 / (RRF_K3 + rank + 1)
@@ -35245,6 +35554,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
35245
35554
  embedders,
35246
35555
  ...chosen === void 0 ? {} : notesScopeOf(chosen),
35247
35556
  ...request.exact ? { exact: true } : {},
35557
+ ...discover ? { discover: true } : {},
35248
35558
  ...request.timezone === void 0 ? {} : { timezone: request.timezone },
35249
35559
  ...request.env === void 0 ? {} : { env: request.env }
35250
35560
  });
@@ -35253,6 +35563,9 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
35253
35563
  by: found.by,
35254
35564
  ...found.meaning_skipped === void 0 ? {} : { meaningSkipped: found.meaning_skipped }
35255
35565
  };
35566
+ for (const hit of found.hits)
35567
+ if (hit.meaning_score !== void 0)
35568
+ cosines.set(hit.ref, hit.meaning_score);
35256
35569
  lists.push(found.hits.map((hit) => ({
35257
35570
  kind: hit.kind ?? "note",
35258
35571
  ref: hit.ref,
@@ -35281,6 +35594,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
35281
35594
  ...command === void 0 ? {} : { command },
35282
35595
  ...request.env === void 0 ? {} : { env: request.env },
35283
35596
  ...request.exact ? { exact: true } : {},
35597
+ ...discover ? { discover: true } : {},
35284
35598
  ...request.timezone === void 0 ? {} : { timezone: request.timezone },
35285
35599
  ...request.signal === void 0 ? {} : { signal: request.signal }
35286
35600
  });
@@ -35289,6 +35603,9 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
35289
35603
  by: found.by,
35290
35604
  ...found.meaning_skipped === void 0 ? {} : { meaningSkipped: found.meaning_skipped }
35291
35605
  };
35606
+ for (const hit of found.hits)
35607
+ if (hit.meaning_score !== void 0)
35608
+ cosines.set(hit.ref, hit.meaning_score);
35292
35609
  lists.push(found.hits.map((hit) => ({
35293
35610
  kind: "event",
35294
35611
  ref: hit.ref,
@@ -35313,14 +35630,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
35313
35630
  } finally {
35314
35631
  await embedders.close();
35315
35632
  }
35316
- const ranked = /* @__PURE__ */ new Map();
35317
- for (const list3 of lists)
35318
- list3.forEach((item2, rank) => {
35319
- const held = ranked.get(item2.ref) ?? { item: item2, score: 0 };
35320
- held.score += 1 / (RRF_K3 + rank + 1);
35321
- ranked.set(item2.ref, held);
35322
- });
35323
- const ordered = [...ranked.values()].sort((a, b) => b.score - a.score).map(({ item: item2 }) => item2);
35633
+ const ordered = oneList(lists, cosines);
35324
35634
  const more = hasMore || ordered.length > window3;
35325
35635
  return {
35326
35636
  query: request.text,
@@ -35332,13 +35642,25 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
35332
35642
  skipped,
35333
35643
  ...notes === void 0 ? {} : { notes },
35334
35644
  ...events === void 0 ? {} : { events },
35335
- ...messagesBy === void 0 ? {} : { messages: messagesBy },
35645
+ ...by.messages === void 0 ? {} : { messages: by.messages },
35646
+ ...by.mail === void 0 ? {} : { mail: by.mail },
35336
35647
  ...server === void 0 ? {} : { server },
35337
35648
  ...coverage2 === void 0 ? {} : { coverage: coverage2 }
35338
35649
  };
35339
35650
  }, "searchAll");
35651
+ var oneList = /* @__PURE__ */ __name((lists, cosines) => {
35652
+ const place = /* @__PURE__ */ new Map();
35653
+ for (const list3 of lists)
35654
+ list3.forEach((item2, rank) => {
35655
+ const held = place.get(item2.ref);
35656
+ if (!held || rank < held.rank)
35657
+ place.set(item2.ref, { item: item2, rank });
35658
+ });
35659
+ const cosine = /* @__PURE__ */ __name((ref) => cosines.get(ref) ?? Number.NEGATIVE_INFINITY, "cosine");
35660
+ return [...place.values()].sort((a, b) => a.rank - b.rank || cosine(b.item.ref) - cosine(a.item.ref)).map(({ item: item2 }) => item2);
35661
+ }, "oneList");
35340
35662
 
35341
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/search-all-meetings.js
35663
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/search-all-meetings.js
35342
35664
  var RESOURCES_SEARCHED_WITH_MEETINGS = [...RESOURCES_SEARCHED, "meetings"];
35343
35665
  var whole2 = /* @__PURE__ */ __name((value, minimum, maximum, label) => {
35344
35666
  if (!Number.isSafeInteger(value) || value < minimum || value > maximum)
@@ -35591,7 +35913,7 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account, source, re
35591
35913
  return { ...found, skipped: [...skipped, ...empty2, ...unnamed, ...found.skipped] };
35592
35914
  }, "searchAllOfSource");
35593
35915
 
35594
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/server-search.js
35916
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/server-search.js
35595
35917
  var SERVER_SEARCH_KEY = "messages.server-search";
35596
35918
  var SERVER_BOUNDS = { timeMs: 5e3, perCall: 100, maxCalls: 3, textBytes: 262144 };
35597
35919
  var DEFAULT_BACKEND = "both";
@@ -35780,7 +36102,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
35780
36102
  return { report, sources };
35781
36103
  }, "searchServer");
35782
36104
 
35783
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/messages.js
36105
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/messages.js
35784
36106
  var DELETE_AT_ONCE = 10;
35785
36107
  var filesOf = /* @__PURE__ */ __name(({ attachments }) => {
35786
36108
  const files = fileLinks(attachments);
@@ -35796,18 +36118,18 @@ var messagesService = /* @__PURE__ */ __name((deps) => {
35796
36118
  return;
35797
36119
  await ensureAccount({ text: target2.text, account: target2.account }, { account: account.account, ...deps.profile === void 0 ? {} : { profile: deps.profile } });
35798
36120
  }, "ownTarget");
35799
- const serverThenStore = /* @__PURE__ */ __name(async (store, account, query) => {
36121
+ const serverThenStore = /* @__PURE__ */ __name(async (store, account, query, lanes = true) => {
35800
36122
  const server = await searchServer(deps, query);
35801
36123
  const only = query.backend === "server" && server ? [...server.sources.keys()].map((key) => {
35802
36124
  const [chatId, id2] = JSON.parse(key);
35803
36125
  return { ...account, chatId, id: id2 };
35804
36126
  }) : void 0;
35805
- const found = await searchStore(store, account, only ? { ...query, only } : query, deps.messenger, query.discover && query.kind !== "mail" ? meaningLane(deps) : void 0, query.discover && query.kind !== "mail" ? rerankLane(deps) : void 0);
36127
+ const found = await searchStore(store, account, only ? { ...query, only } : query, deps.messenger, lanes && query.discover && query.kind !== "mail" ? meaningLane(deps) : void 0, lanes && query.discover && query.kind !== "mail" ? rerankLane(deps) : void 0);
35806
36128
  return { found, server };
35807
36129
  }, "serverThenStore");
35808
36130
  const unifiedMessages = /* @__PURE__ */ __name((store, account) => async (query) => {
35809
36131
  await topUp(store);
35810
- const { found, server } = await serverThenStore(store, account, query);
36132
+ const { found, server } = await serverThenStore(store, account, query, false);
35811
36133
  return withServer(found, account, server);
35812
36134
  }, "unifiedMessages");
35813
36135
  const remember = /* @__PURE__ */ __name(async (store, command, query) => {
@@ -36221,7 +36543,7 @@ var checkMediaOptions = /* @__PURE__ */ __name((messenger, asked, attachments) =
36221
36543
  throw new CliError("validation_error", `${MEDIA_FLAGS[first2]} needs a --photo or --file`);
36222
36544
  }, "checkMediaOptions");
36223
36545
 
36224
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/domain/channel-tags.js
36546
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/domain/channel-tags.js
36225
36547
  var CHANNEL_TAG_RULES_VERSION = "keywords-v1";
36226
36548
  var RULES = {
36227
36549
  ai: [/\b(ai|gpt|llm|machine learning|artificial intelligence)\b/iu, /нейросет|искусственн/iu],
@@ -36236,7 +36558,7 @@ var classifyChannel = /* @__PURE__ */ __name((metadata) => Object.entries(RULES)
36236
36558
  return fields.length ? [{ tag, score: fields.length / 3, fields }] : [];
36237
36559
  }), "classifyChannel");
36238
36560
 
36239
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/metadata.js
36561
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/metadata.js
36240
36562
  var metadataService = /* @__PURE__ */ __name((deps) => {
36241
36563
  const held = /* @__PURE__ */ __name(async (reference, { includeLeft = false } = {}) => {
36242
36564
  const store = await deps.store();
@@ -36322,7 +36644,7 @@ var metadataService = /* @__PURE__ */ __name((deps) => {
36322
36644
  };
36323
36645
  }, "metadataService");
36324
36646
 
36325
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/moderation/check.js
36647
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/moderation/check.js
36326
36648
  var INVITE = /max\.ru\/join\/|(t|telegram)\.me\/(\+|joinchat\/)|tg:\/\/join/i;
36327
36649
  var LINK2 = /https?:\/\/\S+/i;
36328
36650
  var STRENGTH = { report: 0, delete: 1, remove: 2 };
@@ -36510,7 +36832,7 @@ var nextPoint = /* @__PURE__ */ __name((rows, found) => {
36510
36832
  }, "nextPoint");
36511
36833
  var someUndone = /* @__PURE__ */ __name((rows) => rows.some(undone), "someUndone");
36512
36834
 
36513
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/moderation/rules.js
36835
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/moderation/rules.js
36514
36836
  import { existsSync, readFileSync as readFileSync2 } from "node:fs";
36515
36837
  import { join as join11 } from "node:path";
36516
36838
  var RULE_ACTIONS = ["report", "delete", "remove"];
@@ -36653,7 +36975,7 @@ var assign = /* @__PURE__ */ __name((rules, key, value) => {
36653
36975
  return { ...rules, [head]: { ...rules[head], [tail]: value } };
36654
36976
  }, "assign");
36655
36977
 
36656
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/moderation/run.js
36978
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/moderation/run.js
36657
36979
  var FIRST_LOOK_MS = 24 * 36e5;
36658
36980
  var moderateWith = /* @__PURE__ */ __name(async (run) => {
36659
36981
  const { chatId, title, rules, point, since, dryRun } = run;
@@ -36690,7 +37012,7 @@ var moderateWith = /* @__PURE__ */ __name(async (run) => {
36690
37012
  return { chatId, rows, notes };
36691
37013
  }, "moderateWith");
36692
37014
 
36693
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/moderation.js
37015
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/moderation.js
36694
37016
  var moderationService = /* @__PURE__ */ __name((deps) => {
36695
37017
  const file2 = /* @__PURE__ */ __name(() => new ModerationRules(moderationPathFor(deps.messenger.app, deps.profile ?? "default", deps.env ?? process.env)), "file");
36696
37018
  const group = /* @__PURE__ */ __name(async (chat) => {
@@ -36768,7 +37090,7 @@ var moderatorOf = /* @__PURE__ */ __name((adapter, deps) => ({
36768
37090
  }, "removePerson")
36769
37091
  }), "moderatorOf");
36770
37092
 
36771
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/private-people.js
37093
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/private-people.js
36772
37094
  var noteItem = /* @__PURE__ */ __name((provider, note2) => ({
36773
37095
  id: note2.id,
36774
37096
  contact: formatReference({ type: "contact", provider, id: note2.personId }),
@@ -36812,7 +37134,7 @@ var privatePeopleService = /* @__PURE__ */ __name((deps) => {
36812
37134
  };
36813
37135
  }, "privatePeopleService");
36814
37136
 
36815
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/rankings.js
37137
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/rankings.js
36816
37138
  var empty = /* @__PURE__ */ __name(() => ({
36817
37139
  total: 0,
36818
37140
  population: 0,
@@ -37068,7 +37390,134 @@ var rankingsService = /* @__PURE__ */ __name((deps) => ({
37068
37390
  }, "evidence")
37069
37391
  }), "rankingsService");
37070
37392
 
37071
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/searches.js
37393
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/reply-stats.js
37394
+ var FIELDS = ["date", "chat", "kind"];
37395
+ var WAITING_TAIL = 100;
37396
+ var plainOnly = /* @__PURE__ */ __name((text2, command) => {
37397
+ if (text2 === void 0)
37398
+ return;
37399
+ const refuse2 = /* @__PURE__ */ __name(() => {
37400
+ throw new CliError("validation_error", `${command} reads date:, chat: and kind: terms, AND-ed \u2014 not words, other fields, OR or NOT`, { reason: "query.unsupported-field" });
37401
+ }, "refuse");
37402
+ const visit = /* @__PURE__ */ __name((node) => {
37403
+ if (node.kind === "boolean")
37404
+ for (const clause of node.clauses) {
37405
+ if (clause.occur !== "must")
37406
+ refuse2();
37407
+ visit(clause.node);
37408
+ }
37409
+ else if (!FIELDS.includes(node.field) || !["term", "phrase", "range"].includes(node.operator))
37410
+ refuse2();
37411
+ }, "visit");
37412
+ visit(parseLucene(text2, { ...MESSAGE_PARSING, defaultField: "text" }).root);
37413
+ }, "plainOnly");
37414
+ var scopeOf3 = /* @__PURE__ */ __name((root, accounts) => {
37415
+ const scope = { accounts, chats: [], kinds: [] };
37416
+ const visit = /* @__PURE__ */ __name((node) => {
37417
+ if (node.kind === "boolean") {
37418
+ for (const clause of node.clauses)
37419
+ visit(clause.node);
37420
+ return;
37421
+ }
37422
+ const { chat, date: date2 } = node.resolution ?? {};
37423
+ if (chat)
37424
+ scope.chats.push(chat);
37425
+ else if (node.field === "kind")
37426
+ scope.kinds.push(node.value.toLowerCase());
37427
+ else if (date2) {
37428
+ if (date2.lower !== void 0) {
37429
+ const lower = date2.lower + (date2.lower_inclusive ? 0 : 1);
37430
+ scope.since = Math.max(scope.since ?? lower, lower);
37431
+ }
37432
+ if (date2.upper !== void 0) {
37433
+ const upper = date2.upper - (date2.upper_inclusive ? 0 : 1);
37434
+ scope.until = Math.min(scope.until ?? upper, upper);
37435
+ }
37436
+ }
37437
+ }, "visit");
37438
+ visit(root);
37439
+ return scope;
37440
+ }, "scopeOf");
37441
+ var figuresOf = /* @__PURE__ */ __name((delays) => {
37442
+ const { medianMilliseconds, p90Milliseconds } = delayStats(delays);
37443
+ return {
37444
+ replies: delays.length,
37445
+ medianMs: medianMilliseconds,
37446
+ p90Ms: p90Milliseconds,
37447
+ meanMs: delays.length ? Math.round(delays.reduce((sum2, one2) => sum2 + one2, 0) / delays.length) : null
37448
+ };
37449
+ }, "figuresOf");
37450
+ var MINUTE2 = 6e4;
37451
+ var waitsOnOwner = /* @__PURE__ */ __name((newest) => {
37452
+ if (newest.mine)
37453
+ return false;
37454
+ if (newest.kind === "private")
37455
+ return !newest.quiet && rankingQuestion(newest.text);
37456
+ return newest.addressed || newest.ownerUsername !== null && new RegExp(`(^|[^\\w@])@${newest.ownerUsername.replace(/[^\w]/g, "\\$&")}(?!\\w)`, "i").test(newest.text);
37457
+ }, "waitsOnOwner");
37458
+ var replyStatsService = /* @__PURE__ */ __name((deps) => {
37459
+ const prepared = /* @__PURE__ */ __name(async (query, command) => {
37460
+ plainOnly(query.text, command);
37461
+ const store = await deps.store();
37462
+ const found = await prepareLucene(store, await deps.account(), {
37463
+ ...query.text === void 0 ? {} : { text: query.text },
37464
+ ...query.source === void 0 ? {} : { source: query.source },
37465
+ timezone: timezoneOf(query.timezone),
37466
+ limit: 1
37467
+ }, deps.messenger);
37468
+ return { store, timezone: found.timezone, scope: scopeOf3(found.execution.root, found.scopeAccounts) };
37469
+ }, "prepared");
37470
+ return {
37471
+ responses: /* @__PURE__ */ __name(async ({ who: who2, by, ...query }) => {
37472
+ const { store, timezone, scope } = await prepared(query, "stats messages responses");
37473
+ const delays = scope.accounts.length ? await store.queries.replyDelays(scope, who2) : [];
37474
+ const buckets = { under5m: 0, under1h: 0, under1d: 0, over1d: 0 };
37475
+ for (const { delayMs } of delays) {
37476
+ if (delayMs < 5 * MINUTE2)
37477
+ buckets.under5m++;
37478
+ else if (delayMs < 60 * MINUTE2)
37479
+ buckets.under1h++;
37480
+ else if (delayMs < 24 * 60 * MINUTE2)
37481
+ buckets.under1d++;
37482
+ else
37483
+ buckets.over1d++;
37484
+ }
37485
+ const days = /* @__PURE__ */ new Map();
37486
+ if (by === "day") {
37487
+ const keyOf5 = calendarKey(timezone, "day");
37488
+ for (const { repliedAt, delayMs } of delays) {
37489
+ const key = keyOf5(repliedAt);
37490
+ const list3 = days.get(key) ?? [];
37491
+ list3.push(delayMs);
37492
+ days.set(key, list3);
37493
+ }
37494
+ }
37495
+ return {
37496
+ who: who2,
37497
+ by,
37498
+ ...figuresOf(delays.map(({ delayMs }) => delayMs)),
37499
+ buckets,
37500
+ rows: [...days].sort(([a], [b]) => a.localeCompare(b)).map(([key, list3]) => ({ key, ...figuresOf(list3) }))
37501
+ };
37502
+ }, "responses"),
37503
+ waiting: /* @__PURE__ */ __name(async (query) => {
37504
+ const { store, scope } = await prepared(query, "stats messages waiting");
37505
+ const chats = scope.accounts.length ? await store.queries.waitingChats(scope, waitsOnOwner, WAITING_TAIL) : [];
37506
+ const firsts = chats.flatMap(({ unanswered: unanswered2 }) => unanswered2.at(-1) ?? []);
37507
+ return {
37508
+ chats: chats.length,
37509
+ messages: chats.reduce((sum2, { unanswered: unanswered2 }) => sum2 + unanswered2.length, 0),
37510
+ oldestAt: firsts.length ? new Date(firsts.reduce((low, one2) => Math.min(low, one2))).toISOString() : null,
37511
+ byKind: {
37512
+ private: chats.filter(({ kind }) => kind === "private").length,
37513
+ group: chats.filter(({ kind }) => kind === "group").length
37514
+ }
37515
+ };
37516
+ }, "waiting")
37517
+ };
37518
+ }, "replyStatsService");
37519
+
37520
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/searches.js
37072
37521
  var savedSearchItem = /* @__PURE__ */ __name((one2) => ({
37073
37522
  id: one2.id,
37074
37523
  name: one2.name,
@@ -37197,7 +37646,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
37197
37646
  };
37198
37647
  }, "searchesService");
37199
37648
 
37200
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/tags.js
37649
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/tags.js
37201
37650
  var TAGGING_QUERY = {
37202
37651
  entity: "tagging",
37203
37652
  backend: "sql",
@@ -37281,7 +37730,7 @@ var tagsService = /* @__PURE__ */ __name((deps) => {
37281
37730
  };
37282
37731
  }, "tagsService");
37283
37732
 
37284
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/topics.js
37733
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/topics.js
37285
37734
  var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden, icon }) => {
37286
37735
  const set = [closed, pinned, hidden].filter((one2) => one2 !== void 0).length;
37287
37736
  if (title !== void 0 || icon !== void 0 || set !== 1)
@@ -37480,7 +37929,7 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
37480
37929
  };
37481
37930
  }, "topicsService");
37482
37931
 
37483
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/evidence.js
37932
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/evidence.js
37484
37933
  import { createHash as createHash11, randomUUID as randomUUID5 } from "node:crypto";
37485
37934
  var hash2 = /* @__PURE__ */ __name((value) => createHash11("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
37486
37935
  var positive = /* @__PURE__ */ __name((value, name, minimum = 1) => {
@@ -37554,7 +38003,7 @@ var prepareEvidencePacket = /* @__PURE__ */ __name(({ kind, source, page, limits
37554
38003
  return { ...content, id: randomUUID5(), fingerprint: hash2(content) };
37555
38004
  }, "prepareEvidencePacket");
37556
38005
 
37557
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/evidence-read.js
38006
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/evidence-read.js
37558
38007
  var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, limit, before: before2 }, messenger = {}) => {
37559
38008
  if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
37560
38009
  throw new CliError("validation_error", "evidence message limit must be an integer from 1 to 100");
@@ -37574,7 +38023,7 @@ var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, l
37574
38023
  return { ...packet, nextBeforeId: older && last ? last.id : null };
37575
38024
  }, "readEvidencePacket");
37576
38025
 
37577
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-hit-search.js
38026
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/meeting-hit-search.js
37578
38027
  var refreshMeetingIndex = /* @__PURE__ */ __name(async (meetings, accountId, signal) => {
37579
38028
  let before2 = Number.POSITIVE_INFINITY;
37580
38029
  for (; ; ) {
@@ -37636,7 +38085,7 @@ var searchMeetingHits = /* @__PURE__ */ __name(async (store, query, request, opt
37636
38085
  return { ...result, selection };
37637
38086
  }, "searchMeetingHits");
37638
38087
 
37639
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-project-discovery.js
38088
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/meeting-project-discovery.js
37640
38089
  import { createHash as createHash12 } from "node:crypto";
37641
38090
  var scopeKeys = [
37642
38091
  "accountId",
@@ -37771,7 +38220,7 @@ var readMeetingProjectDiscovery = /* @__PURE__ */ __name(async (ports, projectNa
37771
38220
  };
37772
38221
  }, "readMeetingProjectDiscovery");
37773
38222
 
37774
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-hit-context.js
38223
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/meeting-hit-context.js
37775
38224
  import { createHash as createHash13 } from "node:crypto";
37776
38225
  var contextCue = /* @__PURE__ */ __name((cue) => ({
37777
38226
  ref: cue.reference,
@@ -37889,7 +38338,7 @@ var readMeetingHitContext = /* @__PURE__ */ __name(async (store, accountId, refe
37889
38338
  return { ...packet, fingerprint: createHash13("sha256").update(JSON.stringify(packet)).digest("hex") };
37890
38339
  }, "readMeetingHitContext");
37891
38340
 
37892
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-passage-format.js
38341
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/meeting-passage-format.js
37893
38342
  var visible = /* @__PURE__ */ __name((text2) => text2.replace(/[\p{Cc}\p{Cf}]/gu, (value) => value === "\n" || value === " " ? value : `\\u{${value.codePointAt(0)?.toString(16)}}`), "visible");
37894
38343
  var markdown = /* @__PURE__ */ __name((text2) => visible(text2).replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replace(/[\\`*_[\]#|~]/g, "\\$&"), "markdown");
37895
38344
  var timestamp = /* @__PURE__ */ __name((ms) => {
@@ -37965,7 +38414,7 @@ var readMeetingPassage = /* @__PURE__ */ __name(async (store, accountId, referen
37965
38414
  return { packet, content };
37966
38415
  }, "readMeetingPassage");
37967
38416
 
37968
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/context/communication-selection.js
38417
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/context/communication-selection.js
37969
38418
  var communicationFields = {
37970
38419
  sources: pipe(array(strictObject({
37971
38420
  id: pipe(string(), regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)),
@@ -37997,7 +38446,7 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
37997
38446
  return { ...input, after, before: before2 };
37998
38447
  }, "communicationRequest");
37999
38448
 
38000
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-preparation-validation.js
38449
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/meeting-preparation-validation.js
38001
38450
  var MEETING_PREPARATION_LIMITS = {
38002
38451
  meetings: { min: 1, max: 20, default: 5 },
38003
38452
  cues: { min: 1, max: 100, default: 10 },
@@ -38083,7 +38532,7 @@ var preparationRequest = /* @__PURE__ */ __name((accountId, externalId, original
38083
38532
  return { ...input, history };
38084
38533
  }, "preparationRequest");
38085
38534
 
38086
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-communications-preparation.js
38535
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/meeting-communications-preparation.js
38087
38536
  var readPreparationCommunications = /* @__PURE__ */ __name(async (plan, signal) => {
38088
38537
  const section = {
38089
38538
  readUsage: plan.reader.usage(),
@@ -38188,7 +38637,7 @@ var appendPreparationCommunications = /* @__PURE__ */ __name((result, read2) =>
38188
38637
  result.knowledge.coverage.otherSources = "see-communications";
38189
38638
  }, "appendPreparationCommunications");
38190
38639
 
38191
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-communications-selection.js
38640
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/meeting-communications-selection.js
38192
38641
  var captureCommunicationSelections = /* @__PURE__ */ __name((port) => {
38193
38642
  if (port === void 0)
38194
38643
  return void 0;
@@ -38293,7 +38742,7 @@ var validatePreparationCommunications = /* @__PURE__ */ __name((section, request
38293
38742
  }
38294
38743
  }, "validatePreparationCommunications");
38295
38744
 
38296
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-knowledge-preparation.js
38745
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/meeting-knowledge-preparation.js
38297
38746
  var invalid5 = /* @__PURE__ */ __name(() => {
38298
38747
  throw new CliError("invalid_response", "Preparation knowledge returned an invalid selection");
38299
38748
  }, "invalid");
@@ -38362,7 +38811,7 @@ var appendKnowledgePreparation = /* @__PURE__ */ __name(async (store, result, in
38362
38811
  }
38363
38812
  }, "appendKnowledgePreparation");
38364
38813
 
38365
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-notes-preparation.js
38814
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/meeting-notes-preparation.js
38366
38815
  var invalid6 = /* @__PURE__ */ __name(() => {
38367
38816
  throw new CliError("invalid_response", "Preparation notes returned an invalid selection");
38368
38817
  }, "invalid");
@@ -38436,7 +38885,7 @@ var appendNotesPreparation = /* @__PURE__ */ __name(async (store, result, input)
38436
38885
  }
38437
38886
  }, "appendNotesPreparation");
38438
38887
 
38439
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-project-preparation.js
38888
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/meeting-project-preparation.js
38440
38889
  var PAGE_LIMIT = 4;
38441
38890
  var size2 = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "size");
38442
38891
  var appendProjectPreparation = /* @__PURE__ */ __name(async (ports, result, input) => {
@@ -38486,7 +38935,7 @@ var appendProjectPreparation = /* @__PURE__ */ __name(async (ports, result, inpu
38486
38935
  }
38487
38936
  }, "appendProjectPreparation");
38488
38937
 
38489
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-related-preparation.js
38938
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/meeting-related-preparation.js
38490
38939
  var appendRelatedPreparation = /* @__PURE__ */ __name(async (store, result, input) => {
38491
38940
  if (!result.series || !result.items.length || result.coverage.outputLimited)
38492
38941
  return;
@@ -38558,7 +39007,7 @@ var appendRelatedPreparation = /* @__PURE__ */ __name(async (store, result, inpu
38558
39007
  }
38559
39008
  }, "appendRelatedPreparation");
38560
39009
 
38561
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-preparation.js
39010
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/meeting-preparation.js
38562
39011
  var size3 = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "size");
38563
39012
  var createMeetingPreparationService = /* @__PURE__ */ __name((scope, accountId, ports) => {
38564
39013
  const fixed = snapshotMeetingScope(scope);
@@ -38696,7 +39145,7 @@ var createMeetingPreparationService = /* @__PURE__ */ __name((scope, accountId,
38696
39145
  };
38697
39146
  }, "createMeetingPreparationService");
38698
39147
 
38699
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/package-upgrade.js
39148
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/package-upgrade.js
38700
39149
  var upgradePackage = /* @__PURE__ */ __name(async ({ current, command, packageName, check: check2 }, ports) => {
38701
39150
  const installer = ports.installer();
38702
39151
  const argv = updateCommand(installer, packageName);
@@ -38761,7 +39210,7 @@ var dayAfter = /* @__PURE__ */ __name((published) => {
38761
39210
  return Number.isNaN(time) ? null : new Date(time + 24 * 60 * 60 * 1e3).toISOString();
38762
39211
  }, "dayAfter");
38763
39212
 
38764
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/index.js
39213
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/services/index.js
38765
39214
  var servicesFor = /* @__PURE__ */ __name((deps) => {
38766
39215
  const pictures = picturesService(deps);
38767
39216
  const base = {
@@ -38771,6 +39220,7 @@ var servicesFor = /* @__PURE__ */ __name((deps) => {
38771
39220
  counters: countersService(deps),
38772
39221
  retention: retentionService(deps),
38773
39222
  rankings: rankingsService(deps),
39223
+ replyStats: replyStatsService(deps),
38774
39224
  topics: topicsService(deps),
38775
39225
  messages: withPictures(messagesService(deps), pictures),
38776
39226
  chats: chatsService(deps),
@@ -38797,7 +39247,7 @@ var servicesFor = /* @__PURE__ */ __name((deps) => {
38797
39247
  return deps.messenger.services ? { ...base, ...deps.messenger.services(base, deps) } : base;
38798
39248
  }, "servicesFor");
38799
39249
 
38800
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/background/relay.js
39250
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/background/relay.js
38801
39251
  import { createHash as createHash14 } from "node:crypto";
38802
39252
  import { chmodSync, lstatSync, mkdirSync as mkdirSync3, rmSync } from "node:fs";
38803
39253
  import { createConnection, createServer } from "node:net";
@@ -38945,7 +39395,7 @@ var serve = /* @__PURE__ */ __name(async (socket, request, stdin, signal, run) =
38945
39395
  }
38946
39396
  }, "serve");
38947
39397
 
38948
- // node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-relay.js
39398
+ // node_modules/.pnpm/@wirecat+cli-core@0.564.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_0a4d79b5da58b1179a36aa928f36b150/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-relay.js
38949
39399
  var lentConnection = /* @__PURE__ */ __name((connection, watchers) => throughWrapper(connection, {
38950
39400
  close: /* @__PURE__ */ __name(async () => {
38951
39401
  }, "close"),
@@ -39182,7 +39632,9 @@ export {
39182
39632
  REMINDERS_QUERY,
39183
39633
  previewProjectAnnotationSnapshot,
39184
39634
  snapshotProjectAnnotations,
39635
+ TASK_STATS_BY,
39185
39636
  TASK_QUERY,
39637
+ TASK_STATS_QUERY,
39186
39638
  TASK_PAIR_QUERY,
39187
39639
  CLAIM_LEASE_MS,
39188
39640
  taskTypeOf,