@wirecat/zoom-cli 0.71.0 → 0.72.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 (156) hide show
  1. package/dist/answers.d.ts +56 -0
  2. package/dist/answers.d.ts.map +1 -1
  3. package/dist/bin/zm.js +2 -2
  4. package/dist/bundle/{all-profiles-O4YNVPZX.js → all-profiles-XFIPF4GF.js} +12 -12
  5. package/dist/bundle/answer-policy-AT6CDEE5.js +110 -0
  6. package/dist/bundle/{anthropic-7GGRX3RX.js → anthropic-SSUBR3BC.js} +18 -11
  7. package/dist/bundle/{app-server-CPMKM3HI.js → app-server-7DJHHF2F.js} +68 -56
  8. package/dist/bundle/{bun-POHZKEPV.js → bun-6HBYWQIX.js} +2 -2
  9. package/dist/bundle/{bun-sqlite-PGYMBPEL.js → bun-sqlite-4L3Q55NB.js} +10 -6
  10. package/dist/bundle/{chunk-Q2SUFGSH.js → chunk-23J2ANZ7.js} +2 -2
  11. package/dist/bundle/{chunk-FSHCAWZS.js → chunk-24OFZNRC.js} +13119 -10386
  12. package/dist/bundle/{chunk-LE7MDAQG.js → chunk-2MIBRVSV.js} +2 -2
  13. package/dist/bundle/{chunk-DIQLXAAZ.js → chunk-37NF5CBJ.js} +4 -4
  14. package/dist/bundle/chunk-3KRTEX5M.js +53 -0
  15. package/dist/bundle/{chunk-IED3NS7G.js → chunk-4SY67IUA.js} +30 -30
  16. package/dist/bundle/{chunk-CKPCVEXU.js → chunk-4XQWF3U2.js} +6 -6
  17. package/dist/bundle/{chunk-CT4WVR4N.js → chunk-4YIGXTBP.js} +3 -3
  18. package/dist/bundle/{chunk-YPO2U2YB.js → chunk-5AELTC52.js} +388 -143
  19. package/dist/bundle/{chunk-USQ23X5V.js → chunk-5MGICK47.js} +750 -734
  20. package/dist/bundle/{chunk-DK6ICIGL.js → chunk-5X4IY5JH.js} +2025 -1302
  21. package/dist/bundle/{chunk-EOSVN2ER.js → chunk-63QXCE5Z.js} +242 -242
  22. package/dist/bundle/{chunk-OE7EIP5L.js → chunk-6DCLZLGX.js} +1 -1
  23. package/dist/bundle/chunk-7GLJSJ7M.js +16 -0
  24. package/dist/bundle/{chunk-X3ZDN3U7.js → chunk-7IFO43Q5.js} +2 -2
  25. package/dist/bundle/{chunk-YD2RYVMK.js → chunk-7JYMGXLI.js} +41 -39
  26. package/dist/bundle/{chunk-DSVZEXYJ.js → chunk-7OD3522V.js} +3541 -3346
  27. package/dist/bundle/{chunk-2FV5JUQU.js → chunk-7S4D5SM2.js} +41 -35
  28. package/dist/bundle/{chunk-VRH7VRTK.js → chunk-7SUWPMZG.js} +10 -15
  29. package/dist/bundle/{chunk-4QPQ7MDA.js → chunk-ADKMBXY4.js} +1 -1
  30. package/dist/bundle/{chunk-MRI6QMZ3.js → chunk-B3SILJBU.js} +18 -18
  31. package/dist/bundle/{chunk-7ROXXRGG.js → chunk-CANRIRNZ.js} +6678 -5185
  32. package/dist/bundle/{chunk-DRBQDCDU.js → chunk-CW46FWKW.js} +38 -123
  33. package/dist/bundle/{chunk-GXF5HFFP.js → chunk-D24OQAHM.js} +4 -4
  34. package/dist/bundle/{chunk-ZBKWRYRS.js → chunk-D5EUMWD5.js} +3 -3
  35. package/dist/bundle/{chunk-QVSLSWAL.js → chunk-DEPXZJ2V.js} +21 -150
  36. package/dist/bundle/{chunk-TM4JSVGQ.js → chunk-DOCVEKP2.js} +39 -44
  37. package/dist/bundle/{chunk-BBTQIVFP.js → chunk-EFF2XBHP.js} +2 -2
  38. package/dist/bundle/{chunk-XRFHQGOD.js → chunk-EG25AY4L.js} +1 -1
  39. package/dist/bundle/{chunk-FEM2JQN2.js → chunk-ELJUBPY4.js} +1 -1
  40. package/dist/bundle/{chunk-2U6SER67.js → chunk-ERJYJ36F.js} +2 -2
  41. package/dist/bundle/chunk-FSCPQQS5.js +244 -0
  42. package/dist/bundle/{chunk-P3XC6EDU.js → chunk-H53WFZBN.js} +11 -130
  43. package/dist/bundle/{chunk-RN4EHCC5.js → chunk-I7CUMZD6.js} +3 -3
  44. package/dist/bundle/{chunk-ALIT5QFT.js → chunk-IACWKZWS.js} +1 -1
  45. package/dist/bundle/{chunk-MW4EGDDV.js → chunk-IFBIXU6C.js} +2 -2
  46. package/dist/bundle/{chunk-5K7OGPGA.js → chunk-IU4DUUB3.js} +7 -7
  47. package/dist/bundle/{chunk-INVTDIF6.js → chunk-IXO4SCKE.js} +1 -1
  48. package/dist/bundle/{chunk-OHWMIUCT.js → chunk-JAEPK457.js} +244 -245
  49. package/dist/bundle/{chunk-HB6XJQ3Y.js → chunk-JFPUYQSP.js} +5 -5
  50. package/dist/bundle/{chunk-IAV5BG3I.js → chunk-JG4MNYG2.js} +1 -1
  51. package/dist/bundle/{chunk-ZBFL5JPT.js → chunk-JRCH4YZP.js} +16 -10
  52. package/dist/bundle/{chunk-M76MXMLY.js → chunk-JZ4XNNL7.js} +1 -1
  53. package/dist/bundle/chunk-K6HR6HCO.js +32 -0
  54. package/dist/bundle/{chunk-DHWBSXG3.js → chunk-KFZL67JP.js} +323 -55
  55. package/dist/bundle/{chunk-X4GWR6GO.js → chunk-KPIQXFNB.js} +375 -10
  56. package/dist/bundle/{chunk-OWEBWDHV.js → chunk-KWURWGGB.js} +80 -5
  57. package/dist/bundle/{chunk-Q5PI72CR.js → chunk-LA6QUVGQ.js} +3 -2
  58. package/dist/bundle/{chunk-5J4AMBMM.js → chunk-LLUNHAZ7.js} +4 -4
  59. package/dist/bundle/{chunk-2RUAMDVV.js → chunk-LTWJM3ED.js} +17 -17
  60. package/dist/bundle/{chunk-2U27KIKU.js → chunk-M3DMXDX6.js} +6 -6
  61. package/dist/bundle/{chunk-VW6BF6M7.js → chunk-MCPOZNWG.js} +1 -1
  62. package/dist/bundle/{chunk-CRFOGYDG.js → chunk-MSQHSW4C.js} +2 -2
  63. package/dist/bundle/chunk-N4QNYWWG.js +71 -0
  64. package/dist/bundle/chunk-NMZQTYKJ.js +18 -0
  65. package/dist/bundle/{chunk-2KESWII5.js → chunk-OHCLQJOV.js} +3 -3
  66. package/dist/bundle/{chunk-4QUFFB2U.js → chunk-OP5PGE2N.js} +4 -4
  67. package/dist/bundle/{chunk-Q3XLZIY3.js → chunk-OY6N2ABP.js} +29 -23
  68. package/dist/bundle/chunk-PJWSGXOB.js +185 -0
  69. package/dist/bundle/{chunk-633QXP57.js → chunk-QA6KIL7Q.js} +10 -8
  70. package/dist/bundle/{chunk-N2FNMION.js → chunk-QQUY4MZY.js} +1 -1
  71. package/dist/bundle/{chunk-X277FBTF.js → chunk-QW7YTRV2.js} +3 -3
  72. package/dist/bundle/chunk-RJTGENHZ.js +109 -0
  73. package/dist/bundle/{chunk-ULDXZ6LH.js → chunk-RLCVPECY.js} +63 -63
  74. package/dist/bundle/{chunk-BGTEVIW4.js → chunk-RN5SU2RN.js} +6 -6
  75. package/dist/bundle/{chunk-P3ASN72F.js → chunk-RX5CJ55S.js} +1 -1
  76. package/dist/bundle/{chunk-7QC4M4HS.js → chunk-RZUJMAMK.js} +4 -4
  77. package/dist/bundle/{chunk-OORMSM6O.js → chunk-S7SXSHRC.js} +21 -21
  78. package/dist/bundle/{chunk-GGS6D4W4.js → chunk-SXZGCD6E.js} +3 -3
  79. package/dist/bundle/{chunk-64ZHF6PJ.js → chunk-T27IMG6X.js} +3 -1
  80. package/dist/bundle/{chunk-VJXHIUFP.js → chunk-TF2WKPNW.js} +15 -15
  81. package/dist/bundle/{chunk-QTHIU7CO.js → chunk-U32VL3MA.js} +1 -1
  82. package/dist/bundle/{chunk-RQG5VOGH.js → chunk-U3NJBGLA.js} +3 -3
  83. package/dist/bundle/{chunk-WOIHSQAL.js → chunk-UVZLK3M4.js} +33 -9
  84. package/dist/bundle/{chunk-XI3VIQKW.js → chunk-VIV64MQM.js} +560 -537
  85. package/dist/bundle/{chunk-CFQF6IGY.js → chunk-W3YTVEWV.js} +69 -6
  86. package/dist/bundle/{chunk-54YDWBYG.js → chunk-WLVG4RBZ.js} +1 -1
  87. package/dist/bundle/{chunk-77TCCHMP.js → chunk-WOAYHCM2.js} +1 -1
  88. package/dist/bundle/{chunk-5LJTU4LY.js → chunk-WXTYYWZI.js} +13 -13
  89. package/dist/bundle/{chunk-MEED7YFG.js → chunk-WZGKHTA4.js} +2 -2
  90. package/dist/bundle/{chunk-I4DFFR7F.js → chunk-X2MP634F.js} +14 -5
  91. package/dist/bundle/{chunk-RGJ7OWHU.js → chunk-XPWZSW6Y.js} +61 -21
  92. package/dist/bundle/{chunk-SELXER2Q.js → chunk-YVVJ6Y5C.js} +7 -7
  93. package/dist/bundle/{chunk-4LAQDZXU.js → chunk-ZHA56THL.js} +790 -70
  94. package/dist/bundle/{chunk-ZVI6TFQR.js → chunk-ZVFYGTGJ.js} +17 -17
  95. package/dist/bundle/{chunk-GL3MYFMX.js → chunk-ZW5KHKMA.js} +5 -5
  96. package/dist/bundle/{cli-KHMEUXNG.js → cli-IYYI7GAM.js} +158 -96
  97. package/dist/bundle/command-contract-TX7NSUBM.js +42 -0
  98. package/dist/bundle/command-server-entry-FXX4LJWF.js +171 -0
  99. package/dist/bundle/config-YKNM33J7.js +96 -0
  100. package/dist/bundle/{decode-7RP4HSVE.js → decode-SRGOOGBW.js} +6 -6
  101. package/dist/bundle/{dispatch-IZCAK47P.js → dispatch-OUHRPFUL.js} +11 -11
  102. package/dist/bundle/{dist-BFT2SUBV.js → dist-UZLNLAIO.js} +52 -31
  103. package/dist/bundle/{echarts-T2BSQ2YV.js → echarts-7CM2MCMW.js} +2 -2
  104. package/dist/bundle/{embed-BAS6YPDT.js → embed-VEE56BOB.js} +7 -7
  105. package/dist/bundle/{embedder-5XD5FCAO.js → embedder-SZFYR543.js} +10 -10
  106. package/dist/bundle/{failure-R2OIHCE5.js → failure-MZBNM7M5.js} +3 -3
  107. package/dist/bundle/first-run-KWC7RKF2.js +29 -0
  108. package/dist/bundle/first-screen-DWKMNSEI.js +40 -0
  109. package/dist/bundle/{folders-ZXTOFY4T.js → folders-UQXRSDJJ.js} +5 -5
  110. package/dist/bundle/{instructions-XZPROPKY.js → instructions-R7OHVAWH.js} +1 -1
  111. package/dist/bundle/{main-TZXKGL3L.js → main-EFUN2O3K.js} +21 -20
  112. package/dist/bundle/{mcp-M4QN2E7R.js → mcp-7KQUJNFN.js} +2 -2
  113. package/dist/bundle/{meetings-JB2ISPND.js → meetings-5I2BDNTA.js} +7 -7
  114. package/dist/bundle/{node-A3B3MJWX.js → node-3N2JGZ7V.js} +2 -2
  115. package/dist/bundle/{node-sqlite-QVWDLGDX.js → node-sqlite-2UVEE2WM.js} +11 -7
  116. package/dist/bundle/{oauth-YA6IYV4O.js → oauth-AYGD7UU3.js} +8 -8
  117. package/dist/bundle/{open-SY7TXJBS.js → open-3GUVDLGD.js} +6 -6
  118. package/dist/bundle/openai-NHCDLWWY.js +28 -0
  119. package/dist/bundle/{output-file-YGQYZCBJ.js → output-file-72JFXVHQ.js} +6 -6
  120. package/dist/bundle/{process-6HNBTJIY.js → process-YAHHUFR5.js} +1 -1
  121. package/dist/bundle/{program-77BUCJ4H.js → program-OSZROCTK.js} +97 -91
  122. package/dist/bundle/{prompt-YDG73YDS.js → prompt-HMCW4XQJ.js} +6 -6
  123. package/dist/bundle/{recognize-ECXDGTB7.js → recognize-VF5CA7EM.js} +5 -5
  124. package/dist/bundle/{remote-K4JHGBVJ.js → remote-5C6VTPR2.js} +10 -8
  125. package/dist/bundle/{rerank-IU2YYD4T.js → rerank-ER7NEDOI.js} +8 -8
  126. package/dist/bundle/run-log-JKTLKXSK.js +124 -0
  127. package/dist/bundle/{serve-3XWIF3HI.js → serve-QJWXJOM7.js} +10 -10
  128. package/dist/bundle/{server-56VYOHWP.js → server-KCIK3Y2P.js} +50 -48
  129. package/dist/bundle/server-LLGFDLLJ.js +75 -0
  130. package/dist/bundle/{services-X7IPEGQ5.js → services-LQMYJQG3.js} +62 -45
  131. package/dist/bundle/{speech-E2OBQWYA.js → speech-74GJQNQH.js} +20 -17
  132. package/dist/bundle/{state-4GMJYK4H.js → state-4XDGCHDF.js} +7 -7
  133. package/dist/bundle/{store-LA4TV4DM.js → store-5Y5HK2L2.js} +22 -19
  134. package/dist/bundle/{store-KPI7GB5Y.js → store-Y56AHJ2Y.js} +42 -27
  135. package/dist/bundle/store-connection-4WI32AYU.js +89 -0
  136. package/dist/bundle/store-maintenance-command-PCXO5AH4.js +65 -0
  137. package/dist/bundle/{streaming-EJ3NM2C2.js → streaming-E5CR6HSR.js} +7 -7
  138. package/dist/bundle/{tokens-BE6CJMR5.js → tokens-E2QNVC4F.js} +7 -7
  139. package/dist/bundle/zm.js +34 -10
  140. package/dist/bundle/{zoom-app-QEJBTIJ4.js → zoom-app-NVL7HEAX.js} +8 -8
  141. package/dist/version.d.ts +1 -1
  142. package/dist/version.js +1 -1
  143. package/package.json +3 -3
  144. package/dist/bundle/answer-policy-PPSPMCLH.js +0 -104
  145. package/dist/bundle/chunk-KMV7GZB6.js +0 -35
  146. package/dist/bundle/chunk-UG447QY2.js +0 -27
  147. package/dist/bundle/command-contract-4K6XXZYE.js +0 -41
  148. package/dist/bundle/config-EEDB632I.js +0 -90
  149. package/dist/bundle/first-run-23WWZ2PW.js +0 -28
  150. package/dist/bundle/first-screen-6HFUYVFR.js +0 -39
  151. package/dist/bundle/openai-2AU24NRN.js +0 -25
  152. package/dist/bundle/run-log-LFEXNZ74.js +0 -118
  153. package/dist/bundle/server-YSTMUZ22.js +0 -72
  154. package/dist/bundle/store-connection-AZTIF6IH.js +0 -83
  155. package/dist/bundle/store-maintenance-command-LR572PS4.js +0 -61
  156. /package/dist/bundle/{chunk-VOXIGICJ.js → chunk-YVNHQFLC.js} +0 -0
