@wirecat/zoom-cli 0.81.0 → 0.82.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/dist/answers.d.ts +56 -0
  2. package/dist/answers.d.ts.map +1 -1
  3. package/dist/bin/zm.js +2 -2
  4. package/dist/bundle/agent-F4TRJWWS.js +46 -0
  5. package/dist/bundle/{all-profiles-3ASMN35R.js → all-profiles-RULEKTDQ.js} +12 -12
  6. package/dist/bundle/answer-policy-6XC57AEZ.js +131 -0
  7. package/dist/bundle/{anthropic-XXI53VNI.js → anthropic-4NAQBZFL.js} +6 -6
  8. package/dist/bundle/{app-server-B7WLNZNQ.js → app-server-VLR42U5L.js} +78 -76
  9. package/dist/bundle/{bun-2FLR4IV4.js → bun-OPDGMZZQ.js} +2 -2
  10. package/dist/bundle/{bun-sqlite-3NNHTOGM.js → bun-sqlite-HC6X4AOX.js} +7 -7
  11. package/dist/bundle/{chunk-JKEMW6E4.js → chunk-274SLQNW.js} +2 -2
  12. package/dist/bundle/{chunk-IFM4G4MT.js → chunk-2CI2OEZQ.js} +4 -4
  13. package/dist/bundle/{chunk-4B335BCJ.js → chunk-2DBF2IIC.js} +5 -5
  14. package/dist/bundle/{chunk-437DLSB3.js → chunk-2GP573Q4.js} +14997 -11784
  15. package/dist/bundle/{chunk-2Z7UOXFC.js → chunk-2JHVQMVC.js} +1 -1
  16. package/dist/bundle/{chunk-D7CDHBDX.js → chunk-2SWKQ7C4.js} +1 -1
  17. package/dist/bundle/{chunk-GCAJW4SR.js → chunk-2XBDILVW.js} +1 -1
  18. package/dist/bundle/{chunk-XYQVVW4R.js → chunk-3HC5F3P7.js} +1 -1
  19. package/dist/bundle/{chunk-YUDVRFXN.js → chunk-3YM4B2GT.js} +1 -1
  20. package/dist/bundle/{chunk-AWJQ6FAX.js → chunk-434YFJAE.js} +2 -2
  21. package/dist/bundle/{chunk-G3DWMG7Y.js → chunk-4HLQ2JGK.js} +4 -4
  22. package/dist/bundle/{chunk-F5ZAN7OC.js → chunk-4N7PP76S.js} +1 -1
  23. package/dist/bundle/{chunk-WKNYNK7W.js → chunk-52Y4ETKU.js} +4 -4
  24. package/dist/bundle/{chunk-VXD65V67.js → chunk-5HAUK3I4.js} +1546 -2006
  25. package/dist/bundle/{chunk-2RFWRJFK.js → chunk-5KYQ53EF.js} +13 -9
  26. package/dist/bundle/{chunk-N62P5FY4.js → chunk-5TU7Y5UW.js} +12 -12
  27. package/dist/bundle/{chunk-2ELGSNX3.js → chunk-66ALX4ZI.js} +168 -168
  28. package/dist/bundle/{chunk-SRUAUMBL.js → chunk-676C2LE6.js} +12 -12
  29. package/dist/bundle/{chunk-N5ROXGY4.js → chunk-6CWL5BKG.js} +21 -21
  30. package/dist/bundle/{chunk-77TJ3AJH.js → chunk-6QYZP4E2.js} +3 -3
  31. package/dist/bundle/{chunk-QFK52FG6.js → chunk-6VK332XS.js} +3 -3
  32. package/dist/bundle/{chunk-BQBC2WIG.js → chunk-73MOMNLL.js} +1 -1
  33. package/dist/bundle/{chunk-EEBSKMEA.js → chunk-7QPIUMUG.js} +12 -12
  34. package/dist/bundle/{chunk-RRYHLP3A.js → chunk-7UVDPRFK.js} +6 -6
  35. package/dist/bundle/{chunk-Y7XJA4EW.js → chunk-A6EZK5RG.js} +4 -4
  36. package/dist/bundle/{chunk-IBYGNUO7.js → chunk-AC6VJNMJ.js} +1 -1
  37. package/dist/bundle/{chunk-NX3BLISW.js → chunk-ACI4YIEH.js} +6 -6
  38. package/dist/bundle/{chunk-YJKXCINQ.js → chunk-AIKFOBDO.js} +254 -60
  39. package/dist/bundle/{chunk-PS7HQ5LQ.js → chunk-ASBDFXLS.js} +3 -3
  40. package/dist/bundle/{chunk-MA4UJNUI.js → chunk-B32KZRQM.js} +12 -12
  41. package/dist/bundle/{chunk-2GNGR265.js → chunk-BBGJQMRI.js} +1 -1
  42. package/dist/bundle/{chunk-IVZACJ6X.js → chunk-BDKVOU3I.js} +4 -4
  43. package/dist/bundle/{chunk-4VOCXLMJ.js → chunk-BP4FYANF.js} +6 -6
  44. package/dist/bundle/{chunk-WHXYPLUE.js → chunk-DCYFT3FR.js} +4 -4
  45. package/dist/bundle/{chunk-AV2ZJ4WX.js → chunk-DNCLQPOM.js} +1 -1
  46. package/dist/bundle/{chunk-TI4WJOEX.js → chunk-DSZYABYL.js} +38 -19
  47. package/dist/bundle/{chunk-ZNAX7GUV.js → chunk-E745WZKY.js} +8 -8
  48. package/dist/bundle/{chunk-M7OYEMLI.js → chunk-EGTCQKHV.js} +7 -7
  49. package/dist/bundle/{chunk-GDRFVBCB.js → chunk-EQG3PIH2.js} +2 -2
  50. package/dist/bundle/{chunk-YRDQ54G5.js → chunk-ESN3W2MZ.js} +24 -11
  51. package/dist/bundle/{chunk-NS3JWBDR.js → chunk-G46WJ7YO.js} +6 -6
  52. package/dist/bundle/{chunk-VQTYJ6XH.js → chunk-G6PETRMV.js} +3 -3
  53. package/dist/bundle/{chunk-QNG27PGH.js → chunk-GBHMT2IU.js} +21 -17
  54. package/dist/bundle/{chunk-FMMYBVCH.js → chunk-GGMAIIVE.js} +1 -1
  55. package/dist/bundle/{chunk-ZFRYFDZN.js → chunk-GTKPMYK7.js} +2 -2
  56. package/dist/bundle/{chunk-B2WBWKYN.js → chunk-GWGHH56B.js} +12 -12
  57. package/dist/bundle/{chunk-7JWVPJIP.js → chunk-HC6VN5CO.js} +10 -10
  58. package/dist/bundle/{chunk-F2J2FQUB.js → chunk-HP7A2ZOP.js} +9 -9
  59. package/dist/bundle/{chunk-GW2A2FJH.js → chunk-HZENBDW2.js} +8 -8
  60. package/dist/bundle/{chunk-UHMJSSQO.js → chunk-IANKXHSE.js} +1 -1
  61. package/dist/bundle/{chunk-IDUKCXL7.js → chunk-ICPJT672.js} +13 -9
  62. package/dist/bundle/{chunk-UUVWAVKN.js → chunk-JQ54DYAQ.js} +3 -3
  63. package/dist/bundle/{chunk-337ALCXQ.js → chunk-K5JGJIV2.js} +8 -8
  64. package/dist/bundle/{chunk-V3ZTAAJ6.js → chunk-KJ6USQDZ.js} +8 -8
  65. package/dist/bundle/{chunk-T2BHIC37.js → chunk-KKFY23AK.js} +65 -65
  66. package/dist/bundle/{chunk-J5EHZBO5.js → chunk-KQPUVXKX.js} +19 -3
  67. package/dist/bundle/{chunk-C4BBCSGK.js → chunk-KVJ3I7UL.js} +6 -6
  68. package/dist/bundle/{chunk-BZXHJKKI.js → chunk-KWU46LNK.js} +2 -2
  69. package/dist/bundle/chunk-KXJ3JEDH.js +2 -0
  70. package/dist/bundle/{chunk-R6HP2XKD.js → chunk-L75SMSJR.js} +5 -5
  71. package/dist/bundle/{chunk-KZ3B6HW5.js → chunk-LAYYO4WD.js} +3 -3
  72. package/dist/bundle/{chunk-LGESUPKO.js → chunk-LEKKTJKK.js} +40 -26
  73. package/dist/bundle/{chunk-K7CTCDYX.js → chunk-M7H4MCAX.js} +6 -6
  74. package/dist/bundle/{chunk-L54I45OX.js → chunk-MAJJ4PG3.js} +13 -13
  75. package/dist/bundle/{chunk-ZMAPXIGC.js → chunk-MQLPZBMQ.js} +2 -2
  76. package/dist/bundle/{chunk-HHQROAJQ.js → chunk-N3JLO63O.js} +1 -1
  77. package/dist/bundle/{chunk-XWKUGAG6.js → chunk-N46F72AF.js} +14 -14
  78. package/dist/bundle/{chunk-GPRJXJC7.js → chunk-NB7EOAUZ.js} +22 -1
  79. package/dist/bundle/{chunk-HIFPHARA.js → chunk-NEMX3UNN.js} +4 -4
  80. package/dist/bundle/{chunk-5EWYDHBH.js → chunk-OBXQLFT5.js} +2 -2
  81. package/dist/bundle/{chunk-3M436OO2.js → chunk-OGNO35A2.js} +6 -6
  82. package/dist/bundle/{chunk-VAW7QGJA.js → chunk-OIPYBF43.js} +3 -3
  83. package/dist/bundle/{chunk-DMJLJVD3.js → chunk-OO4TRVPB.js} +7 -7
  84. package/dist/bundle/{chunk-RQFRXUI4.js → chunk-OQFQ77AY.js} +198 -112
  85. package/dist/bundle/{chunk-UPR2S5IE.js → chunk-PMUPN6JW.js} +8 -8
  86. package/dist/bundle/{chunk-4BU3LRTB.js → chunk-PSKTMMCO.js} +17 -17
  87. package/dist/bundle/{chunk-YNWBRDBX.js → chunk-PWVJUIDQ.js} +2 -2
  88. package/dist/bundle/{chunk-LECMHK2F.js → chunk-Q7ICVP25.js} +1 -1
  89. package/dist/bundle/{chunk-4FSH7K6N.js → chunk-QG6PILDO.js} +2 -2
  90. package/dist/bundle/{chunk-NM5XMKWO.js → chunk-QPHBK63S.js} +1 -1
  91. package/dist/bundle/{chunk-MBBR7QHI.js → chunk-QVSL5WJ7.js} +2501 -1062
  92. package/dist/bundle/{chunk-ZLYICF6A.js → chunk-QVYAV7F2.js} +4 -4
  93. package/dist/bundle/{chunk-IYNICUCC.js → chunk-R2B6PUVI.js} +4 -4
  94. package/dist/bundle/{chunk-Q26UFIH4.js → chunk-RQOZBTNI.js} +16 -3
  95. package/dist/bundle/{chunk-T7QPZYRZ.js → chunk-T7IAWEBU.js} +7 -7
  96. package/dist/bundle/{chunk-FXZPAGHT.js → chunk-TKNM22OH.js} +2 -2
  97. package/dist/bundle/{chunk-FXCR4DGU.js → chunk-TKVBFJ5C.js} +1 -1
  98. package/dist/bundle/{chunk-HVXOA4FO.js → chunk-TXDR6YSF.js} +1 -1
  99. package/dist/bundle/{chunk-CFQQTDSA.js → chunk-TY7NDMFY.js} +1 -1
  100. package/dist/bundle/{chunk-YIIGF643.js → chunk-UAWSINMC.js} +10 -10
  101. package/dist/bundle/{chunk-35FVYRH5.js → chunk-UKAAAOPC.js} +28 -179
  102. package/dist/bundle/{chunk-4ZXJ4AZW.js → chunk-UL2PXLKT.js} +26 -26
  103. package/dist/bundle/{chunk-UMPUY77T.js → chunk-UQCTXZEP.js} +10 -10
  104. package/dist/bundle/{chunk-L2ERFXB7.js → chunk-UR5DBODY.js} +35 -30
  105. package/dist/bundle/{chunk-EPASOAEI.js → chunk-V5EJSF2B.js} +230 -165
  106. package/dist/bundle/{chunk-5SEBLX6B.js → chunk-VB72LTSZ.js} +12 -12
  107. package/dist/bundle/{chunk-OEQNP56V.js → chunk-VB7FZOYX.js} +1 -1
  108. package/dist/bundle/{chunk-YISJJNXT.js → chunk-VS6WURLX.js} +3 -3
  109. package/dist/bundle/{chunk-3UX4VJWD.js → chunk-VZ5PPYDG.js} +3 -4
  110. package/dist/bundle/{chunk-R4CXFYQN.js → chunk-W5QHB53X.js} +180 -38
  111. package/dist/bundle/{chunk-D26K6756.js → chunk-WMANRJR5.js} +6 -6
  112. package/dist/bundle/chunk-WOPVBRPV.js +29 -0
  113. package/dist/bundle/{chunk-4BXLHSXY.js → chunk-XQ2WL3HB.js} +2 -2
  114. package/dist/bundle/{chunk-JK24A3RP.js → chunk-XQQVMECZ.js} +3 -3
  115. package/dist/bundle/{chunk-LVCCZI5A.js → chunk-Y6PVS55U.js} +38 -38
  116. package/dist/bundle/{chunk-NQGGTO3B.js → chunk-YJXJJ2XP.js} +8 -8
  117. package/dist/bundle/{chunk-46EF6P2J.js → chunk-YY7XKHDY.js} +10 -3
  118. package/dist/bundle/{chunk-WIX6BFRF.js → chunk-ZED2CJW5.js} +8 -8
  119. package/dist/bundle/chunk-ZOYOXWJB.js +746 -0
  120. package/dist/bundle/{cli-WTGAGSXV.js → cli-U4O5XB7J.js} +118 -116
  121. package/dist/bundle/command-contract-FBTK6GQX.js +45 -0
  122. package/dist/bundle/{command-server-entry-47CAYN3E.js → command-server-entry-KKH6ZWJV.js} +35 -35
  123. package/dist/bundle/config-FRJSIZNN.js +118 -0
  124. package/dist/bundle/{decode-2G7QS5IQ.js → decode-TPCNXEK4.js} +6 -6
  125. package/dist/bundle/{dispatch-ZAP3KBVJ.js → dispatch-FKMIPCPQ.js} +9 -9
  126. package/dist/bundle/{dist-WY6R3WH7.js → dist-7CLBCYZN.js} +23 -21
  127. package/dist/bundle/{echarts-YRRVLEX3.js → echarts-O3TNDAXJ.js} +2 -2
  128. package/dist/bundle/{embed-B5H3OW2O.js → embed-WCJSFVSK.js} +7 -7
  129. package/dist/bundle/{embedder-3O73SP6Y.js → embedder-TBBUPXBX.js} +10 -10
  130. package/dist/bundle/{failure-EYGW7JMC.js → failure-XTWBYI2A.js} +3 -3
  131. package/dist/bundle/first-run-ELEMFW42.js +29 -0
  132. package/dist/bundle/first-screen-DIOBWMKP.js +46 -0
  133. package/dist/bundle/{folders-4CGFWM6H.js → folders-LXOL4N4S.js} +5 -5
  134. package/dist/bundle/{instructions-AG7SRWTR.js → instructions-AMH5RWVJ.js} +1 -1
  135. package/dist/bundle/{main-DOGY6FJP.js → main-YAA7WQ23.js} +24 -24
  136. package/dist/bundle/{mcp-YGOAUNC3.js → mcp-5HFPWC3W.js} +2 -2
  137. package/dist/bundle/meeting-combined-UXCF4SJ3.js +26 -0
  138. package/dist/bundle/meeting-model-3BZJ3EQP.js +26 -0
  139. package/dist/bundle/{meeting-semantic-FOEBWV3P.js → meeting-semantic-3HU7I2SJ.js} +8 -8
  140. package/dist/bundle/{meetings-PVE4C2NF.js → meetings-XWMB6FOH.js} +7 -7
  141. package/dist/bundle/{node-GJQYN4FT.js → node-EGMCBAO7.js} +2 -2
  142. package/dist/bundle/{node-sqlite-MLRYKVCQ.js → node-sqlite-IJBWENFX.js} +8 -8
  143. package/dist/bundle/{oauth-AC55C6SG.js → oauth-SZDDAP7A.js} +8 -8
  144. package/dist/bundle/{open-3LGTYP6M.js → open-NS3TMKZX.js} +6 -6
  145. package/dist/bundle/openai-4DN6WI3B.js +28 -0
  146. package/dist/bundle/{output-file-FXMTTLOI.js → output-file-2UB5JP3R.js} +6 -6
  147. package/dist/bundle/{process-MEKCZMX3.js → process-SGHEN6MQ.js} +1 -1
  148. package/dist/bundle/{program-E5BSSIGY.js → program-GVCGZP27.js} +105 -104
  149. package/dist/bundle/{prompt-AIA6QSZK.js → prompt-HJFMPFVC.js} +6 -6
  150. package/dist/bundle/public-C2ZB2AGQ.js +198 -0
  151. package/dist/bundle/{recognize-M57VNTEV.js → recognize-2SEI5PPM.js} +5 -5
  152. package/dist/bundle/{remote-3OTENZ7Z.js → remote-2DMS74XE.js} +11 -11
  153. package/dist/bundle/{rerank-P5WHDFDU.js → rerank-H6GCYVIA.js} +8 -8
  154. package/dist/bundle/run-log-QU26SUZP.js +145 -0
  155. package/dist/bundle/{serve-BRLC2QVV.js → serve-ODVRPFJO.js} +10 -10
  156. package/dist/bundle/server-NBPF6IDZ.js +95 -0
  157. package/dist/bundle/{server-25NF7DMS.js → server-PCLIO24L.js} +70 -68
  158. package/dist/bundle/{services-MJE43OGD.js → services-4QAPXBLO.js} +60 -56
  159. package/dist/bundle/{speech-4AVCWTQH.js → speech-MA6ZT3WE.js} +25 -25
  160. package/dist/bundle/{sqlite-runtime-U4TQXWMC.js → sqlite-runtime-PVMAUXRN.js} +7 -7
  161. package/dist/bundle/{state-GNUGVMY7.js → state-QFMTYUME.js} +7 -7
  162. package/dist/bundle/{store-KBFZVQWF.js → store-25OTAQC3.js} +25 -25
  163. package/dist/bundle/{store-MHVBFUBB.js → store-F724QIKJ.js} +34 -27
  164. package/dist/bundle/store-connection-OGPXANGB.js +111 -0
  165. package/dist/bundle/store-maintenance-command-2CM7LLNQ.js +83 -0
  166. package/dist/bundle/{streaming-6F7AFEHD.js → streaming-S22C4DG5.js} +7 -7
  167. package/dist/bundle/surface-7PXHWCF6.js +81 -0
  168. package/dist/bundle/{tokens-BB4MQBLH.js → tokens-NLUHA2DW.js} +11 -11
  169. package/dist/bundle/zm.js +9 -9
  170. package/dist/bundle/{zoom-app-YTGOZ2FS.js → zoom-app-YWFB367P.js} +8 -8
  171. package/dist/version.d.ts +1 -1
  172. package/dist/version.js +1 -1
  173. package/package.json +3 -3
  174. package/dist/bundle/agent-VYAJCJLE.js +0 -45
  175. package/dist/bundle/answer-policy-PTH4F2DW.js +0 -129
  176. package/dist/bundle/chunk-EWEQ7AXL.js +0 -719
  177. package/dist/bundle/command-contract-3IKVWPDL.js +0 -45
  178. package/dist/bundle/config-ZOGOKGTU.js +0 -116
  179. package/dist/bundle/first-run-MPKMDEMA.js +0 -29
  180. package/dist/bundle/first-screen-AIAAC3KF.js +0 -45
  181. package/dist/bundle/meeting-combined-YKPKTKGA.js +0 -26
  182. package/dist/bundle/meeting-model-HTXSGHNM.js +0 -26
  183. package/dist/bundle/openai-E2MSLVIX.js +0 -28
  184. package/dist/bundle/run-log-EOQ4EQDS.js +0 -143
  185. package/dist/bundle/server-EW2RL2EL.js +0 -93
  186. package/dist/bundle/store-connection-SKRUAI4L.js +0 -109
  187. package/dist/bundle/store-maintenance-command-G6EXJSHJ.js +0 -81
  188. package/dist/bundle/surface-DWEWB5RG.js +0 -79
