@wirecat/zoom-cli 0.71.0 → 0.73.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 (199) hide show
  1. package/contracts/wirecat.json +1478 -0
  2. package/dist/account-removal.d.ts.map +1 -1
  3. package/dist/account-removal.js +0 -2
  4. package/dist/account-removal.js.map +1 -1
  5. package/dist/answers.d.ts +57 -3
  6. package/dist/answers.d.ts.map +1 -1
  7. package/dist/answers.js +0 -3
  8. package/dist/answers.js.map +1 -1
  9. package/dist/bin/main.js +13 -5
  10. package/dist/bin/main.js.map +1 -1
  11. package/dist/bin/zm.js +2 -2
  12. package/dist/bundle/{all-profiles-O4YNVPZX.js → all-profiles-V47CUJFK.js} +12 -12
  13. package/dist/bundle/answer-policy-W6H72X2R.js +112 -0
  14. package/dist/bundle/{anthropic-7GGRX3RX.js → anthropic-SID7Z3QN.js} +19 -12
  15. package/dist/bundle/{app-server-CPMKM3HI.js → app-server-KCMUSY4A.js} +75 -57
  16. package/dist/bundle/{bun-POHZKEPV.js → bun-PWMM6L45.js} +2 -2
  17. package/dist/bundle/{bun-sqlite-PGYMBPEL.js → bun-sqlite-3TLKUN5A.js} +10 -6
  18. package/dist/bundle/{chunk-Q3XLZIY3.js → chunk-2BAZRRJP.js} +29 -23
  19. package/dist/bundle/{chunk-OWEBWDHV.js → chunk-2NQPB6MT.js} +103 -9
  20. package/dist/bundle/chunk-2PYZTRRC.js +84 -0
  21. package/dist/bundle/chunk-2VYEGKQ3.js +13 -0
  22. package/dist/bundle/{chunk-I4DFFR7F.js → chunk-35CYSRGJ.js} +14 -5
  23. package/dist/bundle/{chunk-GGS6D4W4.js → chunk-3ADFJ3UP.js} +3 -3
  24. package/dist/bundle/{chunk-EOSVN2ER.js → chunk-3HTJBGNP.js} +242 -242
  25. package/dist/bundle/{chunk-2KESWII5.js → chunk-44YVZIA4.js} +3 -3
  26. package/dist/bundle/{chunk-GXF5HFFP.js → chunk-4LFFDUUW.js} +4 -4
  27. package/dist/bundle/{chunk-WOIHSQAL.js → chunk-4RJL32PF.js} +49 -10
  28. package/dist/bundle/{chunk-7ROXXRGG.js → chunk-6AO2RSYH.js} +7031 -5279
  29. package/dist/bundle/{chunk-DIQLXAAZ.js → chunk-6NI4FE5G.js} +6 -8
  30. package/dist/bundle/{chunk-X277FBTF.js → chunk-6WUTUCKH.js} +3 -3
  31. package/dist/bundle/{chunk-77TCCHMP.js → chunk-AIEMFRBU.js} +1 -1
  32. package/dist/bundle/{chunk-MRI6QMZ3.js → chunk-CIUJEQH4.js} +27 -19
  33. package/dist/bundle/{chunk-CRFOGYDG.js → chunk-CMWFYZ45.js} +2 -2
  34. package/dist/bundle/{chunk-LE7MDAQG.js → chunk-CQBLPBZU.js} +2 -2
  35. package/dist/bundle/{chunk-RQG5VOGH.js → chunk-DPSTOVKC.js} +185 -34
  36. package/dist/bundle/{chunk-4QUFFB2U.js → chunk-DYLYH7VE.js} +4 -4
  37. package/dist/bundle/{chunk-FEM2JQN2.js → chunk-EA2OB75T.js} +1 -1
  38. package/dist/bundle/chunk-ERQRY6WZ.js +54 -0
  39. package/dist/bundle/{chunk-P3XC6EDU.js → chunk-ETQNHS3A.js} +10 -129
  40. package/dist/bundle/{chunk-IAV5BG3I.js → chunk-EXWZCI5G.js} +1 -1
  41. package/dist/bundle/{chunk-VW6BF6M7.js → chunk-FIVFP53N.js} +1 -1
  42. package/dist/bundle/{chunk-DSVZEXYJ.js → chunk-FJMRDRPN.js} +3573 -3347
  43. package/dist/bundle/{chunk-7QC4M4HS.js → chunk-FT7X74RT.js} +4 -4
  44. package/dist/bundle/{chunk-ADLS6FVG.js → chunk-FXBHOCJK.js} +1 -1
  45. package/dist/bundle/{chunk-ZBFL5JPT.js → chunk-FZLJ2G7A.js} +22 -120
  46. package/dist/bundle/{chunk-GL3MYFMX.js → chunk-G2TSDMTA.js} +5 -5
  47. package/dist/bundle/{chunk-2FV5JUQU.js → chunk-G3SIY4MQ.js} +47 -40
  48. package/dist/bundle/{chunk-2U27KIKU.js → chunk-GCZMYDKU.js} +6 -6
  49. package/dist/bundle/{chunk-CKPCVEXU.js → chunk-HAMDPWEZ.js} +6 -6
  50. package/dist/bundle/{chunk-OE7EIP5L.js → chunk-HCZYJMBP.js} +1 -1
  51. package/dist/bundle/{chunk-OORMSM6O.js → chunk-HNWDEDMU.js} +61 -30
  52. package/dist/bundle/{chunk-FSHCAWZS.js → chunk-HO3GBTIT.js} +13464 -10422
  53. package/dist/bundle/chunk-IE7YBRUO.js +25 -0
  54. package/dist/bundle/{chunk-RGJ7OWHU.js → chunk-IJCUAKR5.js} +61 -21
  55. package/dist/bundle/{chunk-ULDXZ6LH.js → chunk-IKNOTHG2.js} +116 -70
  56. package/dist/bundle/{chunk-633QXP57.js → chunk-ILDGZBZD.js} +14 -9
  57. package/dist/bundle/{chunk-CFQF6IGY.js → chunk-JIS34MLC.js} +69 -6
  58. package/dist/bundle/{chunk-DHWBSXG3.js → chunk-JQF4LM3V.js} +415 -66
  59. package/dist/bundle/{chunk-4LAQDZXU.js → chunk-K5JFX5TK.js} +953 -210
  60. package/dist/bundle/{chunk-5LJTU4LY.js → chunk-K7EMVFJ7.js} +115 -113
  61. package/dist/bundle/chunk-KHBZ4OEP.js +16 -0
  62. package/dist/bundle/chunk-KK2IVZUQ.js +185 -0
  63. package/dist/bundle/{chunk-SELXER2Q.js → chunk-KQD4ZVNC.js} +7 -7
  64. package/dist/bundle/{chunk-VJXHIUFP.js → chunk-KSNJK4QM.js} +13 -13
  65. package/dist/bundle/{chunk-X4GWR6GO.js → chunk-KUL7S5Y3.js} +376 -10
  66. package/dist/bundle/{chunk-M76MXMLY.js → chunk-L6YSKCC3.js} +1 -1
  67. package/dist/bundle/chunk-LQYMN36C.js +73 -0
  68. package/dist/bundle/{chunk-USQ23X5V.js → chunk-LSVQCI6V.js} +751 -735
  69. package/dist/bundle/{chunk-DRBQDCDU.js → chunk-LVDTSCIN.js} +39 -122
  70. package/dist/bundle/{chunk-P3ASN72F.js → chunk-M4OP5ASJ.js} +1 -1
  71. package/dist/bundle/chunk-MAE5UGRQ.js +301 -0
  72. package/dist/bundle/{chunk-CT4WVR4N.js → chunk-MG2CCAVG.js} +3 -3
  73. package/dist/bundle/chunk-MOKEB656.js +71 -0
  74. package/dist/bundle/{chunk-BGTEVIW4.js → chunk-N3SOTKXC.js} +6 -6
  75. package/dist/bundle/{chunk-VRH7VRTK.js → chunk-NBA2V6LB.js} +10 -15
  76. package/dist/bundle/{chunk-5J4AMBMM.js → chunk-OFA22L4G.js} +4 -4
  77. package/dist/bundle/chunk-OKOJEBHK.js +106 -0
  78. package/dist/bundle/{chunk-Q5PI72CR.js → chunk-OMLVWOEF.js} +7 -2
  79. package/dist/bundle/{chunk-DK6ICIGL.js → chunk-OU5OXA6Q.js} +2150 -1312
  80. package/dist/bundle/{chunk-QVSLSWAL.js → chunk-P4FU6R3Z.js} +27 -152
  81. package/dist/bundle/{chunk-YPO2U2YB.js → chunk-PACLT6IW.js} +363 -115
  82. package/dist/bundle/{chunk-BBTQIVFP.js → chunk-PGPHEC2X.js} +2 -2
  83. package/dist/bundle/chunk-PJ3FKBXG.js +18 -0
  84. package/dist/bundle/{chunk-X3ZDN3U7.js → chunk-PKON63JH.js} +2 -2
  85. package/dist/bundle/{chunk-Q2SUFGSH.js → chunk-Q43KX56Z.js} +2 -2
  86. package/dist/bundle/{chunk-XI3VIQKW.js → chunk-QS6DWXDB.js} +569 -537
  87. package/dist/bundle/{chunk-INVTDIF6.js → chunk-QVJMFZFW.js} +1 -1
  88. package/dist/bundle/{chunk-QTHIU7CO.js → chunk-QWGEOQHA.js} +3 -2
  89. package/dist/bundle/{chunk-N2FNMION.js → chunk-R5FTCNLJ.js} +1 -1
  90. package/dist/bundle/{chunk-MW4EGDDV.js → chunk-SO52EJ2W.js} +2 -2
  91. package/dist/bundle/{chunk-HB6XJQ3Y.js → chunk-SYIOT45G.js} +5 -5
  92. package/dist/bundle/{chunk-4QPQ7MDA.js → chunk-TI2OANJZ.js} +1 -1
  93. package/dist/bundle/{chunk-ALIT5QFT.js → chunk-UIKVP23D.js} +1 -1
  94. package/dist/bundle/{chunk-OHWMIUCT.js → chunk-USIMMGWS.js} +244 -245
  95. package/dist/bundle/{chunk-MEED7YFG.js → chunk-UYBLNGZ2.js} +8 -2
  96. package/dist/bundle/{chunk-IED3NS7G.js → chunk-V5Q2QKYM.js} +29 -36
  97. package/dist/bundle/{chunk-54YDWBYG.js → chunk-VJVYGTPM.js} +15 -2
  98. package/dist/bundle/{chunk-5K7OGPGA.js → chunk-VPPNYUQM.js} +8 -8
  99. package/dist/bundle/{chunk-ZBKWRYRS.js → chunk-X2FILY5F.js} +3 -3
  100. package/dist/bundle/{chunk-2RUAMDVV.js → chunk-XLY7V2LB.js} +14 -14
  101. package/dist/bundle/chunk-XWBPP2HX.js +2 -0
  102. package/dist/bundle/{chunk-ZVI6TFQR.js → chunk-Y3IH7EZC.js} +17 -17
  103. package/dist/bundle/{chunk-YD2RYVMK.js → chunk-Z5XCU4S7.js} +46 -40
  104. package/dist/bundle/{chunk-RN4EHCC5.js → chunk-ZAIE3G5I.js} +3 -3
  105. package/dist/bundle/{chunk-2U6SER67.js → chunk-ZMHZ6CQS.js} +2 -2
  106. package/dist/bundle/{chunk-64ZHF6PJ.js → chunk-ZVQDOKDY.js} +3 -1
  107. package/dist/bundle/{chunk-TM4JSVGQ.js → chunk-ZX4QWTMQ.js} +42 -43
  108. package/dist/bundle/{cli-KHMEUXNG.js → cli-4ZYJ6OZE.js} +158 -88
  109. package/dist/bundle/command-contract-FJDDCHYP.js +43 -0
  110. package/dist/bundle/command-server-entry-CASONRIJ.js +173 -0
  111. package/dist/bundle/config-4DZHX2WX.js +99 -0
  112. package/dist/bundle/{decode-7RP4HSVE.js → decode-KEFCVGEB.js} +6 -6
  113. package/dist/bundle/{dispatch-IZCAK47P.js → dispatch-EU67WGME.js} +11 -11
  114. package/dist/bundle/{dist-BFT2SUBV.js → dist-GCQ7KCKN.js} +55 -30
  115. package/dist/bundle/{echarts-T2BSQ2YV.js → echarts-SDZA2SWG.js} +2 -2
  116. package/dist/bundle/{embed-BAS6YPDT.js → embed-43VJEPM6.js} +7 -7
  117. package/dist/bundle/{embedder-5XD5FCAO.js → embedder-Q4ZHAGRP.js} +10 -10
  118. package/dist/bundle/{failure-R2OIHCE5.js → failure-CTJLEB2R.js} +3 -3
  119. package/dist/bundle/first-run-CPOLQVNA.js +29 -0
  120. package/dist/bundle/first-screen-XYESRGWW.js +41 -0
  121. package/dist/bundle/folders-MSBTAPAG.js +24 -0
  122. package/dist/bundle/{instructions-XZPROPKY.js → instructions-7T6JJIFS.js} +1 -1
  123. package/dist/bundle/{main-TZXKGL3L.js → main-NA3QVPXS.js} +39 -25
  124. package/dist/bundle/{mcp-M4QN2E7R.js → mcp-TDKGDB4V.js} +2 -2
  125. package/dist/bundle/{meetings-JB2ISPND.js → meetings-7CVIQJTA.js} +9 -7
  126. package/dist/bundle/{node-A3B3MJWX.js → node-BZDMUFTW.js} +2 -2
  127. package/dist/bundle/{node-P4E63KXA.js → node-KM3CUABH.js} +9 -9
  128. package/dist/bundle/{node-sqlite-QVWDLGDX.js → node-sqlite-QHGB23B4.js} +11 -7
  129. package/dist/bundle/{oauth-YA6IYV4O.js → oauth-BMEMCM2I.js} +8 -8
  130. package/dist/bundle/{open-SY7TXJBS.js → open-JGU2NRJP.js} +6 -6
  131. package/dist/bundle/openai-VTXXFNCS.js +28 -0
  132. package/dist/bundle/{output-file-YGQYZCBJ.js → output-file-VDOCYH2G.js} +6 -6
  133. package/dist/bundle/{process-6HNBTJIY.js → process-756VBE7E.js} +1 -1
  134. package/dist/bundle/{program-77BUCJ4H.js → program-XM6CDIJ2.js} +134 -129
  135. package/dist/bundle/{prompt-YDG73YDS.js → prompt-2IPFXJ4B.js} +6 -6
  136. package/dist/bundle/{recognize-ECXDGTB7.js → recognize-672E2RIB.js} +5 -5
  137. package/dist/bundle/{remote-K4JHGBVJ.js → remote-YLHRVPDS.js} +11 -8
  138. package/dist/bundle/{rerank-IU2YYD4T.js → rerank-NBXQG3OS.js} +8 -8
  139. package/dist/bundle/run-log-3WITBT2F.js +126 -0
  140. package/dist/bundle/{serve-3XWIF3HI.js → serve-FNLOUMYP.js} +10 -10
  141. package/dist/bundle/{server-56VYOHWP.js → server-7ZB5AK5H.js} +53 -47
  142. package/dist/bundle/server-GGRGD4SH.js +77 -0
  143. package/dist/bundle/{services-X7IPEGQ5.js → services-Z4UWN64R.js} +56 -37
  144. package/dist/bundle/{speech-E2OBQWYA.js → speech-XSYVCKR3.js} +17 -14
  145. package/dist/bundle/sqlite-runtime-GAPXJNWU.js +20 -0
  146. package/dist/bundle/{state-4GMJYK4H.js → state-QSA53EF5.js} +7 -7
  147. package/dist/bundle/{store-LA4TV4DM.js → store-EKI4OAJH.js} +22 -19
  148. package/dist/bundle/{store-KPI7GB5Y.js → store-NOF5EYUC.js} +38 -21
  149. package/dist/bundle/store-connection-2OZQGEIO.js +92 -0
  150. package/dist/bundle/store-maintenance-command-GNX3SOZ6.js +67 -0
  151. package/dist/bundle/{streaming-EJ3NM2C2.js → streaming-PQEXKTE5.js} +7 -7
  152. package/dist/bundle/tokens-WJQYQ3FK.js +24 -0
  153. package/dist/bundle/zm.js +34 -10
  154. package/dist/bundle/{zoom-app-QEJBTIJ4.js → zoom-app-Y7RMWLVU.js} +9 -8
  155. package/dist/folders.d.ts +12 -2
  156. package/dist/folders.d.ts.map +1 -1
  157. package/dist/folders.js +81 -3
  158. package/dist/folders.js.map +1 -1
  159. package/dist/identity.d.ts +5 -0
  160. package/dist/identity.d.ts.map +1 -1
  161. package/dist/identity.js +14 -0
  162. package/dist/identity.js.map +1 -1
  163. package/dist/recording-schedule-setup.d.ts.map +1 -1
  164. package/dist/recording-schedule-setup.js +4 -7
  165. package/dist/recording-schedule-setup.js.map +1 -1
  166. package/dist/remote-http.d.ts +1 -1
  167. package/dist/remote-http.d.ts.map +1 -1
  168. package/dist/remote-http.js +21 -23
  169. package/dist/remote-http.js.map +1 -1
  170. package/dist/setup-commands.d.ts.map +1 -1
  171. package/dist/setup-commands.js +2 -4
  172. package/dist/setup-commands.js.map +1 -1
  173. package/dist/tokens.d.ts +17 -2
  174. package/dist/tokens.d.ts.map +1 -1
  175. package/dist/tokens.js +109 -29
  176. package/dist/tokens.js.map +1 -1
  177. package/dist/version.d.ts +1 -1
  178. package/dist/version.js +1 -1
  179. package/dist/wcat.d.ts +3 -0
  180. package/dist/wcat.d.ts.map +1 -0
  181. package/dist/wcat.js +4 -0
  182. package/dist/wcat.js.map +1 -0
  183. package/package.json +15 -14
  184. package/dist/bundle/answer-policy-PPSPMCLH.js +0 -104
  185. package/dist/bundle/chunk-KMV7GZB6.js +0 -35
  186. package/dist/bundle/chunk-UG447QY2.js +0 -27
  187. package/dist/bundle/chunk-XRFHQGOD.js +0 -17
  188. package/dist/bundle/command-contract-4K6XXZYE.js +0 -41
  189. package/dist/bundle/config-EEDB632I.js +0 -90
  190. package/dist/bundle/first-run-23WWZ2PW.js +0 -28
  191. package/dist/bundle/first-screen-6HFUYVFR.js +0 -39
  192. package/dist/bundle/folders-ZXTOFY4T.js +0 -16
  193. package/dist/bundle/openai-2AU24NRN.js +0 -25
  194. package/dist/bundle/run-log-LFEXNZ74.js +0 -118
  195. package/dist/bundle/server-YSTMUZ22.js +0 -72
  196. package/dist/bundle/store-connection-AZTIF6IH.js +0 -83
  197. package/dist/bundle/store-maintenance-command-LR572PS4.js +0 -61
  198. package/dist/bundle/tokens-BE6CJMR5.js +0 -20
  199. /package/dist/bundle/{chunk-VOXIGICJ.js → chunk-7O7XM37N.js} +0 -0
