@wirecat/zoom-cli 0.75.0 → 0.77.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 (217) hide show
  1. package/README.md +12 -11
  2. package/contracts/wirecat.json +53 -105
  3. package/dist/answer-entities.d.ts +1 -141
  4. package/dist/answer-entities.d.ts.map +1 -1
  5. package/dist/answer-entities.js +0 -31
  6. package/dist/answer-entities.js.map +1 -1
  7. package/dist/api.d.ts +18 -1
  8. package/dist/api.d.ts.map +1 -1
  9. package/dist/api.js +179 -54
  10. package/dist/api.js.map +1 -1
  11. package/dist/archive-commands.d.ts +0 -3
  12. package/dist/archive-commands.d.ts.map +1 -1
  13. package/dist/archive-commands.js +1 -54
  14. package/dist/archive-commands.js.map +1 -1
  15. package/dist/bin/zm.js +2 -2
  16. package/dist/bundle/{all-profiles-WFLKFKJC.js → all-profiles-PMCFNDMA.js} +11 -11
  17. package/dist/bundle/answer-policy-XU7KEW2V.js +121 -0
  18. package/dist/bundle/{anthropic-H45W4P22.js → anthropic-TGJOKLUS.js} +6 -6
  19. package/dist/bundle/{app-server-I4FPLBIX.js → app-server-OAODUFM3.js} +73 -63
  20. package/dist/bundle/{bun-V5QLYBZU.js → bun-HJHVHJJV.js} +2 -2
  21. package/dist/bundle/{bun-sqlite-X2YZPHDS.js → bun-sqlite-PLBOY6FP.js} +7 -7
  22. package/dist/bundle/{chunk-P6MQ6FS4.js → chunk-2QDD6S2R.js} +8 -8
  23. package/dist/bundle/{chunk-ZMHZ6CQS.js → chunk-2QRGJSKO.js} +2 -2
  24. package/dist/bundle/{chunk-DQBLDZ7M.js → chunk-36SI35XZ.js} +5 -5
  25. package/dist/bundle/{chunk-HKPNQL52.js → chunk-375BH5OD.js} +4 -4
  26. package/dist/bundle/{chunk-T4FMXDDV.js → chunk-3TLQF3DN.js} +3 -3
  27. package/dist/bundle/{chunk-EA2OB75T.js → chunk-4QNW4NK6.js} +1 -1
  28. package/dist/bundle/{chunk-4XDWV6VJ.js → chunk-4Z4VOQRR.js} +17 -17
  29. package/dist/bundle/{chunk-VLK3X53X.js → chunk-5A5W322G.js} +6 -2
  30. package/dist/bundle/chunk-5C5UEKUJ.js +170 -0
  31. package/dist/bundle/chunk-5C6CRSEM.js +389 -0
  32. package/dist/bundle/{chunk-3YKAFLXY.js → chunk-5KHCFIWI.js} +2 -2
  33. package/dist/bundle/{chunk-NQQVNLO6.js → chunk-635GRAO5.js} +12 -12
  34. package/dist/bundle/{chunk-RKI4BGWG.js → chunk-6JRBMNRN.js} +3 -3
  35. package/dist/bundle/{chunk-Y5J5CAG2.js → chunk-6YCFDDRO.js} +1 -1
  36. package/dist/bundle/{chunk-ZVVRRMLW.js → chunk-77JQIY2V.js} +3 -3
  37. package/dist/bundle/{chunk-IW245Q5B.js → chunk-7AFYZOHU.js} +36 -32
  38. package/dist/bundle/{chunk-V3UK6E5B.js → chunk-7CMYNW3W.js} +4 -4
  39. package/dist/bundle/chunk-7DTU7QZP.js +72 -0
  40. package/dist/bundle/chunk-7ILGYNWX.js +773 -0
  41. package/dist/bundle/{chunk-XUHQ7DVT.js → chunk-7S3N5CTA.js} +1 -1
  42. package/dist/bundle/chunk-7SNU7RFU.js +229 -0
  43. package/dist/bundle/{chunk-4YNUQGDP.js → chunk-A6LK2W5J.js} +1 -1
  44. package/dist/bundle/{chunk-MHXZ62CU.js → chunk-ADJIYY33.js} +1 -1
  45. package/dist/bundle/{chunk-WUWF4EXZ.js → chunk-B7XFDMFV.js} +22 -12
  46. package/dist/bundle/{chunk-2Q4CB4EI.js → chunk-BOJCRTQW.js} +2 -2
  47. package/dist/bundle/{chunk-GPVSGZ4R.js → chunk-CJL5GHTQ.js} +1010 -617
  48. package/dist/bundle/{chunk-BY2YPKZZ.js → chunk-CL6QAZGT.js} +39 -67
  49. package/dist/bundle/{chunk-GU4FVTJV.js → chunk-CUJJZJ4R.js} +44 -9
  50. package/dist/bundle/{chunk-FBYGBR4Q.js → chunk-CZ6OO66B.js} +4 -4
  51. package/dist/bundle/chunk-DCEQIKFD.js +259 -0
  52. package/dist/bundle/{chunk-QBKKTTA3.js → chunk-DDUNPLET.js} +279 -588
  53. package/dist/bundle/{chunk-CAQ5GW3A.js → chunk-DYIRJINE.js} +1 -1
  54. package/dist/bundle/{chunk-L5UILROP.js → chunk-E3UPMPUV.js} +8 -8
  55. package/dist/bundle/{chunk-F6RB5FHZ.js → chunk-ECRFXQHA.js} +1 -1
  56. package/dist/bundle/{chunk-AVCYD4WQ.js → chunk-F4ROWGLU.js} +68 -38
  57. package/dist/bundle/{chunk-6XNTELM5.js → chunk-FDQE2CLT.js} +1 -1
  58. package/dist/bundle/{chunk-PCJRHC5Y.js → chunk-FRC5QIPQ.js} +8 -8
  59. package/dist/bundle/{chunk-4RJL32PF.js → chunk-FS5HPXQN.js} +26 -9
  60. package/dist/bundle/{chunk-ZBYKCVSV.js → chunk-GHBDYYPO.js} +2 -2
  61. package/dist/bundle/{chunk-OUM4ZO53.js → chunk-H2EVYY5Z.js} +1 -1
  62. package/dist/bundle/{chunk-VPSQZ2YR.js → chunk-I3QMPQYD.js} +49 -49
  63. package/dist/bundle/{chunk-3U3W6YY5.js → chunk-ICZVSVTW.js} +71 -252
  64. package/dist/bundle/{chunk-QEO3XTIE.js → chunk-IJTBB23F.js} +32 -33
  65. package/dist/bundle/{chunk-FT7X74RT.js → chunk-IS6MUPN2.js} +4 -4
  66. package/dist/bundle/{chunk-NL6AZ6S2.js → chunk-IUOKIZZN.js} +2 -2
  67. package/dist/bundle/{chunk-3HTJBGNP.js → chunk-IZMRQ3MV.js} +21 -16
  68. package/dist/bundle/{chunk-X2FILY5F.js → chunk-JFVZVPRW.js} +3 -3
  69. package/dist/bundle/{chunk-MNVT7EJS.js → chunk-JMU3E2WA.js} +2 -2
  70. package/dist/bundle/{chunk-T25PR26L.js → chunk-JQUYHPQD.js} +7 -7
  71. package/dist/bundle/{chunk-JDTZCZ5K.js → chunk-KHBSQROH.js} +5 -5
  72. package/dist/bundle/{chunk-HCZYJMBP.js → chunk-KYKW2W6X.js} +1 -1
  73. package/dist/bundle/chunk-LMZUC4CS.js +101 -0
  74. package/dist/bundle/{chunk-PPM7UTCT.js → chunk-LUAS73NT.js} +18 -18
  75. package/dist/bundle/{chunk-P4ZQQLZF.js → chunk-LWMDLXEO.js} +2384 -3000
  76. package/dist/bundle/{chunk-W2AC2RAG.js → chunk-LYVHQ6DJ.js} +14 -14
  77. package/dist/bundle/{chunk-DUPFAY35.js → chunk-MCLZ74II.js} +7 -7
  78. package/dist/bundle/chunk-MIG4RLDB.js +555 -0
  79. package/dist/bundle/{chunk-3URYKAJP.js → chunk-MMAZUJBO.js} +1 -1
  80. package/dist/bundle/{chunk-B6Q53CVA.js → chunk-MTH3JJHF.js} +24 -22
  81. package/dist/bundle/{chunk-7ZVWV33Z.js → chunk-NJJEUG4C.js} +35 -13
  82. package/dist/bundle/{chunk-SEJBS7SI.js → chunk-NKKVVPL5.js} +1 -1
  83. package/dist/bundle/{chunk-TSHUBGN4.js → chunk-NOF6LABG.js} +6 -6
  84. package/dist/bundle/{chunk-F7K2V6OA.js → chunk-NPDPD2H3.js} +12 -12
  85. package/dist/bundle/{chunk-2PYZTRRC.js → chunk-NPIVV52M.js} +1 -1
  86. package/dist/bundle/{chunk-WQOGHND4.js → chunk-OOIU36FA.js} +1 -1
  87. package/dist/bundle/{chunk-XCJGDPMN.js → chunk-OXXJW3A5.js} +22320 -22886
  88. package/dist/bundle/chunk-PM3MB3E7.js +295 -0
  89. package/dist/bundle/{chunk-VUPWDCYV.js → chunk-PO4RZ4XZ.js} +1 -1
  90. package/dist/bundle/{chunk-K5E5MB4C.js → chunk-Q7ZW7XAX.js} +31 -87
  91. package/dist/bundle/{chunk-HNWDEDMU.js → chunk-QAGECFHL.js} +22 -22
  92. package/dist/bundle/{chunk-JTYWSXJG.js → chunk-QE4L2QQZ.js} +9 -9
  93. package/dist/bundle/{chunk-4J5GJJ2I.js → chunk-QKNO3JTG.js} +2 -2
  94. package/dist/bundle/{chunk-IMDTC4MD.js → chunk-QUGESVOE.js} +22 -35
  95. package/dist/bundle/{chunk-ELD5AC7Q.js → chunk-RQS3W4P6.js} +7 -6
  96. package/dist/bundle/{chunk-A3Q3PG54.js → chunk-SFPUSEOT.js} +2 -2
  97. package/dist/bundle/{chunk-SR5X7YKB.js → chunk-SP5OMHOO.js} +3 -3
  98. package/dist/bundle/chunk-STNZQBY4.js +335 -0
  99. package/dist/bundle/{chunk-EOZAJGB4.js → chunk-SVJQRG5N.js} +16 -16
  100. package/dist/bundle/{chunk-IDGWBKMH.js → chunk-SY5NGYKA.js} +12 -12
  101. package/dist/bundle/{chunk-NE4GYKQA.js → chunk-T4CI3YXW.js} +6 -6
  102. package/dist/bundle/{chunk-3YRPDNWK.js → chunk-T6RSYDFA.js} +1075 -443
  103. package/dist/bundle/{chunk-QXQUANWE.js → chunk-TY4FFK2P.js} +6 -6
  104. package/dist/bundle/chunk-UGRGYLEI.js +224 -0
  105. package/dist/bundle/{chunk-C5WQ57AB.js → chunk-VGERRRDC.js} +1 -1
  106. package/dist/bundle/{chunk-NQLL4KRN.js → chunk-VJ2TLU7R.js} +6 -6
  107. package/dist/bundle/{chunk-PX4IMYVB.js → chunk-W7UCN7MF.js} +3 -3
  108. package/dist/bundle/{chunk-RBYVQE3S.js → chunk-WD5OL5JB.js} +81 -5
  109. package/dist/bundle/{chunk-LRCSDAYK.js → chunk-XC3MWABM.js} +4 -4
  110. package/dist/bundle/{chunk-MAE5UGRQ.js → chunk-XCA5N63N.js} +6 -6
  111. package/dist/bundle/chunk-XVHDT4CO.js +31 -0
  112. package/dist/bundle/{chunk-532H3KT3.js → chunk-YFN5A7OP.js} +4 -4
  113. package/dist/bundle/{chunk-IJCUAKR5.js → chunk-YJIGGUPI.js} +4 -4
  114. package/dist/bundle/{chunk-FIVFP53N.js → chunk-YVI5SQPY.js} +1 -1
  115. package/dist/bundle/{chunk-IO3BQ6JU.js → chunk-ZRNNMBPC.js} +31 -577
  116. package/dist/bundle/{chunk-RABCFGT3.js → chunk-ZUMKZOHR.js} +3 -3
  117. package/dist/bundle/{chunk-M4OP5ASJ.js → chunk-ZZ32DXTH.js} +1 -1
  118. package/dist/bundle/{cli-NPRYCWFH.js → cli-Y27PHKBV.js} +105 -84
  119. package/dist/bundle/command-contract-GB7YA3KW.js +45 -0
  120. package/dist/bundle/{command-server-entry-BV4SUPUI.js → command-server-entry-AXQSW2X6.js} +35 -31
  121. package/dist/bundle/config-2OOABHR7.js +108 -0
  122. package/dist/bundle/{decode-PRMKCHHC.js → decode-ZRNOOTUZ.js} +16 -8
  123. package/dist/bundle/{dispatch-EU67WGME.js → dispatch-2GHGPAYH.js} +9 -9
  124. package/dist/bundle/{dist-HGLDGKUW.js → dist-MUFVAMKB.js} +25 -22
  125. package/dist/bundle/{echarts-QIXLXS3G.js → echarts-F4PHDYET.js} +2 -2
  126. package/dist/bundle/{embed-OZN2BIJY.js → embed-KWHCKPCV.js} +7 -7
  127. package/dist/bundle/{embedder-RBDHO6Z6.js → embedder-U3R3RY54.js} +10 -10
  128. package/dist/bundle/{failure-CTJLEB2R.js → failure-S2YXEN4A.js} +3 -3
  129. package/dist/bundle/first-run-F4YR2E2C.js +29 -0
  130. package/dist/bundle/first-screen-HPRHD3VK.js +43 -0
  131. package/dist/bundle/{folders-MSBTAPAG.js → folders-DVTRFQKW.js} +5 -5
  132. package/dist/bundle/{instructions-MD2RZT5Z.js → instructions-JU4YW6QY.js} +1 -1
  133. package/dist/bundle/{main-FPMCCRIQ.js → main-5UCRPACH.js} +24 -24
  134. package/dist/bundle/{mcp-TDKGDB4V.js → mcp-O6ACR2DX.js} +2 -2
  135. package/dist/bundle/meeting-combined-IWU5SPAH.js +26 -0
  136. package/dist/bundle/meeting-model-ILIUJECZ.js +26 -0
  137. package/dist/bundle/meeting-semantic-5DKRGZFS.js +23 -0
  138. package/dist/bundle/{meetings-WYCVHAIP.js → meetings-T2UY35DV.js} +43 -7
  139. package/dist/bundle/{node-IEVT2FSJ.js → node-MAVRAF4M.js} +2 -2
  140. package/dist/bundle/{node-sqlite-O4C6IWSM.js → node-sqlite-TFBQ5NDI.js} +8 -8
  141. package/dist/bundle/{oauth-6VXOUXSE.js → oauth-7IG5HWSY.js} +8 -8
  142. package/dist/bundle/{open-AMUIWV3Y.js → open-3R3N7L3X.js} +6 -6
  143. package/dist/bundle/openai-DD5I3DWC.js +28 -0
  144. package/dist/bundle/{output-file-VDOCYH2G.js → output-file-KKHHAYWF.js} +6 -6
  145. package/dist/bundle/{process-6Q23D3TO.js → process-OIO254NR.js} +1 -1
  146. package/dist/bundle/{program-CF2NKA2A.js → program-IBYRU76H.js} +428 -250
  147. package/dist/bundle/{prompt-N3UZE4ZR.js → prompt-LNEOO7PN.js} +6 -6
  148. package/dist/bundle/{recognize-I5F3K3CZ.js → recognize-2WYLT3PC.js} +5 -5
  149. package/dist/bundle/{remote-CJF5KMMY.js → remote-7EAJEIV7.js} +11 -11
  150. package/dist/bundle/{rerank-6WLY6MKY.js → rerank-DZBZ744F.js} +8 -8
  151. package/dist/bundle/run-log-CCIVRSHP.js +135 -0
  152. package/dist/bundle/{serve-FOQJ3WMX.js → serve-T3KQV5SS.js} +15 -15
  153. package/dist/bundle/{server-OEEGRSQD.js → server-2QQAQZ2J.js} +59 -49
  154. package/dist/bundle/server-OJQMPF2R.js +84 -0
  155. package/dist/bundle/{services-Q6SFESMS.js → services-DETAKMC3.js} +80 -54
  156. package/dist/bundle/{speech-PBVEIG4N.js → speech-HD57JNTK.js} +34 -18
  157. package/dist/bundle/{sqlite-runtime-IWR65V6I.js → sqlite-runtime-OCETZSEZ.js} +7 -7
  158. package/dist/bundle/{state-G54C2N6U.js → state-ZKVQ4DBI.js} +7 -7
  159. package/dist/bundle/{store-D5OLXIFW.js → store-7IZ2WMHF.js} +24 -20
  160. package/dist/bundle/{store-7EWMPTTW.js → store-GEAQ7V5R.js} +26 -22
  161. package/dist/bundle/store-connection-BALCZW7P.js +101 -0
  162. package/dist/bundle/store-maintenance-command-SBT4LDSI.js +76 -0
  163. package/dist/bundle/{streaming-PQEXKTE5.js → streaming-CLBAO3MG.js} +7 -7
  164. package/dist/bundle/{tokens-J7TFHLEG.js → tokens-WH73ZWFI.js} +10 -10
  165. package/dist/bundle/zm.js +9 -9
  166. package/dist/bundle/{zoom-app-SULPMVN4.js → zoom-app-ZDTYMJET.js} +8 -8
  167. package/dist/commands.d.ts.map +1 -1
  168. package/dist/commands.js +3 -0
  169. package/dist/commands.js.map +1 -1
  170. package/dist/first-screen.d.ts.map +1 -1
  171. package/dist/first-screen.js +3 -5
  172. package/dist/first-screen.js.map +1 -1
  173. package/dist/meeting-integration-commands.d.ts.map +1 -1
  174. package/dist/meeting-integration-commands.js +46 -28
  175. package/dist/meeting-integration-commands.js.map +1 -1
  176. package/dist/meeting-search-commands.d.ts.map +1 -1
  177. package/dist/meeting-search-commands.js +6 -5
  178. package/dist/meeting-search-commands.js.map +1 -1
  179. package/dist/meeting-source.d.ts.map +1 -1
  180. package/dist/meeting-source.js +15 -1
  181. package/dist/meeting-source.js.map +1 -1
  182. package/dist/permissions.d.ts +8 -4
  183. package/dist/permissions.d.ts.map +1 -1
  184. package/dist/permissions.js +25 -24
  185. package/dist/permissions.js.map +1 -1
  186. package/dist/program-bindings.d.ts.map +1 -1
  187. package/dist/program-bindings.js +10 -6
  188. package/dist/program-bindings.js.map +1 -1
  189. package/dist/program.d.ts +2 -1
  190. package/dist/program.d.ts.map +1 -1
  191. package/dist/program.js.map +1 -1
  192. package/dist/remote-meetings.d.ts +38 -8
  193. package/dist/remote-meetings.d.ts.map +1 -1
  194. package/dist/remote-meetings.js +52 -29
  195. package/dist/remote-meetings.js.map +1 -1
  196. package/dist/run.d.ts.map +1 -1
  197. package/dist/run.js +4 -2
  198. package/dist/run.js.map +1 -1
  199. package/dist/version.d.ts +1 -1
  200. package/dist/version.js +1 -1
  201. package/dist/zoom-app.d.ts.map +1 -1
  202. package/dist/zoom-app.js +1 -0
  203. package/dist/zoom-app.js.map +1 -1
  204. package/package.json +3 -3
  205. package/skills/zoom-cli/SKILL.md +2 -2
  206. package/dist/bundle/answer-policy-XCKC2LLN.js +0 -110
  207. package/dist/bundle/chunk-NU4FSSMN.js +0 -161
  208. package/dist/bundle/command-contract-OJYRKQHR.js +0 -41
  209. package/dist/bundle/config-UMEV24OE.js +0 -97
  210. package/dist/bundle/first-run-HNCD7U3B.js +0 -29
  211. package/dist/bundle/first-screen-374BBMO6.js +0 -39
  212. package/dist/bundle/openai-MEDN6FSK.js +0 -28
  213. package/dist/bundle/run-log-FKF4ZX4M.js +0 -124
  214. package/dist/bundle/server-BAGY5HEZ.js +0 -74
  215. package/dist/bundle/store-connection-34747SCC.js +0 -90
  216. package/dist/bundle/store-maintenance-command-QBO67F7Z.js +0 -65
  217. /package/dist/bundle/{chunk-XWBPP2HX.js → chunk-VKE77B3F.js} +0 -0