@@ -1,5 +1,8 @@
1
1
  import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ fold
5
+ } from "./chunk-7GLJSJ7M.js";
3
6
  import {
4
7
  CATALOG_KINDS,
5
8
  CONTRACT_KINDS,
@@ -13,20 +16,32 @@ import {
13
16
  ORDER_STATUSES,
14
17
  SUBSCRIPTION_STATUSES,
15
18
  TRANSACTION_STATUSES,
16
- WALLET_KINDS
17
- } from "./chunk-XI3VIQKW.js";
19
+ WALLET_KINDS,
20
+ looksLikeReference,
21
+ parseReference,
22
+ providerLabel,
23
+ providerNamed
24
+ } from "./chunk-VIV64MQM.js";
18
25
  import {
19
26
  holdsCredential,
20
27
  secretNamed
21
- } from "./chunk-QTHIU7CO.js";
28
+ } from "./chunk-U32VL3MA.js";
29
+ import {
30
+ QUERY_LIMITS,
31
+ queryError
32
+ } from "./chunk-63QXCE5Z.js";
33
+ import {
34
+ CliError,
35
+ isCliError
36
+ } from "./chunk-ELJUBPY4.js";
22
37
  import {
23
- CliError
24
- } from "./chunk-FEM2JQN2.js";
38
+ singleLine
39
+ } from "./chunk-6DCLZLGX.js";
25
40
  import {
26
41
  __name
27
42
  } from "./chunk-ZVVMGPBJ.js";
