@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,214 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import {
4
- encodeWav
5
- } from "./chunk-3CW2C7ZA.js";
6
- import {
7
- SAMPLE_RATE,
8
- toModelRate
9
- } from "./chunk-2S54TM4N.js";
10
- import {
11
- OPENAI_URL,
12
- refuseModelAddress
13
- } from "./chunk-D7RCUODT.js";
14
- import {
15
- endpointFetch,
16
- onThisComputer
17
- } from "./chunk-3KUEZK5Z.js";
18
- import {
19
- providerWaitMs
20
- } from "./chunk-VTYNLTDW.js";
21
- import {
22
- OPENAI_TRANSCRIBE_MODEL,
23
- VAD,
24
- filesPresent,
25
- modelsDirectory,
26
- vadPath
27
- } from "./chunk-BAFC7WNI.js";
28
- import {
29
- DEFAULT_RETRY,
30
- backoffMs
31
- } from "./chunk-3QN5KDFZ.js";
32
- import {
33
- CliError
34
- } from "./chunk-IANKXHSE.js";
35
- import {
36
- __name
37
- } from "./chunk-ZVVMGPBJ.js";
38
-
39
- // 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/speech/openai.js
40
- import { setTimeout as wait } from "node:timers/promises";
41
- var LONGEST_REQUEST_SECONDS = 600;
42
- var JOINED_SECONDS = 0.2;
43
- var PAD_SECONDS = 0.2;
44
- var LEAD = SAMPLE_RATE / 2;
45
- var EXHAUSTED = /* @__PURE__ */ new Set([
46
- "insufficient_quota",
47
- "credit_balance_exhausted",
48
- "organization_spend_limit_exceeded",
49
- "project_spend_limit_exceeded",
50
- "organization_usage_limit_exceeded"
51
- ]);
52
- var RETRY = { ...DEFAULT_RETRY, retries: 4 };
53
- var interrupted = /* @__PURE__ */ __name((signal) => {
54
- if (!signal?.aborted)
55
- return;
56
- if (signal.reason instanceof CliError)
57
- throw signal.reason;
58
- const timeout = signal.reason instanceof Error && signal.reason.name === "TimeoutError";
59
- throw new CliError(timeout ? "timeout" : "cancelled", "the transcription was interrupted");
60
- }, "interrupted");
61
- var sleeping = /* @__PURE__ */ __name((ms, signal) => wait(ms, void 0, signal ? { signal } : {}).then(() => void 0, (error) => {
62
- interrupted(signal);
63
- throw error;
64
- }), "sleeping");
65
- var formOf = /* @__PURE__ */ __name((wav, options) => {
66
- const form = new FormData();
67
- form.append("file", new Blob([wav], { type: "audio/wav" }), "audio.wav");
68
- form.append("model", options.model ?? OPENAI_TRANSCRIBE_MODEL);
69
- for (const language of options.languages ?? [])
70
- form.append("languages[]", language);
71
- for (const keyword of options.keywords ?? [])
72
- form.append("keywords[]", keyword);
73
- if (options.prompt)
74
- form.append("prompt", options.prompt);
75
- return form;
76
- }, "formOf");
77
- var safe = /* @__PURE__ */ __name((value) => typeof value === "string" && /^[\w.-]{1,64}$/.test(value) ? value : void 0, "safe");
78
- var failureOf = /* @__PURE__ */ __name(async (response) => {
79
- try {
80
- const body = await response.json();
81
- const code = safe(body.error?.code);
82
- const type = safe(body.error?.type);
83
- return { ...code ? { code } : {}, ...type ? { type } : {} };
84
- } catch {
85
- return {};
86
- }
87
- }, "failureOf");
88
- var TRANSCRIPTION_TIMEOUT_MS = 6e5;
89
- var send = /* @__PURE__ */ __name(async (wav, options) => {
90
- const url = `${(options.baseUrl ?? OPENAI_URL).replace(/\/+$/, "")}/audio/transcriptions`;
91
- const post = options.fetch ?? endpointFetch(url, TRANSCRIPTION_TIMEOUT_MS);
92
- const retry = options.retry ?? RETRY;
93
- const sleep = options.sleep ?? sleeping;
94
- const random = options.random ?? Math.random;
95
- const who = options.label ?? "OpenAI";
96
- for (let attempt = 1; ; attempt++) {
97
- interrupted(options.signal);
98
- let response;
99
- try {
100
- response = await post(url, {
101
- method: "POST",
102
- headers: options.apiKey ? { authorization: `Bearer ${options.apiKey}` } : {},
103
- body: formOf(wav, options),
104
- ...options.signal ? { signal: options.signal } : {}
105
- });
106
- } catch {
107
- interrupted(options.signal);
108
- if (attempt > retry.retries)
109
- throw new CliError("network_error", `${who} could not be reached`, { reason: "network.failed" });
110
- await sleep(backoffMs(attempt, retry, random), options.signal);
111
- continue;
112
- }
113
- if (response.ok) {
114
- const body = await response.json().catch(() => interrupted(options.signal));
115
- if (typeof body?.text !== "string")
116
- throw new CliError("invalid_response", `${who} answered without a transcript`, {
117
- reason: "provider.invalid-response"
118
- });
119
- return body.text.trim();
120
- }
121
- const { code, type } = await failureOf(response);
122
- const status = response.status;
123
- const said = `HTTP ${status}${code ? `, ${code}` : type ? `, ${type}` : ""}`;
124
- if (status === 401)
125
- throw new CliError("authentication_error", `${who} refused the key (${said}) \u2014 set it again with \`${options.keyHint ?? "models keys set openai"}\``, { reason: "auth.failed" });
126
- if (status === 403)
127
- throw new CliError("permission_error", `${who} refused the request (${said}) \u2014 OpenAI answers this when the country or region is not supported, or the key's project may not use the model`, { reason: "access.denied" });
128
- if (status === 413)
129
- throw new CliError("validation_error", `${who} refused the audio as too large (${said})`, {
130
- reason: "transcription.too-large"
131
- });
132
- if (EXHAUSTED.has(code ?? "") || EXHAUSTED.has(type ?? ""))
133
- throw new CliError("permission_error", `${who} refused: the account's credit, spend limit or usage limit is used up (${said}) \u2014 see the billing page`, { reason: "transcription.quota-exhausted" });
134
- const again = status === 408 || status === 429 || status >= 500;
135
- const asked = providerWaitMs(response.headers, () => /* @__PURE__ */ new Date());
136
- if (again && attempt <= retry.retries && (asked === void 0 || asked <= retry.maxRetryAfterMs)) {
137
- await sleep(asked ?? backoffMs(attempt, retry, random), options.signal);
138
- continue;
139
- }
140
- if (status === 429)
141
- throw new CliError("rate_limited", `${who} answered ${said}`, {
142
- reason: "provider.rate-limited",
143
- ...asked === void 0 ? {} : { retry_after_ms: asked }
144
- });
145
- if (status >= 500)
146
- throw new CliError([502, 503, 504].includes(status) ? "provider_unavailable" : "provider_error", `${who} answered ${said}`, { reason: [502, 503, 504].includes(status) ? "provider.unavailable" : "provider.refused" });
147
- throw new CliError("provider_error", `${who} answered ${said}`, { reason: "provider.refused" });
148
- }
149
- }, "send");
150
- var piecesOf = /* @__PURE__ */ __name((spans, limit) => {
151
- const pieces = [];
152
- for (const span of spans) {
153
- const last = pieces.at(-1);
154
- const joined = last !== void 0 && span.start - last.end < JOINED_SECONDS;
155
- const fits = last !== void 0 && limit !== void 0 && span.end - last.start <= limit;
156
- if (last && (fits || joined && span.end - last.start <= LONGEST_REQUEST_SECONDS))
157
- last.end = span.end;
158
- else
159
- pieces.push({ start: span.start, end: span.end });
160
- }
161
- return pieces;
162
- }, "piecesOf");
163
- var openCutter = /* @__PURE__ */ __name(async (vadModel) => {
164
- const { openSpeechCutter } = await import("./recognize-25ITJWGX.js");
165
- return openSpeechCutter(vadModel);
166
- }, "openCutter");
167
- var checkKeywords = /* @__PURE__ */ __name((keywords = []) => {
168
- const bad = keywords.find((keyword) => typeof keyword !== "string" || !keyword.trim() || /[<>\r\n]/.test(keyword));
169
- if (bad !== void 0)
170
- throw new CliError("validation_error", "a keyword must be a non-empty single line without < or > \u2014 OpenAI refuses the whole request otherwise");
171
- }, "checkKeywords");
172
- var transcribeOpenAI = /* @__PURE__ */ __name(async (audio, options) => {
173
- refuseModelAddress(options.env ?? process.env, options.baseUrl ?? OPENAI_URL, "audio");
174
- if (!options.apiKey && !onThisComputer(options.baseUrl ?? OPENAI_URL))
175
- throw new CliError("authentication_error", "no OpenAI key \u2014 `models keys set openai`, or OPENAI_API_KEY", {
176
- reason: "transcription.no-key"
177
- });
178
- checkKeywords(options.keywords);
179
- interrupted(options.signal);
180
- const pcm = toModelRate(audio.samples, audio.rate);
181
- const duration = (pcm.length - LEAD) / SAMPLE_RATE;
182
- if (options.bundle && duration <= LONGEST_REQUEST_SECONDS) {
183
- const text = await send(encodeWav(pcm.subarray(LEAD)), options);
184
- return text ? [{ start: 0, end: duration, text }] : [];
185
- }
186
- const vadModel = options.vadModel ?? vadPath(modelsDirectory(options.env));
187
- if (!options.cutter && !filesPresent([[VAD, vadModel]]))
188
- throw new CliError("not_found", "the voice detector that finds the speech is not on this machine \u2014 it comes with any speech model: `models download`", { reason: "model.not-downloaded", model: "silero_vad" });
189
- const cutter = await (options.cutter ?? openCutter)(vadModel);
190
- let spans;
191
- try {
192
- spans = cutter.cut(pcm);
193
- } finally {
194
- cutter.free();
195
- }
196
- const pieces = piecesOf(spans, options.bundle ? LONGEST_REQUEST_SECONDS : void 0);
197
- const heard = [];
198
- for (const [index, piece] of pieces.entries()) {
199
- const end = Math.min(piece.end, duration);
200
- const from = Math.max(piece.start - PAD_SECONDS, pieces[index - 1]?.end ?? 0);
201
- const to = Math.min(end + PAD_SECONDS, pieces[index + 1]?.start ?? duration);
202
- const samples = pcm.subarray(LEAD + Math.floor(from * SAMPLE_RATE), LEAD + Math.ceil(to * SAMPLE_RATE));
203
- const text = await send(encodeWav(samples), options);
204
- if (text)
205
- heard.push({ start: Math.min(piece.start, end), end, text });
206
- }
207
- return heard;
208
- }, "transcribeOpenAI");
209
-
210
- export {
211
- LONGEST_REQUEST_SECONDS,
212
- piecesOf,
213
- transcribeOpenAI
214
- };
@@ -1,288 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import {
4
- ACCESS_SECONDS,
5
- REFRESH_SECONDS,
6
- readStored
7
- } from "./chunk-3AQHKXVR.js";
8
- import {
9
- OAuthError,
10
- OAuthErrorCode
11
- } from "./chunk-PL5P7UKW.js";
12
- import {
13
- __name
14
- } from "./chunk-ZVVMGPBJ.js";
15
-
16
- // 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/mcp/http/oauth.js
17
- import { createHash, randomBytes, randomInt, timingSafeEqual } from "node:crypto";
18
- import { chmodSync, mkdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
19
- import { dirname } from "node:path";
20
- var AUTH_CODE_MS = 60 * 1e3;
21
- var LOGIN_CODE_MS = 10 * 60 * 1e3;
22
- var WRONG_TRIES = 5;
23
- var WRONG_CODE_WAIT_MS = 3e4;
24
- var MAX_CLIENTS = 10;
25
- var CODE_ALPHABET = "ABCDEFGHJKLMNPQRSTUVWXYZ23456789";
26
- var hash = /* @__PURE__ */ __name((value) => createHash("sha256").update(value).digest("base64url"), "hash");
27
- var secret = /* @__PURE__ */ __name(() => randomBytes(32).toString("base64url"), "secret");
28
- var same = /* @__PURE__ */ __name((given, expected) => {
29
- const left = Buffer.from(given);
30
- const right = Buffer.from(expected);
31
- return left.byteLength === right.byteLength && timingSafeEqual(left, right);
32
- }, "same");
33
- var tokenFile = /* @__PURE__ */ __name((path) => ({
34
- read: /* @__PURE__ */ __name(() => readStored(path), "read"),
35
- write: /* @__PURE__ */ __name((stored) => {
36
- mkdirSync(dirname(path), { recursive: true, mode: 448 });
37
- const temporary = `${path}.${randomBytes(16).toString("hex")}.tmp`;
38
- writeFileSync(temporary, JSON.stringify(stored), { mode: 384, flag: "wx" });
39
- chmodSync(temporary, 384);
40
- renameSync(temporary, path);
41
- }, "write")
42
- }), "tokenFile");
43
- var revokeAll = /* @__PURE__ */ __name((path) => rmSync(path, { force: true }), "revokeAll");
44
- var json = /* @__PURE__ */ __name((body, status = 200) => new Response(JSON.stringify(body), {
45
- status,
46
- headers: { "content-type": "application/json", "cache-control": "no-store" }
47
- }), "json");
48
- var oauthError = /* @__PURE__ */ __name((error, description, status = 400) => json({ error, error_description: description }, status), "oauthError");
49
- var escapeHtml = /* @__PURE__ */ __name((value) => value.replace(/[&<>"']/g, (character) => `&#${character.charCodeAt(0)};`), "escapeHtml");
50
- var redirectAllowed = /* @__PURE__ */ __name((uri) => {
51
- try {
52
- const url = new URL(uri);
53
- if (url.hash)
54
- return false;
55
- return url.protocol === "https:" || url.protocol === "http:" && ["localhost", "127.0.0.1"].includes(url.hostname);
56
- } catch {
57
- return false;
58
- }
59
- }, "redirectAllowed");
60
- var ownerLogin = /* @__PURE__ */ __name(({ issuer, resource, file, appName, reaches = `your ${appName} data`, onCode, now = /* @__PURE__ */ __name(() => Date.now(), "now") }) => {
61
- const store = tokenFile(file);
62
- const codes = /* @__PURE__ */ new Map();
63
- let login = { value: "", expires: 0 };
64
- let wrong = 0;
65
- let retryAt = 0;
66
- let renewal;
67
- const freshCode = /* @__PURE__ */ __name(() => {
68
- const part = /* @__PURE__ */ __name(() => Array.from({ length: 4 }, () => CODE_ALPHABET[randomInt(CODE_ALPHABET.length)]).join(""), "part");
69
- login = { value: `${part()}-${part()}`, expires: now() + LOGIN_CODE_MS };
70
- clearTimeout(renewal);
71
- renewal = setTimeout(freshCode, LOGIN_CODE_MS);
72
- renewal.unref();
73
- onCode(login.value, new Date(login.expires));
74
- }, "freshCode");
75
- freshCode();
76
- const base = issuer.pathname.replace(/\/+$/, "");
77
- const endpoint = /* @__PURE__ */ __name((path) => new URL(`${base}${path}`, issuer.origin).href, "endpoint");
78
- const metadata = {
79
- issuer: issuer.href,
80
- authorization_endpoint: endpoint("/authorize"),
81
- token_endpoint: endpoint("/token"),
82
- registration_endpoint: endpoint("/register"),
83
- response_types_supported: ["code"],
84
- grant_types_supported: ["authorization_code", "refresh_token"],
85
- code_challenge_methods_supported: ["S256"],
86
- token_endpoint_auth_methods_supported: ["none", "client_secret_post", "client_secret_basic"]
87
- };
88
- const issue = /* @__PURE__ */ __name((stored, clientId) => {
89
- const access = secret();
90
- const refresh = secret();
91
- const seconds = Math.floor(now() / 1e3);
92
- stored.tokens = stored.tokens.filter((one) => one.expiresAt > seconds);
93
- stored.tokens.push({ hash: hash(access), kind: "access", clientId, expiresAt: seconds + ACCESS_SECONDS }, { hash: hash(refresh), kind: "refresh", clientId, expiresAt: seconds + REFRESH_SECONDS });
94
- store.write(stored);
95
- return json({ access_token: access, token_type: "Bearer", expires_in: ACCESS_SECONDS, refresh_token: refresh });
96
- }, "issue");
97
- const clientOf = /* @__PURE__ */ __name((stored, request, form) => {
98
- let id = form.get("client_id") ?? "";
99
- let given = form.get("client_secret") ?? void 0;
100
- const basic = request.headers.get("authorization");
101
- if (basic?.startsWith("Basic ")) {
102
- const [user = "", password = ""] = Buffer.from(basic.slice(6), "base64").toString().split(":");
103
- id = decodeURIComponent(user);
104
- given = decodeURIComponent(password);
105
- }
106
- const client = stored.clients.find((one) => one.id === id);
107
- if (!client)
108
- return void 0;
109
- if (client.authMethod === "none")
110
- return client;
111
- return given !== void 0 && client.secretHash && same(hash(given), client.secretHash) ? client : void 0;
112
- }, "clientOf");
113
- const register = /* @__PURE__ */ __name(async (request) => {
114
- const body = await request.json().catch(() => null);
115
- const uris = Array.isArray(body?.redirect_uris) ? body.redirect_uris.filter((one) => typeof one === "string") : [];
116
- if (uris.length === 0 || !uris.every(redirectAllowed))
117
- return oauthError("invalid_redirect_uri", "redirect_uris must be https URLs");
118
- const requested = body?.token_endpoint_auth_method;
119
- const authMethod = requested === "client_secret_post" || requested === "client_secret_basic" ? requested : "none";
120
- const clientSecret = authMethod === "none" ? void 0 : secret();
121
- const name = typeof body?.client_name === "string" ? body.client_name.slice(0, 100) : void 0;
122
- const client = {
123
- id: secret(),
124
- redirectUris: uris,
125
- authMethod,
126
- issuedAt: Math.floor(now() / 1e3),
127
- ...name ? { name } : {},
128
- ...clientSecret ? { secretHash: hash(clientSecret) } : {}
129
- };
130
- const stored = store.read();
131
- const seconds = Math.floor(now() / 1e3);
132
- const holding = new Set(stored.tokens.filter((one) => one.expiresAt > seconds).map((one) => one.clientId));
133
- stored.clients.push(client);
134
- while (stored.clients.length > MAX_CLIENTS) {
135
- const idle = stored.clients.findIndex((one) => !holding.has(one.id));
136
- if (idle === -1)
137
- return oauthError("invalid_client_metadata", "too many logged-in apps \u2014 run mcp revoke first");
138
- stored.clients.splice(idle, 1);
139
- }
140
- store.write(stored);
141
- return json({
142
- client_id: client.id,
143
- client_id_issued_at: client.issuedAt,
144
- redirect_uris: uris,
145
- token_endpoint_auth_method: authMethod,
146
- grant_types: ["authorization_code", "refresh_token"],
147
- response_types: ["code"],
148
- ...name ? { client_name: name } : {},
149
- ...clientSecret ? { client_secret: clientSecret, client_secret_expires_at: 0 } : {}
150
- }, 201);
151
- }, "register");
152
- const page = /* @__PURE__ */ __name((params, client, message) => {
153
- const hidden = ["response_type", "client_id", "redirect_uri", "code_challenge", "code_challenge_method", "state"].map((name) => `<input type="hidden" name="${name}" value="${escapeHtml(params.get(name) ?? "")}">`).join("");
154
- const who = escapeHtml(client.name ?? "an application");
155
- const target = new URL(params.get("redirect_uri") ?? "");
156
- const html = `<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>${escapeHtml(appName)} login</title><style>body{font:16px system-ui,sans-serif;max-width:28rem;margin:3rem auto;padding:0 1rem;color:#1d2430}input[type=text]{font:20px ui-monospace,monospace;letter-spacing:.1em;width:100%;padding:.5rem;margin:.5rem 0 1rem;box-sizing:border-box}button{font:inherit;padding:.5rem 1rem}.error{color:#b42318}</style></head><body><h1>${escapeHtml(appName)}</h1><p>An app that calls itself <strong>${who}</strong> asks to reach ${escapeHtml(reaches)} through <code>${escapeHtml(appName)} mcp serve --http</code>.</p><p>After you allow it, the login goes to <strong>${escapeHtml(target.host)}</strong>. Allow only if that is the app you are connecting, such as chatgpt.com or claude.ai.</p><p>Type the code shown in WireCat Desktop, or in the terminal where the server runs. If you did not start this login, close this page.</p>${message ? `<p class="error">${escapeHtml(message)}</p>` : ""}<form method="post" action="${escapeHtml(`${base}/authorize`)}">${hidden}<label>Login code<input type="text" name="login_code" autocomplete="off" autofocus required></label><button type="submit">Allow</button></form></body></html>`;
157
- return new Response(html, {
158
- status: message ? 400 : 200,
159
- headers: {
160
- "content-type": "text/html; charset=utf-8",
161
- "cache-control": "no-store",
162
- "x-frame-options": "DENY",
163
- "content-security-policy": `default-src 'none'; style-src 'unsafe-inline'; form-action 'self' ${target.origin}; frame-ancestors 'none'`,
164
- // no-referrer makes the browser post this form with `Origin: null`, which the Origin check refuses.
165
- "referrer-policy": "same-origin"
166
- }
167
- });
168
- }, "page");
169
- const authorize = /* @__PURE__ */ __name(async (request) => {
170
- const params = request.method === "POST" ? new URLSearchParams(await request.text()) : new URL(request.url).searchParams;
171
- const stored = store.read();
172
- const client = stored.clients.find((one) => one.id === params.get("client_id"));
173
- const redirectUri = params.get("redirect_uri") ?? "";
174
- if (!client?.redirectUris.includes(redirectUri))
175
- return new Response("Unknown client or redirect address.", { status: 400 });
176
- if (params.get("response_type") !== "code" || params.get("code_challenge_method") !== "S256" || !params.get("code_challenge"))
177
- return new Response("This server needs response_type=code and PKCE with S256.", { status: 400 });
178
- if (request.method !== "POST")
179
- return page(params, client);
180
- const throttled = /* @__PURE__ */ __name(() => new Response("Too many wrong codes. Wait, then try the new code.", {
181
- status: 429,
182
- headers: { "retry-after": String(Math.ceil((retryAt - now()) / 1e3)) }
183
- }), "throttled");
184
- if (wrong >= WRONG_TRIES) {
185
- if (now() < retryAt)
186
- return throttled();
187
- wrong = 0;
188
- freshCode();
189
- }
190
- const typed = (params.get("login_code") ?? "").trim().toUpperCase();
191
- if (login.expires < now()) {
192
- freshCode();
193
- return page(params, client, "The code expired. A new one is shown in WireCat Desktop and in the terminal.");
194
- }
195
- if (!same(typed, login.value)) {
196
- wrong += 1;
197
- if (wrong >= WRONG_TRIES) {
198
- retryAt = now() + WRONG_CODE_WAIT_MS;
199
- return throttled();
200
- }
201
- return page(params, client, `Wrong code. Each code works for one login: after an app logs in, a new one appears in WireCat Desktop and in "${appName} mcp server status". ${WRONG_TRIES - wrong} tries left.`);
202
- }
203
- wrong = 0;
204
- freshCode();
205
- const code = secret();
206
- codes.set(hash(code), {
207
- clientId: client.id,
208
- redirectUri,
209
- challenge: params.get("code_challenge") ?? "",
210
- expires: now() + AUTH_CODE_MS
211
- });
212
- const target = new URL(redirectUri);
213
- target.searchParams.set("code", code);
214
- const state = params.get("state");
215
- if (state)
216
- target.searchParams.set("state", state);
217
- target.searchParams.set("iss", issuer.href);
218
- return new Response(null, { status: 302, headers: { location: target.href, "cache-control": "no-store" } });
219
- }, "authorize");
220
- const token = /* @__PURE__ */ __name(async (request) => {
221
- const form = new URLSearchParams(await request.text());
222
- const stored = store.read();
223
- const client = clientOf(stored, request, form);
224
- if (!client)
225
- return oauthError("invalid_client", "unknown client or wrong secret", 401);
226
- const requestedResource = form.get("resource");
227
- if (requestedResource && requestedResource !== resource.href)
228
- return oauthError("invalid_target", "this server issues tokens only for its own MCP endpoint");
229
- if (form.get("grant_type") === "authorization_code") {
230
- const key = hash(form.get("code") ?? "");
231
- const entry = codes.get(key);
232
- codes.delete(key);
233
- const verifier2 = form.get("code_verifier") ?? "";
234
- const challenge = createHash("sha256").update(verifier2).digest("base64url");
235
- if (!entry || entry.expires < now() || entry.clientId !== client.id || entry.redirectUri !== form.get("redirect_uri") || !same(challenge, entry.challenge))
236
- return oauthError("invalid_grant", "the code is wrong, used or expired");
237
- return issue(stored, client.id);
238
- }
239
- if (form.get("grant_type") === "refresh_token") {
240
- const key = hash(form.get("refresh_token") ?? "");
241
- const seconds = Math.floor(now() / 1e3);
242
- const found = stored.tokens.find((one) => one.kind === "refresh" && one.hash === key);
243
- if (!found || found.clientId !== client.id || found.expiresAt <= seconds)
244
- return oauthError("invalid_grant", "the refresh token is wrong, used or expired");
245
- stored.tokens = stored.tokens.filter((one) => one !== found);
246
- return issue(stored, client.id);
247
- }
248
- return oauthError("unsupported_grant_type", "use authorization_code or refresh_token");
249
- }, "token");
250
- const verifier = {
251
- verifyAccessToken: /* @__PURE__ */ __name(async (presented) => {
252
- const seconds = Math.floor(now() / 1e3);
253
- const stored = store.read();
254
- const found = stored.tokens.find((one) => one.kind === "access" && one.hash === hash(presented));
255
- if (!found || found.expiresAt <= seconds)
256
- throw new OAuthError(OAuthErrorCode.InvalidToken, "the token is unknown or expired");
257
- const clientName = stored.clients.find((one) => one.id === found.clientId)?.name;
258
- return {
259
- token: presented,
260
- clientId: found.clientId,
261
- scopes: [],
262
- expiresAt: found.expiresAt,
263
- resource,
264
- ...clientName ? { extra: { clientName } } : {}
265
- };
266
- }, "verifyAccessToken")
267
- };
268
- return {
269
- code: /* @__PURE__ */ __name(() => login.value, "code"),
270
- close: /* @__PURE__ */ __name(() => clearTimeout(renewal), "close"),
271
- metadata,
272
- verifier,
273
- handle: /* @__PURE__ */ __name(async (request, path = new URL(request.url).pathname) => {
274
- if (path === `${base}/register` && request.method === "POST")
275
- return register(request);
276
- if (path === `${base}/authorize` && (request.method === "GET" || request.method === "POST"))
277
- return authorize(request);
278
- if (path === `${base}/token` && request.method === "POST")
279
- return token(request);
280
- return void 0;
281
- }, "handle")
282
- };
283
- }, "ownerLogin");
284
-
285
- export {
286
- revokeAll,
287
- ownerLogin
288
- };
@@ -1,23 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import {
4
- __name
5
- } from "./chunk-ZVVMGPBJ.js";
6
-
7
- // node_modules/.pnpm/@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/installer.js
8
- var installerOf = /* @__PURE__ */ __name((scriptPath) => {
9
- const path = scriptPath.replaceAll("\\", "/");
10
- if (path.includes("/_npx/"))
11
- return "npx";
12
- if (path.includes("/install/global/node_modules/"))
13
- return "bun";
14
- if (/\/\.?pnpm\//.test(path))
15
- return "pnpm";
16
- if (path.includes("/node_modules/"))
17
- return "npm";
18
- return path.includes("/dist/") ? "checkout" : "unknown";
19
- }, "installerOf");
20
-
21
- export {
22
- installerOf
23
- };
@@ -1,46 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import {
4
- __name
5
- } from "./chunk-ZVVMGPBJ.js";
6
-
7
- // node_modules/.pnpm/@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/executable.js
8
- import { existsSync } from "node:fs";
9
- import { win32 } from "node:path";
10
- var variable = /* @__PURE__ */ __name((env, name) => Object.entries(env).find(([key]) => key.toUpperCase() === name)?.[1], "variable");
11
- var executableOnPath = /* @__PURE__ */ __name((command, env, platform = process.platform, exists = existsSync) => {
12
- if (platform !== "win32" || win32.isAbsolute(command))
13
- return command;
14
- if (/[\\/]/.test(command))
15
- return command;
16
- const extensions = win32.extname(command) ? [""] : (variable(env, "PATHEXT") ?? ".EXE;.COM;.CMD;.BAT").split(";").filter((ext) => /^\.[a-z0-9]+$/i.test(ext));
17
- for (const entry of (variable(env, "PATH") ?? "").split(";")) {
18
- const directory = entry.replace(/^"(.*)"$/, "$1");
19
- for (const extension of extensions) {
20
- const candidate = win32.join(directory, command + extension);
21
- if (exists(candidate))
22
- return candidate;
23
- }
24
- }
25
- return command;
26
- }, "executableOnPath");
27
- var executableEnvironment = /* @__PURE__ */ __name((env, platform = process.platform) => {
28
- if (platform !== "win32")
29
- return env;
30
- const configured = variable(env, "COMSPEC");
31
- const system = variable(env, "SYSTEMROOT");
32
- const shell = configured ? configured : system && win32.isAbsolute(system) ? win32.join(system, "System32", "cmd.exe") : void 0;
33
- if (!shell)
34
- return env;
35
- const result = { ...env };
36
- for (const key of Object.keys(result))
37
- if (key.toUpperCase() === "COMSPEC")
38
- delete result[key];
39
- result.comspec = shell;
40
- return result;
41
- }, "executableEnvironment");
42
-
43
- export {
44
- executableOnPath,
45
- executableEnvironment
46
- };