@@ -0,0 +1,295 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ SAMPLE_RATE,
5
+ decodeOgg
6
+ } from "./chunk-XC3MWABM.js";
7
+ import {
8
+ importFrom
9
+ } from "./chunk-Y5E2WNWB.js";
10
+ import {
11
+ CliError
12
+ } from "./chunk-4QNW4NK6.js";
13
+ import {
14
+ __name
15
+ } from "./chunk-ZVVMGPBJ.js";
16
+
17
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/speech/decode.js
18
+ import { spawn } from "node:child_process";
19
+ import { mkdtemp, open, readFile, rm, writeFile } from "node:fs/promises";
20
+ import { createRequire } from "node:module";
21
+ import { tmpdir } from "node:os";
22
+ import { join } from "node:path";
23
+ import { pathToFileURL } from "node:url";
24
+ var LONGEST_AUDIO_SECONDS = 3600;
25
+ var FFMPEG_TIMEOUT_MS = 12e4;
26
+ var FFMPEG_FORMATS = "mov,mp4,m4a,3gp,3g2,mj2,aac,mp3,wav,amr,caf,aiff,flac,ogg,matroska,webm,asf";
27
+ var text = /* @__PURE__ */ __name((bytes, from, length) => String.fromCharCode(...bytes.subarray(from, from + length)), "text");
28
+ var contains = /* @__PURE__ */ __name((bytes, needle, within) => Buffer.from(bytes.buffer, bytes.byteOffset, Math.min(bytes.length, within)).includes(needle, 0, "latin1"), "contains");
29
+ var formatOf = /* @__PURE__ */ __name((bytes) => {
30
+ if (text(bytes, 0, 4) === "OggS") {
31
+ if (contains(bytes, "OpusHead", 128))
32
+ return "opus";
33
+ if (contains(bytes, "vorbis", 128))
34
+ return "vorbis";
35
+ return "other";
36
+ }
37
+ if (text(bytes, 0, 4) === "fLaC")
38
+ return "flac";
39
+ const frame = bytes[0] === 255 && ((bytes[1] ?? 0) & 224) === 224 && ((bytes[1] ?? 0) >> 1 & 3) !== 0;
40
+ if (text(bytes, 0, 3) === "ID3" || frame)
41
+ return "mp3";
42
+ return "other";
43
+ }, "formatOf");
44
+ var everyChannel = /* @__PURE__ */ __name((decoded) => {
45
+ if (!decoded.channelData[0] || decoded.samplesDecoded === 0)
46
+ throw new CliError("validation_error", "no audio in that file");
47
+ return decoded.channelData.map((samples) => ({ samples, rate: decoded.sampleRate }));
48
+ }, "everyChannel");
49
+ var load = /* @__PURE__ */ __name((name) => importFrom(new URL("speech/decode.js", import.meta.resolve("@wirecat/cli-core")).href, pathToFileURL(createRequire(new URL("speech/decode.js", import.meta.resolve("@wirecat/cli-core")).href).resolve(name)).href), "load");
50
+ var decodeVorbis = /* @__PURE__ */ __name(async (bytes) => {
51
+ const { OggVorbisDecoder } = await load("@wasm-audio-decoders/ogg-vorbis");
52
+ const decoder = new OggVorbisDecoder();
53
+ await decoder.ready;
54
+ try {
55
+ return everyChannel(await decoder.decodeFile(bytes));
56
+ } finally {
57
+ decoder.free();
58
+ }
59
+ }, "decodeVorbis");
60
+ var decodeFlac = /* @__PURE__ */ __name(async (bytes) => {
61
+ const { FLACDecoder } = await load("@wasm-audio-decoders/flac");
62
+ const decoder = new FLACDecoder();
63
+ await decoder.ready;
64
+ try {
65
+ return everyChannel(await decoder.decodeFile(bytes));
66
+ } finally {
67
+ decoder.free();
68
+ }
69
+ }, "decodeFlac");
70
+ var decodeMp3 = /* @__PURE__ */ __name(async (bytes) => {
71
+ const { MPEGDecoder } = await load("mpg123-decoder");
72
+ const decoder = new MPEGDecoder();
73
+ await decoder.ready;
74
+ try {
75
+ return everyChannel(decoder.decode(bytes));
76
+ } finally {
77
+ decoder.free();
78
+ }
79
+ }, "decodeMp3");
80
+ var tooLongError = /* @__PURE__ */ __name(() => new CliError("validation_error", `the audio is longer than ${LONGEST_AUDIO_SECONDS / 60} minutes`), "tooLongError");
81
+ var FLOAT = 3;
82
+ var LONGEST_HEADER = 64 * 1024;
83
+ var EXTENSIBLE = 65534;
84
+ var wavStream = /* @__PURE__ */ __name((most) => {
85
+ let head = Buffer.alloc(0);
86
+ let channels = 0;
87
+ let rate = 0;
88
+ let rest = Buffer.alloc(0);
89
+ let length = 0;
90
+ let parts = [];
91
+ const header = /* @__PURE__ */ __name(() => {
92
+ if (head.length < 12)
93
+ return false;
94
+ if (head.toString("latin1", 0, 4) !== "RIFF" || head.toString("latin1", 8, 12) !== "WAVE")
95
+ throw new CliError("validation_error", "ffmpeg did not answer with WAV audio");
96
+ for (let at = 12; at + 8 <= head.length; ) {
97
+ const id = head.toString("latin1", at, at + 4);
98
+ const size = head.readUInt32LE(at + 4);
99
+ if (id === "data") {
100
+ rest = head.subarray(at + 8);
101
+ head = Buffer.alloc(0);
102
+ return true;
103
+ }
104
+ if (at + 8 + size > head.length)
105
+ return false;
106
+ if (id === "fmt ") {
107
+ const tag = head.readUInt16LE(at + 8);
108
+ channels = head.readUInt16LE(at + 10);
109
+ rate = head.readUInt32LE(at + 12);
110
+ if (tag !== FLOAT && tag !== EXTENSIBLE || head.readUInt16LE(at + 22) !== 32 || channels < 1)
111
+ throw new CliError("validation_error", "ffmpeg did not answer with 32-bit float samples");
112
+ parts = Array.from({ length: channels }, () => []);
113
+ }
114
+ at += 8 + size + size % 2;
115
+ }
116
+ return false;
117
+ }, "header");
118
+ return {
119
+ push: /* @__PURE__ */ __name((chunk) => {
120
+ if (channels === 0 || head.length > 0) {
121
+ head = Buffer.concat([head, chunk]);
122
+ if (head.length > LONGEST_HEADER)
123
+ throw new CliError("validation_error", "ffmpeg's WAV header never ended");
124
+ if (!header())
125
+ return true;
126
+ chunk = Buffer.alloc(0);
127
+ }
128
+ const bytes = rest.length ? Buffer.concat([rest, chunk]) : chunk;
129
+ const frame = channels * 4;
130
+ const frames = Math.floor(bytes.length / frame);
131
+ rest = Buffer.from(bytes.subarray(frames * frame));
132
+ if (frames === 0)
133
+ return length <= most;
134
+ const view = new DataView(bytes.buffer, bytes.byteOffset, frames * frame);
135
+ for (let channel = 0; channel < channels; channel++) {
136
+ const samples = new Float32Array(frames);
137
+ for (let index = 0; index < frames; index++)
138
+ samples[index] = view.getFloat32(index * frame + channel * 4, true);
139
+ parts[channel]?.push(samples);
140
+ }
141
+ length += frames;
142
+ return length <= most;
143
+ }, "push"),
144
+ end: /* @__PURE__ */ __name(() => {
145
+ if (channels === 0)
146
+ throw new CliError("validation_error", "no audio in that file");
147
+ return parts.map((pieces, channel) => {
148
+ const samples = new Float32Array(length);
149
+ let at = 0;
150
+ for (const piece of pieces) {
151
+ samples.set(piece, at);
152
+ at += piece.length;
153
+ }
154
+ parts[channel] = [];
155
+ return { samples, rate };
156
+ });
157
+ }, "end")
158
+ };
159
+ }, "wavStream");
160
+ var runFfmpegFile = /* @__PURE__ */ __name((path) => new Promise((resolve, reject) => {
161
+ const child = spawn("ffmpeg", [
162
+ "-nostdin",
163
+ "-hide_banner",
164
+ "-loglevel",
165
+ "error",
166
+ "-protocol_whitelist",
167
+ "file",
168
+ "-format_whitelist",
169
+ FFMPEG_FORMATS,
170
+ "-i",
171
+ path,
172
+ "-vn",
173
+ "-af",
174
+ "aformat=channel_layouts=mono|stereo",
175
+ "-ar",
176
+ String(SAMPLE_RATE),
177
+ "-c:a",
178
+ "pcm_f32le",
179
+ "-bitexact",
180
+ "-f",
181
+ "wav",
182
+ "pipe:1"
183
+ ], { stdio: ["ignore", "pipe", "pipe"], timeout: FFMPEG_TIMEOUT_MS });
184
+ const wav = wavStream(LONGEST_AUDIO_SECONDS * SAMPLE_RATE);
185
+ let long = false;
186
+ let broken;
187
+ let errors = "";
188
+ child.stdout.on("data", (chunk) => {
189
+ if (long || broken)
190
+ return;
191
+ try {
192
+ long = !wav.push(chunk);
193
+ } catch (error) {
194
+ broken = error;
195
+ }
196
+ if (long || broken)
197
+ child.kill();
198
+ });
199
+ child.stderr.on("data", (chunk) => {
200
+ errors = (errors + chunk.toString()).slice(-500);
201
+ });
202
+ child.on("error", (error) => reject(error.code === "ENOENT" ? new CliError("validation_error", "only ffmpeg reads this audio format, and ffmpeg is not installed") : error));
203
+ child.on("close", (code) => {
204
+ if (long)
205
+ return reject(tooLongError());
206
+ if (broken)
207
+ return reject(broken);
208
+ if (code !== 0)
209
+ return reject(new CliError("validation_error", `ffmpeg could not read the audio: ${errors.trim() || code}`));
210
+ try {
211
+ resolve(wav.end());
212
+ } catch (error) {
213
+ reject(error);
214
+ }
215
+ });
216
+ }), "runFfmpegFile");
217
+ var runFfmpeg = /* @__PURE__ */ __name(async (bytes) => {
218
+ const directory = await mkdtemp(join(tmpdir(), "wirecat-audio-"));
219
+ try {
220
+ const input = join(directory, "audio");
221
+ await writeFile(input, bytes, { mode: 384 });
222
+ return await runFfmpegFile(input);
223
+ } finally {
224
+ await rm(directory, { recursive: true, force: true });
225
+ }
226
+ }, "runFfmpeg");
227
+ var BUNDLED = {
228
+ opus: decodeOgg,
229
+ vorbis: decodeVorbis,
230
+ flac: decodeFlac,
231
+ mp3: decodeMp3
232
+ };
233
+ var tooLong = /* @__PURE__ */ __name((pcm) => pcm.samples.length / pcm.rate > LONGEST_AUDIO_SECONDS, "tooLong");
234
+ var fromFfmpeg = /* @__PURE__ */ __name((answer) => Array.isArray(answer) ? { channels: answer, mixed: false } : { channels: [answer], mixed: true }, "fromFfmpeg");
235
+ var decodeChannels = /* @__PURE__ */ __name(async (bytes, ffmpeg = runFfmpeg) => {
236
+ const format = formatOf(bytes);
237
+ const decoded = format === "other" ? fromFfmpeg(await ffmpeg(bytes)) : await BUNDLED[format](bytes).then((channels) => ({ channels, mixed: false }), (error) => ffmpeg(bytes).then(fromFfmpeg, () => {
238
+ throw error;
239
+ }));
240
+ if (decoded.channels.length === 0)
241
+ throw new CliError("validation_error", "no audio in that file");
242
+ if (decoded.channels.some(tooLong))
243
+ throw tooLongError();
244
+ return decoded;
245
+ }, "decodeChannels");
246
+ var decodeChannelsFile = /* @__PURE__ */ __name(async (path, { maxBytes = 64 * 1024 * 1024, ffmpegFile = runFfmpegFile } = {}) => {
247
+ const file = await open(path, "r");
248
+ let start;
249
+ let size;
250
+ try {
251
+ size = (await file.stat()).size;
252
+ const head = Buffer.alloc(Math.min(size, 128));
253
+ await file.read(head, 0, head.length, 0);
254
+ start = head;
255
+ } finally {
256
+ await file.close();
257
+ }
258
+ if (formatOf(start) === "other") {
259
+ const channels = await ffmpegFile(path);
260
+ if (channels.some(tooLong))
261
+ throw tooLongError();
262
+ return { channels, mixed: false };
263
+ }
264
+ if (size > maxBytes)
265
+ throw new CliError("validation_error", `the audio file is larger than ${Math.round(maxBytes / 1024 / 1024)} MB`, {
266
+ reason: "file.too-large"
267
+ });
268
+ return decodeChannels(new Uint8Array(await readFile(path)), () => ffmpegFile(path));
269
+ }, "decodeChannelsFile");
270
+ var mixDown = /* @__PURE__ */ __name((channels) => {
271
+ const [first] = channels;
272
+ if (!first)
273
+ throw new CliError("validation_error", "no audio in that file");
274
+ if (channels.length === 1)
275
+ return first;
276
+ const length = channels.reduce((longest, { samples: samples2 }) => Math.max(longest, samples2.length), 0);
277
+ const samples = new Float32Array(length);
278
+ for (const channel of channels)
279
+ for (let index = 0; index < channel.samples.length; index++)
280
+ samples[index] = (samples[index] ?? 0) + (channel.samples[index] ?? 0) / channels.length;
281
+ return { samples, rate: first.rate };
282
+ }, "mixDown");
283
+ var decodeAudio = /* @__PURE__ */ __name(async (bytes, ffmpeg = runFfmpeg) => mixDown((await decodeChannels(bytes, ffmpeg)).channels), "decodeAudio");
284
+
285
+ export {
286
+ LONGEST_AUDIO_SECONDS,
287
+ formatOf,
288
+ wavStream,
289
+ runFfmpegFile,
290
+ runFfmpeg,
291
+ decodeChannels,
292
+ decodeChannelsFile,
293
+ mixDown,
294
+ decodeAudio
295
+ };
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/runs/secrets.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/runs/secrets.js
8
8
  var SECRET_WORDS = /* @__PURE__ */ new Set([
9
9
  "authorization",
10
10
  "cookie",
@@ -1,8 +1,13 @@
1
1
  import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ QUERY_LIMITS,
5
+ exhausted,
6
+ searchError
7
+ } from "./chunk-7DTU7QZP.js";
3
8
  import {
4
9
  fold
5
- } from "./chunk-4YNUQGDP.js";
10
+ } from "./chunk-A6LK2W5J.js";
6
11
  import {
7
12
  CATALOG_KINDS,
8
13
  CONTRACT_KINDS,
@@ -21,27 +26,22 @@ import {
21
26
  parseReference,
22
27
  providerLabel,
23
28
  providerNamed
24
- } from "./chunk-IMDTC4MD.js";
29
+ } from "./chunk-QUGESVOE.js";
25
30
  import {
26
31
  holdsCredential,
27
32
  secretNamed
28
- } from "./chunk-VUPWDCYV.js";
33
+ } from "./chunk-PO4RZ4XZ.js";
29
34
  import {
30
- QUERY_LIMITS,
31
- queryError
32
- } from "./chunk-3HTJBGNP.js";
33
- import {
34
- CliError,
35
- isCliError
36
- } from "./chunk-EA2OB75T.js";
35
+ CliError
36
+ } from "./chunk-4QNW4NK6.js";
37
37
  import {
38
38
  singleLine
39
- } from "./chunk-HCZYJMBP.js";
39
+ } from "./chunk-KYKW2W6X.js";
40
40
  import {
41
41
  __name
42
42
  } from "./chunk-ZVVMGPBJ.js";