@@ -2,56 +2,60 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  sharedModel
5
- } from "./chunk-IDUKCXL7.js";
5
+ } from "./chunk-ICPJT672.js";
6
6
  import {
7
- answerOf,
8
7
  messengerContext
9
- } from "./chunk-35FVYRH5.js";
8
+ } from "./chunk-UKAAAOPC.js";
10
9
  import {
11
10
  chatEventAnswer,
12
11
  memberAnswer,
13
12
  pollVoteAnswer
14
- } from "./chunk-WIX6BFRF.js";
13
+ } from "./chunk-ZED2CJW5.js";
15
14
  import {
16
15
  serveRelay
17
- } from "./chunk-M7OYEMLI.js";
16
+ } from "./chunk-EGTCQKHV.js";
18
17
  import {
19
18
  holdLock,
20
19
  lockPath,
20
+ markCurrent,
21
21
  releaseLock,
22
22
  servingProfiles,
23
23
  takeLock
24
- } from "./chunk-Q26UFIH4.js";
24
+ } from "./chunk-RQOZBTNI.js";
25
25
  import {
26
26
  FETCHING,
27
27
  RULES_VERSION,
28
+ answerOf,
28
29
  applyTaskRulesOnArrival,
30
+ inside,
29
31
  newSendId,
30
32
  onlineDeps,
31
33
  openRequestTask,
32
34
  patiently,
35
+ realPathOf,
33
36
  refuseLockedOutput,
37
+ refusedPlace,
34
38
  senderIsMe,
35
39
  servicesFor,
36
40
  syncsOneChat
37
- } from "./chunk-MBBR7QHI.js";
41
+ } from "./chunk-QVSL5WJ7.js";
38
42
  import {
39
43
  embeddingKeys,
40
44
  endpointKeyName,
41
45
  modelGateway
42
- } from "./chunk-SRUAUMBL.js";
46
+ } from "./chunk-676C2LE6.js";
43
47
  import {
44
48
  withTimeLimit
45
- } from "./chunk-NM5XMKWO.js";
49
+ } from "./chunk-QPHBK63S.js";
46
50
  import {
47
51
  capability,
48
52
  queryTerms,
49
53
  typedQuery,
50
54
  withQuery
51
- } from "./chunk-QNG27PGH.js";
55
+ } from "./chunk-GBHMT2IU.js";
52
56
  import {
53
57
  renderMessages
54
- } from "./chunk-4FSH7K6N.js";
58
+ } from "./chunk-QG6PILDO.js";
55
59
  import {
56
60
  QUICK_HEALTH_CHECKS,
57
61
  fts5Tables,
@@ -59,7 +63,7 @@ import {
59
63
  lossUnknown,
60
64
  storeDamageReport,
61
65
  storeHealth
62
- } from "./chunk-2ELGSNX3.js";
66
+ } from "./chunk-66ALX4ZI.js";
63
67
  import {
64
68
  Command,
65
69
  LOCAL_READ,
@@ -85,19 +89,19 @@ import {
85
89
  snakeKeys,
86
90
  storeTable,
87
91
  withoutProviderRefs
88
- } from "./chunk-EPASOAEI.js";
92
+ } from "./chunk-V5EJSF2B.js";
89
93
  import {
90
94
  modelTarget
91
- } from "./chunk-IFM4G4MT.js";
95
+ } from "./chunk-2CI2OEZQ.js";
92
96
  import {
93
97
  holdersOf
94
- } from "./chunk-YUDVRFXN.js";
98
+ } from "./chunk-3YM4B2GT.js";
95
99
  import {
96
100
  levelFor
97
- } from "./chunk-V3ZTAAJ6.js";
101
+ } from "./chunk-KJ6USQDZ.js";
98
102
  import {
99
103
  readSecret
100
- } from "./chunk-VAW7QGJA.js";
104
+ } from "./chunk-OIPYBF43.js";
101
105
  import {
102
106
  CORPORA,
103
107
  MIGRATIONS,
@@ -135,37 +139,37 @@ import {
135
139
  storeClients,
136
140
  storeContents,
137
141
  vectorIndexCounts
138
- } from "./chunk-437DLSB3.js";
142
+ } from "./chunk-2GP573Q4.js";
139
143
  import {
140
144
  readDamageMark,
141
145
  readHealthMark,
142
146
  readJournalMark,
143
147
  recordDeepCheck
144
- } from "./chunk-EWEQ7AXL.js";
148
+ } from "./chunk-ZOYOXWJB.js";
145
149
  import {
146
150
  currentRun
147
- } from "./chunk-D26K6756.js";
151
+ } from "./chunk-WMANRJR5.js";
148
152
  import {
149
153
  failureKey,
150
154
  isStoreDamage
151
- } from "./chunk-ZFRYFDZN.js";
155
+ } from "./chunk-GTKPMYK7.js";
152
156
  import {
153
157
  formatLocator,
154
158
  parseLocator
155
- } from "./chunk-TI4WJOEX.js";
159
+ } from "./chunk-DSZYABYL.js";
156
160
  import {
157
161
  storePath
158
- } from "./chunk-JKEMW6E4.js";
162
+ } from "./chunk-274SLQNW.js";
159
163
  import {
160
164
  openCache
161
- } from "./chunk-NS3JWBDR.js";
165
+ } from "./chunk-G46WJ7YO.js";
162
166
  import {
163
167
  queryFieldsOf
164
- } from "./chunk-YIIGF643.js";
168
+ } from "./chunk-UAWSINMC.js";
165
169
  import {
166
170
  resolvePaths,
167
171
  writeSecurely
168
- } from "./chunk-N5ROXGY4.js";
172
+ } from "./chunk-6CWL5BKG.js";
169
173
  import {
170
174
  array,
171
175
  boolean,
@@ -186,10 +190,10 @@ import {
186
190
  string,
187
191
  transform,
188
192
  trim
189
- } from "./chunk-YRDQ54G5.js";
193
+ } from "./chunk-ESN3W2MZ.js";
190
194
  import {
191
195
  CliError
192
- } from "./chunk-UHMJSSQO.js";
196
+ } from "./chunk-IANKXHSE.js";
193
197
  import {
194
198
  __commonJS,
195
199
  __name,
@@ -264,9 +268,9 @@ var require_liquid_node = __commonJS({
264
268
  __name(isIterator, "isIterator");
265
269
  function promisify(fn) {
266
270
  return function(...args) {
267
- return new Promise((resolve3, reject2) => {
271
+ return new Promise((resolve4, reject2) => {
268
272
  fn(...args, (err, result2) => {
269
- err ? reject2(err) : resolve3(result2);
273
+ err ? reject2(err) : resolve4(result2);
270
274
  });
271
275
  });
272
276
  };
@@ -1856,12 +1860,12 @@ var require_liquid_node = __commonJS({
1856
1860
  return fs$1.readFileSync(filepath, "utf8");
1857
1861
  }
1858
1862
  __name(readFileSync6, "readFileSync");
1859
- function resolve2(root, file2, ext) {
1863
+ function resolve3(root, file2, ext) {
1860
1864
  if (!path.extname(file2))
1861
1865
  file2 += ext;
1862
1866
  return path.resolve(root, file2);
1863
1867
  }
1864
- __name(resolve2, "resolve");
1868
+ __name(resolve3, "resolve");
1865
1869
  function fallback(file2) {
1866
1870
  try {
1867
1871
  return requireResolve(file2);
@@ -1869,10 +1873,10 @@ var require_liquid_node = __commonJS({
1869
1873
  }
1870
1874
  }
1871
1875
  __name(fallback, "fallback");
1872
- function dirname4(filepath) {
1876
+ function dirname5(filepath) {
1873
1877
  return path.dirname(filepath);
1874
1878
  }
1875
- __name(dirname4, "dirname");
1879
+ __name(dirname5, "dirname");
1876
1880
  var realpathAsync = promisify(fs$1.realpath);
1877
1881
  async function contains(root, file2) {
1878
1882
  try {
@@ -1902,9 +1906,9 @@ var require_liquid_node = __commonJS({
1902
1906
  readFile,
1903
1907
  existsSync: existsSync11,
1904
1908
  readFileSync: readFileSync6,
1905
- resolve: resolve2,
1909
+ resolve: resolve3,
1906
1910
  fallback,
1907
- dirname: dirname4,
1911
+ dirname: dirname5,
1908
1912
  contains,
1909
1913
  containsSync,
1910
1914
  sep: path.sep
@@ -3629,7 +3633,7 @@ var require_liquid_node = __commonJS({
3629
3633
  uri_escape,
3630
3634
  slugify
3631
3635
  });
3632
- var join6 = argumentsToValue(function(v, arg) {
3636
+ var join7 = argumentsToValue(function(v, arg) {
3633
3637
  const array2 = toArray(v);
3634
3638
  const sep = isNil(arg) ? " " : stringify(arg);
3635
3639
  let outputSize = sep.length * Math.max(array2.length - 1, 0);
@@ -3905,7 +3909,7 @@ var require_liquid_node = __commonJS({
3905
3909
  __name(sample, "sample");
3906
3910
  var arrayFilters = /* @__PURE__ */ Object.freeze({
3907
3911
  __proto__: null,
3908
- join: join6,
3912
+ join: join7,
3909
3913
  last,
3910
3914
  first,
3911
3915
  reverse,
@@ -5529,11 +5533,11 @@ var require_liquid_node = __commonJS({
5529
5533
  }
5530
5534
  });
5531
5535
 
5532
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
5536
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
5533
5537
  import { chmodSync, constants, copyFileSync, existsSync as existsSync10, mkdirSync, realpathSync as realpathSync3, renameSync as renameSync3, rmSync as rmSync3, statfsSync as statfsSync2, statSync as statSync4, writeFileSync as writeFileSync2 } from "node:fs";
5534
- import { dirname as dirname3, resolve } from "node:path";
5538
+ import { dirname as dirname4, resolve as resolve2 } from "node:path";
5535
5539
 
5536
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/sealed.js
5540
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/sealed.js
5537
5541
  import { createCipheriv, createDecipheriv, createHash, randomBytes, scrypt, timingSafeEqual } from "node:crypto";
5538
5542
  import { closeSync, createReadStream, createWriteStream, existsSync, openSync, readSync, renameSync, rmSync, statSync } from "node:fs";
5539
5543
  import { Transform } from "node:stream";
@@ -5545,7 +5549,7 @@ var NONCE = 12;
5545
5549
  var TAG = 16;
5546
5550
  var HEADER = MAGIC.length + 3 + SALT + NONCE;
5547
5551
  var COST = { log2N: 17, r: 8, p: 1 };
5548
- var keyOf = /* @__PURE__ */ __name((password, salt, { log2N, r, p }) => new Promise((resolve2, reject) => scrypt(password, salt, 32, { N: 2 ** log2N, r, p, maxmem: 2 * 128 * r * 2 ** log2N }, (error, key) => error ? reject(error) : resolve2(key))), "keyOf");
5552
+ var keyOf = /* @__PURE__ */ __name((password, salt, { log2N, r, p }) => new Promise((resolve3, reject) => scrypt(password, salt, 32, { N: 2 ** log2N, r, p, maxmem: 2 * 128 * r * 2 ** log2N }, (error, key) => error ? reject(error) : resolve3(key))), "keyOf");
5549
5553
  var checkFor = /* @__PURE__ */ __name(async (password, cost = COST) => {
5550
5554
  refuseEmpty(password);
5551
5555
  const salt = randomBytes(SALT);
@@ -5640,7 +5644,7 @@ var unsealFile = /* @__PURE__ */ __name(async (from, to, password) => {
5640
5644
  renameSync(pending, to);
5641
5645
  }, "unsealFile");
5642
5646
 
5643
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/store/compatibility.js
5647
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/store/compatibility.js
5644
5648
  var SPEAKS = MIGRATIONS.at(-1)?.version ?? 0;
5645
5649
  var fileSchemaOf = /* @__PURE__ */ __name((database) => {
5646
5650
  const tracked = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'schema_migrations'").get();
@@ -5664,7 +5668,7 @@ var compatibilityOf = /* @__PURE__ */ __name((file2, migrations = MIGRATIONS) =>
5664
5668
  };
5665
5669
  }, "compatibilityOf");
5666
5670
 
5667
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/store/repair.js
5671
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/store/repair.js
5668
5672
  import { createHash as createHash2 } from "node:crypto";
5669
5673
  var COPY_MARK = "__repair_";
5670
5674
  var COPY_NAME = /__repair_[0-9a-f]{8}(_\d+)?$/;
@@ -5918,19 +5922,79 @@ var deleteCopy = /* @__PURE__ */ __name((database, name) => {
5918
5922
  return found;
5919
5923
  }, "deleteCopy");
5920
5924
 
5921
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/cli/store-info.js
5925
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/path-options.js
5926
+ import { dirname, isAbsolute, join, resolve } from "node:path";
5927
+ var PATH_NAME = /^([a-z]+-)*(file|path|dir|directory|folder)s?$/;
5928
+ var PATH_PLACEHOLDER = /[<[]([a-z]+-)*(file|path|dir|directory|folder)s?(\.\.\.)?[>\]]/;
5929
+ var NOT_LOCAL = /* @__PURE__ */ new WeakMap();
5930
+ var IN_BACKUPS = /* @__PURE__ */ new WeakMap();
5931
+ var mark = /* @__PURE__ */ __name((marks, command, names) => {
5932
+ marks.set(command, /* @__PURE__ */ new Set([...marks.get(command) ?? [], ...names]));
5933
+ return command;
5934
+ }, "mark");
5935
+ var notLocalPaths = /* @__PURE__ */ __name((command, ...names) => mark(NOT_LOCAL, command, names), "notLocalPaths");
5936
+ var inStoreBackups = /* @__PURE__ */ __name((command, ...names) => mark(IN_BACKUPS, command, names), "inStoreBackups");
5937
+ var marked = /* @__PURE__ */ __name((marks, command, name) => {
5938
+ for (let at = command; at; at = at.parent)
5939
+ if (marks.get(at)?.has(name))
5940
+ return true;
5941
+ return false;
5942
+ }, "marked");
5943
+ var isLocalPathOption = /* @__PURE__ */ __name((command, option) => PATH_PLACEHOLDER.test(option.flags) && !marked(NOT_LOCAL, command, option.attributeName()), "isLocalPathOption");
5944
+ var isLocalPathArgument = /* @__PURE__ */ __name((command, argument) => PATH_NAME.test(argument.name()) && !marked(NOT_LOCAL, command, argument.name()), "isLocalPathArgument");
5945
+ var isNamed = /* @__PURE__ */ __name((value) => value !== "" && value !== "-" && !value.includes("://"), "isNamed");
5946
+ var valuesOf = /* @__PURE__ */ __name((value) => (Array.isArray(value) ? value : [value]).filter((one) => typeof one === "string" && isNamed(one)), "valuesOf");
5947
+ var localPathsOf = /* @__PURE__ */ __name((action) => {
5948
+ const found = [];
5949
+ for (let at = action; at; at = at.parent) {
5950
+ for (const option of at.options) {
5951
+ const key = option.attributeName();
5952
+ if (!isLocalPathOption(at, option) || at.getOptionValueSource(key) !== "cli")
5953
+ continue;
5954
+ const flag = option.long ?? option.flags;
5955
+ for (const value of valuesOf(at.getOptionValue(key)))
5956
+ found.push({ flag, value, inBackups: marked(IN_BACKUPS, at, key) });
5957
+ }
5958
+ }
5959
+ action.registeredArguments.forEach((argument, index) => {
5960
+ const value = action.processedArgs[index];
5961
+ if (!isLocalPathArgument(action, argument) || value === argument.defaultValue)
5962
+ return;
5963
+ for (const one of valuesOf(value))
5964
+ found.push({ flag: `<${argument.name()}>`, value: one, inBackups: marked(IN_BACKUPS, action, argument.name()) });
5965
+ });
5966
+ return found;
5967
+ }, "localPathsOf");
5968
+ var refuseAgentPaths = /* @__PURE__ */ __name((action, app, env) => {
5969
+ const backups = join(dirname(resolve(storePath(env))), "backups");
5970
+ for (const { flag, value, inBackups } of localPathsOf(action)) {
5971
+ if (inBackups && inside(realPathOf(value), realPathOf(backups)))
5972
+ continue;
5973
+ if (refusedPlace(value, app, env))
5974
+ throw new CliError("permission_error", `${flag} ${value}: an agent's call reads and writes no credential folder, no folder of a WireCat tool and not the message store \u2014 the owner runs it in a terminal`, { param: flag, sent: false });
5975
+ }
5976
+ }, "refuseAgentPaths");
5977
+ var absoluteFrom = /* @__PURE__ */ __name((cwd, value) => {
5978
+ if (Array.isArray(value))
5979
+ return value.map((one) => absoluteFrom(cwd, one));
5980
+ if (typeof value !== "string" || !isNamed(value) || isAbsolute(value))
5981
+ return value;
5982
+ return resolve(cwd, value);
5983
+ }, "absoluteFrom");
5984
+
5985
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/store-info.js
5922
5986
  import { existsSync as existsSync4, statSync as statSync3 } from "node:fs";
5923
5987
 
5924
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
5988
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
5925
5989
  import { existsSync as existsSync3 } from "node:fs";
5926
5990
 
5927
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/store/recover.js
5991
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/store/recover.js
5928
5992
  import { execFileSync, spawn } from "node:child_process";
5929
5993
  import { existsSync as existsSync2, readFileSync, realpathSync, renameSync as renameSync2, rmSync as rmSync2, statfsSync, statSync as statSync2, writeFileSync } from "node:fs";
5930
- import { basename, dirname, join } from "node:path";
5994
+ import { basename, dirname as dirname2, join as join2 } from "node:path";
5931
5995
  import { Transform as Transform2 } from "node:stream";
5932
5996
 
5933
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/store/refill.js
5997
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/store/refill.js
5934
5998
  var REFILL_MARGIN_MS = 864e5;
5935
5999
  var TIME_KEYS = 1e12;
5936
6000
  var integerId = `external_id GLOB '[0-9]*' AND NOT external_id GLOB '*[^0-9]*'`;
@@ -6010,7 +6074,7 @@ var forgetMail = /* @__PURE__ */ __name((database, cutoff, now) => {
6010
6074
  return [...folders].map(([account, count3]) => ({ account, folders: count3 }));
6011
6075
  }, "forgetMail");
6012
6076
 
6013
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/store/recover.js
6077
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/store/recover.js
6014
6078
  var SQLITE3_MINIMUM = [3, 43, 0];
6015
6079
  var STORE_PARTS = ["", "-wal", "-shm"];
6016
6080
  var RECOVER_LOCK = ".recover-lock";
@@ -6086,8 +6150,8 @@ var takeRecoverLock = /* @__PURE__ */ __name((path) => {
6086
6150
  return () => rmSync2(lock, { force: true });
6087
6151
  }, "takeRecoverLock");
6088
6152
  var storeHolders = /* @__PURE__ */ __name((path) => {
6089
- const folder = realpathSync(dirname(path));
6090
- const files = STORE_PARTS.map((suffix) => join(folder, `${basename(path)}${suffix}`));
6153
+ const folder = realpathSync(dirname2(path));
6154
+ const files = STORE_PARTS.map((suffix) => join2(folder, `${basename(path)}${suffix}`));
6091
6155
  const wanted = process.platform === "linux" ? files.flatMap((file2) => [file2, `${file2} (deleted)`]) : files.filter(existsSync2);
6092
6156
  const recovering = runningRecovery(path);
6093
6157
  const pids = holdersOf(wanted);
@@ -6230,7 +6294,7 @@ var placeLostRows = /* @__PURE__ */ __name((database) => {
6230
6294
  }
6231
6295
  return Object.fromEntries(Object.entries(placed).filter(([, rows2]) => rows2 > 0));
6232
6296
  }, "placeLostRows");
6233
- var copyReadableRows = /* @__PURE__ */ __name((path, target, program = "sqlite3") => new Promise((resolve2, reject) => {
6297
+ var copyReadableRows = /* @__PURE__ */ __name((path, target, program = "sqlite3") => new Promise((resolve3, reject) => {
6234
6298
  const reader = spawn(program, ["-readonly", path, `.recover --ignore-freelist --lost-and-found ${LOST_AND_FOUND}`], {
6235
6299
  stdio: ["ignore", "pipe", "pipe"]
6236
6300
  });
@@ -6267,7 +6331,7 @@ var copyReadableRows = /* @__PURE__ */ __name((path, target, program = "sqlite3"
6267
6331
  if (readerCode !== 0)
6268
6332
  reject(new CliError("validation_error", `sqlite3 could not read the store: ${errors.join("; ")}`));
6269
6333
  else
6270
- resolve2({ errors, read });
6334
+ resolve3({ errors, read });
6271
6335
  }, "exited");
6272
6336
  reader.on("error", reject);
6273
6337
  writer.on("error", reject);
@@ -6403,7 +6467,7 @@ var recoverStore = /* @__PURE__ */ __name(async ({ path, command, version, sqlit
6403
6467
  try {
6404
6468
  refuseInUse(path);
6405
6469
  const bytes = STORE_PARTS.reduce((sum, suffix) => sum + (statSync2(`${path}${suffix}`, { throwIfNoEntry: false })?.size ?? 0), 0);
6406
- const { bavail, bsize } = statfsSync(dirname(path));
6470
+ const { bavail, bsize } = statfsSync(dirname2(path));
6407
6471
  if (Number(bavail) * Number(bsize) < bytes * 1.2)
6408
6472
  throw new CliError("validation_error", `the recovery needs about ${Math.ceil(bytes * 1.2 / 1e9)} GB free beside the store`);
6409
6473
  return await recoverLocked({ path, command, version, sqlite3, now, note, copy, started, program });
@@ -6541,7 +6605,7 @@ var recoverLocked = /* @__PURE__ */ __name(async ({ path, command, version, sqli
6541
6605
  }
6542
6606
  }, "recoverLocked");
6543
6607
 
6544
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
6608
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
6545
6609
  var COUNTED = [
6546
6610
  "accounts",
6547
6611
  "chats",
@@ -6576,7 +6640,7 @@ var storeRecoveryCheck = /* @__PURE__ */ __name(async (env, command, version) =>
6576
6640
  }
6577
6641
  const journal = readJournalMark(path);
6578
6642
  recordDeepCheck(path, health, { cli: command, ...version ? { version } : {}, schema });
6579
- const mark = readDamageMark(path);
6643
+ const mark2 = readDamageMark(path);
6580
6644
  const lastKnownGood = readHealthMark(path)?.last_ok_at ?? null;
6581
6645
  const inUse = storeHolders(path) ?? null;
6582
6646
  const timers = activeTimers() ?? null;
@@ -6584,7 +6648,7 @@ var storeRecoveryCheck = /* @__PURE__ */ __name(async (env, command, version) =>
6584
6648
  const report = storeDamageReport({
6585
6649
  health,
6586
6650
  command,
6587
- mark,
6651
+ mark: mark2,
6588
6652
  journal,
6589
6653
  lastOkAt: lastKnownGood,
6590
6654
  holders: inUse,
@@ -6602,7 +6666,7 @@ var storeRecoveryCheck = /* @__PURE__ */ __name(async (env, command, version) =>
6602
6666
  invalidJson: health.invalidJson ?? [],
6603
6667
  rows,
6604
6668
  report,
6605
- damageMark: mark ? (({ inode: _, ...seen }) => seen)(mark) : null,
6669
+ damageMark: mark2 ? (({ inode: _, ...seen }) => seen)(mark2) : null,
6606
6670
  lastKnownGood,
6607
6671
  inUse,
6608
6672
  timers,
@@ -6635,12 +6699,12 @@ var storeRecoveryRun = /* @__PURE__ */ __name(async (env, { command, version, no
6635
6699
  }, "storeRecoveryRun");
6636
6700
  var refetchNotes = /* @__PURE__ */ __name(({ since, chats, mail }) => {
6637
6701
  const from = since === null ? "from the start" : `from ${since} on`;
6638
- const marked = [
6702
+ const marked2 = [
6639
6703
  ...chats.map(({ provider, account, chats: chats2 }) => `${chats2} chats of ${provider} ${account}`),
6640
6704
  ...mail.map(({ account, folders }) => `${folders} mail folders of ${account}`)
6641
6705
  ];
6642
6706
  return [
6643
- marked.length > 0 ? `marked as not fetched ${from}, so the next sync or serve fetches it again: ${marked.join(", ")}` : `nothing held ${from} was marked as fetched, so there is nothing to fetch again`,
6707
+ marked2.length > 0 ? `marked as not fetched ${from}, so the next sync or serve fetches it again: ${marked2.join(", ")}` : `nothing held ${from} was marked as fetched, so there is nothing to fetch again`,
6644
6708
  ...chats.filter(({ provider }) => provider === "whatsapp").map(({ account }) => `whatsapp ${account}: WhatsApp cannot be asked for its chats, so only what the phone pushes while serve runs comes back`),
6645
6709
  "notes, memories, tags and whatever else only this store held cannot be fetched again"
6646
6710
  ];
@@ -6697,7 +6761,7 @@ var storeRecoverCommand = /* @__PURE__ */ __name(({ command, version }) => {
6697
6761
  return recover;
6698
6762
  }, "storeRecoverCommand");
6699
6763
 
6700
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/cli/store-info.js
6764
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/store-info.js
6701
6765
  var pendingIfKnown = /* @__PURE__ */ __name((database) => database.prepare("SELECT 1 FROM pragma_table_info('messages') WHERE name = 'normalized_text'").get() ? pendingNormalization(database) : null, "pendingIfKnown");
6702
6766
  var bytesOf = /* @__PURE__ */ __name((path) => existsSync4(path) ? statSync3(path).size : 0, "bytesOf");
6703
6767
  var messageOf = /* @__PURE__ */ __name((error) => error instanceof Error ? error.message : String(error), "messageOf");
@@ -6747,7 +6811,7 @@ var sharedStoreCommand = /* @__PURE__ */ __name((app) => {
6747
6811
  return app ? store.addCommand(storeRecoverCommand(app)) : store;
6748
6812
  }, "sharedStoreCommand");
6749
6813
 
6750
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/cli/messenger/password.js
6814
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/password.js
6751
6815
  var ENCRYPT_OPTION = [
6752
6816
  "--encrypt",
6753
6817
  "compress and encrypt with a password, typed at a hidden prompt or piped on stdin; it is never kept \u2014 lose it and the file cannot be opened"
@@ -6766,9 +6830,9 @@ var passwordOf = /* @__PURE__ */ __name(async (command, { twice }) => {
6766
6830
  return password;
6767
6831
  }, "passwordOf");
6768
6832
 
6769
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/replies/rules.js
6833
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/replies/rules.js
6770
6834
  import { existsSync as existsSync5, readFileSync as readFileSync2 } from "node:fs";
6771
- import { join as join2 } from "node:path";
6835
+ import { join as join3 } from "node:path";
6772
6836
  var REPLY_ACTIONS = ["reply", "task"];
6773
6837
  var REPLY_MODELS = ["fill-only", "may-reword"];
6774
6838
  var REPLY_KINDS = ["dialog", "group"];
@@ -6854,7 +6918,7 @@ var defaultRule = /* @__PURE__ */ __name((id) => ({
6854
6918
  reply: { template: "", asReply: true },
6855
6919
  limits: { perChat: "1/1d", perPerson: "1/1d" }
6856
6920
  }), "defaultRule");
6857
- var repliesPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join2(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).config, `${profile}.replies.json`), "repliesPathFor");
6921
+ var repliesPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).config, `${profile}.replies.json`), "repliesPathFor");
6858
6922
  var EVERYONE = { reply: "all", allow: { people: [], chats: [] }, deny: { people: [], chats: [] } };
6859
6923
  var outsideAudience = /* @__PURE__ */ __name((audience, person, chat) => {
6860
6924
  if (person !== null && audience.deny.people.includes(person))
@@ -6937,9 +7001,9 @@ var problem = /* @__PURE__ */ __name((issue) => {
6937
7001
  }, "problem");
6938
7002
  var broken = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply rules ${path} cannot be read (${why}) \u2014 fix the file`), "broken");
6939
7003
 
6940
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/replies/state.js
7004
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/replies/state.js
6941
7005
  import { existsSync as existsSync6, readFileSync as readFileSync3 } from "node:fs";
6942
- import { join as join3 } from "node:path";
7006
+ import { join as join4 } from "node:path";
6943
7007
  var ANSWERED_KEPT = 1e3;
6944
7008
  var times = record(string(), array(string()));
6945
7009
  var stateFile = object({
@@ -6951,7 +7015,7 @@ var stateFile = object({
6951
7015
  });
6952
7016
  var emptyState = /* @__PURE__ */ __name(() => ({ paused: false, answered: [], sent: {} }), "emptyState");
6953
7017
  var answeredKey = /* @__PURE__ */ __name((message) => `${message.chatId}:${message.id}`, "answeredKey");
6954
- var repliesStatePathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, `${profile}.replies-state.json`), "repliesStatePathFor");
7018
+ var repliesStatePathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join4(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, `${profile}.replies-state.json`), "repliesStatePathFor");
6955
7019
  var readRepliesState = /* @__PURE__ */ __name((path) => {
6956
7020
  if (!existsSync6(path))
6957
7021
  return emptyState();
@@ -6990,7 +7054,7 @@ var recordReply = /* @__PURE__ */ __name((state, rule2, message, now) => {
6990
7054
  }, "recordReply");
6991
7055
  var broken2 = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply state ${path} cannot be read (${why}) \u2014 fix or move the file`), "broken");
6992
7056
 
6993
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/replies/decide.js
7057
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/replies/decide.js
6994
7058
  var skip = /* @__PURE__ */ __name((why) => ({ skip: why }), "skip");
6995
7059
  var decide = /* @__PURE__ */ __name((rule2, incoming, state, now) => {
6996
7060
  const { message, chat, owner, sender } = incoming;
@@ -7096,10 +7160,10 @@ var filled = /* @__PURE__ */ __name((template2, senderName) => {
7096
7160
  return template2.replaceAll("{firstName}", name.split(/\s+/)[0] ?? name).replaceAll("{name}", name);
7097
7161
  }, "filled");
7098
7162
 
7099
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/replies/template.js
7163
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/replies/template.js
7100
7164
  var import_liquidjs2 = __toESM(require_liquid_node(), 1);
7101
7165
 
7102
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/render/liquid.js
7166
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/render/liquid.js
7103
7167
  var import_liquidjs = __toESM(require_liquid_node(), 1);
7104
7168
  var safeLiquid = /* @__PURE__ */ __name((limits) => {
7105
7169
  const engine = new import_liquidjs.Liquid({
@@ -7126,7 +7190,7 @@ var safeLiquid = /* @__PURE__ */ __name((limits) => {
7126
7190
  return engine;
7127
7191
  }, "safeLiquid");
7128
7192
 
7129
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/replies/template.js
7193
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/replies/template.js
7130
7194
  var TEMPLATE_LIMITS = {
7131
7195
  parse: 32768,
7132
7196
  renders: 2e3,
@@ -7265,7 +7329,7 @@ var renderReplyTemplate = /* @__PURE__ */ __name(async (reply, input) => {
7265
7329
  }
7266
7330
  }, "renderReplyTemplate");
7267
7331
 
7268
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/replies/dry-run.js
7332
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/replies/dry-run.js
7269
7333
  var DRY_RUN_DAYS = 7;
7270
7334
  var PAGE = 500;
7271
7335
  var dryRun = /* @__PURE__ */ __name(async (store, account, rules, { since, until = Date.now(), only, audience, render }) => {
@@ -7379,7 +7443,7 @@ var storedSince = /* @__PURE__ */ __name(async (store, account, chat, since) =>
7379
7443
  }
7380
7444
  }, "storedSince");
7381
7445
 
7382
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/models/purpose.js
7446
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/models/purpose.js
7383
7447
  var HOSTED = {
7384
7448
  openai: "https://api.openai.com/v1",
7385
7449
  anthropic: "https://api.anthropic.com"
@@ -7400,14 +7464,14 @@ var purposeModel = /* @__PURE__ */ __name((settings, purpose, deps) => {
7400
7464
  return shared ? { target: shared.target, key: /* @__PURE__ */ __name(() => shared.key, "key"), shared: shared.setting } : void 0;
7401
7465
  }, "purposeModel");
7402
7466
 
7403
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/replies/consents.js
7467
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/replies/consents.js
7404
7468
  import { existsSync as existsSync7, readFileSync as readFileSync4 } from "node:fs";
7405
- import { join as join4 } from "node:path";
7469
+ import { join as join5 } from "node:path";
7406
7470
  var shape = strictObject({
7407
7471
  provider: nullable(pipe(string(), minLength(1))),
7408
7472
  deniedChats: array(pipe(string(), minLength(1)))
7409
7473
  });
7410
- var replyConsentPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join4(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).config, `${profile}.replies-consents.json`), "replyConsentPathFor");
7474
+ var replyConsentPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join5(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).config, `${profile}.replies-consents.json`), "replyConsentPathFor");
7411
7475
  var readReplyConsent = /* @__PURE__ */ __name((path) => {
7412
7476
  if (!existsSync7(path))
7413
7477
  return { provider: null, deniedChats: [] };
@@ -7425,7 +7489,7 @@ var mayModelReply = /* @__PURE__ */ __name((path, provider, chat) => {
7425
7489
  return consent.provider === provider && !consent.deniedChats.includes(chat);
7426
7490
  }, "mayModelReply");
7427
7491
 
7428
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/replies/rendering.js
7492
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/replies/rendering.js
7429
7493
  var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, options = {
7430
7494
  ai: true
7431
7495
  }) => async (rule2, message, chat, now) => {
@@ -7473,7 +7537,7 @@ var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, o
7473
7537
  return result2;
7474
7538
  }, "replyRenderer");
7475
7539
 
7476
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/replies/serve.js
7540
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/replies/serve.js
7477
7541
  var NOT_ALLOWED = "replies.send is not allow";
7478
7542
  var NO_RULES = "no rules";
7479
7543
  var ONLY_TASK = "opened a task, sent nothing";
@@ -7566,7 +7630,7 @@ var replyTo = /* @__PURE__ */ __name(async (deps, message) => {
7566
7630
  return { skip: why };
7567
7631
  }, "replyTo");
7568
7632
 
7569
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-catch-up.js
7633
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-catch-up.js
7570
7634
  var START_SYNC_DELAY_MS = 3e4;
7571
7635
  var START_SYNC_BUDGET_MS = 5 * 6e4;
7572
7636
  var START_SYNC_WINDOW_MS = 7 * 864e5;
@@ -7643,7 +7707,7 @@ var startSync = /* @__PURE__ */ __name(({ chats, newestHeld, fetch, note, warn,
7643
7707
  };
7644
7708
  }, "startSync");
7645
7709
 
7646
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-members.js
7710
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-members.js
7647
7711
  var FIRST_FETCH_MS = 6e4;
7648
7712
  var DAY_MS = 864e5;
7649
7713
  var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch, warn, firstMs = FIRST_FETCH_MS, everyMs = DAY_MS }) => {
@@ -7697,7 +7761,7 @@ var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch, warn, firstMs =
7697
7761
  };
7698
7762
  }, "memberFetches");
7699
7763
 
7700
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-notice.js
7764
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-notice.js
7701
7765
  var record2 = /* @__PURE__ */ __name((context, app, severity, attributes) => recordLogFor(context.streams.diagnostic, app, { command: currentRun().command || "serve" })[severity](attributes), "record");
7702
7766
  var noticeFor = /* @__PURE__ */ __name((context, app, severity = "warn") => ({ text, ...attributes }) => {
7703
7767
  if (context.format === "pretty") {
@@ -7730,22 +7794,22 @@ var recordDiagnostics = /* @__PURE__ */ __name((context, app) => {
7730
7794
  return context;
7731
7795
  }, "recordDiagnostics");
7732
7796
 
7733
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-outdated.js
7797
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-outdated.js
7734
7798
  import { existsSync as existsSync8, readFileSync as readFileSync5, realpathSync as realpathSync2 } from "node:fs";
7735
- import { dirname as dirname2, join as join5 } from "node:path";
7799
+ import { dirname as dirname3, join as join6 } from "node:path";
7736
7800
  var OUTDATED_CHECK_MS = 6e4;
7737
7801
  var ownPackageRoot = /* @__PURE__ */ __name((running, script = process.argv[1]) => {
7738
7802
  let dir;
7739
7803
  try {
7740
- dir = dirname2(realpathSync2(script ?? ""));
7804
+ dir = dirname3(realpathSync2(script ?? ""));
7741
7805
  } catch {
7742
7806
  return void 0;
7743
7807
  }
7744
7808
  for (let up = 0; up < 8; up++) {
7745
- const manifest = join5(dir, "package.json");
7809
+ const manifest = join6(dir, "package.json");
7746
7810
  if (existsSync8(manifest))
7747
7811
  return installedVersion(dir) === running ? dir : void 0;
7748
- const parent = dirname2(dir);
7812
+ const parent = dirname3(dir);
7749
7813
  if (parent === dir)
7750
7814
  return void 0;
7751
7815
  dir = parent;
@@ -7754,7 +7818,7 @@ var ownPackageRoot = /* @__PURE__ */ __name((running, script = process.argv[1])
7754
7818
  }, "ownPackageRoot");
7755
7819
  var installedVersion = /* @__PURE__ */ __name((root) => {
7756
7820
  try {
7757
- const { version } = JSON.parse(readFileSync5(join5(root, "package.json"), "utf8"));
7821
+ const { version } = JSON.parse(readFileSync5(join6(root, "package.json"), "utf8"));
7758
7822
  return typeof version === "string" ? version : void 0;
7759
7823
  } catch {
7760
7824
  return void 0;
@@ -7816,7 +7880,7 @@ var watchOutdated = /* @__PURE__ */ __name(({ check: check2, onOutdated, everyMs
7816
7880
  };
7817
7881
  }, "watchOutdated");
7818
7882
 
7819
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-stems.js
7883
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-stems.js
7820
7884
  var STEMS_EVERY_MS = 3e4;
7821
7885
  var STEMS_SLICE_MS = 2e3;
7822
7886
  var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY_MS, sliceMs = STEMS_SLICE_MS }) => {
@@ -7856,7 +7920,7 @@ var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY
7856
7920
  };
7857
7921
  }, "stemFills");
7858
7922
 
7859
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/cli/messenger/message-items.js
7923
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/message-items.js
7860
7924
  var defined = /* @__PURE__ */ __name((value) => Object.fromEntries(Object.entries(value).filter(([, one]) => one !== void 0)), "defined");
7861
7925
  var attachmentItem = /* @__PURE__ */ __name((attachment) => defined({
7862
7926
  kind: attachment.kind,
@@ -7952,7 +8016,7 @@ var viewOf = /* @__PURE__ */ __name((context, messenger) => ({
7952
8016
  locale: messenger.app.locale
7953
8017
  }), "viewOf");
7954
8018
 
7955
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-answers.js
8019
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-answers.js
7956
8020
  var observed = /* @__PURE__ */ __name((value) => ({
7957
8021
  value: value.value,
7958
8022
  observed_at: value.observedAt,
@@ -8019,7 +8083,7 @@ var watchEventItem = /* @__PURE__ */ __name((value, account) => {
8019
8083
  }
8020
8084
  }, "watchEventItem");
8021
8085
 
8022
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-command.js
8086
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-command.js
8023
8087
  var watchCommand = /* @__PURE__ */ __name((messenger) => annotate(new Command("watch"), {
8024
8088
  output: { entity: "watch_item" },
8025
8089
  effects: REMOTE_READ,
@@ -8174,7 +8238,8 @@ var describe = /* @__PURE__ */ __name((event, render) => {
8174
8238
  }
8175
8239
  }, "describe");
8176
8240
 
8177
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-command.js
8241
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-command.js
8242
+ var CURRENT_EVERY_MS = 6e4;
8178
8243
  var serveCommand = /* @__PURE__ */ __name((messenger) => {
8179
8244
  const command = annotate(new Command("serve"), {
8180
8245
  output: { entity: "serve_summary" },
@@ -8197,9 +8262,18 @@ var serveCommand = /* @__PURE__ */ __name((messenger) => {
8197
8262
  throw new CliError("validation_error", `${messenger.app.command} serve is already running for profile ${context.profile} (PID ${held.pid}, since ${held.startedAt})`);
8198
8263
  }
8199
8264
  let relaying;
8265
+ let current;
8266
+ const stamp = /* @__PURE__ */ __name(() => {
8267
+ try {
8268
+ markCurrent(path);
8269
+ } catch {
8270
+ }
8271
+ }, "stamp");
8200
8272
  const onReady = /* @__PURE__ */ __name(() => {
8201
8273
  const listening2 = { pid: process.pid, startedAt, version, listeningAt: (/* @__PURE__ */ new Date()).toISOString() };
8202
8274
  holdLock(path, listening2);
8275
+ stamp();
8276
+ current ??= setInterval(stamp, CURRENT_EVERY_MS).unref();
8203
8277
  note({
8204
8278
  code: "listening",
8205
8279
  text: `listening for profile ${context.profile}, catching up on what arrived while it was down`
@@ -8320,6 +8394,10 @@ var serveCommand = /* @__PURE__ */ __name((messenger) => {
8320
8394
  }, "connected")
8321
8395
  });
8322
8396
  } finally {
8397
+ if (current) {
8398
+ clearInterval(current);
8399
+ stamp();
8400
+ }
8323
8401
  watch.stop();
8324
8402
  await relaying;
8325
8403
  await relay?.close();
@@ -8460,7 +8538,7 @@ var tasking = /* @__PURE__ */ __name((context, warn) => {
8460
8538
  };
8461
8539
  }, "tasking");
8462
8540
 
8463
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/cli/messenger/store-tables-command.js
8541
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/store-tables-command.js
8464
8542
  import { existsSync as existsSync9 } from "node:fs";
8465
8543
  var PATH = "store tables list";
8466
8544
  var STORE_TABLES_QUERY = {
@@ -8503,7 +8581,7 @@ var storeTablesCommand = /* @__PURE__ */ __name((owner) => {
8503
8581
  return tables;
8504
8582
  }, "storeTablesCommand");
8505
8583
 
8506
- // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
8584
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
8507
8585
  var SEARCH_INDEXES = ["messages_fts", "chats_fts", "identities_fts"];
8508
8586
  var WORD_INDEX = "message_words";
8509
8587
  var schemaOf = /* @__PURE__ */ __name((database) => {
@@ -8529,7 +8607,7 @@ var readingOnly = /* @__PURE__ */ __name(async (path, read) => {
8529
8607
  database.close();
8530
8608
  }
8531
8609
  }, "readingOnly");
8532
- var withoutInode = /* @__PURE__ */ __name(({ inode: _, ...mark }) => mark, "withoutInode");
8610
+ var withoutInode = /* @__PURE__ */ __name(({ inode: _, ...mark2 }) => mark2, "withoutInode");
8533
8611
  var fileSchema = /* @__PURE__ */ __name(async (path) => {
8534
8612
  try {
8535
8613
  return await readingOnly(path, (database) => fileSchemaOf(database).version);
@@ -8548,7 +8626,7 @@ var storeSummary = /* @__PURE__ */ __name(async (env, { deep = false, command, v
8548
8626
  ...version ? { version } : {},
8549
8627
  schema: await fileSchema(path)
8550
8628
  }) : null;
8551
- const mark = readDamageMark(path);
8629
+ const mark2 = readDamageMark(path);
8552
8630
  const lastKnownGood = readHealthMark(path)?.last_ok_at ?? null;
8553
8631
  const health = {
8554
8632
  checked: checked.checked,
@@ -8560,11 +8638,11 @@ var storeSummary = /* @__PURE__ */ __name(async (env, { deep = false, command, v
8560
8638
  ...checked.invalidJson?.length ? { invalidJson: checked.invalidJson } : {},
8561
8639
  ...checked.searchIndexes?.some((index) => !index.ok) ? { damagedSearchIndexes: checked.searchIndexes.filter((index) => !index.ok).map((index) => index.name) } : {}
8562
8640
  };
8563
- const damage = command ? storeDamageReport({ health: checked, command, mark, journal, lastOkAt: lastKnownGood }) : null;
8641
+ const damage = command ? storeDamageReport({ health: checked, command, mark: mark2, journal, lastOkAt: lastKnownGood }) : null;
8564
8642
  const healthOf = {
8565
8643
  health,
8566
8644
  lastKnownGood,
8567
- ...mark ? { damageMark: withoutInode(mark) } : {},
8645
+ ...mark2 ? { damageMark: withoutInode(mark2) } : {},
8568
8646
  ...journal ? { journalMark: journal } : {},
8569
8647
  ...recorded?.cleared ? { damageMarkCleared: withoutInode(recorded.cleared) } : {},
8570
8648
  // `what` keeps memo's doctor, which reads it, compiling until it moves to `whatHappened`.
@@ -8751,7 +8829,7 @@ var inspect = /* @__PURE__ */ __name((path) => reading(path, (database) => {
8751
8829
  ...schema.version >= 71 ? [["content_post_words", indexIntegrity(database, "content_post_words", 0)]] : []
8752
8830
  ]);
8753
8831
  const size = bytesOf2(path) + bytesOf2(`${path}-wal`);
8754
- const { bavail, bsize } = statfsSync2(dirname3(path));
8832
+ const { bavail, bsize } = statfsSync2(dirname4(path));
8755
8833
  const free = Number(bavail) * Number(bsize);
8756
8834
  const behind = schema.version > 0 ? chatsBehind(database) : [];
8757
8835
  const vectorIndexes = schema.version >= 34 ? vectorIndexCounts(database) : [];
@@ -8836,8 +8914,9 @@ var chatsBehind = /* @__PURE__ */ __name((database) => database.prepare(`SELECT
8836
8914
  held: row.held === null ? null : isoOf(row.held),
8837
8915
  refreshed: isoOf(row.refreshed)
8838
8916
  })), "chatsBehind");
8839
- var migrateCommand = /* @__PURE__ */ __name((owner) => annotate(new Command("migrate"), { output: { entity: "store_migration" }, effects: LOCAL_WRITE }).summary(`migrate an older ${archive(owner)}`).description("bring the store up to this build's schema, then normalize, index and stem the messages and notes stored before it").action(async function() {
8917
+ var migrateCommand = /* @__PURE__ */ __name((owner) => annotate(new Command("migrate"), { output: { entity: "store_migration" }, effects: LOCAL_WRITE }).summary(`migrate an older ${archive(owner)}`).description("bring the store up to this build's schema, then normalize, index and stem the messages and notes stored before it").option("--no-backup", "migrate even when no rollback copy can be written; older tools then cannot open the store again").action(async function() {
8840
8918
  const { renderer } = outputFor(this);
8919
+ const { backup = true } = this.opts();
8841
8920
  const path = storePath(environmentOf(this).env ?? process.env);
8842
8921
  if (!existsSync10(path)) {
8843
8922
  result(this, { path, exists: false });
@@ -8846,11 +8925,13 @@ var migrateCommand = /* @__PURE__ */ __name((owner) => annotate(new Command("mig
8846
8925
  }
8847
8926
  const answer = await reading(path, (database) => {
8848
8927
  const from = schemaOf(database).version;
8849
- migrate(database, {
8928
+ const notice = migrate(database, {
8850
8929
  command: owner.app.command,
8851
8930
  version: owner.app.version,
8852
- rollback: { store: path, warn: /* @__PURE__ */ __name((line) => renderer.warn(line), "warn") }
8931
+ rollback: { store: path, warn: /* @__PURE__ */ __name((line) => renderer.warn(line), "warn"), withoutCopy: !backup }
8853
8932
  });
8933
+ if (notice)
8934
+ renderer.warn(notice);
8854
8935
  const { normalized, indexed, terms } = buildWordIndex(database, (note) => renderer.note(note));
8855
8936
  const stemmed = buildStems(database, (note) => renderer.note(note));
8856
8937
  const notes = buildNoteIndex(database, (note) => renderer.note(note));
@@ -8941,10 +9022,10 @@ var vacuumInto = /* @__PURE__ */ __name(async (path, target) => {
8941
9022
  }
8942
9023
  }, "vacuumInto");
8943
9024
  var stampNow = /* @__PURE__ */ __name(() => (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-"), "stampNow");
8944
- var backupCommand = /* @__PURE__ */ __name(() => destroysNothing(annotate(new Command("backup"), { output: { entity: "store_backup" }, effects: LOCAL_WRITE })).description("copy the store into a new file, while it is in use; never overwrites a file").argument("<file>", "the new file").option(...ENCRYPT_OPTION).action(async function(file2) {
9025
+ var backupCommand = /* @__PURE__ */ __name(() => inStoreBackups(destroysNothing(annotate(new Command("backup"), { output: { entity: "store_backup" }, effects: LOCAL_WRITE })), "file").description("copy the store into a new file, while it is in use; never overwrites a file").argument("<file>", "the new file").option(...ENCRYPT_OPTION).action(async function(file2) {
8945
9026
  const { encrypt } = this.opts();
8946
9027
  const path = storePath(environmentOf(this).env ?? process.env);
8947
- const target = resolve(file2);
9028
+ const target = resolve2(file2);
8948
9029
  const { app, env } = environmentOf(this);
8949
9030
  if (app)
8950
9031
  refuseLockedOutput(target, app, env ?? process.env, "<file>");
@@ -8981,8 +9062,8 @@ var backupCommand = /* @__PURE__ */ __name(() => destroysNothing(annotate(new Co
8981
9062
  }), "backupCommand");
8982
9063
  var decryptCommand = /* @__PURE__ */ __name(() => annotate(new Command("decrypt"), { output: { entity: "store_decrypt" }, effects: LOCAL_WRITE }).description("open a file written with --encrypt into a new file; asks for its password").argument("<file>", "a file `store backup --encrypt` or `store export --encrypt` wrote").requiredOption("--output <file>", "the new file, readable only by you").action(async function(file2) {
8983
9064
  const { output } = this.opts();
8984
- const from = resolve(file2);
8985
- const to = resolve(output);
9065
+ const from = resolve2(file2);
9066
+ const to = resolve2(output);
8986
9067
  if (!existsSync10(from))
8987
9068
  throw new CliError("not_found", `no file at ${from}`);
8988
9069
  if (!isSealed(from))
@@ -8992,16 +9073,16 @@ var decryptCommand = /* @__PURE__ */ __name(() => annotate(new Command("decrypt"
8992
9073
  await unsealFile(from, to, await passwordOf(this, { twice: false }));
8993
9074
  result(this, { path: to, from, bytes: bytesOf2(to) });
8994
9075
  }), "decryptCommand");
8995
- var restoreCommand = /* @__PURE__ */ __name((owner) => grantsAuthority(annotate(new Command("restore"), { output: { entity: "store_restore" }, effects: LOCAL_WRITE })).summary("restore a backup and keep the current store, or roll back a breaking upgrade").description("put a backup in place of the store; the store it replaces is kept beside it, never deleted. Given a rollback copy (backups/<store>-rollback-schema-<version>-<time>.db, kept for a day before an upgrade older tools cannot open), put its tables back in the store and return it to that version instead").argument("<file>", "a file `store backup` wrote, or a rollback copy; one written with --encrypt asks for its password").action(async function(file2) {
9076
+ var restoreCommand = /* @__PURE__ */ __name((owner) => inStoreBackups(grantsAuthority(annotate(new Command("restore"), { output: { entity: "store_restore" }, effects: LOCAL_WRITE })), "file").summary("restore a backup and keep the current store, or roll back a breaking upgrade").description("put a backup in place of the store; the store it replaces is kept beside it, never deleted. Given a rollback copy (backups/<store>-rollback-schema-<version>-<time>.db, kept for a day before an upgrade older tools cannot open), put its tables back in the store and return it to that version instead").argument("<file>", "a file `store backup` wrote, or a rollback copy; one written with --encrypt asks for its password").action(async function(file2) {
8996
9077
  const path = storePath(environmentOf(this).env ?? process.env);
8997
- const given = resolve(file2);
9078
+ const given = resolve2(file2);
8998
9079
  if (!existsSync10(given))
8999
9080
  throw new CliError("not_found", `no file at ${given}`);
9000
9081
  refuseWhileServing(this, owner);
9001
9082
  if (!isSealed(given))
9002
9083
  return restoreFrom(this, owner, given, given);
9003
9084
  const opened = `${path}.unsealing-${process.pid}`;
9004
- mkdirSync(dirname3(path), { recursive: true, mode: 448 });
9085
+ mkdirSync(dirname4(path), { recursive: true, mode: 448 });
9005
9086
  try {
9006
9087
  await unsealFile(given, opened, await passwordOf(this, { twice: false }));
9007
9088
  await restoreFrom(this, owner, opened, given);
@@ -9024,7 +9105,7 @@ var restoreFrom = /* @__PURE__ */ __name(async (command, owner, backup, given) =
9024
9105
  const waitMs = environmentOf(command).storeLockWaitMs;
9025
9106
  await quiesce(path, owner, "restore", (message) => renderer.warn(message), waitMs);
9026
9107
  } else
9027
- mkdirSync(dirname3(path), { recursive: true, mode: 448 });
9108
+ mkdirSync(dirname4(path), { recursive: true, mode: 448 });
9028
9109
  const incoming = `${path}.restoring-${stamp}`;
9029
9110
  copyFileSync(backup, incoming, constants.COPYFILE_EXCL);
9030
9111
  chmodSync(incoming, 384);
@@ -9206,6 +9287,11 @@ export {
9206
9287
  checkFor,
9207
9288
  passes,
9208
9289
  seal,
9290
+ notLocalPaths,
9291
+ isLocalPathOption,
9292
+ isLocalPathArgument,
9293
+ refuseAgentPaths,
9294
+ absoluteFrom,
9209
9295
  storeRecoveryCheck,
9210
9296
  storeRecoveryRun,
9211
9297
  recoveryNotes,