28
43
 
29
- // 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/record-fields.js
44
+ // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/domain/record-fields.js
30
45
  var DECIMAL_PATTERN = "^[0-9]{1,16}(\\.[0-9]{1,6})?$";
31
46
  var SIGNED_DECIMAL = "^-?[0-9]{1,16}(\\.[0-9]{1,6})?$";
32
47
  var DAY = "^[0-9]{4}-[0-9]{2}-[0-9]{2}$";
@@ -145,7 +160,7 @@ var fieldError = /* @__PURE__ */ __name((schema, value, at = []) => {
145
160
  return void 0;
146
161
  }, "fieldError");
147
162
 
148
- // 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/record-types.js
163
+ // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/domain/record-types.js
149
164
  var kept = /* @__PURE__ */ __name((description) => ({ description }), "kept");
150
165
  var PARTY = ["person", "organization"];
151
166
  var ORGANIZATION = ["organization"];
@@ -519,44 +534,7 @@ var hasV1Roles = /* @__PURE__ */ __name((type) => rolesOf(type).some(([, role])
519
534
  var IDENTITY_TYPES = RECORD_ENTITY_TYPES.filter((type) => RECORD_TYPES[type].review === "identity");
520
535
  var article = /* @__PURE__ */ __name((word) => /^[aeiou]/.test(word) ? "an" : "a", "article");
521
536
 
522
- // 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/counters.js
523
- var COUNTER_FIELDS = ["views", "reactions", "comments"];
524
- var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
525
- var counterValue = /* @__PURE__ */ __name((message, field) => {
526
- const value = field === "reactions" ? message.reactions?.total : message.providerMetadata?.[field];
527
- return validCounter(value) ? value : null;
528
- }, "counterValue");
529
- var counterObservationTime = /* @__PURE__ */ __name((observation, now) => {
530
- const at = Date.parse(observation.observedAt);
531
- if (!validCounter(observation.value) || !Number.isSafeInteger(at) || at < 0 || at > now || !["remote_fetch", "remote_update"].includes(observation.source))
532
- throw new CliError("validation_error", "counter observation needs a valid value, source and nonfuture observation time");
533
- if (observation.reactions && (!validCounter(observation.reactions.total) || observation.reactions.total !== observation.value))
534
- throw new CliError("validation_error", "reaction observation payload and total disagree");
535
- return at;
536
- }, "counterObservationTime");
537
- var observedCounters = /* @__PURE__ */ __name((message, observedAt, fields, source = "remote_fetch") => {
538
- const observations = {};
539
- for (const field of fields) {
540
- const value = counterValue(message, field);
541
- if (value !== null)
542
- observations[field] = {
543
- value,
544
- observedAt,
545
- source,
546
- ...field === "reactions" && message.reactions ? { reactions: message.reactions } : {}
547
- };
548
- }
549
- return { ...message, counterObservations: observations };
550
- }, "observedCounters");
551
- var counterFreshness = /* @__PURE__ */ __name((states) => {
552
- if (!states.length || states.every((one) => one.freshness === "unknown"))
553
- return "unknown";
554
- if (states.some((one) => one.freshness === "unknown"))
555
- return "partial";
556
- return states.some((one) => one.freshness === "stale") ? "stale" : "fresh";
557
- }, "counterFreshness");
558
-
559
- // 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/addresses.js
537
+ // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/domain/addresses.js
560
538
  var EMAIL_ADDRESS = /^[^\s@]+@[^\s@]+\.[^\s@]+$/u;
561
539
  var isEmailAddress = /* @__PURE__ */ __name((value) => EMAIL_ADDRESS.test(value), "isEmailAddress");
562
540
  var ROLE_ADDRESS_WORDS = {
@@ -614,9 +592,691 @@ var localWord = /* @__PURE__ */ __name((address) => {
614
592
  return bare(local.split("+")[0] ?? "");
615
593
  }, "localWord");
616
594
  var isRoleAddress = /* @__PURE__ */ __name((address) => ROLE.has(localWord(address)), "isRoleAddress");
595
+ var PERSON_LIKE = /* @__PURE__ */ new Set(["hr"]);
596
+ var isPersonLikeRoleAddress = /* @__PURE__ */ __name((address) => PERSON_LIKE.has(localWord(address)), "isPersonLikeRoleAddress");
617
597
  var isNoReplyAddress = /* @__PURE__ */ __name((address) => NO_REPLY.has(localWord(address)), "isNoReplyAddress");
618
598
 
619
- // 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/rankings-options.js
599
+ // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
600
+ var QUERY_VERSION = 1;
601
+ var QUERY_LIMITS2 = {
602
+ ...QUERY_LIMITS,
603
+ pattern: 1024,
604
+ states: 1e4,
605
+ expansions: 1e4,
606
+ candidates: 5e4,
607
+ bodyBytes: 8388608,
608
+ milliseconds: 2e3,
609
+ work: 1e7
610
+ };
611
+ var SEARCH_QUERY = {
612
+ command: "search",
613
+ guide: "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md"
614
+ };
615
+ var MESSAGE_PARSING = { ...SEARCH_QUERY, proximity: true };
616
+ var MOST_WORDS_APART = 50;
617
+ function searchError(reason, span, alternative) {
618
+ queryError(reason, span, alternative, SEARCH_QUERY);
619
+ }
620
+ __name(searchError, "searchError");
621
+ var ANSWER_MS = 1e3;
622
+ var searchTimeLimit = /* @__PURE__ */ __name((deadline, now = Date.now()) => deadline?.explicit ? Math.max(QUERY_LIMITS2.milliseconds, deadline.endsAt - now - ANSWER_MS) : void 0, "searchTimeLimit");
623
+ function outOfTime(limitMs = QUERY_LIMITS2.milliseconds) {
624
+ 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 });
625
+ }
626
+ __name(outOfTime, "outOfTime");
627
+ var isQueryLimit = /* @__PURE__ */ __name((error) => isCliError(error) && (error.details.reason === "query.too-large" || error.details.reason === "query.time-limit"), "isQueryLimit");
628
+ function exhausted(budget) {
629
+ throw new CliError("validation_error", `search exceeded its ${budget} budget \u2014 narrow the chat or date range`, {
630
+ reason: "query.too-large",
631
+ budget,
632
+ complete: false
633
+ });
634
+ }
635
+ __name(exhausted, "exhausted");
636
+ function tooWideTerm([term], budget) {
637
+ if (term === void 0)
638
+ exhausted(budget);
639
+ const part = term.replace(/[*?]+/gu, " ").trim().split(/\s+/u).sort((a, b) => b.length - a.length)[0] ?? term;
640
+ 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 });
641
+ }
642
+ __name(tooWideTerm, "tooWideTerm");
643
+
644
+ // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/domain/ref-arguments.js
645
+ var TAKES = {
646
+ chat: "a chat: chat:<provider>/<account>/<chat>, its id or its title",
647
+ message: "a message: msg:<provider>/<account>/<chat>/<message>, or a chat and the message's id"
648
+ };
649
+ var article2 = /* @__PURE__ */ __name((word) => /^[aeiou]/.test(word) ? "an" : "a", "article");
650
+ var wrongKind = /* @__PURE__ */ __name((text2, kind, takes) => new CliError("validation_error", `${text2} names ${article2(kind)} ${kind}; this takes ${TAKES[takes]}`, {
651
+ reason: "ref.wrong-kind"
652
+ }), "wrongKind");
653
+ var wrongProvider = /* @__PURE__ */ __name((text2, provider, kind) => {
654
+ const entry = providerNamed(provider);
655
+ const command = entry?.command;
656
+ const opens = kind === "entity" ? void 0 : entry?.opens?.[kind];
657
+ const how = command && opens ? `open it with ${command} <profile> ${opens} ${text2}` : "open it with its own CLI";
658
+ const label2 = providerLabel(provider);
659
+ return new CliError("validation_error", `${text2} is ${article2(label2.toLowerCase())} ${label2} ${kind}; ${how}`, {
660
+ reason: "ref.wrong-provider"
661
+ });
662
+ }, "wrongProvider");
663
+ var chatReferenceOf = /* @__PURE__ */ __name((text2, provider, takes = "chat") => {
664
+ const trimmed = text2.trim();
665
+ if (!looksLikeReference(trimmed))
666
+ return void 0;
667
+ const reference = parseReference(trimmed);
668
+ if (reference.type !== "chat" && reference.type !== "message")
669
+ throw wrongKind(trimmed, reference.type, takes);
670
+ if (reference.provider !== provider)
671
+ throw wrongProvider(trimmed, reference.provider, reference.type);
672
+ const found = {
673
+ text: trimmed,
674
+ provider: reference.provider,
675
+ account: reference.account,
676
+ chat: reference.chat,
677
+ ...reference.type === "message" ? { message: reference.message } : {}
678
+ };
679
+ return found;
680
+ }, "chatReferenceOf");
681
+ var contactReferenceOf = /* @__PURE__ */ __name((text2, provider) => {
682
+ const trimmed = text2.trim();
683
+ if (!trimmed.startsWith("contact:"))
684
+ return void 0;
685
+ const reference = parseReference(trimmed);
686
+ if (reference.type !== "contact")
687
+ return void 0;
688
+ if (provider !== void 0 && reference.provider !== provider)
689
+ throw wrongProvider(trimmed, reference.provider, reference.type);
690
+ return reference.id;
691
+ }, "contactReferenceOf");
692
+ var wrongAccount = /* @__PURE__ */ __name((reference, scope, profiles) => {
693
+ 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}`;
694
+ const others = profiles === void 0 ? "" : `. Profiles signed in to ${reference.account}: ${profiles.length > 0 ? profiles.join(", ") : "none here"}`;
695
+ return new CliError("validation_error", `${reference.text} belongs to account ${reference.account}; ${here}${others}`, { reason: "ref.wrong-account" });
696
+ }, "wrongAccount");
697
+ var ensureAccount = /* @__PURE__ */ __name(async (reference, scope, profilesOn) => {
698
+ if (scope.account !== void 0 && scope.account === reference.account)
699
+ return;
700
+ const profiles = await profilesOn?.(reference.account).catch(() => void 0);
701
+ throw wrongAccount(reference, scope, profiles);
702
+ }, "ensureAccount");
703
+
704
+ // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
705
+ var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
706
+ var literal = /* @__PURE__ */ __name((c) => ({
707
+ kind: "char",
708
+ ranges: [[c.codePointAt(0) ?? 0, c.codePointAt(0) ?? 0]],
709
+ negate: false
710
+ }), "literal");
711
+ var compileAutomaton = /* @__PURE__ */ __name((pattern, span = { start: 0, end: pattern.length }) => {
712
+ if (pattern.length > QUERY_LIMITS2.pattern * 2)
713
+ exhausted("pattern");
714
+ const chars = [...pattern];
715
+ if (chars.length > QUERY_LIMITS2.pattern)
716
+ exhausted("pattern");
717
+ let at = 0, depth = 0;
718
+ const failure = /* @__PURE__ */ __name(() => searchError("query.invalid-regex", span, "use the supported Lucene regex subset"), "failure");
719
+ const character = /* @__PURE__ */ __name(() => {
720
+ if (at >= chars.length)
721
+ return failure();
722
+ return chars[at++];
723
+ }, "character");
724
+ const predefined = /* @__PURE__ */ __name(() => {
725
+ if (chars[at] !== "\\")
726
+ return void 0;
727
+ const name = chars[at + 1] ?? "";
728
+ let ranges;
729
+ if (name.toLowerCase() === "d")
730
+ ranges = [[48, 57]];
731
+ if (name.toLowerCase() === "w")
732
+ ranges = [
733
+ [48, 57],
734
+ [65, 90],
735
+ [95, 95],
736
+ [97, 122]
737
+ ];
738
+ if (name.toLowerCase() === "s")
739
+ ranges = [
740
+ [9, 10],
741
+ [13, 13],
742
+ [32, 32]
743
+ ];
744
+ if (ranges) {
745
+ at += 2;
746
+ return { kind: "char", ranges, negate: name === name.toUpperCase() };
747
+ }
748
+ if (/^[a-zA-Z]$/u.test(name))
749
+ return failure();
750
+ return void 0;
751
+ }, "predefined");
752
+ const escaped = /* @__PURE__ */ __name(() => {
753
+ if (chars[at] === "\\")
754
+ at++;
755
+ return character();
756
+ }, "escaped");
757
+ const union = /* @__PURE__ */ __name(() => {
758
+ if (++depth > QUERY_LIMITS2.depth)
759
+ exhausted("pattern depth");
760
+ const children = [concat()];
761
+ while (chars[at] === "|") {
762
+ at++;
763
+ children.push(concat());
764
+ }
765
+ depth--;
766
+ return children.length === 1 ? children[0] : { kind: "union", children };
767
+ }, "union");
768
+ const concat = /* @__PURE__ */ __name(() => {
769
+ const children = [];
770
+ do {
771
+ children.push(repeat());
772
+ } while (at < chars.length && ![")", "|", "&"].includes(chars[at] ?? ""));
773
+ if (chars[at] === "&")
774
+ searchError("query.unsupported-regex", span, "automaton intersection is not supported");
775
+ return children.length === 1 ? children[0] : { kind: "concat", children };
776
+ }, "concat");
777
+ const repeat = /* @__PURE__ */ __name(() => {
778
+ let child = simple();
779
+ while (["?", "*", "+", "{"].includes(chars[at] ?? "")) {
780
+ const op = character();
781
+ let min = op === "+" ? 1 : 0, max = op === "?" ? 1 : null;
782
+ if (op === "{") {
783
+ const number = /* @__PURE__ */ __name(() => {
784
+ const start2 = at;
785
+ while (/^[0-9]$/u.test(chars[at] ?? ""))
786
+ at++;
787
+ if (at === start2)
788
+ return failure();
789
+ return Number(chars.slice(start2, at).join(""));
790
+ }, "number");
791
+ min = number();
792
+ max = min;
793
+ if (chars[at] === ",") {
794
+ at++;
795
+ max = chars[at] === "}" ? null : number();
796
+ }
797
+ if (character() !== "}" || max !== null && max < min)
798
+ return failure();
799
+ }
800
+ if (min > QUERY_LIMITS2.states || max !== null && max > QUERY_LIMITS2.states)
801
+ exhausted("automaton states");
802
+ child = { kind: "repeat", child, min, max };
803
+ }
804
+ return child;
805
+ }, "repeat");
806
+ const simple = /* @__PURE__ */ __name(() => {
807
+ const predefinedAtom = predefined();
808
+ if (predefinedAtom)
809
+ return predefinedAtom;
810
+ const c = character();
811
+ if (c === "~" || c === "<")
812
+ searchError("query.unsupported-regex", span, "complement, named automata and numeric intervals are not supported");
813
+ if (c === ".")
814
+ return any;
815
+ if (c === "#")
816
+ return { kind: "empty" };
817
+ if (c === "@")
818
+ return { kind: "repeat", child: any, min: 0, max: null };
819
+ if (c === '"') {
820
+ const children = [];
821
+ while (chars[at] !== '"')
822
+ children.push(literal(character()));
823
+ at++;
824
+ return { kind: "concat", children };
825
+ }
826
+ if (c === "(") {
827
+ if (chars[at] === ")") {
828
+ at++;
829
+ return { kind: "epsilon" };
830
+ }
831
+ if (chars[at] === "?")
832
+ searchError("query.unsupported-regex", span, "JavaScript groups and lookaround are not Lucene operators");
833
+ const child = union();
834
+ if (character() !== ")")
835
+ return failure();
836
+ return child;
837
+ }
838
+ if (c === "[") {
839
+ const negate = chars[at] === "^";
840
+ if (negate)
841
+ at++;
842
+ const choices = [];
843
+ do {
844
+ const pre = predefined();
845
+ if (pre) {
846
+ choices.push(pre);
847
+ continue;
848
+ }
849
+ const lo = escaped().codePointAt(0) ?? 0;
850
+ let hi = lo;
851
+ if (chars[at] === "-") {
852
+ at++;
853
+ hi = escaped().codePointAt(0) ?? 0;
854
+ }
855
+ if (hi < lo)
856
+ return failure();
857
+ choices.push({ kind: "char", ranges: [[lo, hi]], negate: false });
858
+ } while (at < chars.length && chars[at] !== "]");
859
+ if (character() !== "]")
860
+ return failure();
861
+ if (!negate)
862
+ return { kind: "union", children: choices };
863
+ const ranges = [];
864
+ for (const choice of choices) {
865
+ if (choice.kind !== "char" || choice.negate)
866
+ searchError("query.unsupported-regex", span, "negative predefined classes inside a negated class are not supported");
867
+ ranges.push(...choice.ranges);
868
+ }
869
+ return { kind: "char", ranges, negate: true };
870
+ }
871
+ if (c === "\\")
872
+ return literal(character());
873
+ return literal(c);
874
+ }, "simple");
875
+ const expression = chars.length === 0 ? { kind: "epsilon" } : union();
876
+ if (at !== chars.length)
877
+ return failure();
878
+ const states = [];
879
+ const state = /* @__PURE__ */ __name(() => {
880
+ if (states.length >= QUERY_LIMITS2.states)
881
+ exhausted("automaton states");
882
+ states.push({ epsilon: [], edges: [] });
883
+ return states.length - 1;
884
+ }, "state");
885
+ const epsilon = /* @__PURE__ */ __name((from, to) => {
886
+ ;
887
+ states[from].epsilon.push(to);
888
+ }, "epsilon");
889
+ const build = /* @__PURE__ */ __name((node, from, to) => {
890
+ if (node.kind === "char") {
891
+ ;
892
+ states[from].edges.push({ to, atom: node });
893
+ return;
894
+ }
895
+ if (node.kind === "empty")
896
+ return;
897
+ if (node.kind === "epsilon") {
898
+ epsilon(from, to);
899
+ return;
900
+ }
901
+ if (node.kind === "union") {
902
+ for (const child of node.children)
903
+ build(child, from, to);
904
+ return;
905
+ }
906
+ if (node.kind === "concat") {
907
+ let current2 = from;
908
+ node.children.forEach((child, index) => {
909
+ const next = index === node.children.length - 1 ? to : state();
910
+ build(child, current2, next);
911
+ current2 = next;
912
+ });
913
+ if (node.children.length === 0)
914
+ epsilon(from, to);
915
+ return;
916
+ }
917
+ let current = from;
918
+ for (let i = 0; i < node.min; i++) {
919
+ const next = state();
920
+ build(node.child, current, next);
921
+ current = next;
922
+ }
923
+ if (node.max === null) {
924
+ epsilon(current, to);
925
+ const end2 = state();
926
+ build(node.child, current, end2);
927
+ epsilon(end2, current);
928
+ } else {
929
+ for (let i = node.min; i < node.max; i++) {
930
+ epsilon(current, to);
931
+ const next = state();
932
+ build(node.child, current, next);
933
+ current = next;
934
+ }
935
+ epsilon(current, to);
936
+ }
937
+ }, "build");
938
+ const start = state(), end = state();
939
+ build(expression, start, end);
940
+ return {
941
+ states: states.length,
942
+ test: /* @__PURE__ */ __name((text2, budget = { work: 0 }) => {
943
+ const spend = /* @__PURE__ */ __name(() => {
944
+ if (++budget.work > (budget.maxWork ?? QUERY_LIMITS2.work))
945
+ exhausted("automaton work");
946
+ }, "spend");
947
+ const closure = /* @__PURE__ */ __name((initial) => {
948
+ const stack = [...initial];
949
+ while (stack.length) {
950
+ const id = stack.pop();
951
+ for (const next of states[id].epsilon) {
952
+ spend();
953
+ if (!initial.has(next)) {
954
+ initial.add(next);
955
+ stack.push(next);
956
+ }
957
+ }
958
+ }
959
+ return initial;
960
+ }, "closure");
961
+ let current = closure(/* @__PURE__ */ new Set([start]));
962
+ for (const c of text2) {
963
+ const point = c.codePointAt(0) ?? 0;
964
+ const next = /* @__PURE__ */ new Set();
965
+ for (const id of current)
966
+ for (const edge of states[id].edges) {
967
+ spend();
968
+ const inside = edge.atom.ranges.some(([lo, hi]) => point >= lo && point <= hi);
969
+ if (inside !== edge.atom.negate)
970
+ next.add(edge.to);
971
+ }
972
+ current = closure(next);
973
+ if (current.size === 0)
974
+ return false;
975
+ }
976
+ return current.has(end);
977
+ }, "test")
978
+ };
979
+ }, "compileAutomaton");
980
+ var wildcardPattern = /* @__PURE__ */ __name((value) => {
981
+ const chars = [...value];
982
+ let pattern = "";
983
+ for (let at = 0; at < chars.length; at++) {
984
+ const c = chars[at];
985
+ if (c === "\\") {
986
+ const escaped = chars[++at];
987
+ if (escaped === void 0)
988
+ searchError("query.invalid-escape", { start: 0, end: value.length });
989
+ pattern += /[|&?*+(){}[\].#@<>"~\\]/u.test(escaped) ? `\\${escaped}` : escaped;
990
+ } else
991
+ pattern += c === "*" ? ".*" : c === "?" ? "." : /[|&?*+(){}[\].#@<>"~\\]/u.test(c) ? `\\${c}` : c;
992
+ }
993
+ return pattern;
994
+ }, "wildcardPattern");
995
+ var FOLD_RANGE = 4096;
996
+ var unfoldable = /* @__PURE__ */ __name((span, what) => searchError("query.unsupported-regex", span, `${what} has no single lowercase form without accents, which is what text: words are \u2014 write it that way, or use body:/\u2026/ to match the original text`), "unfoldable");
997
+ var classChar = /* @__PURE__ */ __name((point) => {
998
+ const c = String.fromCodePoint(point);
999
+ return /[\p{L}\p{N}]/u.test(c) ? c : `\\${c}`;
1000
+ }, "classChar");
1001
+ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
1002
+ const chars = [...pattern.normalize("NFC")];
1003
+ let out = "";
1004
+ let at = 0;
1005
+ const literal2 = /* @__PURE__ */ __name((c) => {
1006
+ if (!/[\p{L}\p{N}\p{M}]/u.test(c))
1007
+ return c;
1008
+ const folded = fold(c);
1009
+ if (folded === "")
1010
+ return unfoldable(span, `"${c}"`);
1011
+ if ([...folded].length === 1 && /[\p{L}\p{N}]/u.test(folded))
1012
+ return folded;
1013
+ if (folded.includes('"'))
1014
+ return unfoldable(span, `"${c}"`);
1015
+ return `"${folded}"`;
1016
+ }, "literal");
1017
+ const characterClass = /* @__PURE__ */ __name(() => {
1018
+ const begin = at - 1;
1019
+ let negate = "";
1020
+ if (chars[at] === "^") {
1021
+ negate = "^";
1022
+ at++;
1023
+ }
1024
+ const kept2 = [];
1025
+ const points = /* @__PURE__ */ new Set();
1026
+ do {
1027
+ const start = at;
1028
+ if (chars[at] === "\\" && /^[a-zA-Z]$/u.test(chars[at + 1] ?? "")) {
1029
+ kept2.push(`\\${chars[at + 1]}`);
1030
+ at += 2;
1031
+ continue;
1032
+ }
1033
+ const escaped = /* @__PURE__ */ __name(() => {
1034
+ if (chars[at] === "\\")
1035
+ at++;
1036
+ return (chars[at++] ?? "").codePointAt(0) ?? 0;
1037
+ }, "escaped");
1038
+ const lo = escaped();
1039
+ let hi = lo;
1040
+ if (chars[at] === "-") {
1041
+ at++;
1042
+ hi = escaped();
1043
+ }
1044
+ if (at > chars.length) {
1045
+ out += chars.slice(begin).join("");
1046
+ return;
1047
+ }
1048
+ const single = /* @__PURE__ */ __name((point) => [...fold(String.fromCodePoint(point))], "single");
1049
+ if (hi < lo)
1050
+ kept2.push(chars.slice(start, at).join(""));
1051
+ else if (hi - lo >= FOLD_RANGE) {
1052
+ if (single(lo).join("") !== String.fromCodePoint(lo) || single(hi).join("") !== String.fromCodePoint(hi))
1053
+ unfoldable(span, `the range ${chars.slice(start, at).join("")}`);
1054
+ kept2.push(chars.slice(start, at).join(""));
1055
+ } else
1056
+ for (let point = lo; point <= hi; point++) {
1057
+ const folded = single(point);
1058
+ if (folded.length === 1)
1059
+ points.add(folded[0]?.codePointAt(0) ?? 0);
1060
+ else if (lo === hi)
1061
+ unfoldable(span, `"${String.fromCodePoint(point)}"`);
1062
+ }
1063
+ } while (at < chars.length && chars[at] !== "]");
1064
+ const sorted = [...points].sort((a, b) => a - b);
1065
+ const ranges = [];
1066
+ for (let i = 0; i < sorted.length; i++) {
1067
+ const first = sorted[i];
1068
+ while (sorted[i + 1] === sorted[i] + 1)
1069
+ i++;
1070
+ const last = sorted[i];
1071
+ ranges.push(last === first ? classChar(first) : `${classChar(first)}-${classChar(last)}`);
1072
+ }
1073
+ if (!kept2.length && !ranges.length)
1074
+ unfoldable(span, "the class");
1075
+ out += `[${negate}${kept2.join("")}${ranges.join("")}`;
1076
+ }, "characterClass");
1077
+ while (at < chars.length) {
1078
+ const c = chars[at++];
1079
+ if (c === "\\") {
1080
+ const next = chars[at++];
1081
+ if (next === void 0)
1082
+ out += c;
1083
+ else
1084
+ out += (next.codePointAt(0) ?? 0) < 128 ? `${c}${next}` : literal2(next);
1085
+ } else if (c === '"') {
1086
+ const end = chars.indexOf('"', at);
1087
+ if (end < 0) {
1088
+ out += chars.slice(at - 1).join("");
1089
+ break;
1090
+ }
1091
+ const folded = fold(chars.slice(at, end).join(""));
1092
+ if (folded.includes('"'))
1093
+ unfoldable(span, `"${chars.slice(at, end).join("")}"`);
1094
+ out += `"${folded}"`;
1095
+ at = end + 1;
1096
+ } else if (c === "[")
1097
+ characterClass();
1098
+ else
1099
+ out += literal2(c);
1100
+ }
1101
+ return out;
1102
+ }, "foldRegex");
1103
+
1104
+ // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/search/trigrams.js
1105
+ var trigrams = /* @__PURE__ */ __name((term) => {
1106
+ const padded = ` ${term} `;
1107
+ const pieces = /* @__PURE__ */ new Set();
1108
+ for (let at = 0; at + 3 <= padded.length; at++)
1109
+ pieces.add(padded.slice(at, at + 3));
1110
+ return [...pieces];
1111
+ }, "trigrams");
1112
+
1113
+ // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/resolve.js
1114
+ var isId = /* @__PURE__ */ __name((reference) => /^-?\d+$/.test(reference.trim()), "isId");
1115
+ var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase().replaceAll("\u0451", "\u0435"), "foldName");
1116
+ var pickChat = /* @__PURE__ */ __name((reference, chats) => {
1117
+ const wanted = foldName(reference.trim());
1118
+ const matches = chats.filter((chat) => chat.title !== null && foldName(chat.title).includes(wanted));
1119
+ if (matches.length === 1 && matches[0])
1120
+ return matches[0];
1121
+ if (matches.length === 0)
1122
+ throw new CliError("not_found", `no chat matches "${reference}"`);
1123
+ throw ambiguous(reference, "chats", matches.map((chat) => ({ id: chat.id, title: chat.title })), ({ title }) => singleLine(String(title)));
1124
+ }, "pickChat");
1125
+ var pickPerson = /* @__PURE__ */ __name((reference, people) => {
1126
+ const trimmed = reference.trim();
1127
+ const contact = contactReferenceOf(trimmed, people.provider);
1128
+ if (contact !== void 0) {
1129
+ const named = people.get(contact);
1130
+ if (named)
1131
+ return named;
1132
+ throw new CliError("not_found", `no person ${contact} in what this account has seen`);
1133
+ }
1134
+ const known = people.get(trimmed);
1135
+ if (known)
1136
+ return known;
1137
+ if (isId(trimmed))
1138
+ throw new CliError("not_found", `no person ${trimmed} in what this account has seen`);
1139
+ const wanted = foldName(trimmed.replace(/^@/, ""));
1140
+ const everyone = people.all().toSorted((a, b) => (a.name ?? "").localeCompare(b.name ?? ""));
1141
+ const exact = everyone.filter((person) => namesOf(person).includes(wanted));
1142
+ const containing = everyone.filter((person) => namesOf(person).some((one) => one.includes(wanted)));
1143
+ if (exact.length === 1 && exact[0])
1144
+ return exact[0];
1145
+ if (containing.length === 1 && containing[0])
1146
+ return containing[0];
1147
+ if (containing.length === 0)
1148
+ throw new CliError("not_found", `nobody matches "${reference}"`);
1149
+ const matches = exact.length > 0 ? [...exact, ...containing.filter((person) => !exact.includes(person))] : containing;
1150
+ throw ambiguous(reference, "people", matches.map(({ id, name, username }) => ({ id, name, username })), ({ name, username }) => singleLine([name, username && `@${username}`].filter(isPresent).join(" ")));
1151
+ }, "pickPerson");
1152
+ var namesOf = /* @__PURE__ */ __name((person, byAddress = false) => [person.alias, person.name, person.username, byAddress ? person.id : void 0].filter(isPresent).map(foldName), "namesOf");
1153
+ var chatNamesOf = /* @__PURE__ */ __name((chat) => [chat.title, chat.providerMetadata?.username].filter((one) => typeof one === "string" && one !== "").map(foldName), "chatNamesOf");
1154
+ var namePattern = /* @__PURE__ */ __name((pattern) => {
1155
+ const automaton = compileAutomaton(wildcardPattern(foldName(pattern.trim().replace(/^@/, ""))));
1156
+ return (names) => names.some((one) => automaton.test(one));
1157
+ }, "namePattern");
1158
+ var peopleMatching = /* @__PURE__ */ __name((pattern, people, { byAddress = false } = {}) => {
1159
+ const fits = namePattern(pattern);
1160
+ return people.filter((person) => fits(namesOf(person, byAddress)));
1161
+ }, "peopleMatching");
1162
+ var chatsMatching = /* @__PURE__ */ __name((pattern, chats) => {
1163
+ const fits = namePattern(pattern);
1164
+ return chats.filter((chat) => fits(chatNamesOf(chat)));
1165
+ }, "chatsMatching");
1166
+ var nearest = /* @__PURE__ */ __name((pattern, items, names, most = 5) => {
1167
+ const pieces = /* @__PURE__ */ __name((text2) => foldName(text2).split(/\s+/u).flatMap(trigrams), "pieces");
1168
+ const wanted = new Set(pieces(pattern.replace(/\\(.)/gu, "$1").replace(/[*?@]/gu, " ").trim()));
1169
+ if (wanted.size === 0)
1170
+ return [];
1171
+ return items.map((item) => ({
1172
+ item,
1173
+ score: names(item).flatMap(pieces).filter((piece) => wanted.has(piece)).length
1174
+ })).filter(({ score }) => score > 1).toSorted((a, b) => b.score - a.score).slice(0, most).map(({ item }) => item);
1175
+ }, "nearest");
1176
+ var ambiguous = /* @__PURE__ */ __name((reference, what, candidates, label2) => {
1177
+ const width = Math.max(...candidates.map(({ id }) => id.length));
1178
+ const lines = candidates.map((candidate) => ` ${candidate.id.padEnd(width)} ${label2(candidate)}`).join("\n");
1179
+ return new CliError("validation_error", `"${singleLine(reference)}" matches ${candidates.length} ${what} \u2014 name one by its id:
1180
+ ${lines}`, { candidates });
1181
+ }, "ambiguous");
1182
+ var isPresent = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isPresent");
1183
+
1184
+ // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/domain/display-names.js
1185
+ var QUOTES = [
1186
+ ['"', '"'],
1187
+ ["'", "'"],
1188
+ ["\xAB", "\xBB"],
1189
+ ["\u201C", "\u201D"],
1190
+ ["\u201E", "\u201C"],
1191
+ ["\u2018", "\u2019"],
1192
+ ["`", "`"]
1193
+ ];
1194
+ var READABLE = /[\p{L}\p{N}]/u;
1195
+ var PLACEHOLDERS = /* @__PURE__ */ new Set(["null", "undefined", "none", "\u0431\u0435\u0437 \u0438\u043C\u0435\u043D\u0438", "deleted account", "\u0443\u0434\u0430\u043B\u0451\u043D\u043D\u044B\u0439 \u0430\u043A\u043A\u0430\u0443\u043D\u0442"]);
1196
+ var unquoted = /* @__PURE__ */ __name((text2) => {
1197
+ let at = text2.replace(/\s+/gu, " ").trim();
1198
+ for (; ; ) {
1199
+ const pair = QUOTES.find(([open, close]) => at.length >= 2 && at.startsWith(open) && at.endsWith(close));
1200
+ if (pair === void 0)
1201
+ return at;
1202
+ at = at.slice(pair[0].length, at.length - pair[1].length).trim();
1203
+ }
1204
+ }, "unquoted");
1205
+ var given = /* @__PURE__ */ __name((value) => {
1206
+ const text2 = typeof value === "string" ? value.trim() : "";
1207
+ return text2 === "" ? void 0 : text2;
1208
+ }, "given");
1209
+ var displayName = /* @__PURE__ */ __name((name, fallbacks = {}) => {
1210
+ const unwrapped = typeof name === "string" ? unquoted(name) : "";
1211
+ const cleaned = PLACEHOLDERS.has(unwrapped.toLowerCase()) ? "" : unwrapped;
1212
+ if (READABLE.test(cleaned))
1213
+ return cleaned;
1214
+ const borrowed = fallbacks.name === void 0 || fallbacks.name === null ? null : displayName(fallbacks.name);
1215
+ if (borrowed !== null && READABLE.test(borrowed) && !borrowed.startsWith("@"))
1216
+ return borrowed;
1217
+ const username = given(fallbacks.username);
1218
+ return (username === void 0 ? void 0 : username.startsWith("@") ? username : `@${username}`) ?? given(fallbacks.phone) ?? given(fallbacks.email) ?? (cleaned === "" ? null : cleaned);
1219
+ }, "displayName");
1220
+ var present = /* @__PURE__ */ __name((value) => typeof value === "string" && value !== "" ? value : null, "present");
1221
+ var takeFallbacks = /* @__PURE__ */ __name((into, identity) => {
1222
+ const named = displayName(identity.name);
1223
+ if (into.name === null && isReadable(named) && !named?.startsWith("@"))
1224
+ into.name = named;
1225
+ into.username ??= present(identity.username);
1226
+ into.phone ??= present(identity.phone) ?? (identity.provider === "phone" ? identity.id : null);
1227
+ into.email ??= present(identity.email) ?? (identity.provider === "email" ? identity.id : null);
1228
+ return into;
1229
+ }, "takeFallbacks");
1230
+ var noFallbacks = /* @__PURE__ */ __name(() => ({ name: null, username: null, phone: null, email: null }), "noFallbacks");
1231
+ var nameKey = /* @__PURE__ */ __name((name) => {
1232
+ if (typeof name !== "string")
1233
+ return null;
1234
+ const unwrapped = unquoted(name);
1235
+ if (PLACEHOLDERS.has(unwrapped.toLowerCase()))
1236
+ return null;
1237
+ const words = foldName(unwrapped).split(/[^\p{L}\p{N}]+/u).filter((word) => word !== "");
1238
+ return words.length === 0 ? null : words.sort().join(" ");
1239
+ }, "nameKey");
1240
+ var isReadable = /* @__PURE__ */ __name((shown) => shown !== null && READABLE.test(shown), "isReadable");
1241
+
1242
+ // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/domain/counters.js
1243
+ var COUNTER_FIELDS = ["views", "reactions", "comments"];
1244
+ var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
1245
+ var counterValue = /* @__PURE__ */ __name((message, field) => {
1246
+ const value = field === "reactions" ? message.reactions?.total : message.providerMetadata?.[field];
1247
+ return validCounter(value) ? value : null;
1248
+ }, "counterValue");
1249
+ var counterObservationTime = /* @__PURE__ */ __name((observation, now) => {
1250
+ const at = Date.parse(observation.observedAt);
1251
+ if (!validCounter(observation.value) || !Number.isSafeInteger(at) || at < 0 || at > now || !["remote_fetch", "remote_update"].includes(observation.source))
1252
+ throw new CliError("validation_error", "counter observation needs a valid value, source and nonfuture observation time");
1253
+ if (observation.reactions && (!validCounter(observation.reactions.total) || observation.reactions.total !== observation.value))
1254
+ throw new CliError("validation_error", "reaction observation payload and total disagree");
1255
+ return at;
1256
+ }, "counterObservationTime");
1257
+ var observedCounters = /* @__PURE__ */ __name((message, observedAt, fields, source = "remote_fetch") => {
1258
+ const observations = {};
1259
+ for (const field of fields) {
1260
+ const value = counterValue(message, field);
1261
+ if (value !== null)
1262
+ observations[field] = {
1263
+ value,
1264
+ observedAt,
1265
+ source,
1266
+ ...field === "reactions" && message.reactions ? { reactions: message.reactions } : {}
1267
+ };
1268
+ }
1269
+ return { ...message, counterObservations: observations };
1270
+ }, "observedCounters");
1271
+ var counterFreshness = /* @__PURE__ */ __name((states) => {
1272
+ if (!states.length || states.every((one) => one.freshness === "unknown"))
1273
+ return "unknown";
1274
+ if (states.some((one) => one.freshness === "unknown"))
1275
+ return "partial";
1276
+ return states.some((one) => one.freshness === "stale") ? "stale" : "fresh";
1277
+ }, "counterFreshness");
1278
+
1279
+ // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
620
1280
  var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
621
1281
  var AUTHOR_MEASURES = [
622
1282
  "messages",
@@ -649,7 +1309,7 @@ function invalid(message) {
649
1309
  __name(invalid, "invalid");
650
1310
  var rankingOptions = /* @__PURE__ */ __name((target, input) => {
651
1311
  const measures = target === "messages" ? MESSAGE_MEASURES : AUTHOR_MEASURES;
652
- const { measure, score, weights: given, minMessages } = input;
1312
+ const { measure, score, weights: given2, minMessages } = input;
653
1313
  const messageKind = input.messageKind ?? "all";
654
1314
  if (!["all", "posts", "comments"].includes(messageKind))
655
1315
  invalid("message_kind takes all, posts or comments");
@@ -659,17 +1319,17 @@ var rankingOptions = /* @__PURE__ */ __name((target, input) => {
659
1319
  invalid("min_messages takes a positive integer");
660
1320
  if (measure !== void 0 && !measures.includes(measure))
661
1321
  invalid(`--measure takes ${measures.join(", ")}`);
662
- if (measure !== void 0 && (score !== void 0 || given !== void 0))
1322
+ if (measure !== void 0 && (score !== void 0 || given2 !== void 0))
663
1323
  invalid("--measure cannot be combined with --score or --weights");
664
1324
  if (score !== void 0 && !["helpful", "active", "engaging"].includes(score))
665
1325
  invalid("--score takes helpful, active or engaging");
666
1326
  if (target === "messages" && score !== void 0 && score !== "engaging")
667
1327
  invalid("helpful and active scores apply to authors only");
668
- const scoring = score !== void 0 || given !== void 0;
1328
+ const scoring = score !== void 0 || given2 !== void 0;
669
1329
  const preset = score;
670
1330
  let weights = null;
671
1331
  if (scoring) {
672
- let raw = given !== void 0 ? given : target === "messages" ? { reactions: 0.5, "replies-from-others": 0.5 } : presets[preset];
1332
+ let raw = given2 !== void 0 ? given2 : target === "messages" ? { reactions: 0.5, "replies-from-others": 0.5 } : presets[preset];
673
1333
  if (typeof raw === "string") {
674
1334
  try {
675
1335
  raw = JSON.parse(raw);
@@ -756,10 +1416,10 @@ var withoutUrls = /* @__PURE__ */ __name((text2) => text2.replace(/\S+/gu, (toke
756
1416
  var rankingWords = /* @__PURE__ */ __name((text2) => withoutUrls(text2).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
757
1417
  var rankingQuestion = /* @__PURE__ */ __name((text2) => withoutUrls(text2).includes("?"), "rankingQuestion");
758
1418
 
759
- // 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/records.js
1419
+ // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/domain/records.js
760
1420
  import { createHash } from "node:crypto";
761
1421
 
762
- // 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/phone-plans.generated.js
1422
+ // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
763
1423
  var PHONE_PLANS = [
764
1424
  {
765
1425
  country: "us",
@@ -1139,7 +1799,7 @@ var PHONE_PLANS = [
1139
1799
  }
1140
1800
  ];
1141
1801
 
1142
- // 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/phones.js
1802
+ // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/domain/phones.js
1143
1803
  var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
1144
1804
  var DEFAULT_PHONE_COUNTRIES = ["ru"];
1145
1805
  var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
@@ -1213,7 +1873,7 @@ var storedPhone = /* @__PURE__ */ __name((raw, provider) => {
1213
1873
  return found ? `+${found[1]}` : void 0;
1214
1874
  }, "storedPhone");
1215
1875
 
1216
- // 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/records.js
1876
+ // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/domain/records.js
1217
1877
  var RECORDS_SCHEMA_VERSION = 1;
1218
1878
  var RECORD_OPERATIONS = ["upsert", "delete"];
1219
1879
  var LINE_OPTIONS = ["text", "products"];
@@ -1564,14 +2224,46 @@ var fieldReferences = /* @__PURE__ */ __name((record, options = {}) => {
1564
2224
  return found;
1565
2225
  }, "fieldReferences");
1566
2226
 
1567
- // 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/crm.js
1568
- var CRM_KINDS = ["organization", "person", "deal", "lead"];
1569
- var isCrmUserId = /* @__PURE__ */ __name((id) => /^\d{1,20}$/.test(id), "isCrmUserId");
1570
- var normalCrmUserId = /* @__PURE__ */ __name((id) => {
1571
- const text2 = id.trim();
1572
- return /^\d+$/.test(text2) ? text2.replace(/^0+(?=\d)/, "") : text2;
1573
- }, "normalCrmUserId");
1574
- var isItemKind = /* @__PURE__ */ __name((kind) => kind === "deal" || kind === "lead", "isItemKind");
2227
+ // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/domain/relation-role-labels.js
2228
+ var label = /* @__PURE__ */ __name((en, ru, es) => ({ en, ru, es }), "label");
2229
+ var ROLE_LABELS = {
2230
+ organization: {
2231
+ employee: label("Employee", "\u0421\u043E\u0442\u0440\u0443\u0434\u043D\u0438\u043A", "Empleado"),
2232
+ contractor: label("Contractor", "\u041F\u043E\u0434\u0440\u044F\u0434\u0447\u0438\u043A", "Contratista"),
2233
+ founder: label("Founder", "\u041E\u0441\u043D\u043E\u0432\u0430\u0442\u0435\u043B\u044C", "Fundador"),
2234
+ owner: label("Owner", "\u0412\u043B\u0430\u0434\u0435\u043B\u0435\u0446", "Propietario"),
2235
+ manager: label("Manager", "\u0420\u0443\u043A\u043E\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044C", "Directivo"),
2236
+ adviser: label("Adviser", "\u0421\u043E\u0432\u0435\u0442\u043D\u0438\u043A", "Asesor"),
2237
+ contact: label("Contact", "\u041A\u043E\u043D\u0442\u0430\u043A\u0442", "Contacto")
2238
+ },
2239
+ project: {
2240
+ owner: label("Owner", "\u0412\u043B\u0430\u0434\u0435\u043B\u0435\u0446", "Propietario"),
2241
+ manager: label("Manager", "\u0420\u0443\u043A\u043E\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044C", "Directivo"),
2242
+ contributor: label("Contributor", "\u0423\u0447\u0430\u0441\u0442\u043D\u0438\u043A", "Colaborador"),
2243
+ "client-contact": label("Client contact", "\u041A\u043E\u043D\u0442\u0430\u043A\u0442 \u043A\u043B\u0438\u0435\u043D\u0442\u0430", "Contacto del cliente"),
2244
+ approver: label("Approver", "\u0421\u043E\u0433\u043B\u0430\u0441\u0443\u044E\u0449\u0438\u0439", "Aprobador")
2245
+ },
2246
+ deal: {
2247
+ owner: label("Responsible", "\u041E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0439", "Responsable"),
2248
+ contact: label("Contact", "\u041A\u043E\u043D\u0442\u0430\u043A\u0442", "Contacto"),
2249
+ "decision-maker": label("Decision-maker", "\u041F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442 \u0440\u0435\u0448\u0435\u043D\u0438\u0435", "Responsable de decidir"),
2250
+ influencer: label("Influencer", "\u0412\u043B\u0438\u044F\u0435\u0442 \u043D\u0430 \u0440\u0435\u0448\u0435\u043D\u0438\u0435", "Influye en la decisi\xF3n")
2251
+ },
2252
+ contract: {
2253
+ customer: label("Customer", "\u0417\u0430\u043A\u0430\u0437\u0447\u0438\u043A", "Cliente"),
2254
+ supplier: label("Supplier", "\u041F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A", "Proveedor"),
2255
+ signatory: label("Signatory", "\u041F\u043E\u0434\u043F\u0438\u0441\u0430\u043D\u0442", "Firmante"),
2256
+ guarantor: label("Guarantor", "\u041F\u043E\u0440\u0443\u0447\u0438\u0442\u0435\u043B\u044C", "Garante")
2257
+ },
2258
+ related: {
2259
+ colleague: label("Colleague", "\u041A\u043E\u043B\u043B\u0435\u0433\u0430", "Colega"),
2260
+ adviser: label("Adviser", "\u0421\u043E\u0432\u0435\u0442\u043D\u0438\u043A", "Asesor"),
2261
+ investor: label("Investor", "\u0418\u043D\u0432\u0435\u0441\u0442\u043E\u0440", "Inversor"),
2262
+ mentor: label("Mentor", "\u041D\u0430\u0441\u0442\u0430\u0432\u043D\u0438\u043A", "Mentor"),
2263
+ family: label("Family", "\u0421\u0435\u043C\u044C\u044F", "Familia"),
2264
+ friend: label("Friend", "\u0414\u0440\u0443\u0433", "Amigo")
2265
+ }
2266
+ };
1575
2267
 
1576
2268
  export {
1577
2269
  isObject,
@@ -1591,6 +2283,11 @@ export {
1591
2283
  hasV1Roles,
1592
2284
  IDENTITY_TYPES,
1593
2285
  article,
2286
+ isEmailAddress,
2287
+ ROLE_ADDRESS_WORDS,
2288
+ isRoleAddress,
2289
+ isPersonLikeRoleAddress,
2290
+ isNoReplyAddress,
1594
2291
  DEFAULT_PHONE_COUNTRIES,
1595
2292
  parsePhoneCountries,
1596
2293
  nationalPhone,
@@ -1598,16 +2295,42 @@ export {
1598
2295
  e164Of,
1599
2296
  BARE_INTERNATIONAL_PROVIDERS,
1600
2297
  storedPhone,
2298
+ QUERY_VERSION,
2299
+ QUERY_LIMITS2 as QUERY_LIMITS,
2300
+ SEARCH_QUERY,
2301
+ MESSAGE_PARSING,
2302
+ MOST_WORDS_APART,
2303
+ searchError,
2304
+ searchTimeLimit,
2305
+ outOfTime,
2306
+ isQueryLimit,
2307
+ exhausted,
2308
+ tooWideTerm,
2309
+ compileAutomaton,
2310
+ wildcardPattern,
2311
+ foldRegex,
2312
+ chatReferenceOf,
2313
+ wrongAccount,
2314
+ ensureAccount,
2315
+ trigrams,
2316
+ isId,
2317
+ foldName,
2318
+ pickChat,
2319
+ pickPerson,
2320
+ peopleMatching,
2321
+ chatsMatching,
2322
+ nearest,
2323
+ displayName,
2324
+ takeFallbacks,
2325
+ noFallbacks,
2326
+ nameKey,
2327
+ isReadable,
1601
2328
  COUNTER_FIELDS,
1602
2329
  validCounter,
1603
2330
  counterValue,
1604
2331
  counterObservationTime,
1605
2332
  observedCounters,
1606
2333
  counterFreshness,
1607
- isEmailAddress,
1608
- ROLE_ADDRESS_WORDS,
1609
- isRoleAddress,
1610
- isNoReplyAddress,
1611
2334
  MESSAGE_MEASURES,
1612
2335
  AUTHOR_MEASURES,
1613
2336
  needsRankingContext,
@@ -1628,8 +2351,5 @@ export {
1628
2351
  envelopeOfJsonl,
1629
2352
  envelopeOfText,
1630
2353
  fieldReferences,
1631
- CRM_KINDS,
1632
- isCrmUserId,
1633
- normalCrmUserId,
1634
- isItemKind
2354
+ ROLE_LABELS
1635
2355
  };