43
43
 
44
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/record-fields.js
44
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/domain/record-fields.js
45
45
  var DECIMAL_PATTERN = "^[0-9]{1,16}(\\.[0-9]{1,6})?$";
46
46
  var SIGNED_DECIMAL = "^-?[0-9]{1,16}(\\.[0-9]{1,6})?$";
47
47
  var DAY = "^[0-9]{4}-[0-9]{2}-[0-9]{2}$";
@@ -160,7 +160,7 @@ var fieldError = /* @__PURE__ */ __name((schema, value, at = []) => {
160
160
  return void 0;
161
161
  }, "fieldError");
162
162
 
163
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/record-types.js
163
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/domain/record-types.js
164
164
  var kept = /* @__PURE__ */ __name((description) => ({ description }), "kept");
165
165
  var PARTY = ["person", "organization"];
166
166
  var ORGANIZATION = ["organization"];
@@ -555,7 +555,7 @@ var hasV1Roles = /* @__PURE__ */ __name((type) => rolesOf(type).some(([, role])
555
555
  var IDENTITY_TYPES = RECORD_ENTITY_TYPES.filter((type) => RECORD_TYPES[type].review === "identity");
556
556
  var article = /* @__PURE__ */ __name((word) => /^[aeiou]/.test(word) ? "an" : "a", "article");
557
557
 
558
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/addresses.js
558
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/domain/addresses.js
559
559
  var EMAIL_ADDRESS = /^[^\s@]+@[^\s@]+\.[^\s@]+$/u;
560
560
  var isEmailAddress = /* @__PURE__ */ __name((value) => EMAIL_ADDRESS.test(value), "isEmailAddress");
561
561
  var ROLE_ADDRESS_WORDS = {
@@ -617,7 +617,7 @@ var PERSON_LIKE = /* @__PURE__ */ new Set(["hr"]);
617
617
  var isPersonLikeRoleAddress = /* @__PURE__ */ __name((address) => PERSON_LIKE.has(localWord(address)), "isPersonLikeRoleAddress");
618
618
  var isNoReplyAddress = /* @__PURE__ */ __name((address) => NO_REPLY.has(localWord(address)), "isNoReplyAddress");
619
619
 
620
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
620
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
621
621
  var PHONE_PLANS = [
622
622
  {
623
623
  country: "us",
@@ -997,7 +997,7 @@ var PHONE_PLANS = [
997
997
  }
998
998
  ];
999
999
 
1000
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/phones.js
1000
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/domain/phones.js
1001
1001
  var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
1002
1002
  var DEFAULT_PHONE_COUNTRIES = ["ru"];
1003
1003
  var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
@@ -1072,52 +1072,7 @@ var storedPhone = /* @__PURE__ */ __name((raw, provider) => {
1072
1072
  return found ? `+${found[1]}` : void 0;
1073
1073
  }, "storedPhone");
1074
1074
 
1075
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
1076
- var QUERY_VERSION = 1;
1077
- var QUERY_LIMITS2 = {
1078
- ...QUERY_LIMITS,
1079
- pattern: 1024,
1080
- states: 1e4,
1081
- expansions: 1e4,
1082
- candidates: 5e4,
1083
- bodyBytes: 8388608,
1084
- milliseconds: 2e3,
1085
- work: 1e7
1086
- };
1087
- var SEARCH_QUERY = {
1088
- command: "search",
1089
- guide: "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md"
1090
- };
1091
- var MESSAGE_PARSING = { ...SEARCH_QUERY, proximity: true };
1092
- var MOST_WORDS_APART = 50;
1093
- function searchError(reason, span, alternative) {
1094
- queryError(reason, span, alternative, SEARCH_QUERY);
1095
- }
1096
- __name(searchError, "searchError");
1097
- var ANSWER_MS = 1e3;
1098
- var searchTimeLimit = /* @__PURE__ */ __name((deadline, now = Date.now()) => deadline?.explicit ? Math.max(QUERY_LIMITS2.milliseconds, deadline.endsAt - now - ANSWER_MS) : void 0, "searchTimeLimit");
1099
- function outOfTime(limitMs = QUERY_LIMITS2.milliseconds) {
1100
- throw new CliError("timeout", `search stopped at its time limit of ${limitMs / 1e3}s \u2014 the query is valid; add chat: or date: to search less of the store`, { reason: "query.time-limit", budget: "time", limit_ms: limitMs, complete: false });
1101
- }
1102
- __name(outOfTime, "outOfTime");
1103
- var isQueryLimit = /* @__PURE__ */ __name((error) => isCliError(error) && (error.details.reason === "query.too-large" || error.details.reason === "query.time-limit"), "isQueryLimit");
1104
- function exhausted(budget) {
1105
- throw new CliError("validation_error", `search exceeded its ${budget} budget \u2014 narrow the chat or date range`, {
1106
- reason: "query.too-large",
1107
- budget,
1108
- complete: false
1109
- });
1110
- }
1111
- __name(exhausted, "exhausted");
1112
- function tooWideTerm([term], budget) {
1113
- if (term === void 0)
1114
- exhausted(budget);
1115
- const part = term.replace(/[*?]+/gu, " ").trim().split(/\s+/u).sort((a, b) => b.length - a.length)[0] ?? term;
1116
- throw new CliError("validation_error", `search exceeded its ${budget} budget: ${term} is checked word by word, and too many messages hold it \u2014 write *${part}* (any word holding it, read from the index), more of the word, or add chat: or date:`, { reason: "query.too-large", budget, term, complete: false });
1117
- }
1118
- __name(tooWideTerm, "tooWideTerm");
1119
-
1120
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/ref-arguments.js
1075
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/domain/ref-arguments.js
1121
1076
  var TAKES = {
1122
1077
  chat: "a chat: chat:<provider>/<account>/<chat>, its id or its title",
1123
1078
  message: "a message: msg:<provider>/<account>/<chat>/<message>, or a chat and the message's id"
@@ -1177,7 +1132,7 @@ var ensureAccount = /* @__PURE__ */ __name(async (reference, scope, profilesOn)
1177
1132
  throw wrongAccount(reference, scope, profiles);
1178
1133
  }, "ensureAccount");
1179
1134
 
1180
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
1135
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
1181
1136
  var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
1182
1137
  var literal = /* @__PURE__ */ __name((c) => ({
1183
1138
  kind: "char",
@@ -1185,10 +1140,10 @@ var literal = /* @__PURE__ */ __name((c) => ({
1185
1140
  negate: false
1186
1141
  }), "literal");
1187
1142
  var compileAutomaton = /* @__PURE__ */ __name((pattern, span = { start: 0, end: pattern.length }) => {
1188
- if (pattern.length > QUERY_LIMITS2.pattern * 2)
1143
+ if (pattern.length > QUERY_LIMITS.pattern * 2)
1189
1144
  exhausted("pattern");
1190
1145
  const chars = [...pattern];
1191
- if (chars.length > QUERY_LIMITS2.pattern)
1146
+ if (chars.length > QUERY_LIMITS.pattern)
1192
1147
  exhausted("pattern");
1193
1148
  let at = 0, depth = 0;
1194
1149
  const failure = /* @__PURE__ */ __name(() => searchError("query.invalid-regex", span, "use the supported Lucene regex subset"), "failure");
@@ -1231,7 +1186,7 @@ var compileAutomaton = /* @__PURE__ */ __name((pattern, span = { start: 0, end:
1231
1186
  return character();
1232
1187
  }, "escaped");
1233
1188
  const union = /* @__PURE__ */ __name(() => {
1234
- if (++depth > QUERY_LIMITS2.depth)
1189
+ if (++depth > QUERY_LIMITS.depth)
1235
1190
  exhausted("pattern depth");
1236
1191
  const children = [concat()];
1237
1192
  while (chars[at] === "|") {
@@ -1273,7 +1228,7 @@ var compileAutomaton = /* @__PURE__ */ __name((pattern, span = { start: 0, end:
1273
1228
  if (character() !== "}" || max !== null && max < min)
1274
1229
  return failure();
1275
1230
  }
1276
- if (min > QUERY_LIMITS2.states || max !== null && max > QUERY_LIMITS2.states)
1231
+ if (min > QUERY_LIMITS.states || max !== null && max > QUERY_LIMITS.states)
1277
1232
  exhausted("automaton states");
1278
1233
  child = { kind: "repeat", child, min, max };
1279
1234
  }
@@ -1353,7 +1308,7 @@ var compileAutomaton = /* @__PURE__ */ __name((pattern, span = { start: 0, end:
1353
1308
  return failure();
1354
1309
  const states = [];
1355
1310
  const state = /* @__PURE__ */ __name(() => {
1356
- if (states.length >= QUERY_LIMITS2.states)
1311
+ if (states.length >= QUERY_LIMITS.states)
1357
1312
  exhausted("automaton states");
1358
1313
  states.push({ epsilon: [], edges: [] });
1359
1314
  return states.length - 1;
@@ -1417,7 +1372,7 @@ var compileAutomaton = /* @__PURE__ */ __name((pattern, span = { start: 0, end:
1417
1372
  states: states.length,
1418
1373
  test: /* @__PURE__ */ __name((text2, budget = { work: 0 }) => {
1419
1374
  const spend = /* @__PURE__ */ __name(() => {
1420
- if (++budget.work > (budget.maxWork ?? QUERY_LIMITS2.work))
1375
+ if (++budget.work > (budget.maxWork ?? QUERY_LIMITS.work))
1421
1376
  exhausted("automaton work");
1422
1377
  }, "spend");
1423
1378
  const closure = /* @__PURE__ */ __name((initial) => {
@@ -1577,7 +1532,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
1577
1532
  return out;
1578
1533
  }, "foldRegex");
1579
1534
 
1580
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/search/trigrams.js
1535
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/search/trigrams.js
1581
1536
  var trigrams = /* @__PURE__ */ __name((term) => {
1582
1537
  const padded = ` ${term} `;
1583
1538
  const pieces = /* @__PURE__ */ new Set();
@@ -1586,7 +1541,7 @@ var trigrams = /* @__PURE__ */ __name((term) => {
1586
1541
  return [...pieces];
1587
1542
  }, "trigrams");
1588
1543
 
1589
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/resolve.js
1544
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/resolve.js
1590
1545
  var isId = /* @__PURE__ */ __name((reference) => /^-?\d+$/.test(reference.trim()), "isId");
1591
1546
  var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase().replaceAll("\u0451", "\u0435"), "foldName");
1592
1547
  var pickChat = /* @__PURE__ */ __name((reference, chats) => {
@@ -1657,7 +1612,7 @@ ${lines}`, { candidates });
1657
1612
  }, "ambiguous");
1658
1613
  var isPresent = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isPresent");
1659
1614
 
1660
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/display-names.js
1615
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/domain/display-names.js
1661
1616
  var QUOTES = [
1662
1617
  ['"', '"'],
1663
1618
  ["'", "'"],
@@ -1715,7 +1670,7 @@ var nameKey = /* @__PURE__ */ __name((name) => {
1715
1670
  }, "nameKey");
1716
1671
  var isReadable = /* @__PURE__ */ __name((shown) => shown !== null && READABLE.test(shown), "isReadable");
1717
1672
 
1718
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/counters.js
1673
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/domain/counters.js
1719
1674
  var COUNTER_FIELDS = ["views", "reactions", "comments"];
1720
1675
  var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
1721
1676
  var counterValue = /* @__PURE__ */ __name((message, field) => {
@@ -1752,7 +1707,7 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
1752
1707
  return states.some((one) => one.freshness === "stale") ? "stale" : "fresh";
1753
1708
  }, "counterFreshness");
1754
1709
 
1755
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
1710
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
1756
1711
  var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
1757
1712
  var AUTHOR_MEASURES = [
1758
1713
  "messages",
@@ -1892,7 +1847,7 @@ var withoutUrls = /* @__PURE__ */ __name((text2) => text2.replace(/\S+/gu, (toke
1892
1847
  var rankingWords = /* @__PURE__ */ __name((text2) => withoutUrls(text2).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
1893
1848
  var rankingQuestion = /* @__PURE__ */ __name((text2) => withoutUrls(text2).includes("?"), "rankingQuestion");
1894
1849
 
1895
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/records.js
1850
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/domain/records.js
1896
1851
  import { createHash } from "node:crypto";
1897
1852
  var RECORDS_SCHEMA_VERSION = 1;
1898
1853
  var RECORD_OPERATIONS = ["upsert", "delete"];
@@ -2245,7 +2200,7 @@ var fieldReferences = /* @__PURE__ */ __name((record, options = {}) => {
2245
2200
  return found;
2246
2201
  }, "fieldReferences");
2247
2202
 
2248
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/relation-role-labels.js
2203
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/domain/relation-role-labels.js
2249
2204
  var label = /* @__PURE__ */ __name((en, ru, es) => ({ en, ru, es }), "label");
2250
2205
  var ROLE_LABELS = {
2251
2206
  organization: {
@@ -2318,17 +2273,6 @@ export {
2318
2273
  isMobilePhone,
2319
2274
  BARE_INTERNATIONAL_PROVIDERS,
2320
2275
  storedPhone,
2321
- QUERY_VERSION,
2322
- QUERY_LIMITS2 as QUERY_LIMITS,
2323
- SEARCH_QUERY,
2324
- MESSAGE_PARSING,
2325
- MOST_WORDS_APART,
2326
- searchError,
2327
- searchTimeLimit,
2328
- outOfTime,
2329
- isQueryLimit,
2330
- exhausted,
2331
- tooWideTerm,
2332
2276
  compileAutomaton,
2333
2277
  wildcardPattern,
2334
2278
  foldRegex,