@wirecat/attio-cli 0.6.0 → 0.8.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 (153) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +2 -2
  3. package/dist/activities.d.ts.map +1 -1
  4. package/dist/activities.js +2 -1
  5. package/dist/activities.js.map +1 -1
  6. package/dist/bin/attio.js +2 -2
  7. package/dist/bundle/agent-GUXXSLT5.js +38 -0
  8. package/dist/bundle/{all-profiles-AO5MQUUX.js → all-profiles-63N3EQ46.js} +10 -10
  9. package/dist/bundle/{anthropic-5VDU2NRC.js → anthropic-B4W7MZQE.js} +5 -5
  10. package/dist/bundle/{app-server-MUZ7JG2T.js → app-server-EXNGTHWO.js} +62 -61
  11. package/dist/bundle/attio.js +11 -11
  12. package/dist/bundle/{bun-4BURI4ZN.js → bun-OPDGMZZQ.js} +2 -2
  13. package/dist/bundle/{bun-sqlite-5B3HOPNU.js → bun-sqlite-NBAY7FR2.js} +6 -6
  14. package/dist/bundle/{chunk-3TNRZCXA.js → chunk-2JHVQMVC.js} +1 -1
  15. package/dist/bundle/{chunk-PFIHHLVJ.js → chunk-2QDUP74I.js} +34 -34
  16. package/dist/bundle/{chunk-6XXSLMSH.js → chunk-2XBDILVW.js} +1 -1
  17. package/dist/bundle/{chunk-NJZEHFQE.js → chunk-3HC5F3P7.js} +1 -1
  18. package/dist/bundle/{chunk-QFMB6VR5.js → chunk-3MSHGNVE.js} +12 -12
  19. package/dist/bundle/{chunk-XD3CY4TM.js → chunk-3YM4B2GT.js} +1 -1
  20. package/dist/bundle/{chunk-5J35ZXZC.js → chunk-4N7PP76S.js} +1 -1
  21. package/dist/bundle/{chunk-NANAZFZE.js → chunk-4RBMCXZT.js} +25 -25
  22. package/dist/bundle/{chunk-RP5AVORT.js → chunk-4RSWOPKL.js} +13 -9
  23. package/dist/bundle/{chunk-SCBLAAZU.js → chunk-5JKTVAXX.js} +19 -19
  24. package/dist/bundle/chunk-5N2V6XO7.js +119 -0
  25. package/dist/bundle/{chunk-2L6RP3YO.js → chunk-5WD22IXQ.js} +3 -3
  26. package/dist/bundle/{chunk-XUXSY6RG.js → chunk-6K4Z6CAM.js} +517 -586
  27. package/dist/bundle/{chunk-UIMVEYNX.js → chunk-6TD3DCWC.js} +2 -2
  28. package/dist/bundle/{chunk-ZZYPXW4E.js → chunk-7Z53MLQP.js} +7 -7
  29. package/dist/bundle/chunk-AATTOFNY.js +2045 -0
  30. package/dist/bundle/{chunk-DGL7FDXO.js → chunk-APARYILG.js} +19 -15
  31. package/dist/bundle/{chunk-LX72M3FE.js → chunk-DM7KWVDZ.js} +47 -31
  32. package/dist/bundle/{chunk-VHPNTMJJ.js → chunk-DNCLQPOM.js} +1 -1
  33. package/dist/bundle/{chunk-SSRHBFL5.js → chunk-DPD4FMHN.js} +6 -6
  34. package/dist/bundle/{chunk-LJLUYRPY.js → chunk-DPV53EZC.js} +4 -4
  35. package/dist/bundle/{chunk-GQ2HJ2LS.js → chunk-DURNR4RO.js} +8 -8
  36. package/dist/bundle/{chunk-OKXTO7YQ.js → chunk-EVUMQKV7.js} +3 -3
  37. package/dist/bundle/{chunk-DRMEQXZ2.js → chunk-EY36BTKZ.js} +2 -2
  38. package/dist/bundle/{chunk-NBUIGJQ5.js → chunk-FH6OEGGN.js} +14 -14
  39. package/dist/bundle/{chunk-JXN2WHB6.js → chunk-FOP6G45D.js} +10 -10
  40. package/dist/bundle/{chunk-IKYOUZ7S.js → chunk-GGMAIIVE.js} +1 -1
  41. package/dist/bundle/{chunk-KRCESNQ7.js → chunk-GTEX4IUO.js} +5 -5
  42. package/dist/bundle/{chunk-INCLKCAJ.js → chunk-HZ3C4WXD.js} +3 -3
  43. package/dist/bundle/{chunk-QYGUACZO.js → chunk-IA7LLLEI.js} +3 -3
  44. package/dist/bundle/{chunk-DGHETDUU.js → chunk-J6GVVISK.js} +8 -8
  45. package/dist/bundle/{chunk-C3O5D2M3.js → chunk-JG6LCSEX.js} +13 -13
  46. package/dist/bundle/{chunk-MS4IBIMA.js → chunk-JIGEJZ4I.js} +2520 -854
  47. package/dist/bundle/{chunk-KBXEQGZT.js → chunk-KVTNYRDO.js} +6 -6
  48. package/dist/bundle/{chunk-NCFTSBMZ.js → chunk-L45WN3AR.js} +3 -3
  49. package/dist/bundle/{chunk-JFI3VK4W.js → chunk-L72WUJAS.js} +2 -2
  50. package/dist/bundle/{chunk-VNDDWBIO.js → chunk-LKH3UKLO.js} +4 -4
  51. package/dist/bundle/{chunk-QLL6THD6.js → chunk-LM3W7YOM.js} +4 -4
  52. package/dist/bundle/{chunk-XHUVMCHI.js → chunk-M4AC55ZB.js} +165 -158
  53. package/dist/bundle/{chunk-IMZI45WT.js → chunk-MCLQTCGH.js} +90 -55
  54. package/dist/bundle/{chunk-7HPQV627.js → chunk-NB7EOAUZ.js} +1 -1
  55. package/dist/bundle/{chunk-F2BLHGGF.js → chunk-NISH4UXM.js} +2 -2
  56. package/dist/bundle/{chunk-XZ5XK3LS.js → chunk-OYEVYOCL.js} +6 -6
  57. package/dist/bundle/{chunk-6KYUVBIS.js → chunk-P7G5HFY3.js} +2 -2
  58. package/dist/bundle/{chunk-D65YVJVM.js → chunk-PAEKXVJW.js} +8 -8
  59. package/dist/bundle/{chunk-4LUZ4UMN.js → chunk-PLPBEWD4.js} +3 -3
  60. package/dist/bundle/{chunk-7E7JZXE6.js → chunk-PMQ7GP6X.js} +6 -6
  61. package/dist/bundle/{chunk-ZWUMTNGV.js → chunk-Q7ICVP25.js} +1 -1
  62. package/dist/bundle/{chunk-DDFQEOLX.js → chunk-QPPOIWPY.js} +8 -8
  63. package/dist/bundle/{chunk-LJVNAHQZ.js → chunk-QSJKSPWF.js} +4 -4
  64. package/dist/bundle/{chunk-KNRMYOV5.js → chunk-RDVTHFPP.js} +5 -5
  65. package/dist/bundle/{chunk-RLR52L52.js → chunk-RQORQN2V.js} +61 -61
  66. package/dist/bundle/{chunk-HWCXM5MI.js → chunk-RRTMPSQR.js} +2 -2
  67. package/dist/bundle/{chunk-TSHMRHL6.js → chunk-S6JG4YUH.js} +2 -2
  68. package/dist/bundle/{chunk-KGE62QLH.js → chunk-SCI7QEHF.js} +7 -7
  69. package/dist/bundle/{chunk-4Y4H5WDN.js → chunk-SSA6JBPA.js} +7 -7
  70. package/dist/bundle/{chunk-DPHQABPF.js → chunk-T4J7XFXT.js} +181 -110
  71. package/dist/bundle/{chunk-XPZ4JGD2.js → chunk-TTF5DP4V.js} +7 -7
  72. package/dist/bundle/{chunk-K34B37AP.js → chunk-TXDR6YSF.js} +1 -1
  73. package/dist/bundle/{chunk-BFESDJPU.js → chunk-TY7NDMFY.js} +1 -1
  74. package/dist/bundle/{chunk-6W4WDGLX.js → chunk-UDSL3MUU.js} +8 -8
  75. package/dist/bundle/{chunk-RO753JYR.js → chunk-UKHF37ZU.js} +17 -17
  76. package/dist/bundle/{chunk-GJ46ZIBN.js → chunk-UXJZISVL.js} +1 -1
  77. package/dist/bundle/{chunk-IM6YXEZW.js → chunk-V57E7PJQ.js} +4 -4
  78. package/dist/bundle/{chunk-LH7LQWPC.js → chunk-V7IF2K3P.js} +3 -3
  79. package/dist/bundle/{chunk-FD2SMO3B.js → chunk-VB7FZOYX.js} +1 -1
  80. package/dist/bundle/{chunk-JNQFGXKZ.js → chunk-VZ5PPYDG.js} +1 -1
  81. package/dist/bundle/chunk-WOPVBRPV.js +29 -0
  82. package/dist/bundle/{chunk-W2LQAZPM.js → chunk-WXQGA6XK.js} +3 -3
  83. package/dist/bundle/{chunk-DNPG5FFD.js → chunk-XQGN2D44.js} +3 -3
  84. package/dist/bundle/{chunk-SNE444HV.js → chunk-YNGU36GW.js} +12 -12
  85. package/dist/bundle/{chunk-MFPHMCFD.js → chunk-YWDFYQOU.js} +2 -2
  86. package/dist/bundle/{chunk-UX5HAZC5.js → chunk-ZZD2YPOX.js} +3 -3
  87. package/dist/bundle/command-contract-KCCW4LNI.js +37 -0
  88. package/dist/bundle/{command-server-entry-XSHJ5FW3.js → command-server-entry-3NPPABQQ.js} +25 -25
  89. package/dist/bundle/{decode-IRF7DV6S.js → decode-26M7XE2B.js} +5 -5
  90. package/dist/bundle/{dispatch-ZRVKJENQ.js → dispatch-2FTOHA5D.js} +8 -8
  91. package/dist/bundle/{echarts-2VZGK4IS.js → echarts-O3TNDAXJ.js} +2 -2
  92. package/dist/bundle/{embed-22IHPVQJ.js → embed-XJLEAWXE.js} +6 -6
  93. package/dist/bundle/{embedder-6P7PRQAM.js → embedder-OEL6PXEH.js} +9 -9
  94. package/dist/bundle/{failure-C2B7PYPJ.js → failure-OHIXWTR6.js} +2 -2
  95. package/dist/bundle/{first-run-J7K3GFD6.js → first-run-CIXGBXY6.js} +12 -12
  96. package/dist/bundle/first-screen-5FK4D45F.js +38 -0
  97. package/dist/bundle/{instructions-3DTYFYZN.js → instructions-AMH5RWVJ.js} +1 -1
  98. package/dist/bundle/{mcp-VNOYBWW2.js → mcp-5HFPWC3W.js} +2 -2
  99. package/dist/bundle/meeting-combined-DMVGQNJ7.js +24 -0
  100. package/dist/bundle/{meeting-model-YTQI46NN.js → meeting-model-2THAT7OH.js} +11 -11
  101. package/dist/bundle/{meeting-semantic-4AQIACOP.js → meeting-semantic-Q6XYFYUD.js} +6 -6
  102. package/dist/bundle/{node-ZN4HEANX.js → node-EGMCBAO7.js} +2 -2
  103. package/dist/bundle/{node-sqlite-ECNNSIOA.js → node-sqlite-2SWWGW6H.js} +7 -7
  104. package/dist/bundle/{oauth-YUVPUNBC.js → oauth-V5LGTXF2.js} +7 -7
  105. package/dist/bundle/{open-F3F3THJB.js → open-25EKOTZA.js} +5 -5
  106. package/dist/bundle/{openai-TGPN54Q4.js → openai-VX3OLIHM.js} +15 -15
  107. package/dist/bundle/{process-SNVAXNUR.js → process-SGHEN6MQ.js} +1 -1
  108. package/dist/bundle/{program-LGU4MURZ.js → program-Z5NUNXME.js} +754 -663
  109. package/dist/bundle/{prompt-ZDWDMLII.js → prompt-2VSPX5S7.js} +5 -5
  110. package/dist/bundle/{recognize-2TCTQBGC.js → recognize-NA5XUFKK.js} +4 -4
  111. package/dist/bundle/{remote-KUWGFPIT.js → remote-BOME6XOE.js} +9 -9
  112. package/dist/bundle/{rerank-GIWBYYU3.js → rerank-NG3XMFCV.js} +7 -7
  113. package/dist/bundle/{schemas-7JX36UC7.js → schemas-YGSTNU6F.js} +1 -1
  114. package/dist/bundle/{serve-SFE5XJM5.js → serve-MR67OBED.js} +9 -9
  115. package/dist/bundle/server-4BWAGJQO.js +80 -0
  116. package/dist/bundle/{server-26SGKDDF.js → server-OP2HJNXD.js} +54 -53
  117. package/dist/bundle/{sqlite-runtime-PBT7XUSK.js → sqlite-runtime-V5U6F5EB.js} +6 -6
  118. package/dist/bundle/{state-M5FASHHH.js → state-L4MWAATO.js} +6 -6
  119. package/dist/bundle/{store-V5JQWH4C.js → store-2ALTEH55.js} +18 -18
  120. package/dist/bundle/{store-XOPZMD2A.js → store-CXZFRG5D.js} +20 -20
  121. package/dist/bundle/store-maintenance-command-LC55DRQA.js +67 -0
  122. package/dist/bundle/surface-3GRJ7473.js +66 -0
  123. package/dist/config.d.ts +4 -4
  124. package/dist/generated/definitions.d.ts +1 -1
  125. package/dist/generated/definitions.d.ts.map +1 -1
  126. package/dist/generated/manifest.d.ts +1 -1
  127. package/dist/generated/manifest.d.ts.map +1 -1
  128. package/dist/generated/manifest.js.map +1 -1
  129. package/dist/hooks.d.ts +1 -8
  130. package/dist/hooks.d.ts.map +1 -1
  131. package/dist/hooks.js +50 -49
  132. package/dist/hooks.js.map +1 -1
  133. package/dist/links.d.ts +10 -0
  134. package/dist/links.d.ts.map +1 -0
  135. package/dist/links.js +7 -0
  136. package/dist/links.js.map +1 -0
  137. package/dist/meetings.d.ts +57 -0
  138. package/dist/meetings.d.ts.map +1 -0
  139. package/dist/meetings.js +96 -0
  140. package/dist/meetings.js.map +1 -0
  141. package/dist/version.d.ts +1 -1
  142. package/dist/version.js +1 -1
  143. package/package.json +3 -3
  144. package/skills/attio-cli/SKILL.md +3 -1
  145. package/dist/bundle/agent-GZ3MFZMA.js +0 -37
  146. package/dist/bundle/chunk-TD5O4LIV.js +0 -2021
  147. package/dist/bundle/chunk-YJKP6UZC.js +0 -37
  148. package/dist/bundle/command-contract-S54DCSQY.js +0 -37
  149. package/dist/bundle/first-screen-AWRCVE5Z.js +0 -37
  150. package/dist/bundle/meeting-combined-MLGWRQ6A.js +0 -24
  151. package/dist/bundle/server-GYTA24HH.js +0 -79
  152. package/dist/bundle/store-maintenance-command-GV4AXE3N.js +0 -66
  153. package/dist/bundle/surface-WI2E3QRQ.js +0 -65
