@wirecat/amo-cli 0.4.0 → 0.6.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 (173) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/contracts/wirecat.json +2 -1
  3. package/dist/amo/allow-list.d.ts +1 -1
  4. package/dist/amo/allow-list.d.ts.map +1 -1
  5. package/dist/amo/oauth.d.ts.map +1 -1
  6. package/dist/amo/oauth.js +3 -4
  7. package/dist/amo/oauth.js.map +1 -1
  8. package/dist/amo/operation.d.ts +1 -1
  9. package/dist/amo/operation.d.ts.map +1 -1
  10. package/dist/amo/transport.d.ts.map +1 -1
  11. package/dist/amo/transport.js +3 -6
  12. package/dist/amo/transport.js.map +1 -1
  13. package/dist/bin/amo.js +2 -2
  14. package/dist/bundle/agent-VVACEKSX.js +42 -0
  15. package/dist/bundle/{all-profiles-PRNXEZRH.js → all-profiles-QNUKL4NA.js} +11 -11
  16. package/dist/bundle/amo.js +28 -28
  17. package/dist/bundle/{anthropic-FDI24DU2.js → anthropic-PQN6MNP7.js} +5 -5
  18. package/dist/bundle/{app-server-WAKJVDLN.js → app-server-Q2QEA7GP.js} +71 -69
  19. package/dist/bundle/areas-27FRPBF3.js +71 -0
  20. package/dist/bundle/{bun-YPXUXMBI.js → bun-F4M4KCNA.js} +2 -2
  21. package/dist/bundle/{bun-sqlite-UBQ5M47X.js → bun-sqlite-P5IDBDVR.js} +6 -6
  22. package/dist/bundle/{chunk-G3LAYJJJ.js → chunk-22KAQPX7.js} +4 -4
  23. package/dist/bundle/{chunk-XEYT2EQT.js → chunk-2JGNMZ55.js} +6 -6
  24. package/dist/bundle/{chunk-PL7TNKAY.js → chunk-2VDHC7QO.js} +2 -2
  25. package/dist/bundle/{chunk-BCIZAUDV.js → chunk-34ZOMVUK.js} +9 -9
  26. package/dist/bundle/{chunk-SHOSFYI7.js → chunk-3J3EDSXF.js} +20 -84
  27. package/dist/bundle/{chunk-ELAKOEIO.js → chunk-3TYER5IK.js} +14 -6
  28. package/dist/bundle/{chunk-NFWD4QX3.js → chunk-5NGLCDYQ.js} +2 -2
  29. package/dist/bundle/{chunk-NKYWQTS2.js → chunk-5SQTHOBI.js} +270 -252
  30. package/dist/bundle/{chunk-Z2B3VNRI.js → chunk-6GE36KUE.js} +11 -11
  31. package/dist/bundle/{chunk-GQKEMBM6.js → chunk-6GZKY3HV.js} +121 -36
  32. package/dist/bundle/{chunk-M54YKD3I.js → chunk-6OV2TRGF.js} +7 -7
  33. package/dist/bundle/{chunk-MW7HUD6R.js → chunk-7CPIZFOE.js} +9 -9
  34. package/dist/bundle/{chunk-TIR3AB35.js → chunk-A5K2NU3K.js} +913 -795
  35. package/dist/bundle/{chunk-5HZMXHRH.js → chunk-AEC4H5WZ.js} +6 -6
  36. package/dist/bundle/{chunk-WAFB3IWJ.js → chunk-APBEDWOE.js} +5 -5
  37. package/dist/bundle/{chunk-V5SETIQK.js → chunk-AQ5RIOUE.js} +1 -1
  38. package/dist/bundle/{chunk-RQPB2BSH.js → chunk-B7L5MSRP.js} +2 -2
  39. package/dist/bundle/{chunk-HZZ56JO7.js → chunk-C7JPYWYQ.js} +1 -1
  40. package/dist/bundle/{chunk-KRD375P7.js → chunk-DIZEHPS6.js} +39 -30
  41. package/dist/bundle/{chunk-TCSVW7BA.js → chunk-DNCLQPOM.js} +1 -1
  42. package/dist/bundle/{chunk-WASBOYI2.js → chunk-DPV53EZC.js} +4 -4
  43. package/dist/bundle/{chunk-HDZNSOV5.js → chunk-DUPCDJ3W.js} +14 -10
  44. package/dist/bundle/{chunk-YHVHDRED.js → chunk-DWT24UVR.js} +6 -6
  45. package/dist/bundle/chunk-DXWJORSY.js +1703 -0
  46. package/dist/bundle/{chunk-E3EWS6DF.js → chunk-DY3PLWIH.js} +6 -6
  47. package/dist/bundle/{chunk-A4W7J6VN.js → chunk-DYWHAJRK.js} +37 -190
  48. package/dist/bundle/{chunk-LAR2DLTI.js → chunk-EXRM3ML4.js} +4 -4
  49. package/dist/bundle/{chunk-ZJC2XJQC.js → chunk-FFER7KJI.js} +13 -13
  50. package/dist/bundle/{chunk-V2QWX6B3.js → chunk-FIP2DG7W.js} +3 -3
  51. package/dist/bundle/{chunk-5II6TAJE.js → chunk-FTH6WGYO.js} +1 -1
  52. package/dist/bundle/{chunk-2AIG2SSJ.js → chunk-FWRLGIF6.js} +1668 -169
  53. package/dist/bundle/{chunk-DWD3KDJA.js → chunk-FYOPPKAN.js} +1 -1
  54. package/dist/bundle/{chunk-ABMPZL2P.js → chunk-G3N2RHGF.js} +19 -15
  55. package/dist/bundle/{chunk-GBQ76X6T.js → chunk-G46PNDWL.js} +2 -2
  56. package/dist/bundle/{chunk-VG26HDKH.js → chunk-G6NY7LFB.js} +4 -4
  57. package/dist/bundle/{chunk-5SJEJYQZ.js → chunk-GOCMJBEE.js} +3 -3
  58. package/dist/bundle/{chunk-3K6T2G52.js → chunk-GRGCZSES.js} +6 -6
  59. package/dist/bundle/{chunk-4PQECIU2.js → chunk-GVSKLZRD.js} +2 -2
  60. package/dist/bundle/{chunk-UEN5NWNW.js → chunk-GZ7WBU5Y.js} +1 -1
  61. package/dist/bundle/{chunk-KQZTX4LM.js → chunk-HN2LCLGT.js} +19 -19
  62. package/dist/bundle/{chunk-SFZVMKB6.js → chunk-HO4JGD4Q.js} +1 -1
  63. package/dist/bundle/{chunk-SZX7EPPY.js → chunk-HOF7GQWW.js} +4 -4
  64. package/dist/bundle/chunk-HUAHLO6N.js +29 -0
  65. package/dist/bundle/chunk-IDCZ4LWS.js +150 -0
  66. package/dist/bundle/{chunk-23AQD7JU.js → chunk-IN3VL7UU.js} +18 -17
  67. package/dist/bundle/{chunk-QGFURWEP.js → chunk-ISQ23VKV.js} +8 -1
  68. package/dist/bundle/{chunk-PLU2IQXC.js → chunk-JVBCQHCS.js} +3 -3
  69. package/dist/bundle/{chunk-VEFAYLKX.js → chunk-K5W7YEHB.js} +187 -114
  70. package/dist/bundle/{chunk-PIOR6PIO.js → chunk-KAFSS35C.js} +2 -2
  71. package/dist/bundle/{chunk-VG2ERHFJ.js → chunk-KLRCTMES.js} +3 -3
  72. package/dist/bundle/{chunk-KORZEYZN.js → chunk-KYRYD4CR.js} +1 -1
  73. package/dist/bundle/{chunk-FEUNZG7U.js → chunk-LBZSURLL.js} +38 -38
  74. package/dist/bundle/{chunk-EAX5RO7S.js → chunk-LC7ZD2RW.js} +1 -1
  75. package/dist/bundle/{chunk-O3WE5IGP.js → chunk-LH6FJYMO.js} +6 -6
  76. package/dist/bundle/{chunk-DWA5TZMP.js → chunk-LJKINNWC.js} +8 -8
  77. package/dist/bundle/{chunk-U46RNOEQ.js → chunk-M36XP74N.js} +3 -3
  78. package/dist/bundle/chunk-MNPGZCKE.js +361 -0
  79. package/dist/bundle/{chunk-WR2FPZTE.js → chunk-MRPMORLH.js} +8 -8
  80. package/dist/bundle/{chunk-CEBX63XY.js → chunk-NNREILWP.js} +8 -8
  81. package/dist/bundle/chunk-NSOY4FMN.js +159 -0
  82. package/dist/bundle/{chunk-SNBYFQHT.js → chunk-OEEWVKJX.js} +1 -1
  83. package/dist/bundle/{chunk-YREKMP24.js → chunk-OGJFDKDL.js} +4 -4
  84. package/dist/bundle/chunk-PATZAYFZ.js +453 -0
  85. package/dist/bundle/chunk-PCR6GFNP.js +1171 -0
  86. package/dist/bundle/{chunk-3PCVQCCV.js → chunk-Q4MH2O5E.js} +2 -2
  87. package/dist/bundle/{chunk-7OVTUADG.js → chunk-QFOP3KUP.js} +8 -8
  88. package/dist/bundle/{chunk-YFRTEJ6V.js → chunk-QQRJEWKB.js} +7 -7
  89. package/dist/bundle/{chunk-GJBOZAUD.js → chunk-RNWUCAJJ.js} +3 -3
  90. package/dist/bundle/{chunk-AP3CWDRK.js → chunk-S6JG4YUH.js} +2 -2
  91. package/dist/bundle/{chunk-KBAOJISR.js → chunk-SDVUGWD7.js} +7 -7
  92. package/dist/bundle/{chunk-WEWJA42Q.js → chunk-SEFE6PGL.js} +12 -12
  93. package/dist/bundle/{chunk-6PILR4AX.js → chunk-SWCJM3YD.js} +2 -2
  94. package/dist/bundle/{chunk-TEGQVVCZ.js → chunk-SYRDEMQE.js} +16709 -13048
  95. package/dist/bundle/{chunk-NXNUCGGO.js → chunk-SYYQZDHJ.js} +6 -6
  96. package/dist/bundle/{chunk-SMM7GS4Q.js → chunk-T3W4V4A6.js} +1 -1
  97. package/dist/bundle/{chunk-EBNCUQLV.js → chunk-TCT5D2X2.js} +1 -1
  98. package/dist/bundle/{chunk-ASU63X5C.js → chunk-TES7MB6I.js} +2 -2
  99. package/dist/bundle/{chunk-745FMNI5.js → chunk-TXDR6YSF.js} +1 -1
  100. package/dist/bundle/{chunk-3WG4MTQI.js → chunk-TY7NDMFY.js} +1 -1
  101. package/dist/bundle/{chunk-AN6IJYH3.js → chunk-U6XPWCWM.js} +5 -5
  102. package/dist/bundle/{chunk-LZ4IWN43.js → chunk-UFKC7TIX.js} +1617 -1990
  103. package/dist/bundle/{chunk-IPNIF5JE.js → chunk-UNWF3TH5.js} +4 -4
  104. package/dist/bundle/{chunk-6QMSKJB4.js → chunk-W3BOR6AT.js} +8 -8
  105. package/dist/bundle/{chunk-SCMB4LI6.js → chunk-WIHN3ELW.js} +19 -19
  106. package/dist/bundle/{chunk-UCM7C773.js → chunk-X76RS6JO.js} +178 -61
  107. package/dist/bundle/{chunk-GMHRPX5M.js → chunk-YF3S26TS.js} +61 -61
  108. package/dist/bundle/{chunk-ZKRWNL4T.js → chunk-ZCQ4H7CA.js} +2 -2
  109. package/dist/bundle/{chunk-CYHIM5SL.js → chunk-ZOZV32IR.js} +3 -3
  110. package/dist/bundle/{chunk-OYMHPQF7.js → chunk-ZTKHXDEU.js} +4 -4
  111. package/dist/bundle/{cli-QDPKC2HJ.js → cli-EAD3WZLR.js} +119 -105
  112. package/dist/bundle/command-contract-SMEJ2ICG.js +40 -0
  113. package/dist/bundle/{command-server-entry-TX7WNN7G.js → command-server-entry-YTZP6I4T.js} +29 -28
  114. package/dist/bundle/{decode-BLPC7OYE.js → decode-57BE5OBT.js} +5 -5
  115. package/dist/bundle/{dispatch-5JUT55CS.js → dispatch-56FECRCU.js} +8 -8
  116. package/dist/bundle/{echarts-54D3FOCL.js → echarts-QMAA7HH5.js} +2 -2
  117. package/dist/bundle/{embed-O7KMDYM7.js → embed-NFGFYUO4.js} +6 -6
  118. package/dist/bundle/{embedder-4PE67CLX.js → embedder-SRBOJMXX.js} +9 -9
  119. package/dist/bundle/{failure-NNQYTB3Z.js → failure-WDSX6H3B.js} +2 -2
  120. package/dist/bundle/{first-run-EAU5SHBI.js → first-run-HWRUL2GR.js} +12 -12
  121. package/dist/bundle/first-screen-ATN4D3FQ.js +41 -0
  122. package/dist/bundle/{instructions-ONXP5DZQ.js → instructions-4H7UREH2.js} +1 -1
  123. package/dist/bundle/{mcp-ZNULRPZ4.js → mcp-5HFPWC3W.js} +2 -2
  124. package/dist/bundle/meeting-combined-BGDEHCWY.js +26 -0
  125. package/dist/bundle/{meeting-model-FWIZRKVN.js → meeting-model-WWGVRXPL.js} +11 -11
  126. package/dist/bundle/{meeting-semantic-M4YVJ57W.js → meeting-semantic-ZQ47BL2Z.js} +6 -6
  127. package/dist/bundle/{node-UTQCYQF5.js → node-P3PUHKYH.js} +2 -2
  128. package/dist/bundle/{node-sqlite-APJG6MGL.js → node-sqlite-JOTSNH3P.js} +7 -7
  129. package/dist/bundle/{oauth-TY7RMIBL.js → oauth-XPSAL6VO.js} +7 -7
  130. package/dist/bundle/{open-WDVEQL75.js → open-PO52FVA5.js} +5 -5
  131. package/dist/bundle/{openai-H5UJHSEZ.js → openai-WITYLMY5.js} +15 -15
  132. package/dist/bundle/{process-MGMXXPMY.js → process-AFIXYXWL.js} +1 -1
  133. package/dist/bundle/{program-IF36C6VR.js → program-JODTZNBZ.js} +331 -196
  134. package/dist/bundle/{prompt-4RLIWLMF.js → prompt-XORLAXHY.js} +5 -5
  135. package/dist/bundle/{recognize-UIRTMWM4.js → recognize-JKMZHDYS.js} +4 -4
  136. package/dist/bundle/{remote-L3MNWZQK.js → remote-3IMEJTEH.js} +9 -9
  137. package/dist/bundle/{rerank-F4KZQTY6.js → rerank-3F2E6NNN.js} +7 -7
  138. package/dist/bundle/{serve-37AUYTWS.js → serve-6BWU3NMB.js} +9 -9
  139. package/dist/bundle/{server-UBG676ZJ.js → server-GPSB5WFG.js} +63 -61
  140. package/dist/bundle/server-HMCC64ZU.js +88 -0
  141. package/dist/bundle/source-E72OS27D.js +47 -0
  142. package/dist/bundle/{sqlite-runtime-CI3RW7VA.js → sqlite-runtime-YHYQDUXE.js} +6 -6
  143. package/dist/bundle/{state-JOHLSLUO.js → state-R7W4U6T4.js} +6 -6
  144. package/dist/bundle/{store-OSOUXBYL.js → store-HTVRL7FB.js} +56 -43
  145. package/dist/bundle/store-IWW6U6QN.js +34 -0
  146. package/dist/bundle/{store-2MBG4IUS.js → store-TBZ3ZS6H.js} +25 -23
  147. package/dist/bundle/store-maintenance-command-CJM2VLMW.js +75 -0
  148. package/dist/bundle/surface-5GBWNYBE.js +74 -0
  149. package/dist/bundle/writer-TW2Q55VJ.js +49 -0
  150. package/dist/commands/crm-shared.js +1 -1
  151. package/dist/commands/crm-shared.js.map +1 -1
  152. package/dist/commands/session.d.ts.map +1 -1
  153. package/dist/commands/session.js +1 -6
  154. package/dist/commands/session.js.map +1 -1
  155. package/dist/version.d.ts +1 -1
  156. package/dist/version.js +1 -1
  157. package/package.json +4 -4
  158. package/skills/amo-cli/SKILL.md +6 -0
  159. package/dist/bundle/agent-43BMVBX2.js +0 -40
  160. package/dist/bundle/chunk-2UJ7ZZZC.js +0 -79
  161. package/dist/bundle/chunk-FQRP6JWX.js +0 -29
  162. package/dist/bundle/chunk-IBEHYGG6.js +0 -721
  163. package/dist/bundle/chunk-M33XHJTM.js +0 -1266
  164. package/dist/bundle/chunk-S6DTLAOB.js +0 -761
  165. package/dist/bundle/command-contract-KWNCP3MQ.js +0 -39
  166. package/dist/bundle/first-screen-APSNGZYZ.js +0 -39
  167. package/dist/bundle/meeting-combined-W2XIYXFU.js +0 -24
  168. package/dist/bundle/server-CRF4QSZR.js +0 -86
  169. package/dist/bundle/source-Z7GH7T4B.js +0 -44
  170. package/dist/bundle/store-SNW6U32Y.js +0 -34
  171. package/dist/bundle/store-maintenance-command-W7V54SLT.js +0 -73
  172. package/dist/bundle/surface-ESJS2FUI.js +0 -72
  173. package/dist/bundle/writer-BJDQMKUV.js +0 -46
