@wirecat/zoom-cli 0.83.0 → 0.84.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 (481) hide show
  1. package/README.md +10 -10
  2. package/contracts/wirecat.json +34 -1
  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 +1 -1
  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 +3 -3
  39. package/dist/bin/main.js.map +1 -1
  40. package/dist/bin/zm.js +11 -11
  41. package/dist/bundle/answer-policy-FBJQFXVQ.js +33 -0
  42. package/dist/bundle/{chunk-26TW5RZ6.js → chunk-6BQOT7BA.js} +61 -94
  43. package/dist/bundle/chunk-AEWYRB6F.js +8 -0
  44. package/dist/bundle/{chunk-OGTN2KVG.js → chunk-DAPVDZQO.js} +4 -14
  45. package/dist/bundle/{chunk-H6A4NWYJ.js → chunk-HU5W6TCS.js} +114 -128
  46. package/dist/bundle/{chunk-2DK5BBFF.js → chunk-JD63PEI3.js} +3 -8
  47. package/dist/bundle/{chunk-R6IA5UQB.js → chunk-ODJNJCPV.js} +8 -2
  48. package/dist/bundle/{chunk-XEOZTA3H.js → chunk-W6YFWJDR.js} +2 -5
  49. package/dist/bundle/{chunk-434YFJAE.js → chunk-WSGD5Q6L.js} +3 -9
  50. package/dist/bundle/chunk-YQDNTG4D.js +922 -0
  51. package/dist/bundle/config-JGJXLNXC.js +29 -0
  52. package/dist/bundle/{folders-ROKVKSCT.js → folders-B2GKJOC2.js} +2 -7
  53. package/dist/bundle/{main-GCK3VYAA.js → main-7DP3EEM2.js} +19 -41
  54. package/dist/bundle/{output-file-RYIOIXMD.js → output-file-PKA7MJEP.js} +3 -11
  55. package/dist/bundle/{program-OYLVYA4Z.js → program-DM4ILZWZ.js} +642 -801
  56. package/dist/bundle/run-log-ML7ZCWXD.js +54 -0
  57. package/dist/bundle/store-connection-MMHILGCB.js +21 -0
  58. package/dist/bundle/streaming-PRGWGNHY.js +12 -0
  59. package/dist/bundle/tokens-UWS4VT4B.js +18 -0
  60. package/dist/bundle/zm.js +4 -161
  61. package/dist/bundle/{zoom-app-4F4YY4OI.js → zoom-app-DID42LPS.js} +5 -13
  62. package/dist/chat-file.d.ts +1 -1
  63. package/dist/chat-file.d.ts.map +1 -1
  64. package/dist/commands.js +1 -1
  65. package/dist/commands.js.map +1 -1
  66. package/dist/config-issues.d.ts +1 -1
  67. package/dist/config-issues.d.ts.map +1 -1
  68. package/dist/config-issues.js +1 -1
  69. package/dist/config-issues.js.map +1 -1
  70. package/dist/config.d.ts +1 -2
  71. package/dist/config.d.ts.map +1 -1
  72. package/dist/config.js +1 -2
  73. package/dist/config.js.map +1 -1
  74. package/dist/contacts-commands.d.ts +1 -1
  75. package/dist/contacts-commands.d.ts.map +1 -1
  76. package/dist/contacts-commands.js +1 -1
  77. package/dist/contacts-commands.js.map +1 -1
  78. package/dist/contract-overrides.js +1 -1
  79. package/dist/contract-overrides.js.map +1 -1
  80. package/dist/errors.d.ts +1 -1
  81. package/dist/errors.d.ts.map +1 -1
  82. package/dist/execution.d.ts +1 -1
  83. package/dist/execution.d.ts.map +1 -1
  84. package/dist/execution.js +1 -1
  85. package/dist/execution.js.map +1 -1
  86. package/dist/files.d.ts +2 -2
  87. package/dist/files.d.ts.map +1 -1
  88. package/dist/files.js +1 -1
  89. package/dist/files.js.map +1 -1
  90. package/dist/first-screen.js +1 -1
  91. package/dist/first-screen.js.map +1 -1
  92. package/dist/identity.d.ts +1 -1
  93. package/dist/identity.d.ts.map +1 -1
  94. package/dist/identity.js +6 -0
  95. package/dist/identity.js.map +1 -1
  96. package/dist/ingestion-search-commands.d.ts +1 -1
  97. package/dist/ingestion-search-commands.d.ts.map +1 -1
  98. package/dist/ingestion-search-commands.js +1 -1
  99. package/dist/ingestion-search-commands.js.map +1 -1
  100. package/dist/local-transcription-commands.d.ts +1 -1
  101. package/dist/local-transcription-commands.d.ts.map +1 -1
  102. package/dist/local-transcription-commands.js +1 -2
  103. package/dist/local-transcription-commands.js.map +1 -1
  104. package/dist/local-transcription.d.ts +1 -2
  105. package/dist/local-transcription.d.ts.map +1 -1
  106. package/dist/local-transcription.js +3 -3
  107. package/dist/local-transcription.js.map +1 -1
  108. package/dist/meeting-commands.d.ts +1 -1
  109. package/dist/meeting-commands.d.ts.map +1 -1
  110. package/dist/meeting-commands.js +1 -2
  111. package/dist/meeting-commands.js.map +1 -1
  112. package/dist/meeting-communications-binding.d.ts +1 -2
  113. package/dist/meeting-communications-binding.d.ts.map +1 -1
  114. package/dist/meeting-communications-binding.js.map +1 -1
  115. package/dist/meeting-context-commands.d.ts +1 -1
  116. package/dist/meeting-context-commands.d.ts.map +1 -1
  117. package/dist/meeting-context-commands.js +1 -1
  118. package/dist/meeting-context-commands.js.map +1 -1
  119. package/dist/meeting-context.d.ts +2 -4
  120. package/dist/meeting-context.d.ts.map +1 -1
  121. package/dist/meeting-context.js +1 -1
  122. package/dist/meeting-context.js.map +1 -1
  123. package/dist/meeting-integration-commands.d.ts +1 -1
  124. package/dist/meeting-integration-commands.d.ts.map +1 -1
  125. package/dist/meeting-integration-commands.js +1 -2
  126. package/dist/meeting-integration-commands.js.map +1 -1
  127. package/dist/meeting-integration.d.ts +1 -1
  128. package/dist/meeting-integration.d.ts.map +1 -1
  129. package/dist/meeting-integration.js +1 -1
  130. package/dist/meeting-integration.js.map +1 -1
  131. package/dist/meeting-inventory.d.ts +1 -1
  132. package/dist/meeting-inventory.d.ts.map +1 -1
  133. package/dist/meeting-inventory.js +1 -1
  134. package/dist/meeting-inventory.js.map +1 -1
  135. package/dist/meeting-preparation.d.ts +1 -2
  136. package/dist/meeting-preparation.d.ts.map +1 -1
  137. package/dist/meeting-preparation.js +1 -1
  138. package/dist/meeting-preparation.js.map +1 -1
  139. package/dist/meeting-project-candidates.d.ts +1 -1
  140. package/dist/meeting-project-candidates.d.ts.map +1 -1
  141. package/dist/meeting-project-evidence-commands.d.ts +1 -1
  142. package/dist/meeting-project-evidence-commands.d.ts.map +1 -1
  143. package/dist/meeting-project-evidence-commands.js +1 -2
  144. package/dist/meeting-project-evidence-commands.js.map +1 -1
  145. package/dist/meeting-read-command-bindings.js +1 -1
  146. package/dist/meeting-read-command-bindings.js.map +1 -1
  147. package/dist/meeting-review-commands.d.ts +1 -3
  148. package/dist/meeting-review-commands.d.ts.map +1 -1
  149. package/dist/meeting-review-commands.js +1 -2
  150. package/dist/meeting-review-commands.js.map +1 -1
  151. package/dist/meeting-search-commands.d.ts +2 -3
  152. package/dist/meeting-search-commands.d.ts.map +1 -1
  153. package/dist/meeting-search-commands.js +2 -4
  154. package/dist/meeting-search-commands.js.map +1 -1
  155. package/dist/meeting-searches-commands.d.ts +1 -2
  156. package/dist/meeting-searches-commands.d.ts.map +1 -1
  157. package/dist/meeting-searches-commands.js +1 -2
  158. package/dist/meeting-searches-commands.js.map +1 -1
  159. package/dist/meeting-selection-options.d.ts +1 -1
  160. package/dist/meeting-selection-options.d.ts.map +1 -1
  161. package/dist/meeting-selection-options.js +1 -2
  162. package/dist/meeting-selection-options.js.map +1 -1
  163. package/dist/meeting-semantic-commands.d.ts +1 -2
  164. package/dist/meeting-semantic-commands.d.ts.map +1 -1
  165. package/dist/meeting-semantic-commands.js +1 -1
  166. package/dist/meeting-semantic-commands.js.map +1 -1
  167. package/dist/meeting-semantic.d.ts +2 -2
  168. package/dist/meeting-semantic.d.ts.map +1 -1
  169. package/dist/meeting-semantic.js +1 -1
  170. package/dist/meeting-semantic.js.map +1 -1
  171. package/dist/meeting-source.d.ts +1 -1
  172. package/dist/meeting-source.d.ts.map +1 -1
  173. package/dist/meeting-stats-commands.d.ts +1 -3
  174. package/dist/meeting-stats-commands.d.ts.map +1 -1
  175. package/dist/meeting-stats-commands.js +1 -2
  176. package/dist/meeting-stats-commands.js.map +1 -1
  177. package/dist/models-commands.d.ts +1 -1
  178. package/dist/models-commands.d.ts.map +1 -1
  179. package/dist/models-commands.js +1 -1
  180. package/dist/models-commands.js.map +1 -1
  181. package/dist/occurrence-schedule.d.ts +1 -1
  182. package/dist/occurrence-schedule.d.ts.map +1 -1
  183. package/dist/permissions.d.ts +1 -1
  184. package/dist/permissions.d.ts.map +1 -1
  185. package/dist/permissions.js +1 -2
  186. package/dist/permissions.js.map +1 -1
  187. package/dist/profile.js +1 -1
  188. package/dist/profile.js.map +1 -1
  189. package/dist/program-bindings.js +1 -1
  190. package/dist/program-bindings.js.map +1 -1
  191. package/dist/program.d.ts +1 -2
  192. package/dist/program.d.ts.map +1 -1
  193. package/dist/program.js +1 -1
  194. package/dist/program.js.map +1 -1
  195. package/dist/progress-commands.d.ts +1 -1
  196. package/dist/progress-commands.d.ts.map +1 -1
  197. package/dist/progress-commands.js +1 -2
  198. package/dist/progress-commands.js.map +1 -1
  199. package/dist/read-only.js +1 -1
  200. package/dist/read-only.js.map +1 -1
  201. package/dist/recording-archive.d.ts.map +1 -1
  202. package/dist/recording-archive.js +1 -2
  203. package/dist/recording-archive.js.map +1 -1
  204. package/dist/recording-manifest.js +1 -1
  205. package/dist/recording-manifest.js.map +1 -1
  206. package/dist/recording-partial-store.d.ts +2 -3
  207. package/dist/recording-partial-store.d.ts.map +1 -1
  208. package/dist/recording-partial-store.js +1 -1
  209. package/dist/recording-partial-store.js.map +1 -1
  210. package/dist/recording-promotion-store.d.ts +1 -2
  211. package/dist/recording-promotion-store.d.ts.map +1 -1
  212. package/dist/recording-promotion-store.js +1 -2
  213. package/dist/recording-promotion-store.js.map +1 -1
  214. package/dist/recording-schedule-commands.d.ts +1 -1
  215. package/dist/recording-schedule-commands.d.ts.map +1 -1
  216. package/dist/recording-schedule-commands.js +1 -1
  217. package/dist/recording-schedule-commands.js.map +1 -1
  218. package/dist/recording-schedule-store.js +1 -1
  219. package/dist/recording-schedule-store.js.map +1 -1
  220. package/dist/recording-schedule-systemd.js +1 -1
  221. package/dist/recording-schedule-systemd.js.map +1 -1
  222. package/dist/recording-schedule.d.ts +1 -1
  223. package/dist/recording-schedule.d.ts.map +1 -1
  224. package/dist/recording-schedule.js +1 -1
  225. package/dist/recording-schedule.js.map +1 -1
  226. package/dist/recording-sync-store.d.ts +1 -1
  227. package/dist/recording-sync-store.d.ts.map +1 -1
  228. package/dist/recording-sync-store.js +1 -2
  229. package/dist/recording-sync-store.js.map +1 -1
  230. package/dist/recording-sync.d.ts +1 -1
  231. package/dist/recording-sync.d.ts.map +1 -1
  232. package/dist/recording-sync.js +1 -1
  233. package/dist/recording-sync.js.map +1 -1
  234. package/dist/recording-writer-lease.d.ts +1 -1
  235. package/dist/recording-writer-lease.d.ts.map +1 -1
  236. package/dist/recording-writer-lease.js +1 -1
  237. package/dist/recording-writer-lease.js.map +1 -1
  238. package/dist/recordings.d.ts +1 -1
  239. package/dist/recordings.d.ts.map +1 -1
  240. package/dist/recordings.js.map +1 -1
  241. package/dist/remote-meetings.d.ts +19 -19
  242. package/dist/remote-meetings.d.ts.map +1 -1
  243. package/dist/remote-meetings.js +1 -1
  244. package/dist/remote-meetings.js.map +1 -1
  245. package/dist/request-events.d.ts +1 -1
  246. package/dist/request-events.d.ts.map +1 -1
  247. package/dist/request-events.js +1 -1
  248. package/dist/request-events.js.map +1 -1
  249. package/dist/run-log.d.ts +1 -1
  250. package/dist/run-log.d.ts.map +1 -1
  251. package/dist/run-log.js +1 -1
  252. package/dist/run-log.js.map +1 -1
  253. package/dist/run.d.ts +1 -1
  254. package/dist/run.d.ts.map +1 -1
  255. package/dist/run.js +1 -2
  256. package/dist/run.js.map +1 -1
  257. package/dist/series-inventory.d.ts +2 -2
  258. package/dist/series-inventory.js +1 -1
  259. package/dist/series-inventory.js.map +1 -1
  260. package/dist/setup-commands.d.ts +1 -1
  261. package/dist/setup-commands.d.ts.map +1 -1
  262. package/dist/setup-commands.js +1 -1
  263. package/dist/setup-commands.js.map +1 -1
  264. package/dist/store-commands.d.ts +1 -1
  265. package/dist/store-commands.d.ts.map +1 -1
  266. package/dist/store-commands.js +1 -2
  267. package/dist/store-commands.js.map +1 -1
  268. package/dist/store-connection.d.ts +1 -3
  269. package/dist/store-connection.d.ts.map +1 -1
  270. package/dist/store-connection.js +14 -14
  271. package/dist/store-connection.js.map +1 -1
  272. package/dist/sync-progress.d.ts +4 -4
  273. package/dist/sync-progress.d.ts.map +1 -1
  274. package/dist/sync-progress.js +1 -1
  275. package/dist/sync-progress.js.map +1 -1
  276. package/dist/tokens.d.ts +1 -1
  277. package/dist/tokens.d.ts.map +1 -1
  278. package/dist/tokens.js +1 -1
  279. package/dist/tokens.js.map +1 -1
  280. package/dist/unified-search.d.ts +1 -1
  281. package/dist/unified-search.d.ts.map +1 -1
  282. package/dist/upcoming-meetings.d.ts +2 -2
  283. package/dist/upcoming-meetings.js +1 -1
  284. package/dist/upcoming-meetings.js.map +1 -1
  285. package/dist/upgrade.d.ts.map +1 -1
  286. package/dist/upgrade.js +1 -2
  287. package/dist/upgrade.js.map +1 -1
  288. package/dist/version.d.ts +1 -1
  289. package/dist/version.js +1 -1
  290. package/dist/watch-commands.d.ts +1 -2
  291. package/dist/watch-commands.d.ts.map +1 -1
  292. package/dist/watch-commands.js +1 -2
  293. package/dist/watch-commands.js.map +1 -1
  294. package/dist/watch-service.d.ts +1 -1
  295. package/dist/watch-service.d.ts.map +1 -1
  296. package/dist/watch-service.js +1 -1
  297. package/dist/watch-service.js.map +1 -1
  298. package/dist/zoom-app.d.ts +2 -2
  299. package/dist/zoom-app.d.ts.map +1 -1
  300. package/dist/zoom-app.js +1 -1
  301. package/dist/zoom-app.js.map +1 -1
  302. package/dist/zoom-search-commands.d.ts +1 -1
  303. package/dist/zoom-search-commands.d.ts.map +1 -1
  304. package/dist/zoom-search-commands.js +1 -1
  305. package/dist/zoom-search-commands.js.map +1 -1
  306. package/dist/zoom-session.d.ts +1 -1
  307. package/dist/zoom-session.d.ts.map +1 -1
  308. package/dist/zoom-session.js +1 -1
  309. package/dist/zoom-session.js.map +1 -1
  310. package/package.json +3 -3
  311. package/scenarios/person-in-meetings.md +1 -1
  312. package/skills/zoom-cli/SKILL.md +1 -1
  313. package/skills/zoom-cli/references/people-and-projects.md +5 -5
  314. package/skills/zoom-cli/references/prepare.md +2 -2
  315. package/dist/bundle/agent-3HDWEZ5M.js +0 -47
  316. package/dist/bundle/all-profiles-RY2OMSDL.js +0 -321
  317. package/dist/bundle/answer-policy-IFVXPPGW.js +0 -131
  318. package/dist/bundle/anthropic-36VPSF7B.js +0 -91
  319. package/dist/bundle/app-server-ZVJVUGB7.js +0 -267
  320. package/dist/bundle/bun-F4M4KCNA.js +0 -169
  321. package/dist/bundle/bun-sqlite-IOPYIUA7.js +0 -76
  322. package/dist/bundle/chunk-2IBKKVVZ.js +0 -335
  323. package/dist/bundle/chunk-2S54TM4N.js +0 -230
  324. package/dist/bundle/chunk-3AQHKXVR.js +0 -161
  325. package/dist/bundle/chunk-3CW2C7ZA.js +0 -217
  326. package/dist/bundle/chunk-3KUEZK5Z.js +0 -73
  327. package/dist/bundle/chunk-3PXUQFHX.js +0 -2333
  328. package/dist/bundle/chunk-3QN5KDFZ.js +0 -3012
  329. package/dist/bundle/chunk-575JMTDR.js +0 -562
  330. package/dist/bundle/chunk-5B2LV4MS.js +0 -26
  331. package/dist/bundle/chunk-5WL5RHOO.js +0 -167
  332. package/dist/bundle/chunk-6C7ESL5N.js +0 -295
  333. package/dist/bundle/chunk-6E4KLYNP.js +0 -229
  334. package/dist/bundle/chunk-7JDXR75Q.js +0 -465
  335. package/dist/bundle/chunk-AK3H2C65.js +0 -1349
  336. package/dist/bundle/chunk-AQ5RIOUE.js +0 -633
  337. package/dist/bundle/chunk-AQLUAQXJ.js +0 -1259
  338. package/dist/bundle/chunk-ASTLGFTR.js +0 -12270
  339. package/dist/bundle/chunk-ATHBB7OU.js +0 -106
  340. package/dist/bundle/chunk-B2NM65RD.js +0 -80
  341. package/dist/bundle/chunk-B4KHDXJE.js +0 -64
  342. package/dist/bundle/chunk-BAFC7WNI.js +0 -276
  343. package/dist/bundle/chunk-BBGJQMRI.js +0 -34
  344. package/dist/bundle/chunk-BTLZYRIW.js +0 -1007
  345. package/dist/bundle/chunk-BZDS2X6Y.js +0 -5150
  346. package/dist/bundle/chunk-C7JPYWYQ.js +0 -77
  347. package/dist/bundle/chunk-CDQUW25G.js +0 -3752
  348. package/dist/bundle/chunk-CJWGJBHW.js +0 -1044
  349. package/dist/bundle/chunk-D72URWJE.js +0 -532
  350. package/dist/bundle/chunk-D7RCUODT.js +0 -185
  351. package/dist/bundle/chunk-DFDN6AUB.js +0 -21
  352. package/dist/bundle/chunk-DNCLQPOM.js +0 -7
  353. package/dist/bundle/chunk-DQJECJUE.js +0 -2257
  354. package/dist/bundle/chunk-E4JQ3MCW.js +0 -2338
  355. package/dist/bundle/chunk-E4ODYLEK.js +0 -209
  356. package/dist/bundle/chunk-EE45N67Q.js +0 -86
  357. package/dist/bundle/chunk-EEEU4MKK.js +0 -210
  358. package/dist/bundle/chunk-ESN3W2MZ.js +0 -2624
  359. package/dist/bundle/chunk-ETIZGA4P.js +0 -340
  360. package/dist/bundle/chunk-F44QK6CK.js +0 -52
  361. package/dist/bundle/chunk-FH2UFNH6.js +0 -54
  362. package/dist/bundle/chunk-FTH6WGYO.js +0 -24
  363. package/dist/bundle/chunk-FWACRG4X.js +0 -160
  364. package/dist/bundle/chunk-FXBHOCJK.js +0 -24600
  365. package/dist/bundle/chunk-G5SZL7G2.js +0 -150
  366. package/dist/bundle/chunk-G6CHEFAG.js +0 -108
  367. package/dist/bundle/chunk-GHJD7PE6.js +0 -1068
  368. package/dist/bundle/chunk-GZ7WBU5Y.js +0 -18
  369. package/dist/bundle/chunk-HKLRI2LB.js +0 -555
  370. package/dist/bundle/chunk-HMD4FZYY.js +0 -133
  371. package/dist/bundle/chunk-HO4JGD4Q.js +0 -16
  372. package/dist/bundle/chunk-HTQTIKWP.js +0 -928
  373. package/dist/bundle/chunk-HUAHLO6N.js +0 -29
  374. package/dist/bundle/chunk-IANKXHSE.js +0 -46
  375. package/dist/bundle/chunk-IQZXFWFI.js +0 -170
  376. package/dist/bundle/chunk-ISQ23VKV.js +0 -123
  377. package/dist/bundle/chunk-JEH33ZCD.js +0 -58
  378. package/dist/bundle/chunk-JUNQYWQ2.js +0 -228
  379. package/dist/bundle/chunk-JUXMVQWJ.js +0 -799
  380. package/dist/bundle/chunk-KHQDWYCG.js +0 -82
  381. package/dist/bundle/chunk-KYRYD4CR.js +0 -38
  382. package/dist/bundle/chunk-LBGT6W4R.js +0 -377
  383. package/dist/bundle/chunk-LN7HRYTH.js +0 -80
  384. package/dist/bundle/chunk-MEB7HBTM.js +0 -95
  385. package/dist/bundle/chunk-MEEFWYX3.js +0 -388
  386. package/dist/bundle/chunk-MNOAMJ6H.js +0 -94
  387. package/dist/bundle/chunk-MYHPXJDG.js +0 -142
  388. package/dist/bundle/chunk-NGI37RFW.js +0 -692
  389. package/dist/bundle/chunk-NZMWD7Y3.js +0 -68149
  390. package/dist/bundle/chunk-O6IECJRM.js +0 -54
  391. package/dist/bundle/chunk-OBWL3BUV.js +0 -800
  392. package/dist/bundle/chunk-OEEWVKJX.js +0 -53
  393. package/dist/bundle/chunk-OQYZ3W4K.js +0 -374
  394. package/dist/bundle/chunk-P3ZCTYGW.js +0 -101
  395. package/dist/bundle/chunk-PL5P7UKW.js +0 -25216
  396. package/dist/bundle/chunk-PVEBAHFU.js +0 -100
  397. package/dist/bundle/chunk-R2B6PUVI.js +0 -206
  398. package/dist/bundle/chunk-RLOH7RDN.js +0 -362
  399. package/dist/bundle/chunk-RQ4AXSCJ.js +0 -616
  400. package/dist/bundle/chunk-RYGTCRFZ.js +0 -140
  401. package/dist/bundle/chunk-S4PXWIE4.js +0 -408
  402. package/dist/bundle/chunk-SDZZYZLL.js +0 -58
  403. package/dist/bundle/chunk-SHQAYUK6.js +0 -1199
  404. package/dist/bundle/chunk-T3W4V4A6.js +0 -63
  405. package/dist/bundle/chunk-TCT5D2X2.js +0 -6848
  406. package/dist/bundle/chunk-TDWPOSPR.js +0 -198
  407. package/dist/bundle/chunk-TER3N27H.js +0 -353
  408. package/dist/bundle/chunk-TMTNP7QN.js +0 -214
  409. package/dist/bundle/chunk-TO5UEWXR.js +0 -288
  410. package/dist/bundle/chunk-TXDR6YSF.js +0 -23
  411. package/dist/bundle/chunk-TY7NDMFY.js +0 -46
  412. package/dist/bundle/chunk-UAWSINMC.js +0 -875
  413. package/dist/bundle/chunk-UBH7YF3C.js +0 -9354
  414. package/dist/bundle/chunk-UEAE3JUU.js +0 -46576
  415. package/dist/bundle/chunk-UHR363OD.js +0 -357
  416. package/dist/bundle/chunk-UM52A76S.js +0 -259
  417. package/dist/bundle/chunk-URP6BTHN.js +0 -624
  418. package/dist/bundle/chunk-UWQEAA6S.js +0 -13
  419. package/dist/bundle/chunk-VR7QZGRU.js +0 -185
  420. package/dist/bundle/chunk-VRH5PBSL.js +0 -755
  421. package/dist/bundle/chunk-VTLQTQKY.js +0 -1756
  422. package/dist/bundle/chunk-VTYNLTDW.js +0 -331
  423. package/dist/bundle/chunk-WY7XG6TE.js +0 -76
  424. package/dist/bundle/chunk-XH23ML2V.js +0 -195
  425. package/dist/bundle/chunk-XYF76A26.js +0 -27556
  426. package/dist/bundle/chunk-Y5E2WNWB.js +0 -35
  427. package/dist/bundle/chunk-ZDYJAEVB.js +0 -84
  428. package/dist/bundle/chunk-ZJ63HDBT.js +0 -71
  429. package/dist/bundle/chunk-ZT4ZPUIO.js +0 -218
  430. package/dist/bundle/chunk-ZVVMGPBJ.js +0 -50
  431. package/dist/bundle/cli-JK6PQSSN.js +0 -1270
  432. package/dist/bundle/command-contract-F3QNBKPX.js +0 -46
  433. package/dist/bundle/command-server-entry-DJLGN62J.js +0 -176
  434. package/dist/bundle/config-TYYMV3HV.js +0 -118
  435. package/dist/bundle/decode-ZZICNNFF.js +0 -31
  436. package/dist/bundle/dispatch-FKMIPCPQ.js +0 -412
  437. package/dist/bundle/dist-NQPF25XI.js +0 -322
  438. package/dist/bundle/dist-PAKDDIBT.js +0 -191
  439. package/dist/bundle/dist-XUFQCJXW.js +0 -7577
  440. package/dist/bundle/echarts-QMAA7HH5.js +0 -42501
  441. package/dist/bundle/embed-T64EUKUI.js +0 -38
  442. package/dist/bundle/embedder-ZEKISZXI.js +0 -111
  443. package/dist/bundle/failure-XTWBYI2A.js +0 -25
  444. package/dist/bundle/first-run-ZFNY4RRH.js +0 -29
  445. package/dist/bundle/first-screen-LPGCHRHZ.js +0 -47
  446. package/dist/bundle/instructions-4H7UREH2.js +0 -11
  447. package/dist/bundle/mcp-5HFPWC3W.js +0 -167
  448. package/dist/bundle/meeting-combined-7HDPOUPB.js +0 -28
  449. package/dist/bundle/meeting-model-MVUW7UPQ.js +0 -26
  450. package/dist/bundle/meeting-semantic-IF633WGX.js +0 -23
  451. package/dist/bundle/meetings-RY2AAPHV.js +0 -332
  452. package/dist/bundle/node-KM3CUABH.js +0 -2340
  453. package/dist/bundle/node-P3PUHKYH.js +0 -176
  454. package/dist/bundle/node-TLZSIHIJ.js +0 -21
  455. package/dist/bundle/node-sqlite-ASAZJNHE.js +0 -74
  456. package/dist/bundle/oauth-4U3OCK3W.js +0 -20
  457. package/dist/bundle/oauth-AJARLPSY.js +0 -46
  458. package/dist/bundle/open-SEJRY2ZI.js +0 -23
  459. package/dist/bundle/openai-FZDSC2AA.js +0 -28
  460. package/dist/bundle/process-AFIXYXWL.js +0 -91
  461. package/dist/bundle/prompt-BCRD64F4.js +0 -17
  462. package/dist/bundle/public-SVJILCNI.js +0 -206
  463. package/dist/bundle/recognize-25ITJWGX.js +0 -26
  464. package/dist/bundle/remote-5FBAJX7O.js +0 -32
  465. package/dist/bundle/rerank-2HGWWORY.js +0 -52
  466. package/dist/bundle/run-log-7HRF4Y47.js +0 -145
  467. package/dist/bundle/serve-RL35MSJD.js +0 -199
  468. package/dist/bundle/server-QUSBWACP.js +0 -229
  469. package/dist/bundle/server-SCK2SRDK.js +0 -96
  470. package/dist/bundle/services-BGRIQNDC.js +0 -609
  471. package/dist/bundle/speech-4W3ZMTFK.js +0 -89
  472. package/dist/bundle/sqlite-runtime-K3KLRZCV.js +0 -20
  473. package/dist/bundle/state-GYL4C74G.js +0 -36
  474. package/dist/bundle/store-27UQMNEO.js +0 -189
  475. package/dist/bundle/store-NLYH5SQX.js +0 -316
  476. package/dist/bundle/store-connection-CZILWRSR.js +0 -112
  477. package/dist/bundle/store-maintenance-command-Z3QLNSXJ.js +0 -84
  478. package/dist/bundle/streaming-73EKEGPF.js +0 -18
  479. package/dist/bundle/surface-CV3C4RV2.js +0 -82
  480. package/dist/bundle/tokens-PY3S22LY.js +0 -27
  481. /package/dist/bundle/{chunk-7ECP5ZQR.js → chunk-7O7XM37N.js} +0 -0
@@ -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-RQ4AXSCJ.js";
6
- import {
7
- WORD_BODY,
8
- e164Of
9
- } from "./chunk-DQJECJUE.js";
10
- import {
11
- resolvePaths,
12
- writeSecurely
13
- } from "./chunk-3QN5KDFZ.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@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/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@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/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@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/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@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/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
- };