@@ -2,19 +2,19 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  messengerContext
5
- } from "./chunk-QFMB6VR5.js";
5
+ } from "./chunk-3MSHGNVE.js";
6
6
  import {
7
7
  chatEventAnswer,
8
8
  memberAnswer,
9
9
  pollVoteAnswer
10
- } from "./chunk-GQ2HJ2LS.js";
10
+ } from "./chunk-DURNR4RO.js";
11
11
  import {
12
12
  stringWidth,
13
13
  wrapAnsi
14
14
  } from "./chunk-EH6ZEJGT.js";
15
15
  import {
16
16
  serveRelay
17
- } from "./chunk-KNRMYOV5.js";
17
+ } from "./chunk-RDVTHFPP.js";
18
18
  import {
19
19
  FETCHING,
20
20
  RULES_VERSION,
@@ -22,23 +22,26 @@ import {
22
22
  applyTaskRulesOnArrival,
23
23
  embeddingKeys,
24
24
  endpointKeyName,
25
+ inside,
25
26
  modelGateway,
26
27
  newSendId,
27
28
  onlineDeps,
28
29
  openRequestTask,
29
30
  patiently,
31
+ realPathOf,
30
32
  refuseLockedOutput,
33
+ refusedPlace,
31
34
  senderIsMe,
32
35
  servicesFor,
33
36
  syncsOneChat,
34
37
  withTimeLimit
35
- } from "./chunk-XUXSY6RG.js";
38
+ } from "./chunk-6K4Z6CAM.js";
36
39
  import {
37
40
  capability,
38
41
  queryTerms,
39
42
  typedQuery,
40
43
  withQuery
41
- } from "./chunk-DGL7FDXO.js";
44
+ } from "./chunk-APARYILG.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-DNPG5FFD.js";
52
+ } from "./chunk-XQGN2D44.js";
50
53
  import {
51
54
  Command,
52
55
  LOCAL_READ,
@@ -74,13 +77,13 @@ import {
74
77
  snakeKeys,
75
78
  storeTable,
76
79
  withoutProviderRefs
77
- } from "./chunk-XHUVMCHI.js";
80
+ } from "./chunk-M4AC55ZB.js";
78
81
  import {
79
82
  holdersOf
80
- } from "./chunk-XD3CY4TM.js";
83
+ } from "./chunk-3YM4B2GT.js";
81
84
  import {
82
85
  readSecret
83
- } from "./chunk-QYGUACZO.js";
86
+ } from "./chunk-IA7LLLEI.js";
84
87
  import {
85
88
  QUICK_HEALTH_CHECKS,
86
89
  fts5Tables,
@@ -88,7 +91,7 @@ import {
88
91
  lossUnknown,
89
92
  storeDamageReport,
90
93
  storeHealth
91
- } from "./chunk-RO753JYR.js";
94
+ } from "./chunk-UKHF37ZU.js";
92
95
  import {
93
96
  CORPORA,
94
97
  MIGRATIONS,
@@ -126,7 +129,7 @@ import {
126
129
  storeClients,
127
130
  storeContents,
128
131
  vectorIndexCounts
129
- } from "./chunk-MS4IBIMA.js";
132
+ } from "./chunk-JIGEJZ4I.js";
130
133
  import {
131
134
  currentRun,
132
135
  formatLocator,
@@ -135,35 +138,35 @@ import {
135
138
  readHealthMark,
136
139
  readJournalMark,
137
140
  recordDeepCheck
138
- } from "./chunk-TD5O4LIV.js";
141
+ } from "./chunk-AATTOFNY.js";
139
142
  import {
140
143
  failureKey,
141
144
  isStoreDamage
142
- } from "./chunk-UX5HAZC5.js";
145
+ } from "./chunk-ZZD2YPOX.js";
143
146
  import {
144
147
  queryFieldsOf
145
- } from "./chunk-RLR52L52.js";
148
+ } from "./chunk-RQORQN2V.js";
146
149
  import {
147
150
  modelAddressAllowed,
148
151
  onThisComputer
149
- } from "./chunk-ZZYPXW4E.js";
152
+ } from "./chunk-7Z53MLQP.js";
150
153
  import {
151
154
  readSharedSection,
152
155
  sharedConfigPath,
153
156
  writeSharedSection
154
- } from "./chunk-XPZ4JGD2.js";
157
+ } from "./chunk-TTF5DP4V.js";
155
158
  import {
156
159
  storePath
157
- } from "./chunk-JFI3VK4W.js";
160
+ } from "./chunk-L72WUJAS.js";
158
161
  import {
159
162
  openCache
160
- } from "./chunk-7E7JZXE6.js";
163
+ } from "./chunk-PMQ7GP6X.js";
161
164
  import {
162
165
  Credentials,
163
166
  isMovedRun,
164
167
  resolvePaths,
165
168
  writeSecurely
166
- } from "./chunk-SCBLAAZU.js";
169
+ } from "./chunk-5JKTVAXX.js";
167
170
  import {
168
171
  array,
169
172
  boolean,
@@ -190,7 +193,7 @@ import {
190
193
  CliError,
191
194
  singleLine,
192
195
  visibleControls
193
- } from "./chunk-TSHMRHL6.js";
196
+ } from "./chunk-S6JG4YUH.js";
194
197
  import {
195
198
  __commonJS,
196
199
  __name,
@@ -265,9 +268,9 @@ var require_liquid_node = __commonJS({
265
268
  __name(isIterator, "isIterator");
266
269
  function promisify(fn) {
267
270
  return function(...args) {
268
- return new Promise((resolve3, reject2) => {
271
+ return new Promise((resolve4, reject2) => {
269
272
  fn(...args, (err, result2) => {
270
- err ? reject2(err) : resolve3(result2);
273
+ err ? reject2(err) : resolve4(result2);
271
274
  });
272
275
  });
273
276
  };
@@ -1857,12 +1860,12 @@ var require_liquid_node = __commonJS({
1857
1860
  return fs$1.readFileSync(filepath, "utf8");
1858
1861
  }
1859
1862
  __name(readFileSync6, "readFileSync");
1860
- function resolve2(root, file2, ext) {
1863
+ function resolve3(root, file2, ext) {
1861
1864
  if (!path.extname(file2))
1862
1865
  file2 += ext;
1863
1866
  return path.resolve(root, file2);
1864
1867
  }
1865
- __name(resolve2, "resolve");
1868
+ __name(resolve3, "resolve");
1866
1869
  function fallback(file2) {
1867
1870
  try {
1868
1871
  return requireResolve(file2);
@@ -1870,10 +1873,10 @@ var require_liquid_node = __commonJS({
1870
1873
  }
1871
1874
  }
1872
1875
  __name(fallback, "fallback");
1873
- function dirname4(filepath) {
1876
+ function dirname5(filepath) {
1874
1877
  return path.dirname(filepath);
1875
1878
  }
1876
- __name(dirname4, "dirname");
1879
+ __name(dirname5, "dirname");
1877
1880
  var realpathAsync = promisify(fs$1.realpath);
1878
1881
  async function contains(root, file2) {
1879
1882
  try {
@@ -1903,9 +1906,9 @@ var require_liquid_node = __commonJS({
1903
1906
  readFile,
1904
1907
  existsSync: existsSync11,
1905
1908
  readFileSync: readFileSync6,
1906
- resolve: resolve2,
1909
+ resolve: resolve3,
1907
1910
  fallback,
1908
- dirname: dirname4,
1911
+ dirname: dirname5,
1909
1912
  contains,
1910
1913
  containsSync,
1911
1914
  sep: path.sep
@@ -3630,7 +3633,7 @@ var require_liquid_node = __commonJS({
3630
3633
  uri_escape,
3631
3634
  slugify
3632
3635
  });
3633
- var join6 = argumentsToValue(function(v, arg) {
3636
+ var join7 = argumentsToValue(function(v, arg) {
3634
3637
  const array2 = toArray(v);
3635
3638
  const sep = isNil(arg) ? " " : stringify(arg);
3636
3639
  let outputSize = sep.length * Math.max(array2.length - 1, 0);
@@ -3906,7 +3909,7 @@ var require_liquid_node = __commonJS({
3906
3909
  __name(sample, "sample");
3907
3910
  var arrayFilters = /* @__PURE__ */ Object.freeze({
3908
3911
  __proto__: null,
3909
- join: join6,
3912
+ join: join7,
3910
3913
  last,
3911
3914
  first,
3912
3915
  reverse,
@@ -5530,11 +5533,11 @@ var require_liquid_node = __commonJS({
5530
5533
  }
5531
5534
  });
5532
5535
 
5533
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/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
5534
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";
5535
- import { dirname as dirname3, resolve } from "node:path";
5538
+ import { dirname as dirname4, resolve as resolve2 } from "node:path";
5536
5539
 
5537
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/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
5538
5541
  import { createCipheriv, createDecipheriv, createHash, randomBytes, scrypt, timingSafeEqual } from "node:crypto";
5539
5542
  import { closeSync, createReadStream, createWriteStream, existsSync, openSync, readSync, renameSync, rmSync, statSync } from "node:fs";
5540
5543
  import { Transform } from "node:stream";
@@ -5546,7 +5549,7 @@ var NONCE = 12;
5546
5549
  var TAG = 16;
5547
5550
  var HEADER = MAGIC.length + 3 + SALT + NONCE;
5548
5551
  var COST = { log2N: 17, r: 8, p: 1 };
5549
- 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");
5550
5553
  var checkFor = /* @__PURE__ */ __name(async (password, cost = COST) => {
5551
5554
  refuseEmpty(password);
5552
5555
  const salt = randomBytes(SALT);
@@ -5641,7 +5644,7 @@ var unsealFile = /* @__PURE__ */ __name(async (from, to, password) => {
5641
5644
  renameSync(pending, to);
5642
5645
  }, "unsealFile");
5643
5646
 
5644
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/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
5645
5648
  var SPEAKS = MIGRATIONS.at(-1)?.version ?? 0;
5646
5649
  var fileSchemaOf = /* @__PURE__ */ __name((database) => {
5647
5650
  const tracked = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'schema_migrations'").get();
@@ -5665,7 +5668,7 @@ var compatibilityOf = /* @__PURE__ */ __name((file2, migrations = MIGRATIONS) =>
5665
5668
  };
5666
5669
  }, "compatibilityOf");
5667
5670
 
5668
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/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
5669
5672
  import { createHash as createHash2 } from "node:crypto";
5670
5673
  var COPY_MARK = "__repair_";
5671
5674
  var COPY_NAME = /__repair_[0-9a-f]{8}(_\d+)?$/;
@@ -5919,19 +5922,79 @@ var deleteCopy = /* @__PURE__ */ __name((database, name) => {
5919
5922
  return found;
5920
5923
  }, "deleteCopy");
5921
5924
 
5922
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/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
5923
5986
  import { existsSync as existsSync4, statSync as statSync3 } from "node:fs";
5924
5987
 
5925
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/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
5926
5989
  import { existsSync as existsSync3 } from "node:fs";
5927
5990
 
5928
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/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
5929
5992
  import { execFileSync, spawn } from "node:child_process";
5930
5993
  import { existsSync as existsSync2, readFileSync, realpathSync, renameSync as renameSync2, rmSync as rmSync2, statfsSync, statSync as statSync2, writeFileSync } from "node:fs";
5931
- import { basename, dirname, join } from "node:path";
5994
+ import { basename, dirname as dirname2, join as join2 } from "node:path";
5932
5995
  import { Transform as Transform2 } from "node:stream";
5933
5996
 
5934
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/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
5935
5998
  var REFILL_MARGIN_MS = 864e5;
5936
5999
  var TIME_KEYS = 1e12;
5937
6000
  var integerId = `external_id GLOB '[0-9]*' AND NOT external_id GLOB '*[^0-9]*'`;
@@ -6011,7 +6074,7 @@ var forgetMail = /* @__PURE__ */ __name((database, cutoff, now) => {
6011
6074
  return [...folders].map(([account, count3]) => ({ account, folders: count3 }));
6012
6075
  }, "forgetMail");
6013
6076
 
6014
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/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
6015
6078
  var SQLITE3_MINIMUM = [3, 43, 0];
6016
6079
  var STORE_PARTS = ["", "-wal", "-shm"];
6017
6080
  var RECOVER_LOCK = ".recover-lock";
@@ -6087,8 +6150,8 @@ var takeRecoverLock = /* @__PURE__ */ __name((path) => {
6087
6150
  return () => rmSync2(lock, { force: true });
6088
6151
  }, "takeRecoverLock");
6089
6152
  var storeHolders = /* @__PURE__ */ __name((path) => {
6090
- const folder = realpathSync(dirname(path));
6091
- 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}`));
6092
6155
  const wanted = process.platform === "linux" ? files.flatMap((file2) => [file2, `${file2} (deleted)`]) : files.filter(existsSync2);
6093
6156
  const recovering = runningRecovery(path);
6094
6157
  const pids = holdersOf(wanted);
@@ -6231,7 +6294,7 @@ var placeLostRows = /* @__PURE__ */ __name((database) => {
6231
6294
  }
6232
6295
  return Object.fromEntries(Object.entries(placed).filter(([, rows2]) => rows2 > 0));
6233
6296
  }, "placeLostRows");
6234
- 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) => {
6235
6298
  const reader = spawn(program, ["-readonly", path, `.recover --ignore-freelist --lost-and-found ${LOST_AND_FOUND}`], {
6236
6299
  stdio: ["ignore", "pipe", "pipe"]
6237
6300
  });
@@ -6268,7 +6331,7 @@ var copyReadableRows = /* @__PURE__ */ __name((path, target, program = "sqlite3"
6268
6331
  if (readerCode !== 0)
6269
6332
  reject(new CliError("validation_error", `sqlite3 could not read the store: ${errors.join("; ")}`));
6270
6333
  else
6271
- resolve2({ errors, read });
6334
+ resolve3({ errors, read });
6272
6335
  }, "exited");
6273
6336
  reader.on("error", reject);
6274
6337
  writer.on("error", reject);
@@ -6404,7 +6467,7 @@ var recoverStore = /* @__PURE__ */ __name(async ({ path, command, version, sqlit
6404
6467
  try {
6405
6468
  refuseInUse(path);
6406
6469
  const bytes = STORE_PARTS.reduce((sum, suffix) => sum + (statSync2(`${path}${suffix}`, { throwIfNoEntry: false })?.size ?? 0), 0);
6407
- const { bavail, bsize } = statfsSync(dirname(path));
6470
+ const { bavail, bsize } = statfsSync(dirname2(path));
6408
6471
  if (Number(bavail) * Number(bsize) < bytes * 1.2)
6409
6472
  throw new CliError("validation_error", `the recovery needs about ${Math.ceil(bytes * 1.2 / 1e9)} GB free beside the store`);
6410
6473
  return await recoverLocked({ path, command, version, sqlite3, now, note, copy, started, program });
@@ -6542,7 +6605,7 @@ var recoverLocked = /* @__PURE__ */ __name(async ({ path, command, version, sqli
6542
6605
  }
6543
6606
  }, "recoverLocked");
6544
6607
 
6545
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/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
6546
6609
  var COUNTED = [
6547
6610
  "accounts",
6548
6611
  "chats",
@@ -6577,7 +6640,7 @@ var storeRecoveryCheck = /* @__PURE__ */ __name(async (env, command, version) =>
6577
6640
  }
6578
6641
  const journal = readJournalMark(path);
6579
6642
  recordDeepCheck(path, health, { cli: command, ...version ? { version } : {}, schema });
6580
- const mark = readDamageMark(path);
6643
+ const mark2 = readDamageMark(path);
6581
6644
  const lastKnownGood = readHealthMark(path)?.last_ok_at ?? null;
6582
6645
  const inUse = storeHolders(path) ?? null;
6583
6646
  const timers = activeTimers() ?? null;
@@ -6585,7 +6648,7 @@ var storeRecoveryCheck = /* @__PURE__ */ __name(async (env, command, version) =>
6585
6648
  const report = storeDamageReport({
6586
6649
  health,
6587
6650
  command,
6588
- mark,
6651
+ mark: mark2,
6589
6652
  journal,
6590
6653
  lastOkAt: lastKnownGood,
6591
6654
  holders: inUse,
@@ -6603,7 +6666,7 @@ var storeRecoveryCheck = /* @__PURE__ */ __name(async (env, command, version) =>
6603
6666
  invalidJson: health.invalidJson ?? [],
6604
6667
  rows,
6605
6668
  report,
6606
- damageMark: mark ? (({ inode: _, ...seen }) => seen)(mark) : null,
6669
+ damageMark: mark2 ? (({ inode: _, ...seen }) => seen)(mark2) : null,
6607
6670
  lastKnownGood,
6608
6671
  inUse,
6609
6672
  timers,
@@ -6636,12 +6699,12 @@ var storeRecoveryRun = /* @__PURE__ */ __name(async (env, { command, version, no
6636
6699
  }, "storeRecoveryRun");
6637
6700
  var refetchNotes = /* @__PURE__ */ __name(({ since, chats, mail }) => {
6638
6701
  const from = since === null ? "from the start" : `from ${since} on`;
6639
- const marked = [
6702
+ const marked2 = [
6640
6703
  ...chats.map(({ provider, account, chats: chats2 }) => `${chats2} chats of ${provider} ${account}`),
6641
6704
  ...mail.map(({ account, folders }) => `${folders} mail folders of ${account}`)
6642
6705
  ];
6643
6706
  return [
6644
- 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`,
6645
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`),
6646
6709
  "notes, memories, tags and whatever else only this store held cannot be fetched again"
6647
6710
  ];
@@ -6698,7 +6761,7 @@ var storeRecoverCommand = /* @__PURE__ */ __name(({ command, version }) => {
6698
6761
  return recover;
6699
6762
  }, "storeRecoverCommand");
6700
6763
 
6701
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/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
6702
6765
  var pendingIfKnown = /* @__PURE__ */ __name((database) => database.prepare("SELECT 1 FROM pragma_table_info('messages') WHERE name = 'normalized_text'").get() ? pendingNormalization(database) : null, "pendingIfKnown");
6703
6766
  var bytesOf = /* @__PURE__ */ __name((path) => existsSync4(path) ? statSync3(path).size : 0, "bytesOf");
6704
6767
  var messageOf = /* @__PURE__ */ __name((error) => error instanceof Error ? error.message : String(error), "messageOf");
@@ -6744,7 +6807,7 @@ var storeInfoCommand = /* @__PURE__ */ __name(() => annotate(new Command("info")
6744
6807
  renderAnswer(this, outputFor(this), itemOf(answer));
6745
6808
  }), "storeInfoCommand");
6746
6809
 
6747
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/node_modules/@wirecat/cli-core/dist/cli/messenger/password.js
6810
+ // 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
6748
6811
  var ENCRYPT_OPTION = [
6749
6812
  "--encrypt",
6750
6813
  "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"
@@ -6763,9 +6826,9 @@ var passwordOf = /* @__PURE__ */ __name(async (command, { twice }) => {
6763
6826
  return password;
6764
6827
  }, "passwordOf");
6765
6828
 
6766
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/node_modules/@wirecat/cli-core/dist/replies/rules.js
6829
+ // 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
6767
6830
  import { existsSync as existsSync5, readFileSync as readFileSync2 } from "node:fs";
6768
- import { join as join2 } from "node:path";
6831
+ import { join as join3 } from "node:path";
6769
6832
  var REPLY_ACTIONS = ["reply", "task"];
6770
6833
  var REPLY_MODELS = ["fill-only", "may-reword"];
6771
6834
  var REPLY_KINDS = ["dialog", "group"];
@@ -6851,7 +6914,7 @@ var defaultRule = /* @__PURE__ */ __name((id) => ({
6851
6914
  reply: { template: "", asReply: true },
6852
6915
  limits: { perChat: "1/1d", perPerson: "1/1d" }
6853
6916
  }), "defaultRule");
6854
- var repliesPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join2(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).config, `${profile}.replies.json`), "repliesPathFor");
6917
+ var repliesPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).config, `${profile}.replies.json`), "repliesPathFor");
6855
6918
  var EVERYONE = { reply: "all", allow: { people: [], chats: [] }, deny: { people: [], chats: [] } };
6856
6919
  var outsideAudience = /* @__PURE__ */ __name((audience, person, chat) => {
6857
6920
  if (person !== null && audience.deny.people.includes(person))
@@ -6934,9 +6997,9 @@ var problem = /* @__PURE__ */ __name((issue) => {
6934
6997
  }, "problem");
6935
6998
  var broken = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply rules ${path} cannot be read (${why}) \u2014 fix the file`), "broken");
6936
6999
 
6937
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/node_modules/@wirecat/cli-core/dist/replies/state.js
7000
+ // 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
6938
7001
  import { existsSync as existsSync6, readFileSync as readFileSync3 } from "node:fs";
6939
- import { join as join3 } from "node:path";
7002
+ import { join as join4 } from "node:path";
6940
7003
  var ANSWERED_KEPT = 1e3;
6941
7004
  var times = record(string(), array(string()));
6942
7005
  var stateFile = object({
@@ -6948,7 +7011,7 @@ var stateFile = object({
6948
7011
  });
6949
7012
  var emptyState = /* @__PURE__ */ __name(() => ({ paused: false, answered: [], sent: {} }), "emptyState");
6950
7013
  var answeredKey = /* @__PURE__ */ __name((message) => `${message.chatId}:${message.id}`, "answeredKey");
6951
- var repliesStatePathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, `${profile}.replies-state.json`), "repliesStatePathFor");
7014
+ var repliesStatePathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join4(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, `${profile}.replies-state.json`), "repliesStatePathFor");
6952
7015
  var readRepliesState = /* @__PURE__ */ __name((path) => {
6953
7016
  if (!existsSync6(path))
6954
7017
  return emptyState();
@@ -6987,7 +7050,7 @@ var recordReply = /* @__PURE__ */ __name((state, rule2, message, now) => {
6987
7050
  }, "recordReply");
6988
7051
  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");
6989
7052
 
6990
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/node_modules/@wirecat/cli-core/dist/replies/decide.js
7053
+ // 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
6991
7054
  var skip = /* @__PURE__ */ __name((why) => ({ skip: why }), "skip");
6992
7055
  var decide = /* @__PURE__ */ __name((rule2, incoming, state, now) => {
6993
7056
  const { message, chat, owner, sender } = incoming;
@@ -7093,10 +7156,10 @@ var filled = /* @__PURE__ */ __name((template2, senderName) => {
7093
7156
  return template2.replaceAll("{firstName}", name.split(/\s+/)[0] ?? name).replaceAll("{name}", name);
7094
7157
  }, "filled");
7095
7158
 
7096
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/node_modules/@wirecat/cli-core/dist/replies/template.js
7159
+ // 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
7097
7160
  var import_liquidjs2 = __toESM(require_liquid_node(), 1);
7098
7161
 
7099
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/node_modules/@wirecat/cli-core/dist/render/liquid.js
7162
+ // 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
7100
7163
  var import_liquidjs = __toESM(require_liquid_node(), 1);
7101
7164
  var safeLiquid = /* @__PURE__ */ __name((limits) => {
7102
7165
  const engine = new import_liquidjs.Liquid({
@@ -7123,7 +7186,7 @@ var safeLiquid = /* @__PURE__ */ __name((limits) => {
7123
7186
  return engine;
7124
7187
  }, "safeLiquid");
7125
7188
 
7126
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/node_modules/@wirecat/cli-core/dist/replies/template.js
7189
+ // 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
7127
7190
  var TEMPLATE_LIMITS = {
7128
7191
  parse: 32768,
7129
7192
  renders: 2e3,
@@ -7262,7 +7325,7 @@ var renderReplyTemplate = /* @__PURE__ */ __name(async (reply, input) => {
7262
7325
  }
7263
7326
  }, "renderReplyTemplate");
7264
7327
 
7265
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/node_modules/@wirecat/cli-core/dist/replies/dry-run.js
7328
+ // 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
7266
7329
  var DRY_RUN_DAYS = 7;
7267
7330
  var PAGE = 500;
7268
7331
  var dryRun = /* @__PURE__ */ __name(async (store, account, rules, { since, until = Date.now(), only, audience, render }) => {
@@ -7376,7 +7439,7 @@ var storedSince = /* @__PURE__ */ __name(async (store, account, chat, since) =>
7376
7439
  }
7377
7440
  }, "storedSince");
7378
7441
 
7379
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/node_modules/@wirecat/cli-core/dist/models/ai.js
7442
+ // 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/ai.js
7380
7443
  var AI_PROVIDERS = ["anthropic", "openai", "ollama"];
7381
7444
  var DEFAULT_BASE_URL = {
7382
7445
  anthropic: "https://api.anthropic.com",
@@ -7526,7 +7589,7 @@ var checkAi = /* @__PURE__ */ __name(async (deps) => {
7526
7589
  }
7527
7590
  }, "checkAi");
7528
7591
 
7529
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/node_modules/@wirecat/cli-core/dist/models/purpose.js
7592
+ // 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
7530
7593
  var HOSTED = {
7531
7594
  openai: "https://api.openai.com/v1",
7532
7595
  anthropic: "https://api.anthropic.com"
@@ -7547,14 +7610,14 @@ var purposeModel = /* @__PURE__ */ __name((settings, purpose, deps) => {
7547
7610
  return shared ? { target: shared.target, key: /* @__PURE__ */ __name(() => shared.key, "key"), shared: shared.setting } : void 0;
7548
7611
  }, "purposeModel");
7549
7612
 
7550
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/node_modules/@wirecat/cli-core/dist/replies/consents.js
7613
+ // 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
7551
7614
  import { existsSync as existsSync7, readFileSync as readFileSync4 } from "node:fs";
7552
- import { join as join4 } from "node:path";
7615
+ import { join as join5 } from "node:path";
7553
7616
  var shape = strictObject({
7554
7617
  provider: nullable(pipe(string(), minLength(1))),
7555
7618
  deniedChats: array(pipe(string(), minLength(1)))
7556
7619
  });
7557
- var replyConsentPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join4(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).config, `${profile}.replies-consents.json`), "replyConsentPathFor");
7620
+ var replyConsentPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join5(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).config, `${profile}.replies-consents.json`), "replyConsentPathFor");
7558
7621
  var readReplyConsent = /* @__PURE__ */ __name((path) => {
7559
7622
  if (!existsSync7(path))
7560
7623
  return { provider: null, deniedChats: [] };
@@ -7572,7 +7635,7 @@ var mayModelReply = /* @__PURE__ */ __name((path, provider, chat) => {
7572
7635
  return consent.provider === provider && !consent.deniedChats.includes(chat);
7573
7636
  }, "mayModelReply");
7574
7637
 
7575
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/node_modules/@wirecat/cli-core/dist/replies/rendering.js
7638
+ // 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
7576
7639
  var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, options = {
7577
7640
  ai: true
7578
7641
  }) => async (rule2, message, chat, now) => {
@@ -7620,7 +7683,7 @@ var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, o
7620
7683
  return result2;
7621
7684
  }, "replyRenderer");
7622
7685
 
7623
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/node_modules/@wirecat/cli-core/dist/replies/serve.js
7686
+ // 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
7624
7687
  var NOT_ALLOWED = "replies.send is not allow";
7625
7688
  var NO_RULES = "no rules";
7626
7689
  var ONLY_TASK = "opened a task, sent nothing";
@@ -7713,7 +7776,7 @@ var replyTo = /* @__PURE__ */ __name(async (deps, message) => {
7713
7776
  return { skip: why };
7714
7777
  }, "replyTo");
7715
7778
 
7716
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-catch-up.js
7779
+ // 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
7717
7780
  var START_SYNC_DELAY_MS = 3e4;
7718
7781
  var START_SYNC_BUDGET_MS = 5 * 6e4;
7719
7782
  var START_SYNC_WINDOW_MS = 7 * 864e5;
@@ -7790,7 +7853,7 @@ var startSync = /* @__PURE__ */ __name(({ chats, newestHeld, fetch, note, warn,
7790
7853
  };
7791
7854
  }, "startSync");
7792
7855
 
7793
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-members.js
7856
+ // 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
7794
7857
  var FIRST_FETCH_MS = 6e4;
7795
7858
  var DAY_MS = 864e5;
7796
7859
  var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch, warn, firstMs = FIRST_FETCH_MS, everyMs = DAY_MS }) => {
@@ -7844,7 +7907,7 @@ var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch, warn, firstMs =
7844
7907
  };
7845
7908
  }, "memberFetches");
7846
7909
 
7847
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-notice.js
7910
+ // 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
7848
7911
  var record2 = /* @__PURE__ */ __name((context, app, severity, attributes) => recordLogFor(context.streams.diagnostic, app, { command: currentRun().command || "serve" })[severity](attributes), "record");
7849
7912
  var noticeFor = /* @__PURE__ */ __name((context, app, severity = "warn") => ({ text, ...attributes }) => {
7850
7913
  if (context.format === "pretty") {
@@ -7877,22 +7940,22 @@ var recordDiagnostics = /* @__PURE__ */ __name((context, app) => {
7877
7940
  return context;
7878
7941
  }, "recordDiagnostics");
7879
7942
 
7880
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-outdated.js
7943
+ // 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
7881
7944
  import { existsSync as existsSync8, readFileSync as readFileSync5, realpathSync as realpathSync2 } from "node:fs";
7882
- import { dirname as dirname2, join as join5 } from "node:path";
7945
+ import { dirname as dirname3, join as join6 } from "node:path";
7883
7946
  var OUTDATED_CHECK_MS = 6e4;
7884
7947
  var ownPackageRoot = /* @__PURE__ */ __name((running, script = process.argv[1]) => {
7885
7948
  let dir;
7886
7949
  try {
7887
- dir = dirname2(realpathSync2(script ?? ""));
7950
+ dir = dirname3(realpathSync2(script ?? ""));
7888
7951
  } catch {
7889
7952
  return void 0;
7890
7953
  }
7891
7954
  for (let up = 0; up < 8; up++) {
7892
- const manifest = join5(dir, "package.json");
7955
+ const manifest = join6(dir, "package.json");
7893
7956
  if (existsSync8(manifest))
7894
7957
  return installedVersion(dir) === running ? dir : void 0;
7895
- const parent = dirname2(dir);
7958
+ const parent = dirname3(dir);
7896
7959
  if (parent === dir)
7897
7960
  return void 0;
7898
7961
  dir = parent;
@@ -7901,7 +7964,7 @@ var ownPackageRoot = /* @__PURE__ */ __name((running, script = process.argv[1])
7901
7964
  }, "ownPackageRoot");
7902
7965
  var installedVersion = /* @__PURE__ */ __name((root) => {
7903
7966
  try {
7904
- const { version } = JSON.parse(readFileSync5(join5(root, "package.json"), "utf8"));
7967
+ const { version } = JSON.parse(readFileSync5(join6(root, "package.json"), "utf8"));
7905
7968
  return typeof version === "string" ? version : void 0;
7906
7969
  } catch {
7907
7970
  return void 0;
@@ -7963,7 +8026,7 @@ var watchOutdated = /* @__PURE__ */ __name(({ check: check2, onOutdated, everyMs
7963
8026
  };
7964
8027
  }, "watchOutdated");
7965
8028
 
7966
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-stems.js
8029
+ // 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
7967
8030
  var STEMS_EVERY_MS = 3e4;
7968
8031
  var STEMS_SLICE_MS = 2e3;
7969
8032
  var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY_MS, sliceMs = STEMS_SLICE_MS }) => {
@@ -8003,7 +8066,7 @@ var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY
8003
8066
  };
8004
8067
  }, "stemFills");
8005
8068
 
8006
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/node_modules/@wirecat/cli-core/dist/render/messages.js
8069
+ // 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/messages.js
8007
8070
  import { styleText } from "node:util";
8008
8071
  var TIME_WIDTH = 8;
8009
8072
  var INDENT = " ".repeat(TIME_WIDTH + 2);
@@ -8032,8 +8095,8 @@ var renderMessage = /* @__PURE__ */ __name((message, options = {}) => {
8032
8095
  const time = timeFormatter(options);
8033
8096
  const verbosity = options.verbosity ?? 0;
8034
8097
  const chat = "chatTitle" in message ? paint("dim", ` \xB7 ${singleLine(message.chatTitle ?? message.chatId)}`) : "";
8035
- const mark = "anchor" in message && message.anchor ? paint("bold", " \u25C0") : "";
8036
- const lines = [`${paint("dim", time(message.timestamp))} ${senderOf(message, options)}${chat}${mark}`];
8098
+ const mark2 = "anchor" in message && message.anchor ? paint("bold", " \u25C0") : "";
8099
+ const lines = [`${paint("dim", time(message.timestamp))} ${senderOf(message, options)}${chat}${mark2}`];
8037
8100
  const body = /* @__PURE__ */ __name((text) => wrapAnsi(visibleControls(text), room, { hard: true }).split("\n"), "body");
8038
8101
  const email = message.email;
8039
8102
  if (email)
@@ -8093,9 +8156,9 @@ var nameOf = /* @__PURE__ */ __name(({ senderName, senderId, outgoing }, options
8093
8156
  var DEFAULT_LOCALE = "ru-RU";
8094
8157
  var you = /* @__PURE__ */ __name(({ locale = DEFAULT_LOCALE }) => locale.startsWith("ru") ? "\u0432\u044B" : "you", "you");
8095
8158
  var hash = /* @__PURE__ */ __name((value) => [...value].reduce((sum, char) => sum * 31 + char.charCodeAt(0) >>> 0, 7), "hash");
8096
- var preview = /* @__PURE__ */ __name((mark, quoted, room, options) => {
8159
+ var preview = /* @__PURE__ */ __name((mark2, quoted, room, options) => {
8097
8160
  const text = singleLine(quoted.text.split("\n")[0] ?? "") || (quoted.attachments[0] ? `\u{1F4CE} ${quoted.attachments[0].kind}` : "");
8098
- const line = text ? `${mark} ${nameOf(quoted, options)}: ${text}` : `${mark} message ${quoted.id}`;
8161
+ const line = text ? `${mark2} ${nameOf(quoted, options)}: ${text}` : `${mark2} message ${quoted.id}`;
8099
8162
  if (stringWidth(line) <= room)
8100
8163
  return line;
8101
8164
  return `${wrapAnsi(line, room - 1, { hard: true }).split("\n")[0]}\u2026`;
@@ -8179,7 +8242,7 @@ var editedAt = /* @__PURE__ */ __name((message, options) => {
8179
8242
  return day(edited) === day(message.timestamp) ? time : `${day(edited)} ${time}`;
8180
8243
  }, "editedAt");
8181
8244
 
8182
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/node_modules/@wirecat/cli-core/dist/cli/messenger/message-items.js
8245
+ // 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
8183
8246
  var defined = /* @__PURE__ */ __name((value) => Object.fromEntries(Object.entries(value).filter(([, one]) => one !== void 0)), "defined");
8184
8247
  var attachmentItem = /* @__PURE__ */ __name((attachment) => defined({
8185
8248
  kind: attachment.kind,
@@ -8275,7 +8338,7 @@ var viewOf = /* @__PURE__ */ __name((context, messenger) => ({
8275
8338
  locale: messenger.app.locale
8276
8339
  }), "viewOf");
8277
8340
 
8278
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-answers.js
8341
+ // 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
8279
8342
  var observed = /* @__PURE__ */ __name((value) => ({
8280
8343
  value: value.value,
8281
8344
  observed_at: value.observedAt,
@@ -8342,7 +8405,7 @@ var watchEventItem = /* @__PURE__ */ __name((value, account) => {
8342
8405
  }
8343
8406
  }, "watchEventItem");
8344
8407
 
8345
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-command.js
8408
+ // 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
8346
8409
  var watchCommand = /* @__PURE__ */ __name((messenger) => annotate(new Command("watch"), {
8347
8410
  output: { entity: "watch_item" },
8348
8411
  effects: REMOTE_READ,
@@ -8497,7 +8560,7 @@ var describe = /* @__PURE__ */ __name((event, render) => {
8497
8560
  }
8498
8561
  }, "describe");
8499
8562
 
8500
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-command.js
8563
+ // 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
8501
8564
  var CURRENT_EVERY_MS = 6e4;
8502
8565
  var serveCommand = /* @__PURE__ */ __name((messenger) => {
8503
8566
  const command = annotate(new Command("serve"), {
@@ -8797,7 +8860,7 @@ var tasking = /* @__PURE__ */ __name((context, warn) => {
8797
8860
  };
8798
8861
  }, "tasking");
8799
8862
 
8800
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/node_modules/@wirecat/cli-core/dist/cli/messenger/store-tables-command.js
8863
+ // 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
8801
8864
  import { existsSync as existsSync9 } from "node:fs";
8802
8865
  var PATH = "store tables list";
8803
8866
  var STORE_TABLES_QUERY = {
@@ -8840,7 +8903,7 @@ var storeTablesCommand = /* @__PURE__ */ __name((owner) => {
8840
8903
  return tables;
8841
8904
  }, "storeTablesCommand");
8842
8905
 
8843
- // node_modules/.pnpm/@wirecat+cli-core@0.753.0_@wirecat+cli-base@0.132.0_commander@15.0.0_esbuild@0.28.2_typ_25c6da2cdd0623264522d57a62102dc8/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
8906
+ // 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
8844
8907
  var SEARCH_INDEXES = ["messages_fts", "chats_fts", "identities_fts"];
8845
8908
  var WORD_INDEX = "message_words";
8846
8909
  var schemaOf = /* @__PURE__ */ __name((database) => {
@@ -8866,7 +8929,7 @@ var readingOnly = /* @__PURE__ */ __name(async (path, read) => {
8866
8929
  database.close();
8867
8930
  }
8868
8931
  }, "readingOnly");
8869
- var withoutInode = /* @__PURE__ */ __name(({ inode: _, ...mark }) => mark, "withoutInode");
8932
+ var withoutInode = /* @__PURE__ */ __name(({ inode: _, ...mark2 }) => mark2, "withoutInode");
8870
8933
  var fileSchema = /* @__PURE__ */ __name(async (path) => {
8871
8934
  try {
8872
8935
  return await readingOnly(path, (database) => fileSchemaOf(database).version);
@@ -8885,7 +8948,7 @@ var storeSummary = /* @__PURE__ */ __name(async (env, { deep = false, command, v
8885
8948
  ...version ? { version } : {},
8886
8949
  schema: await fileSchema(path)
8887
8950
  }) : null;
8888
- const mark = readDamageMark(path);
8951
+ const mark2 = readDamageMark(path);
8889
8952
  const lastKnownGood = readHealthMark(path)?.last_ok_at ?? null;
8890
8953
  const health = {
8891
8954
  checked: checked.checked,
@@ -8897,11 +8960,11 @@ var storeSummary = /* @__PURE__ */ __name(async (env, { deep = false, command, v
8897
8960
  ...checked.invalidJson?.length ? { invalidJson: checked.invalidJson } : {},
8898
8961
  ...checked.searchIndexes?.some((index) => !index.ok) ? { damagedSearchIndexes: checked.searchIndexes.filter((index) => !index.ok).map((index) => index.name) } : {}
8899
8962
  };
8900
- const damage = command ? storeDamageReport({ health: checked, command, mark, journal, lastOkAt: lastKnownGood }) : null;
8963
+ const damage = command ? storeDamageReport({ health: checked, command, mark: mark2, journal, lastOkAt: lastKnownGood }) : null;
8901
8964
  const healthOf = {
8902
8965
  health,
8903
8966
  lastKnownGood,
8904
- ...mark ? { damageMark: withoutInode(mark) } : {},
8967
+ ...mark2 ? { damageMark: withoutInode(mark2) } : {},
8905
8968
  ...journal ? { journalMark: journal } : {},
8906
8969
  ...recorded?.cleared ? { damageMarkCleared: withoutInode(recorded.cleared) } : {},
8907
8970
  // `what` keeps memo's doctor, which reads it, compiling until it moves to `whatHappened`.
@@ -9088,7 +9151,7 @@ var inspect = /* @__PURE__ */ __name((path) => reading(path, (database) => {
9088
9151
  ...schema.version >= 71 ? [["content_post_words", indexIntegrity(database, "content_post_words", 0)]] : []
9089
9152
  ]);
9090
9153
  const size = bytesOf2(path) + bytesOf2(`${path}-wal`);
9091
- const { bavail, bsize } = statfsSync2(dirname3(path));
9154
+ const { bavail, bsize } = statfsSync2(dirname4(path));
9092
9155
  const free = Number(bavail) * Number(bsize);
9093
9156
  const behind = schema.version > 0 ? chatsBehind(database) : [];
9094
9157
  const vectorIndexes = schema.version >= 34 ? vectorIndexCounts(database) : [];
@@ -9173,8 +9236,9 @@ var chatsBehind = /* @__PURE__ */ __name((database) => database.prepare(`SELECT
9173
9236
  held: row.held === null ? null : isoOf(row.held),
9174
9237
  refreshed: isoOf(row.refreshed)
9175
9238
  })), "chatsBehind");
9176
- 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() {
9239
+ 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() {
9177
9240
  const { renderer } = outputFor(this);
9241
+ const { backup = true } = this.opts();
9178
9242
  const path = storePath(environmentOf(this).env ?? process.env);
9179
9243
  if (!existsSync10(path)) {
9180
9244
  result(this, { path, exists: false });
@@ -9183,11 +9247,13 @@ var migrateCommand = /* @__PURE__ */ __name((owner) => annotate(new Command("mig
9183
9247
  }
9184
9248
  const answer = await reading(path, (database) => {
9185
9249
  const from = schemaOf(database).version;
9186
- migrate(database, {
9250
+ const notice = migrate(database, {
9187
9251
  command: owner.app.command,
9188
9252
  version: owner.app.version,
9189
- rollback: { store: path, warn: /* @__PURE__ */ __name((line) => renderer.warn(line), "warn") }
9253
+ rollback: { store: path, warn: /* @__PURE__ */ __name((line) => renderer.warn(line), "warn"), withoutCopy: !backup }
9190
9254
  });
9255
+ if (notice)
9256
+ renderer.warn(notice);
9191
9257
  const { normalized, indexed, terms } = buildWordIndex(database, (note) => renderer.note(note));
9192
9258
  const stemmed = buildStems(database, (note) => renderer.note(note));
9193
9259
  const notes = buildNoteIndex(database, (note) => renderer.note(note));
@@ -9278,10 +9344,10 @@ var vacuumInto = /* @__PURE__ */ __name(async (path, target) => {
9278
9344
  }
9279
9345
  }, "vacuumInto");
9280
9346
  var stampNow = /* @__PURE__ */ __name(() => (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-"), "stampNow");
9281
- 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) {
9347
+ 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) {
9282
9348
  const { encrypt } = this.opts();
9283
9349
  const path = storePath(environmentOf(this).env ?? process.env);
9284
- const target = resolve(file2);
9350
+ const target = resolve2(file2);
9285
9351
  const { app, env } = environmentOf(this);
9286
9352
  if (app)
9287
9353
  refuseLockedOutput(target, app, env ?? process.env, "<file>");
@@ -9318,8 +9384,8 @@ var backupCommand = /* @__PURE__ */ __name(() => destroysNothing(annotate(new Co
9318
9384
  }), "backupCommand");
9319
9385
  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) {
9320
9386
  const { output } = this.opts();
9321
- const from = resolve(file2);
9322
- const to = resolve(output);
9387
+ const from = resolve2(file2);
9388
+ const to = resolve2(output);
9323
9389
  if (!existsSync10(from))
9324
9390
  throw new CliError("not_found", `no file at ${from}`);
9325
9391
  if (!isSealed(from))
@@ -9329,16 +9395,16 @@ var decryptCommand = /* @__PURE__ */ __name(() => annotate(new Command("decrypt"
9329
9395
  await unsealFile(from, to, await passwordOf(this, { twice: false }));
9330
9396
  result(this, { path: to, from, bytes: bytesOf2(to) });
9331
9397
  }), "decryptCommand");
9332
- 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) {
9398
+ 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) {
9333
9399
  const path = storePath(environmentOf(this).env ?? process.env);
9334
- const given = resolve(file2);
9400
+ const given = resolve2(file2);
9335
9401
  if (!existsSync10(given))
9336
9402
  throw new CliError("not_found", `no file at ${given}`);
9337
9403
  refuseWhileServing(this, owner);
9338
9404
  if (!isSealed(given))
9339
9405
  return restoreFrom(this, owner, given, given);
9340
9406
  const opened = `${path}.unsealing-${process.pid}`;
9341
- mkdirSync(dirname3(path), { recursive: true, mode: 448 });
9407
+ mkdirSync(dirname4(path), { recursive: true, mode: 448 });
9342
9408
  try {
9343
9409
  await unsealFile(given, opened, await passwordOf(this, { twice: false }));
9344
9410
  await restoreFrom(this, owner, opened, given);
@@ -9361,7 +9427,7 @@ var restoreFrom = /* @__PURE__ */ __name(async (command, owner, backup, given) =
9361
9427
  const waitMs = environmentOf(command).storeLockWaitMs;
9362
9428
  await quiesce(path, owner, "restore", (message) => renderer.warn(message), waitMs);
9363
9429
  } else
9364
- mkdirSync(dirname3(path), { recursive: true, mode: 448 });
9430
+ mkdirSync(dirname4(path), { recursive: true, mode: 448 });
9365
9431
  const incoming = `${path}.restoring-${stamp}`;
9366
9432
  copyFileSync(backup, incoming, constants.COPYFILE_EXCL);
9367
9433
  chmodSync(incoming, 384);
@@ -9578,6 +9644,11 @@ export {
9578
9644
  checkFor,
9579
9645
  passes,
9580
9646
  seal,
9647
+ notLocalPaths,
9648
+ isLocalPathOption,
9649
+ isLocalPathArgument,
9650
+ refuseAgentPaths,
9651
+ absoluteFrom,
9581
9652
  ENCRYPT_OPTION,
9582
9653
  passwordOf,
9583
9654
  DAY_MS,