@wirecat/cli-memo 0.131.23 → 0.131.25

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 (222) hide show
  1. package/README.md +9 -12
  2. package/dist/app.d.ts +1 -1
  3. package/dist/bin/memo.js +2 -2
  4. package/dist/bundle/{all-profiles-VIPS6NHI.js → all-profiles-L2T7PQ7S.js} +9 -9
  5. package/dist/bundle/{anthropic-2QZHSXBA.js → anthropic-KWI2B4O2.js} +6 -6
  6. package/dist/bundle/{app-server-NTSADYGW.js → app-server-GLDIS3HE.js} +42 -42
  7. package/dist/bundle/auto-QFG57LR6.js +86 -0
  8. package/dist/bundle/{bun-KF5QK2YN.js → bun-SMKYTOGI.js} +2 -2
  9. package/dist/bundle/{bun-sqlite-XUCC2PWC.js → bun-sqlite-PKY3JXMR.js} +5 -5
  10. package/dist/bundle/{chunk-V7Y5FOYJ.js → chunk-47EZNSMD.js} +2 -2
  11. package/dist/bundle/{chunk-4QY7XOVI.js → chunk-4AONXXP2.js} +45 -26
  12. package/dist/bundle/{chunk-XRJIQC6P.js → chunk-5ANNUWNM.js} +2 -2
  13. package/dist/bundle/{chunk-QZXHMQCM.js → chunk-5GMOYTJQ.js} +1 -1
  14. package/dist/bundle/{chunk-N5L6YYYW.js → chunk-5JYB6QKS.js} +3 -15
  15. package/dist/bundle/{chunk-24P36RXS.js → chunk-5SKYUS4U.js} +484 -312
  16. package/dist/bundle/{chunk-6EZ7XGRG.js → chunk-6OP743NB.js} +2 -2
  17. package/dist/bundle/{chunk-Z6YD3YK4.js → chunk-7Y6O4UQB.js} +22 -22
  18. package/dist/bundle/{chunk-G4GEARGN.js → chunk-BNF2ZUNS.js} +9 -9
  19. package/dist/bundle/{chunk-AHFMQAJT.js → chunk-BX7DVBWD.js} +15 -12
  20. package/dist/bundle/{chunk-PDQFWOR5.js → chunk-D5ZV7PRP.js} +3 -3
  21. package/dist/bundle/{chunk-QWRBAQZ7.js → chunk-E2WPSRCI.js} +1 -1
  22. package/dist/bundle/{chunk-CCHHEMPM.js → chunk-EB2IULWB.js} +3 -2
  23. package/dist/bundle/{chunk-7PQOYNMA.js → chunk-EEVUVWHW.js} +2 -2
  24. package/dist/bundle/{chunk-GQOFHKUX.js → chunk-EFTJ4RTT.js} +6 -6
  25. package/dist/bundle/{chunk-BSDOH7DN.js → chunk-ENU2556X.js} +3 -3
  26. package/dist/bundle/{chunk-KQ5P5NLL.js → chunk-ERQHZZNF.js} +1 -1
  27. package/dist/bundle/{chunk-5WCEWK2F.js → chunk-FS3ABWVX.js} +12 -12
  28. package/dist/bundle/{chunk-JY4LVWGZ.js → chunk-G2BB5WY5.js} +15 -8
  29. package/dist/bundle/{chunk-O7OI5V7W.js → chunk-H5QHU5LZ.js} +8 -8
  30. package/dist/bundle/{chunk-AETJWLHX.js → chunk-I5LIEFQR.js} +4 -4
  31. package/dist/bundle/{chunk-JCCL7RGH.js → chunk-I7PL5WX2.js} +4 -4
  32. package/dist/bundle/{chunk-37NN65PB.js → chunk-IE27DJP3.js} +10 -10
  33. package/dist/bundle/{chunk-DIP3ENSY.js → chunk-ILUTSRU3.js} +1 -1
  34. package/dist/bundle/{chunk-DIELPPLF.js → chunk-INA5WGY7.js} +2 -2
  35. package/dist/bundle/{chunk-STZMKXK5.js → chunk-J7T6RSR5.js} +4 -4
  36. package/dist/bundle/{chunk-BSR4QZW5.js → chunk-JDDLDKC7.js} +3 -3
  37. package/dist/bundle/{chunk-MJWFSOJN.js → chunk-JLBKAIVT.js} +371 -211
  38. package/dist/bundle/{chunk-UJEO3VWA.js → chunk-JVNSHN2J.js} +1 -1
  39. package/dist/bundle/{chunk-ZCPUKUST.js → chunk-KFZGI7BU.js} +1 -1
  40. package/dist/bundle/{chunk-ILHTNOIV.js → chunk-KV4267S4.js} +1 -1
  41. package/dist/bundle/{chunk-CTT5VK66.js → chunk-LFNJ6CG6.js} +6 -6
  42. package/dist/bundle/chunk-MAUKGKRA.js +428 -0
  43. package/dist/bundle/{chunk-44NQLD5C.js → chunk-MWX7UJCL.js} +7 -7
  44. package/dist/bundle/{chunk-IJI62T4U.js → chunk-MZS3LIMW.js} +29 -29
  45. package/dist/bundle/{chunk-JDNA36EX.js → chunk-NFTWNCEL.js} +9 -9
  46. package/dist/bundle/{chunk-RE5SEGSR.js → chunk-OGMTUMB7.js} +4 -4
  47. package/dist/bundle/{chunk-QFO6K6CW.js → chunk-ON5SHKHB.js} +46 -46
  48. package/dist/bundle/{chunk-JRJIFGU2.js → chunk-PCT2CIYR.js} +5 -5
  49. package/dist/bundle/{chunk-46WO42ZW.js → chunk-POXCMAM7.js} +448 -517
  50. package/dist/bundle/{chunk-6PXE6QSQ.js → chunk-QA674BMY.js} +1 -1
  51. package/dist/bundle/{chunk-QSN5NUVL.js → chunk-QJJSMLBR.js} +3 -3
  52. package/dist/bundle/{chunk-GDGY2KIX.js → chunk-QOWGFGG3.js} +5 -5
  53. package/dist/bundle/{chunk-6I7XGWGH.js → chunk-QYDCVWD4.js} +6 -6
  54. package/dist/bundle/{chunk-NY4IKP35.js → chunk-RKLZQVKL.js} +2 -2
  55. package/dist/bundle/{chunk-FXF34MI2.js → chunk-RTII6JWI.js} +3 -3
  56. package/dist/bundle/{chunk-V5ZID7KC.js → chunk-SBMBBVXF.js} +1 -1
  57. package/dist/bundle/{chunk-H76MIWB2.js → chunk-SW5YJCHC.js} +4 -4
  58. package/dist/bundle/{chunk-YKZNFSQE.js → chunk-T3R6QHD2.js} +2 -2
  59. package/dist/bundle/{chunk-T4LW6UYQ.js → chunk-TZ7WDQPD.js} +40 -34
  60. package/dist/bundle/{chunk-R4V63U6A.js → chunk-UQS6Y2A7.js} +4 -4
  61. package/dist/bundle/{chunk-UMWR5PKA.js → chunk-UWUP3A5H.js} +13 -13
  62. package/dist/bundle/{chunk-5M4KSMYN.js → chunk-VGYXKQJE.js} +155 -81
  63. package/dist/bundle/{chunk-Z7XHH2Q5.js → chunk-VZ3K7IYC.js} +35 -17
  64. package/dist/bundle/{chunk-XTARXRP6.js → chunk-WGHQXJHL.js} +10 -10
  65. package/dist/bundle/{chunk-2IKXEL4V.js → chunk-WHVH72AD.js} +2 -2
  66. package/dist/bundle/{chunk-EW3XTUPB.js → chunk-XBIPSSKI.js} +4 -4
  67. package/dist/bundle/{chunk-L6FKTS3L.js → chunk-XFDE6AL4.js} +8 -8
  68. package/dist/bundle/{chunk-W53TRO7J.js → chunk-YMAS7U5X.js} +650 -330
  69. package/dist/bundle/{chunk-PQLBPYJR.js → chunk-YPF6OS37.js} +1 -1
  70. package/dist/bundle/{chunk-HBXZ7WIV.js → chunk-ZKZT6PCF.js} +8 -8
  71. package/dist/bundle/{chunk-CKLCJ6O7.js → chunk-ZLB2CM7Z.js} +6 -6
  72. package/dist/bundle/{chunk-4DKMYDLT.js → chunk-ZUV337F2.js} +43 -30
  73. package/dist/bundle/{chunk-BIYSJBQR.js → chunk-ZVEGLXYB.js} +4 -4
  74. package/dist/bundle/command-contract-47EKA67S.js +32 -0
  75. package/dist/bundle/{decode-LFASKQPE.js → decode-EEDEXCHR.js} +5 -5
  76. package/dist/bundle/{dispatch-MELZFYOS.js → dispatch-CU5KGRQL.js} +8 -8
  77. package/dist/bundle/{echarts-5AB3LFVD.js → echarts-36MD3UZF.js} +2 -2
  78. package/dist/bundle/{embed-6KQN523T.js → embed-R6JZ4CDW.js} +6 -6
  79. package/dist/bundle/{embedder-7SGPMINO.js → embedder-XUIOKCH6.js} +9 -9
  80. package/dist/bundle/{entry-CNZGHHZB.js → entry-WOAZRQ5F.js} +7 -7
  81. package/dist/bundle/failure-BHRE5S75.js +66 -0
  82. package/dist/bundle/{failure-RBNZBCZJ.js → failure-TUXXI6JT.js} +2 -2
  83. package/dist/bundle/{first-run-UI6UT4OR.js → first-run-3ZUSIFQJ.js} +11 -11
  84. package/dist/bundle/first-screen-WQ2IDXDP.js +30 -0
  85. package/dist/bundle/{instructions-52W6ZQTU.js → instructions-7VMPJMUM.js} +1 -1
  86. package/dist/bundle/mcp-I7LL7AJG.js +90 -0
  87. package/dist/bundle/{mcp-MNI62HHE.js → mcp-PPVOM4SE.js} +2 -2
  88. package/dist/bundle/memo.js +16 -16
  89. package/dist/bundle/{node-TL2PBNKO.js → node-SBHCG4ZC.js} +2 -2
  90. package/dist/bundle/{node-sqlite-64QIEQ37.js → node-sqlite-EMKROM5U.js} +6 -6
  91. package/dist/bundle/{oauth-GH7GLGEJ.js → oauth-OJPTUA5K.js} +7 -7
  92. package/dist/bundle/{open-PCKU5XOH.js → open-XI2AVS5B.js} +5 -5
  93. package/dist/bundle/{openai-P5QVLTF6.js → openai-NCYTRZB6.js} +10 -10
  94. package/dist/bundle/{process-PWAGP6YY.js → process-373B2EBA.js} +1 -1
  95. package/dist/bundle/{chunk-32FPXLNY.js → program-VW7IJ755.js} +9893 -2081
  96. package/dist/bundle/{prompt-FNBKJZLM.js → prompt-L3KQBPNH.js} +5 -5
  97. package/dist/bundle/{recognize-5TKRMMA2.js → recognize-GFWZX4F6.js} +4 -4
  98. package/dist/bundle/{remote-XZJ7ZAKJ.js → remote-5IGAYQBB.js} +7 -7
  99. package/dist/bundle/{rerank-JUH3QHX7.js → rerank-6HWHGDFX.js} +7 -7
  100. package/dist/bundle/{serve-JP6U3PUO.js → serve-AA7RKEOM.js} +9 -9
  101. package/dist/bundle/server-MWUCYBJF.js +61 -0
  102. package/dist/bundle/server-XEY5AKKG.js +48 -0
  103. package/dist/bundle/{server-VXI43PF5.js → server-Z6L4U6HO.js} +57 -57
  104. package/dist/bundle/{state-G4NEN2OZ.js → state-3WTPOBXR.js} +6 -6
  105. package/dist/bundle/{store-NHFLFHD5.js → store-LNP5BXUL.js} +13 -13
  106. package/dist/bundle/store-maintenance-command-6HEGTKPL.js +48 -0
  107. package/dist/bundle/update-6GWVILUX.js +69 -0
  108. package/dist/config.d.ts +2 -28
  109. package/dist/config.d.ts.map +1 -1
  110. package/dist/config.js +2 -35
  111. package/dist/config.js.map +1 -1
  112. package/dist/doctor/command.d.ts +0 -12
  113. package/dist/doctor/command.d.ts.map +1 -1
  114. package/dist/doctor/command.js +19 -24
  115. package/dist/doctor/command.js.map +1 -1
  116. package/dist/examples.d.ts.map +1 -1
  117. package/dist/examples.js +1 -8
  118. package/dist/examples.js.map +1 -1
  119. package/dist/failure.d.ts +2 -2
  120. package/dist/mail/command.d.ts.map +1 -1
  121. package/dist/mail/command.js +2 -87
  122. package/dist/mail/command.js.map +1 -1
  123. package/dist/mail/findings-command.d.ts.map +1 -1
  124. package/dist/mail/findings-command.js +1 -1
  125. package/dist/mail/findings-command.js.map +1 -1
  126. package/dist/mail/moved.d.ts +1 -1
  127. package/dist/mail/moved.d.ts.map +1 -1
  128. package/dist/mail/moved.js +3 -0
  129. package/dist/mail/moved.js.map +1 -1
  130. package/dist/mail/review-command.d.ts +1 -1
  131. package/dist/mail/review-command.d.ts.map +1 -1
  132. package/dist/program.js +1 -1
  133. package/dist/program.js.map +1 -1
  134. package/dist/read-only.d.ts +1 -1
  135. package/dist/reasons.d.ts.map +1 -1
  136. package/dist/reasons.js +1 -13
  137. package/dist/reasons.js.map +1 -1
  138. package/dist/run/auto.js +3 -3
  139. package/dist/run/auto.js.map +1 -1
  140. package/dist/run/import.d.ts +2 -2
  141. package/dist/run/import.d.ts.map +1 -1
  142. package/dist/run/import.js +24 -121
  143. package/dist/run/import.js.map +1 -1
  144. package/dist/search/command.js +1 -1
  145. package/dist/store/source-list.d.ts +1 -6
  146. package/dist/store/source-list.d.ts.map +1 -1
  147. package/dist/store/source-list.js +11 -46
  148. package/dist/store/source-list.js.map +1 -1
  149. package/dist/tasks/command.js +1 -1
  150. package/dist/tasks/command.js.map +1 -1
  151. package/dist/version.d.ts +1 -1
  152. package/dist/version.js +1 -1
  153. package/package.json +4 -4
  154. package/scenarios/set-up.md +3 -3
  155. package/skills/cli-memo/SKILL.md +13 -21
  156. package/skills/mail-triage/SKILL.md +9 -5
  157. package/dist/bundle/auto-MJWSDIMF.js +0 -86
  158. package/dist/bundle/chunk-UQA5UFJ2.js +0 -103
  159. package/dist/bundle/command-contract-XBYNZVP5.js +0 -32
  160. package/dist/bundle/failure-LJAYEPTS.js +0 -66
  161. package/dist/bundle/first-screen-3WDPZZXV.js +0 -30
  162. package/dist/bundle/mcp-JIOYIKWO.js +0 -90
  163. package/dist/bundle/program-D7OTNHGU.js +0 -10947
  164. package/dist/bundle/server-5M4YI3V4.js +0 -48
  165. package/dist/bundle/server-XAHF22CQ.js +0 -61
  166. package/dist/bundle/setup-YLI4S4TW.js +0 -973
  167. package/dist/bundle/store-maintenance-command-6UEORZWI.js +0 -48
  168. package/dist/bundle/update-6SD2JZUC.js +0 -69
  169. package/dist/mail/accounts.d.ts +0 -7
  170. package/dist/mail/accounts.d.ts.map +0 -1
  171. package/dist/mail/accounts.js +0 -28
  172. package/dist/mail/accounts.js.map +0 -1
  173. package/dist/mail/backfill-headers.d.ts +0 -11
  174. package/dist/mail/backfill-headers.d.ts.map +0 -1
  175. package/dist/mail/backfill-headers.js +0 -84
  176. package/dist/mail/backfill-headers.js.map +0 -1
  177. package/dist/mail/domain-age.d.ts +0 -26
  178. package/dist/mail/domain-age.d.ts.map +0 -1
  179. package/dist/mail/domain-age.js +0 -151
  180. package/dist/mail/domain-age.js.map +0 -1
  181. package/dist/mail/gmail.d.ts +0 -39
  182. package/dist/mail/gmail.d.ts.map +0 -1
  183. package/dist/mail/gmail.js +0 -325
  184. package/dist/mail/gmail.js.map +0 -1
  185. package/dist/mail/himalaya.d.ts +0 -22
  186. package/dist/mail/himalaya.d.ts.map +0 -1
  187. package/dist/mail/himalaya.js +0 -113
  188. package/dist/mail/himalaya.js.map +0 -1
  189. package/dist/mail/mbox.d.ts +0 -9
  190. package/dist/mail/mbox.d.ts.map +0 -1
  191. package/dist/mail/mbox.js +0 -230
  192. package/dist/mail/mbox.js.map +0 -1
  193. package/dist/mail/repair.d.ts +0 -7
  194. package/dist/mail/repair.d.ts.map +0 -1
  195. package/dist/mail/repair.js +0 -54
  196. package/dist/mail/repair.js.map +0 -1
  197. package/dist/mail/rule-store.d.ts +0 -12
  198. package/dist/mail/rule-store.d.ts.map +0 -1
  199. package/dist/mail/rule-store.js +0 -83
  200. package/dist/mail/rule-store.js.map +0 -1
  201. package/dist/mail/setup-command.d.ts +0 -4
  202. package/dist/mail/setup-command.d.ts.map +0 -1
  203. package/dist/mail/setup-command.js +0 -41
  204. package/dist/mail/setup-command.js.map +0 -1
  205. package/dist/mail/setup.d.ts +0 -19
  206. package/dist/mail/setup.d.ts.map +0 -1
  207. package/dist/mail/setup.js +0 -95
  208. package/dist/mail/setup.js.map +0 -1
  209. package/dist/mail/slices.d.ts +0 -6
  210. package/dist/mail/slices.d.ts.map +0 -1
  211. package/dist/mail/slices.js +0 -7
  212. package/dist/mail/slices.js.map +0 -1
  213. package/dist/mail/source.d.ts +0 -7
  214. package/dist/mail/source.d.ts.map +0 -1
  215. package/dist/mail/source.js +0 -119
  216. package/dist/mail/source.js.map +0 -1
  217. package/dist/mail/sync.d.ts +0 -21
  218. package/dist/mail/sync.d.ts.map +0 -1
  219. package/dist/mail/sync.js +0 -24
  220. package/dist/mail/sync.js.map +0 -1
  221. /package/dist/bundle/{chunk-NUN6OGOV.js → chunk-LU3WKZBA.js} +0 -0
  222. /package/dist/bundle/{chunk-WX2WLEEF.js → chunk-MNDLWYNQ.js} +0 -0
@@ -21,6 +21,7 @@ import {
21
21
  TASK_TYPES,
22
22
  TASK_VERDICTS,
23
23
  WORK_TASK_TYPES,
24
+ aggregateMeetingCounts,
24
25
  aggregateMeetingStats,
25
26
  calendarText,
26
27
  canonicalMeetingReference,
@@ -70,11 +71,11 @@ import {
70
71
  validateQuery,
71
72
  walkQuery,
72
73
  zonedMoment
73
- } from "./chunk-5M4KSMYN.js";
74
+ } from "./chunk-VGYXKQJE.js";
74
75
  import {
75
76
  holdsCredential,
76
77
  secretNamed
77
- } from "./chunk-6PXE6QSQ.js";
78
+ } from "./chunk-QA674BMY.js";
78
79
  import {
79
80
  DEFAULT_STEMMERS,
80
81
  DEFAULT_STEMMERS_VERSION,
@@ -87,26 +88,26 @@ import {
87
88
  fold,
88
89
  normalize,
89
90
  parseStemmers
90
- } from "./chunk-L6FKTS3L.js";
91
+ } from "./chunk-XFDE6AL4.js";
91
92
  import {
92
93
  DEFAULT_TASK_CATEGORIES,
93
94
  sharedConfigPath,
94
95
  storedTaskCategories,
95
96
  taskCategoriesReader
96
- } from "./chunk-CKLCJ6O7.js";
97
+ } from "./chunk-ZLB2CM7Z.js";
97
98
  import {
98
99
  refuseOwnerStoreInTests,
99
100
  storePath
100
- } from "./chunk-DIELPPLF.js";
101
+ } from "./chunk-INA5WGY7.js";
101
102
  import {
102
103
  quietSqliteWarning,
103
104
  storeCapable
104
- } from "./chunk-GQOFHKUX.js";
105
+ } from "./chunk-EFTJ4RTT.js";
105
106
  import {
106
107
  PRAGMAS,
107
108
  TIME_LIMIT_FUNCTION,
108
109
  TimeLimitReached
109
- } from "./chunk-DIP3ENSY.js";
110
+ } from "./chunk-ILUTSRU3.js";
110
111
  import {
111
112
  array,
112
113
  boolean,
@@ -123,7 +124,7 @@ import {
123
124
  safeParse,
124
125
  strictObject,
125
126
  string
126
- } from "./chunk-JY4LVWGZ.js";
127
+ } from "./chunk-G2BB5WY5.js";
127
128
  import {
128
129
  resolveFrom
129
130
  } from "./chunk-Y5E2WNWB.js";
@@ -131,7 +132,7 @@ import {
131
132
  CliError,
132
133
  isCliError,
133
134
  singleLine
134
- } from "./chunk-CCHHEMPM.js";
135
+ } from "./chunk-EB2IULWB.js";
135
136
  import {
136
137
  SQLiteTable,
137
138
  TableAliasProxyHandler,
@@ -156,12 +157,12 @@ import {
156
157
  sql,
157
158
  sqliteTable,
158
159
  text
159
- } from "./chunk-QWRBAQZ7.js";
160
+ } from "./chunk-E2WPSRCI.js";
160
161
  import {
161
162
  __name
162
163
  } from "./chunk-ZVVMGPBJ.js";
163
164
 
