@wirecat/drive-cli 0.71.0 → 0.72.1

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 (258) hide show
  1. package/README.md +150 -71
  2. package/contracts/wirecat.json +77 -8
  3. package/dist/bin/drive.js +2 -2
  4. package/dist/bundle/agent-GOCD4ZW2.js +46 -0
  5. package/dist/bundle/{all-profiles-3QJG2NAN.js → all-profiles-PZVP3G73.js} +67 -25
  6. package/dist/bundle/{anthropic-PSWTEU6G.js → anthropic-PUOTKSYV.js} +9 -9
  7. package/dist/bundle/{app-server-PVTA6ABR.js → app-server-MKDCXRZM.js} +97 -79
  8. package/dist/bundle/{bun-LU5LP3JI.js → bun-NS5YLOQT.js} +2 -2
  9. package/dist/bundle/{bun-sqlite-PYMKLBRU.js → bun-sqlite-KSKWRLLO.js} +9 -9
  10. package/dist/bundle/{chunk-COOOO5B3.js → chunk-2CG3LUQS.js} +4 -4
  11. package/dist/bundle/{chunk-YVI5SQPY.js → chunk-2TVHFJKV.js} +1 -1
  12. package/dist/bundle/chunk-35FIJGTT.js +52 -0
  13. package/dist/bundle/chunk-35GROSBS.js +3233 -0
  14. package/dist/bundle/{chunk-D5TGYUVU.js → chunk-3CH7I452.js} +9 -60
  15. package/dist/bundle/{chunk-ICDCAQ6K.js → chunk-3QBRS3JT.js} +13 -9
  16. package/dist/bundle/chunk-3T7JIHSO.js +353 -0
  17. package/dist/bundle/{chunk-Q7DOMFJ4.js → chunk-3VIEGRBA.js} +6 -6
  18. package/dist/bundle/chunk-3YCUYFTD.js +2159 -0
  19. package/dist/bundle/{chunk-CJLVYIOP.js → chunk-3ZGWJYSG.js} +30 -21
  20. package/dist/bundle/{chunk-YPFWNVHV.js → chunk-43PCMVTZ.js} +2 -100
  21. package/dist/bundle/{chunk-OF422U5D.js → chunk-4DK55MLP.js} +402 -402
  22. package/dist/bundle/chunk-4HP6KGBI.js +32 -0
  23. package/dist/bundle/chunk-4P6D6CUS.js +282 -0
  24. package/dist/bundle/chunk-4ZAQMDLD.js +1308 -0
  25. package/dist/bundle/chunk-4ZTB7LS3.js +87 -0
  26. package/dist/bundle/{chunk-6W763DZN.js → chunk-54O5NJRC.js} +14 -13
  27. package/dist/bundle/{chunk-MNLL5YLM.js → chunk-5BHP4FVM.js} +2 -2
  28. package/dist/bundle/{chunk-ACUAV6VX.js → chunk-6JU4KLAZ.js} +108 -72
  29. package/dist/bundle/{chunk-YMJ6IDGT.js → chunk-6KND2DYT.js} +38 -8
  30. package/dist/bundle/{chunk-4HWJOU7N.js → chunk-7YPZPJTB.js} +1 -1
  31. package/dist/bundle/chunk-A5XNUMW7.js +108 -0
  32. package/dist/bundle/{chunk-X4TIMMKJ.js → chunk-AG34MPVN.js} +1 -1
  33. package/dist/bundle/chunk-B5V2U7IS.js +221 -0
  34. package/dist/bundle/chunk-B6JC5RS3.js +696 -0
  35. package/dist/bundle/chunk-BDZXGDGI.js +80 -0
  36. package/dist/bundle/{chunk-B5KSXHJ7.js → chunk-BMTMGMGE.js} +1 -1
  37. package/dist/bundle/{chunk-ZCR3IRZ2.js → chunk-CP2TZXAG.js} +16 -9
  38. package/dist/bundle/{chunk-TAUBRNC5.js → chunk-DOEP4EPW.js} +72 -59
  39. package/dist/bundle/chunk-DQSOYH6N.js +20 -0
  40. package/dist/bundle/{chunk-QETR5HIZ.js → chunk-E2TMWONO.js} +4385 -2684
  41. package/dist/bundle/chunk-E5EYJU5R.js +7 -0
  42. package/dist/bundle/chunk-ECYOTDJM.js +14 -0
  43. package/dist/bundle/{chunk-HL52XXZX.js → chunk-EXHTGQR2.js} +3 -4
  44. package/dist/bundle/chunk-F4BX7TH2.js +15 -0
  45. package/dist/bundle/{chunk-ASMMG72J.js → chunk-FJQO5OHR.js} +261 -565
  46. package/dist/bundle/{chunk-RJOQH5YY.js → chunk-FKP4T7A4.js} +111 -859
  47. package/dist/bundle/{chunk-JDV7HNNQ.js → chunk-FTL3WXZB.js} +13 -26
  48. package/dist/bundle/{chunk-FP54WSIR.js → chunk-G2CH4FRW.js} +4 -4
  49. package/dist/bundle/chunk-G2KKMQRN.js +30 -0
  50. package/dist/bundle/{chunk-NYECVHFH.js → chunk-G4NHRFS7.js} +755 -0
  51. package/dist/bundle/{chunk-Y2NWGNUB.js → chunk-G7SKXAVZ.js} +5 -5
  52. package/dist/bundle/{chunk-FT3LN3HP.js → chunk-GFI3UUIU.js} +1 -1
  53. package/dist/bundle/chunk-GTPPUBYU.js +1876 -0
  54. package/dist/bundle/{chunk-QFR2PNJN.js → chunk-GTROGY74.js} +12 -12
  55. package/dist/bundle/{chunk-UTO2GO4P.js → chunk-GYAPDUF5.js} +45 -66
  56. package/dist/bundle/{chunk-GBKNJWOZ.js → chunk-HCMEU7AF.js} +8 -8
  57. package/dist/bundle/{chunk-FJH7DJWK.js → chunk-HDGJ7IDE.js} +6 -6
  58. package/dist/bundle/{chunk-Z3KUSRCF.js → chunk-HMN26CVU.js} +2 -2
  59. package/dist/bundle/{chunk-I4RWW3UD.js → chunk-HOICQNJX.js} +20 -5
  60. package/dist/bundle/{chunk-P7CUM5IB.js → chunk-HPS2YGSZ.js} +1 -1
  61. package/dist/bundle/{chunk-HMS6EEQL.js → chunk-HSASPXRW.js} +3 -3
  62. package/dist/bundle/{chunk-KGYVHPGE.js → chunk-IABPGOMT.js} +2 -2
  63. package/dist/bundle/{chunk-4QNW4NK6.js → chunk-IBQZT2YD.js} +1 -1
  64. package/dist/bundle/{chunk-PRW6SYA3.js → chunk-IE3R46YN.js} +313 -257
  65. package/dist/bundle/{chunk-7PDHGZN4.js → chunk-IE6O7463.js} +4 -4
  66. package/dist/bundle/{chunk-3UGYFXH6.js → chunk-IPBYU43F.js} +192 -379
  67. package/dist/bundle/{chunk-RWDKMU74.js → chunk-IS7STZEB.js} +3 -3
  68. package/dist/bundle/{chunk-GOWXXYEF.js → chunk-IV77ZFF4.js} +4 -4
  69. package/dist/bundle/{chunk-6XFIITOG.js → chunk-JDGF3YYS.js} +4811 -3486
  70. package/dist/bundle/{chunk-GPQ44Y2R.js → chunk-JHAACT4I.js} +2 -2
  71. package/dist/bundle/{chunk-SERXSCN3.js → chunk-JRED7BNX.js} +337 -390
  72. package/dist/bundle/{chunk-MIA7P6FZ.js → chunk-JSYUB4SM.js} +6 -6
  73. package/dist/bundle/{chunk-RESDD3Q4.js → chunk-JVM75M4H.js} +16 -3
  74. package/dist/bundle/{chunk-XF4EXO2C.js → chunk-JZ65CQWK.js} +6 -6
  75. package/dist/bundle/{chunk-QNRRK3CN.js → chunk-KBR7OC5S.js} +2 -2
  76. package/dist/bundle/chunk-KI6OOW6D.js +123 -0
  77. package/dist/bundle/chunk-KOI5G7NM.js +388 -0
  78. package/dist/bundle/{chunk-ZZ32DXTH.js → chunk-KPBUJQKT.js} +1 -1
  79. package/dist/bundle/{chunk-2LHAVY4U.js → chunk-KVBGIZ2C.js} +1 -1
  80. package/dist/bundle/chunk-L7P3LUDQ.js +286 -0
  81. package/dist/bundle/{chunk-SAKO3P4H.js → chunk-LKUWH6KU.js} +1 -1
  82. package/dist/bundle/chunk-MA6U4XH2.js +36 -0
  83. package/dist/bundle/{chunk-TAFHYHKA.js → chunk-MA7ETVTZ.js} +43 -186
  84. package/dist/bundle/{chunk-KYKW2W6X.js → chunk-MDJUYCHT.js} +1 -1
  85. package/dist/bundle/chunk-MEYYH47C.js +25 -0
  86. package/dist/bundle/{chunk-Z56QFOBR.js → chunk-MGC2BAD2.js} +1 -1
  87. package/dist/bundle/chunk-NMQRSEZM.js +37 -0
  88. package/dist/bundle/{chunk-5DPV7X27.js → chunk-NTZWY5R3.js} +321 -0
  89. package/dist/bundle/{chunk-OJSBWP3F.js → chunk-OBDPKDGB.js} +69 -7
  90. package/dist/bundle/{chunk-WVDCCYS3.js → chunk-ODTBJGWQ.js} +17 -17
  91. package/dist/bundle/chunk-PB6ACIME.js +80 -0
  92. package/dist/bundle/{chunk-5D4AEUVA.js → chunk-PL5P7UKW.js} +434 -1
  93. package/dist/bundle/{chunk-72C4YOCH.js → chunk-PMAV3RNP.js} +7 -7
  94. package/dist/bundle/chunk-PSY67L73.js +783 -0
  95. package/dist/bundle/{chunk-6TNNT2MQ.js → chunk-PUVQOZ2N.js} +483 -176
  96. package/dist/bundle/{chunk-SDKQNOL5.js → chunk-QB7K6PIP.js} +6 -6
  97. package/dist/bundle/chunk-QK7GKFKB.js +188 -0
  98. package/dist/bundle/{chunk-4PA4DHYV.js → chunk-QMUWHKP5.js} +6 -6
  99. package/dist/bundle/chunk-QURQ2OU2.js +250 -0
  100. package/dist/bundle/{chunk-LXKYKRHD.js → chunk-R3EDZWXF.js} +8 -227
  101. package/dist/bundle/{chunk-KGERXYTV.js → chunk-RM4DO2WZ.js} +1 -1
  102. package/dist/bundle/chunk-S27UKJVL.js +730 -0
  103. package/dist/bundle/{chunk-22QQUKWA.js → chunk-S3SLDYTU.js} +1 -1
  104. package/dist/bundle/{chunk-FCS26CYQ.js → chunk-SAEBHENE.js} +4 -4
  105. package/dist/bundle/chunk-SM7Z2BQF.js +561 -0
  106. package/dist/bundle/{chunk-QXC6IEH6.js → chunk-SODB63MR.js} +201 -423
  107. package/dist/bundle/{chunk-2PUNKUYJ.js → chunk-SSFGSY77.js} +10320 -9907
  108. package/dist/bundle/{chunk-37MAA6F2.js → chunk-STUPCKAA.js} +11 -2221
  109. package/dist/bundle/{chunk-BKSQBBYG.js → chunk-SUQT4KI2.js} +9 -9
  110. package/dist/bundle/{chunk-YPNWIB6H.js → chunk-SWQDKO6D.js} +3 -3
  111. package/dist/bundle/chunk-SZ7XJZGH.js +2231 -0
  112. package/dist/bundle/{chunk-3N2OFXB5.js → chunk-T3OK6AYZ.js} +5 -5
  113. package/dist/bundle/{chunk-HKY7X6NY.js → chunk-TFIAD57H.js} +4 -4
  114. package/dist/bundle/chunk-TRYYWV7J.js +291 -0
  115. package/dist/bundle/{chunk-XMMFBPGC.js → chunk-TUL6MCTY.js} +3 -3
  116. package/dist/bundle/{chunk-6Y2BYFXQ.js → chunk-UC7JLE6J.js} +0 -7
  117. package/dist/bundle/{chunk-YJIGGUPI.js → chunk-UL5HSHFU.js} +4 -4
  118. package/dist/bundle/{chunk-3EBBLKIT.js → chunk-UT64BBEP.js} +4 -4
  119. package/dist/bundle/{chunk-26DHFMGZ.js → chunk-VBIZD5V5.js} +2 -2
  120. package/dist/bundle/chunk-VHTELRUA.js +50 -0
  121. package/dist/bundle/chunk-VOQICE3G.js +340 -0
  122. package/dist/bundle/{chunk-GZ2D4KXG.js → chunk-WDJRUNQN.js} +35 -12
  123. package/dist/bundle/{chunk-2UUWXPOB.js → chunk-X5CXANSA.js} +3 -3
  124. package/dist/bundle/{chunk-35SCQ4VI.js → chunk-X6HPQKAI.js} +43 -35
  125. package/dist/bundle/{chunk-COJSWDNU.js → chunk-XKWQDQ4B.js} +3 -3
  126. package/dist/bundle/{chunk-6SJOTNHF.js → chunk-XZEVHUKI.js} +6 -28
  127. package/dist/bundle/{chunk-JZHBZOJR.js → chunk-YE7DJB3F.js} +3 -3
  128. package/dist/bundle/chunk-YHWFF6DN.js +39 -0
  129. package/dist/bundle/{chunk-2BVVU7GG.js → chunk-YJVQ5GST.js} +1 -1
  130. package/dist/bundle/{chunk-ZM63SUHG.js → chunk-YRCGFSRR.js} +2 -2
  131. package/dist/bundle/{chunk-EOEU3AZN.js → chunk-ZNFXKFGF.js} +13 -13
  132. package/dist/bundle/{cli-556DERZL.js → cli-KXRWXGTS.js} +217 -114
  133. package/dist/bundle/command-contract-BGNT7MTQ.js +45 -0
  134. package/dist/bundle/{command-server-entry-AYLGNZWD.js → command-server-entry-7FZX74T6.js} +36 -34
  135. package/dist/bundle/{decode-QU24MWMN.js → decode-SZ6W34U3.js} +10 -10
  136. package/dist/bundle/{dispatch-4KODNOXV.js → dispatch-4KNSZ3PI.js} +10 -10
  137. package/dist/bundle/dist-PAKDDIBT.js +191 -0
  138. package/dist/bundle/drive.js +11 -11
  139. package/dist/bundle/{echarts-BXX4OQWC.js → echarts-ISH62J4E.js} +2 -2
  140. package/dist/bundle/{embed-KG27KG3D.js → embed-6ODGTZPK.js} +10 -10
  141. package/dist/bundle/{embedder-IPAVUQUV.js → embedder-6FY67FTQ.js} +15 -15
  142. package/dist/bundle/entry-2SA6ZX7E.js +25 -0
  143. package/dist/bundle/{failure-ESL7ETL4.js → failure-V3ILKUTX.js} +4 -4
  144. package/dist/bundle/first-run-ZNKPPD6M.js +31 -0
  145. package/dist/bundle/first-screen-WF6GYLPN.js +45 -0
  146. package/dist/bundle/google-QCADNPCQ.js +46 -0
  147. package/dist/bundle/{google-api-VCDBSNOW.js → google-api-ZTI3NKZX.js} +88 -73
  148. package/dist/bundle/grants-BPN5AGDK.js +133 -0
  149. package/dist/bundle/hast-util-from-html-X2DCPS3T.js +10531 -0
  150. package/dist/bundle/hast-util-to-html-VP6XLPKJ.js +998 -0
  151. package/dist/bundle/hast-util-to-mdast-IZ5PRX72.js +2272 -0
  152. package/dist/bundle/{identity-LOWMVGZY.js → identity-YX4IPGOO.js} +7 -6
  153. package/dist/bundle/{instructions-2VECIDXF.js → instructions-G5ZGHVFB.js} +1 -1
  154. package/dist/bundle/{login-7GBONT7V.js → login-CVX5VJX6.js} +96 -81
  155. package/dist/bundle/{mcp-O6ACR2DX.js → mcp-MQ2L5IIM.js} +2 -2
  156. package/dist/bundle/{mdast-util-from-markdown-FXEPSNER.js → mdast-util-from-markdown-HEZF7KJ4.js} +137 -195
  157. package/dist/bundle/mdast-util-gfm-AQW6R6MG.js +925 -0
  158. package/dist/bundle/mdast-util-to-hast-DF2QVIRV.js +879 -0
  159. package/dist/bundle/mdast-util-to-markdown-XYLXB3Z3.js +18 -0
  160. package/dist/bundle/meeting-combined-HKZJMJ6Q.js +28 -0
  161. package/dist/bundle/meeting-model-DSE4GRVE.js +29 -0
  162. package/dist/bundle/{meeting-semantic-G7PFOKU7.js → meeting-semantic-OHG2QN2G.js} +10 -10
  163. package/dist/bundle/{micromark-extension-gfm-GRL24TU6.js → micromark-extension-gfm-OE2GBORZ.js} +11 -78
  164. package/dist/bundle/{node-MPEQSFI3.js → node-NLJINXVQ.js} +2 -2
  165. package/dist/bundle/{node-sqlite-OLQMAYB4.js → node-sqlite-KDFQDYVZ.js} +10 -10
  166. package/dist/bundle/notes-search-3VBVSQ3R.js +70 -0
  167. package/dist/bundle/oauth-M3E62ZHC.js +22 -0
  168. package/dist/bundle/{open-OXTE672W.js → open-WVRUVBIZ.js} +8 -8
  169. package/dist/bundle/{openai-EB3TPIZY.js → openai-JJWOSJMV.js} +22 -21
  170. package/dist/bundle/{process-F6TKXWWA.js → process-LPVAYRO7.js} +1 -1
  171. package/dist/bundle/{program-4IFDZ7FM.js → program-ZJRIP25J.js} +276 -1149
  172. package/dist/bundle/{prompt-F5RRHPN2.js → prompt-XCDHTEAO.js} +8 -8
  173. package/dist/bundle/{reasons-UORHJDHK.js → reasons-REEEQDAZ.js} +6 -5
  174. package/dist/bundle/{recognize-DAVNZND3.js → recognize-OZLFDJAT.js} +7 -7
  175. package/dist/bundle/remote-MDPYVCZB.js +35 -0
  176. package/dist/bundle/{rerank-CND2GVLZ.js → rerank-FLZWJNHA.js} +11 -11
  177. package/dist/bundle/{serve-ZHSPUIGX.js → serve-5UV5VLRV.js} +19 -19
  178. package/dist/bundle/{server-YMAK4LHC.js → server-53A2X2MK.js} +89 -70
  179. package/dist/bundle/server-5GMURMDE.js +97 -0
  180. package/dist/bundle/{services-ZILSFJ6E.js → services-XSMH7BXB.js} +109 -89
  181. package/dist/bundle/{sqlite-runtime-S5VPMZQH.js → sqlite-runtime-E3L7ENFU.js} +9 -9
  182. package/dist/bundle/{start-CR6X25RT.js → start-4S2VNR4J.js} +7 -7
  183. package/dist/bundle/{state-YFPHVIIJ.js → state-TQI4JSH7.js} +9 -9
  184. package/dist/bundle/{store-CL4ZJZRI.js → store-GS7PU6PJ.js} +38 -23
  185. package/dist/bundle/{store-UODRT6X4.js → store-VYJPL7MW.js} +36 -25
  186. package/dist/bundle/store-maintenance-command-JJVYUZMG.js +85 -0
  187. package/dist/bundle/surface-JC4XVMZR.js +83 -0
  188. package/dist/bundle/tokens-KJQ5EAPW.js +133 -0
  189. package/dist/commands/documents.d.ts.map +1 -1
  190. package/dist/commands/documents.js +11 -1
  191. package/dist/commands/documents.js.map +1 -1
  192. package/dist/commands/remote.d.ts.map +1 -1
  193. package/dist/commands/remote.js +8 -22
  194. package/dist/commands/remote.js.map +1 -1
  195. package/dist/commands/sync.d.ts.map +1 -1
  196. package/dist/commands/sync.js +14 -4
  197. package/dist/commands/sync.js.map +1 -1
  198. package/dist/config.d.ts +5 -0
  199. package/dist/config.d.ts.map +1 -1
  200. package/dist/config.js +5 -0
  201. package/dist/config.js.map +1 -1
  202. package/dist/first-screen.d.ts.map +1 -1
  203. package/dist/first-screen.js +2 -1
  204. package/dist/first-screen.js.map +1 -1
  205. package/dist/generated/manifest.d.ts +2 -1
  206. package/dist/generated/manifest.d.ts.map +1 -1
  207. package/dist/generated/manifest.js +782 -0
  208. package/dist/generated/manifest.js.map +1 -1
  209. package/dist/generated/types.d.ts +262 -58
  210. package/dist/generated/types.d.ts.map +1 -1
  211. package/dist/google.d.ts.map +1 -1
  212. package/dist/google.js +5 -5
  213. package/dist/google.js.map +1 -1
  214. package/dist/model.d.ts +5 -2
  215. package/dist/model.d.ts.map +1 -1
  216. package/dist/model.js.map +1 -1
  217. package/dist/policy-keys.js +1 -1
  218. package/dist/policy-keys.js.map +1 -1
  219. package/dist/program.d.ts.map +1 -1
  220. package/dist/program.js +9 -4
  221. package/dist/program.js.map +1 -1
  222. package/dist/state.d.ts.map +1 -1
  223. package/dist/state.js +6 -1
  224. package/dist/state.js.map +1 -1
  225. package/dist/store.d.ts.map +1 -1
  226. package/dist/store.js +2 -7
  227. package/dist/store.js.map +1 -1
  228. package/dist/supported.d.ts +2 -2
  229. package/dist/supported.d.ts.map +1 -1
  230. package/dist/supported.js +2 -3
  231. package/dist/supported.js.map +1 -1
  232. package/dist/sync.d.ts +2 -1
  233. package/dist/sync.d.ts.map +1 -1
  234. package/dist/sync.js +5 -2
  235. package/dist/sync.js.map +1 -1
  236. package/dist/version.d.ts +1 -1
  237. package/dist/version.js +1 -1
  238. package/package.json +3 -3
  239. package/scenarios/find-decision.md +1 -1
  240. package/skills/drive-cli/SKILL.md +4 -2
  241. package/dist/bundle/chunk-J5Q5FS2N.js +0 -593
  242. package/dist/bundle/chunk-L46C6HQ7.js +0 -729
  243. package/dist/bundle/chunk-UDMNY63V.js +0 -899
  244. package/dist/bundle/chunk-VKE77B3F.js +0 -2
  245. package/dist/bundle/command-contract-VRTOAV6W.js +0 -43
  246. package/dist/bundle/entry-MVXQETWS.js +0 -25
  247. package/dist/bundle/first-run-4UVLW2WR.js +0 -31
  248. package/dist/bundle/first-screen-JAKAIINI.js +0 -41
  249. package/dist/bundle/google-22NXXJX5.js +0 -45
  250. package/dist/bundle/grants-MQMTVCRQ.js +0 -118
  251. package/dist/bundle/mdast-util-gfm-SZM5GBDF.js +0 -2103
  252. package/dist/bundle/meeting-combined-LVP4AZKA.js +0 -27
  253. package/dist/bundle/meeting-model-RAY5XDXZ.js +0 -29
  254. package/dist/bundle/oauth-SGH2I2BY.js +0 -22
  255. package/dist/bundle/remote-D5EYYIAU.js +0 -35
  256. package/dist/bundle/server-DUVJWP3Q.js +0 -80
  257. package/dist/bundle/store-maintenance-command-DY5XIBWR.js +0 -72
  258. package/dist/bundle/tokens-AF7QOFOF.js +0 -118