@@ -1,17 +1,16 @@
1
1
  import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
- answerOf,
5
4
  messengerContext
6
- } from "./chunk-A4W7J6VN.js";
5
+ } from "./chunk-DYWHAJRK.js";
7
6
  import {
8
7
  chatEventAnswer,
9
8
  memberAnswer,
10
9
  pollVoteAnswer
11
- } from "./chunk-WR2FPZTE.js";
10
+ } from "./chunk-MRPMORLH.js";
12
11
  import {
13
12
  serveRelay
14
- } from "./chunk-XEYT2EQT.js";
13
+ } from "./chunk-2JGNMZ55.js";
15
14
  import {
16
15
  FETCHING,
17
16
  RULES_VERSION,
@@ -22,23 +21,27 @@ import {
22
21
  onlineDeps,
23
22
  openRequestTask,
24
23
  patiently,
25
- refuseLockedOutput,
26
24
  senderIsMe,
27
25
  servicesFor,
28
26
  syncsOneChat,
29
27
  withTimeLimit
30
- } from "./chunk-TIR3AB35.js";
28
+ } from "./chunk-A5K2NU3K.js";
31
29
  import {
32
- newSendId
33
- } from "./chunk-2AIG2SSJ.js";
30
+ answerOf,
31
+ inside,
32
+ newSendId,
33
+ realPathOf,
34
+ refuseLockedOutput,
35
+ refusedPlace
36
+ } from "./chunk-FWRLGIF6.js";
34
37
  import {
35
38
  capability
36
- } from "./chunk-4PQECIU2.js";
39
+ } from "./chunk-GVSKLZRD.js";
37
40
  import {
38
41
  queryTerms,
39
42
  typedQuery,
40
43
  withQuery
41
- } from "./chunk-ABMPZL2P.js";
44
+ } from "./chunk-G3N2RHGF.js";
42
45
  import {
43
46
  holdLock,
44
47
  lockPath,
@@ -46,7 +49,7 @@ import {
46
49
  releaseLock,
47
50
  servingProfiles,
48
51
  takeLock
49
- } from "./chunk-U46RNOEQ.js";
52
+ } from "./chunk-M36XP74N.js";
50
53
  import {
51
54
  Command,
52
55
  LOCAL_READ,
@@ -73,10 +76,10 @@ import {
73
76
  snakeKeys,
74
77
  storeTable,
75
78
  withoutProviderRefs
76
- } from "./chunk-NKYWQTS2.js";
79
+ } from "./chunk-5SQTHOBI.js";
77
80
  import {
78
81
  holdersOf
79
- } from "./chunk-SMM7GS4Q.js";
82
+ } from "./chunk-T3W4V4A6.js";
80
83
  import {
81
84
  QUICK_HEALTH_CHECKS,
82
85
  fts5Tables,
@@ -84,7 +87,7 @@ import {
84
87
  lossUnknown,
85
88
  storeDamageReport,
86
89
  storeHealth
87
- } from "./chunk-KQZTX4LM.js";
90
+ } from "./chunk-HN2LCLGT.js";
88
91
  import {
89
92
  CORPORA,
90
93
  MIGRATIONS,
@@ -122,55 +125,55 @@ import {
122
125
  storeClients,
123
126
  storeContents,
124
127
  vectorIndexCounts
125
- } from "./chunk-TEGQVVCZ.js";
128
+ } from "./chunk-SYRDEMQE.js";
126
129
  import {
127
130
  currentRun,
128
131
  readDamageMark,
129
132
  readHealthMark,
130
133
  readJournalMark,
131
134
  recordDeepCheck
132
- } from "./chunk-M33XHJTM.js";
135
+ } from "./chunk-PCR6GFNP.js";
133
136
  import {
134
137
  failureKey,
135
138
  isStoreDamage
136
- } from "./chunk-ELAKOEIO.js";
139
+ } from "./chunk-3TYER5IK.js";
137
140
  import {
138
141
  modelAddressAllowed,
139
142
  onThisComputer
140
- } from "./chunk-E3EWS6DF.js";
143
+ } from "./chunk-DY3PLWIH.js";
141
144
  import {
142
145
  renderMessages
143
- } from "./chunk-PIOR6PIO.js";
146
+ } from "./chunk-KAFSS35C.js";
144
147
  import {
145
148
  levelFor
146
- } from "./chunk-KBAOJISR.js";
149
+ } from "./chunk-SDVUGWD7.js";
147
150
  import {
148
151
  formatLocator,
149
152
  parseLocator
150
- } from "./chunk-S6DTLAOB.js";
153
+ } from "./chunk-PATZAYFZ.js";
151
154
  import {
152
155
  queryFieldsOf
153
- } from "./chunk-GMHRPX5M.js";
156
+ } from "./chunk-YF3S26TS.js";
154
157
  import {
155
158
  readSharedSection,
156
159
  sharedConfigPath,
157
160
  writeSharedSection
158
- } from "./chunk-YFRTEJ6V.js";
161
+ } from "./chunk-QQRJEWKB.js";
159
162
  import {
160
163
  readSecret
161
- } from "./chunk-VG2ERHFJ.js";
164
+ } from "./chunk-KLRCTMES.js";
162
165
  import {
163
166
  storePath
164
- } from "./chunk-ZKRWNL4T.js";
167
+ } from "./chunk-ZCQ4H7CA.js";
165
168
  import {
166
169
  openCache
167
- } from "./chunk-NXNUCGGO.js";
170
+ } from "./chunk-SYYQZDHJ.js";
168
171
  import {
169
172
  Credentials,
170
173
  isMovedRun,
171
174
  resolvePaths,
172
175
  writeSecurely
173
- } from "./chunk-SCMB4LI6.js";
176
+ } from "./chunk-WIHN3ELW.js";
174
177
  import {
175
178
  array,
176
179
  boolean,
@@ -192,10 +195,10 @@ import {
192
195
  string,
193
196
  transform,
194
197
  trim
195
- } from "./chunk-7OVTUADG.js";
198
+ } from "./chunk-QFOP3KUP.js";
196
199
  import {
197
200
  CliError
198
- } from "./chunk-AP3CWDRK.js";
201
+ } from "./chunk-S6JG4YUH.js";
199
202
  import {
200
203
  __commonJS,
201
204
  __name,
@@ -270,9 +273,9 @@ var require_liquid_node = __commonJS({
270
273
  __name(isIterator, "isIterator");
271
274
  function promisify(fn) {
272
275
  return function(...args) {
273
- return new Promise((resolve3, reject2) => {
276
+ return new Promise((resolve4, reject2) => {
274
277
  fn(...args, (err, result2) => {
275
- err ? reject2(err) : resolve3(result2);
278
+ err ? reject2(err) : resolve4(result2);
276
279
  });
277
280
  });
278
281
  };
@@ -1862,12 +1865,12 @@ var require_liquid_node = __commonJS({
1862
1865
  return fs$1.readFileSync(filepath, "utf8");
1863
1866
  }
1864
1867
  __name(readFileSync6, "readFileSync");
1865
- function resolve2(root, file2, ext) {
1868
+ function resolve3(root, file2, ext) {
1866
1869
  if (!path.extname(file2))
1867
1870
  file2 += ext;
1868
1871
  return path.resolve(root, file2);
1869
1872
  }
1870
- __name(resolve2, "resolve");
1873
+ __name(resolve3, "resolve");
1871
1874
  function fallback(file2) {
1872
1875
  try {
1873
1876
  return requireResolve(file2);
@@ -1875,10 +1878,10 @@ var require_liquid_node = __commonJS({
1875
1878
  }
1876
1879
  }
1877
1880
  __name(fallback, "fallback");
1878
- function dirname4(filepath) {
1881
+ function dirname5(filepath) {
1879
1882
  return path.dirname(filepath);
1880
1883
  }
1881
- __name(dirname4, "dirname");
1884
+ __name(dirname5, "dirname");
1882
1885
  var realpathAsync = promisify(fs$1.realpath);
1883
1886
  async function contains(root, file2) {
1884
1887
  try {
@@ -1908,9 +1911,9 @@ var require_liquid_node = __commonJS({
1908
1911
  readFile,
1909
1912
  existsSync: existsSync11,
1910
1913
  readFileSync: readFileSync6,
1911
- resolve: resolve2,
1914
+ resolve: resolve3,
1912
1915
  fallback,
1913
- dirname: dirname4,
1916
+ dirname: dirname5,
1914
1917
  contains,
1915
1918
  containsSync,
1916
1919
  sep: path.sep
@@ -3635,7 +3638,7 @@ var require_liquid_node = __commonJS({
3635
3638
  uri_escape,
3636
3639
  slugify
3637
3640
  });
3638
- var join6 = argumentsToValue(function(v, arg) {
3641
+ var join7 = argumentsToValue(function(v, arg) {
3639
3642
  const array2 = toArray(v);
3640
3643
  const sep = isNil(arg) ? " " : stringify(arg);
3641
3644
  let outputSize = sep.length * Math.max(array2.length - 1, 0);
@@ -3911,7 +3914,7 @@ var require_liquid_node = __commonJS({
3911
3914
  __name(sample, "sample");
3912
3915
  var arrayFilters = /* @__PURE__ */ Object.freeze({
3913
3916
  __proto__: null,
3914
- join: join6,
3917
+ join: join7,
3915
3918
  last,
3916
3919
  first,
3917
3920
  reverse,
@@ -5535,11 +5538,11 @@ var require_liquid_node = __commonJS({
5535
5538
  }
5536
5539
  });
5537
5540
 
5538
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
5541
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
5539
5542
  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";
5540
- import { dirname as dirname3, resolve } from "node:path";
5543
+ import { dirname as dirname4, resolve as resolve2 } from "node:path";
5541
5544
 
5542
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/sealed.js
5545
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/sealed.js
5543
5546
  import { createCipheriv, createDecipheriv, createHash, randomBytes, scrypt, timingSafeEqual } from "node:crypto";
5544
5547
  import { closeSync, createReadStream, createWriteStream, existsSync, openSync, readSync, renameSync, rmSync, statSync } from "node:fs";
5545
5548
  import { Transform } from "node:stream";
@@ -5551,7 +5554,7 @@ var NONCE = 12;
5551
5554
  var TAG = 16;
5552
5555
  var HEADER = MAGIC.length + 3 + SALT + NONCE;
5553
5556
  var COST = { log2N: 17, r: 8, p: 1 };
5554
- 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");
5557
+ 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");
5555
5558
  var checkFor = /* @__PURE__ */ __name(async (password, cost = COST) => {
5556
5559
  refuseEmpty(password);
5557
5560
  const salt = randomBytes(SALT);
@@ -5646,7 +5649,7 @@ var unsealFile = /* @__PURE__ */ __name(async (from, to, password) => {
5646
5649
  renameSync(pending, to);
5647
5650
  }, "unsealFile");
5648
5651
 
5649
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/store/compatibility.js
5652
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/store/compatibility.js
5650
5653
  var SPEAKS = MIGRATIONS.at(-1)?.version ?? 0;
5651
5654
  var fileSchemaOf = /* @__PURE__ */ __name((database) => {
5652
5655
  const tracked = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'schema_migrations'").get();
@@ -5670,7 +5673,7 @@ var compatibilityOf = /* @__PURE__ */ __name((file2, migrations = MIGRATIONS) =>
5670
5673
  };
5671
5674
  }, "compatibilityOf");
5672
5675
 
5673
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/store/repair.js
5676
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/store/repair.js
5674
5677
  import { createHash as createHash2 } from "node:crypto";
5675
5678
  var COPY_MARK = "__repair_";
5676
5679
  var COPY_NAME = /__repair_[0-9a-f]{8}(_\d+)?$/;
@@ -5924,19 +5927,79 @@ var deleteCopy = /* @__PURE__ */ __name((database, name) => {
5924
5927
  return found;
5925
5928
  }, "deleteCopy");
5926
5929
 
5927
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/cli/store-info.js
5930
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/path-options.js
5931
+ import { dirname, isAbsolute, join, resolve } from "node:path";
5932
+ var PATH_NAME = /^([a-z]+-)*(file|path|dir|directory|folder)s?$/;
5933
+ var PATH_PLACEHOLDER = /[<[]([a-z]+-)*(file|path|dir|directory|folder)s?(\.\.\.)?[>\]]/;
5934
+ var NOT_LOCAL = /* @__PURE__ */ new WeakMap();
5935
+ var IN_BACKUPS = /* @__PURE__ */ new WeakMap();
5936
+ var mark = /* @__PURE__ */ __name((marks, command, names) => {
5937
+ marks.set(command, /* @__PURE__ */ new Set([...marks.get(command) ?? [], ...names]));
5938
+ return command;
5939
+ }, "mark");
5940
+ var notLocalPaths = /* @__PURE__ */ __name((command, ...names) => mark(NOT_LOCAL, command, names), "notLocalPaths");
5941
+ var inStoreBackups = /* @__PURE__ */ __name((command, ...names) => mark(IN_BACKUPS, command, names), "inStoreBackups");
5942
+ var marked = /* @__PURE__ */ __name((marks, command, name) => {
5943
+ for (let at = command; at; at = at.parent)
5944
+ if (marks.get(at)?.has(name))
5945
+ return true;
5946
+ return false;
5947
+ }, "marked");
5948
+ var isLocalPathOption = /* @__PURE__ */ __name((command, option) => PATH_PLACEHOLDER.test(option.flags) && !marked(NOT_LOCAL, command, option.attributeName()), "isLocalPathOption");
5949
+ var isLocalPathArgument = /* @__PURE__ */ __name((command, argument) => PATH_NAME.test(argument.name()) && !marked(NOT_LOCAL, command, argument.name()), "isLocalPathArgument");
5950
+ var isNamed = /* @__PURE__ */ __name((value) => value !== "" && value !== "-" && !value.includes("://"), "isNamed");
5951
+ var valuesOf = /* @__PURE__ */ __name((value) => (Array.isArray(value) ? value : [value]).filter((one) => typeof one === "string" && isNamed(one)), "valuesOf");
5952
+ var localPathsOf = /* @__PURE__ */ __name((action) => {
5953
+ const found = [];
5954
+ for (let at = action; at; at = at.parent) {
5955
+ for (const option of at.options) {
5956
+ const key = option.attributeName();
5957
+ if (!isLocalPathOption(at, option) || at.getOptionValueSource(key) !== "cli")
5958
+ continue;
5959
+ const flag = option.long ?? option.flags;
5960
+ for (const value of valuesOf(at.getOptionValue(key)))
5961
+ found.push({ flag, value, inBackups: marked(IN_BACKUPS, at, key) });
5962
+ }
5963
+ }
5964
+ action.registeredArguments.forEach((argument, index) => {
5965
+ const value = action.processedArgs[index];
5966
+ if (!isLocalPathArgument(action, argument) || value === argument.defaultValue)
5967
+ return;
5968
+ for (const one of valuesOf(value))
5969
+ found.push({ flag: `<${argument.name()}>`, value: one, inBackups: marked(IN_BACKUPS, action, argument.name()) });
5970
+ });
5971
+ return found;
5972
+ }, "localPathsOf");
5973
+ var refuseAgentPaths = /* @__PURE__ */ __name((action, app, env) => {
5974
+ const backups = join(dirname(resolve(storePath(env))), "backups");
5975
+ for (const { flag, value, inBackups } of localPathsOf(action)) {
5976
+ if (inBackups && inside(realPathOf(value), realPathOf(backups)))
5977
+ continue;
5978
+ if (refusedPlace(value, app, env))
5979
+ 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 });
5980
+ }
5981
+ }, "refuseAgentPaths");
5982
+ var absoluteFrom = /* @__PURE__ */ __name((cwd, value) => {
5983
+ if (Array.isArray(value))
5984
+ return value.map((one) => absoluteFrom(cwd, one));
5985
+ if (typeof value !== "string" || !isNamed(value) || isAbsolute(value))
5986
+ return value;
5987
+ return resolve(cwd, value);
5988
+ }, "absoluteFrom");
5989
+
5990
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/store-info.js
5928
5991
  import { existsSync as existsSync4, statSync as statSync3 } from "node:fs";
5929
5992
 
5930
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
5993
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
5931
5994
  import { existsSync as existsSync3 } from "node:fs";
5932
5995
 
5933
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/store/recover.js
5996
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/store/recover.js
5934
5997
  import { execFileSync, spawn } from "node:child_process";
5935
5998
  import { existsSync as existsSync2, readFileSync, realpathSync, renameSync as renameSync2, rmSync as rmSync2, statfsSync, statSync as statSync2, writeFileSync } from "node:fs";
5936
- import { basename, dirname, join } from "node:path";
5999
+ import { basename, dirname as dirname2, join as join2 } from "node:path";
5937
6000
  import { Transform as Transform2 } from "node:stream";
5938
6001
 
5939
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/store/refill.js
6002
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/store/refill.js
5940
6003
  var REFILL_MARGIN_MS = 864e5;
5941
6004
  var TIME_KEYS = 1e12;
5942
6005
  var integerId = `external_id GLOB '[0-9]*' AND NOT external_id GLOB '*[^0-9]*'`;
@@ -6016,7 +6079,7 @@ var forgetMail = /* @__PURE__ */ __name((database, cutoff, now) => {
6016
6079
  return [...folders].map(([account, count3]) => ({ account, folders: count3 }));
6017
6080
  }, "forgetMail");
6018
6081
 
6019
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/store/recover.js
6082
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/store/recover.js
6020
6083
  var SQLITE3_MINIMUM = [3, 43, 0];
6021
6084
  var STORE_PARTS = ["", "-wal", "-shm"];
6022
6085
  var RECOVER_LOCK = ".recover-lock";
@@ -6092,8 +6155,8 @@ var takeRecoverLock = /* @__PURE__ */ __name((path) => {
6092
6155
  return () => rmSync2(lock, { force: true });
6093
6156
  }, "takeRecoverLock");
6094
6157
  var storeHolders = /* @__PURE__ */ __name((path) => {
6095
- const folder = realpathSync(dirname(path));
6096
- const files = STORE_PARTS.map((suffix) => join(folder, `${basename(path)}${suffix}`));
6158
+ const folder = realpathSync(dirname2(path));
6159
+ const files = STORE_PARTS.map((suffix) => join2(folder, `${basename(path)}${suffix}`));
6097
6160
  const wanted = process.platform === "linux" ? files.flatMap((file2) => [file2, `${file2} (deleted)`]) : files.filter(existsSync2);
6098
6161
  const recovering = runningRecovery(path);
6099
6162
  const pids = holdersOf(wanted);
@@ -6236,7 +6299,7 @@ var placeLostRows = /* @__PURE__ */ __name((database) => {
6236
6299
  }
6237
6300
  return Object.fromEntries(Object.entries(placed).filter(([, rows2]) => rows2 > 0));
6238
6301
  }, "placeLostRows");
6239
- var copyReadableRows = /* @__PURE__ */ __name((path, target, program = "sqlite3") => new Promise((resolve2, reject) => {
6302
+ var copyReadableRows = /* @__PURE__ */ __name((path, target, program = "sqlite3") => new Promise((resolve3, reject) => {
6240
6303
  const reader = spawn(program, ["-readonly", path, `.recover --ignore-freelist --lost-and-found ${LOST_AND_FOUND}`], {
6241
6304
  stdio: ["ignore", "pipe", "pipe"]
6242
6305
  });
@@ -6273,7 +6336,7 @@ var copyReadableRows = /* @__PURE__ */ __name((path, target, program = "sqlite3"
6273
6336
  if (readerCode !== 0)
6274
6337
  reject(new CliError("validation_error", `sqlite3 could not read the store: ${errors.join("; ")}`));
6275
6338
  else
6276
- resolve2({ errors, read });
6339
+ resolve3({ errors, read });
6277
6340
  }, "exited");
6278
6341
  reader.on("error", reject);
6279
6342
  writer.on("error", reject);
@@ -6409,7 +6472,7 @@ var recoverStore = /* @__PURE__ */ __name(async ({ path, command, version, sqlit
6409
6472
  try {
6410
6473
  refuseInUse(path);
6411
6474
  const bytes = STORE_PARTS.reduce((sum, suffix) => sum + (statSync2(`${path}${suffix}`, { throwIfNoEntry: false })?.size ?? 0), 0);
6412
- const { bavail, bsize } = statfsSync(dirname(path));
6475
+ const { bavail, bsize } = statfsSync(dirname2(path));
6413
6476
  if (Number(bavail) * Number(bsize) < bytes * 1.2)
6414
6477
  throw new CliError("validation_error", `the recovery needs about ${Math.ceil(bytes * 1.2 / 1e9)} GB free beside the store`);
6415
6478
  return await recoverLocked({ path, command, version, sqlite3, now, note, copy, started, program });
@@ -6547,7 +6610,7 @@ var recoverLocked = /* @__PURE__ */ __name(async ({ path, command, version, sqli
6547
6610
  }
6548
6611
  }, "recoverLocked");
6549
6612
 
6550
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
6613
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
6551
6614
  var COUNTED = [
6552
6615
  "accounts",
6553
6616
  "chats",
@@ -6582,7 +6645,7 @@ var storeRecoveryCheck = /* @__PURE__ */ __name(async (env, command, version) =>
6582
6645
  }
6583
6646
  const journal = readJournalMark(path);
6584
6647
  recordDeepCheck(path, health, { cli: command, ...version ? { version } : {}, schema });
6585
- const mark = readDamageMark(path);
6648
+ const mark2 = readDamageMark(path);
6586
6649
  const lastKnownGood = readHealthMark(path)?.last_ok_at ?? null;
6587
6650
  const inUse = storeHolders(path) ?? null;
6588
6651
  const timers = activeTimers() ?? null;
@@ -6590,7 +6653,7 @@ var storeRecoveryCheck = /* @__PURE__ */ __name(async (env, command, version) =>
6590
6653
  const report = storeDamageReport({
6591
6654
  health,
6592
6655
  command,
6593
- mark,
6656
+ mark: mark2,
6594
6657
  journal,
6595
6658
  lastOkAt: lastKnownGood,
6596
6659
  holders: inUse,
@@ -6608,7 +6671,7 @@ var storeRecoveryCheck = /* @__PURE__ */ __name(async (env, command, version) =>
6608
6671
  invalidJson: health.invalidJson ?? [],
6609
6672
  rows,
6610
6673
  report,
6611
- damageMark: mark ? (({ inode: _, ...seen }) => seen)(mark) : null,
6674
+ damageMark: mark2 ? (({ inode: _, ...seen }) => seen)(mark2) : null,
6612
6675
  lastKnownGood,
6613
6676
  inUse,
6614
6677
  timers,
@@ -6641,12 +6704,12 @@ var storeRecoveryRun = /* @__PURE__ */ __name(async (env, { command, version, no
6641
6704
  }, "storeRecoveryRun");
6642
6705
  var refetchNotes = /* @__PURE__ */ __name(({ since, chats, mail }) => {
6643
6706
  const from = since === null ? "from the start" : `from ${since} on`;
6644
- const marked = [
6707
+ const marked2 = [
6645
6708
  ...chats.map(({ provider, account, chats: chats2 }) => `${chats2} chats of ${provider} ${account}`),
6646
6709
  ...mail.map(({ account, folders }) => `${folders} mail folders of ${account}`)
6647
6710
  ];
6648
6711
  return [
6649
- 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`,
6712
+ 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`,
6650
6713
  ...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`),
6651
6714
  "notes, memories, tags and whatever else only this store held cannot be fetched again"
6652
6715
  ];
@@ -6703,7 +6766,7 @@ var storeRecoverCommand = /* @__PURE__ */ __name(({ command, version }) => {
6703
6766
  return recover;
6704
6767
  }, "storeRecoverCommand");
6705
6768
 
6706
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/cli/store-info.js
6769
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/store-info.js
6707
6770
  var pendingIfKnown = /* @__PURE__ */ __name((database) => database.prepare("SELECT 1 FROM pragma_table_info('messages') WHERE name = 'normalized_text'").get() ? pendingNormalization(database) : null, "pendingIfKnown");
6708
6771
  var bytesOf = /* @__PURE__ */ __name((path) => existsSync4(path) ? statSync3(path).size : 0, "bytesOf");
6709
6772
  var messageOf = /* @__PURE__ */ __name((error) => error instanceof Error ? error.message : String(error), "messageOf");
@@ -6753,7 +6816,7 @@ var sharedStoreCommand = /* @__PURE__ */ __name((app) => {
6753
6816
  return app ? store.addCommand(storeRecoverCommand(app)) : store;
6754
6817
  }, "sharedStoreCommand");
6755
6818
 
6756
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/cli/messenger/password.js
6819
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/messenger/password.js
6757
6820
  var ENCRYPT_OPTION = [
6758
6821
  "--encrypt",
6759
6822
  "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"
@@ -6772,9 +6835,9 @@ var passwordOf = /* @__PURE__ */ __name(async (command, { twice }) => {
6772
6835
  return password;
6773
6836
  }, "passwordOf");
6774
6837
 
6775
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/replies/rules.js
6838
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/replies/rules.js
6776
6839
  import { existsSync as existsSync5, readFileSync as readFileSync2 } from "node:fs";
6777
- import { join as join2 } from "node:path";
6840
+ import { join as join3 } from "node:path";
6778
6841
  var REPLY_ACTIONS = ["reply", "task"];
6779
6842
  var REPLY_MODELS = ["fill-only", "may-reword"];
6780
6843
  var REPLY_KINDS = ["dialog", "group"];
@@ -6860,7 +6923,7 @@ var defaultRule = /* @__PURE__ */ __name((id) => ({
6860
6923
  reply: { template: "", asReply: true },
6861
6924
  limits: { perChat: "1/1d", perPerson: "1/1d" }
6862
6925
  }), "defaultRule");
6863
- var repliesPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join2(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).config, `${profile}.replies.json`), "repliesPathFor");
6926
+ var repliesPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).config, `${profile}.replies.json`), "repliesPathFor");
6864
6927
  var EVERYONE = { reply: "all", allow: { people: [], chats: [] }, deny: { people: [], chats: [] } };
6865
6928
  var outsideAudience = /* @__PURE__ */ __name((audience, person, chat) => {
6866
6929
  if (person !== null && audience.deny.people.includes(person))
@@ -6943,9 +7006,9 @@ var problem = /* @__PURE__ */ __name((issue) => {
6943
7006
  }, "problem");
6944
7007
  var broken = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply rules ${path} cannot be read (${why}) \u2014 fix the file`), "broken");
6945
7008
 
6946
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/replies/state.js
7009
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/replies/state.js
6947
7010
  import { existsSync as existsSync6, readFileSync as readFileSync3 } from "node:fs";
6948
- import { join as join3 } from "node:path";
7011
+ import { join as join4 } from "node:path";
6949
7012
  var ANSWERED_KEPT = 1e3;
6950
7013
  var times = record(string(), array(string()));
6951
7014
  var stateFile = object({
@@ -6957,7 +7020,7 @@ var stateFile = object({
6957
7020
  });
6958
7021
  var emptyState = /* @__PURE__ */ __name(() => ({ paused: false, answered: [], sent: {} }), "emptyState");
6959
7022
  var answeredKey = /* @__PURE__ */ __name((message) => `${message.chatId}:${message.id}`, "answeredKey");
6960
- var repliesStatePathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, `${profile}.replies-state.json`), "repliesStatePathFor");
7023
+ var repliesStatePathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join4(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, `${profile}.replies-state.json`), "repliesStatePathFor");
6961
7024
  var readRepliesState = /* @__PURE__ */ __name((path) => {
6962
7025
  if (!existsSync6(path))
6963
7026
  return emptyState();
@@ -6996,7 +7059,7 @@ var recordReply = /* @__PURE__ */ __name((state, rule2, message, now) => {
6996
7059
  }, "recordReply");
6997
7060
  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");
6998
7061
 
6999
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/replies/decide.js
7062
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/replies/decide.js
7000
7063
  var skip = /* @__PURE__ */ __name((why) => ({ skip: why }), "skip");
7001
7064
  var decide = /* @__PURE__ */ __name((rule2, incoming, state, now) => {
7002
7065
  const { message, chat, owner, sender } = incoming;
@@ -7102,10 +7165,10 @@ var filled = /* @__PURE__ */ __name((template2, senderName) => {
7102
7165
  return template2.replaceAll("{firstName}", name.split(/\s+/)[0] ?? name).replaceAll("{name}", name);
7103
7166
  }, "filled");
7104
7167
 
7105
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/replies/template.js
7168
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/replies/template.js
7106
7169
  var import_liquidjs2 = __toESM(require_liquid_node(), 1);
7107
7170
 
7108
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/render/liquid.js
7171
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/render/liquid.js
7109
7172
  var import_liquidjs = __toESM(require_liquid_node(), 1);
7110
7173
  var safeLiquid = /* @__PURE__ */ __name((limits) => {
7111
7174
  const engine = new import_liquidjs.Liquid({
@@ -7132,7 +7195,7 @@ var safeLiquid = /* @__PURE__ */ __name((limits) => {
7132
7195
  return engine;
7133
7196
  }, "safeLiquid");
7134
7197
 
7135
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/replies/template.js
7198
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/replies/template.js
7136
7199
  var TEMPLATE_LIMITS = {
7137
7200
  parse: 32768,
7138
7201
  renders: 2e3,
@@ -7271,7 +7334,7 @@ var renderReplyTemplate = /* @__PURE__ */ __name(async (reply, input) => {
7271
7334
  }
7272
7335
  }, "renderReplyTemplate");
7273
7336
 
7274
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/replies/dry-run.js
7337
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/replies/dry-run.js
7275
7338
  var DRY_RUN_DAYS = 7;
7276
7339
  var PAGE = 500;
7277
7340
  var dryRun = /* @__PURE__ */ __name(async (store, account, rules, { since, until = Date.now(), only, audience, render }) => {
@@ -7385,7 +7448,7 @@ var storedSince = /* @__PURE__ */ __name(async (store, account, chat, since) =>
7385
7448
  }
7386
7449
  }, "storedSince");
7387
7450
 
7388
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/models/ai.js
7451
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/models/ai.js
7389
7452
  var AI_PROVIDERS = ["anthropic", "openai", "ollama"];
7390
7453
  var DEFAULT_BASE_URL = {
7391
7454
  anthropic: "https://api.anthropic.com",
@@ -7553,7 +7616,7 @@ var checkAi = /* @__PURE__ */ __name(async (deps) => {
7553
7616
  }
7554
7617
  }, "checkAi");
7555
7618
 
7556
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/models/purpose.js
7619
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/models/purpose.js
7557
7620
  var HOSTED = {
7558
7621
  openai: "https://api.openai.com/v1",
7559
7622
  anthropic: "https://api.anthropic.com"
@@ -7574,14 +7637,14 @@ var purposeModel = /* @__PURE__ */ __name((settings, purpose, deps) => {
7574
7637
  return shared ? { target: shared.target, key: /* @__PURE__ */ __name(() => shared.key, "key"), shared: shared.setting } : void 0;
7575
7638
  }, "purposeModel");
7576
7639
 
7577
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/replies/consents.js
7640
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/replies/consents.js
7578
7641
  import { existsSync as existsSync7, readFileSync as readFileSync4 } from "node:fs";
7579
- import { join as join4 } from "node:path";
7642
+ import { join as join5 } from "node:path";
7580
7643
  var shape = strictObject({
7581
7644
  provider: nullable(pipe(string(), minLength(1))),
7582
7645
  deniedChats: array(pipe(string(), minLength(1)))
7583
7646
  });
7584
- var replyConsentPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join4(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).config, `${profile}.replies-consents.json`), "replyConsentPathFor");
7647
+ var replyConsentPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join5(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).config, `${profile}.replies-consents.json`), "replyConsentPathFor");
7585
7648
  var readReplyConsent = /* @__PURE__ */ __name((path) => {
7586
7649
  if (!existsSync7(path))
7587
7650
  return { provider: null, deniedChats: [] };
@@ -7599,7 +7662,7 @@ var mayModelReply = /* @__PURE__ */ __name((path, provider, chat) => {
7599
7662
  return consent.provider === provider && !consent.deniedChats.includes(chat);
7600
7663
  }, "mayModelReply");
7601
7664
 
7602
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/replies/rendering.js
7665
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/replies/rendering.js
7603
7666
  var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, options = {
7604
7667
  ai: true
7605
7668
  }) => async (rule2, message, chat, now) => {
@@ -7647,7 +7710,7 @@ var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, o
7647
7710
  return result2;
7648
7711
  }, "replyRenderer");
7649
7712
 
7650
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/replies/serve.js
7713
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/replies/serve.js
7651
7714
  var NOT_ALLOWED = "replies.send is not allow";
7652
7715
  var NO_RULES = "no rules";
7653
7716
  var ONLY_TASK = "opened a task, sent nothing";
@@ -7740,7 +7803,7 @@ var replyTo = /* @__PURE__ */ __name(async (deps, message) => {
7740
7803
  return { skip: why };
7741
7804
  }, "replyTo");
7742
7805
 
7743
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-catch-up.js
7806
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-catch-up.js
7744
7807
  var START_SYNC_DELAY_MS = 3e4;
7745
7808
  var START_SYNC_BUDGET_MS = 5 * 6e4;
7746
7809
  var START_SYNC_WINDOW_MS = 7 * 864e5;
@@ -7817,7 +7880,7 @@ var startSync = /* @__PURE__ */ __name(({ chats, newestHeld, fetch, note, warn,
7817
7880
  };
7818
7881
  }, "startSync");
7819
7882
 
7820
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-members.js
7883
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-members.js
7821
7884
  var FIRST_FETCH_MS = 6e4;
7822
7885
  var DAY_MS = 864e5;
7823
7886
  var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch, warn, firstMs = FIRST_FETCH_MS, everyMs = DAY_MS }) => {
@@ -7871,7 +7934,7 @@ var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch, warn, firstMs =
7871
7934
  };
7872
7935
  }, "memberFetches");
7873
7936
 
7874
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-notice.js
7937
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-notice.js
7875
7938
  var record2 = /* @__PURE__ */ __name((context, app, severity, attributes) => recordLogFor(context.streams.diagnostic, app, { command: currentRun().command || "serve" })[severity](attributes), "record");
7876
7939
  var noticeFor = /* @__PURE__ */ __name((context, app, severity = "warn") => ({ text, ...attributes }) => {
7877
7940
  if (context.format === "pretty") {
@@ -7904,22 +7967,22 @@ var recordDiagnostics = /* @__PURE__ */ __name((context, app) => {
7904
7967
  return context;
7905
7968
  }, "recordDiagnostics");
7906
7969
 
7907
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-outdated.js
7970
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-outdated.js
7908
7971
  import { existsSync as existsSync8, readFileSync as readFileSync5, realpathSync as realpathSync2 } from "node:fs";
7909
- import { dirname as dirname2, join as join5 } from "node:path";
7972
+ import { dirname as dirname3, join as join6 } from "node:path";
7910
7973
  var OUTDATED_CHECK_MS = 6e4;
7911
7974
  var ownPackageRoot = /* @__PURE__ */ __name((running, script = process.argv[1]) => {
7912
7975
  let dir;
7913
7976
  try {
7914
- dir = dirname2(realpathSync2(script ?? ""));
7977
+ dir = dirname3(realpathSync2(script ?? ""));
7915
7978
  } catch {
7916
7979
  return void 0;
7917
7980
  }
7918
7981
  for (let up = 0; up < 8; up++) {
7919
- const manifest = join5(dir, "package.json");
7982
+ const manifest = join6(dir, "package.json");
7920
7983
  if (existsSync8(manifest))
7921
7984
  return installedVersion(dir) === running ? dir : void 0;
7922
- const parent = dirname2(dir);
7985
+ const parent = dirname3(dir);
7923
7986
  if (parent === dir)
7924
7987
  return void 0;
7925
7988
  dir = parent;
@@ -7928,7 +7991,7 @@ var ownPackageRoot = /* @__PURE__ */ __name((running, script = process.argv[1])
7928
7991
  }, "ownPackageRoot");
7929
7992
  var installedVersion = /* @__PURE__ */ __name((root) => {
7930
7993
  try {
7931
- const { version } = JSON.parse(readFileSync5(join5(root, "package.json"), "utf8"));
7994
+ const { version } = JSON.parse(readFileSync5(join6(root, "package.json"), "utf8"));
7932
7995
  return typeof version === "string" ? version : void 0;
7933
7996
  } catch {
7934
7997
  return void 0;
@@ -7990,7 +8053,7 @@ var watchOutdated = /* @__PURE__ */ __name(({ check: check2, onOutdated, everyMs
7990
8053
  };
7991
8054
  }, "watchOutdated");
7992
8055
 
7993
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-stems.js
8056
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-stems.js
7994
8057
  var STEMS_EVERY_MS = 3e4;
7995
8058
  var STEMS_SLICE_MS = 2e3;
7996
8059
  var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY_MS, sliceMs = STEMS_SLICE_MS }) => {
@@ -8030,7 +8093,7 @@ var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY
8030
8093
  };
8031
8094
  }, "stemFills");
8032
8095
 
8033
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/cli/messenger/message-items.js
8096
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/messenger/message-items.js
8034
8097
  var defined = /* @__PURE__ */ __name((value) => Object.fromEntries(Object.entries(value).filter(([, one]) => one !== void 0)), "defined");
8035
8098
  var attachmentItem = /* @__PURE__ */ __name((attachment) => defined({
8036
8099
  kind: attachment.kind,
@@ -8105,6 +8168,8 @@ var messageItem = /* @__PURE__ */ __name((message, reader) => {
8105
8168
  thread: message.email.thread,
8106
8169
  read: message.email.read,
8107
8170
  flagged: message.email.flagged,
8171
+ mail_type: message.email.mailType,
8172
+ reach: message.email.reach,
8108
8173
  sender_score: message.email.senderScore
8109
8174
  },
8110
8175
  provider_metadata: message.providerMetadata
@@ -8126,7 +8191,7 @@ var viewOf = /* @__PURE__ */ __name((context, messenger) => ({
8126
8191
  locale: messenger.app.locale
8127
8192
  }), "viewOf");
8128
8193
 
8129
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-answers.js
8194
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-answers.js
8130
8195
  var observed = /* @__PURE__ */ __name((value) => ({
8131
8196
  value: value.value,
8132
8197
  observed_at: value.observedAt,
@@ -8193,7 +8258,7 @@ var watchEventItem = /* @__PURE__ */ __name((value, account) => {
8193
8258
  }
8194
8259
  }, "watchEventItem");
8195
8260
 
8196
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-command.js
8261
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-command.js
8197
8262
  var watchCommand = /* @__PURE__ */ __name((messenger) => annotate(new Command("watch"), {
8198
8263
  output: { entity: "watch_item" },
8199
8264
  effects: REMOTE_READ,
@@ -8348,7 +8413,7 @@ var describe = /* @__PURE__ */ __name((event, render) => {
8348
8413
  }
8349
8414
  }, "describe");
8350
8415
 
8351
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-command.js
8416
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-command.js
8352
8417
  var CURRENT_EVERY_MS = 6e4;
8353
8418
  var serveCommand = /* @__PURE__ */ __name((messenger) => {
8354
8419
  const command = annotate(new Command("serve"), {
@@ -8648,7 +8713,7 @@ var tasking = /* @__PURE__ */ __name((context, warn) => {
8648
8713
  };
8649
8714
  }, "tasking");
8650
8715
 
8651
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/cli/messenger/store-tables-command.js
8716
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/messenger/store-tables-command.js
8652
8717
  import { existsSync as existsSync9 } from "node:fs";
8653
8718
  var PATH = "store tables list";
8654
8719
  var STORE_TABLES_QUERY = {
@@ -8691,7 +8756,7 @@ var storeTablesCommand = /* @__PURE__ */ __name((owner) => {
8691
8756
  return tables;
8692
8757
  }, "storeTablesCommand");
8693
8758
 
8694
- // node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.127.0_commander@15.0.0_esbuild@0.28.2_typ_d2bed0cfbe6b4358c89d465b9e07afcb/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
8759
+ // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
8695
8760
  var SEARCH_INDEXES = ["messages_fts", "chats_fts", "identities_fts"];
8696
8761
  var WORD_INDEX = "message_words";
8697
8762
  var schemaOf = /* @__PURE__ */ __name((database) => {
@@ -8717,7 +8782,7 @@ var readingOnly = /* @__PURE__ */ __name(async (path, read) => {
8717
8782
  database.close();
8718
8783
  }
8719
8784
  }, "readingOnly");
8720
- var withoutInode = /* @__PURE__ */ __name(({ inode: _, ...mark }) => mark, "withoutInode");
8785
+ var withoutInode = /* @__PURE__ */ __name(({ inode: _, ...mark2 }) => mark2, "withoutInode");
8721
8786
  var fileSchema = /* @__PURE__ */ __name(async (path) => {
8722
8787
  try {
8723
8788
  return await readingOnly(path, (database) => fileSchemaOf(database).version);
@@ -8736,7 +8801,7 @@ var storeSummary = /* @__PURE__ */ __name(async (env, { deep = false, command, v
8736
8801
  ...version ? { version } : {},
8737
8802
  schema: await fileSchema(path)
8738
8803
  }) : null;
8739
- const mark = readDamageMark(path);
8804
+ const mark2 = readDamageMark(path);
8740
8805
  const lastKnownGood = readHealthMark(path)?.last_ok_at ?? null;
8741
8806
  const health = {
8742
8807
  checked: checked.checked,
@@ -8748,11 +8813,11 @@ var storeSummary = /* @__PURE__ */ __name(async (env, { deep = false, command, v
8748
8813
  ...checked.invalidJson?.length ? { invalidJson: checked.invalidJson } : {},
8749
8814
  ...checked.searchIndexes?.some((index) => !index.ok) ? { damagedSearchIndexes: checked.searchIndexes.filter((index) => !index.ok).map((index) => index.name) } : {}
8750
8815
  };
8751
- const damage = command ? storeDamageReport({ health: checked, command, mark, journal, lastOkAt: lastKnownGood }) : null;
8816
+ const damage = command ? storeDamageReport({ health: checked, command, mark: mark2, journal, lastOkAt: lastKnownGood }) : null;
8752
8817
  const healthOf = {
8753
8818
  health,
8754
8819
  lastKnownGood,
8755
- ...mark ? { damageMark: withoutInode(mark) } : {},
8820
+ ...mark2 ? { damageMark: withoutInode(mark2) } : {},
8756
8821
  ...journal ? { journalMark: journal } : {},
8757
8822
  ...recorded?.cleared ? { damageMarkCleared: withoutInode(recorded.cleared) } : {},
8758
8823
  // `what` keeps memo's doctor, which reads it, compiling until it moves to `whatHappened`.
@@ -8939,7 +9004,7 @@ var inspect = /* @__PURE__ */ __name((path) => reading(path, (database) => {
8939
9004
  ...schema.version >= 71 ? [["content_post_words", indexIntegrity(database, "content_post_words", 0)]] : []
8940
9005
  ]);
8941
9006
  const size = bytesOf2(path) + bytesOf2(`${path}-wal`);
8942
- const { bavail, bsize } = statfsSync2(dirname3(path));
9007
+ const { bavail, bsize } = statfsSync2(dirname4(path));
8943
9008
  const free = Number(bavail) * Number(bsize);
8944
9009
  const behind = schema.version > 0 ? chatsBehind(database) : [];
8945
9010
  const vectorIndexes = schema.version >= 34 ? vectorIndexCounts(database) : [];
@@ -9024,8 +9089,9 @@ var chatsBehind = /* @__PURE__ */ __name((database) => database.prepare(`SELECT
9024
9089
  held: row.held === null ? null : isoOf(row.held),
9025
9090
  refreshed: isoOf(row.refreshed)
9026
9091
  })), "chatsBehind");
9027
- 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() {
9092
+ 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() {
9028
9093
  const { renderer } = outputFor(this);
9094
+ const { backup = true } = this.opts();
9029
9095
  const path = storePath(environmentOf(this).env ?? process.env);
9030
9096
  if (!existsSync10(path)) {
9031
9097
  result(this, { path, exists: false });
@@ -9034,11 +9100,13 @@ var migrateCommand = /* @__PURE__ */ __name((owner) => annotate(new Command("mig
9034
9100
  }
9035
9101
  const answer = await reading(path, (database) => {
9036
9102
  const from = schemaOf(database).version;
9037
- migrate(database, {
9103
+ const notice = migrate(database, {
9038
9104
  command: owner.app.command,
9039
9105
  version: owner.app.version,
9040
- rollback: { store: path, warn: /* @__PURE__ */ __name((line) => renderer.warn(line), "warn") }
9106
+ rollback: { store: path, warn: /* @__PURE__ */ __name((line) => renderer.warn(line), "warn"), withoutCopy: !backup }
9041
9107
  });
9108
+ if (notice)
9109
+ renderer.warn(notice);
9042
9110
  const { normalized, indexed, terms } = buildWordIndex(database, (note) => renderer.note(note));
9043
9111
  const stemmed = buildStems(database, (note) => renderer.note(note));
9044
9112
  const notes = buildNoteIndex(database, (note) => renderer.note(note));
@@ -9129,10 +9197,10 @@ var vacuumInto = /* @__PURE__ */ __name(async (path, target) => {
9129
9197
  }
9130
9198
  }, "vacuumInto");
9131
9199
  var stampNow = /* @__PURE__ */ __name(() => (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-"), "stampNow");
9132
- 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) {
9200
+ 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) {
9133
9201
  const { encrypt } = this.opts();
9134
9202
  const path = storePath(environmentOf(this).env ?? process.env);
9135
- const target = resolve(file2);
9203
+ const target = resolve2(file2);
9136
9204
  const { app, env } = environmentOf(this);
9137
9205
  if (app)
9138
9206
  refuseLockedOutput(target, app, env ?? process.env, "<file>");
@@ -9169,8 +9237,8 @@ var backupCommand = /* @__PURE__ */ __name(() => destroysNothing(annotate(new Co
9169
9237
  }), "backupCommand");
9170
9238
  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) {
9171
9239
  const { output } = this.opts();
9172
- const from = resolve(file2);
9173
- const to = resolve(output);
9240
+ const from = resolve2(file2);
9241
+ const to = resolve2(output);
9174
9242
  if (!existsSync10(from))
9175
9243
  throw new CliError("not_found", `no file at ${from}`);
9176
9244
  if (!isSealed(from))
@@ -9180,16 +9248,16 @@ var decryptCommand = /* @__PURE__ */ __name(() => annotate(new Command("decrypt"
9180
9248
  await unsealFile(from, to, await passwordOf(this, { twice: false }));
9181
9249
  result(this, { path: to, from, bytes: bytesOf2(to) });
9182
9250
  }), "decryptCommand");
9183
- 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) {
9251
+ 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) {
9184
9252
  const path = storePath(environmentOf(this).env ?? process.env);
9185
- const given = resolve(file2);
9253
+ const given = resolve2(file2);
9186
9254
  if (!existsSync10(given))
9187
9255
  throw new CliError("not_found", `no file at ${given}`);
9188
9256
  refuseWhileServing(this, owner);
9189
9257
  if (!isSealed(given))
9190
9258
  return restoreFrom(this, owner, given, given);
9191
9259
  const opened = `${path}.unsealing-${process.pid}`;
9192
- mkdirSync(dirname3(path), { recursive: true, mode: 448 });
9260
+ mkdirSync(dirname4(path), { recursive: true, mode: 448 });
9193
9261
  try {
9194
9262
  await unsealFile(given, opened, await passwordOf(this, { twice: false }));
9195
9263
  await restoreFrom(this, owner, opened, given);
@@ -9212,7 +9280,7 @@ var restoreFrom = /* @__PURE__ */ __name(async (command, owner, backup, given) =
9212
9280
  const waitMs = environmentOf(command).storeLockWaitMs;
9213
9281
  await quiesce(path, owner, "restore", (message) => renderer.warn(message), waitMs);
9214
9282
  } else
9215
- mkdirSync(dirname3(path), { recursive: true, mode: 448 });
9283
+ mkdirSync(dirname4(path), { recursive: true, mode: 448 });
9216
9284
  const incoming = `${path}.restoring-${stamp}`;
9217
9285
  copyFileSync(backup, incoming, constants.COPYFILE_EXCL);
9218
9286
  chmodSync(incoming, 384);
@@ -9436,6 +9504,11 @@ export {
9436
9504
  checkFor,
9437
9505
  passes,
9438
9506
  seal,
9507
+ notLocalPaths,
9508
+ isLocalPathOption,
9509
+ isLocalPathArgument,
9510
+ refuseAgentPaths,
9511
+ absoluteFrom,
9439
9512
  storeRecoveryCheck,
9440
9513
  storeRecoveryRun,
9441
9514
  recoveryNotes,