164
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/account-store.js
165
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/account-store.js
165
166
  var bindArea = /* @__PURE__ */ __name(({ keyed, whole }, account) => {
166
167
  const methods = whole;
167
168
  return Object.fromEntries(Object.keys(keyed).map((name) => [
@@ -289,7 +290,7 @@ var bindAccount = /* @__PURE__ */ __name((store, account, areas, owners) => {
289
290
  };
290
291
  }, "bindAccount");
291
292
 
292
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/locator.js
293
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/domain/locator.js
293
294
  var SCHEME = "msg:";
294
295
  var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat: chat2, message: message2 }) => SCHEME + [provider, account, chat2, message2].map(encodeURIComponent).join("/"), "formatLocator");
295
296
  var isLocator = /* @__PURE__ */ __name((reference2) => reference2.trim().startsWith(SCHEME), "isLocator");
@@ -303,7 +304,7 @@ var parseLocator = /* @__PURE__ */ __name((reference2) => {
303
304
  return { provider, account, chat: chat2, message: message2 };
304
305
  }, "parseLocator");
305
306
 
306
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/references.js
307
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/domain/references.js
307
308
  var SIMPLE_REFERENCES = [
308
309
  "note",
309
310
  "document",
@@ -450,7 +451,7 @@ var looksLikeReference = /* @__PURE__ */ __name((text6) => {
450
451
  return match !== null && byPrefix.has(match[1]);
451
452
  }, "looksLikeReference");
452
453
 
453
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/providers.js
454
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/domain/providers.js
454
455
  var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events"];
455
456
  var MESSENGER_OPENS = { chat: "messages list", message: "messages show", contact: "contacts show" };
456
457
  var PROVIDERS = [
@@ -566,7 +567,7 @@ var providerNamed = /* @__PURE__ */ __name((word) => {
566
567
  var kindIn = /* @__PURE__ */ __name((provider) => isFolderProvider(provider) ? "notes" : registry.find(({ name }) => name === provider)?.kind, "kindIn");
567
568
  var kindOf = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
568
569
 
569
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/search/query.js
570
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/search/query.js
570
571
  var isBotProvider = /* @__PURE__ */ __name((provider) => provider.endsWith("-bot"), "isBotProvider");
571
572
  var inSource = /* @__PURE__ */ __name((source2, provider) => source2 === "all" || source2 === "bots" && isBotProvider(provider) || source2 === "personal" && !isBotProvider(provider) || source2 === provider || providerNamed(source2)?.name === provider || isKind(source2) && kindOf(provider) === source2, "inSource");
572
573
  var fail = /* @__PURE__ */ __name((message2) => {
@@ -589,7 +590,7 @@ var sourceOf = /* @__PURE__ */ __name((name, value, providers2) => {
589
590
  return fail(`${name} takes ${[...sources, "messages", "mail"].join(", ")} \u2014 not "${value}"`);
590
591
  }, "sourceOf");
591
592
 
592
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/search/account-list.js
593
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/search/account-list.js
593
594
  var ACCOUNT_GROUPS = "accountGroups";
594
595
  var ACCOUNT_GROUPS_SETTING = "account_groups";
595
596
  var GROUP_NAME = /^[a-z0-9][a-z0-9_-]*$/i;
@@ -776,7 +777,7 @@ var fitting = /* @__PURE__ */ __name((entries, kinds2, what, reasonOf2 = (kind4)
776
777
  return { accounts: [...chosen.values()], skipped };
777
778
  }, "fitting");
778
779
 
779
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
780
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/core.js
780
781
  var IndexBuilderOn = class {
781
782
  static {
782
783
  __name(this, "IndexBuilderOn");
@@ -971,7 +972,7 @@ function alias(table, alias2) {
971
972
  }
972
973
  __name(alias, "alias");
973
974
 
974
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
975
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/entity-types.js
975
976
  var ENTITY_TABLES = {
976
977
  account: "accounts",
977
978
  attachment: "attachments",
@@ -1013,7 +1014,7 @@ var orphanPointers = /* @__PURE__ */ __name((database) => pointerPairs(database)
1013
1014
  return { table, pointer, type, count, known: known2 };
1014
1015
  }).filter(({ count }) => count > 0)), "orphanPointers");
1015
1016
 
1016
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
1017
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/canonical-tags.js
1017
1018
  var canonicalTags = sqliteTable("canonical_tags", {
1018
1019
  id: integer("id").primaryKey(),
1019
1020
  name: text("name").notNull().unique(),
@@ -1022,7 +1023,7 @@ var canonicalTags = sqliteTable("canonical_tags", {
1022
1023
  updatedAt: integer("updated_at").notNull()
1023
1024
  });
1024
1025
 
1025
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
1026
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-transfers.js
1026
1027
  var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
1027
1028
  sourceKey: text("source_key").notNull(),
1028
1029
  collection: text("collection").notNull(),
@@ -1032,13 +1033,13 @@ var documentAnnotationTransfers = sqliteTable("document_annotation_transfers", {
1032
1033
  createdAt: integer("created_at").notNull()
1033
1034
  }, (table) => [primaryKey({ columns: [table.sourceKey, table.collection] })]);
1034
1035
 
1035
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
1036
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/document-index-pending.js
1036
1037
  var documentIndexPending = sqliteTable("document_index_pending", {
1037
1038
  id: integer("id").notNull(),
1038
1039
  indexableType: text("indexable_type").notNull()
1039
1040
  }, (table) => [primaryKey({ columns: [table.indexableType, table.id] })]);
1040
1041
 
1041
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
1042
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/schema/tag-consolidations.js
1042
1043
  var tagRedirects = sqliteTable("tag_redirects", {
1043
1044
  sourceId: integer("source_id").primaryKey().references(() => canonicalTags.id),
1044
1045
  survivorId: integer("survivor_id").notNull().references(() => canonicalTags.id),
@@ -1064,7 +1065,7 @@ var tagConsolidations = sqliteTable("tag_consolidations", {
1064
1065
  index("tag_consolidations_by_actor_type_actor_id").on(table.actorType, table.actorId)
1065
1066
  ]);
1066
1067
 
1067
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
1068
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/schema.js
1068
1069
  var accounts = sqliteTable("accounts", {
1069
1070
  id: integer("id").primaryKey(),
1070
1071
  provider: text("provider").notNull(),
@@ -2687,7 +2688,7 @@ var storeSettings = sqliteTable("store_settings", {
2687
2688
  at: integer("at").notNull()
2688
2689
  });
2689
2690
 
2690
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
2691
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/involvement-queue.js
2691
2692
  var ARMS = [
2692
2693
  [
2693
2694
  "message",
@@ -2814,7 +2815,7 @@ var drainInvolvementQueue = /* @__PURE__ */ __name((database, cap = QUEUE_CAP) =
2814
2815
  return recomputed;
2815
2816
  }, "drainInvolvementQueue");
2816
2817
 
2817
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/mentions.js
2818
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/domain/mentions.js
2818
2819
  import { domainToUnicode } from "node:url";
2819
2820
 
2820
2821
  // node_modules/.pnpm/psl@1.15.0/node_modules/psl/dist/psl.mjs
@@ -12836,7 +12837,7 @@ var oa = /* @__PURE__ */ __name((e) => {
12836
12837
  }, "oa");
12837
12838
  var na = { parse: O, get: aa, isValid: oa };
12838
12839
 
12839
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
12840
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
12840
12841
  var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
12841
12842
  var ID = /^[\w-]{10,}$/;
12842
12843
  var trimUrl = /* @__PURE__ */ __name((url) => {
@@ -12877,7 +12878,7 @@ var googleDocumentLinks = /* @__PURE__ */ __name((text6) => [...text6.matchAll(L
12877
12878
  return { url, documentId: googleDocumentId(url) };
12878
12879
  }), "googleDocumentLinks");
12879
12880
 
12880
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
12881
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
12881
12882
  var PHONE_PLANS = [
12882
12883
  {
12883
12884
  country: "us",
@@ -13257,7 +13258,7 @@ var PHONE_PLANS = [
13257
13258
  }
13258
13259
  ];
13259
13260
 
13260
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/phones.js
13261
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/domain/phones.js
13261
13262
  var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
13262
13263
  var DEFAULT_PHONE_COUNTRIES = ["ru"];
13263
13264
  var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
@@ -13298,7 +13299,7 @@ var nationalPhone = /* @__PURE__ */ __name((digits, countries, { anyType }) => {
13298
13299
  return void 0;
13299
13300
  }, "nationalPhone");
13300
13301
 
13301
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/places.js
13302
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/domain/places.js
13302
13303
  var BEFORE = [
13303
13304
  [/^(?:ул\.?|улиц[аеыу]|улицей)$/iu, "\u0443\u043B\u0438\u0446\u0430"],
13304
13305
  [/^(?:пр-т|просп\.?|проспект[аеу]?)$/iu, "\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442"],
@@ -13558,7 +13559,7 @@ var findPlaces = /* @__PURE__ */ __name((text6) => {
13558
13559
  return found2.sort((a, b) => a.start - b.start);
13559
13560
  }, "findPlaces");
13560
13561
 
13561
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/mentions.js
13562
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/domain/mentions.js
13562
13563
  var MENTION_KINDS = ["phone", "email", "url", "document", "person-name", "place"];
13563
13564
  var MENTION_VERSIONS = {
13564
13565
  phone: 1,
@@ -13748,7 +13749,7 @@ var typedPhone = /* @__PURE__ */ __name((typed, { phoneCountries = DEFAULT_PHONE
13748
13749
  };
13749
13750
  }, "typedPhone");
13750
13751
 
13751
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/first-names.js
13752
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/domain/first-names.js
13752
13753
  var RUSSIAN = "\u0410\u043B\u0435\u043A\u0441\u0430\u043D\u0434\u0440 \u0410\u043B\u0435\u043A\u0441\u0435\u0439 \u0410\u043D\u0430\u0442\u043E\u043B\u0438\u0439 \u0410\u043D\u0434\u0440\u0435\u0439 \u0410\u043D\u0442\u043E\u043D \u0410\u0440\u043A\u0430\u0434\u0438\u0439 \u0410\u0440\u0441\u0435\u043D\u0438\u0439 \u0410\u0440\u0442\u0451\u043C \u0410\u0440\u0442\u0435\u043C \u0410\u0440\u0442\u0443\u0440 \u0411\u043E\u0440\u0438\u0441 \u0412\u0430\u0434\u0438\u043C \u0412\u0430\u043B\u0435\u043D\u0442\u0438\u043D \u0412\u0430\u043B\u0435\u0440\u0438\u0439 \u0412\u0430\u0441\u0438\u043B\u0438\u0439 \u0412\u0438\u043A\u0442\u043E\u0440 \u0412\u0438\u0442\u0430\u043B\u0438\u0439 \u0412\u043B\u0430\u0434\u0438\u043C\u0438\u0440 \u0412\u043B\u0430\u0434\u0438\u0441\u043B\u0430\u0432 \u0412\u0441\u0435\u0432\u043E\u043B\u043E\u0434 \u0412\u044F\u0447\u0435\u0441\u043B\u0430\u0432 \u0413\u0435\u043D\u043D\u0430\u0434\u0438\u0439 \u0413\u0435\u043E\u0440\u0433\u0438\u0439 \u0413\u043B\u0435\u0431 \u0413\u0440\u0438\u0433\u043E\u0440\u0438\u0439 \u0414\u0430\u043D\u0438\u0438\u043B \u0414\u0430\u043D\u0438\u043B\u0430 \u0414\u0435\u043D\u0438\u0441 \u0414\u043C\u0438\u0442\u0440\u0438\u0439 \u0415\u0432\u0433\u0435\u043D\u0438\u0439 \u0415\u0433\u043E\u0440 \u0418\u0432\u0430\u043D \u0418\u0433\u043E\u0440\u044C \u0418\u043B\u044C\u044F \u041A\u0438\u0440\u0438\u043B\u043B \u041A\u043E\u043D\u0441\u0442\u0430\u043D\u0442\u0438\u043D \u041B\u0435\u043E\u043D\u0438\u0434 \u041C\u0430\u043A\u0441\u0438\u043C \u041C\u0430\u0440\u0430\u0442 \u041C\u0430\u0442\u0432\u0435\u0439 \u041C\u0438\u0445\u0430\u0438\u043B \u041D\u0438\u043A\u0438\u0442\u0430 \u041D\u0438\u043A\u043E\u043B\u0430\u0439 \u041E\u043B\u0435\u0433 \u041F\u0430\u0432\u0435\u043B \u041F\u0451\u0442\u0440 \u041F\u0435\u0442\u0440 \u0420\u043E\u0434\u0438\u043E\u043D \u0420\u043E\u0441\u0442\u0438\u0441\u043B\u0430\u0432 \u0420\u0443\u0441\u043B\u0430\u043D \u0420\u0443\u0441\u0442\u0430\u043C \u0421\u0435\u043C\u0451\u043D \u0421\u0435\u043C\u0435\u043D \u0421\u0435\u0440\u0433\u0435\u0439 \u0421\u0442\u0430\u043D\u0438\u0441\u043B\u0430\u0432 \u0421\u0442\u0435\u043F\u0430\u043D \u0422\u0438\u043C\u043E\u0444\u0435\u0439 \u0422\u0438\u043C\u0443\u0440 \u0424\u0451\u0434\u043E\u0440 \u0424\u0435\u0434\u043E\u0440 \u0424\u0438\u043B\u0438\u043F\u043F \u042D\u0434\u0443\u0430\u0440\u0434 \u042E\u0440\u0438\u0439 \u042F\u0440\u043E\u0441\u043B\u0430\u0432 \u042F\u043A\u043E\u0432 \u042D\u043B\u044C\u0434\u0430\u0440 \u0414\u0430\u0432\u0438\u0434 \u0417\u0430\u0445\u0430\u0440 \u0421\u0430\u0432\u0435\u043B\u0438\u0439 \u041C\u0438\u0440\u043E\u043D \u041F\u043B\u0430\u0442\u043E\u043D \u0414\u0435\u043C\u0438\u0434 \u0410\u0440\u0441\u0435\u043D \u041D\u0443\u0440\u043B\u0430\u043D \u0410\u043D\u0437\u043E\u0440 \u0410\u043B\u0435\u043A\u0441\u0430\u043D\u0434\u0440\u0430 \u0410\u043B\u0438\u043D\u0430 \u0410\u043B\u0438\u0441\u0430 \u0410\u043B\u043B\u0430 \u0410\u043D\u0430\u0441\u0442\u0430\u0441\u0438\u044F \u0410\u043D\u0433\u0435\u043B\u0438\u043D\u0430 \u0410\u043D\u043D\u0430 \u0410\u043D\u0442\u043E\u043D\u0438\u043D\u0430 \u0412\u0430\u043B\u0435\u043D\u0442\u0438\u043D\u0430 \u0412\u0430\u043B\u0435\u0440\u0438\u044F \u0412\u0430\u0440\u0432\u0430\u0440\u0430 \u0412\u0435\u0440\u043E\u043D\u0438\u043A\u0430 \u0412\u0438\u043A\u0442\u043E\u0440\u0438\u044F \u0413\u0430\u043B\u0438\u043D\u0430 \u0414\u0430\u0440\u044C\u044F \u0414\u0438\u0430\u043D\u0430 \u0415\u0432\u0433\u0435\u043D\u0438\u044F \u0415\u043A\u0430\u0442\u0435\u0440\u0438\u043D\u0430 \u0415\u043B\u0435\u043D\u0430 \u0415\u043B\u0438\u0437\u0430\u0432\u0435\u0442\u0430 \u0416\u0430\u043D\u043D\u0430 \u0417\u0438\u043D\u0430\u0438\u0434\u0430 \u041A\u0430\u0440\u0438\u043D\u0430 \u041A\u0438\u0440\u0430 \u041A\u043B\u0430\u0432\u0434\u0438\u044F \u041A\u0440\u0438\u0441\u0442\u0438\u043D\u0430 \u041A\u0441\u0435\u043D\u0438\u044F \u041B\u0430\u0440\u0438\u0441\u0430 \u041B\u0438\u0434\u0438\u044F \u041B\u044E\u0434\u043C\u0438\u043B\u0430 \u041C\u0430\u0440\u0433\u0430\u0440\u0438\u0442\u0430 \u041C\u0430\u0440\u0438\u043D\u0430 \u041C\u0430\u0440\u0438\u044F \u041C\u0438\u043B\u0430\u043D\u0430 \u041D\u0430\u0442\u0430\u043B\u044C\u044F \u041D\u0430\u0442\u0430\u043B\u0438\u044F \u041D\u0438\u043D\u0430 \u041E\u043A\u0441\u0430\u043D\u0430 \u041E\u043B\u0435\u0441\u044F \u041E\u043B\u044C\u0433\u0430 \u041F\u043E\u043B\u0438\u043D\u0430 \u0420\u0430\u0438\u0441\u0430 \u0421\u0432\u0435\u0442\u043B\u0430\u043D\u0430 \u0421\u043E\u0444\u0438\u044F \u0421\u043E\u0444\u044C\u044F \u0422\u0430\u0438\u0441\u0438\u044F \u0422\u0430\u043C\u0430\u0440\u0430 \u0422\u0430\u0442\u044C\u044F\u043D\u0430 \u0423\u043B\u044C\u044F\u043D\u0430 \u042E\u043B\u0438\u044F \u042D\u043B\u044C\u0432\u0438\u0440\u0430 \u0420\u0435\u0433\u0438\u043D\u0430 \u0421\u043D\u0435\u0436\u0430\u043D\u0430 \u0410\u043B\u0451\u043D\u0430 \u0410\u043B\u0435\u043D\u0430 \u0412\u0430\u0441\u0438\u043B\u0438\u0441\u0430 \u0410\u0440\u0438\u043D\u0430 \u0415\u0441\u0435\u043D\u0438\u044F \u042D\u0432\u0435\u043B\u0438\u043D\u0430 \u0421\u0430\u0448\u0430 \u0416\u0435\u043D\u044F \u0412\u0430\u043B\u044F \u0414\u0438\u043C\u0430 \u041C\u0438\u0448\u0430 \u041A\u043E\u043B\u044F \u041F\u0435\u0442\u044F \u0412\u0430\u0441\u044F \u0421\u0435\u0440\u0451\u0436\u0430 \u0421\u0435\u0440\u0435\u0436\u0430 \u041F\u0430\u0448\u0430 \u041B\u0451\u0448\u0430 \u041B\u0435\u0448\u0430 \u0412\u0438\u0442\u044F \u041A\u043E\u0441\u0442\u044F \u0412\u043E\u0432\u0430 \u0412\u043E\u043B\u043E\u0434\u044F \u0412\u0430\u043D\u044F \u0413\u043E\u0448\u0430 \u0413\u0440\u0438\u0448\u0430 \u0422\u043E\u043B\u044F \u0411\u043E\u0440\u044F \u0421\u0442\u0430\u0441 \u0422\u0451\u043C\u0430 \u0422\u0430\u043D\u044F \u041A\u0430\u0442\u044F \u041B\u0435\u043D\u0430 \u041D\u0430\u0442\u0430\u0448\u0430 \u0421\u0432\u0435\u0442\u0430 \u042E\u043B\u044F \u041D\u0430\u0441\u0442\u044F \u0414\u0430\u0448\u0430 \u041C\u0430\u0448\u0430 \u041B\u044E\u0434\u0430 \u0413\u0430\u043B\u044F \u0412\u0438\u043A\u0430 \u041A\u0441\u044E\u0448\u0430 \u041B\u0438\u0437\u0430 \u0421\u043E\u043D\u044F \u041D\u0430\u0434\u044F \u041B\u0435\u0440\u0430 \u0410\u043B\u0451\u0448\u0430 \u0410\u043B\u0435\u0448\u0430 \u041C\u0438\u0442\u044F \u0421\u0435\u043D\u044F \u0424\u0435\u0434\u044F \u0416\u0435\u043D\u0435\u0447\u043A\u0430 \u041E\u043B\u0435\u043D\u044C\u043A\u0430 \u0422\u0430\u043D\u0435\u0447\u043A\u0430";
13753
13754
  var EUROPEAN = "James John Robert Michael William David Richard Joseph Thomas Charles Christopher Daniel Matthew Anthony Donald Steven Paul Andrew Joshua Kenneth Kevin Brian George Timothy Ronald Edward Jason Jeffrey Ryan Jacob Gary Nicholas Eric Jonathan Stephen Larry Justin Scott Brandon Benjamin Samuel Gregory Alexander Patrick Raymond Dennis Jerry Tyler Aaron Nathan Henry Peter Zachary Douglas Harold Kyle Noah Ethan Oliver Harry Lucas Liam Mary Patricia Jennifer Linda Elizabeth Barbara Susan Jessica Sarah Karen Lisa Nancy Betty Margaret Sandra Ashley Kimberly Emily Donna Michelle Carol Amanda Dorothy Melissa Deborah Stephanie Rebecca Sharon Laura Cynthia Kathleen Angela Shirley Anna Brenda Pamela Emma Nicole Helen Samantha Katherine Christine Rachel Carolyn Janet Catherine Maria Heather Diane Ruth Julie Olivia Joyce Kelly Lauren Christina Joan Evelyn Judith Megan Andrea Cheryl Hannah Jacqueline Martha Teresa Sara Madison Frances Kathryn Janice Abigail Alice Julia Judy Sophia Denise Doris Marilyn Danielle Beverly Isabella Theresa Diana Natalie Charlotte Marie Kayla Alexis Javier Carlos Antonio Manuel Francisco Juan Pedro Alejandro Miguel Rafael Pablo Sergio Fernando Jorge Luis Alberto \xC1lvaro Diego Adri\xE1n Rub\xE9n Iv\xE1n \xD3scar Andr\xE9s Ra\xFAl Enrique Vicente Joaqu\xEDn Ignacio Gonzalo Marcos V\xEDctor Jaime Alfonso Guillermo Tom\xE1s Emilio Gabriel Nicol\xE1s Mart\xEDn Jordi Josep Xavier Luc\xEDa Carmen Isabel Cristina Marta Elena Raquel Silvia Beatriz Paula Nuria N\xFAria Sonia Alicia Irene Montserrat Inmaculada Noelia Lorena Sof\xEDa Valeria Claudia Natalia Sandra Ver\xF3nica Esther Yolanda Vanesa Laia Klaus J\xFCrgen Wolfgang Stefan Andreas Matthias Markus Tobias Florian Lukas Jonas Maximilian Sebastian Dirk Sabine Ursula Petra Monika Katrin Anja Pierre Michel Philippe Alain Fran\xE7ois Christophe Laurent Olivier Julien Mathieu S\xE9bastien Guillaume Antoine Camille Nathalie Isabelle Sylvie Sophie C\xE9line Aur\xE9lie Chlo\xE9 Manon Giuseppe Giovanni Marco Luca Francesco Alessandro Matteo Lorenzo Stefano Paolo Roberto Davide Simone Federico Giulia Francesca Chiara Valentina Alessia Martina Elisa Jo\xE3o Pedro Tiago Beatriz In\xEAs Mariana Piotr Krzysztof Tomasz Marcin Agnieszka Katarzyna Ma\u0142gorzata Magdalena";
13754
13755
  var WORDS = "\u0412\u0435\u0440\u0430 \u041D\u0430\u0434\u0435\u0436\u0434\u0430 \u041B\u044E\u0431\u043E\u0432\u044C \u0421\u043B\u0430\u0432\u0430 \u0420\u043E\u043C\u0430\u043D \u0420\u043E\u0437\u0430 \u041C\u0430\u0439\u044F \u041B\u0438\u043B\u0438\u044F \u0417\u043B\u0430\u0442\u0430 \u041C\u0438\u043B\u0430 \u041D\u0438\u043A\u0430 \u041B\u0435\u0432 \u0413\u043B\u043E\u0440\u0438\u044F Will Mark Rose Grace Hope Faith Bill Frank Jack June April Summer Amber Ruby Lily Daisy Victoria Virginia Georgia Florence Sydney Chelsea Jordan Austin Dallas Mercedes Dolores Rosa Pilar Marina Esperanza Gloria Amparo Consuelo Roc\xEDo Salvador Santiago Jes\xFAs \xC1ngeles Hugo Ram\xF3n Christian Felix F\xE9lix Mario Martin Victor Pierre Paz Merc\xE8 Estrella Aurora Concepci\xF3n Remedios Soledad Milagros Angel \xC1ngel Dawn Joy Holly Ivy Iris Violet Pearl";
@@ -13756,7 +13757,7 @@ var NOT_NAMES = ["\u0436\u0435\u043D\u0430", "\u0436\u0435\u043D\u044B", "\u0436
13756
13757
  var FIRST_NAMES = [...new Set(`${RUSSIAN} ${EUROPEAN}`.split(" "))];
13757
13758
  var NAME_WORDS = WORDS.split(" ");
13758
13759
 
13759
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/person-names.js
13760
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/domain/person-names.js
13760
13761
  var LATIN_TO_CYRILLIC = {
13761
13762
  shch: "\u0449",
13762
13763
  sch: "\u0449",
@@ -13964,7 +13965,7 @@ var findUnknownNames = /* @__PURE__ */ __name((text6, stem, taken) => {
13964
13965
  return found2;
13965
13966
  }, "findUnknownNames");
13966
13967
 
13967
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/attachments.js
13968
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/domain/attachments.js
13968
13969
  var NOT_FILES = /* @__PURE__ */ new Set([
13969
13970
  "webpage",
13970
13971
  "share",
@@ -14004,7 +14005,7 @@ var matchDownloads = /* @__PURE__ */ __name((stored3, files2) => {
14004
14005
  });
14005
14006
  }, "matchDownloads");
14006
14007
 
14007
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
14008
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
14008
14009
  var QUERY_VERSION = 1;
14009
14010
  var QUERY_LIMITS2 = {
14010
14011
  ...QUERY_LIMITS,
@@ -14040,7 +14041,7 @@ function exhausted(budget) {
14040
14041
  }
14041
14042
  __name(exhausted, "exhausted");
14042
14043
 
14043
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
14044
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
14044
14045
  var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
14045
14046
  var literal2 = /* @__PURE__ */ __name((c) => ({
14046
14047
  kind: "char",
@@ -14440,7 +14441,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
14440
14441
  return out;
14441
14442
  }, "foldRegex");
14442
14443
 
14443
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
14444
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/search/lucene/presets.js
14444
14445
  var PRESET_VERSION = 1;
14445
14446
  var PRESETS = {
14446
14447
  password: {
@@ -14494,7 +14495,7 @@ var PRESETS = {
14494
14495
  }
14495
14496
  };
14496
14497
 
14497
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
14498
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/search/lucene/registry.js
14498
14499
  var FIELD_VERSION = 2;
14499
14500
  var UNITS = {
14500
14501
  "": 1,
@@ -14684,7 +14685,7 @@ var QUERY_FIELDS = [
14684
14685
  {
14685
14686
  name: "has",
14686
14687
  example: "has:file",
14687
- index: "attachments / messages_fts links",
14688
+ index: "attachments / messages_fts links / message_transcripts",
14688
14689
  aliases: [],
14689
14690
  type: "enum",
14690
14691
  operators: terms,
@@ -14703,7 +14704,8 @@ var QUERY_FIELDS = [
14703
14704
  "sticker",
14704
14705
  "contact",
14705
14706
  "location",
14706
- "poll"
14707
+ "poll",
14708
+ "transcript"
14707
14709
  ]
14708
14710
  },
14709
14711
  {
@@ -14954,12 +14956,12 @@ var validateAst = /* @__PURE__ */ __name((input) => {
14954
14956
  return validateFields(parsed3.output);
14955
14957
  }, "validateAst");
14956
14958
 
14957
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
14959
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/search/lucene/resolved.js
14958
14960
  var hasText = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "text" || node.field === "exact" : node.clauses.some(({ node: node2 }) => hasText(node2)), "hasText");
14959
14961
  var isStemmed = /* @__PURE__ */ __name((node) => node.field === "text" && (node.operator === "term" || node.operator === "phrase") && node.value !== "", "isStemmed");
14960
14962
  var hasStems = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? isStemmed(node) : node.clauses.some(({ node: node2 }) => hasStems(node2)), "hasStems");
14961
14963
 
14962
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
14964
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-links.js
14963
14965
  var LIVE = "mn.kind = 'url' AND mn.status <> 'dismissed'";
14964
14966
  var MAIL_ROWS = `SELECT mn.source_id FROM mentions mn WHERE mn.source_type = 'email' AND ${LIVE}`;
14965
14967
  var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
@@ -14983,7 +14985,7 @@ var linkMatch = /* @__PURE__ */ __name((field4, typed, mail, mentioned2) => {
14983
14985
  };
14984
14986
  }, "linkMatch");
14985
14987
 
14986
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
14988
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/phone-countries.js
14987
14989
  var SETTING = "phoneCountries";
14988
14990
  var savedPhoneCountries = /* @__PURE__ */ __name((database) => {
14989
14991
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING);
@@ -15014,7 +15016,7 @@ var valueMatch = /* @__PURE__ */ __name((database, typed) => {
15014
15016
  return { sql: "mn.value = ?", params: [phone?.value ?? normalizedValue(typed, { phoneCountries })] };
15015
15017
  }, "valueMatch");
15016
15018
 
15017
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
15019
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/domain/vocabulary.js
15018
15020
  var normalizeVocabularyName = /* @__PURE__ */ __name((input) => {
15019
15021
  if (typeof input !== "string" || input.length > 200 || /[\p{Cc}\p{Cf}]/u.test(input))
15020
15022
  throw new CliError("validation_error", "a vocabulary name takes 1\u2013200 characters without control characters");
@@ -15042,7 +15044,7 @@ var vocabularySimilarity = /* @__PURE__ */ __name((left, right) => {
15042
15044
  return 2 * intersection2 / (aa2.size + bb.size);
15043
15045
  }, "vocabularySimilarity");
15044
15046
 
15045
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
15047
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-creation.js
15046
15048
  import { createHash } from "node:crypto";
15047
15049
  var folded2 = /* @__PURE__ */ __name((name) => {
15048
15050
  try {
@@ -15108,7 +15110,7 @@ var guardTagCreation = /* @__PURE__ */ __name((context, name, kind4, by, options
15108
15110
  });
15109
15111
  }, "guardTagCreation");
15110
15112
 
15111
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
15113
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/domain/tag-redirects.js
15112
15114
  var invalid2 = /* @__PURE__ */ __name((message2) => {
15113
15115
  throw new CliError("validation_error", message2);
15114
15116
  }, "invalid");
@@ -15185,7 +15187,7 @@ var createTagRedirectIndex = /* @__PURE__ */ __name((snapshot2) => {
15185
15187
  };
15186
15188
  }, "createTagRedirectIndex");
15187
15189
 
15188
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
15190
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-resolution.js
15189
15191
  var tagCanonicalId = /* @__PURE__ */ __name((database, id2) => {
15190
15192
  const row2 = database.prepare("SELECT canonical_id FROM resolved_tags WHERE id=?").get(id2);
15191
15193
  if (!row2)
@@ -15213,7 +15215,7 @@ var tagRedirectSnapshot = /* @__PURE__ */ __name((database) => {
15213
15215
  return snapshot2;
15214
15216
  }, "tagRedirectSnapshot");
15215
15217
 
15216
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
15218
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/task-keys.js
15217
15219
  import { createHash as createHash2 } from "node:crypto";
15218
15220
  var TASK_KEY_PREFIXES = {
15219
15221
  question: "Q",
@@ -15241,7 +15243,7 @@ var taskAccountOf = /* @__PURE__ */ __name((database, rowId) => {
15241
15243
  return row2 && String(row2.key) === inboxKey(String(row2.name)) ? String(row2.name) : void 0;
15242
15244
  }, "taskAccountOf");
15243
15245
 
15244
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
15246
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/things.js
15245
15247
  var storedThing = /* @__PURE__ */ __name((type, id2) => ({ type: String(type), id: Number(id2) }), "storedThing");
15246
15248
  var REFERABLE = {
15247
15249
  note: { tombstone: true },
@@ -15405,7 +15407,7 @@ var taskIdOf = /* @__PURE__ */ __name((database, rowId) => {
15405
15407
  return row2 ? String(row2.id ?? row2.key) : void 0;
15406
15408
  }, "taskIdOf");
15407
15409
 
15408
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
15410
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/values.js
15409
15411
  var toMs = /* @__PURE__ */ __name((iso13) => {
15410
15412
  if (iso13 === null || iso13 === void 0)
15411
15413
  return null;
@@ -15419,7 +15421,7 @@ var present = /* @__PURE__ */ __name((entries) => Object.fromEntries(Object.entr
15419
15421
  var DELIVERY = { delivered: 1, read: 2 };
15420
15422
  var deliveryOf = /* @__PURE__ */ __name((stored3) => stored3 === DELIVERY.read ? "read" : stored3 === DELIVERY.delivered ? "delivered" : void 0, "deliveryOf");
15421
15423
 
15422
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
15424
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/tags.js
15423
15425
  var TAG_KINDS = ["tag", "topic"];
15424
15426
  var TAGGABLE = { chat: "chat", contact: "identity", message: "message", task: "task" };
15425
15427
  var TAG_TYPE = {
@@ -15622,7 +15624,7 @@ var tagsOf = /* @__PURE__ */ __name(({ database }, key2, filter) => {
15622
15624
  return result;
15623
15625
  }, "tagsOf");
15624
15626
 
15625
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
15627
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-fields.js
15626
15628
  var speech = /* @__PURE__ */ __name((alias2) => `(coalesce(${alias2}.extractor,'') LIKE 'speech:%' OR ${alias2}.kind IN ('voice','video_note') OR coalesce(${alias2}.mime,'')='audio/ogg')`, "speech");
15627
15629
  var SPEECH = speech("att");
15628
15630
  var mentionText = /* @__PURE__ */ __name((alias2) => `CASE WHEN coalesce(json_extract(${alias2}.contact, '$.phone'), '') <> '' THEN 'phone: ' || json_extract(${alias2}.contact, '$.phone') ELSE ${alias2}.text END`, "mentionText");
@@ -15900,6 +15902,8 @@ var PEER_KIND = "CASE WHEN json_extract(c.metadata,'$.peerKind') IN ('private','
15900
15902
  var kind2 = messengerOnly(({ value }) => always(bound(`${PEER_KIND} = ?`, value.toLowerCase())));
15901
15903
  var has = /* @__PURE__ */ __name(({ value }, { corpus, mail }) => {
15902
15904
  const wanted = value.toLowerCase();
15905
+ if (wanted === "transcript")
15906
+ return always(bound(mail ? "0" : "EXISTS (SELECT 1 FROM message_transcripts t WHERE t.message_id = m.id)"));
15903
15907
  return always(wanted === "text" ? bound("length(trim(coalesce(m.text,''))) > 0") : wanted === "link" ? bound(`(${mail ? "m.text LIKE '%' || ? || '%'" : "m.id IN (SELECT rowid FROM messages_fts WHERE messages_fts MATCH ?)"} OR EXISTS (SELECT 1 FROM attachments att WHERE att.attachable_type='${corpus.item}' AND att.attachable_id=m.id AND att.kind IN ('share','webpage')))`, mail ? "://" : quoted("://")) : wanted === "attachment" ? bound(`EXISTS (SELECT 1 FROM attachments att WHERE att.attachable_type='${corpus.item}' AND att.attachable_id=m.id)`) : bound(`EXISTS (SELECT 1 FROM attachments att WHERE att.attachable_type='${corpus.item}' AND att.attachable_id=m.id AND att.kind IN (${storedKinds(wanted).map(() => "?").join(",")}))`, ...storedKinds(wanted)));
15904
15908
  }, "has");
15905
15909
  var inSourceField = /* @__PURE__ */ __name(({ value }, { execution }) => {
@@ -15984,7 +15988,7 @@ var FIELD_COMPILERS = {
15984
15988
  subject
15985
15989
  };
15986
15990
 
15987
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
15991
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/place-key.js
15988
15992
  var placeOf = /* @__PURE__ */ __name((database) => {
15989
15993
  const exact = database.prepare("SELECT id FROM places WHERE folded = ?");
15990
15994
  const onStreet = database.prepare("SELECT id FROM places WHERE substr(folded, 1, ?) = ? LIMIT 2");
@@ -16000,7 +16004,7 @@ var placeOf = /* @__PURE__ */ __name((database) => {
16000
16004
  };
16001
16005
  }, "placeOf");
16002
16006
 
16003
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
16007
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-drain.js
16004
16008
  var DRAIN_ON_WRITE = 500;
16005
16009
  var METHOD = "rules";
16006
16010
  var telegramLink = /* @__PURE__ */ __name((database) => {
@@ -16163,7 +16167,7 @@ var drainMentions = /* @__PURE__ */ __name((database, now2, limit = DRAIN_ON_WRI
16163
16167
  return queued.length;
16164
16168
  }, "drainMentions");
16165
16169
 
16166
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
16170
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/index-state.js
16167
16171
  var indexRow = /* @__PURE__ */ __name((database, name) => {
16168
16172
  const exists2 = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'search_index_state'").get();
16169
16173
  if (!exists2)
@@ -16171,7 +16175,7 @@ var indexRow = /* @__PURE__ */ __name((database, name) => {
16171
16175
  return database.prepare("SELECT * FROM search_index_state WHERE name = ?").get(name);
16172
16176
  }, "indexRow");
16173
16177
 
16174
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
16178
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/stems.js
16175
16179
  var INDEX = "message_stems";
16176
16180
  var SETTING2 = "searchStemmers";
16177
16181
  var DRAIN_ON_WRITE2 = 500;
@@ -16293,7 +16297,7 @@ var stemmerCache = /* @__PURE__ */ __name(() => {
16293
16297
  };
16294
16298
  }, "stemmerCache");
16295
16299
 
16296
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
16300
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/transaction.js
16297
16301
  var SQLITE_BUSY = 5;
16298
16302
  var pause = new Int32Array(new SharedArrayBuffer(4));
16299
16303
  var isBusy = /* @__PURE__ */ __name((error) => {
@@ -16388,7 +16392,7 @@ var read = /* @__PURE__ */ __name((database, body2) => {
16388
16392
  }
16389
16393
  }, "read");
16390
16394
 
16391
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
16395
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/vector-index.js
16392
16396
  var source = /* @__PURE__ */ __name((model, dims) => `SELECT k.id, k.chunkable_type,
16393
16397
  coalesce(CASE k.chunkable_type
16394
16398
  WHEN 'image' THEN (SELECT ch.account_id FROM attachments a JOIN messages m ON m.id = a.attachable_id
@@ -16530,7 +16534,7 @@ var dropUnusedVectors = /* @__PURE__ */ __name((database, hashes) => {
16530
16534
  }, "dropUnusedVectors");
16531
16535
  var dropAllUnusedVectors = /* @__PURE__ */ __name((database) => database.prepare("DELETE FROM embeddings WHERE NOT EXISTS (SELECT 1 FROM chunks k WHERE k.content_hash = embeddings.content_hash) RETURNING 1").all().length, "dropAllUnusedVectors");
16532
16536
 
16533
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
16537
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/accounts.js
16534
16538
  var accountPk = /* @__PURE__ */ __name(({ orm, now: now2 }, { provider, account, scope: scope3 }, name = null) => Number(orm.insert(accounts).values({ provider, externalId: account, name, scope: scope3 ?? "personal", createdAt: now2(), updatedAt: now2() }).onConflictDoUpdate({
16535
16539
  target: [accounts.provider, accounts.externalId],
16536
16540
  set: {
@@ -16639,7 +16643,7 @@ var dropOrphanPeople = /* @__PURE__ */ __name((database, unseenBefore) => {
16639
16643
  AND id NOT IN (SELECT id FROM (${referencesTo(database, "persons", /* @__PURE__ */ new Set(["identity_links"]))}) WHERE id IS NOT NULL)`).run(JSON.stringify(persons2));
16640
16644
  }, "dropOrphanPeople");
16641
16645
 
16642
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
16646
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/folded.js
16643
16647
  var FOLDED = [
16644
16648
  { table: "tasks", column: "title" },
16645
16649
  { table: "tasks", column: "close_reason" },
@@ -16676,7 +16680,7 @@ var fillFolded = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
16676
16680
  return filled2;
16677
16681
  }, "fillFolded");
16678
16682
 
16679
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
16683
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/history-skips.js
16680
16684
  var HISTORY_KEY = "$history";
16681
16685
  var objectOf = /* @__PURE__ */ __name((text6) => {
16682
16686
  if (typeof text6 !== "string")
@@ -16752,7 +16756,7 @@ var withoutHistory = /* @__PURE__ */ __name((metadata3) => {
16752
16756
  return rest;
16753
16757
  }, "withoutHistory");
16754
16758
 
16755
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
16759
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/conversations/chunks.js
16756
16760
  import { createHash as createHash3 } from "node:crypto";
16757
16761
  var CHUNK_CHARS = 1200;
16758
16762
  var CHUNK_OVERLAP = 150;
@@ -16857,7 +16861,7 @@ var cutChunks = /* @__PURE__ */ __name((members2, limit = CHUNK_CHARS, check3, c
16857
16861
  return chunks2;
16858
16862
  }, "cutChunks");
16859
16863
 
16860
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/search/task-signature.js
16864
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/search/task-signature.js
16861
16865
  var DAY = 864e5;
16862
16866
  var CURRENCY = [
16863
16867
  [/^(₽|руб.*|р\.?|rub)$/u, "RUB"],
@@ -16983,7 +16987,7 @@ var dueDayOf = /* @__PURE__ */ __name((text6, createdMs) => {
16983
16987
  return best?.day ?? null;
16984
16988
  }, "dueDayOf");
16985
16989
 
16986
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
16990
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/search/task-similarity.js
16987
16991
  var DAY2 = 864e5;
16988
16992
  var STOP_WORDS = new Set([
16989
16993
  // Russian and English as the test set ran them, already folded (пожалуйста → пожалуиста).
@@ -17138,7 +17142,7 @@ var rankCandidates = /* @__PURE__ */ __name((views, candidates) => candidates.ma
17138
17142
  ...compareViews(subjectViews ?? views, candidate, replyChain === void 0 ? {} : { replyChain })
17139
17143
  })).sort((a, b) => b.score - a.score), "rankCandidates");
17140
17144
 
17141
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
17145
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/vectors.js
17142
17146
  var currentChunks = /* @__PURE__ */ __name((chatKey) => sql`SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
17143
17147
  r.last_message_id, r.text_start, r.text_end FROM chunks k JOIN chunk_messages r ON r.chunk_id = k.id
17144
17148
  JOIN conversations c ON k.chunkable_type = 'conversation' AND c.id = k.chunkable_id
@@ -17409,7 +17413,7 @@ var readiness = /* @__PURE__ */ __name(({ orm }, chatKey, model) => {
17409
17413
  };
17410
17414
  }, "readiness");
17411
17415
 
17412
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
17416
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/document-pictures.js
17413
17417
  var DOCUMENT_PICTURE = "document_picture";
17414
17418
  var SCAN_PAGE2 = 5e3;
17415
17419
  var idOf = /* @__PURE__ */ __name((ref3) => {
@@ -17472,7 +17476,7 @@ var documentPicturesOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
17472
17476
  }, "nearestPictures")
17473
17477
  }), "documentPicturesOver");
17474
17478
 
17475
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
17479
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/query-filter.js
17476
17480
  var glob = /* @__PURE__ */ __name((value) => [...fold(value).matchAll(/\\(.)|([*?])|(.)/gsu)].map(([, escaped2, wildcard, plain2]) => {
17477
17481
  const literal4 = escaped2 ?? plain2 ?? "";
17478
17482
  return wildcard ?? (/[*?[]/u.test(literal4) ? `[${literal4}]` : literal4);
@@ -17537,7 +17541,7 @@ var compile = /* @__PURE__ */ __name((node, columns, options) => {
17537
17541
  var queryFilter = /* @__PURE__ */ __name((ast, columns, options = {}) => compile(ast.root, columns, options), "queryFilter");
17538
17542
  var bound2 = /* @__PURE__ */ __name(({ sql: text6, params }) => sql.join(text6.split("?").map((part, at) => at < params.length ? sql`${sql.raw(part)}${params[at]}` : sql.raw(part)), sql``), "bound");
17539
17543
 
17540
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
17544
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/events.js
17541
17545
  var toJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.stringify(value), "toJson");
17542
17546
  var fromJson = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : JSON.parse(String(value)), "fromJson");
17543
17547
  var int = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "int");
@@ -17627,7 +17631,7 @@ var linkMeeting = /* @__PURE__ */ __name((database, id2, eventId, now2, mode = "
17627
17631
  });
17628
17632
  }, "linkMeeting");
17629
17633
 
17630
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
17634
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/note-index.js
17631
17635
  var EVENT_TEXT = "trim(coalesce(e.description, '') || ' ' || coalesce(e.location, '') || ' ' || coalesce((SELECT group_concat(p.name, ' ') FROM calendar_entries ce JOIN calendar_entry_participants p ON p.entry_id = ce.id WHERE ce.event_id = e.id AND ce.deleted_at IS NULL AND p.resource = 0 AND p.name IS NOT NULL), ''))";
17632
17636
  var UNSEARCHED_EVENT_TYPES = [
17633
17637
  "working-location",
@@ -17857,7 +17861,7 @@ var resetNoteIndex = /* @__PURE__ */ __name((database) => {
17857
17861
  return true;
17858
17862
  }, "resetNoteIndex");
17859
17863
 
17860
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
17864
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/person-resolution.js
17861
17865
  var keyOf3 = /* @__PURE__ */ __name((name) => fold(name).trim().replace(/^@/, ""), "keyOf");
17862
17866
  var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
17863
17867
  for (const key2 of new Set(names.filter((name) => !!name?.trim()).map(keyOf3))) {
@@ -17876,7 +17880,7 @@ var resolvePersonLinks = /* @__PURE__ */ __name((database, names) => {
17876
17880
  }
17877
17881
  }, "resolvePersonLinks");
17878
17882
 
17879
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
17883
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/identities.js
17880
17884
  var flag2 = /* @__PURE__ */ __name((value) => value === void 0 || value === null ? null : Number(value), "flag");
17881
17885
  var prepare = /* @__PURE__ */ __name((orm) => ({
17882
17886
  find: orm.select({
@@ -18101,7 +18105,7 @@ var meetingIdentityPk = /* @__PURE__ */ __name((context, accountId, identity) =>
18101
18105
  }, "meetingIdentityPk");
18102
18106
  var phoneOf = /* @__PURE__ */ __name(({ orm }, provider, nativeId) => orm.select({ phone: identities.phone }).from(identities).where(and(eq(identities.provider, provider), eq(identities.externalId, nativeId))).get()?.phone ?? null, "phoneOf");
18103
18107
 
18104
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
18108
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/chats.js
18105
18109
  var chatOf = /* @__PURE__ */ __name(({ orm }, accountKey, chatKey) => orm.select({ id: chats.externalId }).from(chats).where(and(eq(chats.id, chatKey), eq(chats.accountId, accountKey))).get()?.id, "chatOf");
18106
18110
  var findChatPk = /* @__PURE__ */ __name(({ orm }, accountKey, chatId) => orm.select({ pk: chats.id }).from(chats).where(and(eq(chats.accountId, accountKey), eq(chats.externalId, chatId))).get()?.pk, "findChatPk");
18107
18111
  var chatPkFor = /* @__PURE__ */ __name((context, accountKey, chatId) => findChatPk(context, accountKey, chatId) ?? Number(context.orm.insert(chats).values({
@@ -18381,7 +18385,7 @@ var replaceAutoTags = /* @__PURE__ */ __name((context, key2, chatId, algorithm,
18381
18385
  }
18382
18386
  }, "replaceAutoTags");
18383
18387
 
18384
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/counters.js
18388
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/domain/counters.js
18385
18389
  var COUNTER_FIELDS = ["views", "reactions", "comments"];
18386
18390
  var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
18387
18391
  var counterObservationTime = /* @__PURE__ */ __name((observation, now2) => {
@@ -18400,7 +18404,7 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
18400
18404
  return states.some((one2) => one2.freshness === "stale") ? "stale" : "fresh";
18401
18405
  }, "counterFreshness");
18402
18406
 
18403
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/context/evidence.js
18407
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/context/evidence.js
18404
18408
  import { createHash as createHash4 } from "node:crypto";
18405
18409
  var CONTEXT_MAX_READ_BYTES = 262144;
18406
18410
  var CONTEXT_SOURCE_KINDS = ["message", "mail", "document", "meeting"];
@@ -18498,7 +18502,7 @@ var contextEvidenceRequest = /* @__PURE__ */ __name((input) => {
18498
18502
  return { source: source2, query, chat: chat2, senders, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal: input.signal };
18499
18503
  }, "contextEvidenceRequest");
18500
18504
 
18501
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
18505
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/email-activity.js
18502
18506
  var MAIL_AGENDA_COLUMNS = { chat_kind: { type: "enum", sql: "'dialog'" } };
18503
18507
  var ACTIVITY = `
18504
18508
  SELECT t.external_id AS thread, t.subject, t.last_email_at, t.emails_count,
@@ -18614,7 +18618,7 @@ var mailActivity = /* @__PURE__ */ __name((database) => ({
18614
18618
  threadActivity: /* @__PURE__ */ __name(async (accountId, since, where) => threadActivity(database, accountId, since, where), "threadActivity")
18615
18619
  }), "mailActivity");
18616
18620
 
18617
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
18621
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/conversations/mail-text.js
18618
18622
  var GREETING = new RegExp("^(hi|hello|hey|dear|greetings|good (morning|afternoon|evening)|\u043F\u0440\u0438\u0432\u0435\u0442|\u0437\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439(\u0442\u0435)?|\u0434\u043E\u0431\u0440(\u044B\u0439|\u043E\u0435|\u043E\u0433\u043E) (\u0434\u0435\u043D\u044C|\u0432\u0435\u0447\u0435\u0440|\u0443\u0442\u0440\u043E|\u0443\u0442\u0440\u0430|\u0434\u043D\u044F)|hola|buen(os|as) (d\xEDas|dias|tardes|noches)|estimad[oa]s?|querid[oa]s?)(?![\\p{L}\\p{N}])([\\s,]+\\p{L}[\\p{L}.'\u2019-]*){0,3}\\s*[,!.:]?$", "iu");
18619
18623
  var SIGN_OFF = /^(best|best regards|best wishes|kind regards|warm regards|regards|thanks|thanks again|thanks a lot|thank you|many thanks|cheers|sincerely|yours|yours truly|yours sincerely|br|с уважением|спасибо|заранее спасибо|всего доброго|всего хорошего|un saludo|saludos|saludos cordiales|atentamente|gracias|muchas gracias)[\s,.!]*$/iu;
18620
18624
  var ATTRIBUTION = /(wrote|написал[аи]?|escribió|a écrit|schrieb)\s*:\s*$/iu;
@@ -18694,8 +18698,68 @@ var mailCore = /* @__PURE__ */ __name((body2, earlier) => {
18694
18698
  const kept = trimEdges(lines.filter((_, i) => !drop.has(i)));
18695
18699
  return withoutSignOff(withoutGreeting(kept)).join("\n").trim();
18696
18700
  }, "mailCore");
18697
-
18698
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
18701
+ var QUOTED = /^\s*>/;
18702
+ var ATTRIBUTION_END = /(wrote|написал(\(а\)|а|и)?|escribió|a écrit|schrieb\s.+|<[^<>\s]+@[^<>\s]+>)\s*:\s*$/iu;
18703
+ var ATTRIBUTION_START = /^(on|le|am|el|в)\s/iu;
18704
+ var DATED = /^(on|le|am|el|в|\d)/iu;
18705
+ var ORIGINAL = /^-{2,}\s*(original message|ursprüngliche nachricht|message d'origine|mensaje original|исходное сообщение)\s*-{2,}$/iu;
18706
+ var FROM_LINE = /^(from|von|de|от)\s?:\s*\S/iu;
18707
+ var DATE_LINE = /^(sent|date|gesendet|datum|envoyé|enviado|fecha|отправлено|дата)\s?:/iu;
18708
+ var FORWARD = /^(-{2,}\s*(forwarded message|weitergeleitete nachricht|message transféré|mensaje reenviado|пересылаемое сообщение)\s*-{2,}|begin forwarded message:)$/iu;
18709
+ var RULE = /^_{5,}$/;
18710
+ var MOBILE = /^(sent from my |von meinem .+ gesendet$|envoyé de mon |отправлено с |enviado desde mi )/iu;
18711
+ var attributionAt = /* @__PURE__ */ __name((lines, i) => {
18712
+ const line = (lines[i] ?? "").trim();
18713
+ if (!ATTRIBUTION_END.test(line))
18714
+ return -1;
18715
+ const prior = (lines[i - 1] ?? "").trim();
18716
+ return prior && ATTRIBUTION_START.test(prior) && !ATTRIBUTION_START.test(line) ? i - 1 : i;
18717
+ }, "attributionAt");
18718
+ var outlookAt = /* @__PURE__ */ __name((lines, i) => {
18719
+ const line = (lines[i] ?? "").trim();
18720
+ if (ORIGINAL.test(line))
18721
+ return true;
18722
+ return FROM_LINE.test(line) && lines.slice(i + 1, i + 4).some((next) => DATE_LINE.test(next.trim()));
18723
+ }, "outlookAt");
18724
+ var nextText = /* @__PURE__ */ __name((lines, from2) => lines.slice(from2).find((line) => line.trim()) ?? "", "nextText");
18725
+ var ownLines = /* @__PURE__ */ __name((lines) => {
18726
+ const kept = [];
18727
+ for (let i = 0; i < lines.length; i++) {
18728
+ const line = lines[i] ?? "";
18729
+ if (QUOTED.test(line))
18730
+ continue;
18731
+ if (outlookAt(lines, i)) {
18732
+ const last = kept.findLastIndex((one2) => one2.trim());
18733
+ return last !== -1 && RULE.test((kept[last] ?? "").trim()) ? kept.slice(0, last) : kept;
18734
+ }
18735
+ const start = attributionAt(lines, i);
18736
+ if (start === -1) {
18737
+ kept.push(line);
18738
+ continue;
18739
+ }
18740
+ if (start < i)
18741
+ kept.pop();
18742
+ if (QUOTED.test(nextText(lines, i + 1)))
18743
+ continue;
18744
+ const header = lines.slice(start, i + 1).join(" ").trim();
18745
+ if (/\d/.test(header) && (header.includes("@") || DATED.test(header)) && header.length <= 300)
18746
+ return kept;
18747
+ if (start < i)
18748
+ kept.push(lines[start] ?? "");
18749
+ kept.push(line);
18750
+ }
18751
+ return kept;
18752
+ }, "ownLines");
18753
+ var mailOwnText = /* @__PURE__ */ __name((body2) => {
18754
+ const lines = body2.replace(/\r\n?/g, "\n").split("\n");
18755
+ const forward = lines.findIndex((line) => FORWARD.test(line.trim()));
18756
+ const head = forward === -1 ? lines : lines.slice(0, forward);
18757
+ const own = withoutSignOff(trimEdges(ownLines(head).filter((line) => !MOBILE.test(line.trim()))));
18758
+ const text6 = [...own, ...forward === -1 ? [] : ["", ...lines.slice(forward)]].join("\n").trim();
18759
+ return text6 || body2.trim();
18760
+ }, "mailOwnText");
18761
+
18762
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/email-index.js
18699
18763
  var titleOf = /* @__PURE__ */ __name((subject2) => subject2?.replace(/^\s*((re|fwd?|aw|wg)\s*:\s*)+/i, "").trim() || null, "titleOf");
18700
18764
  var MAIL_PIECES = `(SELECT k.id, k.content_hash, k.chunkable_type AS type, k.chunkable_id AS owner, k.position,
18701
18765
  k.start_offset, k.end_offset, k.account_id, k.occurred_at, a.attachable_id AS email_id,
@@ -18805,7 +18869,7 @@ var drainEmailIndex = /* @__PURE__ */ __name((database, stemmerFor2) => {
18805
18869
  return emails3 + threads;
18806
18870
  }, "drainEmailIndex");
18807
18871
 
18808
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
18872
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/email-locations.js
18809
18873
  var locate = /* @__PURE__ */ __name((database, accountId, emailId, where) => database.prepare(`INSERT OR REPLACE INTO email_locations (mailbox_id, uidvalidity, uid, email_id)
18810
18874
  SELECT id, ?, ?, ? FROM mailboxes WHERE account_id = ? AND external_id = ?`).run(where.uidvalidity, where.uid, emailId, accountId, where.folder), "locate");
18811
18875
  var folderEmails = /* @__PURE__ */ __name((database, accountId, folder, uidvalidity) => database.prepare(`SELECT l.uid, e.external_id, coalesce(e.received_at, e.sent_at) AS at, e.read, e.flagged,
@@ -18903,7 +18967,7 @@ var forgetLocations = /* @__PURE__ */ __name((database, accountId, folder, uidva
18903
18967
  var backfillSentAt = /* @__PURE__ */ __name((database, accountId, limit) => Number(database.prepare(`UPDATE emails SET sent_at = received_at WHERE id IN (
18904
18968
  SELECT id FROM emails WHERE account_id = ? AND sent_at IS NULL AND received_at IS NOT NULL LIMIT ?)`).run(accountId, limit).changes), "backfillSentAt");
18905
18969
 
18906
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
18970
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/email-state.js
18907
18971
  var recountEmailThread = /* @__PURE__ */ __name((database, threadId, now2) => database.prepare(`UPDATE email_threads SET
18908
18972
  emails_count = (SELECT count(*) FROM emails WHERE email_thread_id = ? AND deleted_at IS NULL),
18909
18973
  last_email_at = (SELECT max(coalesce(sent_at, received_at)) FROM emails
@@ -18953,7 +19017,7 @@ var markEmailsRestored = /* @__PURE__ */ __name((database, accountId, externalId
18953
19017
  return threads.length;
18954
19018
  }, "markEmailsRestored");
18955
19019
 
18956
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
19020
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-rules.js
18957
19021
  var sorted = /* @__PURE__ */ __name((value) => Array.isArray(value) ? value.map(sorted) : value !== null && typeof value === "object" ? Object.fromEntries(Object.keys(value).sort().map((key2) => [key2, sorted(value[key2])])) : value, "sorted");
18958
19022
  var conditionsKey = /* @__PURE__ */ __name((conditions) => JSON.stringify(sorted(conditions)), "conditionsKey");
18959
19023
  var ruleOf = /* @__PURE__ */ __name((row2) => ({
@@ -19020,7 +19084,7 @@ var mailRulesOver = /* @__PURE__ */ __name((database) => ({
19020
19084
  }
19021
19085
  }), "mailRulesOver");
19022
19086
 
19023
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
19087
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/link-reviews.js
19024
19088
  var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates, reason, now2) => {
19025
19089
  database.prepare(`INSERT INTO link_reviews (linkable_type, linkable_id, entity_type, candidates, reason, status, created_at, updated_at)
19026
19090
  VALUES (?, ?, ?, ?, ?, 'open', ?, ?)
@@ -19028,7 +19092,7 @@ var reviewLink = /* @__PURE__ */ __name((database, linkable, entity, candidates,
19028
19092
  reason = excluded.reason, updated_at = excluded.updated_at WHERE link_reviews.status = 'open'`).run(linkable.type, linkable.id, entity, JSON.stringify([...candidates].sort((a, b) => a - b)), reason, now2, now2);
19029
19093
  }, "reviewLink");
19030
19094
 
19031
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
19095
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-operation.js
19032
19096
  function checkMeetingCancelled(signal) {
19033
19097
  if (!signal?.aborted)
19034
19098
  return;
@@ -19039,7 +19103,7 @@ function checkMeetingCancelled(signal) {
19039
19103
  }
19040
19104
  __name(checkMeetingCancelled, "checkMeetingCancelled");
19041
19105
 
19042
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
19106
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-values.js
19043
19107
  var meetingOf = /* @__PURE__ */ __name((row2) => ({
19044
19108
  id: Number(row2.id),
19045
19109
  accountId: Number(row2.account_id),
@@ -19089,7 +19153,7 @@ var transcriptRowOf = /* @__PURE__ */ __name((row2) => ({
19089
19153
  createdAt: Number(row2.created_at)
19090
19154
  }), "transcriptRowOf");
19091
19155
 
19092
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
19156
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-reads.js
19093
19157
  var MEETING_TEXT = ["external_id", "title", "description", "location", "join_url", "timezone", "metadata"];
19094
19158
  var TRANSCRIPT_TEXT = ["source", "format", "language", "content_hash", "metadata"];
19095
19159
  var ROW_TEXT = ["speaker_name", "text", "normalized_text", "metadata"];
@@ -19256,7 +19320,7 @@ var meetingReadsOver = /* @__PURE__ */ __name(({ database }) => ({
19256
19320
  }
19257
19321
  }), "meetingReadsOver");
19258
19322
 
19259
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
19323
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-selection.js
19260
19324
  var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
19261
19325
  const clauses = ["m.account_id=?", "m.deleted_at IS NULL"];
19262
19326
  const params = [input.accountId];
@@ -19299,7 +19363,7 @@ var meetingSelectionSql = /* @__PURE__ */ __name((input) => {
19299
19363
  return { clauses, params };
19300
19364
  }, "meetingSelectionSql");
19301
19365
 
19302
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
19366
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-chat-lines.js
19303
19367
  var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
19304
19368
  async meetingChatLines(input) {
19305
19369
  checkMeetingCancelled(input.signal);
@@ -19327,7 +19391,7 @@ var meetingChatLinesOver = /* @__PURE__ */ __name(({ database }) => ({
19327
19391
  }
19328
19392
  }), "meetingChatLinesOver");
19329
19393
 
19330
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
19394
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/reads.js
19331
19395
  var MESSAGE_FIELDS = {
19332
19396
  pk: messages.id,
19333
19397
  nativeId: messages.externalId,
@@ -19498,7 +19562,7 @@ var chatActivity = /* @__PURE__ */ __name(({ database }, accountKey, since, wher
19498
19562
  storedAt: toIso(Number(database.prepare("SELECT max(created_at) AS at FROM messages WHERE account_id = ?").get(accountKey)?.at) || null)
19499
19563
  }), "chatActivity");
19500
19564
 
19501
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
19565
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/search.js
19502
19566
  var HIT_FIELDS = {
19503
19567
  ...MESSAGE_FIELDS,
19504
19568
  chatTitle: sql`${chats.title}`.as("chat_title"),
@@ -19597,7 +19661,7 @@ var directReplies = /* @__PURE__ */ __name((context, parents, limit) => {
19597
19661
  };
19598
19662
  }, "directReplies");
19599
19663
 
19600
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
19664
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/person-links.js
19601
19665
  var identityRow = /* @__PURE__ */ __name(({ orm }, { provider, id: id2 }) => orm.select({ pk: identities.id, personPk: identityLinks.personId }).from(identities).innerJoin(identityLinks, eq(identityLinks.identityId, identities.id)).where(and(eq(identities.provider, provider), eq(identities.externalId, id2))).get(), "identityRow");
19602
19666
  var required = /* @__PURE__ */ __name((context, ref3) => {
19603
19667
  const found2 = identityRow(context, ref3);
@@ -19728,7 +19792,7 @@ var mentioning = /* @__PURE__ */ __name((context, accountKey, { id: id2, usernam
19728
19792
  }, "mentioning");
19729
19793
  var escaped = /* @__PURE__ */ __name((text6) => text6.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
19730
19794
 
19731
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
19795
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-context-links.js
19732
19796
  var missing2 = /* @__PURE__ */ __name(() => {
19733
19797
  throw new CliError("not_found", "Meeting, participant or selected target not found");
19734
19798
  }, "missing");
@@ -19850,7 +19914,7 @@ function meetingContextLinksOver(context) {
19850
19914
  }
19851
19915
  __name(meetingContextLinksOver, "meetingContextLinksOver");
19852
19916
 
19853
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
19917
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-index-values.js
19854
19918
  var INDEX_CODES = { meeting_transcript_row: 1, meeting_chat_message: 2, meeting_summary: 3 };
19855
19919
  var meetingRowid = /* @__PURE__ */ __name((type, id2) => id2 * 4 + INDEX_CODES[type], "meetingRowid");
19856
19920
  var summaryOf = /* @__PURE__ */ __name((row2) => ({
@@ -19879,7 +19943,7 @@ var indexedText = /* @__PURE__ */ __name((database, type, id2) => {
19879
19943
  return row2 ? summaryText(summaryOf(row2)) : null;
19880
19944
  }, "indexedText");
19881
19945
 
19882
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
19946
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stem-state.js
19883
19947
  var summaryBytes = ["title", "overview", "sections", "next_steps", "content"].map((key2) => `coalesce(length(CAST(s.${key2} AS BLOB)),0)`).join("+");
19884
19948
  var meetingCurrentIndexRows = `
19885
19949
  SELECT 'meeting_transcript_row' AS indexable_type,r.id,r.id*4+1 AS rid,1 AS live,coalesce(length(CAST(r.text AS BLOB)),0) AS bytes FROM meeting_transcript_rows r JOIN meeting_transcripts t ON t.id=r.meeting_transcript_id JOIN meetings m ON m.id=t.meeting_id WHERE m.account_id=? AND m.deleted_at IS NULL AND t.deleted_at IS NULL AND t.superseded_at IS NULL
@@ -19910,7 +19974,7 @@ var invalidateMeetingStems = /* @__PURE__ */ __name((database, type, id2) => {
19910
19974
  }, "invalidateMeetingStems");
19911
19975
  var meetingStemmableText = /* @__PURE__ */ __name((text6) => text6.replace(/[\p{L}\p{N}\p{M}\p{Co}]+/gu, (token) => token.length <= 1024 ? token : ""), "meetingStemmableText");
19912
19976
 
19913
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
19977
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-index.js
19914
19978
  function meetingHitIndexOver({ database, now: now2 }) {
19915
19979
  return {
19916
19980
  async indexSearch(original) {
@@ -19978,10 +20042,10 @@ function meetingHitIndexOver({ database, now: now2 }) {
19978
20042
  }
19979
20043
  __name(meetingHitIndexOver, "meetingHitIndexOver");
19980
20044
 
19981
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
20045
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
19982
20046
  import { createHash as createHash5 } from "node:crypto";
19983
20047
 
19984
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/search/trigrams.js
20048
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/search/trigrams.js
19985
20049
  var trigrams = /* @__PURE__ */ __name((term) => {
19986
20050
  const padded = ` ${term} `;
19987
20051
  const pieces = /* @__PURE__ */ new Set();
@@ -19990,7 +20054,7 @@ var trigrams = /* @__PURE__ */ __name((term) => {
19990
20054
  return [...pieces];
19991
20055
  }, "trigrams");
19992
20056
 
19993
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/search/correct.js
20057
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/search/correct.js
19994
20058
  var SHORTEST_CORRECTION = 3;
19995
20059
  var maxEdits = /* @__PURE__ */ __name((word) => word.length <= 4 ? 1 : 2, "maxEdits");
19996
20060
  var editDistance = /* @__PURE__ */ __name((a, b, max) => {
@@ -20037,7 +20101,7 @@ var correctWords = /* @__PURE__ */ __name(async (vocabulary, words3) => {
20037
20101
  return corrections;
20038
20102
  }, "correctWords");
20039
20103
 
20040
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/search/garbled.js
20104
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/search/garbled.js
20041
20105
  var SHORTEST_GARBLED = 4;
20042
20106
  var MOST_WIDENED = 64;
20043
20107
  var plain = /* @__PURE__ */ __name((word) => word.replaceAll("\u044D", "\u0435"), "plain");
@@ -20129,7 +20193,7 @@ var widenWords = /* @__PURE__ */ __name((probes, vocabulary, stem, known2) => {
20129
20193
  return found2.map((words3) => words3.sort((a, b) => a.distance - b.distance || b.docs - a.docs || a.term.localeCompare(b.term)).slice(0, MOST_WIDENED).map((word) => word.term));
20130
20194
  }, "widenWords");
20131
20195
 
20132
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
20196
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/search/russian-dictionary.js
20133
20197
  import { readFileSync } from "node:fs";
20134
20198
  var loaded;
20135
20199
  var dictionary = /* @__PURE__ */ __name(() => {
@@ -20188,7 +20252,7 @@ var knownRussianWord = /* @__PURE__ */ __name((word) => {
20188
20252
  return false;
20189
20253
  }, "knownRussianWord");
20190
20254
 
20191
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
20255
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-query.js
20192
20256
  var WORD3 = /[\p{L}\p{N}\p{M}]+/gu;
20193
20257
  var MOST_WORDS = 128;
20194
20258
  var quote = /* @__PURE__ */ __name((word) => `"${word.replaceAll('"', '""')}"`, "quote");
@@ -20415,7 +20479,7 @@ var matchMeetingText = /* @__PURE__ */ __name((tree, text6, stemmer) => {
20415
20479
  return check3(tree);
20416
20480
  }, "matchMeetingText");
20417
20481
 
20418
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
20482
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-hit-search.js
20419
20483
  var fail3 = /* @__PURE__ */ __name((message2) => {
20420
20484
  throw new CliError("validation_error", message2);
20421
20485
  }, "fail");
@@ -20597,7 +20661,7 @@ function meetingHitSearchOver({ database }) {
20597
20661
  }
20598
20662
  __name(meetingHitSearchOver, "meetingHitSearchOver");
20599
20663
 
20600
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
20664
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-languages.js
20601
20665
  var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
20602
20666
  async fillTranscriptLanguages({ accountId, apply, now: now2 }) {
20603
20667
  positiveReadInteger(accountId, "accountId");
@@ -20629,7 +20693,7 @@ var meetingLanguagesOver = /* @__PURE__ */ __name(({ database }) => ({
20629
20693
  }
20630
20694
  }), "meetingLanguagesOver");
20631
20695
 
20632
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
20696
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-participant-search.js
20633
20697
  import { createHash as createHash6 } from "node:crypto";
20634
20698
  var cursorOf2 = /* @__PURE__ */ __name((value, key2) => {
20635
20699
  if (value === void 0)
@@ -20719,7 +20783,7 @@ var meetingParticipantSearchOver = /* @__PURE__ */ __name((context) => ({
20719
20783
  }
20720
20784
  }), "meetingParticipantSearchOver");
20721
20785
 
20722
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
20786
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-context-queries.js
20723
20787
  var preparationQueries = {
20724
20788
  participants: {
20725
20789
  fields: "p.id, p.identity_id, p.display_name, l.person_id",
@@ -20769,7 +20833,7 @@ var preparationQueries = {
20769
20833
  }
20770
20834
  };
20771
20835
 
20772
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
20836
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-context.js
20773
20837
  var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
20774
20838
  async preparationContext(original) {
20775
20839
  const input = validateMeetingPreparationContext(original);
@@ -20810,7 +20874,7 @@ var meetingPreparationContextOver = /* @__PURE__ */ __name(({ database }) => ({
20810
20874
  }
20811
20875
  }), "meetingPreparationContextOver");
20812
20876
 
20813
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
20877
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/preparation-subjects.js
20814
20878
  var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
20815
20879
  SELECT m.id FROM meetings m JOIN meeting_series s ON s.id=m.meeting_series_id
20816
20880
  WHERE m.id IN (${Array.from({ length: anchors }, () => "?").join(",")}) AND m.account_id=? AND s.account_id=?
@@ -20824,7 +20888,7 @@ var preparationSubjects = /* @__PURE__ */ __name((anchors) => `WITH anchors AS (
20824
20888
  JOIN main.projects p ON p.id=l.to_id WHERE p.account_id IS NULL AND p.deleted_at IS NULL
20825
20889
  )`, "preparationSubjects");
20826
20890
 
20827
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
20891
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-knowledge.js
20828
20892
  var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => ({
20829
20893
  async preparationKnowledge(original) {
20830
20894
  const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
@@ -20869,7 +20933,7 @@ var meetingPreparationKnowledgeOver = /* @__PURE__ */ __name(({ database }) => (
20869
20933
  }
20870
20934
  }), "meetingPreparationKnowledgeOver");
20871
20935
 
20872
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
20936
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-preparation-notes.js
20873
20937
  var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
20874
20938
  async preparationNotes(original) {
20875
20939
  const { accountId, seriesId, anchorIds, after: after2, before: before2, limit, maxReadBytes, signal } = validateMeetingRelatedHistory(original);
@@ -20922,7 +20986,7 @@ var meetingPreparationNotesOver = /* @__PURE__ */ __name(({ database }) => ({
20922
20986
  }
20923
20987
  }), "meetingPreparationNotesOver");
20924
20988
 
20925
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
20989
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-related-history.js
20926
20990
  var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
20927
20991
  async relatedHistory(original) {
20928
20992
  const input = validateMeetingRelatedHistory(original);
@@ -20993,7 +21057,7 @@ var meetingRelatedHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
20993
21057
  }
20994
21058
  }), "meetingRelatedHistoryOver");
20995
21059
 
20996
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
21060
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-review.js
20997
21061
  var number2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : Number(value), "number");
20998
21062
  var text2 = /* @__PURE__ */ __name((value) => value === null || value === void 0 ? null : String(value), "text");
20999
21063
  var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
@@ -21074,7 +21138,7 @@ var meetingReviewOver = /* @__PURE__ */ __name(({ database }) => ({
21074
21138
  }
21075
21139
  }), "meetingReviewOver");
21076
21140
 
21077
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
21141
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-series-history.js
21078
21142
  var bytes2 = "length(CAST(external_id AS BLOB)) + coalesce(length(CAST(title AS BLOB)), 0)";
21079
21143
  var ensureBytes2 = /* @__PURE__ */ __name((size2, budget) => {
21080
21144
  if (!Number.isSafeInteger(size2) || size2 < 0 || size2 > budget)
@@ -21128,8 +21192,14 @@ var meetingSeriesHistoryOver = /* @__PURE__ */ __name(({ database }) => ({
21128
21192
  }
21129
21193
  }), "meetingSeriesHistoryOver");
21130
21194
 
21131
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
21195
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-stats.js
21132
21196
  var MOST_ROWS = 5e5;
21197
+ var meetingCountsSql = /* @__PURE__ */ __name((where) => `SELECT m.started_at, coalesce(m.duration_ms, m.ended_at - m.started_at) AS duration_ms,
21198
+ EXISTS (SELECT 1 FROM meeting_transcripts t WHERE t.meeting_id = m.id AND t.deleted_at IS NULL
21199
+ AND t.superseded_at IS NULL) AS transcribed,
21200
+ s.external_id AS series_key, CASE WHEN s.id IS NULL THEN NULL ELSE coalesce(s.title, m.title) END AS series_title
21201
+ FROM meetings m LEFT JOIN meeting_series s ON s.id = m.meeting_series_id
21202
+ WHERE ${where} ORDER BY m.started_at DESC`, "meetingCountsSql");
21133
21203
  var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
21134
21204
  async meetingStats(input) {
21135
21205
  checkMeetingCancelled(input.signal);
@@ -21172,10 +21242,26 @@ var meetingStatsOver = /* @__PURE__ */ __name(({ database }) => ({
21172
21242
  speakerName: text6(row2.speaker_name)
21173
21243
  })), input.timeZone);
21174
21244
  });
21245
+ },
21246
+ async meetingCounts(input) {
21247
+ checkMeetingCancelled(input.signal);
21248
+ positiveReadInteger(input.accountId, "accountId");
21249
+ return read(database, () => {
21250
+ const { clauses, params } = meetingSelectionSql(input);
21251
+ const meetings2 = database.prepare(meetingCountsSql(clauses.join(" AND "))).all(...params).map((row2) => ({
21252
+ startedAt: row2.started_at === null ? null : Number(row2.started_at),
21253
+ durationMs: row2.duration_ms === null ? null : Number(row2.duration_ms),
21254
+ transcribed: Number(row2.transcribed) === 1,
21255
+ seriesKey: row2.series_key === null ? null : String(row2.series_key),
21256
+ seriesTitle: row2.series_title === null ? null : String(row2.series_title)
21257
+ }));
21258
+ checkMeetingCancelled(input.signal);
21259
+ return aggregateMeetingCounts(meetings2, input.by, input.timeZone, input.limit);
21260
+ });
21175
21261
  }
21176
21262
  }), "meetingStatsOver");
21177
21263
 
21178
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
21264
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/meetings.js
21179
21265
  var CURSOR_KEY = "meetings";
21180
21266
  var seriesOf2 = /* @__PURE__ */ __name((row2) => ({
21181
21267
  id: Number(row2.id),
@@ -21744,7 +21830,7 @@ var meetingStoreOver = /* @__PURE__ */ __name((context) => {
21744
21830
  };
21745
21831
  }, "meetingStoreOver");
21746
21832
 
21747
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
21833
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/sync.js
21748
21834
  var syncStateOf = /* @__PURE__ */ __name(({ orm }, accountKey, name) => {
21749
21835
  const row2 = orm.select({ value: syncCursors.value, at: syncCursors.updatedAt }).from(syncCursors).where(and(eq(syncCursors.accountId, accountKey), eq(syncCursors.key, name))).get();
21750
21836
  return row2 ? { value: row2.value, at: toIso(row2.at) } : void 0;
@@ -21770,7 +21856,7 @@ var release = /* @__PURE__ */ __name(({ orm }, chatKey, anchor, holder) => {
21770
21856
  orm.delete(fetchLeases).where(and(eq(fetchLeases.chatId, chatKey), eq(fetchLeases.anchor, anchor), eq(fetchLeases.holder, holder))).run();
21771
21857
  }, "release");
21772
21858
 
21773
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
21859
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/thread-columns.js
21774
21860
  var THREAD_COLUMNS = {
21775
21861
  subject: {
21776
21862
  where: /* @__PURE__ */ __name(({ value }) => ({
@@ -21787,7 +21873,7 @@ var threadRows = /* @__PURE__ */ __name((database, filter) => {
21787
21873
  AND (${filter.where?.sql ?? "1"}) ORDER BY coalesce(last_email_at, 0) DESC, id DESC LIMIT ? OFFSET ?`).all(filter.accountId ?? null, filter.accountId ?? null, filter.includeDeleted ? 1 : 0, ...filter.where?.params ?? [], limit, offset);
21788
21874
  }, "threadRows");
21789
21875
 
21790
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
21876
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/emails.js
21791
21877
  var threadConversation = /* @__PURE__ */ __name((place, builtAt) => ({
21792
21878
  id: `email:${place.emailId}`,
21793
21879
  chatId: place.threadExternalId,
@@ -22343,7 +22429,7 @@ var mailStoreOver = /* @__PURE__ */ __name(({ database, orm, now: now2 }, stemme
22343
22429
  }
22344
22430
  }), "mailStoreOver");
22345
22431
 
22346
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/search/dictionary.js
22432
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/search/dictionary.js
22347
22433
  import { readFileSync as readFileSync2 } from "node:fs";
22348
22434
  var DICTIONARIES = Object.fromEntries(LANGUAGES.map(({ name, dictionary: dictionary3 }) => [name, dictionary3]));
22349
22435
  var folded4 = /* @__PURE__ */ __name((word) => /^[а-яё'-]*$/.test(word) ? word.replaceAll("\u0451", "\u0435").replaceAll("\u0439", "\u0438") : fold(word), "folded");
@@ -22433,7 +22519,7 @@ var knownWord = /* @__PURE__ */ __name((languages) => {
22433
22519
  }, "knownWord");
22434
22520
  var dictionaryLanguages = /* @__PURE__ */ __name((stemmers) => [stemmers.cyrillic, ...stemmers.latin.split(",")].filter((name) => Object.hasOwn(DICTIONARIES, name)), "dictionaryLanguages");
22435
22521
 
22436
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
22522
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/transcript-query.js
22437
22523
  var predicates = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => predicates(node2)), "predicates");
22438
22524
  var readsTranscripts = /* @__PURE__ */ __name((node) => (node.operator === "term" || node.operator === "phrase") && /[\p{L}\p{N}]/u.test(normalize(node.value)) && (node.field === "transcript" || node.implicit === true && (node.field === "text" || node.field === "exact")), "readsTranscripts");
22439
22525
  var LATIN_NUMBERS = new Set(`zero one two three four five six seven eight nine ten eleven twelve twenty thirty forty fifty sixty seventy
@@ -22519,7 +22605,7 @@ var spokenTranscripts = /* @__PURE__ */ __name((database, item, speaking, keys)
22519
22605
  return found2;
22520
22606
  }, "spokenTranscripts");
22521
22607
 
22522
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
22608
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/hit-places.js
22523
22609
  var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, found2, pks) => {
22524
22610
  const placeLeaves = leaves.filter(({ node }) => (node.operator === "term" || node.operator === "phrase") && (node.implicit || node.field === "content" || node.field === "transcript"));
22525
22611
  if (!placeLeaves.length || !pks.length || found2.length !== pks.length)
@@ -22566,7 +22652,29 @@ var placeHits = /* @__PURE__ */ __name((database, corpus, leaves, transcripts, f
22566
22652
  });
22567
22653
  }, "placeHits");
22568
22654
 
22569
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
22655
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene-groups.js
22656
+ var GROUPS = {
22657
+ chat: {
22658
+ key: "m.chat_id",
22659
+ select: "ac.provider AS provider, ac.external_id AS account, c.external_id AS id, c.title AS name"
22660
+ },
22661
+ sender: {
22662
+ key: "coalesce(m.sender_identity_id, -m.account_id)",
22663
+ select: "ac.provider AS provider, ac.external_id AS account, i.external_id AS id, i.name AS name, max(m.outgoing) AS outgoing"
22664
+ },
22665
+ // Quarter hours, so a calendar day or hour in any zone (+05:30, +05:45) is a whole number of buckets.
22666
+ time: { key: "m.sent_at / 900000", select: "CAST(min(m.sent_at / 900000) * 900000 AS TEXT) AS id, NULL AS name" },
22667
+ sender_direction: {
22668
+ key: "coalesce(m.sender_identity_id, -m.account_id), coalesce(m.outgoing, 0)",
22669
+ select: "ac.provider AS provider, ac.external_id AS account, i.external_id AS id, i.name AS name, coalesce(m.outgoing, 0) AS outgoing"
22670
+ },
22671
+ time_direction: {
22672
+ key: "m.sent_at / 900000, coalesce(m.outgoing, 0)",
22673
+ select: "CAST(min(m.sent_at / 900000) * 900000 AS TEXT) AS id, NULL AS name, coalesce(m.outgoing, 0) AS outgoing"
22674
+ }
22675
+ };
22676
+
22677
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/lucene.js
22570
22678
  var MESSAGES2 = {
22571
22679
  rows: "messages",
22572
22680
  threads: "chats",
@@ -22587,18 +22695,6 @@ var MAIL = {
22587
22695
  item: "email",
22588
22696
  thread: "email_thread"
22589
22697
  };
22590
- var GROUPS = {
22591
- chat: {
22592
- key: "m.chat_id",
22593
- select: "ac.provider AS provider, ac.external_id AS account, c.external_id AS id, c.title AS name"
22594
- },
22595
- sender: {
22596
- key: "coalesce(m.sender_identity_id, -m.account_id)",
22597
- select: "ac.provider AS provider, ac.external_id AS account, i.external_id AS id, i.name AS name, max(m.outgoing) AS outgoing"
22598
- },
22599
- // Quarter hours, so a calendar day or hour in any zone (+05:30, +05:45) is a whole number of buckets.
22600
- time: { key: "m.sent_at / 900000", select: "CAST(min(m.sent_at / 900000) * 900000 AS TEXT) AS id, NULL AS name" }
22601
- };
22602
22698
  var matchQuery = /* @__PURE__ */ __name((context, execution) => runQuery(context, execution), "matchQuery");
22603
22699
  var countQuery = /* @__PURE__ */ __name((context, execution, by) => runQuery(context, execution, by), "countQuery");
22604
22700
  var queryMessagePks = /* @__PURE__ */ __name((context, execution) => runQuery(context, execution, "pks"), "queryMessagePks");
@@ -23061,7 +23157,7 @@ var runCompiled = /* @__PURE__ */ __name(async (context, execution, by) => {
23061
23157
  };
23062
23158
  }, "runCompiled");
23063
23159
 
23064
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
23160
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/counters.js
23065
23161
  function invalidMetadata() {
23066
23162
  throw new CliError("validation_error", "stored counter metadata is malformed \u2014 check the store before refreshing");
23067
23163
  }
@@ -23163,7 +23259,7 @@ var counterTargets = /* @__PURE__ */ __name((context, execution, options) => wit
23163
23259
  };
23164
23260
  }), "counterTargets");
23165
23261
 
23166
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
23262
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/attachment-texts.js
23167
23263
  var NOT_FILE_LIST = [...NOT_FILES].map((kind4) => `'${kind4}'`).join(",");
23168
23264
  var fileAttachments = /* @__PURE__ */ __name(({ database }, accountKey, { chatKey, messageId, beforePk, limit }) => database.prepare(`SELECT att.id AS pk, c.external_id AS chat_id, m.external_id AS message_id, att.position, att.kind, att.name, att.mime,
23169
23265
  att.size, att.local_path, att.extraction AS origin, att.size AS read_bytes, att.extraction_error AS error, att.content_sha256, att.extractor
@@ -23282,7 +23378,7 @@ var attachmentViews = /* @__PURE__ */ __name(({ database }, accountKey, { chatKe
23282
23378
  }));
23283
23379
  }, "attachmentViews");
23284
23380
 
23285
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
23381
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/transcripts.js
23286
23382
  var transcript = /* @__PURE__ */ __name(({ orm }, chatKey, messageId) => orm.select({ text: messageTranscripts.text, source: messageTranscripts.source }).from(messageTranscripts).where(and(eq(messageTranscripts.chatId, chatKey), eq(messageTranscripts.messageExternalId, messageId))).get(), "transcript");
23287
23383
  var keepTranscript = /* @__PURE__ */ __name((context, chatKey, messageId, text6, source2) => {
23288
23384
  const { orm, database, now: now2 } = context;
@@ -23320,7 +23416,7 @@ var intoVoiceAttachment = /* @__PURE__ */ __name((context, messagePk) => {
23320
23416
  keepText(context, Number(row2.id), { text: String(row2.text), origin: "extracted", extractor: `speech:${row2.source}` });
23321
23417
  }, "intoVoiceAttachment");
23322
23418
 
23323
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
23419
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/messages.js
23324
23420
  var FIELDS = [
23325
23421
  "threadExternalId",
23326
23422
  "senderIdentityId",
@@ -23637,7 +23733,7 @@ var writeDerivedReactions = /* @__PURE__ */ __name((context, chatKey, messageId)
23637
23733
  reactionStatementsOf(context.database).total.run(JSON.stringify(derived), chatKey, messageId);
23638
23734
  }, "writeDerivedReactions");
23639
23735
 
23640
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/keys.js
23736
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/keys.js
23641
23737
  var keysOver = /* @__PURE__ */ __name((context) => {
23642
23738
  const findAccountPk2 = /* @__PURE__ */ __name((key2) => findAccountPk(context, key2), "findAccountPk");
23643
23739
  const findChatPk2 = /* @__PURE__ */ __name((accountKey, chatId) => findChatPk(context, accountKey, chatId), "findChatPk");
@@ -23658,7 +23754,7 @@ var keysOver = /* @__PURE__ */ __name((context) => {
23658
23754
  };
23659
23755
  }, "keysOver");
23660
23756
 
23661
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
23757
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/account-groups.js
23662
23758
  var accountGroupsOf = /* @__PURE__ */ __name((database) => {
23663
23759
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(ACCOUNT_GROUPS);
23664
23760
  if (!row2)
@@ -23693,7 +23789,7 @@ var saveProfile = /* @__PURE__ */ __name((database, app, profile, key2, now2) =>
23693
23789
  database.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)").run(PROFILES, JSON.stringify(profiles), now2);
23694
23790
  }, "saveProfile");
23695
23791
 
23696
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
23792
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/actors.js
23697
23793
  var BOT_KINDS = ["agent", "rule", "script", "integration"];
23698
23794
  var ownerPerson = /* @__PURE__ */ __name((database) => {
23699
23795
  const found2 = database.prepare("SELECT id FROM persons WHERE owner = 1 ORDER BY id LIMIT 1").get();
@@ -23750,7 +23846,7 @@ var proposedBySql = /* @__PURE__ */ __name((type, id2, by) => {
23750
23846
  return { sql: bot("pb.name = ?"), params: [by.bot] };
23751
23847
  }, "proposedBySql");
23752
23848
 
23753
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
23849
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/own-identities.js
23754
23850
  var linkOwnIdentities = /* @__PURE__ */ __name((context) => {
23755
23851
  const owner = ownerPerson(context.database).id;
23756
23852
  const strays = context.database.prepare("SELECT DISTINCT l.person_id AS person FROM identity_links l JOIN identities i ON i.id = l.identity_id JOIN accounts a ON a.provider = i.provider AND a.external_id = i.external_id WHERE l.person_id <> ?").all(owner);
@@ -23771,7 +23867,7 @@ var linkToOwner = /* @__PURE__ */ __name((context, ref3) => {
23771
23867
  return personOf(context, ref3);
23772
23868
  }, "linkToOwner");
23773
23869
 
23774
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
23870
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/providers.js
23775
23871
  var PROVIDERS_SETTING = "providers";
23776
23872
  var storedProvidersOf = /* @__PURE__ */ __name((database) => {
23777
23873
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
@@ -23806,7 +23902,7 @@ var registerProvider = /* @__PURE__ */ __name((database, value, now2) => {
23806
23902
  });
23807
23903
  }, "registerProvider");
23808
23904
 
23809
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
23905
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/task-candidates.js
23810
23906
  var DAY3 = 864e5;
23811
23907
  var RECENTLY_CLOSED_MS = 14 * DAY3;
23812
23908
  var TEXT_LIMIT = 20;
@@ -24005,7 +24101,7 @@ var taskSimilarityOver = /* @__PURE__ */ __name((context) => {
24005
24101
  };
24006
24102
  }, "taskSimilarityOver");
24007
24103
 
24008
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
24104
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/task-category-settings.js
24009
24105
  var SETTING3 = "taskCategories";
24010
24106
  var savedTaskCategories = /* @__PURE__ */ __name((database) => {
24011
24107
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(SETTING3);
@@ -24024,7 +24120,7 @@ var saveTaskCategories = /* @__PURE__ */ __name((database, categories, now2) =>
24024
24120
  database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(SETTING3, JSON.stringify(categories), now2);
24025
24121
  }, "saveTaskCategories");
24026
24122
 
24027
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
24123
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close.js
24028
24124
  var DEFAULT_AGENT_CLOSE = { allowed: true, min: 0.8 };
24029
24125
  var ALLOWED = "taskAgentClose";
24030
24126
  var MIN = "taskAgentCloseMin";
@@ -24080,12 +24176,13 @@ var SUGGESTION_COLUMNS = [
24080
24176
  ];
24081
24177
  var CLEAR_SUGGESTION = SUGGESTION_COLUMNS.map((column2) => `${column2} = NULL`).join(", ");
24082
24178
 
24083
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
24179
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/mail-findings.js
24084
24180
  var MAIL_FINDINGS_KIND = "mail_findings";
24085
24181
 
24086
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/decisions.js
24182
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/decisions.js
24183
+ var TASK_CLOSE_KIND = "task_close";
24087
24184
  var DEFAULT_DECISION_POLICY = { agentDecisions: false, ruleProposalsOwnerOnly: true };
24088
- var isOwnerOnlyKind = /* @__PURE__ */ __name((kind4) => kind4 === MAIL_FINDINGS_KIND || kind4 === MEETING_FINDINGS_KIND, "isOwnerOnlyKind");
24185
+ var isOwnerOnlyKind = /* @__PURE__ */ __name((kind4) => kind4 === MAIL_FINDINGS_KIND || kind4 === MEETING_FINDINGS_KIND || kind4 === TASK_CLOSE_KIND, "isOwnerOnlyKind");
24089
24186
  var mayDecide = /* @__PURE__ */ __name((row2, by, policy = DEFAULT_DECISION_POLICY) => {
24090
24187
  if (by === "owner")
24091
24188
  return null;
@@ -24130,7 +24227,7 @@ var assertMayDecide = /* @__PURE__ */ __name((row2, by, policy = DEFAULT_DECISIO
24130
24227
  }, "assertMayDecide");
24131
24228
  var deciderAuthor = /* @__PURE__ */ __name((by) => by === "owner" ? "owner" : { bot: by.bot, ...by.model === void 0 ? {} : { model: by.model } }, "deciderAuthor");
24132
24229
 
24133
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/money.js
24230
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/domain/money.js
24134
24231
  var CURRENCY_SCALES = {
24135
24232
  AED: 2,
24136
24233
  AMD: 2,
@@ -24215,7 +24312,7 @@ var quantityOf = /* @__PURE__ */ __name((text6) => {
24215
24312
  }, "quantityOf");
24216
24313
  var lineUnits = /* @__PURE__ */ __name((thousandths, unitPrice) => Number((thousandths * BigInt(unitPrice) + 500n) / 1000n), "lineUnits");
24217
24314
 
24218
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/finance.js
24315
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/domain/finance.js
24219
24316
  var INVOICE_DIRECTIONS = ["receivable", "payable"];
24220
24317
  var INVOICE_STATUSES = ["draft", "issued", "partly_paid", "paid", "void"];
24221
24318
  var MONEY_DIRECTIONS = ["in", "out"];
@@ -24244,7 +24341,7 @@ var paymentLine = /* @__PURE__ */ __name((payment) => {
24244
24341
  var invoiceTitle = /* @__PURE__ */ __name((invoice) => `Invoice ${invoiceLine(invoice)}`, "invoiceTitle");
24245
24342
  var paymentEntryTitle = /* @__PURE__ */ __name((payment) => `Payment \xB7 ${paymentLine(payment)}`, "paymentEntryTitle");
24246
24343
 
24247
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
24344
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/domain/ref-summaries.js
24248
24345
  var PROFILE_PLACEHOLDER = "<profile>";
24249
24346
  var oneLine = /* @__PURE__ */ __name((text6) => singleLine(text6.replace(/\s+/g, " ").trim()), "oneLine");
24250
24347
  var openKind = /* @__PURE__ */ __name((kind4) => kind4 === "email" ? "message" : kind4 === "email_thread" ? "chat" : kind4 === "unknown" ? void 0 : kind4, "openKind");
@@ -24296,7 +24393,7 @@ var refLabel = /* @__PURE__ */ __name((summary) => {
24296
24393
  return `${WORDS2[summary.kind]} ${named2}${notes3 === "" ? "" : ` (${notes3})`}`;
24297
24394
  }, "refLabel");
24298
24395
 
24299
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
24396
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/ref-summaries.js
24300
24397
  var EXCERPT_CHARS = 280;
24301
24398
  var TITLE_CHARS = 120;
24302
24399
  var MEMORY_TITLE_CHARS = 80;
@@ -24649,7 +24746,7 @@ var refReadsOf = /* @__PURE__ */ __name((database, texts2, { excerpt = false } =
24649
24746
  var summaryOf2 = /* @__PURE__ */ __name(({ sender, excerpt, ...summary }, withExcerpt) => withExcerpt ? { ...summary, excerpt } : summary, "summaryOf");
24650
24747
  var refSummariesOf = /* @__PURE__ */ __name((database, texts2, options = {}) => new Map([...refReadsOf(database, texts2, options)].map(([text6, read2]) => [text6, summaryOf2(read2, options.excerpt === true)])), "refSummariesOf");
24651
24748
 
24652
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
24749
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-sources.js
24653
24750
  var sourceOf3 = /* @__PURE__ */ __name((read2, ref3) => ({
24654
24751
  ref: ref3,
24655
24752
  kind: read2.kind,
@@ -24685,7 +24782,7 @@ var evidenceSourcesOf = /* @__PURE__ */ __name((database, from2) => {
24685
24782
  });
24686
24783
  }, "evidenceSourcesOf");
24687
24784
 
24688
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/attachments/limits.js
24785
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/attachments/limits.js
24689
24786
  var MAX_FILE_BYTES = 50 * 1024 * 1024;
24690
24787
  var MAX_TEXT_CHARS = 2e6;
24691
24788
  var ATTACHMENT_LIMIT_ENV = [
@@ -24711,7 +24808,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
24711
24808
  return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
24712
24809
  }, "pdfPreviewLimits");
24713
24810
 
24714
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/ulid.js
24811
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/ulid.js
24715
24812
  import { randomBytes } from "node:crypto";
24716
24813
  var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
24717
24814
  var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
@@ -24724,7 +24821,7 @@ var ulid = /* @__PURE__ */ __name((now2 = Date.now()) => {
24724
24821
  return time3 + random;
24725
24822
  }, "ulid");
24726
24823
 
24727
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
24824
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/document-metadata.js
24728
24825
  var FOLDED_FIELDS = ["title", "site", "language", "author"];
24729
24826
  var encodeDocumentMetadata = /* @__PURE__ */ __name((meta, sections) => {
24730
24827
  if (!meta && !sections?.length)
@@ -24745,7 +24842,7 @@ var languageOf = /* @__PURE__ */ __name((meta) => {
24745
24842
  return typeof language === "string" && language !== "" ? language : null;
24746
24843
  }, "languageOf");
24747
24844
 
24748
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
24845
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/files.js
24749
24846
  var isObject = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "isObject");
24750
24847
  var objectOf2 = /* @__PURE__ */ __name((value) => {
24751
24848
  if (isObject(value))
@@ -24988,7 +25085,7 @@ var filesStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
24988
25085
  };
24989
25086
  }, "filesStoreOver");
24990
25087
 
24991
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
25088
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/imported-documents.js
24992
25089
  var IMPORTED_DOCUMENT_QUERY = defineQuery({
24993
25090
  entity: "document",
24994
25091
  backend: "sql",
@@ -25034,7 +25131,7 @@ var importedDocumentWhere = /* @__PURE__ */ __name((database, query) => {
25034
25131
  return queryFilter(validateQuery(query, IMPORTED_DOCUMENT_QUERY), columns);
25035
25132
  }, "importedDocumentWhere");
25036
25133
 
25037
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
25134
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/notes.js
25038
25135
  var NOTE_FORMATS = ["obsidian", "markdown"];
25039
25136
  var iso2 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
25040
25137
  var optionalIso = /* @__PURE__ */ __name((value) => value == null ? null : iso2(value), "optionalIso");
@@ -25560,7 +25657,7 @@ var notesStoreOver = /* @__PURE__ */ __name((context) => {
25560
25657
  };
25561
25658
  }, "notesStoreOver");
25562
25659
 
25563
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
25660
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/memories.js
25564
25661
  var NAMED = "SELECT m.*, b.name AS author_name, b.kind AS author_kind FROM memories m LEFT JOIN bots b ON m.author_type = 'bot' AND b.id = m.author_id";
25565
25662
  var iso3 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
25566
25663
  var oneOf2 = /* @__PURE__ */ __name((value, allowed, what) => {
@@ -25782,7 +25879,7 @@ var memoriesStoreOver = /* @__PURE__ */ __name((context) => {
25782
25879
  };
25783
25880
  }, "memoriesStoreOver");
25784
25881
 
25785
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
25882
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/task-first-pass.js
25786
25883
  var DEFAULT_FIRST_PASS_PER_CHAT = 0;
25787
25884
  var KEY = "taskFirstPassPerChat";
25788
25885
  var firstPassPerChatOf = /* @__PURE__ */ __name((value, setting = "task_first_pass_per_chat") => {
@@ -25802,7 +25899,7 @@ var saveFirstPassPerChat = /* @__PURE__ */ __name((database, value, now2) => {
25802
25899
  database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(KEY, String(value), now2);
25803
25900
  }, "saveFirstPassPerChat");
25804
25901
 
25805
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
25902
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/task-board.js
25806
25903
  var TASK_SORTS = ["priority", "due", "created", "updated", "key", "state"];
25807
25904
  var field = /* @__PURE__ */ __name((name, type, example, more = {}) => ({
25808
25905
  name,
@@ -25834,6 +25931,7 @@ var PROJECT_TASK_FIELDS = [
25834
25931
  values: ["overdue", "today", "upcoming", "later", "none"],
25835
25932
  relation: "the due date as a board groups it: overdue (open work due before today), today, upcoming (the next 7 days after today), later, or none"
25836
25933
  }),
25934
+ field("created", "time", "created:>=30d", { relation: "when it was opened" }),
25837
25935
  field("closed", "time", "closed:>=14d", { relation: "when it was done or dismissed" }),
25838
25936
  field("ready", "bool", "ready:true", { relation: "open work whose blocked-by tasks are all done" }),
25839
25937
  field("text", "txt", "text:invoice", { relation: "words of the title and description; a bare word means this" })
@@ -25967,6 +26065,7 @@ var projectTaskColumns = /* @__PURE__ */ __name((now2, zone) => ({
25967
26065
  agent: { where: agentWhere },
25968
26066
  parent: { where: parentWhere },
25969
26067
  due: { type: "time", sql: "t.due_at" },
26068
+ created: { type: "time", sql: "t.created_at" },
25970
26069
  closed: { type: "time", sql: "t.closed_at" },
25971
26070
  overdue: { where: /* @__PURE__ */ __name((node) => truth(node, dueGroups(now2, zone).overdue), "where") },
25972
26071
  when: {
@@ -26023,7 +26122,7 @@ var withoutField = /* @__PURE__ */ __name((query, name) => {
26023
26122
  return root === void 0 ? void 0 : { ...query, root };
26024
26123
  }, "withoutField");
26025
26124
 
26026
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
26125
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/task-comments.js
26027
26126
  var authorNamed = /* @__PURE__ */ __name((database, row2) => {
26028
26127
  if (row2.author_type == null)
26029
26128
  return null;
@@ -26051,7 +26150,7 @@ var addComment = /* @__PURE__ */ __name((context, task, body2, by) => {
26051
26150
  return commentsOf(database, task).find((one2) => one2.ref === `note:${made}`);
26052
26151
  }, "addComment");
26053
26152
 
26054
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
26153
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/task-relations.js
26055
26154
  var TASK_RELATION_KINDS = [
26056
26155
  "blocked-by",
26057
26156
  "follow-up-of",
@@ -26181,7 +26280,7 @@ var taskRelationsStoreOver = /* @__PURE__ */ __name((context, record4) => {
26181
26280
  };
26182
26281
  }, "taskRelationsStoreOver");
26183
26282
 
26184
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
26283
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/work-tasks.js
26185
26284
  var TASK_ROLES = ["assignee", "reviewer", "watcher"];
26186
26285
  var iso4 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
26187
26286
  var recordTaskEvent = /* @__PURE__ */ __name((database, task, actor, kind4, changes, at) => {
@@ -26201,7 +26300,7 @@ var timesAsIso = /* @__PURE__ */ __name((changes) => Object.fromEntries(Object.e
26201
26300
  var checkRevision = /* @__PURE__ */ __name((row2, expected) => {
26202
26301
  if (expected === void 0 || Number(row2.revision) === expected)
26203
26302
  return;
26204
- throw new CliError("configuration_error", `task ${String(row2.key)} changed since revision ${expected}; it is at ${String(row2.revision)}: read it again`, { reason: "task.stale", revision: Number(row2.revision) });
26303
+ throw new CliError("conflict", `task ${String(row2.key)} changed since revision ${expected}; it is at ${String(row2.revision)}: read it again`, { reason: "task.stale", revision: Number(row2.revision) });
26205
26304
  }, "checkRevision");
26206
26305
  var workTaskOperationsOver = /* @__PURE__ */ __name((context) => {
26207
26306
  const { database, now: now2 } = context;
@@ -26701,7 +26800,7 @@ var workTasksOver = /* @__PURE__ */ __name((context) => {
26701
26800
  };
26702
26801
  }, "workTasksOver");
26703
26802
 
26704
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
26803
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/task-close-store.js
26705
26804
  var taskCloseOver = /* @__PURE__ */ __name((context) => {
26706
26805
  const { database, now: now2 } = context;
26707
26806
  const liveRow = /* @__PURE__ */ __name((id2) => {
@@ -26750,7 +26849,7 @@ var taskCloseOver = /* @__PURE__ */ __name((context) => {
26750
26849
  };
26751
26850
  }, "taskCloseOver");
26752
26851
 
26753
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
26852
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/task-pairs.js
26754
26853
  var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
26755
26854
  const { database, now: now2 } = context;
26756
26855
  const required3 = /* @__PURE__ */ __name((id2) => {
@@ -26968,7 +27067,46 @@ var taskPairsOver = /* @__PURE__ */ __name((context, similarity) => {
26968
27067
  };
26969
27068
  }, "taskPairsOver");
26970
27069
 
26971
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
27070
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/task-stats.js
27071
+ var ACCOUNT_SCOPE = "t.package_id IS NOT NULL AND t.deleted_at IS NULL AND t.project_id = ?";
27072
+ var TASK_STATS_SQL = {
27073
+ rows: /* @__PURE__ */ __name((board, filter) => `SELECT t.source_group, t.source_kind, t.project_id, t.status, t.created_at, t.closed_at FROM tasks t WHERE ${board ? BOARD_SCOPE : ACCOUNT_SCOPE}${filter} ORDER BY t.created_at, t.id`, "rows"),
27074
+ chat: "SELECT c.external_id AS id, c.title AS name FROM chats c JOIN accounts a ON a.id = c.account_id WHERE a.provider = ? AND a.external_id = ? AND c.external_id IN (SELECT value FROM json_each(?))",
27075
+ meeting: "SELECT CAST(id AS TEXT) AS id, title AS name FROM meetings WHERE id IN (SELECT value FROM json_each(?))",
27076
+ project: "SELECT CAST(id AS TEXT) AS id, name FROM projects WHERE id IN (SELECT value FROM json_each(?))"
27077
+ };
27078
+ var taskStatsOver = /* @__PURE__ */ __name(({ database }, inbox) => ({
27079
+ statRows: /* @__PURE__ */ __name(async (scope3, where) => {
27080
+ const filter = where === void 0 ? "" : ` AND (${where.sql})`;
27081
+ const board = !("account" in scope3);
27082
+ const project = board ? void 0 : inbox(scope3.account);
27083
+ if (!board && project === void 0)
27084
+ return [];
27085
+ return database.prepare(TASK_STATS_SQL.rows(board, filter)).all(...project === void 0 ? [] : [project], ...where?.params ?? []).map((row2) => ({
27086
+ group: row2.source_group == null ? null : String(row2.source_group),
27087
+ sourceKind: row2.source_kind == null ? null : String(row2.source_kind),
27088
+ projectId: Number(row2.project_id),
27089
+ state: String(row2.status),
27090
+ createdAt: Number(row2.created_at),
27091
+ closedAt: row2.closed_at == null ? null : Number(row2.closed_at)
27092
+ }));
27093
+ }, "statRows"),
27094
+ statNames: /* @__PURE__ */ __name(async (kind4, ids, account) => {
27095
+ if (ids.length === 0)
27096
+ return /* @__PURE__ */ new Map();
27097
+ let params = [JSON.stringify(ids.map(Number))];
27098
+ if (kind4 === "chat") {
27099
+ if (account === void 0)
27100
+ return /* @__PURE__ */ new Map();
27101
+ const at = account.indexOf(":");
27102
+ params = [account.slice(0, at), account.slice(at + 1), JSON.stringify(ids)];
27103
+ }
27104
+ const rows = database.prepare(TASK_STATS_SQL[kind4]).all(...params);
27105
+ return new Map(rows.filter((row2) => row2.name != null).map((row2) => [String(row2.id), String(row2.name)]));
27106
+ }, "statNames")
27107
+ }), "taskStatsOver");
27108
+
27109
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/tasks.js
26972
27110
  var COLUMNS3 = "t.id AS row_id, t.package_id, t.source_locator, t.source_kind, t.source_group, t.type, t.status, t.close_reason, t.source, t.created_at, t.due_at, t.closed_at, t.closed_by_type, t.closed_by_id, t.key, t.category, t.claimed_by, t.claimed_until, p.name AS account";
26973
27111
  var inboxProject = /* @__PURE__ */ __name(({ database, now: now2 }, account, create) => {
26974
27112
  const key2 = inboxKey(account);
@@ -27033,6 +27171,7 @@ var taskStoreOver = /* @__PURE__ */ __name((context) => {
27033
27171
  ...workTasksOver(context),
27034
27172
  ...similarity,
27035
27173
  ...taskPairsOver(context, similarity),
27174
+ ...taskStatsOver(context, (account) => inbox(account, false)),
27036
27175
  ...taskCloseOver(context),
27037
27176
  rowOf: /* @__PURE__ */ __name((id2) => taskRowOf(database, id2), "rowOf"),
27038
27177
  categories: /* @__PURE__ */ __name(async () => listOf(), "categories"),
@@ -27174,7 +27313,7 @@ var oneOf3 = /* @__PURE__ */ __name((values, value, column2) => {
27174
27313
  throw new CliError("configuration_error", `the store holds a task with an unknown ${column2} "${String(value)}"`);
27175
27314
  }, "oneOf");
27176
27315
 
27177
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/accounts.js
27316
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/accounts.js
27178
27317
  var accountAccountsOver = /* @__PURE__ */ __name((context) => {
27179
27318
  const { database } = context;
27180
27319
  const { accountPk: accountPk2, findAccountPk: findAccountPk2 } = keysOver(context);
@@ -27219,7 +27358,7 @@ var accountsStoreOver = /* @__PURE__ */ __name((context, keyed) => {
27219
27358
  };
27220
27359
  }, "accountsStoreOver");
27221
27360
 
27222
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
27361
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/attachments.js
27223
27362
  var refColumn = /* @__PURE__ */ __name((ref3) => ref3 && Object.keys(ref3).length > 0 ? { providerRef: JSON.stringify(ref3) } : {}, "refColumn");
27224
27363
  var updatePlaced = /* @__PURE__ */ __name(({ orm }, chatKey, messageId, files2, change) => {
27225
27364
  const message2 = orm.select({ pk: messages.id }).from(messages).where(and(eq(messages.chatId, chatKey), eq(messages.externalId, messageId))).get();
@@ -27243,7 +27382,7 @@ var keepDownloads = /* @__PURE__ */ __name((context, chatKey, messageId, files2)
27243
27382
  })), "keepDownloads");
27244
27383
  var keepProviderRefs = /* @__PURE__ */ __name((context, chatKey, messageId, files2) => updatePlaced(context, chatKey, messageId, files2.filter((file) => Object.keys(file.providerRef).length > 0), (file) => refColumn(file.providerRef)), "keepProviderRefs");
27245
27384
 
27246
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/attachments.js
27385
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/attachments.js
27247
27386
  var accountAttachmentsOver = /* @__PURE__ */ __name((context) => {
27248
27387
  const { database } = context;
27249
27388
  const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
@@ -27300,7 +27439,7 @@ var attachmentsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
27300
27439
  }, "keepAttachmentText")
27301
27440
  }), "attachmentsStoreOver");
27302
27441
 
27303
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
27442
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-rekey.js
27304
27443
  var chatRow = /* @__PURE__ */ __name((context, accountKey, chatId) => context.database.prepare("SELECT * FROM chats WHERE account_id = ? AND external_id = ?").get(accountKey, chatId), "chatRow");
27305
27444
  var pointerMover = /* @__PURE__ */ __name((context, type) => {
27306
27445
  const statements = pointerPairs(context.database).filter(({ table }) => table !== "involvements").map(({ table, pointer }) => {
@@ -27480,7 +27619,7 @@ var rekeyChats = /* @__PURE__ */ __name((context, key2, accountKey, pairs, lockM
27480
27619
  return done;
27481
27620
  }, "rekeyChats");
27482
27621
 
27483
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
27622
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/completeness.js
27484
27623
  var historyStartKey = /* @__PURE__ */ __name((chatId) => `history_start:${chatId}`, "historyStartKey");
27485
27624
  var fetchedKey = /* @__PURE__ */ __name((chatId) => `fetched:${chatId}`, "fetchedKey");
27486
27625
  var CHAT_LIST_KEY = "chat_list_complete";
@@ -27496,23 +27635,49 @@ var chatCompleteness = /* @__PURE__ */ __name(({ database }, accountKey, chatIds
27496
27635
  (SELECT s.updated_at FROM sync_cursors s WHERE s.account_id = c.account_id AND s.key = 'fetched:' || c.external_id)
27497
27636
  AS fetched
27498
27637
  FROM chats c WHERE c.account_id = ? AND c.external_id IN (SELECT value FROM json_each(?))`).all(accountKey, JSON.stringify(chatIds)).map((row2) => {
27499
- const stretches = Number(row2.stretches);
27500
- const reachesStart = Number(row2.start) === 1;
27501
- const upToDate = row2.newest === null ? null : row2.held !== null && Number(row2.held) >= Number(row2.newest);
27502
- const gaps = stretches > 1;
27503
- const fetched = stretches > 0 || reachesStart;
27504
- return {
27505
- chatId: String(row2.chat),
27506
- state: !fetched ? "unknown" : upToDate !== false && !gaps && reachesStart ? "complete" : "partial",
27507
- upToDate,
27508
- gaps,
27509
- reachesStart,
27510
- fetchedAt: toIso(row2.fetched)
27511
- };
27638
+ const facts2 = factsOf(row2);
27639
+ return { chatId: String(row2.chat), ...facts2, fetchedAt: toIso(row2.fetched) };
27512
27640
  });
27513
27641
  }, "chatCompleteness");
27642
+ var factsOf = /* @__PURE__ */ __name((row2) => {
27643
+ const stretches = Number(row2.stretches);
27644
+ const reachesStart = Number(row2.start) === 1;
27645
+ const upToDate = row2.newest === null ? null : row2.held !== null && Number(row2.held) >= Number(row2.newest);
27646
+ const gaps = stretches > 1;
27647
+ const fetched = stretches > 0 || reachesStart;
27648
+ const state = !fetched ? "unknown" : upToDate !== false && !gaps && reachesStart ? "complete" : "partial";
27649
+ return { state, upToDate, gaps, reachesStart };
27650
+ }, "factsOf");
27651
+ var COVERAGE_SQL = `SELECT c.last_message_at AS newest, c.message_count AS messages,
27652
+ (SELECT m.sent_at FROM messages m WHERE m.chat_id = c.id AND m.deleted_at IS NULL
27653
+ ORDER BY m.sent_at DESC LIMIT 1) AS held,
27654
+ (SELECT m.sent_at FROM messages m WHERE m.chat_id = c.id AND m.deleted_at IS NULL
27655
+ ORDER BY m.sent_at ASC LIMIT 1) AS oldest,
27656
+ (SELECT count(*) FROM sync_ranges r WHERE r.chat_id = c.id) AS stretches,
27657
+ EXISTS (SELECT 1 FROM sync_cursors s WHERE s.account_id = c.account_id AND s.key = 'history_start:' || c.external_id
27658
+ AND NOT EXISTS (SELECT 1 FROM sync_ranges r WHERE r.chat_id = c.id AND r.from_key < CAST(s.value AS INTEGER)))
27659
+ AS start,
27660
+ EXISTS (SELECT 1 FROM sync_cursors s WHERE s.account_id = c.account_id
27661
+ AND s.key IN ('history_start:' || c.external_id, 'fetched:' || c.external_id)) AS recorded
27662
+ FROM chats c WHERE c.account_id = ? AND c.searchable = 1`;
27663
+ var chatCoverage = /* @__PURE__ */ __name(({ database }, accountKey) => {
27664
+ const rows = database.prepare(COVERAGE_SQL).all(accountKey);
27665
+ const coverage = { chats: rows.length, fetched: 0, partial: 0, never: 0, oldestMessageAt: null };
27666
+ let oldest = null;
27667
+ for (const row2 of rows) {
27668
+ if (row2.oldest !== null && (oldest === null || Number(row2.oldest) < oldest))
27669
+ oldest = Number(row2.oldest);
27670
+ if (factsOf(row2).state === "complete")
27671
+ coverage.fetched += 1;
27672
+ else if (Number(row2.stretches) === 0 && Number(row2.recorded) === 0 && Number(row2.messages) === 0)
27673
+ coverage.never += 1;
27674
+ else
27675
+ coverage.partial += 1;
27676
+ }
27677
+ return { ...coverage, oldestMessageAt: toIso(oldest) };
27678
+ }, "chatCoverage");
27514
27679
 
27515
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/chats.js
27680
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/chats.js
27516
27681
  var chatsStoreOver = /* @__PURE__ */ __name((context) => {
27517
27682
  const { database } = context;
27518
27683
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, writeState: writeState2 } = keysOver(context);
@@ -27581,6 +27746,10 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
27581
27746
  const accountKey = findAccountPk2(key2);
27582
27747
  return accountKey === void 0 ? [] : chatCompleteness(context, accountKey, chatIds);
27583
27748
  }, "chatCompleteness"),
27749
+ chatCoverage: /* @__PURE__ */ __name(async (key2) => {
27750
+ const accountKey = findAccountPk2(key2);
27751
+ return accountKey === void 0 ? { chats: 0, fetched: 0, partial: 0, never: 0, oldestMessageAt: null } : chatCoverage(context, accountKey);
27752
+ }, "chatCoverage"),
27584
27753
  chatStats: /* @__PURE__ */ __name(async (key2, chatId) => {
27585
27754
  const accountKey = findAccountPk2(key2);
27586
27755
  return accountKey === void 0 ? [] : chatStats(context, accountKey, chatId);
@@ -27643,7 +27812,7 @@ var chatsStoreOver = /* @__PURE__ */ __name((context) => {
27643
27812
  };
27644
27813
  }, "chatsStoreOver");
27645
27814
 
27646
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
27815
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/batches.js
27647
27816
  import { createHash as createHash7 } from "node:crypto";
27648
27817
  var BATCH_CONTEXT = 50;
27649
27818
  var replied = /* @__PURE__ */ __name((m) => sql`EXISTS (SELECT 1 FROM messages p WHERE p.chat_id = ${m}.chat_id
@@ -27781,7 +27950,7 @@ var saveAnswers = /* @__PURE__ */ __name((context, id2, answer) => {
27781
27950
  var clearAnswers = /* @__PURE__ */ __name(({ orm }, chatKey, model) => Number(orm.all(sql`DELETE FROM message_links WHERE chat_id = ${chatKey} AND source = 'agent'
27782
27951
  ${model === void 0 ? sql`` : sql`AND method = ${model}`} RETURNING 1 AS n`).length), "clearAnswers");
27783
27952
 
27784
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
27953
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/conversations.js
27785
27954
  import { setTimeout } from "node:timers/promises";
27786
27955
  var position = /* @__PURE__ */ __name((sentAt, pk) => `${sentAt}:${pk}`, "position");
27787
27956
  var linkInputs = /* @__PURE__ */ __name(({ orm }, chatKey, { after: after2, limit }) => {
@@ -28093,7 +28262,7 @@ var agentAnswers = /* @__PURE__ */ __name(({ orm }, chatKey) => new Map(orm.all(
28093
28262
  AND NOT EXISTS (SELECT 1 FROM messages d
28094
28263
  WHERE d.id IN (l.message_id, l.parent_id) AND d.deleted_at > l.created_at)`).map(({ id: id2, parent: parent2 }) => [id2, parent2])), "agentAnswers");
28095
28264
 
28096
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/conversations.js
28265
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/conversations.js
28097
28266
  var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
28098
28267
  const { database } = context;
28099
28268
  const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
@@ -28200,7 +28369,7 @@ var conversationsStoreOver = /* @__PURE__ */ __name((context) => {
28200
28369
  };
28201
28370
  }, "conversationsStoreOver");
28202
28371
 
28203
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/counters.js
28372
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/counters.js
28204
28373
  var LIVE_MESSAGE = "SELECT m.id AS pk FROM messages m JOIN chats c ON c.id=m.chat_id JOIN accounts ac ON ac.id=m.account_id WHERE ac.provider=? AND ac.external_id=? AND c.external_id=? AND m.external_id=? AND m.deleted_at IS NULL";
28205
28374
  var accountCountersOver = /* @__PURE__ */ __name((context) => {
28206
28375
  const { database } = context;
@@ -28225,7 +28394,7 @@ var countersStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
28225
28394
  counterTargets: /* @__PURE__ */ __name(async (execution, options) => counterTargets(context, execution, options), "counterTargets")
28226
28395
  }), "countersStoreOver");
28227
28396
 
28228
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
28397
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/mentions.js
28229
28398
  var MENTION_STATUSES = ["found", "linked", "dismissed"];
28230
28399
  var MENTION_QUERY = defineQuery({
28231
28400
  entity: "mention",
@@ -28441,7 +28610,7 @@ var listPlaces = /* @__PURE__ */ __name((database, { limit, offset }) => {
28441
28610
  return { items: hasMore ? rows.slice(0, limit) : rows, hasMore };
28442
28611
  }, "listPlaces");
28443
28612
 
28444
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/mentions.js
28613
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/mentions.js
28445
28614
  var accountMentionsOver = /* @__PURE__ */ __name((context) => {
28446
28615
  const { database } = context;
28447
28616
  const { findAccountPk: findAccountPk2 } = keysOver(context);
@@ -28476,7 +28645,7 @@ var mentionsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
28476
28645
  places: /* @__PURE__ */ __name(async (window) => listPlaces(context.database, window), "places")
28477
28646
  }), "mentionsStoreOver");
28478
28647
 
28479
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
28648
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/document-links.js
28480
28649
  var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messageId) => {
28481
28650
  const read2 = database.prepare("SELECT m.id, m.external_id, m.text, m.sent_at, m.sender_name, coalesce(m.sender_chat_external_id, i.external_id) AS sender_id FROM messages m LEFT JOIN identities i ON i.id = m.sender_identity_id WHERE m.chat_id = ? AND m.deleted_at IS NULL AND (m.text LIKE '%google.com%' OR m.text LIKE '%forms.gle%') " + (messageId === void 0 ? "" : "AND m.external_id = ? ") + "ORDER BY m.sent_at DESC, m.id DESC");
28482
28651
  const rows = messageId === void 0 ? read2.all(chatKey) : read2.all(chatKey, messageId);
@@ -28491,7 +28660,7 @@ var documentLinkMessages = /* @__PURE__ */ __name(({ database }, chatKey, messag
28491
28660
  }));
28492
28661
  }, "documentLinkMessages");
28493
28662
 
28494
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
28663
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/follow-ups.js
28495
28664
  var stemmerFor = stemmerCache();
28496
28665
  var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit }) => {
28497
28666
  if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
@@ -28535,7 +28704,7 @@ var laterSharingRare = /* @__PURE__ */ __name((context, wanted, { rareAt, limit
28535
28704
  });
28536
28705
  }, "laterSharingRare");
28537
28706
 
28538
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/messages.js
28707
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/messages.js
28539
28708
  var accountMessagesOver = /* @__PURE__ */ __name((context) => {
28540
28709
  const { database } = context;
28541
28710
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf, chatPkFor: chatPkFor2, answeredChatPk: answeredChatPk2, upsertMessage: upsertMessage2 } = keysOver(context);
@@ -28670,7 +28839,7 @@ var messagesStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
28670
28839
  laterSharingRare: /* @__PURE__ */ __name(async (wanted, options) => laterSharingRare(context, wanted, options), "laterSharingRare")
28671
28840
  }), "messagesStoreOver");
28672
28841
 
28673
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
28842
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/person-preparation.js
28674
28843
  var GLOBAL_PROJECT = "SELECT id FROM main.projects WHERE account_id IS NULL AND deleted_at IS NULL";
28675
28844
  var iso5 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
28676
28845
  var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: accounts2, limit }) => {
@@ -28727,7 +28896,7 @@ var personPreparation = /* @__PURE__ */ __name(({ database }, uid, { accounts: a
28727
28896
  });
28728
28897
  }, "personPreparation");
28729
28898
 
28730
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
28899
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/person-scope.js
28731
28900
  var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds) => {
28732
28901
  const id2 = Number(uid);
28733
28902
  if (!/^[1-9]\d*$/.test(uid) || !Number.isSafeInteger(id2) || !accountIds.length || accountIds.length > 1e3 || accountIds.some((account) => !Number.isSafeInteger(account) || account <= 0))
@@ -28735,7 +28904,7 @@ var personSeenInAccounts = /* @__PURE__ */ __name(({ database }, uid, accountIds
28735
28904
  return Boolean(database.prepare("SELECT 1 FROM persons p JOIN identity_links l ON l.person_id=p.id JOIN account_identities a ON a.identity_id=l.identity_id WHERE p.id=? AND a.account_id IN (SELECT value FROM json_each(?)) LIMIT 1").get(id2, JSON.stringify(accountIds)));
28736
28905
  }, "personSeenInAccounts");
28737
28906
 
28738
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
28907
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/private-people.js
28739
28908
  var required2 = /* @__PURE__ */ __name(({ database }, key2, personId) => {
28740
28909
  const row2 = database.prepare("SELECT a.id AS account_id, i.id AS identity_id FROM accounts a JOIN account_identities ai ON ai.account_id=a.id JOIN identities i ON i.id=ai.identity_id WHERE a.provider=? AND a.external_id=? AND i.provider=? AND i.external_id=?").get(key2.provider, key2.account, key2.provider, personId);
28741
28910
  if (!row2)
@@ -28801,7 +28970,7 @@ var removeNote = /* @__PURE__ */ __name((context, key2, personId, id2) => {
28801
28970
  return { id: id2, personId, removed: true };
28802
28971
  }, "removeNote");
28803
28972
 
28804
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/people.js
28973
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/people.js
28805
28974
  var accountPeopleOver = /* @__PURE__ */ __name((context) => {
28806
28975
  const { database } = context;
28807
28976
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, identityPk: identityPk2 } = keysOver(context);
@@ -28886,13 +29055,13 @@ var peopleStoreOver = /* @__PURE__ */ __name((context, keyed) => {
28886
29055
  };
28887
29056
  }, "peopleStoreOver");
28888
29057
 
28889
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
29058
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
28890
29059
  import { createHash as createHash9 } from "node:crypto";
28891
29060
 
28892
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
29061
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
28893
29062
  import { createHash as createHash8 } from "node:crypto";
28894
29063
 
28895
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
29064
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
28896
29065
  var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
28897
29066
  var AUTHOR_MEASURES = [
28898
29067
  "messages",
@@ -29032,7 +29201,7 @@ var withoutUrls = /* @__PURE__ */ __name((text6) => text6.replace(/\S+/gu, (toke
29032
29201
  var rankingWords = /* @__PURE__ */ __name((text6) => withoutUrls(text6).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
29033
29202
  var rankingQuestion = /* @__PURE__ */ __name((text6) => withoutUrls(text6).includes("?"), "rankingQuestion");
29034
29203
 
29035
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
29204
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/domain/rankings-graph.js
29036
29205
  var RANKING_GRAPH_LIMITS = { nodes: 5e4, depth: 256, work: 1e7, bytes: 8388608 };
29037
29206
  var exhausted2 = /* @__PURE__ */ __name((budget) => {
29038
29207
  throw new CliError("validation_error", `ranking exceeded ${budget} \u2014 narrow its chat or date scope`, {
@@ -29254,7 +29423,7 @@ var rankReplyGraph = /* @__PURE__ */ __name((nodes, check3 = () => {
29254
29423
  };
29255
29424
  }, "rankReplyGraph");
29256
29425
 
29257
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
29426
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/domain/admin-statistics.js
29258
29427
  var adminEntityKey = /* @__PURE__ */ __name((row2) => JSON.stringify([row2.account.provider, row2.account.account, row2.id]), "adminEntityKey");
29259
29428
  var personKey = /* @__PURE__ */ __name((node) => JSON.stringify([node.account.provider, node.account.account, node.sender]), "personKey");
29260
29429
  var locator = /* @__PURE__ */ __name((node) => formatLocator({ ...node.account, chat: node.chatId, message: node.id }), "locator");
@@ -29428,7 +29597,7 @@ var calculateAdminStatistics = /* @__PURE__ */ __name((nodes, stays, options, in
29428
29597
  return { items, evidence, summary, graph: graph.quality };
29429
29598
  }, "calculateAdminStatistics");
29430
29599
 
29431
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
29600
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/domain/rankings-range.js
29432
29601
  var rankingContextRange = /* @__PURE__ */ __name((root) => {
29433
29602
  const dates = [];
29434
29603
  const visit = /* @__PURE__ */ __name((node, required3) => {
@@ -29450,7 +29619,7 @@ var rankingContextRange = /* @__PURE__ */ __name((root) => {
29450
29619
  return dates[0].node.resolution.date;
29451
29620
  }, "rankingContextRange");
29452
29621
 
29453
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
29622
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/rankings.js
29454
29623
  var reactionCounts = /* @__PURE__ */ __name((stored3) => {
29455
29624
  let counts;
29456
29625
  try {
@@ -29745,7 +29914,7 @@ var rankQuery = /* @__PURE__ */ __name((context, execution, request, inspect) =>
29745
29914
  });
29746
29915
  }, "rankQuery");
29747
29916
 
29748
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
29917
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/admin-statistics.js
29749
29918
  function fail4(message2, reason = "query.too-large") {
29750
29919
  throw new CliError("validation_error", message2, { reason, complete: false });
29751
29920
  }
@@ -29922,7 +30091,7 @@ var adminStatisticsQuery = /* @__PURE__ */ __name((context, execution, request)
29922
30091
  return result;
29923
30092
  }), "adminStatisticsQuery");
29924
30093
 
29925
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
30094
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/conversation-eligibility.js
29926
30095
  var conversationEligibility = /* @__PURE__ */ __name(async (context, execution) => {
29927
30096
  if (!execution.accounts.length)
29928
30097
  return { conversations: [], chats: [] };
@@ -29940,7 +30109,7 @@ var conversationEligibility = /* @__PURE__ */ __name(async (context, execution)
29940
30109
  return { conversations: conversations2, chats: chats2 };
29941
30110
  }, "conversationEligibility");
29942
30111
 
29943
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
30112
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/ranking-evidence.js
29944
30113
  import { createHash as createHash10 } from "node:crypto";
29945
30114
  var EVIDENCE_BYTES = 64 * 1024;
29946
30115
  var FINGERPRINT_BYTES = 8 * 1024 * 1024;
@@ -30090,7 +30259,7 @@ var rankingEvidence = /* @__PURE__ */ __name((context, execution, request) => {
30090
30259
  return result;
30091
30260
  }, "rankingEvidence");
30092
30261
 
30093
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
30262
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/reply-times.js
30094
30263
  var FAR = Number.MAX_SAFE_INTEGER;
30095
30264
  var chatsIn = /* @__PURE__ */ __name((scope3, kinds2) => {
30096
30265
  const params = [...scope3.accounts.flatMap(({ provider, account }) => [provider, account]), ...kinds2];
@@ -30184,7 +30353,7 @@ var waitingChats = /* @__PURE__ */ __name((context, scope3, waits, cap) => {
30184
30353
  });
30185
30354
  }, "waitingChats");
30186
30355
 
30187
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/queries.js
30356
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/queries.js
30188
30357
  var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
30189
30358
  const mailIndexed = /* @__PURE__ */ __name((execution) => {
30190
30359
  if (execution.corpus === "mail")
@@ -30205,7 +30374,7 @@ var queriesStoreOver = /* @__PURE__ */ __name((context, stemmerFor2) => {
30205
30374
  };
30206
30375
  }, "queriesStoreOver");
30207
30376
 
30208
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
30377
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/chat-events.js
30209
30378
  var saveChatEvents = /* @__PURE__ */ __name((context, accountKey, provider, chatKey, events3) => {
30210
30379
  const { database, now: now2 } = context;
30211
30380
  const insert = database.prepare(`INSERT INTO chat_events (chat_id, source_id, action, actor_identity_id, title, happened_at, created_at, updated_at)
@@ -30244,10 +30413,10 @@ var chatEventsOf = /* @__PURE__ */ __name(({ database }, chatKey, { since = 0, l
30244
30413
  }));
30245
30414
  }, "chatEventsOf");
30246
30415
 
30247
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
30416
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
30248
30417
  import { createHash as createHash11 } from "node:crypto";
30249
30418
 
30250
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/calendar.js
30419
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/domain/calendar.js
30251
30420
  var calendarKey = /* @__PURE__ */ __name((zone, by) => {
30252
30421
  const format = new Intl.DateTimeFormat("en-CA", {
30253
30422
  timeZone: zone,
@@ -30261,8 +30430,13 @@ var calendarKey = /* @__PURE__ */ __name((zone, by) => {
30261
30430
  return `${part.year}-${part.month}-${part.day}${by === "hour" ? `T${part.hour}` : ""}`;
30262
30431
  };
30263
30432
  }, "calendarKey");
30433
+ var weekKey = /* @__PURE__ */ __name((day) => {
30434
+ const date3 = /* @__PURE__ */ new Date(`${day}T00:00:00Z`);
30435
+ date3.setUTCDate(date3.getUTCDate() - (date3.getUTCDay() + 6) % 7);
30436
+ return date3.toISOString().slice(0, 10);
30437
+ }, "weekKey");
30264
30438
 
30265
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/retention.js
30439
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/domain/retention.js
30266
30440
  var RETENTION_TOLERANCE = 864e5;
30267
30441
  var validateRetentionOptions = /* @__PURE__ */ __name((options) => {
30268
30442
  const { since, until, cutoff, checkpoints, within, limit, by } = options;
@@ -30316,13 +30490,8 @@ var retentionCohorts = /* @__PURE__ */ __name((stays, options) => {
30316
30490
  return [...groups.values()].sort((a, b) => a.cohort.localeCompare(b.cohort));
30317
30491
  }, "retentionCohorts");
30318
30492
 
30319
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
30493
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/retention.js
30320
30494
  var iso6 = /* @__PURE__ */ __name((at) => new Date(at).toISOString(), "iso");
30321
- var week = /* @__PURE__ */ __name((day) => {
30322
- const date3 = /* @__PURE__ */ new Date(`${day}T00:00:00Z`);
30323
- date3.setUTCDate(date3.getUTCDate() - (date3.getUTCDay() + 6) % 7);
30324
- return date3.toISOString().slice(0, 10);
30325
- }, "week");
30326
30495
  var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId, options, evidence) => {
30327
30496
  validateRetentionOptions(options);
30328
30497
  if (options.cutoff > context.now())
@@ -30343,7 +30512,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
30343
30512
  const activityStatement = database.prepare(`SELECT min(sent_at) AS at FROM messages WHERE chat_id=? AND sender_identity_id=? AND deleted_at IS NULL AND sent_at >= ? AND sent_at < ?`);
30344
30513
  const stays = raw.map((row2) => {
30345
30514
  const joinedAt = Number(row2.joined_at), pk = Number(row2.pk), end = joinedAt + options.within;
30346
- const day = dayOf2(joinedAt), cohort = options.by === "week" ? week(day) : day;
30515
+ const day = dayOf2(joinedAt), cohort = options.by === "week" ? weekKey(day) : day;
30347
30516
  const absence = departureStatement.get(chatPk, Math.max(joinedAt, Number(row2.first_seen_at)), options.cutoff, pk);
30348
30517
  const upper = absence ? Number(absence.observed_at) : null;
30349
30518
  const positive2 = lastPositiveStatement.get(pk, upper ?? options.cutoff + 1);
@@ -30452,7 +30621,7 @@ var retentionQuery = /* @__PURE__ */ __name((context, accountPk2, chatPk, chatId
30452
30621
  };
30453
30622
  }, "retentionQuery");
30454
30623
 
30455
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
30624
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/roster.js
30456
30625
  var iso7 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
30457
30626
  var marksOf = /* @__PURE__ */ __name(({ isBot, flagged, deleted, hasPhoto }) => ({
30458
30627
  ...isBot === void 0 ? {} : { bot: isBot },
@@ -30583,7 +30752,7 @@ var trackedChats = /* @__PURE__ */ __name((context, accountKey, where) => contex
30583
30752
  lastCount: memberCountsOf(context, pk).at(-1) ?? null
30584
30753
  })), "trackedChats");
30585
30754
 
30586
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/roster.js
30755
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/roster.js
30587
30756
  var rosterStoreOver = /* @__PURE__ */ __name((context) => {
30588
30757
  const { database } = context;
30589
30758
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, writeMembers: writeMembers2 } = keysOver(context);
@@ -30639,7 +30808,7 @@ var rosterStoreOver = /* @__PURE__ */ __name((context) => {
30639
30808
  };
30640
30809
  }, "rosterStoreOver");
30641
30810
 
30642
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
30811
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/backfill.js
30643
30812
  var pendingNormalization = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM messages WHERE normalized_text IS NULL AND deleted_at IS NULL").get()?.n), "pendingNormalization");
30644
30813
  var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatch, until = /* @__PURE__ */ __name(() => false, "until") } = {}) => {
30645
30814
  const next = database.prepare(`SELECT id AS pk, text FROM messages WHERE normalized_text IS NULL AND deleted_at IS NULL AND id > ? ORDER BY id LIMIT ?`);
@@ -30663,7 +30832,7 @@ var backfillNormalized = /* @__PURE__ */ __name((database, { batch = 5e3, onBatc
30663
30832
  }
30664
30833
  }, "backfillNormalized");
30665
30834
 
30666
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
30835
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/search-index.js
30667
30836
  var INDEX2 = "message_words";
30668
30837
  var searchIndexState2 = /* @__PURE__ */ __name((database) => {
30669
30838
  const row2 = indexRow(database, INDEX2);
@@ -30790,7 +30959,7 @@ var resetSearchIndex = /* @__PURE__ */ __name((database) => {
30790
30959
  });
30791
30960
  }, "resetSearchIndex");
30792
30961
 
30793
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
30962
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/stems-fill.js
30794
30963
  var fillStems = /* @__PURE__ */ __name((database, { batch = 5e3, until = /* @__PURE__ */ __name(() => false, "until"), onBatch, now: now2 = Date.now } = {}) => {
30795
30964
  const filled2 = { stemmed: 0, drained: 0 };
30796
30965
  const before2 = stemsState(database);
@@ -30885,7 +31054,7 @@ var followDefaultStemmers = /* @__PURE__ */ __name((database, now2 = Date.now) =
30885
31054
  return resetStems(database, { now: now2 });
30886
31055
  }, "followDefaultStemmers");
30887
31056
 
30888
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
31057
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/words.js
30889
31058
  var VOCABULARY = "SELECT term, doc FROM message_words_vocab WHERE col = 'normalized_text'";
30890
31059
  var knownTerms = /* @__PURE__ */ __name(({ database }, terms2) => {
30891
31060
  const lookup = database.prepare(`${VOCABULARY} AND term >= ? AND term <= ? LIMIT 1`);
@@ -30907,7 +31076,7 @@ var termCandidates = /* @__PURE__ */ __name(({ database }, pieces, { shortest, l
30907
31076
  });
30908
31077
  }, "termCandidates");
30909
31078
 
30910
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/search-index.js
31079
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/search-index.js
30911
31080
  var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
30912
31081
  const { database } = context;
30913
31082
  const stemmerFor2 = stemmerCache();
@@ -30929,7 +31098,7 @@ var searchIndexStoreOver = /* @__PURE__ */ __name((context) => {
30929
31098
  };
30930
31099
  }, "searchIndexStoreOver");
30931
31100
 
30932
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
31101
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/searches.js
30933
31102
  var HISTORY_KEPT = 1e3;
30934
31103
  var commandFilter = /* @__PURE__ */ __name((commands) => commands ? { sql: ` AND command IN (${commands.map(() => "?").join(", ")})`, values: [...commands] } : { sql: "", values: [] }, "commandFilter");
30935
31104
  var COLUMNS5 = "id, name, command, params, language, version, fields_version, created_at, updated_at, last_run_at, runs";
@@ -30998,7 +31167,7 @@ var clearHistory = /* @__PURE__ */ __name(({ database }, commands) => {
30998
31167
  return database.prepare(`DELETE FROM searches WHERE name IS NULL${only.sql}`).run(...only.values).changes;
30999
31168
  }, "clearHistory");
31000
31169
 
31001
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/searches.js
31170
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/searches.js
31002
31171
  var searchesStoreOver = /* @__PURE__ */ __name((context) => {
31003
31172
  const { database } = context;
31004
31173
  return {
@@ -31022,7 +31191,7 @@ var searchesStoreOver = /* @__PURE__ */ __name((context) => {
31022
31191
  };
31023
31192
  }, "searchesStoreOver");
31024
31193
 
31025
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
31194
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/agent-actions.js
31026
31195
  var ACTION_TIERS = ["read", "draft", "write-private", "write-public", "destructive", "admin"];
31027
31196
  var ACTION_OUTCOMES = ["ok", "refused", "failed"];
31028
31197
  var CODE = /^[a-z][a-z0-9_]{0,63}$/;
@@ -31065,7 +31234,7 @@ var agentActionsStoreOver = /* @__PURE__ */ __name((context, afterRecord = () =>
31065
31234
  };
31066
31235
  }, "agentActionsStoreOver");
31067
31236
 
31068
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
31237
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/bot-updates.js
31069
31238
  var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
31070
31239
  }) => {
31071
31240
  const { database, now: now2 } = context;
@@ -31124,7 +31293,7 @@ var botUpdateStoreOver = /* @__PURE__ */ __name((context, afterSave = () => {
31124
31293
  };
31125
31294
  }, "botUpdateStoreOver");
31126
31295
 
31127
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
31296
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-events.js
31128
31297
  var DAY4 = 864e5;
31129
31298
  var accountsOf = /* @__PURE__ */ __name((filter) => {
31130
31299
  if (filter.accountIds !== void 0 && filter.accountId !== void 0)
@@ -31233,7 +31402,7 @@ var listEvents = /* @__PURE__ */ __name((database, filter) => {
31233
31402
  return database.prepare(`SELECT e.* FROM events e WHERE ${clauses.join(" AND ")} ORDER BY ${filter.newest ? "e.starts_at DESC, e.id DESC" : "e.starts_at, e.id"} LIMIT ? OFFSET ?`).all(...params, limit, offset).map(eventOf);
31234
31403
  }, "listEvents");
31235
31404
 
31236
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
31405
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar-forget.js
31237
31406
  var distinctIds = /* @__PURE__ */ __name((rows) => [...new Set(rows.map((row2) => Number(row2.id)))], "distinctIds");
31238
31407
  var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, accountId, cursorKey: cursorKey2, now: now2 }, refresh) => {
31239
31408
  const unseenBefore = unreferenced(database, "identities");
@@ -31288,7 +31457,7 @@ var forgetCalendarRows = /* @__PURE__ */ __name((database, { calendarId, account
31288
31457
  return { entries: entryIds.length, events: goneEvents.length };
31289
31458
  }, "forgetCalendarRows");
31290
31459
 
31291
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
31460
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/calendar.js
31292
31461
  var calendarOf = /* @__PURE__ */ __name((row2) => ({
31293
31462
  id: Number(row2.id),
31294
31463
  accountId: Number(row2.account_id),
@@ -31875,7 +32044,7 @@ var eventStoreOver = /* @__PURE__ */ __name((context) => {
31875
32044
  };
31876
32045
  }, "eventStoreOver");
31877
32046
 
31878
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
32047
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/catalog.js
31879
32048
  var CATALOG_QUERY = defineQuery({
31880
32049
  entity: "document",
31881
32050
  backend: "sql",
@@ -32117,7 +32286,7 @@ var catalogStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => {
32117
32286
  };
32118
32287
  }, "catalogStoreOver");
32119
32288
 
32120
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
32289
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/context-document-source.js
32121
32290
  var drive = "CASE WHEN json_valid(n.front_matter) THEN json_extract(n.front_matter,'$.source')='google-drive' ELSE 0 END";
32122
32291
  var field3 = /* @__PURE__ */ __name((name) => `CASE WHEN (${drive}) THEN
32123
32292
  CASE WHEN json_type(n.front_matter,'$.${name}')='text' THEN json_extract(n.front_matter,'$.${name}') END END`, "field");
@@ -32130,7 +32299,7 @@ var contextDocumentTimeKind = `CASE WHEN (${remoteTime}) IS NOT NULL
32130
32299
  THEN 'source-modified' ELSE 'stored-update' END`;
32131
32300
  var contextDocumentUrl = `coalesce(${preferred("url")},n.url,${field3("sourceUrl")})`;
32132
32301
 
32133
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
32302
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/context-meeting-source.js
32134
32303
  var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
32135
32304
  const { source: source2, words: words3, after: after2, before: before2, limit, maxReadBytes, cursor, signal } = request;
32136
32305
  signal?.throwIfAborted();
@@ -32229,7 +32398,7 @@ var readMeetingContextEvidence = /* @__PURE__ */ __name((database, request) => {
32229
32398
  });
32230
32399
  }, "readMeetingContextEvidence");
32231
32400
 
32232
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
32401
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/context-evidence.js
32233
32402
  var corpora = {
32234
32403
  message: {
32235
32404
  table: "messages",
@@ -32468,7 +32637,7 @@ var contextRecordsOver = /* @__PURE__ */ __name(({ database }) => ({
32468
32637
  }
32469
32638
  }), "contextRecordsOver");
32470
32639
 
32471
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
32640
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/note-search.js
32472
32641
  var NOTE_FIELDS = [
32473
32642
  "text",
32474
32643
  "exact",
@@ -32898,7 +33067,7 @@ var noteSearchOver = /* @__PURE__ */ __name((context) => {
32898
33067
  };
32899
33068
  }, "noteSearchOver");
32900
33069
 
32901
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
33070
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/event-search.js
32902
33071
  var EVENT_FIELDS = ["text", "exact", "body", "title", "date", "in"];
32903
33072
  var inEventAccounts = /* @__PURE__ */ __name((event) => searchableCopy(event, "c.account_id IN (SELECT CAST(value AS INTEGER) FROM json_each(?))"), "inEventAccounts");
32904
33073
  var EVENT_CORPUS = {
@@ -33030,7 +33199,7 @@ var eventSearchOver = /* @__PURE__ */ __name((context) => {
33030
33199
  };
33031
33200
  }, "eventSearchOver");
33032
33201
 
33033
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
33202
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/finance.js
33034
33203
  var refuse2 = /* @__PURE__ */ __name((message2, reason, code = "validation_error") => {
33035
33204
  throw new CliError(code, message2, { reason });
33036
33205
  }, "refuse");
@@ -33465,7 +33634,7 @@ var financeStoreOver = /* @__PURE__ */ __name((context) => {
33465
33634
  };
33466
33635
  }, "financeStoreOver");
33467
33636
 
33468
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
33637
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-entries.js
33469
33638
  var refuse3 = /* @__PURE__ */ __name((message2, reason) => {
33470
33639
  throw new CliError("validation_error", message2, { reason });
33471
33640
  }, "refuse");
@@ -33543,7 +33712,7 @@ var paymentEntriesOver = /* @__PURE__ */ __name((context) => {
33543
33712
  };
33544
33713
  }, "paymentEntriesOver");
33545
33714
 
33546
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
33715
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/evidence-findings.js
33547
33716
  var EVIDENCE_FINDINGS_KIND = "evidence_findings";
33548
33717
  var reference = /* @__PURE__ */ __name((raw) => {
33549
33718
  if (/^(document|note):[1-9]\d*$/.test(raw))
@@ -33569,7 +33738,7 @@ var validateEvidenceFindings = /* @__PURE__ */ __name((input) => {
33569
33738
  return valid;
33570
33739
  }, "validateEvidenceFindings");
33571
33740
 
33572
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/moment.js
33741
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/domain/moment.js
33573
33742
  var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false } = {}) => {
33574
33743
  try {
33575
33744
  return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
@@ -33581,7 +33750,7 @@ var calendarMoment = /* @__PURE__ */ __name((wanted, flag6, { zone, end = false
33581
33750
  }
33582
33751
  }, "calendarMoment");
33583
33752
 
33584
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
33753
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/facts.js
33585
33754
  var NAMED3 = "SELECT f.*, b.name AS author_name, b.kind AS author_kind FROM facts f LEFT JOIN bots b ON f.author_type = 'bot' AND b.id = f.author_id";
33586
33755
  var iso9 = /* @__PURE__ */ __name((value) => new Date(Number(value)).toISOString(), "iso");
33587
33756
  var oneOf5 = /* @__PURE__ */ __name((value, allowed, what) => {
@@ -33763,7 +33932,7 @@ var factsStoreOver = /* @__PURE__ */ __name((context) => {
33763
33932
  };
33764
33933
  }, "factsStoreOver");
33765
33934
 
33766
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
33935
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/findings-core.js
33767
33936
  var invalid4 = /* @__PURE__ */ __name((message2) => {
33768
33937
  throw new CliError("validation_error", message2);
33769
33938
  }, "invalid");
@@ -33865,7 +34034,7 @@ var findingsCoreOver = /* @__PURE__ */ __name((context, kind4) => {
33865
34034
  return { snapshot: snapshot2, snapshotParts, previous, outcomes, create };
33866
34035
  }, "findingsCoreOver");
33867
34036
 
33868
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
34037
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/proposed-actions.js
33869
34038
  var PROPOSAL_STATUSES = ["proposed", "approved", "rejected", "executed", "failed"];
33870
34039
  var PROPOSAL_VERDICTS = ["useful", "not_useful"];
33871
34040
  var iso10 = /* @__PURE__ */ __name((value) => value == null ? null : new Date(Number(value)).toISOString(), "iso");
@@ -34030,7 +34199,7 @@ var proposedActionsStoreOver = /* @__PURE__ */ __name((context) => {
34030
34199
  };
34031
34200
  }, "proposedActionsStoreOver");
34032
34201
 
34033
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
34202
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/evidence-findings.js
34034
34203
  var stale = /* @__PURE__ */ __name(() => {
34035
34204
  throw new CliError("validation_error", "evidence findings changed since they were read; stage a new batch", {
34036
34205
  reason: "evidence-findings.stale"
@@ -34211,7 +34380,7 @@ var evidenceFindingsStoreOver = /* @__PURE__ */ __name((context) => {
34211
34380
  };
34212
34381
  }, "evidenceFindingsStoreOver");
34213
34382
 
34214
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
34383
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/involvements.js
34215
34384
  var pendingInvolvements = /* @__PURE__ */ __name((database) => Number(database.prepare("SELECT count(*) AS n FROM involvement_pending").get()?.n ?? 0), "pendingInvolvements");
34216
34385
  var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => ({
34217
34386
  rebuild: /* @__PURE__ */ __name((personId) => write(database, () => {
@@ -34264,7 +34433,7 @@ var involvementStoreOver = /* @__PURE__ */ __name(({ database, now: now2 }) => (
34264
34433
  }, "forPerson")
34265
34434
  }), "involvementStoreOver");
34266
34435
 
34267
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
34436
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-projects.js
34268
34437
  import { createHash as createHash12 } from "node:crypto";
34269
34438
  var fields3 = "id,from_id,to_id,source,confirmed,updated_at,length(evidence) AS evidenceLength,substr(evidence,1,2000) AS evidence";
34270
34439
  var id = /* @__PURE__ */ __name((value) => {
@@ -34350,7 +34519,7 @@ var meetingProjectsStoreOver = /* @__PURE__ */ __name(({ database, now: now2 })
34350
34519
  };
34351
34520
  }, "meetingProjectsStoreOver");
34352
34521
 
34353
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
34522
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/relation-proposals.js
34354
34523
  var relationOf = /* @__PURE__ */ __name((link3) => ({
34355
34524
  id: link3.id,
34356
34525
  from: link3.from,
@@ -34576,16 +34745,16 @@ var decidedOrigin = /* @__PURE__ */ __name((by) => by === "owner" ? { origin: "o
34576
34745
  provenance: `agent:${by.bot} for the owner: ${by.reason.trim()}`
34577
34746
  }, "decidedOrigin");
34578
34747
 
34579
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
34748
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
34580
34749
  import { createHash as createHash15 } from "node:crypto";
34581
34750
 
34582
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
34751
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
34583
34752
  import { createHash as createHash14 } from "node:crypto";
34584
34753
 
34585
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
34754
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
34586
34755
  import { createHash as createHash13 } from "node:crypto";
34587
34756
 
34588
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
34757
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-input.js
34589
34758
  var consolidationId = /* @__PURE__ */ __name((value, field4) => {
34590
34759
  if (typeof value !== "string" || !/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
34591
34760
  throw new CliError("validation_error", `${field4} must be a positive canonical tag id`);
@@ -34636,7 +34805,7 @@ var consolidationApplyInput = /* @__PURE__ */ __name((options) => {
34636
34805
  return input;
34637
34806
  }, "consolidationApplyInput");
34638
34807
 
34639
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
34808
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation-apply.js
34640
34809
  var receiptOf = /* @__PURE__ */ __name((row2) => ({
34641
34810
  id: String(row2.id),
34642
34811
  sourceId: String(row2.source_id),
@@ -34711,7 +34880,7 @@ var applyTagConsolidation = /* @__PURE__ */ __name((context, preview, options) =
34711
34880
  }, { beforeCommit: check3 });
34712
34881
  }, "applyTagConsolidation");
34713
34882
 
34714
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
34883
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/tag-consolidation.js
34715
34884
  var selections = [
34716
34885
  ["taggings", "tag_id IN (SELECT value FROM json_each(?))"],
34717
34886
  ["aliases", "aliasable_type='tag' AND aliasable_id IN (SELECT value FROM json_each(?))"],
@@ -34855,7 +35024,7 @@ var previewRows = /* @__PURE__ */ __name((context, options, source2, survivor, m
34855
35024
  };
34856
35025
  }, "previewRows");
34857
35026
 
34858
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
35027
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/vocabulary.js
34859
35028
  var kinds = ["project", "tag", "topic"];
34860
35029
  var cancelled2 = /* @__PURE__ */ __name((signal) => {
34861
35030
  if (signal?.aborted)
@@ -35119,7 +35288,7 @@ var vocabularyStoreOver = /* @__PURE__ */ __name((context) => {
35119
35288
  };
35120
35289
  }, "vocabularyStoreOver");
35121
35290
 
35122
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
35291
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/knowledge.js
35123
35292
  var TYPED_KEY_PREFIXES = new Set(Object.values(TASK_KEY_PREFIXES));
35124
35293
  var ORGANIZATION_KINDS = ["company", "team", "family", "community"];
35125
35294
  var PROJECT_TYPES = ["work", "client", "personal", "oss", "other"];
@@ -35676,7 +35845,7 @@ var projectKey = /* @__PURE__ */ __name((name) => {
35676
35845
  return key2.padEnd(3, "X");
35677
35846
  }, "projectKey");
35678
35847
 
35679
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
35848
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/log-pruning.js
35680
35849
  var DAY5 = 864e5;
35681
35850
  var SETTING4 = "logs_pruned_at";
35682
35851
  var LOG_RETENTION = { agentActionsMs: 90 * DAY5, botUpdatePayloadsMs: 30 * DAY5 };
@@ -35703,7 +35872,7 @@ var logPruner = /* @__PURE__ */ __name((database, now2) => {
35703
35872
  };
35704
35873
  }, "logPruner");
35705
35874
 
35706
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/mail/findings.js
35875
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/mail/findings.js
35707
35876
  var MAIL_FINDINGS_PER_RUN = 30;
35708
35877
  var MAIL_FINDINGS_PER_SENDER = 5;
35709
35878
  var invalid6 = /* @__PURE__ */ __name((message2) => {
@@ -35829,7 +35998,7 @@ var validateMailFindings = /* @__PURE__ */ __name((input) => {
35829
35998
  }, "validateMailFindings");
35830
35999
  var mailFindingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "mailFindingFingerprint");
35831
36000
 
35832
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
36001
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/mail-findings.js
35833
36002
  var stale2 = /* @__PURE__ */ __name(() => {
35834
36003
  throw new CliError("validation_error", "mail findings cite mail that changed since it was read; stage a new batch", {
35835
36004
  reason: "mail-findings.stale"
@@ -36119,7 +36288,7 @@ ${evidence.join("\n")}`, agent);
36119
36288
  };
36120
36289
  }, "mailFindingsStoreOver");
36121
36290
 
36122
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
36291
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-findings.js
36123
36292
  var stale3 = /* @__PURE__ */ __name(() => {
36124
36293
  throw new CliError("validation_error", "meeting findings changed since they were read; stage a new batch", {
36125
36294
  reason: "meeting-findings.stale"
@@ -36287,7 +36456,7 @@ var meetingFindingsStoreOver = /* @__PURE__ */ __name((context) => {
36287
36456
  };
36288
36457
  }, "meetingFindingsStoreOver");
36289
36458
 
36290
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
36459
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/meeting-vectors.js
36291
36460
  var RANK_BATCH = 512;
36292
36461
  var LIVE3 = "FROM chunks k JOIN meeting_transcripts t ON k.chunkable_type = 'meeting_transcript' AND t.id = k.chunkable_id JOIN meetings m ON m.id = t.meeting_id WHERE m.account_id = ? AND m.deleted_at IS NULL AND t.deleted_at IS NULL AND t.superseded_at IS NULL";
36293
36462
  var limitOf = /* @__PURE__ */ __name((value, name, max = 1e3) => {
@@ -36558,7 +36727,7 @@ var meetingVectorsOver = /* @__PURE__ */ __name((context) => ({
36558
36727
  }
36559
36728
  }), "meetingVectorsOver");
36560
36729
 
36561
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
36730
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/mention-sources.js
36562
36731
  var OTHER_SOURCES = ["document", "note", "email"];
36563
36732
  var TEXTS = {
36564
36733
  document: "JOIN documents s ON mn.source_type = 'document' AND s.id = mn.source_id AND s.deleted_at IS NULL WHERE 1 ",
@@ -36659,11 +36828,11 @@ var sourceMentionStoreOver = /* @__PURE__ */ __name((context) => {
36659
36828
  };
36660
36829
  }, "sourceMentionStoreOver");
36661
36830
 
36662
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
36831
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
36663
36832
  import { mkdirSync, statSync, writeFileSync } from "node:fs";
36664
36833
  import { dirname } from "node:path";
36665
36834
 
36666
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
36835
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/clients.js
36667
36836
  import { readFileSync as readFileSync3 } from "node:fs";
36668
36837
  var CLIENTS_SETTING = "clients";
36669
36838
  var coreVersion = (() => {
@@ -36721,7 +36890,7 @@ var refusalAdvice = /* @__PURE__ */ __name((clients, command, schema) => {
36721
36890
  return mover ? `${own} (${mover.command} ${mover.version} moved the store to schema ${schema})` : own;
36722
36891
  }, "refusalAdvice");
36723
36892
 
36724
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
36893
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/migrations.generated.js
36725
36894
  var GENERATED = [
36726
36895
  {
36727
36896
  "name": "20261010184427_initial",
@@ -37688,7 +37857,7 @@ WHERE json_type(params, '$.selection') = 'object';`
37688
37857
  }
37689
37858
  ];
37690
37859
 
37691
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
37860
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/manifest.js
37692
37861
  var MANIFEST = [
37693
37862
  { name: "20261010184427_initial", version: 1, minCompatible: 1 },
37694
37863
  { name: "20261011035353_version-2-facts", version: 2, minCompatible: 1 },
@@ -37776,7 +37945,7 @@ var generatedMigrations = /* @__PURE__ */ __name((manifest = MANIFEST, generated
37776
37945
  return migrations;
37777
37946
  }, "generatedMigrations");
37778
37947
 
37779
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/migrations.js
37948
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/migrations.js
37780
37949
  var MIGRATIONS = generatedMigrations();
37781
37950
  var HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
37782
37951
  version INTEGER PRIMARY KEY,
@@ -37829,7 +37998,7 @@ var migrate = /* @__PURE__ */ __name((database, { migrations = MIGRATIONS, now:
37829
37998
  }
37830
37999
  }, "migrate");
37831
38000
 
37832
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
38001
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/join-keys.js
37833
38002
  var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
37834
38003
  const pending = database.prepare("SELECT id, join_url FROM meetings WHERE join_url IS NOT NULL AND join_key IS NULL AND id > ? ORDER BY id LIMIT ?");
37835
38004
  if (pending.get(0, 1) === void 0)
@@ -37851,7 +38020,7 @@ var fillJoinKeys = /* @__PURE__ */ __name((database, { batch = 2e3 } = {}) => {
37851
38020
  }
37852
38021
  }, "fillJoinKeys");
37853
38022
 
37854
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
38023
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/open.js
37855
38024
  var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
37856
38025
  refuseOwnerStoreInTests(path);
37857
38026
  const opened = "Bun" in globalThis ? await openUnderBun(path, readOnly) : await openUnderNode(path, readOnly);
@@ -37865,8 +38034,8 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
37865
38034
  }, "openSqlite");
37866
38035
  var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
37867
38036
  quietSqliteWarning();
37868
- const { drizzle } = await import("./node-TL2PBNKO.js");
37869
- const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-64QIEQ37.js");
38037
+ const { drizzle } = await import("./node-SBHCG4ZC.js");
38038
+ const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-EMKROM5U.js");
37870
38039
  const client = await nodeClient(path, { readOnly });
37871
38040
  try {
37872
38041
  return { database: cacheOverNodeSqlite(client), orm: drizzle({ client }) };
@@ -37876,8 +38045,8 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
37876
38045
  }
37877
38046
  }, "openUnderNode");
37878
38047
  var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
37879
- const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-XUCC2PWC.js");
37880
- const { drizzle } = await import("./bun-KF5QK2YN.js");
38048
+ const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-PKY3JXMR.js");
38049
+ const { drizzle } = await import("./bun-SMKYTOGI.js");
37881
38050
  const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
37882
38051
  try {
37883
38052
  return { database: cacheOverBunSqlite(client), orm: drizzle({ client }) };
@@ -37887,7 +38056,7 @@ var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
37887
38056
  }
37888
38057
  }, "openUnderBun");
37889
38058
 
37890
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
38059
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/payment-facts.js
37891
38060
  var PAYMENT_FACTS_TO_MOVE = "payment_facts_to_move";
37892
38061
  var paymentOf = /* @__PURE__ */ __name((metadata3) => {
37893
38062
  try {
@@ -37955,7 +38124,7 @@ var movePaymentFacts = /* @__PURE__ */ __name((context) => {
37955
38124
  });
37956
38125
  }, "movePaymentFacts");
37957
38126
 
37958
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
38127
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/read-compatibility.js
37959
38128
  var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
37960
38129
  const ours = MIGRATIONS.at(-1)?.version ?? 0;
37961
38130
  if (!database.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='schema_migrations'").get())
@@ -37970,7 +38139,7 @@ var assertReadCompatible = /* @__PURE__ */ __name((database, command) => {
37970
38139
  throw new CliError("configuration_error", `The store requires schema ${minCompatible}, but this tool supports ${ours}; ${refusalAdvice(storeClients(database), command, version)}`);
37971
38140
  }, "assertReadCompatible");
37972
38141
 
37973
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
38142
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/suggested-links.js
37974
38143
  var SUGGESTED_LINKS_TO_MOVE = "suggested_links_to_move";
37975
38144
  var proposerOf2 = /* @__PURE__ */ __name((provenance2) => {
37976
38145
  if (provenance2?.startsWith("rule:"))
@@ -38016,7 +38185,7 @@ var moveSuggestedLinks = /* @__PURE__ */ __name((database, now2) => {
38016
38185
  });
38017
38186
  }, "moveSuggestedLinks");
38018
38187
 
38019
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
38188
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/test-accounts.js
38020
38189
  var TEST_ACCOUNTS_TO_PURGE = "test_accounts_to_purge";
38021
38190
  var TEST_PROVIDER = "chat";
38022
38191
  var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
@@ -38037,7 +38206,7 @@ var purgeTestAccounts = /* @__PURE__ */ __name((context, warn) => {
38037
38206
  }
38038
38207
  }, "purgeTestAccounts");
38039
38208
 
38040
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
38209
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/open-store.js
38041
38210
  var BACKFILL_ON_OPEN = 5e3;
38042
38211
  var NOT_WRITABLE = /* @__PURE__ */ new Set(["EACCES", "EPERM", "EROFS"]);
38043
38212
  var createWritable = /* @__PURE__ */ __name((file) => {
@@ -38102,10 +38271,10 @@ var openStoreContext = /* @__PURE__ */ __name(async ({ path, env, now: now2 = Da
38102
38271
  }
38103
38272
  }, "openStoreContext");
38104
38273
 
38105
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
38274
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
38106
38275
  import { createHash as createHash16 } from "node:crypto";
38107
38276
 
38108
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
38277
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/project-transfer/schema.js
38109
38278
  var text4 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
38110
38279
  var ref = text4(2048);
38111
38280
  var timestamp2 = pipe(number(), safeInteger(), minValue(0));
@@ -38171,7 +38340,7 @@ var projectAnnotationsSchema = strictObject({
38171
38340
  }))
38172
38341
  });
38173
38342
 
38174
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
38343
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/project-transfer/manifest.js
38175
38344
  var PROJECT_ANNOTATIONS_MAX_BYTES = 4 * 1024 * 1024;
38176
38345
  var invalid9 = /* @__PURE__ */ __name((field4) => {
38177
38346
  throw new CliError("validation_error", `invalid project annotations.${field4}`);
@@ -38275,7 +38444,7 @@ var validateProjectAnnotationsGraph = /* @__PURE__ */ __name((manifest, addition
38275
38444
  invalid9("external.unused");
38276
38445
  }, "validateProjectAnnotationsGraph");
38277
38446
 
38278
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
38447
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/project-transfer/plan.js
38279
38448
  var hash = pipe(string(), regex(/^[a-f0-9]{64}$/));
38280
38449
  var ref2 = pipe(string(), minLength(1), maxLength(2048));
38281
38450
  var targetSchema = strictObject({
@@ -38381,7 +38550,7 @@ var planBoundProjectAnnotations = /* @__PURE__ */ __name((manifest, manifest_fin
38381
38550
  };
38382
38551
  }, "planBoundProjectAnnotations");
38383
38552
 
38384
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
38553
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-model.js
38385
38554
  import { createHash as createHash17 } from "node:crypto";
38386
38555
  var text5 = /* @__PURE__ */ __name((max) => pipe(string(), minLength(1), maxLength(max)), "text");
38387
38556
  var timestamp3 = pipe(number(), safeInteger(), minValue(0));
@@ -38475,7 +38644,7 @@ var projectAnnotationSnapshotFingerprint = /* @__PURE__ */ __name((json3) => {
38475
38644
  })).digest("hex");
38476
38645
  }, "projectAnnotationSnapshotFingerprint");
38477
38646
 
38478
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
38647
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/project-transfer/request.js
38479
38648
  var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false) => {
38480
38649
  if (!request || typeof request !== "object" || Array.isArray(request))
38481
38650
  throw new CliError("validation_error", "project annotation request is required");
@@ -38492,7 +38661,7 @@ var projectAnnotationRequest = /* @__PURE__ */ __name((request, restore = false)
38492
38661
  return { snapshot: snapshot2, projectId: Number(request.project.slice(8)) };
38493
38662
  }, "projectAnnotationRequest");
38494
38663
 
38495
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
38664
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/budget.js
38496
38665
  var SnapshotBudget = class {
38497
38666
  static {
38498
38667
  __name(this, "SnapshotBudget");
@@ -38518,13 +38687,13 @@ var SnapshotBudget = class {
38518
38687
  }
38519
38688
  };
38520
38689
 
38521
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
38690
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
38522
38691
  import { createHash as createHash19 } from "node:crypto";
38523
38692
 
38524
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
38693
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot-plan.js
38525
38694
  var planProjectAnnotationSnapshot = /* @__PURE__ */ __name((json3, target, bindings) => planBoundProjectAnnotations(decodeProjectAnnotationSnapshot(json3), projectAnnotationSnapshotFingerprint(json3), target, bindings), "planProjectAnnotationSnapshot");
38526
38695
 
38527
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
38696
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/sources.js
38528
38697
  import { createHash as createHash18 } from "node:crypto";
38529
38698
  var invalid11 = /* @__PURE__ */ __name(() => {
38530
38699
  throw new CliError("configuration_error", "project snapshot has an unavailable or unsupported dependency");
@@ -38667,7 +38836,7 @@ var ProjectSnapshotSources = class {
38667
38836
  }
38668
38837
  };
38669
38838
 
38670
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
38839
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/snapshot.js
38671
38840
  var unsupported = /* @__PURE__ */ __name(() => {
38672
38841
  throw new CliError("configuration_error", "project snapshot has unsupported metadata, deletion or account scope");
38673
38842
  }, "unsupported");
@@ -38838,7 +39007,7 @@ var projectAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, bu
38838
39007
  return { snapshot: snapshot2, read_bytes: budget.bytes, records: budget.records };
38839
39008
  }), "projectAnnotationSnapshot");
38840
39009
 
38841
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
39010
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/preview.js
38842
39011
  var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, manifest, bindings, budget) => read(database, () => {
38843
39012
  const current = projectAnnotationSnapshot(database, projectId2, budget).snapshot;
38844
39013
  const sources = new ProjectSnapshotSources(database, budget);
@@ -38900,7 +39069,7 @@ var previewAnnotationSnapshot = /* @__PURE__ */ __name((database, projectId2, ma
38900
39069
  };
38901
39070
  }), "previewAnnotationSnapshot");
38902
39071
 
38903
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
39072
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/records.js
38904
39073
  var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, snapshot2, bindings) => {
38905
39074
  const mappings = { ...bindings };
38906
39075
  const resolve = /* @__PURE__ */ __name((ref3) => {
@@ -38942,7 +39111,7 @@ var restoreAnnotationRecords = /* @__PURE__ */ __name((database, projectId2, sna
38942
39111
  return mappings;
38943
39112
  }, "restoreAnnotationRecords");
38944
39113
 
38945
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
39114
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/project-transfer/store.js
38946
39115
  var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
38947
39116
  async preview(request) {
38948
39117
  const { snapshot: snapshot2, projectId: projectId2 } = projectAnnotationRequest(request);
@@ -38972,7 +39141,7 @@ var projectAnnotationStoreOver = /* @__PURE__ */ __name(({ database }) => ({
38972
39141
  }
38973
39142
  }), "projectAnnotationStoreOver");
38974
39143
 
38975
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/domain/records.js
39144
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/domain/records.js
38976
39145
  import { createHash as createHash20 } from "node:crypto";
38977
39146
  var RECORDS_SCHEMA_VERSION = 1;
38978
39147
  var RECORD_OPERATIONS = ["upsert", "delete"];
@@ -39188,7 +39357,7 @@ var envelopeOfJsonl = /* @__PURE__ */ __name((text6) => {
39188
39357
  return isObject2(header) ? { ...header, records: records2 } : header;
39189
39358
  }, "envelopeOfJsonl");
39190
39359
 
39191
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
39360
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/records.js
39192
39361
  var PROJECTED = {
39193
39362
  invoice: { roles: ["issuer", "counterparty", "project"], many: [] },
39194
39363
  payment: { roles: ["payer", "payee", "project", "settles"], many: ["settles"] }
@@ -39528,7 +39697,7 @@ var recordStoreOver = /* @__PURE__ */ __name((context) => {
39528
39697
  };
39529
39698
  }, "recordStoreOver");
39530
39699
 
39531
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
39700
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/ranges.js
39532
39701
  var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to) => {
39533
39702
  const touching = and(eq(syncRanges.chatId, chatKey), lte(syncRanges.fromKey, to + 1), gte(syncRanges.toKey, from2 - 1));
39534
39703
  let merged = { from: from2, to };
@@ -39541,7 +39710,7 @@ var markRange = /* @__PURE__ */ __name(({ orm, now: now2 }, chatKey, from2, to)
39541
39710
  }, "markRange");
39542
39711
  var ranges = /* @__PURE__ */ __name(({ orm }, chatKey) => orm.select({ from: syncRanges.fromKey, to: syncRanges.toKey }).from(syncRanges).where(eq(syncRanges.chatId, chatKey)).orderBy(syncRanges.fromKey).all(), "ranges");
39543
39712
 
39544
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
39713
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/task-analysis-marks.js
39545
39714
  var prefixOf2 = /* @__PURE__ */ __name(({ provider, account }) => `task_analysis:${provider}:${account}:`, "prefixOf");
39546
39715
  var markOf = /* @__PURE__ */ __name((prefix, row2) => ({
39547
39716
  chatId: String(row2.key).slice(prefix.length),
@@ -39562,7 +39731,7 @@ var setTaskAnalysisMark = /* @__PURE__ */ __name((database, account, { chatId, c
39562
39731
  database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(prefixOf2(account) + chatId, JSON.stringify({ ...saved, checkedAt: checkedAt ?? new Date(now2).toISOString() }), now2);
39563
39732
  }, "setTaskAnalysisMark");
39564
39733
 
39565
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
39734
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/task-rule-stops.js
39566
39735
  var keyOf4 = /* @__PURE__ */ __name(({ provider, account }) => `task_rules_until:${provider}:${account}`, "keyOf");
39567
39736
  var taskRulesStop = /* @__PURE__ */ __name((database, account) => {
39568
39737
  const row2 = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(keyOf4(account));
@@ -39572,7 +39741,7 @@ var setTaskRulesStop = /* @__PURE__ */ __name((database, account, until, now2) =
39572
39741
  database.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at").run(keyOf4(account), JSON.stringify(until), now2);
39573
39742
  }, "setTaskRulesStop");
39574
39743
 
39575
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sync.js
39744
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sync.js
39576
39745
  var syncStoreOver = /* @__PURE__ */ __name((context) => {
39577
39746
  const { database } = context;
39578
39747
  const { accountPk: accountPk2, findAccountPk: findAccountPk2, chatKeyOf, chatPkFor: chatPkFor2, identityPk: identityPk2, writeMembers: writeMembers2, writeState: writeState2 } = keysOver(context);
@@ -39631,7 +39800,7 @@ var syncStoreOver = /* @__PURE__ */ __name((context) => {
39631
39800
  };
39632
39801
  }, "syncStoreOver");
39633
39802
 
39634
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/tags.js
39803
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/tags.js
39635
39804
  var tagsStoreOver = /* @__PURE__ */ __name((context) => {
39636
39805
  const { database } = context;
39637
39806
  return {
@@ -39653,7 +39822,7 @@ var tagsStoreOver = /* @__PURE__ */ __name((context) => {
39653
39822
  };
39654
39823
  }, "tagsStoreOver");
39655
39824
 
39656
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
39825
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/image-chunks.js
39657
39826
  var IS_IMAGE = sql`(a.kind = 'photo' OR a.mime LIKE 'image/%')`;
39658
39827
  var neighbours = /* @__PURE__ */ __name(({ orm }, chatKey, messagePk, sentAt, { messages: messages2, withinMs }, side) => orm.all(sql`SELECT sender_name AS sender, text, sent_at AS sentAt FROM messages
39659
39828
  WHERE chat_id = ${chatKey} AND deleted_at IS NULL AND trim(text) <> '' AND id <> ${messagePk}
@@ -39780,7 +39949,7 @@ var savePictureChunks = /* @__PURE__ */ __name(({ orm, now: now2, database }, ac
39780
39949
  dropUnusedVectors(database, released.map(({ hash: hash2 }) => hash2));
39781
39950
  }, "savePictureChunks");
39782
39951
 
39783
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
39952
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/message-chunks.js
39784
39953
  var messagesToEmbed = /* @__PURE__ */ __name(({ orm }, accountPk2, { chatKey, model, after: after2, limit }) => orm.all(sql`SELECT m.id AS messagePk, m.text, m.sent_at AS sentAt, k.content_hash AS hash,
39785
39954
  EXISTS (SELECT 1 FROM embeddings v WHERE v.model = ${model} AND v.content_hash = k.content_hash) AS embedded
39786
39955
  FROM messages m
@@ -39869,7 +40038,7 @@ var nearestMessages = /* @__PURE__ */ __name((context, accountPk2, { limit, quer
39869
40038
  return plain2(best(found2));
39870
40039
  }, "nearestMessages");
39871
40040
 
39872
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/vectors.js
40041
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/vectors.js
39873
40042
  var accountVectorsOver = /* @__PURE__ */ __name((context, mail) => {
39874
40043
  const { database } = context;
39875
40044
  const { findAccountPk: findAccountPk2, findChatPk: findChatPk2, chatKeyOf } = keysOver(context);
@@ -40127,7 +40296,7 @@ var vectorsStoreOver = /* @__PURE__ */ __name((context, keyed) => ({
40127
40296
  embeddedHashes: /* @__PURE__ */ __name(async (model, hashes) => embeddedHashes(context, model, hashes), "embeddedHashes")
40128
40297
  }), "vectorsStoreOver");
40129
40298
 
40130
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
40299
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/store-tables.js
40131
40300
  import { existsSync, readFileSync as readFileSync4 } from "node:fs";
40132
40301
  import { dirname as dirname2, join as join2 } from "node:path";
40133
40302
  var BOOKKEEPING = ["schema_migrations", "store_settings"];
@@ -40215,10 +40384,10 @@ var lastBackup = /* @__PURE__ */ __name((path) => {
40215
40384
  }
40216
40385
  }, "lastBackup");
40217
40386
 
40218
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/providers.js
40387
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/providers.js
40219
40388
  var registerProvider2 = /* @__PURE__ */ __name((store, entry2) => store.accounts.registerProvider(entry2), "registerProvider");
40220
40389
 
40221
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
40390
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/sqlite/store-contents.js
40222
40391
  var COUNTED_TABLES = [
40223
40392
  "accounts",
40224
40393
  "chats",
@@ -40303,7 +40472,7 @@ var storeContents = /* @__PURE__ */ __name((database) => {
40303
40472
  };
40304
40473
  }, "storeContents");
40305
40474
 
40306
- // node_modules/.pnpm/@wirecat+cli-core@0.563.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5d65fbd76a6eee16c9e760ce5c7a276b/node_modules/@wirecat/cli-core/dist/store/store.js
40475
+ // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_90104be51d88dd1f434885448f73ba7c/node_modules/@wirecat/cli-core/dist/store/store.js
40307
40476
  var openStore = /* @__PURE__ */ __name(async (options = {}) => {
40308
40477
  const context = await openStoreContext(options);
40309
40478
  try {
@@ -40559,7 +40728,6 @@ export {
40559
40728
  stemmersOrigin,
40560
40729
  stemsState,
40561
40730
  stemmerCache,
40562
- isBusy,
40563
40731
  vectorIndexCounts,
40564
40732
  dropAllUnusedVectors,
40565
40733
  CHUNK_CHARS,
@@ -40583,6 +40751,7 @@ export {
40583
40751
  contextSource,
40584
40752
  contextEvidenceRequest,
40585
40753
  MAIL_AGENDA_COLUMNS,
40754
+ mailOwnText,
40586
40755
  AGENDA_COLUMNS,
40587
40756
  correctWords,
40588
40757
  THREAD_COLUMNS,
@@ -40596,10 +40765,12 @@ export {
40596
40765
  certaintyOf,
40597
40766
  savedAgentClose,
40598
40767
  MAIL_FINDINGS_KIND,
40768
+ TASK_CLOSE_KIND,
40599
40769
  DEFAULT_DECISION_POLICY,
40600
40770
  isOwnerOnlyKind,
40601
40771
  mayDecide,
40602
40772
  assertMayDecide,
40773
+ deciderAuthor,
40603
40774
  minorUnits,
40604
40775
  moneyOf,
40605
40776
  INVOICE_DIRECTIONS,
@@ -40618,6 +40789,7 @@ export {
40618
40789
  savedFirstPassPerChat,
40619
40790
  TASK_SORTS,
40620
40791
  PROJECT_TASK_FIELDS,
40792
+ withoutField,
40621
40793
  TASK_RELATION_KINDS,
40622
40794
  TASK_ROLES,
40623
40795
  historyStartKey,