@wirecat/zoom-cli 0.82.0 → 0.84.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 (492) hide show
  1. package/README.md +12 -12
  2. package/contracts/wirecat.json +88 -55
  3. package/dist/account-removal.d.ts +1 -1
  4. package/dist/account-removal.d.ts.map +1 -1
  5. package/dist/account-removal.js +1 -1
  6. package/dist/account-removal.js.map +1 -1
  7. package/dist/agent-skill.js +1 -1
  8. package/dist/agent-skill.js.map +1 -1
  9. package/dist/answer-entities.d.ts +1 -1
  10. package/dist/answer-entities.d.ts.map +1 -1
  11. package/dist/answer-entities.js +1 -1
  12. package/dist/answer-entities.js.map +1 -1
  13. package/dist/answer-output.d.ts +2 -2
  14. package/dist/answer-output.d.ts.map +1 -1
  15. package/dist/answer-output.js +1 -1
  16. package/dist/answer-output.js.map +1 -1
  17. package/dist/answer-policy.d.ts.map +1 -1
  18. package/dist/answer-policy.js +1 -2
  19. package/dist/answer-policy.js.map +1 -1
  20. package/dist/answers.js +1 -1
  21. package/dist/answers.js.map +1 -1
  22. package/dist/api.d.ts +2 -2
  23. package/dist/api.d.ts.map +1 -1
  24. package/dist/api.js +2 -2
  25. package/dist/api.js.map +1 -1
  26. package/dist/archive-commands.d.ts +1 -1
  27. package/dist/archive-commands.d.ts.map +1 -1
  28. package/dist/archive-commands.js +1 -2
  29. package/dist/archive-commands.js.map +1 -1
  30. package/dist/archive-import.d.ts +1 -1
  31. package/dist/archive-import.d.ts.map +1 -1
  32. package/dist/archive-import.js +1 -1
  33. package/dist/archive-import.js.map +1 -1
  34. package/dist/archive-transcripts.d.ts +1 -1
  35. package/dist/archive-transcripts.d.ts.map +1 -1
  36. package/dist/archive-transcripts.js +1 -2
  37. package/dist/archive-transcripts.js.map +1 -1
  38. package/dist/bin/main.js +4 -17
  39. package/dist/bin/main.js.map +1 -1
  40. package/dist/bin/zm.js +11 -11
  41. package/dist/bundle/answer-policy-OQQWAUHH.js +33 -0
  42. package/dist/bundle/chunk-3YDF76DP.js +922 -0
  43. package/dist/bundle/chunk-AEWYRB6F.js +8 -0
  44. package/dist/bundle/chunk-AF2Z6VOG.js +137 -0
  45. package/dist/bundle/{chunk-MAJJ4PG3.js → chunk-DAYBU7WR.js} +79 -396
  46. package/dist/bundle/{chunk-XQQVMECZ.js → chunk-JD63PEI3.js} +3 -8
  47. package/dist/bundle/{chunk-UL2PXLKT.js → chunk-L5ZYKXAY.js} +392 -129
  48. package/dist/bundle/{chunk-2SWKQ7C4.js → chunk-W4TDCCT3.js} +8 -2
  49. package/dist/bundle/{chunk-AC6VJNMJ.js → chunk-W6YFWJDR.js} +2 -5
  50. package/dist/bundle/{chunk-434YFJAE.js → chunk-WSGD5Q6L.js} +3 -9
  51. package/dist/bundle/config-MP5YLHEY.js +29 -0
  52. package/dist/bundle/{folders-LXOL4N4S.js → folders-B2GKJOC2.js} +2 -7
  53. package/dist/bundle/{main-YAA7WQ23.js → main-YZPLPXB7.js} +21 -53
  54. package/dist/bundle/{output-file-2UB5JP3R.js → output-file-PKA7MJEP.js} +3 -11
  55. package/dist/bundle/{program-GVCGZP27.js → program-7JY6XJ6K.js} +714 -935
  56. package/dist/bundle/run-log-ML7ZCWXD.js +54 -0
  57. package/dist/bundle/store-connection-LQGKS3DN.js +21 -0
  58. package/dist/bundle/streaming-PRGWGNHY.js +12 -0
  59. package/dist/bundle/tokens-57RJVBK6.js +18 -0
  60. package/dist/bundle/zm.js +4 -161
  61. package/dist/bundle/{zoom-app-YWFB367P.js → zoom-app-EYJST6GF.js} +4 -10
  62. package/dist/chat-file.d.ts +1 -1
  63. package/dist/chat-file.d.ts.map +1 -1
  64. package/dist/commands.d.ts +1 -8
  65. package/dist/commands.d.ts.map +1 -1
  66. package/dist/commands.js +3 -33
  67. package/dist/commands.js.map +1 -1
  68. package/dist/config-issues.d.ts +1 -1
  69. package/dist/config-issues.d.ts.map +1 -1
  70. package/dist/config-issues.js +1 -1
  71. package/dist/config-issues.js.map +1 -1
  72. package/dist/config.d.ts +1 -2
  73. package/dist/config.d.ts.map +1 -1
  74. package/dist/config.js +1 -2
  75. package/dist/config.js.map +1 -1
  76. package/dist/contacts-commands.d.ts +1 -1
  77. package/dist/contacts-commands.d.ts.map +1 -1
  78. package/dist/contacts-commands.js +1 -1
  79. package/dist/contacts-commands.js.map +1 -1
  80. package/dist/contract-overrides.js +1 -1
  81. package/dist/contract-overrides.js.map +1 -1
  82. package/dist/errors.d.ts +1 -1
  83. package/dist/errors.d.ts.map +1 -1
  84. package/dist/execution.d.ts +1 -1
  85. package/dist/execution.d.ts.map +1 -1
  86. package/dist/execution.js +1 -1
  87. package/dist/execution.js.map +1 -1
  88. package/dist/files.d.ts +2 -2
  89. package/dist/files.d.ts.map +1 -1
  90. package/dist/files.js +1 -1
  91. package/dist/files.js.map +1 -1
  92. package/dist/first-screen.js +1 -1
  93. package/dist/first-screen.js.map +1 -1
  94. package/dist/identity.d.ts +1 -1
  95. package/dist/identity.d.ts.map +1 -1
  96. package/dist/identity.js +6 -0
  97. package/dist/identity.js.map +1 -1
  98. package/dist/index.d.ts +1 -2
  99. package/dist/index.d.ts.map +1 -1
  100. package/dist/index.js +1 -2
  101. package/dist/index.js.map +1 -1
  102. package/dist/ingestion-search-commands.d.ts +1 -1
  103. package/dist/ingestion-search-commands.d.ts.map +1 -1
  104. package/dist/ingestion-search-commands.js +1 -1
  105. package/dist/ingestion-search-commands.js.map +1 -1
  106. package/dist/local-transcription-commands.d.ts +1 -1
  107. package/dist/local-transcription-commands.d.ts.map +1 -1
  108. package/dist/local-transcription-commands.js +1 -2
  109. package/dist/local-transcription-commands.js.map +1 -1
  110. package/dist/local-transcription.d.ts +1 -2
  111. package/dist/local-transcription.d.ts.map +1 -1
  112. package/dist/local-transcription.js +3 -3
  113. package/dist/local-transcription.js.map +1 -1
  114. package/dist/meeting-commands.d.ts +1 -1
  115. package/dist/meeting-commands.d.ts.map +1 -1
  116. package/dist/meeting-commands.js +1 -2
  117. package/dist/meeting-commands.js.map +1 -1
  118. package/dist/meeting-communications-binding.d.ts +1 -2
  119. package/dist/meeting-communications-binding.d.ts.map +1 -1
  120. package/dist/meeting-communications-binding.js.map +1 -1
  121. package/dist/meeting-context-commands.d.ts +1 -1
  122. package/dist/meeting-context-commands.d.ts.map +1 -1
  123. package/dist/meeting-context-commands.js +1 -1
  124. package/dist/meeting-context-commands.js.map +1 -1
  125. package/dist/meeting-context.d.ts +2 -4
  126. package/dist/meeting-context.d.ts.map +1 -1
  127. package/dist/meeting-context.js +1 -1
  128. package/dist/meeting-context.js.map +1 -1
  129. package/dist/meeting-integration-commands.d.ts +1 -1
  130. package/dist/meeting-integration-commands.d.ts.map +1 -1
  131. package/dist/meeting-integration-commands.js +1 -2
  132. package/dist/meeting-integration-commands.js.map +1 -1
  133. package/dist/meeting-integration.d.ts +1 -1
  134. package/dist/meeting-integration.d.ts.map +1 -1
  135. package/dist/meeting-integration.js +1 -1
  136. package/dist/meeting-integration.js.map +1 -1
  137. package/dist/meeting-inventory.d.ts +1 -1
  138. package/dist/meeting-inventory.d.ts.map +1 -1
  139. package/dist/meeting-inventory.js +1 -1
  140. package/dist/meeting-inventory.js.map +1 -1
  141. package/dist/meeting-preparation.d.ts +1 -2
  142. package/dist/meeting-preparation.d.ts.map +1 -1
  143. package/dist/meeting-preparation.js +1 -1
  144. package/dist/meeting-preparation.js.map +1 -1
  145. package/dist/meeting-project-candidates.d.ts +1 -1
  146. package/dist/meeting-project-candidates.d.ts.map +1 -1
  147. package/dist/meeting-project-evidence-commands.d.ts +1 -1
  148. package/dist/meeting-project-evidence-commands.d.ts.map +1 -1
  149. package/dist/meeting-project-evidence-commands.js +1 -2
  150. package/dist/meeting-project-evidence-commands.js.map +1 -1
  151. package/dist/meeting-read-command-bindings.js +1 -1
  152. package/dist/meeting-read-command-bindings.js.map +1 -1
  153. package/dist/meeting-review-commands.d.ts +1 -3
  154. package/dist/meeting-review-commands.d.ts.map +1 -1
  155. package/dist/meeting-review-commands.js +1 -2
  156. package/dist/meeting-review-commands.js.map +1 -1
  157. package/dist/meeting-search-commands.d.ts +2 -3
  158. package/dist/meeting-search-commands.d.ts.map +1 -1
  159. package/dist/meeting-search-commands.js +2 -4
  160. package/dist/meeting-search-commands.js.map +1 -1
  161. package/dist/meeting-searches-commands.d.ts +1 -2
  162. package/dist/meeting-searches-commands.d.ts.map +1 -1
  163. package/dist/meeting-searches-commands.js +1 -2
  164. package/dist/meeting-searches-commands.js.map +1 -1
  165. package/dist/meeting-selection-options.d.ts +1 -1
  166. package/dist/meeting-selection-options.d.ts.map +1 -1
  167. package/dist/meeting-selection-options.js +1 -2
  168. package/dist/meeting-selection-options.js.map +1 -1
  169. package/dist/meeting-semantic-commands.d.ts +1 -2
  170. package/dist/meeting-semantic-commands.d.ts.map +1 -1
  171. package/dist/meeting-semantic-commands.js +1 -1
  172. package/dist/meeting-semantic-commands.js.map +1 -1
  173. package/dist/meeting-semantic.d.ts +2 -2
  174. package/dist/meeting-semantic.d.ts.map +1 -1
  175. package/dist/meeting-semantic.js +1 -1
  176. package/dist/meeting-semantic.js.map +1 -1
  177. package/dist/meeting-source.d.ts +1 -1
  178. package/dist/meeting-source.d.ts.map +1 -1
  179. package/dist/meeting-stats-commands.d.ts +1 -3
  180. package/dist/meeting-stats-commands.d.ts.map +1 -1
  181. package/dist/meeting-stats-commands.js +1 -2
  182. package/dist/meeting-stats-commands.js.map +1 -1
  183. package/dist/models-commands.d.ts +1 -1
  184. package/dist/models-commands.d.ts.map +1 -1
  185. package/dist/models-commands.js +1 -1
  186. package/dist/models-commands.js.map +1 -1
  187. package/dist/occurrence-schedule.d.ts +1 -1
  188. package/dist/occurrence-schedule.d.ts.map +1 -1
  189. package/dist/permissions.d.ts +1 -1
  190. package/dist/permissions.d.ts.map +1 -1
  191. package/dist/permissions.js +1 -2
  192. package/dist/permissions.js.map +1 -1
  193. package/dist/profile.js +1 -1
  194. package/dist/profile.js.map +1 -1
  195. package/dist/program-bindings.d.ts.map +1 -1
  196. package/dist/program-bindings.js +3 -13
  197. package/dist/program-bindings.js.map +1 -1
  198. package/dist/program.d.ts +4 -7
  199. package/dist/program.d.ts.map +1 -1
  200. package/dist/program.js +1 -1
  201. package/dist/program.js.map +1 -1
  202. package/dist/progress-commands.d.ts +1 -1
  203. package/dist/progress-commands.d.ts.map +1 -1
  204. package/dist/progress-commands.js +1 -2
  205. package/dist/progress-commands.js.map +1 -1
  206. package/dist/read-only.js +1 -1
  207. package/dist/read-only.js.map +1 -1
  208. package/dist/recording-archive.d.ts.map +1 -1
  209. package/dist/recording-archive.js +1 -2
  210. package/dist/recording-archive.js.map +1 -1
  211. package/dist/recording-manifest.js +1 -1
  212. package/dist/recording-manifest.js.map +1 -1
  213. package/dist/recording-partial-store.d.ts +2 -3
  214. package/dist/recording-partial-store.d.ts.map +1 -1
  215. package/dist/recording-partial-store.js +1 -1
  216. package/dist/recording-partial-store.js.map +1 -1
  217. package/dist/recording-promotion-store.d.ts +1 -2
  218. package/dist/recording-promotion-store.d.ts.map +1 -1
  219. package/dist/recording-promotion-store.js +1 -2
  220. package/dist/recording-promotion-store.js.map +1 -1
  221. package/dist/recording-schedule-commands.d.ts +1 -1
  222. package/dist/recording-schedule-commands.d.ts.map +1 -1
  223. package/dist/recording-schedule-commands.js +1 -1
  224. package/dist/recording-schedule-commands.js.map +1 -1
  225. package/dist/recording-schedule-store.js +1 -1
  226. package/dist/recording-schedule-store.js.map +1 -1
  227. package/dist/recording-schedule-systemd.js +1 -1
  228. package/dist/recording-schedule-systemd.js.map +1 -1
  229. package/dist/recording-schedule.d.ts +1 -1
  230. package/dist/recording-schedule.d.ts.map +1 -1
  231. package/dist/recording-schedule.js +1 -1
  232. package/dist/recording-schedule.js.map +1 -1
  233. package/dist/recording-sync-store.d.ts +1 -1
  234. package/dist/recording-sync-store.d.ts.map +1 -1
  235. package/dist/recording-sync-store.js +1 -2
  236. package/dist/recording-sync-store.js.map +1 -1
  237. package/dist/recording-sync.d.ts +1 -1
  238. package/dist/recording-sync.d.ts.map +1 -1
  239. package/dist/recording-sync.js +1 -1
  240. package/dist/recording-sync.js.map +1 -1
  241. package/dist/recording-writer-lease.d.ts +1 -1
  242. package/dist/recording-writer-lease.d.ts.map +1 -1
  243. package/dist/recording-writer-lease.js +1 -1
  244. package/dist/recording-writer-lease.js.map +1 -1
  245. package/dist/recordings.d.ts +1 -1
  246. package/dist/recordings.d.ts.map +1 -1
  247. package/dist/recordings.js.map +1 -1
  248. package/dist/remote-meetings.d.ts +19 -19
  249. package/dist/remote-meetings.d.ts.map +1 -1
  250. package/dist/remote-meetings.js +1 -1
  251. package/dist/remote-meetings.js.map +1 -1
  252. package/dist/request-events.d.ts +1 -1
  253. package/dist/request-events.d.ts.map +1 -1
  254. package/dist/request-events.js +1 -1
  255. package/dist/request-events.js.map +1 -1
  256. package/dist/run-log.d.ts +1 -1
  257. package/dist/run-log.d.ts.map +1 -1
  258. package/dist/run-log.js +1 -1
  259. package/dist/run-log.js.map +1 -1
  260. package/dist/run.d.ts +1 -1
  261. package/dist/run.d.ts.map +1 -1
  262. package/dist/run.js +6 -2
  263. package/dist/run.js.map +1 -1
  264. package/dist/series-inventory.d.ts +2 -2
  265. package/dist/series-inventory.js +1 -1
  266. package/dist/series-inventory.js.map +1 -1
  267. package/dist/setup-commands.d.ts +6 -15
  268. package/dist/setup-commands.d.ts.map +1 -1
  269. package/dist/setup-commands.js +7 -142
  270. package/dist/setup-commands.js.map +1 -1
  271. package/dist/store-commands.d.ts +1 -1
  272. package/dist/store-commands.d.ts.map +1 -1
  273. package/dist/store-commands.js +1 -2
  274. package/dist/store-commands.js.map +1 -1
  275. package/dist/store-connection.d.ts +1 -3
  276. package/dist/store-connection.d.ts.map +1 -1
  277. package/dist/store-connection.js +14 -14
  278. package/dist/store-connection.js.map +1 -1
  279. package/dist/sync-progress.d.ts +4 -4
  280. package/dist/sync-progress.d.ts.map +1 -1
  281. package/dist/sync-progress.js +1 -1
  282. package/dist/sync-progress.js.map +1 -1
  283. package/dist/tokens.d.ts +20 -44
  284. package/dist/tokens.d.ts.map +1 -1
  285. package/dist/tokens.js +95 -308
  286. package/dist/tokens.js.map +1 -1
  287. package/dist/unified-search.d.ts +1 -1
  288. package/dist/unified-search.d.ts.map +1 -1
  289. package/dist/upcoming-meetings.d.ts +2 -2
  290. package/dist/upcoming-meetings.js +1 -1
  291. package/dist/upcoming-meetings.js.map +1 -1
  292. package/dist/upgrade.d.ts.map +1 -1
  293. package/dist/upgrade.js +1 -2
  294. package/dist/upgrade.js.map +1 -1
  295. package/dist/version.d.ts +1 -1
  296. package/dist/version.js +1 -1
  297. package/dist/watch-commands.d.ts +1 -2
  298. package/dist/watch-commands.d.ts.map +1 -1
  299. package/dist/watch-commands.js +1 -2
  300. package/dist/watch-commands.js.map +1 -1
  301. package/dist/watch-service.d.ts +1 -1
  302. package/dist/watch-service.d.ts.map +1 -1
  303. package/dist/watch-service.js +1 -1
  304. package/dist/watch-service.js.map +1 -1
  305. package/dist/zoom-app.d.ts +2 -2
  306. package/dist/zoom-app.d.ts.map +1 -1
  307. package/dist/zoom-app.js +2 -2
  308. package/dist/zoom-app.js.map +1 -1
  309. package/dist/zoom-search-commands.d.ts +1 -1
  310. package/dist/zoom-search-commands.d.ts.map +1 -1
  311. package/dist/zoom-search-commands.js +1 -1
  312. package/dist/zoom-search-commands.js.map +1 -1
  313. package/dist/zoom-session.d.ts +6 -0
  314. package/dist/zoom-session.d.ts.map +1 -0
  315. package/dist/zoom-session.js +72 -0
  316. package/dist/zoom-session.js.map +1 -0
  317. package/package.json +3 -3
  318. package/scenarios/person-in-meetings.md +1 -1
  319. package/skills/zoom-cli/SKILL.md +1 -1
  320. package/skills/zoom-cli/references/people-and-projects.md +5 -5
  321. package/skills/zoom-cli/references/prepare.md +2 -2
  322. package/skills/zoom-cli/references/setup.md +2 -2
  323. package/dist/bundle/agent-F4TRJWWS.js +0 -46
  324. package/dist/bundle/all-profiles-RULEKTDQ.js +0 -321
  325. package/dist/bundle/answer-policy-6XC57AEZ.js +0 -131
  326. package/dist/bundle/anthropic-4NAQBZFL.js +0 -91
  327. package/dist/bundle/app-server-VLR42U5L.js +0 -266
  328. package/dist/bundle/bun-OPDGMZZQ.js +0 -169
  329. package/dist/bundle/bun-sqlite-HC6X4AOX.js +0 -76
  330. package/dist/bundle/chunk-274SLQNW.js +0 -54
  331. package/dist/bundle/chunk-2CI2OEZQ.js +0 -101
  332. package/dist/bundle/chunk-2DBF2IIC.js +0 -330
  333. package/dist/bundle/chunk-2GP573Q4.js +0 -67190
  334. package/dist/bundle/chunk-2JHVQMVC.js +0 -16
  335. package/dist/bundle/chunk-2XBDILVW.js +0 -53
  336. package/dist/bundle/chunk-3HC5F3P7.js +0 -24
  337. package/dist/bundle/chunk-3YM4B2GT.js +0 -63
  338. package/dist/bundle/chunk-4HLQ2JGK.js +0 -276
  339. package/dist/bundle/chunk-4N7PP76S.js +0 -6848
  340. package/dist/bundle/chunk-52Y4ETKU.js +0 -230
  341. package/dist/bundle/chunk-5HAUK3I4.js +0 -27160
  342. package/dist/bundle/chunk-5KYQ53EF.js +0 -357
  343. package/dist/bundle/chunk-5TU7Y5UW.js +0 -218
  344. package/dist/bundle/chunk-66ALX4ZI.js +0 -1068
  345. package/dist/bundle/chunk-676C2LE6.js +0 -229
  346. package/dist/bundle/chunk-6CWL5BKG.js +0 -3012
  347. package/dist/bundle/chunk-6QYZP4E2.js +0 -73
  348. package/dist/bundle/chunk-6VK332XS.js +0 -170
  349. package/dist/bundle/chunk-73MOMNLL.js +0 -94
  350. package/dist/bundle/chunk-7QPIUMUG.js +0 -198
  351. package/dist/bundle/chunk-7UVDPRFK.js +0 -259
  352. package/dist/bundle/chunk-A6EZK5RG.js +0 -142
  353. package/dist/bundle/chunk-ACI4YIEH.js +0 -331
  354. package/dist/bundle/chunk-AIKFOBDO.js +0 -1024
  355. package/dist/bundle/chunk-ASBDFXLS.js +0 -295
  356. package/dist/bundle/chunk-B32KZRQM.js +0 -2338
  357. package/dist/bundle/chunk-BBGJQMRI.js +0 -34
  358. package/dist/bundle/chunk-BDKVOU3I.js +0 -52
  359. package/dist/bundle/chunk-BP4FYANF.js +0 -335
  360. package/dist/bundle/chunk-D72URWJE.js +0 -532
  361. package/dist/bundle/chunk-DCYFT3FR.js +0 -161
  362. package/dist/bundle/chunk-DFDN6AUB.js +0 -21
  363. package/dist/bundle/chunk-DNCLQPOM.js +0 -7
  364. package/dist/bundle/chunk-DSZYABYL.js +0 -808
  365. package/dist/bundle/chunk-E745WZKY.js +0 -1199
  366. package/dist/bundle/chunk-EGTCQKHV.js +0 -340
  367. package/dist/bundle/chunk-EQG3PIH2.js +0 -108
  368. package/dist/bundle/chunk-ESN3W2MZ.js +0 -2624
  369. package/dist/bundle/chunk-FXBHOCJK.js +0 -24600
  370. package/dist/bundle/chunk-G46WJ7YO.js +0 -95
  371. package/dist/bundle/chunk-G6PETRMV.js +0 -64
  372. package/dist/bundle/chunk-GBHMT2IU.js +0 -755
  373. package/dist/bundle/chunk-GGMAIIVE.js +0 -38
  374. package/dist/bundle/chunk-GTKPMYK7.js +0 -72
  375. package/dist/bundle/chunk-GWGHH56B.js +0 -374
  376. package/dist/bundle/chunk-HC6VN5CO.js +0 -692
  377. package/dist/bundle/chunk-HP7A2ZOP.js +0 -185
  378. package/dist/bundle/chunk-HTQTIKWP.js +0 -928
  379. package/dist/bundle/chunk-HZENBDW2.js +0 -209
  380. package/dist/bundle/chunk-IANKXHSE.js +0 -46
  381. package/dist/bundle/chunk-ICPJT672.js +0 -228
  382. package/dist/bundle/chunk-JQ54DYAQ.js +0 -80
  383. package/dist/bundle/chunk-K5JGJIV2.js +0 -640
  384. package/dist/bundle/chunk-KJ6USQDZ.js +0 -616
  385. package/dist/bundle/chunk-KKFY23AK.js +0 -5150
  386. package/dist/bundle/chunk-KQPUVXKX.js +0 -84
  387. package/dist/bundle/chunk-KVJ3I7UL.js +0 -1007
  388. package/dist/bundle/chunk-KWU46LNK.js +0 -288
  389. package/dist/bundle/chunk-KXJ3JEDH.js +0 -2
  390. package/dist/bundle/chunk-L75SMSJR.js +0 -133
  391. package/dist/bundle/chunk-LAYYO4WD.js +0 -31
  392. package/dist/bundle/chunk-LEKKTJKK.js +0 -2336
  393. package/dist/bundle/chunk-M7H4MCAX.js +0 -388
  394. package/dist/bundle/chunk-MQLPZBMQ.js +0 -58
  395. package/dist/bundle/chunk-N3JLO63O.js +0 -13
  396. package/dist/bundle/chunk-N46F72AF.js +0 -410
  397. package/dist/bundle/chunk-NB7EOAUZ.js +0 -123
  398. package/dist/bundle/chunk-NEMX3UNN.js +0 -76
  399. package/dist/bundle/chunk-OBXQLFT5.js +0 -82
  400. package/dist/bundle/chunk-OGNO35A2.js +0 -262
  401. package/dist/bundle/chunk-OIPYBF43.js +0 -100
  402. package/dist/bundle/chunk-OO4TRVPB.js +0 -185
  403. package/dist/bundle/chunk-OQFQ77AY.js +0 -9352
  404. package/dist/bundle/chunk-PL5P7UKW.js +0 -25216
  405. package/dist/bundle/chunk-PMUPN6JW.js +0 -773
  406. package/dist/bundle/chunk-PSKTMMCO.js +0 -561
  407. package/dist/bundle/chunk-PWVJUIDQ.js +0 -106
  408. package/dist/bundle/chunk-Q7ICVP25.js +0 -18
  409. package/dist/bundle/chunk-QG6PILDO.js +0 -195
  410. package/dist/bundle/chunk-QPHBK63S.js +0 -25
  411. package/dist/bundle/chunk-QVSL5WJ7.js +0 -46524
  412. package/dist/bundle/chunk-QVYAV7F2.js +0 -58
  413. package/dist/bundle/chunk-R2B6PUVI.js +0 -206
  414. package/dist/bundle/chunk-RQOZBTNI.js +0 -86
  415. package/dist/bundle/chunk-T7IAWEBU.js +0 -362
  416. package/dist/bundle/chunk-TKNM22OH.js +0 -71
  417. package/dist/bundle/chunk-TKVBFJ5C.js +0 -37
  418. package/dist/bundle/chunk-TXDR6YSF.js +0 -23
  419. package/dist/bundle/chunk-TY7NDMFY.js +0 -46
  420. package/dist/bundle/chunk-UAWSINMC.js +0 -875
  421. package/dist/bundle/chunk-UKAAAOPC.js +0 -1251
  422. package/dist/bundle/chunk-UQCTXZEP.js +0 -214
  423. package/dist/bundle/chunk-UR5DBODY.js +0 -1345
  424. package/dist/bundle/chunk-V5EJSF2B.js +0 -12235
  425. package/dist/bundle/chunk-VB72LTSZ.js +0 -210
  426. package/dist/bundle/chunk-VB7FZOYX.js +0 -633
  427. package/dist/bundle/chunk-VS6WURLX.js +0 -217
  428. package/dist/bundle/chunk-VZ5PPYDG.js +0 -77
  429. package/dist/bundle/chunk-W5QHB53X.js +0 -3752
  430. package/dist/bundle/chunk-WMANRJR5.js +0 -555
  431. package/dist/bundle/chunk-WOPVBRPV.js +0 -29
  432. package/dist/bundle/chunk-XQ2WL3HB.js +0 -140
  433. package/dist/bundle/chunk-Y5E2WNWB.js +0 -35
  434. package/dist/bundle/chunk-Y6PVS55U.js +0 -800
  435. package/dist/bundle/chunk-YJXJJ2XP.js +0 -2333
  436. package/dist/bundle/chunk-YY7XKHDY.js +0 -79
  437. package/dist/bundle/chunk-ZED2CJW5.js +0 -353
  438. package/dist/bundle/chunk-ZOYOXWJB.js +0 -746
  439. package/dist/bundle/chunk-ZVVMGPBJ.js +0 -50
  440. package/dist/bundle/cli-U4O5XB7J.js +0 -1255
  441. package/dist/bundle/command-contract-FBTK6GQX.js +0 -45
  442. package/dist/bundle/command-server-entry-KKH6ZWJV.js +0 -175
  443. package/dist/bundle/config-FRJSIZNN.js +0 -118
  444. package/dist/bundle/decode-TPCNXEK4.js +0 -31
  445. package/dist/bundle/dispatch-FKMIPCPQ.js +0 -412
  446. package/dist/bundle/dist-7CLBCYZN.js +0 -321
  447. package/dist/bundle/dist-PAKDDIBT.js +0 -191
  448. package/dist/bundle/dist-XUFQCJXW.js +0 -7577
  449. package/dist/bundle/echarts-O3TNDAXJ.js +0 -42501
  450. package/dist/bundle/embed-WCJSFVSK.js +0 -38
  451. package/dist/bundle/embedder-TBBUPXBX.js +0 -111
  452. package/dist/bundle/failure-XTWBYI2A.js +0 -25
  453. package/dist/bundle/first-run-ELEMFW42.js +0 -29
  454. package/dist/bundle/first-screen-DIOBWMKP.js +0 -46
  455. package/dist/bundle/instructions-AMH5RWVJ.js +0 -11
  456. package/dist/bundle/mcp-5HFPWC3W.js +0 -167
  457. package/dist/bundle/meeting-combined-UXCF4SJ3.js +0 -26
  458. package/dist/bundle/meeting-model-3BZJ3EQP.js +0 -26
  459. package/dist/bundle/meeting-semantic-3HU7I2SJ.js +0 -23
  460. package/dist/bundle/meetings-XWMB6FOH.js +0 -332
  461. package/dist/bundle/node-EGMCBAO7.js +0 -176
  462. package/dist/bundle/node-KM3CUABH.js +0 -2340
  463. package/dist/bundle/node-TLZSIHIJ.js +0 -21
  464. package/dist/bundle/node-sqlite-IJBWENFX.js +0 -74
  465. package/dist/bundle/oauth-SZDDAP7A.js +0 -20
  466. package/dist/bundle/open-NS3TMKZX.js +0 -23
  467. package/dist/bundle/openai-4DN6WI3B.js +0 -28
  468. package/dist/bundle/process-SGHEN6MQ.js +0 -91
  469. package/dist/bundle/prompt-HJFMPFVC.js +0 -17
  470. package/dist/bundle/public-C2ZB2AGQ.js +0 -198
  471. package/dist/bundle/recognize-2SEI5PPM.js +0 -26
  472. package/dist/bundle/remote-2DMS74XE.js +0 -32
  473. package/dist/bundle/rerank-H6GCYVIA.js +0 -52
  474. package/dist/bundle/run-log-QU26SUZP.js +0 -145
  475. package/dist/bundle/serve-ODVRPFJO.js +0 -199
  476. package/dist/bundle/server-NBPF6IDZ.js +0 -95
  477. package/dist/bundle/server-PCLIO24L.js +0 -228
  478. package/dist/bundle/services-4QAPXBLO.js +0 -607
  479. package/dist/bundle/speech-MA6ZT3WE.js +0 -89
  480. package/dist/bundle/sqlite-runtime-PVMAUXRN.js +0 -20
  481. package/dist/bundle/state-QFMTYUME.js +0 -36
  482. package/dist/bundle/store-25OTAQC3.js +0 -187
  483. package/dist/bundle/store-F724QIKJ.js +0 -305
  484. package/dist/bundle/store-connection-OGPXANGB.js +0 -111
  485. package/dist/bundle/store-maintenance-command-2CM7LLNQ.js +0 -83
  486. package/dist/bundle/streaming-S22C4DG5.js +0 -18
  487. package/dist/bundle/surface-7PXHWCF6.js +0 -81
  488. package/dist/bundle/tokens-NLUHA2DW.js +0 -25
  489. package/dist/login.d.ts +0 -16
  490. package/dist/login.d.ts.map +0 -1
  491. package/dist/login.js +0 -98
  492. package/dist/login.js.map +0 -1