@@ -0,0 +1,54 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ resolvePaths
5
+ } from "./chunk-HNWDEDMU.js";
6
+ import {
7
+ __name
8
+ } from "./chunk-ZVVMGPBJ.js";
9
+
10
+ // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/path.js
11
+ import { realpathSync } from "node:fs";
12
+ import { userInfo } from "node:os";
13
+ import { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
14
+ var wirecatDirectory = /* @__PURE__ */ __name((env = process.env, platform) => resolvePaths({ appName: "WireCat", prefix: "WIRECAT", env, ...platform ? { platform } : {} }).state, "wirecatDirectory");
15
+ var storePath = /* @__PURE__ */ __name((env = process.env) => env.MESSAGING_STORE ?? join(wirecatDirectory(env), "wirecat.db"), "storePath");
16
+ var accountHome = /* @__PURE__ */ __name(() => {
17
+ try {
18
+ return userInfo().homedir;
19
+ } catch {
20
+ return void 0;
21
+ }
22
+ }, "accountHome");
23
+ var inOwnerFolder = /* @__PURE__ */ __name((file, home = accountHome()) => {
24
+ if (!home || file === ":memory:")
25
+ return false;
26
+ const owner = wirecatDirectory({ HOME: home, USERPROFILE: home });
27
+ const within = /* @__PURE__ */ __name((path, folder) => {
28
+ const inside = relative(folder, path);
29
+ return !(inside.startsWith("..") || isAbsolute(inside));
30
+ }, "within");
31
+ return within(resolve(file), owner) || within(settled(resolve(file)), settled(owner));
32
+ }, "inOwnerFolder");
33
+ var settled = /* @__PURE__ */ __name((path) => {
34
+ try {
35
+ return realpathSync(path);
36
+ } catch {
37
+ const parent = dirname(path);
38
+ return parent === path ? path : join(settled(parent), basename(path));
39
+ }
40
+ }, "settled");
41
+ var refuseOwnerStoreInTests = /* @__PURE__ */ __name((file, env = process.env, home = accountHome()) => {
42
+ if (!env.VITEST || !inOwnerFolder(file, home))
43
+ return;
44
+ throw new Error(`a test tried to open ${file}, in the owner's real WireCat folder; give it a MESSAGING_STORE or HOME of its own`);
45
+ }, "refuseOwnerStoreInTests");
46
+
47
+ export {
48
+ wirecatDirectory,
49
+ storePath,
50
+ accountHome,
51
+ inOwnerFolder,
52
+ settled,
53
+ refuseOwnerStoreInTests
54
+ };
@@ -2,21 +2,15 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  LEVELS
5
- } from "./chunk-Q5PI72CR.js";
5
+ } from "./chunk-OMLVWOEF.js";
6
6
  import {
7
7
  WORD_BODY,
8
8
  e164Of
9
- } from "./chunk-4LAQDZXU.js";
10
- import {
11
- looksLikeReference,
12
- parseReference,
13
- providerLabel,
14
- providerNamed
15
- } from "./chunk-XI3VIQKW.js";
9
+ } from "./chunk-K5JFX5TK.js";
16
10
  import {
17
11
  resolvePaths,
18
12
  writeSecurely
19
- } from "./chunk-OORMSM6O.js";
13
+ } from "./chunk-HNWDEDMU.js";
20
14
  import {
21
15
  array,
22
16
  getDotPath,
@@ -35,124 +29,18 @@ import {
35
29
  string,
36
30
  transform,
37
31
  unknown
38
- } from "./chunk-WOIHSQAL.js";
32
+ } from "./chunk-4RJL32PF.js";
39
33
  import {
40
34
  CliError
41
- } from "./chunk-FEM2JQN2.js";
35
+ } from "./chunk-EA2OB75T.js";
42
36
  import {
43
- singleLine,
44
37
  visibleControls
45
- } from "./chunk-OE7EIP5L.js";
38
+ } from "./chunk-HCZYJMBP.js";
46
39
  import {
47
40
  __name
48
41
  } from "./chunk-ZVVMGPBJ.js";