@@ -9,11 +9,11 @@ import {
9
9
  timezoneOf,
10
10
  validateQuery,
11
11
  walkQuery
12
- } from "./chunk-OF422U5D.js";
12
+ } from "./chunk-4DK55MLP.js";
13
13
  import {
14
14
  singleLine,
15
15
  visibleControls
16
- } from "./chunk-KYKW2W6X.js";
16
+ } from "./chunk-MDJUYCHT.js";
17
17
  import {
18
18
  STEPS,
19
19
  array,
@@ -39,15 +39,15 @@ import {
39
39
  strictObject,
40
40
  string,
41
41
  union
42
- } from "./chunk-OJSBWP3F.js";
42
+ } from "./chunk-OBDPKDGB.js";
43
43
  import {
44
44
  CliError
45
- } from "./chunk-4QNW4NK6.js";
45
+ } from "./chunk-IBQZT2YD.js";
46
46
  import {
47
47
  __name
48
48
  } from "./chunk-ZVVMGPBJ.js";
49
49
 
50
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/reference.js
50
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/reference.js
51
51
  var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "expected meeting:<accountId>/<meetingId>[/<transcriptId>[/<cuePosition>]] with safe integer IDs"), "invalid");
52
52
  var integer2 = /* @__PURE__ */ __name((value, minimum = 1) => {
53
53
  if (!Number.isSafeInteger(value) || value < minimum)
@@ -84,7 +84,7 @@ var parseMeetingReference = /* @__PURE__ */ __name((text7) => {
84
84
  }, "parseMeetingReference");
85
85
  var canonicalMeetingReference = /* @__PURE__ */ __name((text7) => formatMeetingReference(parseMeetingReference(text7)), "canonicalMeetingReference");
86
86
 
87
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/payment.js
87
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/payment.js
88
88
  var FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
89
89
  var PAYMENT_DIRECTIONS = ["to_us", "from_us"];
90
90
  var PAYMENT_STATES = ["expected", "paid", "cancelled"];
@@ -178,7 +178,7 @@ var paymentTitle = /* @__PURE__ */ __name((fact) => {
178
178
  return `${grouped(payment.amount)} ${payment.currency} ${way}${party}${item}${due} (${payment.state})`;
179
179
  }, "paymentTitle");
180
180
 
181
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
181
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
182
182
  var context = {
183
183
  command: "search meetings",
184
184
  guide: "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md#\u0432\u0441\u0442\u0440\u0435\u0447\u0438"
@@ -300,7 +300,24 @@ var meetingWordsQuery = /* @__PURE__ */ __name((text7) => {
300
300
  return { version: 1, language: "lucene-v1", root };
301
301
  }, "meetingWordsQuery");
302
302
 
303
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/passage.js
303
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/search-store.js
304
+ var refreshMeetingIndex = /* @__PURE__ */ __name(async (meetings, accountId, signal) => {
305
+ let before = Number.POSITIVE_INFINITY;
306
+ for (; ; ) {
307
+ signal?.throwIfAborted();
308
+ const { indexed, remaining } = await meetings.indexSearch({
309
+ accountId,
310
+ limit: 1e3,
311
+ maxReadBytes: 64 * 1024 ** 2,
312
+ signal
313
+ });
314
+ if (remaining === 0 || indexed === 0 || remaining >= before)
315
+ return;
316
+ before = remaining;
317
+ }
318
+ }, "refreshMeetingIndex");
319
+
320
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/passage.js
304
321
  var meetingHitContextLimits = /* @__PURE__ */ __name((options = {}) => {
305
322
  const { before = 3, after = 3, bytes = 65536, max_read_bytes = 4194304, expected_fingerprint } = options;
306
323
  if (![before, after].every((value) => Number.isSafeInteger(value) && value >= 0) || before + after > 999 || !Number.isSafeInteger(bytes) || bytes < 2 || bytes > 4194304 || !Number.isSafeInteger(max_read_bytes) || max_read_bytes < 1 || max_read_bytes > 67108864 || expected_fingerprint !== void 0 && (typeof expected_fingerprint !== "string" || !/^[a-f0-9]{64}$/.test(expected_fingerprint)))
@@ -321,7 +338,7 @@ var validateMeetingPassage = /* @__PURE__ */ __name((reference2, options) => {
321
338
  throw new CliError("validation_error", "choose a cue reference and json, text or markdown output");
322
339
  }, "validateMeetingPassage");
323
340
 
324
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
341
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
325
342
  var text = string();
326
343
  var identifier = pipe(text, minLength(1));
327
344
  var nullableText = nullable(text);
@@ -493,7 +510,7 @@ var MEETING_RESULT_ENTITIES = {
493
510
  meeting_repair: repair
494
511
  };
495
512
 
496
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/search/service-query.js
513
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/search/service-query.js
497
514
  var BACKENDS = ["archive", "server", "both"];
498
515
  var MAX_BRANCHES = 64;
499
516
  var some = /* @__PURE__ */ __name((value) => value === void 0 ? [] : [value], "some");
@@ -532,7 +549,10 @@ var RELATIVE_TIME = /^\d+[mhd]$/i;
532
549
  var OFFSET = /(?:Z|[+-]\d{2}:?\d{2})$/i;
533
550
  var readsZone = /* @__PURE__ */ __name((ast, times) => walkQuery(ast.root).some((term) => times.has(term.field) && [term.value, term.upper].some((value) => value !== void 0 && value !== "*" && !RELATIVE_TIME.test(value) && !OFFSET.test(value))), "readsZone");
534
551
 
535
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/item.js
552
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/model.js
553
+ var MEETING_CALL_DIRECTIONS = ["in", "out"];
554
+
555
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/item.js
536
556
  var text2 = string();
537
557
  var count2 = pipe(number(), integer(), minValue(0));
538
558
  var MEETING_ISSUES = ["time_without_zone"];
@@ -540,6 +560,12 @@ var meetingIssuesOf = /* @__PURE__ */ __name((metadata) => {
540
560
  const listed2 = metadata?.issues;
541
561
  return Array.isArray(listed2) ? MEETING_ISSUES.filter((issue) => listed2.includes(issue)) : [];
542
562
  }, "meetingIssuesOf");
563
+ var meetingCall = strictObject({
564
+ direction: nullable(picklist(MEETING_CALL_DIRECTIONS)),
565
+ manager: nullable(strictObject({ name: nullable(text2), person: nullable(reference) })),
566
+ client_phone: nullable(text2)
567
+ });
568
+ var meetingCallItem = /* @__PURE__ */ __name((row) => row.direction == null && row.clientPhone == null ? void 0 : { direction: row.direction ?? null, manager: row.manager ?? null, client_phone: row.clientPhone ?? null }, "meetingCallItem");
543
569
  var meetingEntries = {
544
570
  ref: reference,
545
571
  id: pipe(string(), minLength(1)),
@@ -557,6 +583,8 @@ var meetingEntries = {
557
583
  duration_ms: nullable(count2),
558
584
  timezone: optional(nullable(text2)),
559
585
  participants_count: nullable(count2),
586
+ /** Present only on a phone call. */
587
+ call: optional(meetingCall),
560
588
  /** Present only when something about this meeting is doubtful. */
561
589
  issues: optional(array(picklist(MEETING_ISSUES))),
562
590
  /**
@@ -574,6 +602,7 @@ var MEETING_UNTRUSTED = ["title", "description", "location"];
574
602
  var iso = /* @__PURE__ */ __name((ms2) => ms2 === null ? null : new Date(ms2).toISOString(), "iso");
575
603
  var meetingItem = /* @__PURE__ */ __name((row, owner) => {
576
604
  const issues = meetingIssuesOf(row.metadata);
605
+ const call = meetingCallItem(row);
577
606
  return {
578
607
  ref: formatMeetingReference({ type: "meeting", accountId: row.accountId, meetingId: row.id }),
579
608
  id: String(row.id),
@@ -589,6 +618,7 @@ var meetingItem = /* @__PURE__ */ __name((row, owner) => {
589
618
  duration_ms: row.durationMs,
590
619
  timezone: row.timezone,
591
620
  participants_count: row.participantsCount,
621
+ ...call ? { call } : {},
592
622
  ...issues.length ? { issues } : {},
593
623
  untrusted: [...MEETING_UNTRUSTED],
594
624
  created_at: new Date(row.createdAt).toISOString(),
@@ -622,7 +652,7 @@ var MEETING_QUERY = {
622
652
  })
623
653
  };
624
654
 
625
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/store.js
655
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/store.js
626
656
  var MEETING_DOCUMENT_ROLES = ["transcript", "recording", "notes"];
627
657
  var TRANSCRIPT_WORDS = [
628
658
  "Transcript",
@@ -634,7 +664,7 @@ var TRANSCRIPT_WORDS = [
634
664
  ];
635
665
  var READ_BUDGET_EXCEEDED = "Meeting search exceeds its stored text byte budget";
636
666
 
637
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/answers.js
667
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/answers.js
638
668
  var text3 = string();
639
669
  var count3 = pipe(number(), integer(), minValue(0));
640
670
  var iso2 = /* @__PURE__ */ __name((ms2) => ms2 === null ? null : new Date(ms2).toISOString(), "iso");
@@ -918,7 +948,7 @@ var meetingHitsList = /* @__PURE__ */ __name((found, limit, command = "search me
918
948
  };
919
949
  }, "meetingHitsList");
920
950
 
921
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
951
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
922
952
  var joinKeyOf = /* @__PURE__ */ __name((url) => {
923
953
  const parsed = urlOf(url);
924
954
  if (!parsed)
@@ -952,7 +982,7 @@ var urlOf = /* @__PURE__ */ __name((url) => {
952
982
  }
953
983
  }, "urlOf");
954
984
 
955
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
985
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
956
986
  var ENTITIES = { amp: "&", lt: "<", gt: ">", quot: '"', "#39": "'", apos: "'", nbsp: " " };
957
987
  var SECRET_LINE = /(?<![\p{L}\p{N}])(pass ?codes?|passwords?|pwd|pins?|access ?codes?|meeting ?codes?|kennwort|пароль|пин-?код|код доступа)(?![\p{L}\p{N}])|pwd=/iu;
958
988
  var htmlToText = /* @__PURE__ */ __name((html) => html.replace(/<\s*br\s*\/?>/giu, "\n").replace(/<\/\s*(p|div|li|tr|h[1-6])\s*>/giu, "\n").replace(/<a\s[^>]*href\s*=\s*"([^"]*)"[^>]*>/giu, " $1 ").replace(/<[^>]+>/gu, "").replace(/&(amp|lt|gt|quot|#39|apos|nbsp);/gu, (_, name) => ENTITIES[name] ?? ""), "htmlToText");
@@ -989,7 +1019,7 @@ var entryMetadata = /* @__PURE__ */ __name((metadata) => {
989
1019
  return kept;
990
1020
  }, "entryMetadata");
991
1021
 
992
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/calls.js
1022
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/calls.js
993
1023
  var CALL_DIRECTIONS = ["incoming", "outgoing", "internal"];
994
1024
  var CALL_OUTCOMES = ["answered", "voicemail", "busy", "no_answer", "failed"];
995
1025
  var MISSED_OUTCOMES = ["voicemail", "busy", "no_answer"];
@@ -1058,7 +1088,7 @@ var callOf = /* @__PURE__ */ __name((stored) => {
1058
1088
  };
1059
1089
  }, "callOf");
1060
1090
 
1061
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/call-answers.js
1091
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/call-answers.js
1062
1092
  var count4 = pipe(number(), integer(), minValue(0));
1063
1093
  var ms = count4;
1064
1094
  var id = pipe(number(), integer(), minValue(1));
@@ -1221,7 +1251,7 @@ var callStatsItem = /* @__PURE__ */ __name((found) => {
1221
1251
  };
1222
1252
  }, "callStatsItem");
1223
1253
 
1224
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/stats.js
1254
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/stats.js
1225
1255
  var MEETING_COUNTS_GROUPINGS = ["day", "week", "series"];
1226
1256
  var zoneOf = /* @__PURE__ */ __name((timeZone) => {
1227
1257
  const zone = timeZone ?? "UTC";
@@ -1356,7 +1386,7 @@ var aggregateMeetingStats = /* @__PURE__ */ __name((rows, timeZone) => {
1356
1386
  };
1357
1387
  }, "aggregateMeetingStats");
1358
1388
 
1359
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/call-stats.js
1389
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/call-stats.js
1360
1390
  var CALLBACK_WITHIN_MS = 24 * 60 * 60 * 1e3;
1361
1391
  var SHORT_CALL_UNDER_MS = 3e4;
1362
1392
  var MOST_MISSED = 100;
@@ -1546,7 +1576,7 @@ var aggregateCallStats = /* @__PURE__ */ __name((calls, options = {}) => {
1546
1576
  };
1547
1577
  }, "aggregateCallStats");
1548
1578
 
1549
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
1579
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
1550
1580
  import { createHash } from "node:crypto";
1551
1581
  var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256").update(JSON.stringify({
1552
1582
  reference: cue2.reference,
@@ -1560,7 +1590,7 @@ var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256"
1560
1590
  text: cue2.text
1561
1591
  })).digest("hex"), "meetingCueFingerprint");
1562
1592
 
1563
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
1593
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
1564
1594
  var EVENT_QUERY = defineQuery({
1565
1595
  entity: "event",
1566
1596
  backend: "sql",
@@ -1576,7 +1606,7 @@ var EVENT_QUERY = defineQuery({
1576
1606
  ]
1577
1607
  });
1578
1608
 
1579
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
1609
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
1580
1610
  var PARTICIPANT_RESPONSES = ["needs-action", "accepted", "tentative", "declined", "delegated"];
1581
1611
  var UNTIL = /(?:^|;)UNTIL=(\d{4})(\d{2})(\d{2})(?:T(\d{2})(\d{2})(\d{2})Z?)?(?:;|$)/iu;
1582
1612
  var seriesEnd = /* @__PURE__ */ __name((entry) => {
@@ -1600,7 +1630,7 @@ var entryInWindow = /* @__PURE__ */ __name((entry, window) => {
1600
1630
  return Math.max(entry.endsAt ?? start, start + 1) > window.from;
1601
1631
  }, "entryInWindow");
1602
1632
 
1603
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/events.js
1633
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/events.js
1604
1634
  var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now(), { create = true } = {}) => {
1605
1635
  const current = await store.meeting(details.meeting.id);
1606
1636
  if (!current)
@@ -1645,7 +1675,7 @@ var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now(),
1645
1675
  return (await store.events()).find((e) => e.id === linked?.meeting.eventId) ?? null;
1646
1676
  }, "linkEvent");
1647
1677
 
1648
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
1678
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
1649
1679
  var normalizeMeetingParticipantQuery = /* @__PURE__ */ __name((text7) => text7.normalize("NFKC").toLowerCase(), "normalizeMeetingParticipantQuery");
1650
1680
  var validateMeetingParticipantQuery = /* @__PURE__ */ __name((query) => {
1651
1681
  if (typeof query !== "string" || !query.trim() || query.length > 500 || query.includes("\0"))
@@ -1669,7 +1699,7 @@ var validateMeetingParticipantSearch = /* @__PURE__ */ __name((query, input) =>
1669
1699
  };
1670
1700
  }, "validateMeetingParticipantSearch");
1671
1701
 
1672
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/reads.js
1702
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/reads.js
1673
1703
  var MeetingError = class extends CliError {
1674
1704
  static {
1675
1705
  __name(this, "MeetingError");
@@ -1808,7 +1838,7 @@ var meetingSummaryAnswer = /* @__PURE__ */ __name(async (store, id5, accountId)
1808
1838
  return wholeList(details.summaries.map((one) => meetingSummaryItem(details.meeting.accountId, one)));
1809
1839
  }, "meetingSummaryAnswer");
1810
1840
 
1811
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/export.js
1841
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/export.js
1812
1842
  var timestamp = /* @__PURE__ */ __name((milliseconds2) => {
1813
1843
  if (!Number.isSafeInteger(milliseconds2) || milliseconds2 < 0)
1814
1844
  throw new MeetingError("validation_error", "transcript times must be nonnegative integer milliseconds");
@@ -1905,10 +1935,10 @@ var exportMeeting = /* @__PURE__ */ __name(async (store, id5, options) => {
1905
1935
  };
1906
1936
  }, "exportMeeting");
1907
1937
 
1908
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
1938
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
1909
1939
  import { createHash as createHash2 } from "node:crypto";
1910
1940
 
1911
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
1941
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
1912
1942
  var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
1913
1943
  if (typeof value !== "string" || !/^\d{4}-\d{2}-\d{2}T.+(?:Z|[+-]\d{2}:\d{2})$/i.test(value) || !Number.isFinite(Date.parse(value)))
1914
1944
  throw new CliError("validation_error", `${name} must be an ISO timestamp with a timezone, such as 2026-11-09T09:00:00Z`);
@@ -1919,7 +1949,7 @@ var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
1919
1949
  return new Date(value).toISOString();
1920
1950
  }, "meetingTimestamp");
1921
1951
 
1922
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
1952
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
1923
1953
  var TASK_TYPES = ["bug", "feature", "chore"];
1924
1954
  var invalid3 = /* @__PURE__ */ __name((message) => {
1925
1955
  throw new CliError("validation_error", message);
@@ -2094,7 +2124,7 @@ var validateBatch = /* @__PURE__ */ __name((input, rules, most, one) => {
2094
2124
  var validateFindings = /* @__PURE__ */ __name((input, rules) => validateBatch(input, rules, 16, (finding, ids2) => validateFinding(finding, rules, ids2)), "validateFindings");
2095
2125
  var findingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "findingFingerprint");
2096
2126
 
2097
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/findings.js
2127
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/findings.js
2098
2128
  var MEETING_FINDINGS_KIND = "meeting_findings";
2099
2129
  var cue = /* @__PURE__ */ __name((raw) => {
2100
2130
  const reference2 = canonicalMeetingReference(raw);
@@ -2105,7 +2135,7 @@ var cue = /* @__PURE__ */ __name((raw) => {
2105
2135
  var validateMeetingFindings = /* @__PURE__ */ __name((input) => validateFindings(input, { plural: "meeting findings", singular: "meeting finding", cited: "cue", reference: cue }), "validateMeetingFindings");
2106
2136
  var meetingFindingFingerprint = findingFingerprint;
2107
2137
 
2108
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/language.js
2138
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/language.js
2109
2139
  var LATIN_WORDS = {
2110
2140
  en: ["the", "and", "is", "that", "you", "this", "what", "have", "with", "are"],
2111
2141
  es: ["el", "los", "las", "por", "pero", "para", "est\xE1", "muy", "tambi\xE9n", "hay"],
@@ -2154,7 +2184,7 @@ var transcriptLanguage = /* @__PURE__ */ __name((texts) => {
2154
2184
  return null;
2155
2185
  }, "transcriptLanguage");
2156
2186
 
2157
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
2187
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
2158
2188
  var contentHash = /* @__PURE__ */ __name(async (text7) => {
2159
2189
  const bytes = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(text7));
2160
2190
  return Array.from(new Uint8Array(bytes), (byte) => byte.toString(16).padStart(2, "0")).join("");
@@ -2191,7 +2221,223 @@ var timestamp2 = /* @__PURE__ */ __name((value) => {
2191
2221
  return time;
2192
2222
  }, "timestamp");
2193
2223
 
2194
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
2224
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/pull.js
2225
+ var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, position, accountId) => {
2226
+ const { identityExternalId, phone, ...fields2 } = p;
2227
+ const externalId = identityExternalId ?? (p.email ? `email:${p.email.toLowerCase()}` : p.externalId) ?? `name:${p.displayName ?? "unknown"}@${accountId}/${occurrenceId2}:${position}`;
2228
+ return {
2229
+ ...fields2,
2230
+ identity: {
2231
+ provider,
2232
+ externalId,
2233
+ name: p.displayName,
2234
+ ...phone?.trim() ? { phone } : {},
2235
+ metadata: p.metadata,
2236
+ associatePerson: Boolean(identityExternalId?.trim() || p.email?.trim() || p.externalId?.trim())
2237
+ }
2238
+ };
2239
+ }, "participantInput");
2240
+ var participantInputs = /* @__PURE__ */ __name((provider, occurrenceId2, list, accountId) => list.map((p, i) => participantInput(p, provider, occurrenceId2, i, accountId)), "participantInputs");
2241
+ var sourceMeetingInput = /* @__PURE__ */ __name((m, accountId, participantsCount, kept) => {
2242
+ const startedAt = timestamp2(m.occurrence.startedAt);
2243
+ const given = m.occurrence.endedAt === null ? null : timestamp2(m.occurrence.endedAt);
2244
+ if (given !== null && given < startedAt)
2245
+ throw new Error("Meeting ends before it starts");
2246
+ const keptEnd = kept?.endedAt ?? null;
2247
+ const endedAt = given ?? (keptEnd !== null && keptEnd >= startedAt ? keptEnd : null);
2248
+ const count7 = participantsCount === null && kept ? kept.participantsCount : participantsCount;
2249
+ const metadata = kept?.metadata && m.metadata ? { ...kept.metadata, ...m.metadata } : m.metadata ?? kept?.metadata ?? null;
2250
+ const meeting2 = {
2251
+ accountId,
2252
+ externalId: m.occurrence.id,
2253
+ title: m.occurrence.title,
2254
+ description: m.description ?? kept?.description ?? null,
2255
+ location: m.location ?? kept?.location ?? null,
2256
+ joinUrl: m.joinUrl ?? m.series?.joinUrl ?? kept?.joinUrl ?? null,
2257
+ startedAt,
2258
+ endedAt,
2259
+ durationMs: endedAt === null ? null : endedAt - startedAt,
2260
+ timezone: m.timezone ?? kept?.timezone ?? null,
2261
+ hostIdentityId: kept?.hostIdentityId ?? null,
2262
+ ...count7 === void 0 ? {} : { participantsCount: count7 },
2263
+ ...m.call ? { direction: m.call.direction ?? null, clientPhone: m.call.clientPhone ?? null } : {},
2264
+ metadata,
2265
+ deletedAt: null
2266
+ };
2267
+ if (m.series)
2268
+ meeting2.series = {
2269
+ externalId: m.series.id,
2270
+ title: m.series.title,
2271
+ description: null,
2272
+ kind: m.series.kind ?? null,
2273
+ recurrence: m.series.recurrence ?? null,
2274
+ hostIdentityId: null,
2275
+ joinUrl: m.series.joinUrl ?? null,
2276
+ metadata: null,
2277
+ deletedAt: null
2278
+ };
2279
+ return meeting2;
2280
+ }, "sourceMeetingInput");
2281
+ var saveSourceMeeting = /* @__PURE__ */ __name(async (source, store, m, parts, { accountId, now, kept }) => {
2282
+ const id5 = m.occurrence.id;
2283
+ const { participants: sourceParticipants, transcript: lines, chat, summary } = parts;
2284
+ const participants = participantInputs(source.provider, id5, sourceParticipants ?? [], accountId);
2285
+ const meeting2 = sourceMeetingInput(m, accountId, sourceParticipants === void 0 ? void 0 : sourceParticipants?.length ?? null, kept);
2286
+ const linked = sourceParticipants !== void 0;
2287
+ const format = source.transcriptFormat ?? null;
2288
+ const transcripts = lines && linked ? [await transcriptInput(lines, participants, source.name, void 0, format)] : void 0;
2289
+ const details = await store.saveMeeting({
2290
+ meeting: meeting2,
2291
+ participants: sourceParticipants ? participants : void 0,
2292
+ transcripts,
2293
+ chat: chat?.map((line2) => ({
2294
+ externalId: null,
2295
+ sentAt: timestamp2(line2.sentAt),
2296
+ senderParticipantPosition: speakerPosition(line2.sender, participants),
2297
+ senderName: line2.sender,
2298
+ recipient: null,
2299
+ text: line2.text,
2300
+ normalizedText: null,
2301
+ metadata: null
2302
+ })),
2303
+ summaries: summary ? [
2304
+ {
2305
+ ...summary,
2306
+ source: summary.source ?? source.name,
2307
+ content: summary.content ?? null,
2308
+ docUrl: summary.docUrl ?? null,
2309
+ externalCreatedAt: summary.externalCreatedAt ?? null,
2310
+ externalUpdatedAt: summary.externalUpdatedAt ?? null,
2311
+ metadata: summary.metadata ?? null
2312
+ }
2313
+ ] : void 0,
2314
+ attachments: parts.files ?? void 0,
2315
+ documents: parts.documents ?? void 0,
2316
+ now
2317
+ });
2318
+ if (lines && !linked && !details.transcripts.some((t) => t.transcript.source === source.name && t.transcript.supersededAt === null))
2319
+ await store.saveMeeting({
2320
+ meeting: meeting2,
2321
+ transcripts: [await transcriptInput(lines, [], source.name, `${JSON.stringify(lines)}
2322
+ unlinked`, format)],
2323
+ now
2324
+ });
2325
+ await linkEvent(store, details, now, { create: source.createsEvents !== false });
2326
+ return details;
2327
+ }, "saveSourceMeeting");
2328
+ var startOf = /* @__PURE__ */ __name((m) => {
2329
+ const at = Date.parse(m.occurrence.startedAt);
2330
+ return Number.isFinite(at) ? at : Number.POSITIVE_INFINITY;
2331
+ }, "startOf");
2332
+ var indexSaved = /* @__PURE__ */ __name(async (store, accountIds, report) => {
2333
+ const indexSearch = store.indexSearch?.bind(store);
2334
+ if (!indexSearch || report.meetings === 0)
2335
+ return;
2336
+ for (const accountId of new Set(accountIds))
2337
+ try {
2338
+ await refreshMeetingIndex({ indexSearch }, accountId);
2339
+ } catch (error) {
2340
+ report.warnings.push({
2341
+ externalId: String(accountId),
2342
+ message: `search index not updated: ${error instanceof Error ? error.message : "failed"}`
2343
+ });
2344
+ }
2345
+ }, "indexSaved");
2346
+ var pull = /* @__PURE__ */ __name(async (source, store, options) => {
2347
+ const now = options.now ?? Date.now();
2348
+ for (const [name, ms2] of [
2349
+ ["lookbackMs", options.lookbackMs ?? 0],
2350
+ ["overlapMs", source.overlapMs ?? 0]
2351
+ ])
2352
+ if (!Number.isSafeInteger(ms2) || ms2 < 0 || ms2 > 31 * 864e5)
2353
+ throw new Error(`${name} must be an integer from 0 through 31 days`);
2354
+ const lookbackMs = Math.max(options.lookbackMs ?? 0, source.overlapMs ?? 0);
2355
+ const cursor = options.rescan ? void 0 : await store.cursor(options.accountId);
2356
+ const since = options.since ?? cursor ?? new Date(now - 30 * 864e5).toISOString();
2357
+ timestamp2(since);
2358
+ const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
2359
+ let failed = false;
2360
+ let firstFailed;
2361
+ const callers = /* @__PURE__ */ new Set();
2362
+ const linkCallers = /* @__PURE__ */ __name(async () => {
2363
+ if (callers.size === 0 || !store.linkCallers)
2364
+ return;
2365
+ try {
2366
+ await store.linkCallers(source.provider, [...callers]);
2367
+ } catch (error) {
2368
+ report.warnings.push({
2369
+ externalId: source.provider,
2370
+ message: `callers not linked to people: ${error instanceof Error ? error.message : "failed"}`
2371
+ });
2372
+ }
2373
+ }, "linkCallers");
2374
+ const from = timestamp2(since) - lookbackMs;
2375
+ const meetings = (await source.meetings(lookbackMs === 0 ? since : new Date(from).toISOString())).toSorted((a, b) => startOf(a) - startOf(b));
2376
+ for (const [index, m] of meetings.entries()) {
2377
+ const stop = options.budget?.take() ?? null;
2378
+ if (stop) {
2379
+ report.stopped = stop;
2380
+ report.remaining = meetings.length - index;
2381
+ const reached = Math.min(startOf(m), firstFailed ?? Number.POSITIVE_INFINITY);
2382
+ if (Number.isFinite(reached) && reached > timestamp2(since))
2383
+ await store.setCursor(options.accountId, new Date(reached).toISOString(), now);
2384
+ await linkCallers();
2385
+ return report;
2386
+ }
2387
+ const id5 = m.occurrence.id;
2388
+ const failedHere = /* @__PURE__ */ __name(() => {
2389
+ failed = true;
2390
+ firstFailed ??= startOf(m);
2391
+ }, "failedHere");
2392
+ const read = /* @__PURE__ */ __name(async (part, call) => {
2393
+ try {
2394
+ return await call();
2395
+ } catch (error) {
2396
+ failedHere();
2397
+ const message = error instanceof Error ? error.message : "could not be read";
2398
+ report.warnings.push({ externalId: id5, message: `${part}: ${message}` });
2399
+ return void 0;
2400
+ }
2401
+ }, "read");
2402
+ try {
2403
+ const sourceParticipants = await read("participants", () => source.participants(id5));
2404
+ const participants = participantInputs(source.provider, id5, sourceParticipants ?? [], options.accountId);
2405
+ const names = /* @__PURE__ */ new Map();
2406
+ for (const p of participants)
2407
+ if (p.displayName !== null) {
2408
+ const identities = names.get(p.displayName) ?? /* @__PURE__ */ new Set();
2409
+ identities.add(p.identity.externalId);
2410
+ names.set(p.displayName, identities);
2411
+ }
2412
+ if ([...names.values()].some((ids2) => ids2.size > 1))
2413
+ report.warnings.push({ externalId: id5, message: "Participant names are ambiguous" });
2414
+ const lines = await read("transcript", () => source.transcript(id5));
2415
+ const chat = await read("chat", () => source.chat(id5));
2416
+ const summary = await read("summary", () => source.summary(id5));
2417
+ const attachments = await read("files", () => source.files(id5));
2418
+ const listDocuments = source.documents?.bind(source);
2419
+ const documents = listDocuments ? await read("documents", () => listDocuments(id5)) : void 0;
2420
+ await saveSourceMeeting(source, store, m, { participants: sourceParticipants, transcript: lines, chat, summary, files: attachments, documents }, { accountId: options.accountId, now });
2421
+ for (const p of participants)
2422
+ if (p.identity.phone)
2423
+ callers.add(p.identity.externalId);
2424
+ report.meetings++;
2425
+ report.participants += participants.length;
2426
+ report.transcriptRows += lines?.length ?? 0;
2427
+ report.summaries += summary ? 1 : 0;
2428
+ } catch (error) {
2429
+ failedHere();
2430
+ report.warnings.push({ externalId: id5, message: error instanceof Error ? error.message : "Meeting pull failed" });
2431
+ }
2432
+ }
2433
+ await linkCallers();
2434
+ await indexSaved(store, [options.accountId], report);
2435
+ if (!failed)
2436
+ await store.setCursor(options.accountId, new Date(now).toISOString(), now);
2437
+ return report;
2438
+ }, "pull");
2439
+
2440
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
2195
2441
  var TranscriptTextError = class extends Error {
2196
2442
  static {
2197
2443
  __name(this, "TranscriptTextError");
@@ -2246,7 +2492,7 @@ var parseTranscriptText = /* @__PURE__ */ __name((input) => {
2246
2492
  return { header, lines };
2247
2493
  }, "parseTranscriptText");
2248
2494
 
2249
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
2495
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
2250
2496
  var VttError = class extends Error {
2251
2497
  static {
2252
2498
  __name(this, "VttError");
@@ -2298,7 +2544,7 @@ var parseVtt = /* @__PURE__ */ __name((input) => {
2298
2544
  return cues;
2299
2545
  }, "parseVtt");
2300
2546
 
2301
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/import.js
2547
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/import.js
2302
2548
  var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now()) => {
2303
2549
  const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
2304
2550
  for (const file of files) {
@@ -2324,6 +2570,7 @@ var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now())
2324
2570
  });
2325
2571
  }
2326
2572
  }
2573
+ await indexSaved(store, files.map((file) => file.meeting.accountId), report);
2327
2574
  const zones = new Set(files.map((file) => file.meeting.timezone).filter((zone2) => zone2 !== null && zone2 !== void 0));
2328
2575
  const [zone] = zones;
2329
2576
  if (zones.size === 1 && zone)
@@ -2331,10 +2578,10 @@ var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now())
2331
2578
  return report;
2332
2579
  }, "importFiles");
2333
2580
 
2334
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/links.js
2581
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/links.js
2335
2582
  var CHAT_MESSAGES_READ = 1e5;
2336
2583
 
2337
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/provider.js
2584
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/provider.js
2338
2585
  var snapshotMeetingScope = /* @__PURE__ */ __name((scope2) => {
2339
2586
  const provider = scope2?.provider;
2340
2587
  const account = scope2?.account;
@@ -2343,7 +2590,7 @@ var snapshotMeetingScope = /* @__PURE__ */ __name((scope2) => {
2343
2590
  return Object.freeze({ provider, account });
2344
2591
  }, "snapshotMeetingScope");
2345
2592
 
2346
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
2593
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
2347
2594
  var MEETING_FIELD_KEYS = Object.freeze({
2348
2595
  title: "title",
2349
2596
  kind: "kind",
@@ -2375,7 +2622,7 @@ var dispatchMeetingMutation = /* @__PURE__ */ __name(async (options, dispatch) =
2375
2622
  return { applied: true, value: await dispatch(signal) };
2376
2623
  }, "dispatchMeetingMutation");
2377
2624
 
2378
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/meeting-context.js
2625
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/meeting-context.js
2379
2626
  var id2 = /* @__PURE__ */ __name((value) => {
2380
2627
  if (typeof value !== "number" || !Number.isSafeInteger(value) || value < 1)
2381
2628
  throw new CliError("validation_error", "meeting context identifiers must be positive integers");
@@ -2497,7 +2744,7 @@ var createMeetingContext = /* @__PURE__ */ __name((scope2, accountId, ports) =>
2497
2744
  };
2498
2745
  }, "createMeetingContext");
2499
2746
 
2500
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
2747
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
2501
2748
  var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
2502
2749
  if (!original || typeof original !== "object" || Array.isArray(original))
2503
2750
  throw new CliError("validation_error", "meeting preparation context is required");
@@ -2522,7 +2769,7 @@ var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
2522
2769
  return { ...input, limit, maxReadBytes };
2523
2770
  }, "validateMeetingPreparationContext");
2524
2771
 
2525
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
2772
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
2526
2773
  var count5 = pipe(number(), integer(), minValue(0));
2527
2774
  var id3 = pipe(string(), minLength(1));
2528
2775
  var meetingProjectEvidence = strictObject({
@@ -2643,7 +2890,7 @@ var meetingProjectEvidenceAnswer = /* @__PURE__ */ __name((page, prepared, comma
2643
2890
  };
2644
2891
  }, "meetingProjectEvidenceAnswer");
2645
2892
 
2646
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
2893
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
2647
2894
  var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
2648
2895
  const integer3 = /* @__PURE__ */ __name((value, low, high) => Number.isSafeInteger(value) && value >= low && value <= high, "integer");
2649
2896
  if (typeof query !== "string" || !query.trim() || query.includes("\0") || new TextEncoder().encode(query).byteLength > 65536 || !integer3(options.limit ?? 100, 1, 1e3) || !integer3(options.maxReadBytes ?? 4194304, 1, 67108864) || [
@@ -2663,7 +2910,7 @@ var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
2663
2910
  throw new CliError("validation_error", "choose one project selector and one tag or topic selector");
2664
2911
  }, "validateMeetingHitSearch");
2665
2912
 
2666
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
2913
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
2667
2914
  var ids = {
2668
2915
  meeting_id: "meetingId",
2669
2916
  identity_id: "participantIdentityId",
@@ -2754,7 +3001,7 @@ var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project, request = {
2754
3001
  return { project: project.trim(), options, query: frozen.join(" AND ") };
2755
3002
  }, "prepareMeetingProjectEvidence");
2756
3003
 
2757
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
3004
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
2758
3005
  var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project, request = {}, now = Date.now()) => {
2759
3006
  const prepared = prepareMeetingProjectEvidence(project, request, now);
2760
3007
  const page = await read(prepared.project, prepared.options);
@@ -2762,207 +3009,7 @@ var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project, re
2762
3009
  return meetingProjectEvidenceAnswer(page, prepared);
2763
3010
  }, "readMeetingProjectEvidence");
2764
3011
 
2765
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/pull.js
2766
- var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, position, accountId) => {
2767
- const { identityExternalId, phone, ...fields2 } = p;
2768
- const externalId = identityExternalId ?? (p.email ? `email:${p.email.toLowerCase()}` : p.externalId) ?? `name:${p.displayName ?? "unknown"}@${accountId}/${occurrenceId2}:${position}`;
2769
- return {
2770
- ...fields2,
2771
- identity: {
2772
- provider,
2773
- externalId,
2774
- name: p.displayName,
2775
- ...phone?.trim() ? { phone } : {},
2776
- metadata: p.metadata,
2777
- associatePerson: Boolean(identityExternalId?.trim() || p.email?.trim() || p.externalId?.trim())
2778
- }
2779
- };
2780
- }, "participantInput");
2781
- var participantInputs = /* @__PURE__ */ __name((provider, occurrenceId2, list, accountId) => list.map((p, i) => participantInput(p, provider, occurrenceId2, i, accountId)), "participantInputs");
2782
- var sourceMeetingInput = /* @__PURE__ */ __name((m, accountId, participantsCount, kept) => {
2783
- const startedAt = timestamp2(m.occurrence.startedAt);
2784
- const given = m.occurrence.endedAt === null ? null : timestamp2(m.occurrence.endedAt);
2785
- if (given !== null && given < startedAt)
2786
- throw new Error("Meeting ends before it starts");
2787
- const keptEnd = kept?.endedAt ?? null;
2788
- const endedAt = given ?? (keptEnd !== null && keptEnd >= startedAt ? keptEnd : null);
2789
- const count7 = participantsCount === null && kept ? kept.participantsCount : participantsCount;
2790
- const metadata = kept?.metadata && m.metadata ? { ...kept.metadata, ...m.metadata } : m.metadata ?? kept?.metadata ?? null;
2791
- const meeting2 = {
2792
- accountId,
2793
- externalId: m.occurrence.id,
2794
- title: m.occurrence.title,
2795
- description: m.description ?? kept?.description ?? null,
2796
- location: m.location ?? kept?.location ?? null,
2797
- joinUrl: m.joinUrl ?? m.series?.joinUrl ?? kept?.joinUrl ?? null,
2798
- startedAt,
2799
- endedAt,
2800
- durationMs: endedAt === null ? null : endedAt - startedAt,
2801
- timezone: m.timezone ?? kept?.timezone ?? null,
2802
- hostIdentityId: kept?.hostIdentityId ?? null,
2803
- ...count7 === void 0 ? {} : { participantsCount: count7 },
2804
- metadata,
2805
- deletedAt: null
2806
- };
2807
- if (m.series)
2808
- meeting2.series = {
2809
- externalId: m.series.id,
2810
- title: m.series.title,
2811
- description: null,
2812
- kind: m.series.kind ?? null,
2813
- recurrence: m.series.recurrence ?? null,
2814
- hostIdentityId: null,
2815
- joinUrl: m.series.joinUrl ?? null,
2816
- metadata: null,
2817
- deletedAt: null
2818
- };
2819
- return meeting2;
2820
- }, "sourceMeetingInput");
2821
- var saveSourceMeeting = /* @__PURE__ */ __name(async (source, store, m, parts, { accountId, now, kept }) => {
2822
- const id5 = m.occurrence.id;
2823
- const { participants: sourceParticipants, transcript: lines, chat, summary } = parts;
2824
- const participants = participantInputs(source.provider, id5, sourceParticipants ?? [], accountId);
2825
- const meeting2 = sourceMeetingInput(m, accountId, sourceParticipants === void 0 ? void 0 : sourceParticipants?.length ?? null, kept);
2826
- const linked = sourceParticipants !== void 0;
2827
- const format = source.transcriptFormat ?? null;
2828
- const transcripts = lines && linked ? [await transcriptInput(lines, participants, source.name, void 0, format)] : void 0;
2829
- const details = await store.saveMeeting({
2830
- meeting: meeting2,
2831
- participants: sourceParticipants ? participants : void 0,
2832
- transcripts,
2833
- chat: chat?.map((line2) => ({
2834
- externalId: null,
2835
- sentAt: timestamp2(line2.sentAt),
2836
- senderParticipantPosition: speakerPosition(line2.sender, participants),
2837
- senderName: line2.sender,
2838
- recipient: null,
2839
- text: line2.text,
2840
- normalizedText: null,
2841
- metadata: null
2842
- })),
2843
- summaries: summary ? [
2844
- {
2845
- ...summary,
2846
- source: summary.source ?? source.name,
2847
- content: summary.content ?? null,
2848
- docUrl: summary.docUrl ?? null,
2849
- externalCreatedAt: summary.externalCreatedAt ?? null,
2850
- externalUpdatedAt: summary.externalUpdatedAt ?? null,
2851
- metadata: summary.metadata ?? null
2852
- }
2853
- ] : void 0,
2854
- attachments: parts.files ?? void 0,
2855
- documents: parts.documents ?? void 0,
2856
- now
2857
- });
2858
- if (lines && !linked && !details.transcripts.some((t) => t.transcript.source === source.name && t.transcript.supersededAt === null))
2859
- await store.saveMeeting({
2860
- meeting: meeting2,
2861
- transcripts: [await transcriptInput(lines, [], source.name, `${JSON.stringify(lines)}
2862
- unlinked`, format)],
2863
- now
2864
- });
2865
- await linkEvent(store, details, now, { create: source.createsEvents !== false });
2866
- return details;
2867
- }, "saveSourceMeeting");
2868
- var startOf = /* @__PURE__ */ __name((m) => {
2869
- const at = Date.parse(m.occurrence.startedAt);
2870
- return Number.isFinite(at) ? at : Number.POSITIVE_INFINITY;
2871
- }, "startOf");
2872
- var pull = /* @__PURE__ */ __name(async (source, store, options) => {
2873
- const now = options.now ?? Date.now();
2874
- for (const [name, ms2] of [
2875
- ["lookbackMs", options.lookbackMs ?? 0],
2876
- ["overlapMs", source.overlapMs ?? 0]
2877
- ])
2878
- if (!Number.isSafeInteger(ms2) || ms2 < 0 || ms2 > 31 * 864e5)
2879
- throw new Error(`${name} must be an integer from 0 through 31 days`);
2880
- const lookbackMs = Math.max(options.lookbackMs ?? 0, source.overlapMs ?? 0);
2881
- const cursor = options.rescan ? void 0 : await store.cursor(options.accountId);
2882
- const since = options.since ?? cursor ?? new Date(now - 30 * 864e5).toISOString();
2883
- timestamp2(since);
2884
- const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
2885
- let failed = false;
2886
- let firstFailed;
2887
- const callers = /* @__PURE__ */ new Set();
2888
- const linkCallers = /* @__PURE__ */ __name(async () => {
2889
- if (callers.size === 0 || !store.linkCallers)
2890
- return;
2891
- try {
2892
- await store.linkCallers(source.provider, [...callers]);
2893
- } catch (error) {
2894
- report.warnings.push({
2895
- externalId: source.provider,
2896
- message: `callers not linked to people: ${error instanceof Error ? error.message : "failed"}`
2897
- });
2898
- }
2899
- }, "linkCallers");
2900
- const from = timestamp2(since) - lookbackMs;
2901
- const meetings = (await source.meetings(lookbackMs === 0 ? since : new Date(from).toISOString())).toSorted((a, b) => startOf(a) - startOf(b));
2902
- for (const [index, m] of meetings.entries()) {
2903
- const stop = options.budget?.take() ?? null;
2904
- if (stop) {
2905
- report.stopped = stop;
2906
- report.remaining = meetings.length - index;
2907
- const reached = Math.min(startOf(m), firstFailed ?? Number.POSITIVE_INFINITY);
2908
- if (Number.isFinite(reached) && reached > timestamp2(since))
2909
- await store.setCursor(options.accountId, new Date(reached).toISOString(), now);
2910
- await linkCallers();
2911
- return report;
2912
- }
2913
- const id5 = m.occurrence.id;
2914
- const failedHere = /* @__PURE__ */ __name(() => {
2915
- failed = true;
2916
- firstFailed ??= startOf(m);
2917
- }, "failedHere");
2918
- const read = /* @__PURE__ */ __name(async (part, call) => {
2919
- try {
2920
- return await call();
2921
- } catch (error) {
2922
- failedHere();
2923
- const message = error instanceof Error ? error.message : "could not be read";
2924
- report.warnings.push({ externalId: id5, message: `${part}: ${message}` });
2925
- return void 0;
2926
- }
2927
- }, "read");
2928
- try {
2929
- const sourceParticipants = await read("participants", () => source.participants(id5));
2930
- const participants = participantInputs(source.provider, id5, sourceParticipants ?? [], options.accountId);
2931
- const names = /* @__PURE__ */ new Map();
2932
- for (const p of participants)
2933
- if (p.displayName !== null) {
2934
- const identities = names.get(p.displayName) ?? /* @__PURE__ */ new Set();
2935
- identities.add(p.identity.externalId);
2936
- names.set(p.displayName, identities);
2937
- }
2938
- if ([...names.values()].some((ids2) => ids2.size > 1))
2939
- report.warnings.push({ externalId: id5, message: "Participant names are ambiguous" });
2940
- const lines = await read("transcript", () => source.transcript(id5));
2941
- const chat = await read("chat", () => source.chat(id5));
2942
- const summary = await read("summary", () => source.summary(id5));
2943
- const attachments = await read("files", () => source.files(id5));
2944
- const listDocuments = source.documents?.bind(source);
2945
- const documents = listDocuments ? await read("documents", () => listDocuments(id5)) : void 0;
2946
- await saveSourceMeeting(source, store, m, { participants: sourceParticipants, transcript: lines, chat, summary, files: attachments, documents }, { accountId: options.accountId, now });
2947
- for (const p of participants)
2948
- if (p.identity.phone)
2949
- callers.add(p.identity.externalId);
2950
- report.meetings++;
2951
- report.participants += participants.length;
2952
- report.transcriptRows += lines?.length ?? 0;
2953
- report.summaries += summary ? 1 : 0;
2954
- } catch (error) {
2955
- failedHere();
2956
- report.warnings.push({ externalId: id5, message: error instanceof Error ? error.message : "Meeting pull failed" });
2957
- }
2958
- }
2959
- await linkCallers();
2960
- if (!failed)
2961
- await store.setCursor(options.accountId, new Date(now).toISOString(), now);
2962
- return report;
2963
- }, "pull");
2964
-
2965
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
3012
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
2966
3013
  var text5 = string();
2967
3014
  var count6 = pipe(number(), integer(), minValue(0));
2968
3015
  var id4 = pipe(number(), integer(), minValue(1));
@@ -3160,7 +3207,7 @@ var eventItem = /* @__PURE__ */ __name((one) => ({
3160
3207
  updated_at: new Date(one.updatedAt).toISOString()
3161
3208
  }), "eventItem");
3162
3209
 
3163
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/read-through.js
3210
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/read-through.js
3164
3211
  var MEETING_SERVER_BOUNDS = { calls: 3, pages: 2 };
3165
3212
  var ISSUES = {
3166
3213
  offline: ["permission_error", "meetings.server-offline"],
@@ -3303,14 +3350,17 @@ var askServerForList = /* @__PURE__ */ __name(async (source, store, accountId, q
3303
3350
  for (const call of asked) {
3304
3351
  let cursor = null;
3305
3352
  for (let page = 0; page < MEETING_SERVER_BOUNDS.pages; page++) {
3353
+ access.signal?.throwIfAborted();
3306
3354
  step.report.calls += 1;
3307
3355
  let answer;
3308
3356
  try {
3309
- answer = await source.find(call.window, call.terms, cursor);
3357
+ answer = await source.find(call.window, call.terms, cursor, access.signal);
3310
3358
  } catch (error) {
3359
+ access.signal?.throwIfAborted();
3311
3360
  return skip(reasonOf(error), error);
3312
3361
  }
3313
3362
  for (const found of answer.meetings) {
3363
+ access.signal?.throwIfAborted();
3314
3364
  if (seen.has(found.meeting.occurrence.id))
3315
3365
  continue;
3316
3366
  seen.add(found.meeting.occurrence.id);
@@ -3435,11 +3485,13 @@ var meetingShowThrough = /* @__PURE__ */ __name(async (source, store, accountId,
3435
3485
  return fromStore("unsupported");
3436
3486
  if (access.offline)
3437
3487
  return fromStore("offline");
3488
+ access.signal?.throwIfAborted();
3438
3489
  step.report.calls = 1;
3439
3490
  let full;
3440
3491
  try {
3441
- full = await source.get(providerId);
3492
+ full = await source.get(providerId, access.signal);
3442
3493
  } catch (error) {
3494
+ access.signal?.throwIfAborted();
3443
3495
  return fromStore(reasonOf(error), error);
3444
3496
  }
3445
3497
  if (!full) {
@@ -3452,10 +3504,10 @@ var meetingShowThrough = /* @__PURE__ */ __name(async (source, store, accountId,
3452
3504
  return { details: fresh, foundIn: step.found.get(details.meeting.id) ?? "server", server: step.report };
3453
3505
  }, "meetingShowThrough");
3454
3506
 
3455
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
3507
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
3456
3508
  var strongRecordingValidator = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length <= 1024 && /^"[\x21\x23-\x7e\x80-\xff]*"$/.test(value), "strongRecordingValidator");
3457
3509
 
3458
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
3510
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
3459
3511
  var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
3460
3512
  if (!original || typeof original !== "object" || Array.isArray(original))
3461
3513
  throw new CliError("validation_error", "related history request is required");
@@ -3485,14 +3537,14 @@ var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
3485
3537
  return { ...input, anchorIds: [...new Set(input.anchorIds)], limit, maxReadBytes };
3486
3538
  }, "validateMeetingRelatedHistory");
3487
3539
 
3488
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/review.js
3540
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/review.js
3489
3541
  var REVIEW_LIMIT = { default: 50, most: 200 };
3490
3542
 
3491
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
3543
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
3492
3544
  var SAVE_HELP = `Worth keeping \u2014 a decision, a promise, a preference? Record it with \`memo facts add\` or
3493
3545
  \`memo memories add\`, citing the msg: locator or meeting: reference as --evidence.`;
3494
3546
 
3495
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
3547
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
3496
3548
  var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
3497
3549
  input.signal?.throwIfAborted();
3498
3550
  if (!Number.isSafeInteger(input.accountId) || input.accountId <= 0)
@@ -3513,10 +3565,10 @@ var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
3513
3565
  return { ...input, limit, maxReadBytes };
3514
3566
  }, "validateMeetingSeriesHistory");
3515
3567
 
3516
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
3568
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
3517
3569
  var occurrenceId = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim().length > 0 && value.length <= 1e3 && !/[\0\r\n]/.test(value), "occurrenceId");
3518
3570
 
3519
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
3571
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
3520
3572
  function invalid4(field, response = false) {
3521
3573
  throw new CliError(response ? "invalid_response" : "validation_error", `invalid meeting inventory ${field}`);
3522
3574
  }
@@ -3545,7 +3597,7 @@ var validateMeetingSeriesInventoryCursor = /* @__PURE__ */ __name((value) => {
3545
3597
  cursorDetails(value);
3546
3598
  }, "validateMeetingSeriesInventoryCursor");
3547
3599
 
3548
- // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/tag-answers.js
3600
+ // node_modules/.pnpm/@wirecat+cli-core@0.724.0_@wirecat+cli-base@0.130.0_commander@15.0.0_esbuild@0.28.2_typ_7eee7c5df32146a12ad3bd2be9b828b8/node_modules/@wirecat/cli-core/dist/meetings/tag-answers.js
3549
3601
  var text6 = string();
3550
3602
  var storeId = pipe(number(), integer(), minValue(1));
3551
3603
  var meetingTagChange = strictObject({
@@ -3589,9 +3641,12 @@ export {
3589
3641
  rangeOf,
3590
3642
  windowOf,
3591
3643
  readsZone,
3644
+ MEETING_CALL_DIRECTIONS,
3592
3645
  formatMeetingReference,
3593
3646
  parseMeetingReference,
3594
3647
  canonicalMeetingReference,
3648
+ meetingCall,
3649
+ meetingCallItem,
3595
3650
  meeting,
3596
3651
  MEETING_QUERY,
3597
3652
  MEETING_DOCUMENT_ROLES,
@@ -3653,6 +3708,8 @@ export {
3653
3708
  parseMeetingQuery,
3654
3709
  meetingWordsQuery,
3655
3710
  transcriptLanguage,
3711
+ refreshMeetingIndex,
3712
+ pull,
3656
3713
  importFiles,
3657
3714
  CHAT_MESSAGES_READ,
3658
3715
  snapshotMeetingScope,
@@ -3672,7 +3729,6 @@ export {
3672
3729
  MEETING_PROJECT_EVIDENCE_QUERY,
3673
3730
  prepareMeetingProjectEvidence,
3674
3731
  readMeetingProjectEvidence,
3675
- pull,
3676
3732
  meetingReview,
3677
3733
  meetingLink,
3678
3734
  meetingSpeaker,