@@ -1,692 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import {
4
- LEVELS
5
- } from "./chunk-KJ6USQDZ.js";
6
- import {
7
- WORD_BODY,
8
- e164Of
9
- } from "./chunk-LEKKTJKK.js";
10
- import {
11
- resolvePaths,
12
- writeSecurely
13
- } from "./chunk-6CWL5BKG.js";
14
- import {
15
- array,
16
- getDotPath,
17
- integer,
18
- minLength,
19
- minValue,
20
- nullable,
21
- number,
22
- optional,
23
- picklist,
24
- pipe,
25
- record,
26
- regex,
27
- safeParse,
28
- strictObject,
29
- string,
30
- transform,
31
- unknown
32
- } from "./chunk-ESN3W2MZ.js";
33
- import {
34
- CliError
35
- } from "./chunk-IANKXHSE.js";
36
- import {
37
- visibleControls
38
- } from "./chunk-BBGJQMRI.js";
39
- import {
40
- __name
41
- } from "./chunk-ZVVMGPBJ.js";
42
-
43
- // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/domain/vcard.js
44
- import { createHash } from "node:crypto";
45
- var MAX_ID = 512;
46
- var AS_WORD = new RegExp(`^${WORD_BODY}$`);
47
- var isVcard = /* @__PURE__ */ __name((text) => /^?\s*BEGIN:VCARD\b/i.test(text), "isVcard");
48
- var isQuotedPrintable = /* @__PURE__ */ __name((line) => {
49
- const colon = line.indexOf(":");
50
- return /;(ENCODING=)?QUOTED-PRINTABLE\b/i.test(colon < 0 ? line : line.slice(0, colon));
51
- }, "isQuotedPrintable");
52
- var PROPERTY_START = /^([A-Za-z0-9-]+\.)?[A-Za-z][A-Za-z0-9-]*(;[^:]*)?:/;
53
- var isSoft = /* @__PURE__ */ __name((line) => line !== void 0 && isQuotedPrintable(line) && line.endsWith("="), "isSoft");
54
- var unfolded = /* @__PURE__ */ __name((text) => {
55
- const lines = [];
56
- for (const raw of text.replace(/^\uFEFF/, "").split(/\r\n|\r|\n/)) {
57
- const last2 = lines.length - 1;
58
- const previous = lines[last2];
59
- const bounds = /^(BEGIN|END):/i.test(raw);
60
- if (isSoft(previous) && !bounds && !PROPERTY_START.test(raw))
61
- lines[last2] = previous.slice(0, -1) + raw.replace(/^[ \t]/, "");
62
- else if (previous !== void 0 && /^[ \t]/.test(raw) && !bounds)
63
- lines[last2] = previous + raw.slice(1);
64
- else {
65
- if (isSoft(previous))
66
- lines[last2] = previous.slice(0, -1);
67
- lines.push(raw);
68
- }
69
- }
70
- const last = lines.length - 1;
71
- if (isSoft(lines[last]))
72
- lines[last] = lines[last].slice(0, -1);
73
- return lines.filter((line) => line.trim() !== "");
74
- }, "unfolded");
75
- var propertyOf = /* @__PURE__ */ __name((line) => {
76
- let quoted = false;
77
- let colon = -1;
78
- for (let index = 0; index < line.length; index += 1) {
79
- if (line[index] === '"')
80
- quoted = !quoted;
81
- else if (line[index] === ":" && !quoted) {
82
- colon = index;
83
- break;
84
- }
85
- }
86
- if (colon < 0)
87
- return void 0;
88
- const [head = "", ...rest] = line.slice(0, colon).split(";");
89
- const params = /* @__PURE__ */ new Map();
90
- for (const part of rest) {
91
- const equals = part.indexOf("=");
92
- const key = equals < 0 ? /^(QUOTED-PRINTABLE|BASE64|8BIT|7BIT|B)$/i.test(part) ? "ENCODING" : "TYPE" : part.slice(0, equals);
93
- const values = (equals < 0 ? part : part.slice(equals + 1)).replaceAll('"', "").split(",");
94
- params.set(key.toUpperCase(), [...params.get(key.toUpperCase()) ?? [], ...values.map((one) => one.toUpperCase())]);
95
- }
96
- const name = head.replace(/^[^.]*\./, "").toUpperCase();
97
- return { name, params, value: line.slice(colon + 1) };
98
- }, "propertyOf");
99
- var encoder = new TextEncoder();
100
- var decoded = /* @__PURE__ */ __name((property, report) => {
101
- const encoding = property.params.get("ENCODING")?.[0];
102
- if (encoding !== "QUOTED-PRINTABLE")
103
- return property.value;
104
- const bytes = [];
105
- const { value } = property;
106
- for (let index = 0; index < value.length; index += 1) {
107
- const hex = value.slice(index + 1, index + 3);
108
- if (value[index] === "=" && /^[0-9A-F]{2}$/i.test(hex)) {
109
- bytes.push(Number.parseInt(hex, 16));
110
- index += 2;
111
- } else
112
- for (const byte of encoder.encode(value[index]))
113
- bytes.push(byte);
114
- }
115
- const charset = property.params.get("CHARSET")?.[0]?.toLowerCase() ?? "utf-8";
116
- try {
117
- return new TextDecoder(charset).decode(new Uint8Array(bytes));
118
- } catch {
119
- report(`${property.name} names the unknown charset ${charset}: read as UTF-8`);
120
- return new TextDecoder("utf-8").decode(new Uint8Array(bytes));
121
- }
122
- }, "decoded");
123
- var components = /* @__PURE__ */ __name((value) => {
124
- const parts = [""];
125
- for (let index = 0; index < value.length; index += 1) {
126
- const char = value[index];
127
- if (char === "\\" && index + 1 < value.length) {
128
- const next = value[index + 1];
129
- parts[parts.length - 1] += next === "n" || next === "N" ? "\n" : next;
130
- index += 1;
131
- } else if (char === ";")
132
- parts.push("");
133
- else
134
- parts[parts.length - 1] += char;
135
- }
136
- return parts.map((part) => part.trim());
137
- }, "components");
138
- var textOf = /* @__PURE__ */ __name((property, report) => components(decoded(property, report)).join(";").trim(), "textOf");
139
- var e164 = /* @__PURE__ */ __name((typed, region) => e164Of(typed.replace(/^tel:/i, "").replace(/;.*$/, "").trim(), region) ?? void 0, "e164");
140
- var foldedName = /* @__PURE__ */ __name((name) => name.normalize("NFKC").toLowerCase().replace(/\s+/g, " ").trim(), "foldedName");
141
- var hashed = /* @__PURE__ */ __name((prefix, parts) => `${prefix}${createHash("sha256").update(parts.join("\n")).digest("hex").slice(0, 32)}`, "hashed");
142
- var organizationId = /* @__PURE__ */ __name((name) => {
143
- const id = `org:${foldedName(name)}`;
144
- return id.length <= MAX_ID ? id : hashed("org:", [foldedName(name)]);
145
- }, "organizationId");
146
- var titleWord = /* @__PURE__ */ __name((title) => {
147
- const word = title.toLowerCase().trim().replace(/\s+/g, "-");
148
- return AS_WORD.test(word) ? word : void 0;
149
- }, "titleWord");
150
- var nameOf = /* @__PURE__ */ __name((properties, report) => {
151
- const full = properties.find(({ name }) => name === "FN");
152
- const text = full ? textOf(full, report) : "";
153
- if (text)
154
- return text;
155
- const structured = properties.find(({ name }) => name === "N");
156
- if (!structured)
157
- return void 0;
158
- const [family = "", given = "", additional = ""] = components(decoded(structured, report));
159
- return [given, additional, family].filter(Boolean).join(" ") || void 0;
160
- }, "nameOf");
161
- var SKIPPED = /* @__PURE__ */ new Set(["PHOTO", "LOGO", "SOUND", "KEY"]);
162
- var cardsOf = /* @__PURE__ */ __name((text) => {
163
- const cards = [];
164
- const issues = [];
165
- let card;
166
- const isBound = /* @__PURE__ */ __name((property, name) => property.name === name && property.value.trim().toUpperCase() === "VCARD", "isBound");
167
- for (const line of unfolded(text)) {
168
- const property = propertyOf(line);
169
- if (!property)
170
- continue;
171
- if (isBound(property, "BEGIN")) {
172
- if (card) {
173
- issues.push({ card: cards.length, message: "BEGIN:VCARD inside a card: the card ends there, unfinished" });
174
- cards.push(card);
175
- }
176
- card = [];
177
- } else if (isBound(property, "END")) {
178
- if (card)
179
- cards.push(card);
180
- card = void 0;
181
- } else if (card && !SKIPPED.has(property.name))
182
- card.push(property);
183
- }
184
- if (card) {
185
- issues.push({ card: cards.length, message: "the file ends inside a card, with no END:VCARD" });
186
- cards.push(card);
187
- }
188
- return { cards, issues };
189
- }, "cardsOf");
190
- var envelopeOfVcard = /* @__PURE__ */ __name((text, { provider, account, batchId, region: given }) => {
191
- const region = given?.toLowerCase();
192
- const { cards, issues } = cardsOf(text);
193
- const people = [];
194
- const organizations = /* @__PURE__ */ new Map();
195
- const seen = /* @__PURE__ */ new Set();
196
- for (const [index, properties] of cards.entries()) {
197
- const report = /* @__PURE__ */ __name((message) => {
198
- if (!issues.some((one) => one.card === index && one.message === message))
199
- issues.push({ card: index, message });
200
- }, "report");
201
- const values = /* @__PURE__ */ __name((wanted) => properties.filter(({ name: name2 }) => name2 === wanted).map((one) => textOf(one, report)).filter(Boolean), "values");
202
- const name = nameOf(properties, report);
203
- const phones = [];
204
- const unread = [];
205
- for (const typed of values("TEL")) {
206
- const value = e164(typed, region);
207
- if (value !== void 0) {
208
- if (!phones.includes(value))
209
- phones.push(value);
210
- } else {
211
- unread.push(typed);
212
- issues.push({
213
- card: index,
214
- message: `${typed} has no country code${region === void 0 ? " and no region was given" : ` in ${region}`}: kept, not matched`
215
- });
216
- }
217
- }
218
- const emails = [...new Set(values("EMAIL").map((one) => one.replace(/^mailto:/i, "").toLowerCase()))];
219
- if (name === void 0 && phones.length === 0 && unread.length === 0 && emails.length === 0) {
220
- report("the card holds no name, number or address: left out");
221
- continue;
222
- }
223
- const uid = values("UID")[0];
224
- const externalId = uid === void 0 ? hashed("vcard:", [name ?? "", ...[...phones].sort(), ...emails.sort()]) : uid.length <= MAX_ID ? uid : hashed("vcard:", [uid]);
225
- if (seen.has(externalId)) {
226
- issues.push({ card: index, message: `another card of the file is ${externalId}: left out` });
227
- continue;
228
- }
229
- seen.add(externalId);
230
- const organization = properties.find(({ name: name2 }) => name2 === "ORG");
231
- const organizationName = organization ? components(decoded(organization, report))[0] : void 0;
232
- const title = values("TITLE")[0];
233
- const relations = [];
234
- if (organizationName) {
235
- const id = organizationId(organizationName);
236
- if (!organizations.has(id))
237
- organizations.set(id, {
238
- key: id,
239
- type: "organization",
240
- external_id: id,
241
- operation: "upsert",
242
- fields: { name: organizationName }
243
- });
244
- const as = title === void 0 ? void 0 : titleWord(title);
245
- relations.push({ role: "member-of", type: "organization", external_id: id, ...as ? { as } : {} });
246
- }
247
- people.push({
248
- key: `person:${externalId}`,
249
- type: "person",
250
- external_id: externalId,
251
- operation: "upsert",
252
- fields: {
253
- ...name === void 0 ? {} : { name },
254
- ...phones.length ? { phone: phones } : {},
255
- ...emails.length ? { email: emails } : {},
256
- ...unread.length ? { phone_unread: unread } : {},
257
- ...organizationName ? { organization: organizationName } : {},
258
- ...title === void 0 ? {} : { title }
259
- },
260
- ...relations.length ? { relations } : {}
261
- });
262
- }
263
- return {
264
- envelope: {
265
- schema_version: 1,
266
- source: { provider, account, batch_id: batchId },
267
- ...region === void 0 ? {} : { options: { phone_region: region } },
268
- records: [...organizations.values(), ...people]
269
- },
270
- issues
271
- };
272
- }, "envelopeOfVcard");
273
-
274
- // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/domain/formatting.js
275
- var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "the messenger formatter returned invalid text spans"), "invalid");
276
- var validateFormattedText = /* @__PURE__ */ __name((formatted) => {
277
- const { text, spans } = formatted;
278
- if (typeof text !== "string" || !Array.isArray(spans) || spans.length > 100)
279
- throw invalid();
280
- const boundary = /* @__PURE__ */ __name((at) => !(at > 0 && at < text.length && /[\uD800-\uDBFF]/u.test(text[at - 1] ?? "") && /[\uDC00-\uDFFF]/u.test(text[at] ?? "")), "boundary");
281
- for (const span of spans) {
282
- if (![
283
- "bold",
284
- "italic",
285
- "strike",
286
- "underline",
287
- "code",
288
- "pre",
289
- "link",
290
- "blockquote",
291
- "spoiler",
292
- "highlight",
293
- "heading"
294
- ].includes(span.type) || !Number.isInteger(span.from) || !Number.isInteger(span.length) || span.from < 0 || span.length <= 0 || span.from + span.length > text.length || !boundary(span.from) || !boundary(span.from + span.length))
295
- throw invalid();
296
- if (span.type === "link") {
297
- if (!span.url || Array.from(span.url).some((char) => char.charCodeAt(0) <= 32 || char.charCodeAt(0) === 127))
298
- throw new CliError("validation_error", "a Markdown link needs an absolute http, https or mailto URL");
299
- let url;
300
- try {
301
- url = new URL(span.url);
302
- } catch {
303
- throw new CliError("validation_error", "a Markdown link needs an absolute http, https or mailto URL");
304
- }
305
- if (!["http:", "https:", "mailto:"].includes(url.protocol))
306
- throw new CliError("validation_error", "Markdown links support http, https and mailto URLs");
307
- }
308
- }
309
- return formatted;
310
- }, "validateFormattedText");
311
- var visibleFormattedText = /* @__PURE__ */ __name((formatted) => {
312
- validateFormattedText(formatted);
313
- const text = visibleControls(formatted.text);
314
- const positions = /* @__PURE__ */ new Map([[0, 0]]);
315
- let original = 0;
316
- let visible = 0;
317
- for (const character of formatted.text) {
318
- const rendered = text.startsWith(character, visible) ? character : visibleControls(character);
319
- original += character.length;
320
- visible += rendered.length;
321
- positions.set(original, visible);
322
- }
323
- return {
324
- text,
325
- spans: formatted.spans.map((span) => ({
326
- ...span,
327
- from: positions.get(span.from),
328
- length: positions.get(span.from + span.length) - positions.get(span.from),
329
- ...span.url === void 0 ? {} : { url: visibleControls(span.url) }
330
- }))
331
- };
332
- }, "visibleFormattedText");
333
-
334
- // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/moderation/check.js
335
- var INVITE = /max\.ru\/join\/|(t|telegram)\.me\/(\+|joinchat\/)|tg:\/\/join/i;
336
- var LINK = /https?:\/\/\S+/i;
337
- var STRENGTH = { report: 0, delete: 1, remove: 2 };
338
- var judge = /* @__PURE__ */ __name(({ rules, messages, joined, answerers, service, now, invites }) => {
339
- const invite = invites ? new RegExp(`${INVITE.source}|${invites.source}`, "i") : INVITE;
340
- const trusted = new Set(rules.trusted);
341
- const blocked = /* @__PURE__ */ __name((id, name) => id !== null && rules.blocked.includes(id) || name !== null && rules.blockedNames.some((part) => name.toLocaleLowerCase().includes(part.toLocaleLowerCase())), "blocked");
342
- const young = /* @__PURE__ */ __name((member) => rules.newAccount.days > 0 && typeof member.registeredAt === "string" && now - Date.parse(member.registeredAt) < rules.newAccount.days * 864e5, "young");
343
- const found = [];
344
- const add = /* @__PURE__ */ __name((finding) => {
345
- if (finding.action === "remove" && found.some((f) => f.action === "remove" && f.personId === finding.personId)) {
346
- return;
347
- }
348
- found.push(finding);
349
- }, "add");
350
- for (const member of joined) {
351
- if (trusted.has(member.id) || answerers.has(member.id))
352
- continue;
353
- const person = { kind: "member", personId: member.id, personName: member.name };
354
- if (blocked(member.id, member.name)) {
355
- add({ ...person, rule: "blocked", action: rules.blockedPeople === "remove" ? "remove" : "report" });
356
- } else if (young(member)) {
357
- add({ ...person, rule: "newAccount", action: rules.newAccount.action });
358
- }
359
- }
360
- const flooding = floodOf(messages, rules.flood);
361
- for (const message of messages) {
362
- const id = message.senderId;
363
- if (id === null || message.outgoing === true || answerers.has(id) || trusted.has(id))
364
- continue;
365
- if (service.has(message.id) || message.attachments.some((attachment) => attachment.kind === "control"))
366
- continue;
367
- const base = { kind: "message", personId: id, personName: message.senderName, messageId: message.id };
368
- const text = message.text;
369
- const broken2 = [];
370
- if (blocked(id, message.senderName))
371
- broken2.push(["blocked", rules.blockedPeople]);
372
- if (invite.test(text))
373
- broken2.push(["invites", rules.invites]);
374
- if (LINK.test(text) || message.attachments.some((attachment) => attachment.kind === "share")) {
375
- broken2.push(["links", rules.links]);
376
- }
377
- if (message.forwardedFrom !== null)
378
- broken2.push(["forwards", rules.forwards]);
379
- if (flooding.has(message.id))
380
- broken2.push(["flood", rules.flood.action]);
381
- const strongest = broken2.reduce((best, rule) => best === void 0 || STRENGTH[rule[1]] > STRENGTH[best[1]] ? rule : best, void 0);
382
- if (strongest)
383
- add({ ...base, rule: strongest[0], action: strongest[1] });
384
- }
385
- return found;
386
- }, "judge");
387
- var floodOf = /* @__PURE__ */ __name((messages, flood) => {
388
- const window = flood.minutes * 6e4;
389
- const over = /* @__PURE__ */ new Set();
390
- const bySender = /* @__PURE__ */ new Map();
391
- for (const message of messages) {
392
- if (message.senderId === null)
393
- continue;
394
- const times = bySender.get(message.senderId) ?? [];
395
- const at = Date.parse(message.timestamp);
396
- times.push(at);
397
- bySender.set(message.senderId, times);
398
- if (times.filter((time) => at - time < window).length > flood.messages)
399
- over.add(message.id);
400
- }
401
- return over;
402
- }, "floodOf");
403
- var act = /* @__PURE__ */ __name(async (moderator, findings, options) => {
404
- const { chatId, rules, allowDangerous, dryRun, maxActions, confirm, command } = options;
405
- const typed = options.commandFor ?? ((chat, finding) => commandFor(command, chat, finding));
406
- const rows = [];
407
- let acted = 0;
408
- let stopped;
409
- for (const finding of findings) {
410
- if (finding.action === "report") {
411
- rows.push({ ...finding, outcome: "reported" });
412
- continue;
413
- }
414
- const consent = finding.action;
415
- const level2 = rules.consent[consent];
416
- const row = /* @__PURE__ */ __name((outcome, reason) => ({
417
- ...finding,
418
- outcome,
419
- ...reason ? { reason } : {},
420
- ...outcome === "done" || outcome === "reported" ? {} : { command: typed(chatId, finding) }
421
- }), "row");
422
- if (level2 === "deny") {
423
- rows.push(row("forbidden", `consent.${consent} is deny`));
424
- continue;
425
- }
426
- if (level2 === "readonly") {
427
- rows.push(row("reported", `consent.${consent} is readonly`));
428
- continue;
429
- }
430
- if (dryRun) {
431
- rows.push(row("planned", "--dry-run"));
432
- continue;
433
- }
434
- if (stopped || acted >= maxActions) {
435
- rows.push(row("skipped", stopped ?? `over the limit of ${maxActions} actions per check`));
436
- continue;
437
- }
438
- if (level2 === "ask" && !allowDangerous) {
439
- const yes = confirm ? await confirm(finding) : void 0;
440
- if (yes === void 0) {
441
- rows.push(row("planned", `consent.${consent} is ask, and nobody is there to answer \u2014 run with --allow-dangerous`));
442
- continue;
443
- }
444
- if (!yes) {
445
- rows.push(row("declined", "the answer was no"));
446
- continue;
447
- }
448
- }
449
- acted += 1;
450
- try {
451
- if (finding.action === "delete" && finding.messageId) {
452
- await moderator.deleteMessage(chatId, finding.messageId);
453
- } else {
454
- await moderator.removePerson(chatId, finding.personId);
455
- }
456
- rows.push(row("done"));
457
- } catch (error) {
458
- const failure = asCliError(error);
459
- if (failure.code === "rate_limited")
460
- stopped = failure.message;
461
- const refused = ["rate_limited", "permission_error", "confirmation_required"].includes(failure.code);
462
- rows.push(row(refused ? "refused" : "failed", failure.message));
463
- }
464
- }
465
- return rows;
466
- }, "act");
467
- var asCliError = /* @__PURE__ */ __name((error) => error instanceof CliError ? error : new CliError("provider_error", error instanceof Error ? error.message : String(error)), "asCliError");
468
- var who = /* @__PURE__ */ __name((finding) => finding.personName ?? finding.personId, "who");
469
- var describe = /* @__PURE__ */ __name((finding) => finding.action === "delete" ? `delete message ${finding.messageId} from ${who(finding)} for everyone (${finding.rule})` : `remove ${who(finding)} from the group (${finding.rule})`, "describe");
470
- var commandFor = /* @__PURE__ */ __name((command, chatId, finding) => finding.action === "delete" ? `${command} messages delete ${chatId} ${finding.messageId} --for-everyone --allow-dangerous` : finding.action === "remove" ? `${command} chats members remove ${chatId} ${finding.personId}` : "", "commandFor");
471
- var CHECK_READS = 1e3;
472
- var PAGE = 100;
473
- var gather = /* @__PURE__ */ __name(async (adapter, chatId, since) => {
474
- const notes = [];
475
- const historyAfter = adapter.historyAfter;
476
- if (!historyAfter)
477
- throw new CliError("validation_error", "this messenger cannot read a chat forward from a time");
478
- const messages = [];
479
- let more = true;
480
- while (more && messages.length < CHECK_READS) {
481
- const last = messages.at(-1);
482
- const page = await historyAfter.call(adapter, chatId, {
483
- limit: PAGE,
484
- after: last ? { id: last.id } : { time: since }
485
- });
486
- messages.push(...page.items);
487
- more = page.hasMore && page.items.length > 0;
488
- }
489
- const scanned = adapter.chatEvents ? (await adapter.chatEvents(chatId, { since })).events : [];
490
- const until = messages.at(-1)?.timestamp ?? null;
491
- const events = more && until !== null ? scanned.filter((event) => Date.parse(event.timestamp) <= Date.parse(until)) : scanned;
492
- if (!adapter.chatEvents)
493
- notes.push("this messenger does not say who joined, so only messages are judged");
494
- const joinedIds = new Set(events.filter((one) => one.event === "join" || one.event === "add").flatMap((one) => one.people.length > 0 ? one.people.map((person) => person.id) : one.by.id ? [one.by.id] : []));
495
- const joined = joinedIds.size === 0 || !adapter.members ? [] : (await adapter.members(chatId, { offset: 0 })).items.filter((member) => joinedIds.has(member.id));
496
- const admins = adapter.admins ? await adapter.admins(chatId) : null;
497
- if (admins === null)
498
- notes.push("the group's admins are not known, so only your own messages are exempt");
499
- return {
500
- messages,
501
- joined,
502
- answerers: new Set(admins ?? []),
503
- service: new Set(events.map((one) => one.messageId)),
504
- until,
505
- more,
506
- notes
507
- };
508
- }, "gather");
509
- var MAX_ACTIONS = 10;
510
- var undone = /* @__PURE__ */ __name((row) => ["planned", "skipped", "failed"].includes(row.outcome), "undone");
511
- var nextPoint = /* @__PURE__ */ __name((rows, found) => {
512
- const waiting = rows.filter(undone);
513
- if (waiting.some((row) => row.messageId === void 0))
514
- return null;
515
- const times = waiting.map((row) => found.messages.find((message) => message.id === row.messageId)?.timestamp).filter((time) => time !== void 0).map(Date.parse);
516
- if (times.length === 0)
517
- return found.until;
518
- return new Date(Math.min(...times) - 1).toISOString();
519
- }, "nextPoint");
520
- var someUndone = /* @__PURE__ */ __name((rows) => rows.some(undone), "someUndone");
521
-
522
- // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/moderation/rules.js
523
- import { existsSync, readdirSync, readFileSync } from "node:fs";
524
- import { join } from "node:path";
525
- var RULE_ACTIONS = ["report", "delete", "remove"];
526
- var OLD_LEVELS = { forbid: "deny", flag: "ask", confirm: "ask", allow: "allow" };
527
- var level = pipe(picklist([...LEVELS, ...Object.keys(OLD_LEVELS)]), transform((typed) => OLD_LEVELS[typed] ?? typed));
528
- var action = picklist(RULE_ACTIONS);
529
- var personIds = array(pipe(string(), regex(/^-?\d+$/, "a person id is digits")));
530
- var atLeast = /* @__PURE__ */ __name((min) => pipe(number(), integer(), minValue(min)), "atLeast");
531
- var groupRules = pipe(strictObject({
532
- title: nullable(string()),
533
- trusted: personIds,
534
- blocked: personIds,
535
- blockedNames: array(pipe(string(), minLength(1))),
536
- links: action,
537
- invites: action,
538
- forwards: action,
539
- blockedPeople: action,
540
- flood: strictObject({ messages: atLeast(1), minutes: atLeast(1), action }),
541
- /** 0 days turns the rule off. */
542
- newAccount: strictObject({ days: atLeast(0), action: picklist(["report", "remove"]) }),
543
- requests: optional(unknown()),
544
- consent: strictObject({
545
- delete: level,
546
- remove: level,
547
- accept: optional(unknown()),
548
- decline: optional(unknown())
549
- })
550
- }), transform(({ requests: _, consent: { accept: _accept, decline: _decline, ...consent }, ...rules }) => ({
551
- ...rules,
552
- consent
553
- })));
554
- var file = strictObject({
555
- groups: record(string(), groupRules),
556
- /** Where each group's next `chats moderate` starts, ISO 8601. */
557
- checkedUntil: optional(record(string(), string()))
558
- });
559
- var defaultRules = /* @__PURE__ */ __name((title) => ({
560
- title,
561
- trusted: [],
562
- blocked: [],
563
- blockedNames: [],
564
- links: "report",
565
- invites: "report",
566
- forwards: "report",
567
- blockedPeople: "report",
568
- flood: { messages: 5, minutes: 1, action: "report" },
569
- newAccount: { days: 7, action: "report" },
570
- consent: { delete: "ask", remove: "ask" }
571
- }), "defaultRules");
572
- var list = /* @__PURE__ */ __name((value) => value.split(",").map((item) => item.trim()).filter(Boolean), "list");
573
- var whole = /* @__PURE__ */ __name((value) => /^\d+$/.test(value.trim()) ? Number(value) : Number.NaN, "whole");
574
- var KEYS = {
575
- trusted: { help: "person ids, comma-separated; never acted on", parse: list },
576
- blocked: { help: "person ids, comma-separated", parse: list },
577
- blockedNames: { help: "parts of a name, comma-separated, any case", parse: list },
578
- links: { help: RULE_ACTIONS.join("|"), parse: String },
579
- invites: { help: RULE_ACTIONS.join("|"), parse: String },
580
- forwards: { help: RULE_ACTIONS.join("|"), parse: String },
581
- blockedPeople: { help: RULE_ACTIONS.join("|"), parse: String },
582
- "flood.messages": { help: "a whole number, 1 or more", parse: whole },
583
- "flood.minutes": { help: "a whole number, 1 or more", parse: whole },
584
- "flood.action": { help: RULE_ACTIONS.join("|"), parse: String },
585
- "newAccount.days": { help: "a whole number; 0 turns it off", parse: whole },
586
- "newAccount.action": { help: "report|remove", parse: String },
587
- "consent.delete": { help: LEVELS.join("|"), parse: String },
588
- "consent.remove": { help: LEVELS.join("|"), parse: String }
589
- };
590
- var RULE_KEYS = Object.keys(KEYS);
591
- var stateFolder = /* @__PURE__ */ __name((app, env, folder) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, folder), "stateFolder");
592
- var profilesFolder = /* @__PURE__ */ __name((app, env) => stateFolder(app, env, "profiles"), "profilesFolder");
593
- var moderationPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join(profilesFolder(app, env), `${profile}.moderation.json`), "moderationPathFor");
594
- var namesIn = /* @__PURE__ */ __name((folder, suffix) => existsSync(folder) ? readdirSync(folder).filter((name) => name.endsWith(suffix)).map((name) => name.slice(0, -suffix.length)) : [], "namesIn");
595
- var moderationProfiles = /* @__PURE__ */ __name((app, env = process.env) => [
596
- .../* @__PURE__ */ new Set([
597
- ...namesIn(stateFolder(app, env, "accounts"), ".json"),
598
- ...namesIn(profilesFolder(app, env), ".moderation.json")
599
- ])
600
- ].sort(), "moderationProfiles");
601
- var ModerationRules = class {
602
- static {
603
- __name(this, "ModerationRules");
604
- }
605
- path;
606
- constructor(path) {
607
- this.path = path;
608
- }
609
- /** `undefined` when this group has no section yet. */
610
- read(chatId) {
611
- return this.#file().groups[chatId];
612
- }
613
- /** Writes the group's whole section — the defaults first, if it had none — with one key changed. */
614
- set(chatId, title, key, value) {
615
- const known = KEYS[key];
616
- if (!known)
617
- throw invalid2(`no rule ${key} \u2014 one of: ${RULE_KEYS.join(", ")}`);
618
- const current = this.read(chatId) ?? defaultRules(title);
619
- const checked = safeParse(groupRules, assign(current, key, known.parse(value)));
620
- if (!checked.success)
621
- throw invalid2(`${key} ${JSON.stringify(value)} is not valid \u2014 ${known.help}`);
622
- const saved = this.#file();
623
- this.#write({ ...saved, groups: { ...saved.groups, [chatId]: checked.output } });
624
- return checked.output;
625
- }
626
- /** Puts one key back to its default. */
627
- unset(chatId, title, key) {
628
- if (!KEYS[key])
629
- throw invalid2(`no rule ${key} \u2014 one of: ${RULE_KEYS.join(", ")}`);
630
- const current = this.read(chatId) ?? defaultRules(title);
631
- const changed = assign(current, key, lookup(defaultRules(title), key));
632
- const saved = this.#file();
633
- this.#write({ ...saved, groups: { ...saved.groups, [chatId]: changed } });
634
- return changed;
635
- }
636
- checkedUntil(chatId) {
637
- return this.#file().checkedUntil?.[chatId];
638
- }
639
- markChecked(chatId, at) {
640
- const saved = this.#file();
641
- this.#write({ ...saved, checkedUntil: { ...saved.checkedUntil, [chatId]: at } });
642
- }
643
- #file() {
644
- if (!existsSync(this.path))
645
- return { groups: {} };
646
- let parsed;
647
- try {
648
- parsed = JSON.parse(readFileSync(this.path, "utf8"));
649
- } catch (error) {
650
- throw broken(this.path, error instanceof Error ? error.message : String(error));
651
- }
652
- const checked = safeParse(file, parsed);
653
- if (!checked.success) {
654
- const problems = checked.issues.map((issue) => `${getDotPath(issue) ?? "file"}: ${issue.message}`);
655
- throw broken(this.path, problems.join("; "));
656
- }
657
- return checked.output;
658
- }
659
- #write(content) {
660
- writeSecurely(this.path, `${JSON.stringify(content, null, 2)}
661
- `, 384);
662
- }
663
- };
664
- var invalid2 = /* @__PURE__ */ __name((message) => new CliError("validation_error", message), "invalid");
665
- var broken = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the moderation rules ${path} cannot be read (${why}) \u2014 fix the file`), "broken");
666
- var lookup = /* @__PURE__ */ __name((rules, key) => key.split(".").reduce((value, part) => value[part], rules), "lookup");
667
- var assign = /* @__PURE__ */ __name((rules, key, value) => {
668
- const [head, tail] = key.split(".");
669
- if (tail === void 0)
670
- return { ...rules, [head]: value };
671
- return { ...rules, [head]: { ...rules[head], [tail]: value } };
672
- }, "assign");
673
-
674
- export {
675
- isVcard,
676
- envelopeOfVcard,
677
- validateFormattedText,
678
- visibleFormattedText,
679
- judge,
680
- act,
681
- describe,
682
- CHECK_READS,
683
- gather,
684
- MAX_ACTIONS,
685
- nextPoint,
686
- someUndone,
687
- defaultRules,
688
- RULE_KEYS,
689
- moderationPathFor,
690
- moderationProfiles,
691
- ModerationRules
692
- };