49
42
 
50
- // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/domain/ref-arguments.js
51
- var TAKES = {
52
- chat: "a chat: chat:<provider>/<account>/<chat>, its id or its title",
53
- message: "a message: msg:<provider>/<account>/<chat>/<message>, or a chat and the message's id"
54
- };
55
- var article = /* @__PURE__ */ __name((word) => /^[aeiou]/.test(word) ? "an" : "a", "article");
56
- var wrongKind = /* @__PURE__ */ __name((text, kind, takes) => new CliError("validation_error", `${text} names ${article(kind)} ${kind}; this takes ${TAKES[takes]}`, {
57
- reason: "ref.wrong-kind"
58
- }), "wrongKind");
59
- var wrongProvider = /* @__PURE__ */ __name((text, provider, kind) => {
60
- const entry = providerNamed(provider);
61
- const command = entry?.command;
62
- const opens = kind === "entity" ? void 0 : entry?.opens?.[kind];
63
- const how = command && opens ? `open it with ${command} <profile> ${opens} ${text}` : "open it with its own CLI";
64
- const label = providerLabel(provider);
65
- return new CliError("validation_error", `${text} is ${article(label.toLowerCase())} ${label} ${kind}; ${how}`, {
66
- reason: "ref.wrong-provider"
67
- });
68
- }, "wrongProvider");
69
- var chatReferenceOf = /* @__PURE__ */ __name((text, provider, takes = "chat") => {
70
- const trimmed = text.trim();
71
- if (!looksLikeReference(trimmed))
72
- return void 0;
73
- const reference = parseReference(trimmed);
74
- if (reference.type !== "chat" && reference.type !== "message")
75
- throw wrongKind(trimmed, reference.type, takes);
76
- if (reference.provider !== provider)
77
- throw wrongProvider(trimmed, reference.provider, reference.type);
78
- const found = {
79
- text: trimmed,
80
- provider: reference.provider,
81
- account: reference.account,
82
- chat: reference.chat,
83
- ...reference.type === "message" ? { message: reference.message } : {}
84
- };
85
- return found;
86
- }, "chatReferenceOf");
87
- var contactReferenceOf = /* @__PURE__ */ __name((text, provider) => {
88
- const trimmed = text.trim();
89
- if (!trimmed.startsWith("contact:"))
90
- return void 0;
91
- const reference = parseReference(trimmed);
92
- if (reference.type !== "contact")
93
- return void 0;
94
- if (provider !== void 0 && reference.provider !== provider)
95
- throw wrongProvider(trimmed, reference.provider, reference.type);
96
- return reference.id;
97
- }, "contactReferenceOf");
98
- var wrongAccount = /* @__PURE__ */ __name((reference, scope, profiles) => {
99
- const here = scope.account === void 0 ? "the account of this profile is not known yet" : `${scope.profile === void 0 ? "this profile" : `profile ${scope.profile}`} is account ${scope.account}`;
100
- const others = profiles === void 0 ? "" : `. Profiles signed in to ${reference.account}: ${profiles.length > 0 ? profiles.join(", ") : "none here"}`;
101
- return new CliError("validation_error", `${reference.text} belongs to account ${reference.account}; ${here}${others}`, { reason: "ref.wrong-account" });
102
- }, "wrongAccount");
103
- var ensureAccount = /* @__PURE__ */ __name(async (reference, scope, profilesOn) => {
104
- if (scope.account !== void 0 && scope.account === reference.account)
105
- return;
106
- const profiles = await profilesOn?.(reference.account).catch(() => void 0);
107
- throw wrongAccount(reference, scope, profiles);
108
- }, "ensureAccount");
109
-
110
- // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/resolve.js
111
- var isId = /* @__PURE__ */ __name((reference) => /^-?\d+$/.test(reference.trim()), "isId");
112
- var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase().replaceAll("\u0451", "\u0435"), "foldName");
113
- var pickChat = /* @__PURE__ */ __name((reference, chats) => {
114
- const wanted = foldName(reference.trim());
115
- const matches = chats.filter((chat) => chat.title !== null && foldName(chat.title).includes(wanted));
116
- if (matches.length === 1 && matches[0])
117
- return matches[0];
118
- if (matches.length === 0)
119
- throw new CliError("not_found", `no chat matches "${reference}"`);
120
- throw ambiguous(reference, "chats", matches.map((chat) => ({ id: chat.id, title: chat.title })), ({ title }) => singleLine(String(title)));
121
- }, "pickChat");
122
- var pickPerson = /* @__PURE__ */ __name((reference, people) => {
123
- const trimmed = reference.trim();
124
- const contact = contactReferenceOf(trimmed, people.provider);
125
- if (contact !== void 0) {
126
- const named = people.get(contact);
127
- if (named)
128
- return named;
129
- throw new CliError("not_found", `no person ${contact} in what this account has seen`);
130
- }
131
- const known = people.get(trimmed);
132
- if (known)
133
- return known;
134
- if (isId(trimmed))
135
- throw new CliError("not_found", `no person ${trimmed} in what this account has seen`);
136
- const wanted = foldName(trimmed.replace(/^@/, ""));
137
- const everyone = people.all().toSorted((a, b) => (a.name ?? "").localeCompare(b.name ?? ""));
138
- const fields = /* @__PURE__ */ __name((person) => [person.alias, person.name, person.username].filter(isPresent).map(foldName), "fields");
139
- const exact = everyone.filter((person) => fields(person).includes(wanted));
140
- const matches = exact.length > 0 ? exact : everyone.filter((person) => fields(person).some((one) => one.includes(wanted)));
141
- if (matches.length === 1 && matches[0])
142
- return matches[0];
143
- if (matches.length === 0)
144
- throw new CliError("not_found", `nobody matches "${reference}"`);
145
- throw ambiguous(reference, "people", matches.map(({ id, name, username }) => ({ id, name, username })), ({ name, username }) => singleLine([name, username && `@${username}`].filter(isPresent).join(" ")));
146
- }, "pickPerson");
147
- var ambiguous = /* @__PURE__ */ __name((reference, what, candidates, label) => {
148
- const width = Math.max(...candidates.map(({ id }) => id.length));
149
- const lines = candidates.map((candidate) => ` ${candidate.id.padEnd(width)} ${label(candidate)}`).join("\n");
150
- return new CliError("validation_error", `"${singleLine(reference)}" matches ${candidates.length} ${what} \u2014 name one by its id:
151
- ${lines}`, { candidates });
152
- }, "ambiguous");
153
- var isPresent = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isPresent");
154
-
155
- // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/domain/vcard.js
43
+ // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/vcard.js
156
44
  import { createHash } from "node:crypto";
