@wirecat/zoom-cli 0.83.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 (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-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-OGTN2KVG.js → chunk-AF2Z6VOG.js} +4 -14
  45. package/dist/bundle/{chunk-26TW5RZ6.js → chunk-DAYBU7WR.js} +61 -94
  46. package/dist/bundle/{chunk-2DK5BBFF.js → chunk-JD63PEI3.js} +3 -8
  47. package/dist/bundle/{chunk-H6A4NWYJ.js → chunk-L5ZYKXAY.js} +114 -128
  48. package/dist/bundle/{chunk-R6IA5UQB.js → chunk-W4TDCCT3.js} +8 -2
  49. package/dist/bundle/{chunk-XEOZTA3H.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-ROKVKSCT.js → folders-B2GKJOC2.js} +2 -7
  53. package/dist/bundle/{main-GCK3VYAA.js → main-YZPLPXB7.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-7JY6XJ6K.js} +642 -801
  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-4F4YY4OI.js → zoom-app-EYJST6GF.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,799 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import {
4
- withTimeLimit
5
- } from "./chunk-5B2LV4MS.js";
6
- import {
7
- acquireLock
8
- } from "./chunk-S4PXWIE4.js";
9
- import {
10
- Credentials,
11
- isMovedRun,
12
- keyringService,
13
- realSleep,
14
- systemKeyring
15
- } from "./chunk-3QN5KDFZ.js";
16
- import {
17
- CliError,
18
- isCliError
19
- } from "./chunk-IANKXHSE.js";
20
- import {
21
- __name
22
- } from "./chunk-ZVVMGPBJ.js";
23
-
24
- // 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/cli/messenger/private-files.js
25
- import { existsSync, statSync } from "node:fs";
26
- var shellQuoted = /* @__PURE__ */ __name((path) => `'${path.replaceAll("'", `'\\''`)}'`, "shellQuoted");
27
- var privateFiles = /* @__PURE__ */ __name(({ files, dirs }, platform = process.platform) => {
28
- if (platform === "win32")
29
- return { checked: false, reason: "Windows has no Unix file modes" };
30
- const problems = [];
31
- const check = /* @__PURE__ */ __name((path, want, folder) => {
32
- if (!existsSync(path))
33
- return;
34
- const stat = statSync(path);
35
- if (stat.isDirectory() !== folder)
36
- return;
37
- const mode = stat.mode & 511;
38
- if ((mode & 63) === 0)
39
- return;
40
- const octal = /* @__PURE__ */ __name((value) => `0${value.toString(8)}`, "octal");
41
- problems.push({ path, mode: octal(mode), want: octal(want), fix: `chmod ${want.toString(8)} ${shellQuoted(path)}` });
42
- }, "check");
43
- for (const file of files)
44
- check(file, 384, false);
45
- for (const dir of dirs)
46
- check(dir, 448, true);
47
- return { checked: true, ok: problems.length === 0, problems };
48
- }, "privateFiles");
49
- var withSqliteSidecars = /* @__PURE__ */ __name((path) => [path, `${path}-wal`, `${path}-shm`], "withSqliteSidecars");
50
-
51
- // 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/oauth/authorize.js
52
- import { createHash, randomBytes } from "node:crypto";
53
- import { createServer } from "node:http";
54
- var DEFAULT_TIMEOUT_MS = 3e5;
55
- var pkce = /* @__PURE__ */ __name(() => {
56
- const codeVerifier = randomBytes(48).toString("base64url");
57
- return { codeVerifier, codeChallenge: createHash("sha256").update(codeVerifier).digest("base64url") };
58
- }, "pkce");
59
- var queryOf = /* @__PURE__ */ __name((text2) => {
60
- const trimmed = text2.trim();
61
- const start = trimmed.indexOf("?");
62
- return new URLSearchParams(start >= 0 ? trimmed.slice(start + 1).split("#")[0] : trimmed);
63
- }, "queryOf");
64
- var authorize = /* @__PURE__ */ __name(async (options) => {
65
- const { provider } = options;
66
- const cancelled = /* @__PURE__ */ __name(() => isCliError(options.signal?.reason) ? options.signal.reason : new CliError("cancelled", `${provider.name} sign-in was cancelled`), "cancelled");
67
- if (options.signal?.aborted)
68
- throw cancelled();
69
- const { codeVerifier, codeChallenge } = pkce();
70
- const paste = new AbortController();
71
- let state = "";
72
- let settled = false;
73
- let accept = /* @__PURE__ */ __name(() => {
74
- }, "accept");
75
- let fail = /* @__PURE__ */ __name(() => {
76
- }, "fail");
77
- const code = new Promise((resolve, reject) => {
78
- accept = /* @__PURE__ */ __name((value) => {
79
- settled = true;
80
- resolve(value);
81
- }, "accept");
82
- fail = /* @__PURE__ */ __name((error) => {
83
- settled = true;
84
- reject(error);
85
- }, "fail");
86
- });
87
- void code.catch(() => {
88
- });
89
- const settle = /* @__PURE__ */ __name((query) => {
90
- const value = query.get("code");
91
- if (value)
92
- accept(value);
93
- else
94
- fail(new CliError("authentication_error", `${provider.name} sign-in was declined`, { reason: "oauth.declined" }));
95
- }, "settle");
96
- const handler = /* @__PURE__ */ __name((request, response) => {
97
- let url;
98
- try {
99
- url = new URL(request.url ?? "/", "http://127.0.0.1");
100
- } catch {
101
- response.writeHead(400).end();
102
- return;
103
- }
104
- if (request.method !== "GET" || url.pathname !== "/callback") {
105
- response.writeHead(404).end();
106
- return;
107
- }
108
- if (settled || !state || url.searchParams.get("state") !== state) {
109
- response.writeHead(400).end("This sign-in link does not belong to the waiting sign-in");
110
- return;
111
- }
112
- if (!url.searchParams.get("code") && !url.searchParams.get("error")) {
113
- response.writeHead(400).end("Missing sign-in result");
114
- return;
115
- }
116
- response.end("Sign-in received; you can close this tab");
117
- settle(url.searchParams);
118
- }, "handler");
119
- const server = createServer(handler);
120
- const localhost = provider.redirect.kind === "loopback" && provider.redirect.host === "localhost";
121
- const server6 = localhost ? createServer(handler) : void 0;
122
- const onAbort = /* @__PURE__ */ __name(() => fail(cancelled()), "onAbort");
123
- options.signal?.addEventListener("abort", onAbort, { once: true });
124
- const timer = setTimeout(() => fail(new CliError("timeout", `${provider.name} sign-in timed out`, { reason: "oauth.timeout" })), options.timeoutMs ?? DEFAULT_TIMEOUT_MS);
125
- try {
126
- await new Promise((resolve, reject) => {
127
- server.once("error", reject);
128
- server.listen(0, "127.0.0.1", resolve);
129
- });
130
- const address = server.address();
131
- if (!address || typeof address === "string")
132
- throw new CliError("configuration_error", "could not start the local sign-in listener");
133
- if (server6) {
134
- server6.on("error", () => {
135
- });
136
- await new Promise((resolve) => {
137
- server6.once("error", () => resolve());
138
- server6.listen(address.port, "::1", () => resolve());
139
- });
140
- }
141
- const random = randomBytes(32).toString("base64url");
142
- const relay = provider.redirect.kind === "relay";
143
- state = relay ? `${address.port}.${random}` : random;
144
- const redirectUri = provider.redirect.kind === "relay" ? provider.redirect.url : `http://${localhost ? "localhost" : "127.0.0.1"}:${address.port}/callback`;
145
- const url = new URL(provider.authorizeUrl);
146
- for (const [key, value] of Object.entries({
147
- ...provider.authorizeParams,
148
- response_type: "code",
149
- client_id: provider.client.clientId,
150
- redirect_uri: redirectUri,
151
- ...options.scopes.length ? { scope: options.scopes.join(" ") } : {},
152
- state,
153
- code_challenge: codeChallenge,
154
- code_challenge_method: "S256"
155
- }))
156
- url.searchParams.set(key, value);
157
- options.showUrl?.(url.toString());
158
- options.readPaste?.(paste.signal).then((text2) => {
159
- if (settled)
160
- return;
161
- const query = queryOf(text2);
162
- if (query.get("state") !== state || !query.get("code") && !query.get("error"))
163
- fail(new CliError("authentication_error", "the pasted sign-in result does not match this sign-in", {
164
- reason: "oauth.mismatch"
165
- }));
166
- else
167
- settle(query);
168
- }).catch(() => {
169
- });
170
- void Promise.resolve().then(() => options.openBrowser(url.toString())).catch(() => {
171
- if (!options.readPaste && !options.showUrl)
172
- fail(new CliError("configuration_error", "could not open the browser, and no sign-in link can be shown"));
173
- });
174
- return { code: await code, redirectUri, codeVerifier };
175
- } finally {
176
- clearTimeout(timer);
177
- options.signal?.removeEventListener("abort", onAbort);
178
- paste.abort();
179
- for (const each of server6 ? [server, server6] : [server]) {
180
- each.closeAllConnections();
181
- if (each.listening)
182
- await new Promise((resolve) => each.close(() => resolve()));
183
- }
184
- }
185
- }, "authorize");
186
-
187
- // 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/oauth/requests.js
188
- var REQUEST_LIMIT_MS = 3e4;
189
- var TOKEN_LOG_EVENT = "oauth.token";
190
- var TOKEN_LOG_ALLOW = ["provider", "operation", "outcome", "status", "rotated", "pid"];
191
- var object = /* @__PURE__ */ __name((value) => {
192
- if (typeof value !== "object" || value === null || Array.isArray(value))
193
- throw new Error("not an object");
194
- return value;
195
- }, "object");
196
- var requestSignal = /* @__PURE__ */ __name((deadline, signal) => signal ? AbortSignal.any([signal, deadline]) : deadline, "requestSignal");
197
- var cancelledBy = /* @__PURE__ */ __name((signal) => {
198
- if (!signal?.aborted)
199
- return;
200
- throw isCliError(signal.reason) ? signal.reason : new CliError("cancelled", "sign-in was cancelled");
201
- }, "cancelledBy");
202
- var TRANSIENT = /* @__PURE__ */ new Set([
203
- "EAI_AGAIN",
204
- "ENOTFOUND",
205
- "ECONNRESET",
206
- "ECONNREFUSED",
207
- "ETIMEDOUT",
208
- "EPIPE",
209
- "UND_ERR_SOCKET"
210
- ]);
211
- var ATTEMPTS = 3;
212
- var transientNetworkError = /* @__PURE__ */ __name((error) => {
213
- if (isCliError(error))
214
- return error.code === "network_error";
215
- for (let at = error, depth = 0; at instanceof Error && depth < 4; at = at.cause, depth++) {
216
- const code = at.code;
217
- if (typeof code === "string" && TRANSIENT.has(code))
218
- return true;
219
- }
220
- return false;
221
- }, "transientNetworkError");
222
- var post = /* @__PURE__ */ __name(async (url, body, context, deadline) => {
223
- const signal = requestSignal(deadline, context.signal);
224
- for (let attempt = 1; ; attempt++) {
225
- cancelledBy(context.signal);
226
- try {
227
- return await context.fetch(url, {
228
- method: "POST",
229
- headers: { "content-type": "application/x-www-form-urlencoded", accept: "application/json" },
230
- body,
231
- signal,
232
- redirect: "error"
233
- });
234
- } catch (error) {
235
- cancelledBy(context.signal);
236
- if (attempt >= ATTEMPTS || signal.aborted || !transientNetworkError(error))
237
- return void 0;
238
- const waited = await realSleep(500 * attempt, signal).then(() => true, () => false);
239
- cancelledBy(context.signal);
240
- if (!waited)
241
- return void 0;
242
- }
243
- }
244
- }, "post");
245
- var clientFields = /* @__PURE__ */ __name(({ client }) => ({
246
- client_id: client.clientId,
247
- ...client.clientSecret ? { client_secret: client.clientSecret } : {}
248
- }), "clientFields");
249
- var requestTokens = /* @__PURE__ */ __name((provider, params, context) => withTimeLimit(REQUEST_LIMIT_MS, (deadline) => exchangeTokens(provider, params, context, deadline)), "requestTokens");
250
- var exchangeTokens = /* @__PURE__ */ __name(async (provider, params, context, deadline) => {
251
- const operation = params.grant_type ?? "unknown";
252
- const record = /* @__PURE__ */ __name((level, fields) => context.log?.[level]({ event: TOKEN_LOG_EVENT, provider: provider.id, operation, pid: process.pid, ...fields }), "record");
253
- const again = `run ${context.signInCommand} again`;
254
- const response = await post(provider.tokenUrl, new URLSearchParams({ ...params, ...clientFields(context) }), context, deadline);
255
- if (!response) {
256
- record("warn", { outcome: "no_response" });
257
- throw new CliError("outcome_unknown", `${provider.name} token request did not finish; ${again} if it keeps failing`, {
258
- reason: "oauth.no-response"
259
- });
260
- }
261
- if (!response.ok) {
262
- record("warn", { outcome: "rejected", status: response.status });
263
- if (response.status === 429 || response.status >= 500)
264
- throw new CliError("provider_unavailable", `${provider.name} token request failed (HTTP ${response.status})`, {
265
- status: response.status,
266
- retryable: true,
267
- reason: "oauth.unavailable"
268
- });
269
- throw new CliError("authentication_error", `${provider.name} sign-in was refused (HTTP ${response.status}); ${again}`, {
270
- status: response.status,
271
- reason: "oauth.expired"
272
- });
273
- }
274
- let body;
275
- try {
276
- body = object(await response.json());
277
- } catch {
278
- record("error", { outcome: "unreadable_response", status: response.status });
279
- throw new CliError("invalid_response", `${provider.name} returned an unreadable token response; ${again}`, {
280
- reason: "oauth.invalid-response"
281
- });
282
- }
283
- const previous = context.previous;
284
- const refreshToken = typeof body.refresh_token === "string" && body.refresh_token ? body.refresh_token : previous?.refreshToken;
285
- const expiresIn = body.expires_in;
286
- if (typeof body.access_token !== "string" || !body.access_token || expiresIn !== void 0 && (typeof expiresIn !== "number" || !Number.isFinite(expiresIn) || expiresIn <= 0) || body.scope !== void 0 && typeof body.scope !== "string" || body.token_type !== void 0 && typeof body.token_type !== "string") {
287
- record("error", { outcome: "invalid_response", status: response.status });
288
- throw new CliError("invalid_response", `${provider.name} returned an invalid token response; ${again}`, {
289
- reason: "oauth.invalid-response"
290
- });
291
- }
292
- if (!refreshToken) {
293
- record("error", { outcome: "no_refresh_token", status: response.status });
294
- throw new CliError("authentication_error", `${provider.name} returned no offline refresh token; ${again}`, {
295
- reason: "oauth.failed"
296
- });
297
- }
298
- const scopes = typeof body.scope === "string" ? body.scope.split(/\s+/).filter(Boolean) : previous?.scopes ?? [];
299
- const tokenType = typeof body.token_type === "string" ? body.token_type : previous?.tokenType;
300
- record("info", {
301
- outcome: "received",
302
- status: response.status,
303
- ...previous ? { rotated: refreshToken !== previous.refreshToken } : {}
304
- });
305
- return {
306
- accessToken: body.access_token,
307
- refreshToken,
308
- ...typeof expiresIn === "number" ? { expiresAt: context.now() + expiresIn * 1e3 } : {},
309
- scopes,
310
- ...tokenType ? { tokenType } : {}
311
- };
312
- }, "exchangeTokens");
313
- var alreadyRevoked = /* @__PURE__ */ __name(async (response) => {
314
- if (response.status !== 400)
315
- return false;
316
- try {
317
- return object(JSON.parse(await response.text())).error === "invalid_token";
318
- } catch {
319
- return false;
320
- }
321
- }, "alreadyRevoked");
322
- var revokeToken = /* @__PURE__ */ __name(async (provider, tokens, context) => {
323
- if (provider.revoke)
324
- return provider.revoke(tokens, context);
325
- if (!provider.revokeUrl)
326
- throw new CliError("validation_error", `${provider.name} declares no way to revoke a sign-in`);
327
- const { revokeUrl } = provider;
328
- const form = new URLSearchParams({ token: tokens.refreshToken, ...clientFields(context) });
329
- const { response, gone } = await withTimeLimit(REQUEST_LIMIT_MS, async (deadline) => {
330
- const response2 = await post(revokeUrl, form, context, deadline);
331
- return { response: response2, gone: response2 ? await alreadyRevoked(response2) : false };
332
- });
333
- const done = response?.ok || gone;
334
- context.log?.[done ? "info" : "warn"]({
335
- event: TOKEN_LOG_EVENT,
336
- provider: provider.id,
337
- operation: "revoke",
338
- pid: process.pid,
339
- outcome: response?.ok ? "revoked" : gone ? "already_revoked" : response ? "rejected" : "no_response",
340
- ...response ? { status: response.status } : {}
341
- });
342
- if (!done)
343
- throw new CliError("outcome_unknown", `${provider.name} did not confirm the revoke`, {
344
- reason: "oauth.revoke-failed",
345
- ...response ? { status: response.status } : {}
346
- });
347
- }, "revokeToken");
348
-
349
- // 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/oauth/keeper.js
350
- import { createHash as createHash2 } from "node:crypto";
351
- import { join } from "node:path";
352
- import { setTimeout as delay } from "node:timers/promises";
353
- var inFlight = /* @__PURE__ */ new Map();
354
- var refreshedInMemory = /* @__PURE__ */ new Map();
355
- var tokenKeeper = /* @__PURE__ */ __name((options) => {
356
- const { provider, storage, signal, log } = options;
357
- const now = options.now ?? Date.now;
358
- const fresh = /* @__PURE__ */ __name((tokens2) => Boolean(tokens2.accessToken) && tokens2.expiresAt !== void 0 && tokens2.expiresAt > now() + (options.freshForMs ?? 6e4), "fresh");
359
- const lockPath = join(options.lockDir, `oauth-${createHash2("sha256").update(storage.key).digest("hex").slice(0, 16)}.lock`);
360
- const clientOf = /* @__PURE__ */ __name((stored) => {
361
- const saved = stored?.client;
362
- if (!saved || saved.clientSecret || saved.clientId !== provider.client.clientId)
363
- return saved ?? provider.client;
364
- return provider.client;
365
- }, "clientOf");
366
- const context = /* @__PURE__ */ __name((client, previous) => ({
367
- fetch: options.fetch,
368
- client,
369
- now,
370
- signInCommand: options.signInCommand,
371
- ...signal ? { signal } : {},
372
- ...log ? { log } : {},
373
- ...previous ? { previous } : {}
374
- }), "context");
375
- const exchange = /* @__PURE__ */ __name((params, ctx) => provider.exchange ? provider.exchange(params, ctx) : requestTokens(provider, params, ctx), "exchange");
376
- const notSignedIn = /* @__PURE__ */ __name(() => new CliError("authentication_error", `not signed in to ${provider.name}; run ${options.signInCommand}`, {
377
- reason: "session.missing"
378
- }), "notSignedIn");
379
- const busy = /* @__PURE__ */ __name((error) => isCliError(error) && error.details.reason === "file.locked", "busy");
380
- const acquire = /* @__PURE__ */ __name(async () => {
381
- const started = performance.now();
382
- let waiting = false;
383
- for (; ; ) {
384
- try {
385
- return await acquireLock(lockPath, signal ? { signal } : {});
386
- } catch (error) {
387
- if (!busy(error))
388
- throw error;
389
- if (!waiting) {
390
- waiting = true;
391
- log?.info({
392
- event: TOKEN_LOG_EVENT,
393
- provider: provider.id,
394
- operation: "lock",
395
- outcome: "waiting",
396
- pid: process.pid
397
- });
398
- }
399
- if (performance.now() - started > (options.lockWaitMs ?? 45e3))
400
- throw new CliError("provider_unavailable", `another process holds this ${provider.name} sign-in; retry`, {
401
- reason: "oauth.locked",
402
- retryable: true
403
- });
404
- await delay(options.lockRetryMs ?? 50, void 0, signal ? { signal } : {}).catch(() => {
405
- throw new CliError("cancelled", `${provider.name} sign-in was cancelled`);
406
- });
407
- }
408
- }
409
- }, "acquire");
410
- const locked = /* @__PURE__ */ __name(async (work) => {
411
- const lock = await acquire();
412
- try {
413
- return await work();
414
- } finally {
415
- await lock.release().catch(() => {
416
- });
417
- }
418
- }, "locked");
419
- const shared = /* @__PURE__ */ __name((work) => {
420
- const running = inFlight.get(lockPath);
421
- if (running)
422
- return running;
423
- const started = locked(work).finally(() => inFlight.delete(lockPath));
424
- inFlight.set(lockPath, started);
425
- return started;
426
- }, "shared");
427
- const remembered = /* @__PURE__ */ __name((saved) => {
428
- const kept = refreshedInMemory.get(lockPath);
429
- return kept && fresh(kept) && kept.refreshToken === saved.refreshToken ? kept : void 0;
430
- }, "remembered");
431
- const forget = /* @__PURE__ */ __name(() => refreshedInMemory.delete(lockPath), "forget");
432
- let answered;
433
- const answer = /* @__PURE__ */ __name((given) => {
434
- answered = given;
435
- return given;
436
- }, "answer");
437
- const tokens = /* @__PURE__ */ __name(async ({ refresh = false } = {}) => {
438
- const seen = storage.read();
439
- if (!seen)
440
- throw notSignedIn();
441
- if (!refresh) {
442
- const kept = remembered(seen.tokens);
443
- if (kept)
444
- return answer(kept);
445
- if (fresh(seen.tokens))
446
- return answer(seen.tokens);
447
- }
448
- const refused = answered ?? remembered(seen.tokens) ?? seen.tokens;
449
- return answer(await shared(async () => {
450
- const current = storage.read();
451
- if (!current)
452
- throw notSignedIn();
453
- const latest = remembered(current.tokens) ?? current.tokens;
454
- if (refresh) {
455
- if (latest.accessToken !== refused.accessToken && fresh(latest))
456
- return latest;
457
- } else {
458
- if (latest !== current.tokens)
459
- return latest;
460
- if (fresh(current.tokens) || current.tokens.refreshToken !== seen.tokens.refreshToken)
461
- return current.tokens;
462
- }
463
- if (storage.moved && storage.rotating)
464
- throw new CliError("authentication_error", `the sign-in to ${provider.name} needs a refresh, which a run with moved folders never makes: the provider rotates its refresh token, and the owner's own sign-in would keep a dead one; run this in the normal run, or sign in again there`, { reason: "oauth.moved-rotating" });
465
- const client = clientOf(current);
466
- const refreshed = await exchange({ grant_type: "refresh_token", refresh_token: current.tokens.refreshToken }, context(client, current.tokens));
467
- if (storage.moved && refreshed.refreshToken === current.tokens.refreshToken)
468
- refreshedInMemory.set(lockPath, refreshed);
469
- else
470
- storage.write({ tokens: refreshed, client });
471
- return refreshed;
472
- }));
473
- }, "tokens");
474
- return {
475
- tokens,
476
- accessToken: /* @__PURE__ */ __name(async (tokensOptions) => {
477
- const current = await tokens(tokensOptions);
478
- if (!current.accessToken)
479
- throw notSignedIn();
480
- return current.accessToken;
481
- }, "accessToken"),
482
- signIn: /* @__PURE__ */ __name(async ({ accept, ...authorizeOptions }) => {
483
- storage.probe();
484
- const authorization = await authorize({ ...authorizeOptions, provider, ...signal ? { signal } : {} });
485
- const client = provider.client;
486
- const received = await exchange({
487
- grant_type: "authorization_code",
488
- code: authorization.code,
489
- redirect_uri: authorization.redirectUri,
490
- code_verifier: authorization.codeVerifier
491
- }, context(client));
492
- const extra = await accept?.(received) ?? void 0;
493
- await locked(async () => {
494
- forget();
495
- storage.write({ tokens: received, client, ...extra ? { extra } : {} }, { signIn: true });
496
- });
497
- return { scopes: received.scopes };
498
- }, "signIn"),
499
- save: /* @__PURE__ */ __name((saved, extra) => locked(async () => {
500
- forget();
501
- storage.write({ tokens: saved, client: clientOf(storage.read()), ...extra ? { extra } : {} }, { signIn: true });
502
- }), "save"),
503
- signOut: /* @__PURE__ */ __name(({ revoke = false } = {}) => locked(async () => {
504
- forget();
505
- const current = storage.read();
506
- let revoked = false;
507
- if (revoke && current) {
508
- await revokeToken(provider, current.tokens, context(clientOf(current)));
509
- revoked = true;
510
- }
511
- return { revoked, removed: storage.remove() };
512
- }), "signOut")
513
- };
514
- }, "tokenKeeper");
515
-
516
- // 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/oauth/storage.js
517
- var invalid = /* @__PURE__ */ __name(() => new CliError("authentication_error", "the saved sign-in cannot be read; sign in again", { reason: "oauth.invalid" }), "invalid");
518
- var parse = /* @__PURE__ */ __name((raw) => {
519
- let value;
520
- try {
521
- value = JSON.parse(raw);
522
- } catch {
523
- throw invalid();
524
- }
525
- if (typeof value !== "object" || value === null || Array.isArray(value))
526
- throw invalid();
527
- return value;
528
- }, "parse");
529
- var text = /* @__PURE__ */ __name((value) => typeof value === "string" && value ? value : void 0, "text");
530
- var finite = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) ? value : void 0, "finite");
531
- var previousOf = /* @__PURE__ */ __name((raw) => {
532
- if (raw === void 0)
533
- return {};
534
- try {
535
- return parse(raw);
536
- } catch {
537
- return {};
538
- }
539
- }, "previousOf");
540
- var defined = /* @__PURE__ */ __name((value) => Object.fromEntries(Object.entries(value).filter(([, field]) => field !== void 0)), "defined");
541
- var oauthAccount = /* @__PURE__ */ __name((providerId, profile) => {
542
- if (!profile.trim())
543
- throw new CliError("validation_error", "name a profile: a sign-in always belongs to one", {
544
- reason: "profile.missing"
545
- });
546
- return `oauth:${providerId}:${profile}`;
547
- }, "oauthAccount");
548
- var standardCodec = /* @__PURE__ */ __name((providerId) => ({
549
- decode: /* @__PURE__ */ __name((raw) => {
550
- const value = parse(raw);
551
- const refreshToken = text(value.refreshToken);
552
- const clientId = text(value.clientId);
553
- if (value.version !== 1 || value.provider !== providerId || !refreshToken || !clientId)
554
- throw invalid();
555
- if (!Array.isArray(value.scopes) || !value.scopes.every((scope) => typeof scope === "string"))
556
- throw invalid();
557
- const source = text(value.clientSource);
558
- return {
559
- client: defined({ clientId, clientSecret: text(value.clientSecret), source }),
560
- tokens: defined({
561
- accessToken: text(value.accessToken),
562
- refreshToken,
563
- expiresAt: finite(value.expiresAt),
564
- scopes: value.scopes,
565
- tokenType: text(value.tokenType)
566
- })
567
- };
568
- }, "decode"),
569
- encode: /* @__PURE__ */ __name(({ tokens, client, previous, extra }) => JSON.stringify(defined({
570
- ...previousOf(previous),
571
- ...extra,
572
- version: 1,
573
- provider: providerId,
574
- clientId: client.clientId,
575
- // Only WireCat's secret, which is public: a later release may ship another default app, and a refresh needs
576
- // the secret of the app that signed in. An owner's own secret stays where the owner keeps it.
577
- clientSecret: client.source === "constants" ? client.clientSecret : void 0,
578
- clientSource: client.source,
579
- accessToken: tokens.accessToken,
580
- refreshToken: tokens.refreshToken,
581
- expiresAt: tokens.expiresAt,
582
- scopes: tokens.scopes,
583
- tokenType: tokens.tokenType
584
- })), "encode")
585
- }), "standardCodec");
586
- var driveSessionCodec = {
587
- decode: /* @__PURE__ */ __name((raw) => {
588
- const value = parse(raw);
589
- const tokens = value.tokens;
590
- if (typeof tokens !== "object" || tokens === null || Array.isArray(tokens))
591
- throw invalid();
592
- const fields = tokens;
593
- const refreshToken = text(fields.refresh_token);
594
- const clientId = text(value.clientId);
595
- if (!refreshToken || !clientId || typeof value.principal !== "string")
596
- throw invalid();
597
- return {
598
- client: defined({
599
- clientId,
600
- clientSecret: text(value.clientSecret),
601
- source: text(value.clientSource)
602
- }),
603
- tokens: defined({
604
- accessToken: text(fields.access_token),
605
- refreshToken,
606
- expiresAt: finite(fields.expiry_date),
607
- scopes: typeof fields.scope === "string" ? fields.scope.split(/\s+/).filter(Boolean) : [],
608
- tokenType: text(fields.token_type)
609
- })
610
- };
611
- }, "decode"),
612
- encode: /* @__PURE__ */ __name(({ tokens, client, previous, extra }) => {
613
- const before = previousOf(previous);
614
- const oldTokens = typeof before.tokens === "object" && before.tokens !== null ? before.tokens : {};
615
- const session = {
616
- ...before,
617
- ...extra,
618
- clientId: client.clientId,
619
- ...client.clientSecret ? { clientSecret: client.clientSecret } : {},
620
- ...client.source ? { clientSource: client.source } : {},
621
- tokens: defined({
622
- ...oldTokens,
623
- access_token: tokens.accessToken,
624
- refresh_token: tokens.refreshToken,
625
- expiry_date: tokens.expiresAt,
626
- ...tokens.scopes.length ? { scope: tokens.scopes.join(" ") } : {},
627
- token_type: tokens.tokenType
628
- })
629
- };
630
- if (typeof session.principal !== "string")
631
- throw new CliError("configuration_error", "drive's sign-in entry needs the account's principal");
632
- return JSON.stringify(session);
633
- }, "encode")
634
- };
635
- var googleStandard = standardCodec("google");
636
- var googleTokenCodec = {
637
- decode: /* @__PURE__ */ __name((raw) => {
638
- const stored = googleStandard.decode(raw);
639
- const clientSecret = text(parse(raw).clientSecret);
640
- return clientSecret ? { ...stored, client: { clientId: stored.client?.clientId ?? "", clientSecret } } : stored;
641
- }, "decode"),
642
- encode: /* @__PURE__ */ __name((input) => {
643
- const entry = parse(googleStandard.encode(input));
644
- if (input.client.clientSecret)
645
- entry.clientSecret = input.client.clientSecret;
646
- else
647
- delete entry.clientSecret;
648
- return JSON.stringify(entry);
649
- }, "encode")
650
- };
651
- var accountTokenCodec = /* @__PURE__ */ __name((providerId) => {
652
- const standard = standardCodec(providerId);
653
- return {
654
- rotating: true,
655
- decode: /* @__PURE__ */ __name((raw) => {
656
- const stored = standard.decode(raw);
657
- const value = parse(raw);
658
- const clientSecret = text(value.clientSecret);
659
- const host = text(value.host);
660
- const userId = text(value.userId);
661
- if (!host || !userId || !clientSecret)
662
- throw invalid();
663
- return { ...stored, client: { ...stored.client, clientSecret }, account: { host, userId } };
664
- }, "decode"),
665
- encode: /* @__PURE__ */ __name((input) => {
666
- const entry = parse(standard.encode(input));
667
- const from = input.signIn ? input.extra ?? {} : entry;
668
- if (!input.client.clientSecret || typeof from.host !== "string" || typeof from.userId !== "string")
669
- throw new CliError("configuration_error", "an account-bound sign-in needs the app's secret, its host and user");
670
- entry.clientSecret = input.client.clientSecret;
671
- return JSON.stringify(entry);
672
- }, "encode")
673
- };
674
- }, "accountTokenCodec");
675
- var zoomTokenCodec = {
676
- decode: /* @__PURE__ */ __name((raw) => {
677
- const value = parse(raw);
678
- const accessToken = text(value.accessToken);
679
- const refreshToken = text(value.refreshToken);
680
- const expiresAt = finite(value.expiresAt);
681
- if (!accessToken || !refreshToken || expiresAt === void 0)
682
- throw invalid();
683
- if (!Array.isArray(value.scopes) || !value.scopes.every((scope) => typeof scope === "string"))
684
- throw invalid();
685
- return { tokens: { accessToken, refreshToken, expiresAt, scopes: value.scopes } };
686
- }, "decode"),
687
- encode: /* @__PURE__ */ __name(({ tokens }) => {
688
- if (!tokens.accessToken)
689
- throw new CliError("invalid_response", "zm's sign-in entry needs an access token");
690
- return JSON.stringify({
691
- accessToken: tokens.accessToken,
692
- refreshToken: tokens.refreshToken,
693
- expiresAt: tokens.expiresAt ?? 0,
694
- scopes: tokens.scopes
695
- });
696
- }, "encode")
697
- };
698
- var keyringFailure = /* @__PURE__ */ __name((thrown, secret) => {
699
- const failure = new CliError("configuration_error", "could not reach the saved sign-in; use an available keyring or file storage", { reason: "oauth.not-saved" });
700
- const words = thrown instanceof Error ? thrown.message : String(thrown);
701
- failure.cause = new Error(secret ? words.replaceAll(secret, "[secret]") : words);
702
- return failure;
703
- }, "keyringFailure");
704
- var credentialStorage = /* @__PURE__ */ __name((options) => {
705
- if (!options.credentials.keyring)
706
- throw new CliError("configuration_error", "a sign-in store needs its keyring passed in, never a default");
707
- const credentials = new Credentials(options.credentials);
708
- const { account, codec } = options;
709
- const moved = options.credentials.isolated === true || options.credentials.keyring === systemKeyring && isMovedRun({ appName: options.credentials.service, env: options.credentials.env ?? process.env });
710
- const service = keyringService(options.credentials.service, options.credentials.configDir, options.credentials.isolated);
711
- const legacies = (options.legacyAccounts ?? []).map((legacy) => typeof legacy === "string" ? { account: legacy, store: credentials } : { account: legacy.account, store: new Credentials({ ...options.credentials, service: legacy.service }) });
712
- const sourced = /* @__PURE__ */ __name((name, store = credentials) => {
713
- try {
714
- return store.read(name);
715
- } catch (error) {
716
- if (error instanceof CliError)
717
- throw error;
718
- throw keyringFailure(error);
719
- }
720
- }, "sourced");
721
- const raw = /* @__PURE__ */ __name((name) => sourced(name)?.secret, "raw");
722
- const fallsBack = options.credentials.storage !== "keyring";
723
- const replaced = /* @__PURE__ */ __name((name) => {
724
- try {
725
- return raw(name);
726
- } catch (error) {
727
- if (fallsBack && error instanceof CliError && error.details.reason === "keyring.unreachable")
728
- return void 0;
729
- throw error;
730
- }
731
- }, "replaced");
732
- const save = /* @__PURE__ */ __name((value, writeOptions) => {
733
- try {
734
- credentials.write(account, value, writeOptions);
735
- } catch (error) {
736
- throw keyringFailure(error, value);
737
- }
738
- }, "save");
739
- const current = /* @__PURE__ */ __name(() => {
740
- const own = raw(account);
741
- if (own !== void 0)
742
- return own;
743
- for (const legacy of legacies) {
744
- const found = sourced(legacy.account, legacy.store);
745
- if (found === void 0)
746
- continue;
747
- codec.decode(found.secret);
748
- if (!moved && found.source === "file")
749
- try {
750
- new Credentials({ ...options.credentials, storage: "file" }).write(account, found.secret);
751
- } catch (error) {
752
- throw keyringFailure(error, found.secret);
753
- }
754
- else if (!moved)
755
- save(found.secret);
756
- return found.secret;
757
- }
758
- return void 0;
759
- }, "current");
760
- return {
761
- key: `${service}\0${account}`,
762
- moved,
763
- ...codec.rotating ? { rotating: true } : {},
764
- probe: /* @__PURE__ */ __name(() => {
765
- replaced(account);
766
- }, "probe"),
767
- read: /* @__PURE__ */ __name(() => {
768
- const value = current();
769
- return value === void 0 ? void 0 : codec.decode(value);
770
- }, "read"),
771
- write: /* @__PURE__ */ __name((input, writeOptions) => save(codec.encode({ ...input, previous: replaced(account), ...writeOptions?.signIn ? { signIn: true } : {} }), writeOptions), "write"),
772
- remove: /* @__PURE__ */ __name(() => {
773
- try {
774
- const older = moved ? [] : legacies.flatMap((legacy) => legacy.store.remove(legacy.account));
775
- return [.../* @__PURE__ */ new Set([...credentials.remove(account), ...older])];
776
- } catch (error) {
777
- throw keyringFailure(error);
778
- }
779
- }, "remove")
780
- };
781
- }, "credentialStorage");
782
-
783
- export {
784
- privateFiles,
785
- withSqliteSidecars,
786
- authorize,
787
- TOKEN_LOG_EVENT,
788
- TOKEN_LOG_ALLOW,
789
- requestTokens,
790
- revokeToken,
791
- tokenKeeper,
792
- oauthAccount,
793
- standardCodec,
794
- driveSessionCodec,
795
- googleTokenCodec,
796
- accountTokenCodec,
797
- zoomTokenCodec,
798
- credentialStorage
799
- };