157
45
  var MAX_ID = 512;
158
46
  var AS_WORD = new RegExp(`^${WORD_BODY}$`);
@@ -383,7 +271,7 @@ var envelopeOfVcard = /* @__PURE__ */ __name((text, { provider, account, batchId
383
271
  };
384
272
  }, "envelopeOfVcard");
385
273
 
386
- // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/domain/formatting.js
274
+ // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/formatting.js
387
275
  var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "the messenger formatter returned invalid text spans"), "invalid");
388
276
  var validateFormattedText = /* @__PURE__ */ __name((formatted) => {
389
277
  const { text, spans } = formatted;
@@ -443,7 +331,7 @@ var visibleFormattedText = /* @__PURE__ */ __name((formatted) => {
443
331
  };
444
332
  }, "visibleFormattedText");
445
333
 
446
- // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/moderation/check.js
334
+ // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/moderation/check.js
447
335
  var INVITE = /max\.ru\/join\/|(t|telegram)\.me\/(\+|joinchat\/)|tg:\/\/join/i;
448
336
  var LINK = /https?:\/\/\S+/i;
449
337
  var STRENGTH = { report: 0, delete: 1, remove: 2 };
@@ -631,7 +519,7 @@ var nextPoint = /* @__PURE__ */ __name((rows, found) => {
631
519
  }, "nextPoint");
632
520
  var someUndone = /* @__PURE__ */ __name((rows) => rows.some(undone), "someUndone");
633
521
 
634
- // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/moderation/rules.js
522
+ // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/moderation/rules.js
635
523
  import { existsSync, readFileSync } from "node:fs";
636
524
  import { join } from "node:path";
637
525
  var RULE_ACTIONS = ["report", "delete", "remove"];
@@ -775,13 +663,6 @@ var assign = /* @__PURE__ */ __name((rules, key, value) => {
775
663
  }, "assign");
776
664
 
777
665
  export {
778
- chatReferenceOf,
779
- wrongAccount,
780
- ensureAccount,
781
- isId,
782
- foldName,
783
- pickChat,
784
- pickPerson,
785
666
  isVcard,
786
667
  envelopeOfVcard,
787
668
  validateFormattedText,
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/mcp/bot/instructions.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/mcp/bot/instructions.js
8
8
  var botInstructions = /* @__PURE__ */ __name(({ command, name, profile, writes, skill }) => [
9
9
  `The owner's ${name} bot "${profile}", through the official Bot API \u2014 not the owner's personal account. What it writes, people see as the bot.`,
10
10
  "Use these tools to read the chats this bot is in, find a message or a person, and \u2014 when the profile allows \u2014 write as the bot.",
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/executable.js
7
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/executable.js
8
8
  import { existsSync } from "node:fs";
9
9
  import { win32 } from "node:path";
10
10
  var variable = /* @__PURE__ */ __name((env, name) => Object.entries(env).find(([key]) => key.toUpperCase() === name)?.[1], "variable");