@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,2624 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import {
4
- errorCodes,
5
- isCliError
6
- } from "./chunk-IANKXHSE.js";
7
- import {
8
- visibleControls
9
- } from "./chunk-BBGJQMRI.js";
10
- import {
11
- __name
12
- } from "./chunk-ZVVMGPBJ.js";
13
-
14
- // 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/exit-codes.js
15
- var EXIT_CODES = {
16
- validation_error: 2,
17
- configuration_error: 3,
18
- authentication_error: 4,
19
- permission_error: 5,
20
- not_found: 6,
21
- confirmation_required: 7,
22
- rate_limited: 8,
23
- timeout: 9,
24
- network_error: 10,
25
- provider_error: 11,
26
- provider_unavailable: 12,
27
- invalid_response: 13,
28
- outcome_unknown: 14,
29
- conflict: 15,
30
- cancelled: 130
31
- };
32
- var exitCodeFor = /* @__PURE__ */ __name((code) => EXIT_CODES[code], "exitCodeFor");
33
- var GENERIC_FAILURE = 1;
34
-
35
- // node_modules/.pnpm/valibot@1.5.0_typescript@7.0.2/node_modules/valibot/dist/index.mjs
36
- var store$4;
37
- var DEFAULT_CONFIG = {
38
- lang: void 0,
39
- message: void 0,
40
- abortEarly: void 0,
41
- abortPipeEarly: void 0
42
- };
43
- // @__NO_SIDE_EFFECTS__
44
- function getGlobalConfig(config$1) {
45
- if (!config$1 && !store$4) return DEFAULT_CONFIG;
46
- return {
47
- lang: config$1?.lang ?? store$4?.lang,
48
- message: config$1?.message,
49
- abortEarly: config$1?.abortEarly ?? store$4?.abortEarly,
50
- abortPipeEarly: config$1?.abortPipeEarly ?? store$4?.abortPipeEarly
51
- };
52
- }
53
- __name(getGlobalConfig, "getGlobalConfig");
54
- var store$3;
55
- // @__NO_SIDE_EFFECTS__
56
- function getGlobalMessage(lang) {
57
- return store$3?.get(lang);
58
- }
59
- __name(getGlobalMessage, "getGlobalMessage");
60
- var store$2;
61
- // @__NO_SIDE_EFFECTS__
62
- function getSchemaMessage(lang) {
63
- return store$2?.get(lang);
64
- }
65
- __name(getSchemaMessage, "getSchemaMessage");
66
- var store$1;
67
- // @__NO_SIDE_EFFECTS__
68
- function getSpecificMessage(reference2, lang) {
69
- return store$1?.get(reference2)?.get(lang);
70
- }
71
- __name(getSpecificMessage, "getSpecificMessage");
72
- // @__NO_SIDE_EFFECTS__
73
- function _stringify(input) {
74
- const type = typeof input;
75
- if (type === "string") return `"${input}"`;
76
- if (type === "number" || type === "bigint" || type === "boolean") return `${input}`;
77
- if (type === "object" || type === "function") return (input && Object.getPrototypeOf(input)?.constructor?.name) ?? "null";
78
- return type;
79
- }
80
- __name(_stringify, "_stringify");
81
- function _addIssue(context, label, dataset, config$1, other) {
82
- const input = other && "input" in other ? other.input : dataset.value;
83
- const expected = other?.expected ?? context.expects ?? null;
84
- const received = other?.received ?? /* @__PURE__ */ _stringify(input);
85
- const issue = {
86
- kind: context.kind,
87
- type: context.type,
88
- input,
89
- expected,
90
- received,
91
- message: `Invalid ${label}: ${expected ? `Expected ${expected} but r` : "R"}eceived ${received}`,
92
- requirement: context.requirement,
93
- path: other?.path,
94
- issues: other?.issues,
95
- lang: config$1.lang,
96
- abortEarly: config$1.abortEarly,
97
- abortPipeEarly: config$1.abortPipeEarly
98
- };
99
- const isSchema = context.kind === "schema";
100
- const message$1 = other?.message ?? context.message ?? /* @__PURE__ */ getSpecificMessage(context.reference, issue.lang) ?? (isSchema ? /* @__PURE__ */ getSchemaMessage(issue.lang) : null) ?? config$1.message ?? /* @__PURE__ */ getGlobalMessage(issue.lang);
101
- if (message$1 !== void 0) issue.message = typeof message$1 === "function" ? message$1(issue) : message$1;
102
- if (isSchema) dataset.typed = false;
103
- if (dataset.issues) dataset.issues.push(issue);
104
- else dataset.issues = [issue];
105
- }
106
- __name(_addIssue, "_addIssue");
107
- // @__NO_SIDE_EFFECTS__
108
- function _isSameValueZero(value1, value2) {
109
- return value1 === value2 || Number.isNaN(value1) && Number.isNaN(value2);
110
- }
111
- __name(_isSameValueZero, "_isSameValueZero");
112
- // @__NO_SIDE_EFFECTS__
113
- function _isValidObjectKey(object$1, key) {
114
- return Object.prototype.hasOwnProperty.call(object$1, key) && key !== "__proto__" && key !== "prototype" && key !== "constructor";
115
- }
116
- __name(_isValidObjectKey, "_isValidObjectKey");
117
- // @__NO_SIDE_EFFECTS__
118
- function _joinExpects(values$1, separator) {
119
- const list = [...new Set(values$1)];
120
- if (list.length > 1) return `(${list.join(` ${separator} `)})`;
121
- return list[0] ?? "never";
122
- }
123
- __name(_joinExpects, "_joinExpects");
124
- function _standardSchema(schema) {
125
- schema["~standard"] = {
126
- version: 1,
127
- vendor: "valibot",
128
- validate: /* @__PURE__ */ __name((value$1) => schema["~run"]({ value: value$1 }, /* @__PURE__ */ getGlobalConfig()), "validate")
129
- };
130
- return schema;
131
- }
132
- __name(_standardSchema, "_standardSchema");
133
- // @__NO_SIDE_EFFECTS__
134
- function getDotPath(issue) {
135
- if (issue.path) {
136
- let key = "";
137
- for (const item of issue.path) if (typeof item.key === "string" || typeof item.key === "number") if (key) key += `.${item.key}`;
138
- else key += item.key;
139
- else return null;
140
- return key;
141
- }
142
- return null;
143
- }
144
- __name(getDotPath, "getDotPath");
145
- var ValiError = class extends Error {
146
- static {
147
- __name(this, "ValiError");
148
- }
149
- /**
150
- * Creates a Valibot error with useful information.
151
- *
152
- * @param issues The error issues.
153
- */
154
- constructor(issues) {
155
- super(issues[0].message);
156
- this.name = "ValiError";
157
- this.issues = issues;
158
- }
159
- };
160
- var EMOJI_REGEX = new RegExp("^(?:[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|(?![\\p{Emoji_Modifier_Base}\\u{1F1E6}-\\u{1F1FF}])\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|(?![\\p{Emoji_Modifier_Base}\\u{1F1E6}-\\u{1F1FF}])\\p{Emoji_Presentation}))*)+$", "u");
161
- var ISO_DATE_REGEX = /^\d{4}-(?:0[1-9]|1[0-2])-(?:[12]\d|0[1-9]|3[01])$/u;
162
- var ISO_TIMESTAMP_REGEX = /^\d{4}-(?:0[1-9]|1[0-2])-(?:[12]\d|0[1-9]|3[01])[T ](?:0\d|1\d|2[0-3])(?::[0-5]\d){2}(?:\.\d{1,9})?(?:Z| ?[+-](?:0\d|1\d|2[0-3])(?::?[0-5]\d)?)$/u;
163
- // @__NO_SIDE_EFFECTS__
164
- function check(requirement, message$1) {
165
- return {
166
- kind: "validation",
167
- type: "check",
168
- reference: check,
169
- async: false,
170
- expects: null,
171
- requirement,
172
- message: message$1,
173
- "~run"(dataset, config$1) {
174
- if (dataset.typed && !this.requirement(dataset.value)) _addIssue(this, "input", dataset, config$1);
175
- return dataset;
176
- }
177
- };
178
- }
179
- __name(check, "check");
180
- // @__NO_SIDE_EFFECTS__
181
- function description(description_) {
182
- return {
183
- kind: "metadata",
184
- type: "description",
185
- reference: description,
186
- description: description_
187
- };
188
- }
189
- __name(description, "description");
190
- // @__NO_SIDE_EFFECTS__
191
- function endsWith(requirement, message$1) {
192
- return {
193
- kind: "validation",
194
- type: "ends_with",
195
- reference: endsWith,
196
- async: false,
197
- expects: `"${requirement}"`,
198
- requirement,
199
- message: message$1,
200
- "~run"(dataset, config$1) {
201
- if (dataset.typed && !dataset.value.endsWith(this.requirement)) _addIssue(this, "end", dataset, config$1, { received: `"${dataset.value.slice(-this.requirement.length)}"` });
202
- return dataset;
203
- }
204
- };
205
- }
206
- __name(endsWith, "endsWith");
207
- // @__NO_SIDE_EFFECTS__
208
- function finite(message$1) {
209
- return {
210
- kind: "validation",
211
- type: "finite",
212
- reference: finite,
213
- async: false,
214
- expects: null,
215
- requirement: Number.isFinite,
216
- message: message$1,
217
- "~run"(dataset, config$1) {
218
- if (dataset.typed && !this.requirement(dataset.value)) _addIssue(this, "finite", dataset, config$1);
219
- return dataset;
220
- }
221
- };
222
- }
223
- __name(finite, "finite");
224
- // @__NO_SIDE_EFFECTS__
225
- function integer(message$1) {
226
- return {
227
- kind: "validation",
228
- type: "integer",
229
- reference: integer,
230
- async: false,
231
- expects: null,
232
- requirement: Number.isInteger,
233
- message: message$1,
234
- "~run"(dataset, config$1) {
235
- if (dataset.typed && !this.requirement(dataset.value)) _addIssue(this, "integer", dataset, config$1);
236
- return dataset;
237
- }
238
- };
239
- }
240
- __name(integer, "integer");
241
- // @__NO_SIDE_EFFECTS__
242
- function isoDate(message$1) {
243
- return {
244
- kind: "validation",
245
- type: "iso_date",
246
- reference: isoDate,
247
- async: false,
248
- expects: null,
249
- requirement: ISO_DATE_REGEX,
250
- message: message$1,
251
- "~run"(dataset, config$1) {
252
- if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue(this, "date", dataset, config$1);
253
- return dataset;
254
- }
255
- };
256
- }
257
- __name(isoDate, "isoDate");
258
- // @__NO_SIDE_EFFECTS__
259
- function isoTimestamp(message$1) {
260
- return {
261
- kind: "validation",
262
- type: "iso_timestamp",
263
- reference: isoTimestamp,
264
- async: false,
265
- expects: null,
266
- requirement: ISO_TIMESTAMP_REGEX,
267
- message: message$1,
268
- "~run"(dataset, config$1) {
269
- if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue(this, "timestamp", dataset, config$1);
270
- return dataset;
271
- }
272
- };
273
- }
274
- __name(isoTimestamp, "isoTimestamp");
275
- // @__NO_SIDE_EFFECTS__
276
- function maxEntries(requirement, message$1) {
277
- return {
278
- kind: "validation",
279
- type: "max_entries",
280
- reference: maxEntries,
281
- async: false,
282
- expects: `<=${requirement}`,
283
- requirement,
284
- message: message$1,
285
- "~run"(dataset, config$1) {
286
- if (!dataset.typed) return dataset;
287
- const count2 = Object.keys(dataset.value).length;
288
- if (dataset.typed && count2 > this.requirement) _addIssue(this, "entries", dataset, config$1, { received: `${count2}` });
289
- return dataset;
290
- }
291
- };
292
- }
293
- __name(maxEntries, "maxEntries");
294
- // @__NO_SIDE_EFFECTS__
295
- function maxLength(requirement, message$1) {
296
- return {
297
- kind: "validation",
298
- type: "max_length",
299
- reference: maxLength,
300
- async: false,
301
- expects: `<=${requirement}`,
302
- requirement,
303
- message: message$1,
304
- "~run"(dataset, config$1) {
305
- if (dataset.typed && dataset.value.length > this.requirement) _addIssue(this, "length", dataset, config$1, { received: `${dataset.value.length}` });
306
- return dataset;
307
- }
308
- };
309
- }
310
- __name(maxLength, "maxLength");
311
- // @__NO_SIDE_EFFECTS__
312
- function maxValue(requirement, message$1) {
313
- return {
314
- kind: "validation",
315
- type: "max_value",
316
- reference: maxValue,
317
- async: false,
318
- expects: `<=${requirement instanceof Date ? requirement.toJSON() : /* @__PURE__ */ _stringify(requirement)}`,
319
- requirement,
320
- message: message$1,
321
- "~run"(dataset, config$1) {
322
- if (dataset.typed && !(dataset.value <= this.requirement)) _addIssue(this, "value", dataset, config$1, { received: dataset.value instanceof Date ? dataset.value.toJSON() : /* @__PURE__ */ _stringify(dataset.value) });
323
- return dataset;
324
- }
325
- };
326
- }
327
- __name(maxValue, "maxValue");
328
- // @__NO_SIDE_EFFECTS__
329
- function minLength(requirement, message$1) {
330
- return {
331
- kind: "validation",
332
- type: "min_length",
333
- reference: minLength,
334
- async: false,
335
- expects: `>=${requirement}`,
336
- requirement,
337
- message: message$1,
338
- "~run"(dataset, config$1) {
339
- if (dataset.typed && dataset.value.length < this.requirement) _addIssue(this, "length", dataset, config$1, { received: `${dataset.value.length}` });
340
- return dataset;
341
- }
342
- };
343
- }
344
- __name(minLength, "minLength");
345
- // @__NO_SIDE_EFFECTS__
346
- function minValue(requirement, message$1) {
347
- return {
348
- kind: "validation",
349
- type: "min_value",
350
- reference: minValue,
351
- async: false,
352
- expects: `>=${requirement instanceof Date ? requirement.toJSON() : /* @__PURE__ */ _stringify(requirement)}`,
353
- requirement,
354
- message: message$1,
355
- "~run"(dataset, config$1) {
356
- if (dataset.typed && !(dataset.value >= this.requirement)) _addIssue(this, "value", dataset, config$1, { received: dataset.value instanceof Date ? dataset.value.toJSON() : /* @__PURE__ */ _stringify(dataset.value) });
357
- return dataset;
358
- }
359
- };
360
- }
361
- __name(minValue, "minValue");
362
- // @__NO_SIDE_EFFECTS__
363
- function nonEmpty(message$1) {
364
- return {
365
- kind: "validation",
366
- type: "non_empty",
367
- reference: nonEmpty,
368
- async: false,
369
- expects: "!0",
370
- message: message$1,
371
- "~run"(dataset, config$1) {
372
- if (dataset.typed && dataset.value.length === 0) _addIssue(this, "length", dataset, config$1, { received: "0" });
373
- return dataset;
374
- }
375
- };
376
- }
377
- __name(nonEmpty, "nonEmpty");
378
- // @__NO_SIDE_EFFECTS__
379
- function regex(requirement, message$1) {
380
- return {
381
- kind: "validation",
382
- type: "regex",
383
- reference: regex,
384
- async: false,
385
- expects: `${requirement}`,
386
- requirement,
387
- message: message$1,
388
- "~run"(dataset, config$1) {
389
- if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue(this, "format", dataset, config$1);
390
- return dataset;
391
- }
392
- };
393
- }
394
- __name(regex, "regex");
395
- // @__NO_SIDE_EFFECTS__
396
- function safeInteger(message$1) {
397
- return {
398
- kind: "validation",
399
- type: "safe_integer",
400
- reference: safeInteger,
401
- async: false,
402
- expects: null,
403
- requirement: Number.isSafeInteger,
404
- message: message$1,
405
- "~run"(dataset, config$1) {
406
- if (dataset.typed && !this.requirement(dataset.value)) _addIssue(this, "safe integer", dataset, config$1);
407
- return dataset;
408
- }
409
- };
410
- }
411
- __name(safeInteger, "safeInteger");
412
- // @__NO_SIDE_EFFECTS__
413
- function startsWith(requirement, message$1) {
414
- return {
415
- kind: "validation",
416
- type: "starts_with",
417
- reference: startsWith,
418
- async: false,
419
- expects: `"${requirement}"`,
420
- requirement,
421
- message: message$1,
422
- "~run"(dataset, config$1) {
423
- if (dataset.typed && !dataset.value.startsWith(this.requirement)) _addIssue(this, "start", dataset, config$1, { received: `"${dataset.value.slice(0, this.requirement.length)}"` });
424
- return dataset;
425
- }
426
- };
427
- }
428
- __name(startsWith, "startsWith");
429
- // @__NO_SIDE_EFFECTS__
430
- function transform(operation) {
431
- return {
432
- kind: "transformation",
433
- type: "transform",
434
- reference: transform,
435
- async: false,
436
- operation,
437
- "~run"(dataset) {
438
- dataset.value = this.operation(dataset.value);
439
- return dataset;
440
- }
441
- };
442
- }
443
- __name(transform, "transform");
444
- // @__NO_SIDE_EFFECTS__
445
- function trim() {
446
- return {
447
- kind: "transformation",
448
- type: "trim",
449
- reference: trim,
450
- async: false,
451
- "~run"(dataset) {
452
- dataset.value = dataset.value.trim();
453
- return dataset;
454
- }
455
- };
456
- }
457
- __name(trim, "trim");
458
- // @__NO_SIDE_EFFECTS__
459
- function url(message$1) {
460
- return {
461
- kind: "validation",
462
- type: "url",
463
- reference: url,
464
- async: false,
465
- expects: null,
466
- requirement(input) {
467
- try {
468
- if (URL.canParse) return URL.canParse(input);
469
- new URL(input);
470
- return true;
471
- } catch {
472
- return false;
473
- }
474
- },
475
- message: message$1,
476
- "~run"(dataset, config$1) {
477
- if (dataset.typed && !this.requirement(dataset.value)) _addIssue(this, "URL", dataset, config$1);
478
- return dataset;
479
- }
480
- };
481
- }
482
- __name(url, "url");
483
- var ABORT_EARLY_CONFIG = { abortEarly: true };
484
- // @__NO_SIDE_EFFECTS__
485
- function getFallback(schema, dataset, config$1) {
486
- return typeof schema.fallback === "function" ? schema.fallback(dataset, config$1) : schema.fallback;
487
- }
488
- __name(getFallback, "getFallback");
489
- // @__NO_SIDE_EFFECTS__
490
- function forward(action, path) {
491
- return {
492
- ...action,
493
- "~run"(dataset, config$1) {
494
- const prevIssues = dataset.issues && [...dataset.issues];
495
- dataset = action["~run"](dataset, config$1);
496
- if (dataset.issues) {
497
- for (const issue of dataset.issues) if (!prevIssues?.includes(issue)) {
498
- let pathInput = dataset.value;
499
- for (const key of path) {
500
- const pathValue = pathInput[key];
501
- const pathItem = {
502
- type: "unknown",
503
- origin: "value",
504
- input: pathInput,
505
- key,
506
- value: pathValue
507
- };
508
- if (issue.path) issue.path.push(pathItem);
509
- else issue.path = [pathItem];
510
- if (!pathValue) break;
511
- pathInput = pathValue;
512
- }
513
- }
514
- }
515
- return dataset;
516
- }
517
- };
518
- }
519
- __name(forward, "forward");
520
- // @__NO_SIDE_EFFECTS__
521
- function getDefault(schema, dataset, config$1) {
522
- return typeof schema.default === "function" ? schema.default(dataset, config$1) : schema.default;
523
- }
524
- __name(getDefault, "getDefault");
525
- // @__NO_SIDE_EFFECTS__
526
- function array(item, message$1) {
527
- return _standardSchema({
528
- kind: "schema",
529
- type: "array",
530
- reference: array,
531
- expects: "Array",
532
- async: false,
533
- item,
534
- message: message$1,
535
- "~run"(dataset, config$1) {
536
- const input = dataset.value;
537
- if (Array.isArray(input)) {
538
- dataset.typed = true;
539
- dataset.value = [];
540
- for (let key = 0; key < input.length; key++) {
541
- const value$1 = input[key];
542
- const itemDataset = this.item["~run"]({ value: value$1 }, config$1);
543
- if (itemDataset.issues) {
544
- const pathItem = {
545
- type: "array",
546
- origin: "value",
547
- input,
548
- key,
549
- value: value$1
550
- };
551
- for (const issue of itemDataset.issues) {
552
- if (issue.path) issue.path.unshift(pathItem);
553
- else issue.path = [pathItem];
554
- dataset.issues?.push(issue);
555
- }
556
- if (!dataset.issues) dataset.issues = itemDataset.issues;
557
- if (config$1.abortEarly) {
558
- dataset.typed = false;
559
- break;
560
- }
561
- }
562
- if (!itemDataset.typed) dataset.typed = false;
563
- dataset.value.push(itemDataset.value);
564
- }
565
- } else _addIssue(this, "type", dataset, config$1);
566
- return dataset;
567
- }
568
- });
569
- }
570
- __name(array, "array");
571
- // @__NO_SIDE_EFFECTS__
572
- function boolean(message$1) {
573
- return _standardSchema({
574
- kind: "schema",
575
- type: "boolean",
576
- reference: boolean,
577
- expects: "boolean",
578
- async: false,
579
- message: message$1,
580
- "~run"(dataset, config$1) {
581
- if (typeof dataset.value === "boolean") dataset.typed = true;
582
- else _addIssue(this, "type", dataset, config$1);
583
- return dataset;
584
- }
585
- });
586
- }
587
- __name(boolean, "boolean");
588
- // @__NO_SIDE_EFFECTS__
589
- function custom(check$1, message$1) {
590
- return _standardSchema({
591
- kind: "schema",
592
- type: "custom",
593
- reference: custom,
594
- expects: "unknown",
595
- async: false,
596
- check: check$1,
597
- message: message$1,
598
- "~run"(dataset, config$1) {
599
- if (this.check(dataset.value)) dataset.typed = true;
600
- else _addIssue(this, "type", dataset, config$1);
601
- return dataset;
602
- }
603
- });
604
- }
605
- __name(custom, "custom");
606
- // @__NO_SIDE_EFFECTS__
607
- function exactOptional(wrapped, default_) {
608
- return _standardSchema({
609
- kind: "schema",
610
- type: "exact_optional",
611
- reference: exactOptional,
612
- expects: wrapped.expects,
613
- async: false,
614
- wrapped,
615
- default: default_,
616
- "~run"(dataset, config$1) {
617
- return this.wrapped["~run"](dataset, config$1);
618
- }
619
- });
620
- }
621
- __name(exactOptional, "exactOptional");
622
- // @__NO_SIDE_EFFECTS__
623
- function function_(message$1) {
624
- return _standardSchema({
625
- kind: "schema",
626
- type: "function",
627
- reference: function_,
628
- expects: "Function",
629
- async: false,
630
- message: message$1,
631
- "~run"(dataset, config$1) {
632
- if (typeof dataset.value === "function") dataset.typed = true;
633
- else _addIssue(this, "type", dataset, config$1);
634
- return dataset;
635
- }
636
- });
637
- }
638
- __name(function_, "function_");
639
- // @__NO_SIDE_EFFECTS__
640
- function lazy(getter) {
641
- return _standardSchema({
642
- kind: "schema",
643
- type: "lazy",
644
- reference: lazy,
645
- expects: "unknown",
646
- async: false,
647
- getter,
648
- "~run"(dataset, config$1) {
649
- return this.getter(dataset.value)["~run"](dataset, config$1);
650
- }
651
- });
652
- }
653
- __name(lazy, "lazy");
654
- // @__NO_SIDE_EFFECTS__
655
- function literal(literal_, message$1) {
656
- return _standardSchema({
657
- kind: "schema",
658
- type: "literal",
659
- reference: literal,
660
- expects: /* @__PURE__ */ _stringify(literal_),
661
- async: false,
662
- literal: literal_,
663
- message: message$1,
664
- "~run"(dataset, config$1) {
665
- if (/* @__PURE__ */ _isSameValueZero(dataset.value, this.literal)) dataset.typed = true;
666
- else _addIssue(this, "type", dataset, config$1);
667
- return dataset;
668
- }
669
- });
670
- }
671
- __name(literal, "literal");
672
- // @__NO_SIDE_EFFECTS__
673
- function looseObject(entries$1, message$1) {
674
- return _standardSchema({
675
- kind: "schema",
676
- type: "loose_object",
677
- reference: looseObject,
678
- expects: "Object",
679
- async: false,
680
- entries: entries$1,
681
- message: message$1,
682
- "~run"(dataset, config$1) {
683
- const input = dataset.value;
684
- if (input && typeof input === "object") {
685
- dataset.typed = true;
686
- dataset.value = {};
687
- for (const key in this.entries) {
688
- const valueSchema = this.entries[key];
689
- if (key in input || (valueSchema.type === "exact_optional" || valueSchema.type === "optional" || valueSchema.type === "nullish") && valueSchema.default !== void 0) {
690
- const value$1 = key in input ? input[key] : /* @__PURE__ */ getDefault(valueSchema);
691
- const valueDataset = valueSchema["~run"]({ value: value$1 }, config$1);
692
- if (valueDataset.issues) {
693
- const pathItem = {
694
- type: "object",
695
- origin: "value",
696
- input,
697
- key,
698
- value: value$1
699
- };
700
- for (const issue of valueDataset.issues) {
701
- if (issue.path) issue.path.unshift(pathItem);
702
- else issue.path = [pathItem];
703
- dataset.issues?.push(issue);
704
- }
705
- if (!dataset.issues) dataset.issues = valueDataset.issues;
706
- if (config$1.abortEarly) {
707
- dataset.typed = false;
708
- break;
709
- }
710
- }
711
- if (!valueDataset.typed) dataset.typed = false;
712
- dataset.value[key] = valueDataset.value;
713
- } else if (valueSchema.fallback !== void 0) dataset.value[key] = /* @__PURE__ */ getFallback(valueSchema);
714
- else if (valueSchema.type !== "exact_optional" && valueSchema.type !== "optional" && valueSchema.type !== "nullish") {
715
- _addIssue(this, "key", dataset, config$1, {
716
- input: void 0,
717
- expected: `"${key}"`,
718
- path: [{
719
- type: "object",
720
- origin: "key",
721
- input,
722
- key,
723
- value: input[key]
724
- }]
725
- });
726
- if (config$1.abortEarly) break;
727
- }
728
- }
729
- if (!dataset.issues || !config$1.abortEarly) {
730
- for (const key in input) if (/* @__PURE__ */ _isValidObjectKey(input, key) && !Object.prototype.hasOwnProperty.call(this.entries, key)) dataset.value[key] = input[key];
731
- }
732
- } else _addIssue(this, "type", dataset, config$1);
733
- return dataset;
734
- }
735
- });
736
- }
737
- __name(looseObject, "looseObject");
738
- // @__NO_SIDE_EFFECTS__
739
- function null_(message$1) {
740
- return _standardSchema({
741
- kind: "schema",
742
- type: "null",
743
- reference: null_,
744
- expects: "null",
745
- async: false,
746
- message: message$1,
747
- "~run"(dataset, config$1) {
748
- if (dataset.value === null) dataset.typed = true;
749
- else _addIssue(this, "type", dataset, config$1);
750
- return dataset;
751
- }
752
- });
753
- }
754
- __name(null_, "null_");
755
- // @__NO_SIDE_EFFECTS__
756
- function nullable(wrapped, default_) {
757
- return _standardSchema({
758
- kind: "schema",
759
- type: "nullable",
760
- reference: nullable,
761
- expects: `(${wrapped.expects} | null)`,
762
- async: false,
763
- wrapped,
764
- default: default_,
765
- "~run"(dataset, config$1) {
766
- if (dataset.value === null) {
767
- if (this.default !== void 0) dataset.value = /* @__PURE__ */ getDefault(this, dataset, config$1);
768
- if (dataset.value === null) {
769
- dataset.typed = true;
770
- return dataset;
771
- }
772
- }
773
- return this.wrapped["~run"](dataset, config$1);
774
- }
775
- });
776
- }
777
- __name(nullable, "nullable");
778
- // @__NO_SIDE_EFFECTS__
779
- function nullish(wrapped, default_) {
780
- return _standardSchema({
781
- kind: "schema",
782
- type: "nullish",
783
- reference: nullish,
784
- expects: `(${wrapped.expects} | null | undefined)`,
785
- async: false,
786
- wrapped,
787
- default: default_,
788
- "~run"(dataset, config$1) {
789
- if (dataset.value === null || dataset.value === void 0) {
790
- if (this.default !== void 0) dataset.value = /* @__PURE__ */ getDefault(this, dataset, config$1);
791
- if (dataset.value === null || dataset.value === void 0) {
792
- dataset.typed = true;
793
- return dataset;
794
- }
795
- }
796
- return this.wrapped["~run"](dataset, config$1);
797
- }
798
- });
799
- }
800
- __name(nullish, "nullish");
801
- // @__NO_SIDE_EFFECTS__
802
- function number(message$1) {
803
- return _standardSchema({
804
- kind: "schema",
805
- type: "number",
806
- reference: number,
807
- expects: "number",
808
- async: false,
809
- message: message$1,
810
- "~run"(dataset, config$1) {
811
- if (typeof dataset.value === "number" && !isNaN(dataset.value)) dataset.typed = true;
812
- else _addIssue(this, "type", dataset, config$1);
813
- return dataset;
814
- }
815
- });
816
- }
817
- __name(number, "number");
818
- // @__NO_SIDE_EFFECTS__
819
- function object(entries$1, message$1) {
820
- return _standardSchema({
821
- kind: "schema",
822
- type: "object",
823
- reference: object,
824
- expects: "Object",
825
- async: false,
826
- entries: entries$1,
827
- message: message$1,
828
- "~run"(dataset, config$1) {
829
- const input = dataset.value;
830
- if (input && typeof input === "object") {
831
- dataset.typed = true;
832
- dataset.value = {};
833
- for (const key in this.entries) {
834
- const valueSchema = this.entries[key];
835
- if (key in input || (valueSchema.type === "exact_optional" || valueSchema.type === "optional" || valueSchema.type === "nullish") && valueSchema.default !== void 0) {
836
- const value$1 = key in input ? input[key] : /* @__PURE__ */ getDefault(valueSchema);
837
- const valueDataset = valueSchema["~run"]({ value: value$1 }, config$1);
838
- if (valueDataset.issues) {
839
- const pathItem = {
840
- type: "object",
841
- origin: "value",
842
- input,
843
- key,
844
- value: value$1
845
- };
846
- for (const issue of valueDataset.issues) {
847
- if (issue.path) issue.path.unshift(pathItem);
848
- else issue.path = [pathItem];
849
- dataset.issues?.push(issue);
850
- }
851
- if (!dataset.issues) dataset.issues = valueDataset.issues;
852
- if (config$1.abortEarly) {
853
- dataset.typed = false;
854
- break;
855
- }
856
- }
857
- if (!valueDataset.typed) dataset.typed = false;
858
- dataset.value[key] = valueDataset.value;
859
- } else if (valueSchema.fallback !== void 0) dataset.value[key] = /* @__PURE__ */ getFallback(valueSchema);
860
- else if (valueSchema.type !== "exact_optional" && valueSchema.type !== "optional" && valueSchema.type !== "nullish") {
861
- _addIssue(this, "key", dataset, config$1, {
862
- input: void 0,
863
- expected: `"${key}"`,
864
- path: [{
865
- type: "object",
866
- origin: "key",
867
- input,
868
- key,
869
- value: input[key]
870
- }]
871
- });
872
- if (config$1.abortEarly) break;
873
- }
874
- }
875
- } else _addIssue(this, "type", dataset, config$1);
876
- return dataset;
877
- }
878
- });
879
- }
880
- __name(object, "object");
881
- // @__NO_SIDE_EFFECTS__
882
- function objectWithRest(entries$1, rest, message$1) {
883
- return _standardSchema({
884
- kind: "schema",
885
- type: "object_with_rest",
886
- reference: objectWithRest,
887
- expects: "Object",
888
- async: false,
889
- entries: entries$1,
890
- rest,
891
- message: message$1,
892
- "~run"(dataset, config$1) {
893
- const input = dataset.value;
894
- if (input && typeof input === "object") {
895
- dataset.typed = true;
896
- dataset.value = {};
897
- for (const key in this.entries) {
898
- const valueSchema = this.entries[key];
899
- if (key in input || (valueSchema.type === "exact_optional" || valueSchema.type === "optional" || valueSchema.type === "nullish") && valueSchema.default !== void 0) {
900
- const value$1 = key in input ? input[key] : /* @__PURE__ */ getDefault(valueSchema);
901
- const valueDataset = valueSchema["~run"]({ value: value$1 }, config$1);
902
- if (valueDataset.issues) {
903
- const pathItem = {
904
- type: "object",
905
- origin: "value",
906
- input,
907
- key,
908
- value: value$1
909
- };
910
- for (const issue of valueDataset.issues) {
911
- if (issue.path) issue.path.unshift(pathItem);
912
- else issue.path = [pathItem];
913
- dataset.issues?.push(issue);
914
- }
915
- if (!dataset.issues) dataset.issues = valueDataset.issues;
916
- if (config$1.abortEarly) {
917
- dataset.typed = false;
918
- break;
919
- }
920
- }
921
- if (!valueDataset.typed) dataset.typed = false;
922
- dataset.value[key] = valueDataset.value;
923
- } else if (valueSchema.fallback !== void 0) dataset.value[key] = /* @__PURE__ */ getFallback(valueSchema);
924
- else if (valueSchema.type !== "exact_optional" && valueSchema.type !== "optional" && valueSchema.type !== "nullish") {
925
- _addIssue(this, "key", dataset, config$1, {
926
- input: void 0,
927
- expected: `"${key}"`,
928
- path: [{
929
- type: "object",
930
- origin: "key",
931
- input,
932
- key,
933
- value: input[key]
934
- }]
935
- });
936
- if (config$1.abortEarly) break;
937
- }
938
- }
939
- if (!dataset.issues || !config$1.abortEarly) {
940
- for (const key in input) if (/* @__PURE__ */ _isValidObjectKey(input, key) && !Object.prototype.hasOwnProperty.call(this.entries, key)) {
941
- const valueDataset = this.rest["~run"]({ value: input[key] }, config$1);
942
- if (valueDataset.issues) {
943
- const pathItem = {
944
- type: "object",
945
- origin: "value",
946
- input,
947
- key,
948
- value: input[key]
949
- };
950
- for (const issue of valueDataset.issues) {
951
- if (issue.path) issue.path.unshift(pathItem);
952
- else issue.path = [pathItem];
953
- dataset.issues?.push(issue);
954
- }
955
- if (!dataset.issues) dataset.issues = valueDataset.issues;
956
- if (config$1.abortEarly) {
957
- dataset.typed = false;
958
- break;
959
- }
960
- }
961
- if (!valueDataset.typed) dataset.typed = false;
962
- dataset.value[key] = valueDataset.value;
963
- }
964
- }
965
- } else _addIssue(this, "type", dataset, config$1);
966
- return dataset;
967
- }
968
- });
969
- }
970
- __name(objectWithRest, "objectWithRest");
971
- // @__NO_SIDE_EFFECTS__
972
- function optional(wrapped, default_) {
973
- return _standardSchema({
974
- kind: "schema",
975
- type: "optional",
976
- reference: optional,
977
- expects: `(${wrapped.expects} | undefined)`,
978
- async: false,
979
- wrapped,
980
- default: default_,
981
- "~run"(dataset, config$1) {
982
- if (dataset.value === void 0) {
983
- if (this.default !== void 0) dataset.value = /* @__PURE__ */ getDefault(this, dataset, config$1);
984
- if (dataset.value === void 0) {
985
- dataset.typed = true;
986
- return dataset;
987
- }
988
- }
989
- return this.wrapped["~run"](dataset, config$1);
990
- }
991
- });
992
- }
993
- __name(optional, "optional");
994
- // @__NO_SIDE_EFFECTS__
995
- function picklist(options, message$1) {
996
- return _standardSchema({
997
- kind: "schema",
998
- type: "picklist",
999
- reference: picklist,
1000
- expects: /* @__PURE__ */ _joinExpects(options.map(_stringify), "|"),
1001
- async: false,
1002
- options,
1003
- message: message$1,
1004
- "~run"(dataset, config$1) {
1005
- if (this.options.includes(dataset.value)) dataset.typed = true;
1006
- else _addIssue(this, "type", dataset, config$1);
1007
- return dataset;
1008
- }
1009
- });
1010
- }
1011
- __name(picklist, "picklist");
1012
- // @__NO_SIDE_EFFECTS__
1013
- function record(key, value$1, message$1) {
1014
- return _standardSchema({
1015
- kind: "schema",
1016
- type: "record",
1017
- reference: record,
1018
- expects: "Object",
1019
- async: false,
1020
- key,
1021
- value: value$1,
1022
- message: message$1,
1023
- "~run"(dataset, config$1) {
1024
- const input = dataset.value;
1025
- if (input && typeof input === "object") {
1026
- dataset.typed = true;
1027
- dataset.value = {};
1028
- for (const entryKey in input) if (/* @__PURE__ */ _isValidObjectKey(input, entryKey)) {
1029
- const entryValue = input[entryKey];
1030
- const keyDataset = this.key["~run"]({ value: entryKey }, config$1);
1031
- if (keyDataset.issues) {
1032
- const pathItem = {
1033
- type: "object",
1034
- origin: "key",
1035
- input,
1036
- key: entryKey,
1037
- value: entryValue
1038
- };
1039
- for (const issue of keyDataset.issues) {
1040
- issue.path = [pathItem];
1041
- dataset.issues?.push(issue);
1042
- }
1043
- if (!dataset.issues) dataset.issues = keyDataset.issues;
1044
- if (config$1.abortEarly) {
1045
- dataset.typed = false;
1046
- break;
1047
- }
1048
- }
1049
- const valueDataset = this.value["~run"]({ value: entryValue }, config$1);
1050
- if (valueDataset.issues) {
1051
- const pathItem = {
1052
- type: "object",
1053
- origin: "value",
1054
- input,
1055
- key: entryKey,
1056
- value: entryValue
1057
- };
1058
- for (const issue of valueDataset.issues) {
1059
- if (issue.path) issue.path.unshift(pathItem);
1060
- else issue.path = [pathItem];
1061
- dataset.issues?.push(issue);
1062
- }
1063
- if (!dataset.issues) dataset.issues = valueDataset.issues;
1064
- if (config$1.abortEarly) {
1065
- dataset.typed = false;
1066
- break;
1067
- }
1068
- }
1069
- if (!keyDataset.typed || !valueDataset.typed) dataset.typed = false;
1070
- if (keyDataset.typed) dataset.value[keyDataset.value] = valueDataset.value;
1071
- }
1072
- } else _addIssue(this, "type", dataset, config$1);
1073
- return dataset;
1074
- }
1075
- });
1076
- }
1077
- __name(record, "record");
1078
- // @__NO_SIDE_EFFECTS__
1079
- function strictObject(entries$1, message$1) {
1080
- return _standardSchema({
1081
- kind: "schema",
1082
- type: "strict_object",
1083
- reference: strictObject,
1084
- expects: "Object",
1085
- async: false,
1086
- entries: entries$1,
1087
- message: message$1,
1088
- "~run"(dataset, config$1) {
1089
- const input = dataset.value;
1090
- if (input && typeof input === "object") {
1091
- dataset.typed = true;
1092
- dataset.value = {};
1093
- for (const key in this.entries) {
1094
- const valueSchema = this.entries[key];
1095
- if (key in input || (valueSchema.type === "exact_optional" || valueSchema.type === "optional" || valueSchema.type === "nullish") && valueSchema.default !== void 0) {
1096
- const value$1 = key in input ? input[key] : /* @__PURE__ */ getDefault(valueSchema);
1097
- const valueDataset = valueSchema["~run"]({ value: value$1 }, config$1);
1098
- if (valueDataset.issues) {
1099
- const pathItem = {
1100
- type: "object",
1101
- origin: "value",
1102
- input,
1103
- key,
1104
- value: value$1
1105
- };
1106
- for (const issue of valueDataset.issues) {
1107
- if (issue.path) issue.path.unshift(pathItem);
1108
- else issue.path = [pathItem];
1109
- dataset.issues?.push(issue);
1110
- }
1111
- if (!dataset.issues) dataset.issues = valueDataset.issues;
1112
- if (config$1.abortEarly) {
1113
- dataset.typed = false;
1114
- break;
1115
- }
1116
- }
1117
- if (!valueDataset.typed) dataset.typed = false;
1118
- dataset.value[key] = valueDataset.value;
1119
- } else if (valueSchema.fallback !== void 0) dataset.value[key] = /* @__PURE__ */ getFallback(valueSchema);
1120
- else if (valueSchema.type !== "exact_optional" && valueSchema.type !== "optional" && valueSchema.type !== "nullish") {
1121
- _addIssue(this, "key", dataset, config$1, {
1122
- input: void 0,
1123
- expected: `"${key}"`,
1124
- path: [{
1125
- type: "object",
1126
- origin: "key",
1127
- input,
1128
- key,
1129
- value: input[key]
1130
- }]
1131
- });
1132
- if (config$1.abortEarly) break;
1133
- }
1134
- }
1135
- if (!dataset.issues || !config$1.abortEarly) {
1136
- for (const key in input) if (!Object.prototype.hasOwnProperty.call(this.entries, key)) {
1137
- _addIssue(this, "key", dataset, config$1, {
1138
- input: key,
1139
- expected: "never",
1140
- path: [{
1141
- type: "object",
1142
- origin: "key",
1143
- input,
1144
- key,
1145
- value: input[key]
1146
- }]
1147
- });
1148
- break;
1149
- }
1150
- }
1151
- } else _addIssue(this, "type", dataset, config$1);
1152
- return dataset;
1153
- }
1154
- });
1155
- }
1156
- __name(strictObject, "strictObject");
1157
- // @__NO_SIDE_EFFECTS__
1158
- function string(message$1) {
1159
- return _standardSchema({
1160
- kind: "schema",
1161
- type: "string",
1162
- reference: string,
1163
- expects: "string",
1164
- async: false,
1165
- message: message$1,
1166
- "~run"(dataset, config$1) {
1167
- if (typeof dataset.value === "string") dataset.typed = true;
1168
- else _addIssue(this, "type", dataset, config$1);
1169
- return dataset;
1170
- }
1171
- });
1172
- }
1173
- __name(string, "string");
1174
- // @__NO_SIDE_EFFECTS__
1175
- function _subIssues(datasets) {
1176
- let issues;
1177
- if (datasets) for (const dataset of datasets) if (issues) for (const issue of dataset.issues) issues.push(issue);
1178
- else issues = dataset.issues;
1179
- return issues;
1180
- }
1181
- __name(_subIssues, "_subIssues");
1182
- // @__NO_SIDE_EFFECTS__
1183
- function union(options, message$1) {
1184
- return _standardSchema({
1185
- kind: "schema",
1186
- type: "union",
1187
- reference: union,
1188
- expects: /* @__PURE__ */ _joinExpects(options.map((option) => option.expects), "|"),
1189
- async: false,
1190
- options,
1191
- message: message$1,
1192
- "~run"(dataset, config$1) {
1193
- let validDataset;
1194
- let typedDatasets;
1195
- let untypedDatasets;
1196
- for (const schema of this.options) {
1197
- const optionDataset = schema["~run"]({ value: dataset.value }, config$1);
1198
- if (optionDataset.typed) if (optionDataset.issues) if (typedDatasets) typedDatasets.push(optionDataset);
1199
- else typedDatasets = [optionDataset];
1200
- else {
1201
- validDataset = optionDataset;
1202
- break;
1203
- }
1204
- else if (untypedDatasets) untypedDatasets.push(optionDataset);
1205
- else untypedDatasets = [optionDataset];
1206
- }
1207
- if (validDataset) return validDataset;
1208
- if (typedDatasets) {
1209
- if (typedDatasets.length === 1) return typedDatasets[0];
1210
- _addIssue(this, "type", dataset, config$1, { issues: /* @__PURE__ */ _subIssues(typedDatasets) });
1211
- dataset.typed = true;
1212
- } else if (untypedDatasets?.length === 1) return untypedDatasets[0];
1213
- else _addIssue(this, "type", dataset, config$1, { issues: /* @__PURE__ */ _subIssues(untypedDatasets) });
1214
- return dataset;
1215
- }
1216
- });
1217
- }
1218
- __name(union, "union");
1219
- // @__NO_SIDE_EFFECTS__
1220
- function unknown() {
1221
- return _standardSchema({
1222
- kind: "schema",
1223
- type: "unknown",
1224
- reference: unknown,
1225
- expects: "unknown",
1226
- async: false,
1227
- "~run"(dataset) {
1228
- dataset.typed = true;
1229
- return dataset;
1230
- }
1231
- });
1232
- }
1233
- __name(unknown, "unknown");
1234
- // @__NO_SIDE_EFFECTS__
1235
- function variant(key, options, message$1) {
1236
- return _standardSchema({
1237
- kind: "schema",
1238
- type: "variant",
1239
- reference: variant,
1240
- expects: "Object",
1241
- async: false,
1242
- key,
1243
- options,
1244
- message: message$1,
1245
- "~run"(dataset, config$1) {
1246
- const input = dataset.value;
1247
- if (input && typeof input === "object") {
1248
- let outputDataset;
1249
- let maxDiscriminatorPriority = 0;
1250
- let invalidDiscriminatorKey = this.key;
1251
- let expectedDiscriminators = [];
1252
- const parseOptions = /* @__PURE__ */ __name((variant$1, allKeys) => {
1253
- for (const schema of variant$1.options) {
1254
- if (schema.type === "variant") parseOptions(schema, new Set(allKeys).add(schema.key));
1255
- else {
1256
- let keysAreValid = true;
1257
- let currentPriority = 0;
1258
- for (const currentKey of allKeys) {
1259
- const discriminatorSchema = schema.entries[currentKey];
1260
- if (currentKey in input ? discriminatorSchema["~run"]({
1261
- typed: false,
1262
- value: input[currentKey]
1263
- }, ABORT_EARLY_CONFIG).issues : discriminatorSchema.type !== "exact_optional" && discriminatorSchema.type !== "optional" && discriminatorSchema.type !== "nullish") {
1264
- keysAreValid = false;
1265
- if (invalidDiscriminatorKey !== currentKey && (maxDiscriminatorPriority < currentPriority || maxDiscriminatorPriority === currentPriority && currentKey in input && !(invalidDiscriminatorKey in input))) {
1266
- maxDiscriminatorPriority = currentPriority;
1267
- invalidDiscriminatorKey = currentKey;
1268
- expectedDiscriminators = [];
1269
- }
1270
- if (invalidDiscriminatorKey === currentKey) expectedDiscriminators.push(schema.entries[currentKey].expects);
1271
- break;
1272
- }
1273
- currentPriority++;
1274
- }
1275
- if (keysAreValid) {
1276
- const optionDataset = schema["~run"]({ value: input }, config$1);
1277
- if (!outputDataset || !outputDataset.typed && optionDataset.typed) outputDataset = optionDataset;
1278
- }
1279
- }
1280
- if (outputDataset && !outputDataset.issues) break;
1281
- }
1282
- }, "parseOptions");
1283
- parseOptions(this, /* @__PURE__ */ new Set([this.key]));
1284
- if (outputDataset) return outputDataset;
1285
- _addIssue(this, "type", dataset, config$1, {
1286
- input: input[invalidDiscriminatorKey],
1287
- expected: /* @__PURE__ */ _joinExpects(expectedDiscriminators, "|"),
1288
- path: [{
1289
- type: "object",
1290
- origin: "value",
1291
- input,
1292
- key: invalidDiscriminatorKey,
1293
- value: input[invalidDiscriminatorKey]
1294
- }]
1295
- });
1296
- } else _addIssue(this, "type", dataset, config$1);
1297
- return dataset;
1298
- }
1299
- });
1300
- }
1301
- __name(variant, "variant");
1302
- // @__NO_SIDE_EFFECTS__
1303
- function omit(schema, keys) {
1304
- const entries$1 = { ...schema.entries };
1305
- for (const key of keys) delete entries$1[key];
1306
- return _standardSchema({
1307
- ...schema,
1308
- entries: entries$1
1309
- });
1310
- }
1311
- __name(omit, "omit");
1312
- function parse(schema, input, config$1) {
1313
- const dataset = schema["~run"]({ value: input }, /* @__PURE__ */ getGlobalConfig(config$1));
1314
- if (dataset.issues) throw new ValiError(dataset.issues);
1315
- return dataset.value;
1316
- }
1317
- __name(parse, "parse");
1318
- // @__NO_SIDE_EFFECTS__
1319
- function partial(schema, keys) {
1320
- const entries$1 = {};
1321
- for (const key in schema.entries) entries$1[key] = !keys || keys.includes(key) ? /* @__PURE__ */ optional(schema.entries[key]) : schema.entries[key];
1322
- return _standardSchema({
1323
- ...schema,
1324
- entries: entries$1
1325
- });
1326
- }
1327
- __name(partial, "partial");
1328
- // @__NO_SIDE_EFFECTS__
1329
- function pick(schema, keys) {
1330
- const entries$1 = {};
1331
- for (const key of keys) entries$1[key] = schema.entries[key];
1332
- return _standardSchema({
1333
- ...schema,
1334
- entries: entries$1
1335
- });
1336
- }
1337
- __name(pick, "pick");
1338
- // @__NO_SIDE_EFFECTS__
1339
- function pipe(...pipe$1) {
1340
- return _standardSchema({
1341
- ...pipe$1[0],
1342
- pipe: pipe$1,
1343
- "~run"(dataset, config$1) {
1344
- for (const item of pipe$1) if (item.kind !== "metadata") {
1345
- if (dataset.issues && (item.kind === "schema" || item.kind === "transformation")) {
1346
- dataset.typed = false;
1347
- break;
1348
- }
1349
- if (!dataset.issues || !config$1.abortEarly && !config$1.abortPipeEarly) dataset = item["~run"](dataset, config$1);
1350
- }
1351
- return dataset;
1352
- }
1353
- });
1354
- }
1355
- __name(pipe, "pipe");
1356
- // @__NO_SIDE_EFFECTS__
1357
- function safeParse(schema, input, config$1) {
1358
- const dataset = schema["~run"]({ value: input }, /* @__PURE__ */ getGlobalConfig(config$1));
1359
- return {
1360
- typed: dataset.typed,
1361
- success: !dataset.issues,
1362
- output: dataset.value,
1363
- issues: dataset.issues
1364
- };
1365
- }
1366
- __name(safeParse, "safeParse");
1367
- // @__NO_SIDE_EFFECTS__
1368
- function summarize(issues) {
1369
- let summary = "";
1370
- for (const issue of issues) {
1371
- if (summary) summary += "\n";
1372
- summary += `\xD7 ${issue.message}`;
1373
- const dotPath = /* @__PURE__ */ getDotPath(issue);
1374
- if (dotPath) summary += `
1375
- \u2192 at ${dotPath}`;
1376
- }
1377
- return summary;
1378
- }
1379
- __name(summarize, "summarize");
1380
- // @__NO_SIDE_EFFECTS__
1381
- function unwrap(schema) {
1382
- return schema.wrapped;
1383
- }
1384
- __name(unwrap, "unwrap");
1385
-
1386
- // 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/standards/effects.js
1387
- var EFFECT_LEVELS = ["none", "read", "write"];
1388
- var effectsSchema = strictObject({
1389
- remote: picklist(EFFECT_LEVELS),
1390
- local: picklist(EFFECT_LEVELS)
1391
- });
1392
- var writes = /* @__PURE__ */ __name((effects) => effects === void 0 || effects.remote === "write" || effects.local === "write", "writes");
1393
-
1394
- // node_modules/.pnpm/@valibot+to-json-schema@1.8.0_valibot@1.5.0_typescript@7.0.2_/node_modules/@valibot/to-json-schema/dist/index.mjs
1395
- function addError(errors, message) {
1396
- if (errors) {
1397
- errors.push(message);
1398
- return errors;
1399
- }
1400
- return [message];
1401
- }
1402
- __name(addError, "addError");
1403
- var ESCAPE_REGEX = /[.*+?^${}()|[\]\\]/g;
1404
- function escapeRegExp(string2) {
1405
- return string2.replace(ESCAPE_REGEX, "\\$&");
1406
- }
1407
- __name(escapeRegExp, "escapeRegExp");
1408
- function handleError(message, config) {
1409
- switch (config?.errorMode) {
1410
- case "ignore":
1411
- break;
1412
- case "warn":
1413
- console.warn(message);
1414
- break;
1415
- default:
1416
- throw new Error(message);
1417
- }
1418
- }
1419
- __name(handleError, "handleError");
1420
- function isJsonConstValue(value) {
1421
- return typeof value === "boolean" || typeof value === "number" && Number.isFinite(value) || typeof value === "string";
1422
- }
1423
- __name(isJsonConstValue, "isJsonConstValue");
1424
- function isJsonEnumValues(values) {
1425
- return values.every(isJsonConstValue);
1426
- }
1427
- __name(isJsonEnumValues, "isJsonEnumValues");
1428
- var ReferenceMap = class extends Map {
1429
- static {
1430
- __name(this, "ReferenceMap");
1431
- }
1432
- /**
1433
- * Creates an empty schema reference map.
1434
- */
1435
- constructor() {
1436
- super();
1437
- this.count = 0;
1438
- this.usedIds = /* @__PURE__ */ new Set();
1439
- }
1440
- /**
1441
- * Adds a schema reference and reserves its ID.
1442
- *
1443
- * @param schema The Valibot schema.
1444
- * @param referenceId The reference ID.
1445
- *
1446
- * @returns The reference map.
1447
- */
1448
- set(schema, referenceId) {
1449
- this.usedIds.add(referenceId);
1450
- return super.set(schema, referenceId);
1451
- }
1452
- /**
1453
- * Creates a reference ID that is not yet used.
1454
- *
1455
- * @param definitions The JSON Schema definitions.
1456
- *
1457
- * @returns The unused reference ID.
1458
- */
1459
- createId(definitions) {
1460
- while (this.usedIds.has(`${this.count}`) || `${this.count}` in definitions) this.count++;
1461
- return `${this.count++}`;
1462
- }
1463
- };
1464
- function getLowerBound(current, value) {
1465
- if (typeof current !== "number" || !Number.isFinite(current) || value > current) return value;
1466
- return current;
1467
- }
1468
- __name(getLowerBound, "getLowerBound");
1469
- function getUpperBound(current, value) {
1470
- if (typeof current !== "number" || !Number.isFinite(current) || value < current) return value;
1471
- return current;
1472
- }
1473
- __name(getUpperBound, "getUpperBound");
1474
- // @__NO_SIDE_EFFECTS__
1475
- function getNotRestriction(current, value) {
1476
- return current !== void 0 ? { anyOf: [current, value] } : value;
1477
- }
1478
- __name(getNotRestriction, "getNotRestriction");
1479
- function intersectEnum(jsonSchema, values) {
1480
- let enumValues = jsonSchema.enum ?? values;
1481
- if (jsonSchema.enum) {
1482
- const valueSet = new Set(values);
1483
- enumValues = enumValues.filter((value) => valueSet.has(value));
1484
- }
1485
- if (enumValues.length) jsonSchema.enum = [...new Set(enumValues)];
1486
- else {
1487
- delete jsonSchema.enum;
1488
- jsonSchema.not = /* @__PURE__ */ getNotRestriction(jsonSchema.not, {});
1489
- }
1490
- }
1491
- __name(intersectEnum, "intersectEnum");
1492
- function convertAction(jsonSchema, valibotAction, config) {
1493
- if (config?.ignoreActions?.includes(valibotAction.type)) return jsonSchema;
1494
- let errors;
1495
- switch (valibotAction.type) {
1496
- case "base64":
1497
- jsonSchema.contentEncoding = "base64";
1498
- break;
1499
- case "bic":
1500
- case "cuid2":
1501
- case "decimal":
1502
- case "digits":
1503
- case "domain":
1504
- case "emoji":
1505
- case "hash":
1506
- case "hexadecimal":
1507
- case "hex_color":
1508
- case "isrc":
1509
- case "iso_time_second":
1510
- case "iso_week":
1511
- case "ksuid":
1512
- case "mac":
1513
- case "mac48":
1514
- case "mac64":
1515
- case "nanoid":
1516
- case "octal":
1517
- case "slug":
1518
- case "ulid":
1519
- if (jsonSchema.pattern) errors = addError(errors, `The "${valibotAction.type}" action is not supported in combination with another regex action.`);
1520
- else jsonSchema.pattern = valibotAction.requirement.source;
1521
- break;
1522
- case "description":
1523
- jsonSchema.description = valibotAction.description;
1524
- break;
1525
- case "email":
1526
- case "rfc_email":
1527
- jsonSchema.format = "email";
1528
- break;
1529
- case "ends_with":
1530
- if (jsonSchema.pattern) errors = addError(errors, `The "${valibotAction.type}" action is not supported in combination with another regex action.`);
1531
- else jsonSchema.pattern = `${escapeRegExp(valibotAction.requirement)}$`;
1532
- break;
1533
- case "empty":
1534
- if (jsonSchema.type === "array") jsonSchema.maxItems = 0;
1535
- else {
1536
- if (jsonSchema.type !== "string") errors = addError(errors, `The "${valibotAction.type}" action is not supported on type "${jsonSchema.type}".`);
1537
- jsonSchema.maxLength = 0;
1538
- }
1539
- break;
1540
- case "entries":
1541
- if (!Number.isInteger(valibotAction.requirement) || valibotAction.requirement < 0) {
1542
- errors = addError(errors, 'The requirement of the "entries" action must be a non-negative integer.');
1543
- break;
1544
- }
1545
- jsonSchema.minProperties = getLowerBound(jsonSchema.minProperties, valibotAction.requirement);
1546
- jsonSchema.maxProperties = getUpperBound(jsonSchema.maxProperties, valibotAction.requirement);
1547
- break;
1548
- case "examples":
1549
- if (Array.isArray(jsonSchema.examples)) jsonSchema.examples = [...jsonSchema.examples, ...valibotAction.examples];
1550
- else jsonSchema.examples = valibotAction.examples;
1551
- break;
1552
- case "gt_value":
1553
- if (jsonSchema.type !== "number" && jsonSchema.type !== "integer") {
1554
- errors = addError(errors, `The "gt_value" action is not supported on type "${jsonSchema.type}".`);
1555
- break;
1556
- }
1557
- if (!Number.isFinite(valibotAction.requirement)) {
1558
- errors = addError(errors, 'The requirement of the "gt_value" action is not JSON compatible.');
1559
- break;
1560
- }
1561
- if (config?.target === "openapi-3.0") {
1562
- errors = addError(errors, 'The "gt_value" action is not supported for OpenAPI 3.0.');
1563
- break;
1564
- }
1565
- jsonSchema.exclusiveMinimum = getLowerBound(jsonSchema.exclusiveMinimum, valibotAction.requirement);
1566
- break;
1567
- case "includes":
1568
- if (jsonSchema.pattern) errors = addError(errors, `The "${valibotAction.type}" action is not supported in combination with another regex action.`);
1569
- else jsonSchema.pattern = escapeRegExp(valibotAction.requirement);
1570
- break;
1571
- case "integer":
1572
- jsonSchema.type = "integer";
1573
- break;
1574
- case "ipv4":
1575
- jsonSchema.format = "ipv4";
1576
- break;
1577
- case "ipv6":
1578
- jsonSchema.format = "ipv6";
1579
- break;
1580
- case "iso_date":
1581
- jsonSchema.format = "date";
1582
- break;
1583
- case "iso_date_time":
1584
- case "iso_timestamp":
1585
- jsonSchema.format = "date-time";
1586
- break;
1587
- case "iso_time":
1588
- jsonSchema.format = "time";
1589
- break;
1590
- case "jws_compact":
1591
- if (jsonSchema.pattern) errors = addError(errors, `The "${valibotAction.type}" action is not supported in combination with another regex action.`);
1592
- else jsonSchema.pattern = valibotAction.requirement.source;
1593
- break;
1594
- case "length":
1595
- if (!Number.isInteger(valibotAction.requirement) || valibotAction.requirement < 0) {
1596
- errors = addError(errors, 'The requirement of the "length" action must be a non-negative integer.');
1597
- break;
1598
- }
1599
- if (jsonSchema.type === "array") {
1600
- jsonSchema.minItems = getLowerBound(jsonSchema.minItems, valibotAction.requirement);
1601
- jsonSchema.maxItems = getUpperBound(jsonSchema.maxItems, valibotAction.requirement);
1602
- } else {
1603
- if (jsonSchema.type !== "string") errors = addError(errors, `The "${valibotAction.type}" action is not supported on type "${jsonSchema.type}".`);
1604
- jsonSchema.minLength = getLowerBound(jsonSchema.minLength, valibotAction.requirement);
1605
- jsonSchema.maxLength = getUpperBound(jsonSchema.maxLength, valibotAction.requirement);
1606
- }
1607
- break;
1608
- case "lt_value":
1609
- if (jsonSchema.type !== "number" && jsonSchema.type !== "integer") {
1610
- errors = addError(errors, `The "lt_value" action is not supported on type "${jsonSchema.type}".`);
1611
- break;
1612
- }
1613
- if (!Number.isFinite(valibotAction.requirement)) {
1614
- errors = addError(errors, 'The requirement of the "lt_value" action is not JSON compatible.');
1615
- break;
1616
- }
1617
- if (config?.target === "openapi-3.0") {
1618
- errors = addError(errors, 'The "lt_value" action is not supported for OpenAPI 3.0.');
1619
- break;
1620
- }
1621
- jsonSchema.exclusiveMaximum = getUpperBound(jsonSchema.exclusiveMaximum, valibotAction.requirement);
1622
- break;
1623
- case "max_entries":
1624
- if (!Number.isInteger(valibotAction.requirement) || valibotAction.requirement < 0) {
1625
- errors = addError(errors, 'The requirement of the "max_entries" action must be a non-negative integer.');
1626
- break;
1627
- }
1628
- jsonSchema.maxProperties = getUpperBound(jsonSchema.maxProperties, valibotAction.requirement);
1629
- break;
1630
- case "max_length":
1631
- if (!Number.isInteger(valibotAction.requirement) || valibotAction.requirement < 0) {
1632
- errors = addError(errors, 'The requirement of the "max_length" action must be a non-negative integer.');
1633
- break;
1634
- }
1635
- if (jsonSchema.type === "array") jsonSchema.maxItems = getUpperBound(jsonSchema.maxItems, valibotAction.requirement);
1636
- else {
1637
- if (jsonSchema.type !== "string") errors = addError(errors, `The "${valibotAction.type}" action is not supported on type "${jsonSchema.type}".`);
1638
- jsonSchema.maxLength = getUpperBound(jsonSchema.maxLength, valibotAction.requirement);
1639
- }
1640
- break;
1641
- case "max_value":
1642
- if (jsonSchema.type !== "number" && jsonSchema.type !== "integer") {
1643
- errors = addError(errors, `The "max_value" action is not supported on type "${jsonSchema.type}".`);
1644
- break;
1645
- }
1646
- if (!Number.isFinite(valibotAction.requirement)) {
1647
- errors = addError(errors, 'The requirement of the "max_value" action is not JSON compatible.');
1648
- break;
1649
- }
1650
- jsonSchema.maximum = getUpperBound(jsonSchema.maximum, valibotAction.requirement);
1651
- break;
1652
- case "metadata":
1653
- if (typeof valibotAction.metadata.title === "string") jsonSchema.title = valibotAction.metadata.title;
1654
- if (typeof valibotAction.metadata.description === "string") jsonSchema.description = valibotAction.metadata.description;
1655
- if (Array.isArray(valibotAction.metadata.examples)) if (Array.isArray(jsonSchema.examples)) jsonSchema.examples = [...jsonSchema.examples, ...valibotAction.metadata.examples];
1656
- else jsonSchema.examples = valibotAction.metadata.examples;
1657
- for (const key of Object.keys(valibotAction.metadata)) if (key !== "title" && key !== "description" && key !== "examples" && key !== "__proto__") jsonSchema[key] = valibotAction.metadata[key];
1658
- break;
1659
- case "min_entries":
1660
- if (!Number.isInteger(valibotAction.requirement) || valibotAction.requirement < 0) {
1661
- errors = addError(errors, 'The requirement of the "min_entries" action must be a non-negative integer.');
1662
- break;
1663
- }
1664
- jsonSchema.minProperties = getLowerBound(jsonSchema.minProperties, valibotAction.requirement);
1665
- break;
1666
- case "min_length":
1667
- if (!Number.isInteger(valibotAction.requirement) || valibotAction.requirement < 0) {
1668
- errors = addError(errors, 'The requirement of the "min_length" action must be a non-negative integer.');
1669
- break;
1670
- }
1671
- if (jsonSchema.type === "array") jsonSchema.minItems = getLowerBound(jsonSchema.minItems, valibotAction.requirement);
1672
- else {
1673
- if (jsonSchema.type !== "string") errors = addError(errors, `The "${valibotAction.type}" action is not supported on type "${jsonSchema.type}".`);
1674
- jsonSchema.minLength = getLowerBound(jsonSchema.minLength, valibotAction.requirement);
1675
- }
1676
- break;
1677
- case "min_value":
1678
- if (jsonSchema.type !== "number" && jsonSchema.type !== "integer") {
1679
- errors = addError(errors, `The "min_value" action is not supported on type "${jsonSchema.type}".`);
1680
- break;
1681
- }
1682
- if (!Number.isFinite(valibotAction.requirement)) {
1683
- errors = addError(errors, 'The requirement of the "min_value" action is not JSON compatible.');
1684
- break;
1685
- }
1686
- jsonSchema.minimum = getLowerBound(jsonSchema.minimum, valibotAction.requirement);
1687
- break;
1688
- case "multiple_of":
1689
- jsonSchema.multipleOf = valibotAction.requirement;
1690
- break;
1691
- case "non_empty":
1692
- if (jsonSchema.type === "array") jsonSchema.minItems = getLowerBound(jsonSchema.minItems, 1);
1693
- else {
1694
- if (jsonSchema.type !== "string") errors = addError(errors, `The "${valibotAction.type}" action is not supported on type "${jsonSchema.type}".`);
1695
- jsonSchema.minLength = getLowerBound(jsonSchema.minLength, 1);
1696
- }
1697
- break;
1698
- case "not_value":
1699
- if (!isJsonConstValue(valibotAction.requirement)) {
1700
- errors = addError(errors, 'The requirement of the "not_value" action is not JSON compatible.');
1701
- break;
1702
- }
1703
- jsonSchema.not = /* @__PURE__ */ getNotRestriction(jsonSchema.not, config?.target === "openapi-3.0" ? { enum: [valibotAction.requirement] } : { const: valibotAction.requirement });
1704
- break;
1705
- case "not_values":
1706
- if (!isJsonEnumValues(valibotAction.requirement)) {
1707
- errors = addError(errors, 'A requirement of the "not_values" action is not JSON compatible.');
1708
- break;
1709
- }
1710
- if (valibotAction.requirement.length) jsonSchema.not = /* @__PURE__ */ getNotRestriction(jsonSchema.not, { enum: [...new Set(valibotAction.requirement)] });
1711
- break;
1712
- case "regex":
1713
- if (valibotAction.requirement.flags) errors = addError(errors, "RegExp flags are not supported by JSON Schema.");
1714
- if (jsonSchema.pattern) errors = addError(errors, `The "${valibotAction.type}" action is not supported in combination with another regex action.`);
1715
- else jsonSchema.pattern = valibotAction.requirement.source;
1716
- break;
1717
- case "safe_integer":
1718
- jsonSchema.type = "integer";
1719
- jsonSchema.minimum = getLowerBound(jsonSchema.minimum, Number.MIN_SAFE_INTEGER);
1720
- jsonSchema.maximum = getUpperBound(jsonSchema.maximum, Number.MAX_SAFE_INTEGER);
1721
- break;
1722
- case "starts_with":
1723
- if (jsonSchema.pattern) errors = addError(errors, `The "${valibotAction.type}" action is not supported in combination with another regex action.`);
1724
- else jsonSchema.pattern = `^${escapeRegExp(valibotAction.requirement)}`;
1725
- break;
1726
- case "title":
1727
- jsonSchema.title = valibotAction.title;
1728
- break;
1729
- case "url":
1730
- jsonSchema.format = "uri";
1731
- break;
1732
- case "uuid":
1733
- jsonSchema.format = "uuid";
1734
- break;
1735
- case "value":
1736
- if (!isJsonConstValue(valibotAction.requirement)) {
1737
- errors = addError(errors, 'The requirement of the "value" action is not JSON compatible.');
1738
- break;
1739
- }
1740
- if (config?.target === "openapi-3.0") intersectEnum(jsonSchema, [valibotAction.requirement]);
1741
- else if ("const" in jsonSchema && jsonSchema.const !== valibotAction.requirement) errors = addError(errors, `The "${valibotAction.type}" action is not supported in combination with a different "const" restriction.`);
1742
- else jsonSchema.const = valibotAction.requirement;
1743
- break;
1744
- case "values":
1745
- if (!isJsonEnumValues(valibotAction.requirement)) {
1746
- errors = addError(errors, 'A requirement of the "values" action is not JSON compatible.');
1747
- break;
1748
- }
1749
- intersectEnum(jsonSchema, valibotAction.requirement);
1750
- break;
1751
- default:
1752
- errors = addError(errors, `The "${valibotAction.type}" action cannot be converted to JSON Schema.`);
1753
- }
1754
- if (config?.overrideAction) {
1755
- const actionOverride = config.overrideAction({
1756
- valibotAction,
1757
- jsonSchema,
1758
- errors
1759
- });
1760
- if (actionOverride) return { ...actionOverride };
1761
- }
1762
- if (errors) for (const message of errors) handleError(message, config);
1763
- return jsonSchema;
1764
- }
1765
- __name(convertAction, "convertAction");
1766
- function flattenPipe(pipe2) {
1767
- return pipe2.flatMap((item) => "pipe" in item ? flattenPipe(item.pipe) : item);
1768
- }
1769
- __name(flattenPipe, "flattenPipe");
1770
- function getDefinitionRef(referenceId) {
1771
- return `#/$defs/${referenceId.replaceAll("~", "~0").replaceAll("/", "~1")}`;
1772
- }
1773
- __name(getDefinitionRef, "getDefinitionRef");
1774
- function convertSchema(jsonSchema, valibotSchema, config, context, skipRef = false) {
1775
- if (!skipRef) {
1776
- const referenceId = context.referenceMap.get(valibotSchema);
1777
- if (referenceId) {
1778
- jsonSchema.$ref = getDefinitionRef(referenceId);
1779
- if (config?.overrideRef) {
1780
- const refOverride = config.overrideRef({
1781
- ...context,
1782
- referenceId,
1783
- valibotSchema,
1784
- jsonSchema
1785
- });
1786
- if (refOverride) jsonSchema.$ref = refOverride;
1787
- }
1788
- return jsonSchema;
1789
- }
1790
- }
1791
- if ("pipe" in valibotSchema) {
1792
- const flatPipe = flattenPipe(valibotSchema.pipe);
1793
- let startIndex = 0;
1794
- let stopIndex = flatPipe.length - 1;
1795
- if (config?.typeMode === "input") {
1796
- const inputStopIndex = flatPipe.slice(1).findIndex((item) => item.kind === "schema" || item.kind === "transformation" && (item.type === "find_item" || item.type === "parse_json" || item.type === "raw_transform" || item.type === "reduce_items" || item.type === "stringify_json" || item.type === "to_bigint" || item.type === "to_boolean" || item.type === "to_date" || item.type === "to_number" || item.type === "to_string" || item.type === "transform"));
1797
- if (inputStopIndex !== -1) stopIndex = inputStopIndex;
1798
- } else if (config?.typeMode === "output") {
1799
- const outputStartIndex = flatPipe.findLastIndex((item) => item.kind === "schema");
1800
- if (outputStartIndex !== -1) startIndex = outputStartIndex;
1801
- }
1802
- for (let index = startIndex; index <= stopIndex; index++) {
1803
- const valibotPipeItem = flatPipe[index];
1804
- if (valibotPipeItem.kind === "schema") {
1805
- if (index > startIndex) handleError('Set the "typeMode" config to "input" or "output" to convert pipelines with multiple schemas.', config);
1806
- jsonSchema = convertSchema(jsonSchema, valibotPipeItem, config, context, true);
1807
- } else jsonSchema = convertAction(jsonSchema, valibotPipeItem, config);
1808
- }
1809
- return jsonSchema;
1810
- }
1811
- let errors;
1812
- switch (valibotSchema.type) {
1813
- case "boolean":
1814
- jsonSchema.type = "boolean";
1815
- break;
1816
- case "null":
1817
- if (config?.target === "openapi-3.0") jsonSchema.enum = [null];
1818
- else jsonSchema.type = "null";
1819
- break;
1820
- case "number":
1821
- jsonSchema.type = "number";
1822
- break;
1823
- case "string":
1824
- jsonSchema.type = "string";
1825
- break;
1826
- case "array":
1827
- jsonSchema.type = "array";
1828
- jsonSchema.items = convertSchema({}, valibotSchema.item, config, context);
1829
- break;
1830
- case "tuple":
1831
- case "tuple_with_rest":
1832
- case "loose_tuple":
1833
- case "strict_tuple":
1834
- jsonSchema.type = "array";
1835
- if (config?.target === "openapi-3.0") {
1836
- jsonSchema.items = { anyOf: [] };
1837
- jsonSchema.minItems = valibotSchema.items.length;
1838
- for (const item of valibotSchema.items) jsonSchema.items.anyOf.push(convertSchema({}, item, config, context));
1839
- if (valibotSchema.type === "tuple_with_rest") jsonSchema.items.anyOf.push(convertSchema({}, valibotSchema.rest, config, context));
1840
- else if (valibotSchema.type === "strict_tuple" || valibotSchema.type === "tuple") jsonSchema.maxItems = valibotSchema.items.length;
1841
- } else if (config?.target === "draft-2020-12") {
1842
- jsonSchema.prefixItems = [];
1843
- jsonSchema.minItems = valibotSchema.items.length;
1844
- for (const item of valibotSchema.items) jsonSchema.prefixItems.push(convertSchema({}, item, config, context));
1845
- if (valibotSchema.type === "tuple_with_rest") jsonSchema.items = convertSchema({}, valibotSchema.rest, config, context);
1846
- else if (valibotSchema.type === "strict_tuple") jsonSchema.items = false;
1847
- } else {
1848
- jsonSchema.items = [];
1849
- jsonSchema.minItems = valibotSchema.items.length;
1850
- for (const item of valibotSchema.items) jsonSchema.items.push(convertSchema({}, item, config, context));
1851
- if (valibotSchema.type === "tuple_with_rest") jsonSchema.additionalItems = convertSchema({}, valibotSchema.rest, config, context);
1852
- else if (valibotSchema.type === "strict_tuple") jsonSchema.additionalItems = false;
1853
- }
1854
- break;
1855
- case "object":
1856
- case "object_with_rest":
1857
- case "loose_object":
1858
- case "strict_object":
1859
- jsonSchema.type = "object";
1860
- jsonSchema.properties = {};
1861
- jsonSchema.required = [];
1862
- for (const key in valibotSchema.entries) {
1863
- const entry = valibotSchema.entries[key];
1864
- jsonSchema.properties[key] = convertSchema({}, entry, config, context);
1865
- if (entry.type !== "exact_optional" && entry.type !== "nullish" && entry.type !== "optional") jsonSchema.required.push(key);
1866
- }
1867
- if (valibotSchema.type === "object_with_rest") jsonSchema.additionalProperties = convertSchema({}, valibotSchema.rest, config, context);
1868
- else if (valibotSchema.type === "strict_object") jsonSchema.additionalProperties = false;
1869
- break;
1870
- case "record":
1871
- if (config?.target === "openapi-3.0" && "pipe" in valibotSchema.key) errors = addError(errors, 'The "record" schema with a schema for the key that contains a "pipe" cannot be converted to JSON Schema.');
1872
- if (valibotSchema.key.type !== "string") errors = addError(errors, `The "record" schema with the "${valibotSchema.key.type}" schema for the key cannot be converted to JSON Schema.`);
1873
- jsonSchema.type = "object";
1874
- if (config?.target !== "openapi-3.0") jsonSchema.propertyNames = convertSchema({}, valibotSchema.key, config, context);
1875
- jsonSchema.additionalProperties = convertSchema({}, valibotSchema.value, config, context);
1876
- break;
1877
- case "any":
1878
- case "unknown":
1879
- break;
1880
- case "never":
1881
- jsonSchema.not = {};
1882
- break;
1883
- case "nullable":
1884
- case "nullish":
1885
- if (config?.target === "openapi-3.0") {
1886
- const innerSchema = convertSchema({}, valibotSchema.wrapped, config, context);
1887
- Object.assign(jsonSchema, innerSchema);
1888
- jsonSchema.nullable = true;
1889
- } else jsonSchema.anyOf = [convertSchema({}, valibotSchema.wrapped, config, context), { type: "null" }];
1890
- if (valibotSchema.default !== void 0) jsonSchema.default = typeof valibotSchema.default === "function" ? valibotSchema.default() : valibotSchema.default;
1891
- break;
1892
- case "exact_optional":
1893
- case "optional":
1894
- case "undefinedable":
1895
- jsonSchema = convertSchema(jsonSchema, valibotSchema.wrapped, config, context);
1896
- if (valibotSchema.default !== void 0) jsonSchema.default = typeof valibotSchema.default === "function" ? valibotSchema.default() : valibotSchema.default;
1897
- break;
1898
- case "literal":
1899
- if (!isJsonConstValue(valibotSchema.literal)) {
1900
- errors = addError(errors, 'The value of the "literal" schema is not JSON compatible.');
1901
- break;
1902
- }
1903
- if (config?.target === "openapi-3.0") jsonSchema.enum = [valibotSchema.literal];
1904
- else jsonSchema.const = valibotSchema.literal;
1905
- break;
1906
- case "enum":
1907
- case "picklist": {
1908
- const options = valibotSchema.options;
1909
- if (!options.every((option) => typeof option === "string" || typeof option === "number" && Number.isFinite(option))) {
1910
- errors = addError(errors, `An option of the "${valibotSchema.type}" schema is not JSON compatible.`);
1911
- break;
1912
- }
1913
- jsonSchema.enum = options;
1914
- if (options.every((option) => typeof option === "string")) jsonSchema.type = "string";
1915
- else if (options.every((option) => typeof option === "number")) jsonSchema.type = "number";
1916
- else if (config?.target !== "openapi-3.0") jsonSchema.type = ["string", "number"];
1917
- break;
1918
- }
1919
- case "union":
1920
- jsonSchema.anyOf = valibotSchema.options.map((option) => convertSchema({}, option, config, context));
1921
- break;
1922
- case "variant":
1923
- jsonSchema.oneOf = valibotSchema.options.map((option) => convertSchema({}, option, config, context));
1924
- break;
1925
- case "intersect":
1926
- jsonSchema.allOf = valibotSchema.options.map((option) => convertSchema({}, option, config, context));
1927
- break;
1928
- case "lazy": {
1929
- let wrappedValibotSchema = context.getterMap.get(valibotSchema.getter);
1930
- if (!wrappedValibotSchema) {
1931
- wrappedValibotSchema = valibotSchema.getter(void 0);
1932
- context.getterMap.set(valibotSchema.getter, wrappedValibotSchema);
1933
- }
1934
- let referenceId = context.referenceMap.get(wrappedValibotSchema);
1935
- if (!referenceId) {
1936
- referenceId = context.referenceMap.createId(context.definitions);
1937
- context.referenceMap.set(wrappedValibotSchema, referenceId);
1938
- context.definitions[referenceId] = convertSchema({}, wrappedValibotSchema, config, context, true);
1939
- }
1940
- jsonSchema.$ref = getDefinitionRef(referenceId);
1941
- if (config?.overrideRef) {
1942
- const refOverride = config.overrideRef({
1943
- ...context,
1944
- referenceId,
1945
- valibotSchema: wrappedValibotSchema,
1946
- jsonSchema
1947
- });
1948
- if (refOverride) jsonSchema.$ref = refOverride;
1949
- }
1950
- break;
1951
- }
1952
- default:
1953
- errors = addError(errors, `The "${valibotSchema.type}" schema cannot be converted to JSON Schema.`);
1954
- }
1955
- if (config?.overrideSchema) {
1956
- const schemaOverride = config.overrideSchema({
1957
- ...context,
1958
- referenceId: context.referenceMap.get(valibotSchema),
1959
- valibotSchema,
1960
- jsonSchema,
1961
- errors
1962
- });
1963
- if (schemaOverride) return { ...schemaOverride };
1964
- }
1965
- if (errors) for (const message of errors) handleError(message, config);
1966
- return jsonSchema;
1967
- }
1968
- __name(convertSchema, "convertSchema");
1969
- var store;
1970
- function getGlobalDefs() {
1971
- return store;
1972
- }
1973
- __name(getGlobalDefs, "getGlobalDefs");
1974
- function toJsonSchema(schema, config) {
1975
- const context = {
1976
- definitions: {},
1977
- referenceMap: new ReferenceMap(),
1978
- getterMap: /* @__PURE__ */ new Map()
1979
- };
1980
- const definitions = config?.definitions ?? getGlobalDefs();
1981
- if (definitions) {
1982
- for (const key in definitions) context.referenceMap.set(definitions[key], key);
1983
- for (const key in definitions) context.definitions[key] = convertSchema({}, definitions[key], config, context, true);
1984
- }
1985
- const jsonSchema = convertSchema({}, schema, config, context);
1986
- const target = config?.target ?? "draft-07";
1987
- if (target === "draft-2020-12") jsonSchema.$schema = "https://json-schema.org/draft/2020-12/schema";
1988
- else if (target === "draft-07") jsonSchema.$schema = "http://json-schema.org/draft-07/schema#";
1989
- if (context.referenceMap.size) jsonSchema.$defs = context.definitions;
1990
- return jsonSchema;
1991
- }
1992
- __name(toJsonSchema, "toJsonSchema");
1993
- var SUPPORTED_TARGETS = [
1994
- "draft-07",
1995
- "draft-2020-12",
1996
- "openapi-3.0"
1997
- ];
1998
- function toStandardJsonSchema(schema) {
1999
- return { "~standard": {
2000
- ...schema["~standard"],
2001
- jsonSchema: {
2002
- input(options) {
2003
- if (SUPPORTED_TARGETS.includes(options.target)) return toJsonSchema(schema, {
2004
- typeMode: "input",
2005
- target: options.target,
2006
- ...options.libraryOptions
2007
- });
2008
- throw new Error(`Unsupported target: ${options.target}`);
2009
- },
2010
- output(options) {
2011
- if (SUPPORTED_TARGETS.includes(options.target)) return toJsonSchema(schema, {
2012
- typeMode: "output",
2013
- target: options.target,
2014
- ...options.libraryOptions
2015
- });
2016
- throw new Error(`Unsupported target: ${options.target}`);
2017
- }
2018
- }
2019
- } };
2020
- }
2021
- __name(toStandardJsonSchema, "toStandardJsonSchema");
2022
-
2023
- // 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/standards/registry.js
2024
- var word = pipe(string(), regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/, "a lower-case word, words joined by -"));
2025
- var SNAKE_CASE = /^[a-z][a-z0-9]*(_[a-z0-9]+)*$/;
2026
- var text = pipe(string(), regex(/\S/, "must not be empty"));
2027
- var dottedId = pipe(string(), regex(/^[a-z][a-z0-9-]*(\.[a-z][a-z0-9-]*)+$/, "dotted lower-case words, such as `page.next`"));
2028
- var RegistryError = class extends Error {
2029
- static {
2030
- __name(this, "RegistryError");
2031
- }
2032
- registry;
2033
- problems;
2034
- constructor(registry, problems) {
2035
- super(`${registry} registry: ${problems.join("; ")}`);
2036
- this.registry = registry;
2037
- this.problems = problems;
2038
- this.name = "RegistryError";
2039
- }
2040
- };
2041
- var issuesOf = /* @__PURE__ */ __name((issues) => issues.map((issue) => {
2042
- const path = getDotPath(issue);
2043
- return path ? `${path}: ${issue.message}` : issue.message;
2044
- }), "issuesOf");
2045
- var parseRegistry = /* @__PURE__ */ __name((registry, schema, input, check2 = () => []) => {
2046
- const parsed = safeParse(schema, input);
2047
- if (!parsed.success)
2048
- throw new RegistryError(registry, issuesOf(parsed.issues));
2049
- const problems = check2(parsed.output);
2050
- if (problems.length > 0)
2051
- throw new RegistryError(registry, problems);
2052
- return parsed.output;
2053
- }, "parseRegistry");
2054
- var duplicates = /* @__PURE__ */ __name((values) => [...new Set(values.filter((value, index) => values.indexOf(value) !== index))].sort(), "duplicates");
2055
- var jsonSchemaOf = /* @__PURE__ */ __name((schema, definitions) => toJsonSchema(schema, { target: "draft-2020-12", ...definitions ? { definitions } : {} }), "jsonSchemaOf");
2056
- var PLACEHOLDER = /\{([a-z][a-z0-9]*(?:_[a-z0-9]+)*)\}/g;
2057
- var placeholders = /* @__PURE__ */ __name((template) => [...template.matchAll(PLACEHOLDER)].map((match) => match[1] ?? ""), "placeholders");
2058
- var fill = /* @__PURE__ */ __name((template, values) => template.replace(PLACEHOLDER, (_, name) => {
2059
- const value = values[name];
2060
- if (value === void 0)
2061
- throw new Error(`no value for {${name}} in "${template}"`);
2062
- return String(value);
2063
- }), "fill");
2064
-
2065
- // 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/standards/output.js
2066
- var MAX_NEXT_STEPS = 2;
2067
- var COMPACT_FLAG = "--compact";
2068
- var isoTime = pipe(string(), isoTimestamp("an ISO 8601 time in UTC"), endsWith("Z", "an ISO 8601 time in UTC, ending in `Z`"));
2069
- var localTime = pipe(string(), regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}[+-]\d{2}:\d{2}$/, "an ISO 8601 time with its offset"));
2070
- var reference = pipe(string(), regex(/^[a-z]+:\S+$/, "a reference such as `note:42`"));
2071
- var nextStepSchema = variant("kind", [
2072
- strictObject({
2073
- kind: literal("command"),
2074
- step: dottedId,
2075
- /** The command path as one string, `messages list` — what the MCP router tools take as `command`. */
2076
- command: text,
2077
- args: record(string(), unknown()),
2078
- /**
2079
- * The whole line to type, with the tool and the profile it ran with: `tg personal mcp config`. Only the CLI
2080
- * knows the profile, so it fills this; MCP answers leave it out.
2081
- */
2082
- line: optional(text),
2083
- why: text,
2084
- /** True only when the target command is known to write nothing, here or at the provider. */
2085
- safe_to_auto_execute: boolean()
2086
- }),
2087
- /** Something only the person can do — sign in on the phone, approve a device. */
2088
- strictObject({
2089
- kind: literal("user_action"),
2090
- step: dottedId,
2091
- why: text,
2092
- safe_to_auto_execute: literal(false)
2093
- })
2094
- ]);
2095
- var missingSchema = strictObject({
2096
- field: text,
2097
- why: text,
2098
- /** Left out when there is nothing to run that would fill the field. */
2099
- step: optional(dottedId)
2100
- });
2101
- var limit = pipe(number(), integer(), minValue(1));
2102
- var totalSchema = strictObject({
2103
- value: pipe(number(), integer(), minValue(0)),
2104
- relation: picklist(["eq", "gte"])
2105
- });
2106
- var pageSchema = variant("mode", [
2107
- strictObject({
2108
- mode: literal("page"),
2109
- limit,
2110
- has_more: boolean(),
2111
- next_page: optional(pipe(number(), integer(), minValue(2))),
2112
- total: optional(totalSchema)
2113
- }),
2114
- strictObject({
2115
- mode: literal("cursor"),
2116
- limit,
2117
- has_more: boolean(),
2118
- next_cursor: optional(text),
2119
- total: optional(totalSchema)
2120
- })
2121
- ]);
2122
- var issueSchema = strictObject({
2123
- code: picklist(errorCodes),
2124
- reason: optional(dottedId),
2125
- /** The account, provider or source that is missing from the answer. */
2126
- source: text
2127
- });
2128
- var rankingSchema = strictObject({
2129
- applied: boolean(),
2130
- reason_id: optional(dottedId),
2131
- provider: text,
2132
- model: text,
2133
- endpoint: text,
2134
- sent: pipe(number(), integer(), minValue(0)),
2135
- cost_usd: nullable(pipe(number(), minValue(0))),
2136
- usage: optional(strictObject({
2137
- input: pipe(number(), integer(), minValue(0)),
2138
- output: pipe(number(), integer(), minValue(0))
2139
- })),
2140
- ms: pipe(number(), integer(), minValue(0))
2141
- });
2142
- var count = pipe(number(), integer(), minValue(0));
2143
- var modelRunSchema = strictObject({
2144
- provider: text,
2145
- model: text,
2146
- endpoint: text,
2147
- sent: count,
2148
- done: count,
2149
- left: count,
2150
- usage: optional(strictObject({ input: count, output: count })),
2151
- cost_usd: nullable(pipe(number(), minValue(0))),
2152
- ms: count
2153
- });
2154
- var querySchema = strictObject({
2155
- chat: optional(strictObject({ word: text, chat_id: text, title: nullable(text) })),
2156
- respelled: optional(array(strictObject({ word: text, tried: pipe(array(text), minLength(1)) })))
2157
- });
2158
- var metaSchema = strictObject({
2159
- run_id: text,
2160
- duration_ms: pipe(number(), integer(), minValue(0)),
2161
- accounts: optional(array(text)),
2162
- complete: boolean(),
2163
- issues: optional(array(issueSchema)),
2164
- truncated: optional(boolean()),
2165
- timezone: optional(text),
2166
- /** When the command answered, for an agent that plans from "now" (WC-TIME-7); `timezone` names the zone of `now_local`. */
2167
- now: optional(isoTime),
2168
- now_local: optional(localTime),
2169
- window: optional(strictObject({ since: optional(isoTime), until: optional(isoTime) })),
2170
- ranking: optional(rankingSchema),
2171
- model_run: optional(modelRunSchema),
2172
- query: optional(querySchema)
2173
- });
2174
- var offsetOf = /* @__PURE__ */ __name((at, zone) => {
2175
- const name = new Intl.DateTimeFormat("en-US", { timeZone: zone, timeZoneName: "longOffset" }).formatToParts(at).find((part) => part.type === "timeZoneName")?.value ?? "GMT";
2176
- return name === "GMT" ? "+00:00" : name.slice(3);
2177
- }, "offsetOf");
2178
- var clockMeta = /* @__PURE__ */ __name((at, zone) => {
2179
- const offset = offsetOf(at, zone);
2180
- const sign = offset.startsWith("-") ? -1 : 1;
2181
- const [hours = 0, minutes = 0] = offset.slice(1).split(":").map(Number);
2182
- const wall = new Date(at + sign * (hours * 60 + minutes) * 6e4).toISOString().slice(0, -1);
2183
- return { now: new Date(at).toISOString(), now_local: `${wall}${offset}`, timezone: zone };
2184
- }, "clockMeta");
2185
- var nextSteps = optional(pipe(array(nextStepSchema), maxLength(MAX_NEXT_STEPS)));
2186
- var listEnvelopeSchema = /* @__PURE__ */ __name((item) => strictObject({
2187
- items: array(item),
2188
- page: pageSchema,
2189
- next: nextSteps,
2190
- missing: optional(array(missingSchema)),
2191
- meta: metaSchema
2192
- }), "listEnvelopeSchema");
2193
- var itemEnvelopeSchema = /* @__PURE__ */ __name((item) => strictObject({
2194
- item,
2195
- next: nextSteps,
2196
- missing: optional(array(missingSchema)),
2197
- meta: metaSchema
2198
- }), "itemEnvelopeSchema");
2199
- var jsonlEndSchema = strictObject({
2200
- type: literal("end"),
2201
- complete: boolean(),
2202
- issues: optional(array(issueSchema)),
2203
- page: pageSchema
2204
- });
2205
- var jsonlOf = /* @__PURE__ */ __name(({ items, page, meta }) => [
2206
- ...items.map((data) => JSON.stringify({ type: "item", data })),
2207
- JSON.stringify({ type: "end", complete: meta.complete, ...meta.issues ? { issues: meta.issues } : {}, page })
2208
- ].join("\n"), "jsonlOf");
2209
-
2210
- // 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/standards/errors.js
2211
- var CRASH_CODE = "internal_error";
2212
- var CRASH_REASON = "command.crashed";
2213
- var errorObjectSchema = strictObject({
2214
- error: strictObject({
2215
- code: picklist([...errorCodes, CRASH_CODE]),
2216
- reason: dottedId,
2217
- message: text,
2218
- /** The option or argument at fault. */
2219
- param: optional(text),
2220
- details: optional(record(string(), unknown())),
2221
- next: optional(pipe(array(nextStepSchema), maxLength(MAX_NEXT_STEPS))),
2222
- /** Whether running the same command again may work and cannot do harm; never for a write that may have landed. */
2223
- retry: strictObject({
2224
- safe: boolean(),
2225
- after_ms: optional(pipe(number(), integer(), minValue(0)))
2226
- }),
2227
- /** Optional until every CLI keeps a run for each failure. */
2228
- run_id: optional(text)
2229
- })
2230
- });
2231
- var reasonSchema = strictObject({
2232
- reason: dottedId,
2233
- code: picklist([...errorCodes, CRASH_CODE]),
2234
- /** `{name}` placeholders, each one of `details`. */
2235
- message: pipe(text, maxLength(120)),
2236
- details: array(pipe(string(), regex(SNAKE_CASE, "a snake_case key"))),
2237
- step: optional(dottedId)
2238
- });
2239
- var defineReasons = /* @__PURE__ */ __name((input) => parseRegistry("error reasons", array(reasonSchema), input, (reasons) => [
2240
- ...duplicates(reasons.map((entry) => entry.reason)).map((reason) => `"${reason}" is listed twice`),
2241
- ...reasons.flatMap((entry) => placeholders(entry.message).filter((name) => !entry.details.includes(name)).map((name) => `${entry.reason}: the message names {${name}}, which is not one of its details`))
2242
- ]), "defineReasons");
2243
- var COMMON_DETAILS = ["attempts", "status", "request_id", "operation", "operation_id"];
2244
- var BASE_REASONS = defineReasons([
2245
- { reason: "input.invalid", code: "validation_error", message: "the input is not valid", details: [] },
2246
- {
2247
- reason: "batch.read-budget",
2248
- code: "validation_error",
2249
- message: "batch stored-text read budget exhausted",
2250
- details: []
2251
- },
2252
- { reason: "batch.output-budget", code: "validation_error", message: "batch output budget exhausted", details: [] },
2253
- { reason: "config.invalid", code: "configuration_error", message: "the configuration is not valid", details: [] },
2254
- {
2255
- reason: "keyring.unreachable",
2256
- code: "configuration_error",
2257
- message: "the OS keyring did not answer, and no file holds the sign-in",
2258
- details: []
2259
- },
2260
- { reason: "auth.failed", code: "authentication_error", message: "the sign-in did not work", details: [] },
2261
- { reason: "access.denied", code: "permission_error", message: "this account may not do that", details: [] },
2262
- { reason: "item.not-found", code: "not_found", message: "nothing found by that name", details: [] },
2263
- {
2264
- reason: "tool.not-installed",
2265
- code: "not_found",
2266
- message: "no wcat-<name> program by that name is on PATH",
2267
- details: ["tool", "installed"]
2268
- },
2269
- {
2270
- reason: "confirmation.required",
2271
- code: "confirmation_required",
2272
- message: "this changes something; confirm it",
2273
- details: []
2274
- },
2275
- { reason: "provider.rate-limited", code: "rate_limited", message: "too many requests; wait", details: [] },
2276
- { reason: "command.timed-out", code: "timeout", message: "the command took too long", details: ["timeout_ms"] },
2277
- { reason: "network.failed", code: "network_error", message: "the network did not answer", details: [] },
2278
- { reason: "provider.refused", code: "provider_error", message: "the provider refused", details: [] },
2279
- { reason: "provider.unavailable", code: "provider_unavailable", message: "the provider is down", details: [] },
2280
- {
2281
- reason: "provider.invalid-response",
2282
- code: "invalid_response",
2283
- message: "the answer could not be read",
2284
- details: []
2285
- },
2286
- {
2287
- reason: "output.too-large",
2288
- code: "invalid_response",
2289
- message: "the output is over {max_bytes} bytes",
2290
- details: ["max_bytes", "buffered_bytes", "partial_output"]
2291
- },
2292
- {
2293
- reason: "output.fields-unavailable",
2294
- code: "invalid_response",
2295
- message: "fields can be picked only from whole JSON values",
2296
- details: []
2297
- },
2298
- { reason: "outcome.unknown", code: "outcome_unknown", message: "it is not known whether it worked", details: [] },
2299
- {
2300
- reason: "write.conflict",
2301
- code: "conflict",
2302
- message: "it changed since it was read; read it again",
2303
- details: []
2304
- },
2305
- { reason: "command.cancelled", code: "cancelled", message: "the command was cancelled", details: [] },
2306
- { reason: CRASH_REASON, code: CRASH_CODE, message: "the command failed; this is a bug", details: [] }
2307
- ]);
2308
-
2309
- // 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/standards/steps.js
2310
- var SAME_COMMAND = "*";
2311
- var commandPath = pipe(string(), regex(/^[a-z][a-z0-9-]*( [a-z][a-z0-9-]*)*$/, "a command path such as `messages sync`"));
2312
- var stepSchema = union([
2313
- strictObject({
2314
- id: dottedId,
2315
- kind: optional(literal("command"), "command"),
2316
- command: union([literal(SAME_COMMAND), commandPath]),
2317
- args: array(strictObject({
2318
- name: pipe(string(), regex(SNAKE_CASE, "an argument or option name in snake_case")),
2319
- required: boolean()
2320
- })),
2321
- why: pipe(text, maxLength(120))
2322
- }),
2323
- strictObject({ id: dottedId, kind: literal("user_action"), why: pipe(text, maxLength(120)) })
2324
- ]);
2325
- var argsOf = /* @__PURE__ */ __name((step) => step.kind === "command" ? step.args : [], "argsOf");
2326
- var defineSteps = /* @__PURE__ */ __name((input) => parseRegistry("steps", array(stepSchema), input, (steps) => [
2327
- ...duplicates(steps.map((step) => step.id)).map((id) => `"${id}" is listed twice`),
2328
- ...steps.flatMap((step) => duplicates(argsOf(step).map((arg) => arg.name)).map((name) => `${step.id}: argument "${name}" is listed twice`))
2329
- ]), "defineSteps");
2330
- var BINDS = /^[^\p{Cc}\u2028\u2029]*$/u;
2331
- var binds = /* @__PURE__ */ __name((value) => typeof value === "number" || typeof value === "boolean" || typeof value === "string" && BINDS.test(value), "binds");
2332
- var stepOf = /* @__PURE__ */ __name((definition, input = {}) => {
2333
- const args = input.args ?? {};
2334
- if (definition.kind === "user_action")
2335
- return {
2336
- kind: "user_action",
2337
- step: definition.id,
2338
- why: fill(definition.why, { ...input.values }),
2339
- safe_to_auto_execute: false
2340
- };
2341
- const command = definition.command === SAME_COMMAND ? input.command : definition.command;
2342
- if (!command)
2343
- throw new Error(`${definition.id}: the step runs the same command, so pass the command`);
2344
- const known = new Set(definition.args.map((arg) => arg.name));
2345
- if (definition.command !== SAME_COMMAND) {
2346
- for (const name of Object.keys(args))
2347
- if (!known.has(name))
2348
- throw new Error(`${definition.id}: no argument "${name}"`);
2349
- }
2350
- for (const arg of definition.args)
2351
- if (arg.required && args[arg.name] === void 0)
2352
- throw new Error(`${definition.id}: argument "${arg.name}" is required`);
2353
- for (const [name, value] of Object.entries(args))
2354
- if (!(Array.isArray(value) ? value.every(binds) : binds(value)))
2355
- throw new Error(`${definition.id}: "${name}" is not a value an option takes`);
2356
- const target = input.targets?.(command);
2357
- if (input.targets && !target)
2358
- throw new Error(`${definition.id}: no command "${command}"`);
2359
- const names = new Set(target?.names ?? []);
2360
- if (target) {
2361
- for (const name of Object.keys(args))
2362
- if (!names.has(name))
2363
- throw new Error(`${definition.id}: "${command}" takes no "${name}"`);
2364
- }
2365
- const scalars = Object.fromEntries(Object.entries(args).filter((entry) => ["string", "number"].includes(typeof entry[1])));
2366
- return {
2367
- kind: "command",
2368
- step: definition.id,
2369
- command,
2370
- args: { ...args },
2371
- why: fill(definition.why, { ...scalars, ...input.values }),
2372
- safe_to_auto_execute: target?.effects !== void 0 && !writes(target.effects)
2373
- };
2374
- }, "stepOf");
2375
- var STEPS = defineSteps([
2376
- {
2377
- id: "page.next",
2378
- command: SAME_COMMAND,
2379
- args: [
2380
- { name: "cursor", required: false },
2381
- { name: "page", required: false },
2382
- { name: "limit", required: false }
2383
- ],
2384
- why: "{shown} shown, more exist"
2385
- }
2386
- ]);
2387
-
2388
- // 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/failure.js
2389
- var recognise = /* @__PURE__ */ __name((failure) => {
2390
- if (isCliError(failure))
2391
- return failure;
2392
- if (!(failure instanceof Error) || failure.name !== "CliError")
2393
- return void 0;
2394
- const { code, details } = failure;
2395
- if (!errorCodes.includes(code))
2396
- return void 0;
2397
- return {
2398
- code,
2399
- message: failure.message,
2400
- details: typeof details === "object" && details !== null ? details : {}
2401
- };
2402
- }, "recognise");
2403
- var reasonFor = /* @__PURE__ */ __name((code, named, reasons) => reasons.find((entry) => entry.reason === named && entry.code === code) ?? BASE_REASONS.find((entry) => entry.reason === named && entry.code === code) ?? // The first base reason for each code is its fallback.
2404
- BASE_REASONS.find((entry) => entry.code === code), "reasonFor");
2405
- var nextFor = /* @__PURE__ */ __name((reason, details, context) => {
2406
- const definition = reason.step ? context.steps?.find((step) => step.id === reason.step) : void 0;
2407
- if (!definition)
2408
- return [];
2409
- const known = new Set(definition.kind === "command" ? definition.args.map((arg) => arg.name) : []);
2410
- const args = Object.fromEntries(Object.entries(details).filter(([key, value]) => known.has(key) && value !== void 0));
2411
- try {
2412
- return [stepOf(definition, { args, ...context.targets ? { targets: context.targets } : {} })];
2413
- } catch {
2414
- return [];
2415
- }
2416
- }, "nextFor");
2417
- var TRANSIENT = [
2418
- "rate_limited",
2419
- "timeout",
2420
- "network_error",
2421
- "provider_unavailable"
2422
- ];
2423
- var retryOf = /* @__PURE__ */ __name((code, details, effects) => {
2424
- const transient = details.retryable !== false && (TRANSIENT.includes(code) || code === "provider_error" && details.retryable === true);
2425
- const safe = code !== "outcome_unknown" && transient && (!writes(effects) || details.sent === false);
2426
- const after = details.retry_after_ms;
2427
- return safe && typeof after === "number" && Number.isInteger(after) && after >= 0 ? { safe, after_ms: after } : { safe };
2428
- }, "retryOf");
2429
- var errorObjectOf = /* @__PURE__ */ __name((failure, context = {}) => {
2430
- const reasons = context.reasons ?? [];
2431
- const recognised = recognise(failure);
2432
- if (!recognised) {
2433
- const reason2 = reasonFor(CRASH_CODE, CRASH_REASON, reasons);
2434
- return {
2435
- error: {
2436
- code: CRASH_CODE,
2437
- reason: reason2.reason,
2438
- message: reason2.message,
2439
- retry: { safe: false },
2440
- ...context.runId ? { run_id: context.runId } : {}
2441
- }
2442
- };
2443
- }
2444
- const { code, message, details } = recognised;
2445
- const reason = reasonFor(code, details.reason, reasons);
2446
- const allowed = /* @__PURE__ */ new Set([...COMMON_DETAILS, ...context.details ?? [], ...reason.details]);
2447
- allowed.delete("cause");
2448
- const kept = Object.fromEntries(Object.entries(details).filter(([key, value]) => allowed.has(key) && value !== void 0));
2449
- const next = nextFor(reason, details, context);
2450
- const runId = context.runId ?? (typeof details.run_id === "string" ? details.run_id : void 0);
2451
- return {
2452
- error: {
2453
- code,
2454
- reason: reason.reason,
2455
- message,
2456
- ...typeof details.param === "string" ? { param: details.param } : {},
2457
- ...Object.keys(kept).length > 0 ? { details: kept } : {},
2458
- ...next.length > 0 ? { next } : {},
2459
- retry: retryOf(code, details, context.effects),
2460
- ...runId ? { run_id: runId } : {}
2461
- }
2462
- };
2463
- }, "errorObjectOf");
2464
- var exitCodeOfError = /* @__PURE__ */ __name(({ error }) => error.code === CRASH_CODE ? GENERIC_FAILURE : EXIT_CODES[error.code], "exitCodeOfError");
2465
- var exitCodeOfAnswer = /* @__PURE__ */ __name((meta, partial2 = false) => {
2466
- if (meta.complete || partial2)
2467
- return 0;
2468
- const code = meta.issues?.[0]?.code;
2469
- return code === void 0 ? GENERIC_FAILURE : EXIT_CODES[code];
2470
- }, "exitCodeOfAnswer");
2471
- var kebab = /* @__PURE__ */ __name((name) => name.replaceAll("_", "-"), "kebab");
2472
- var commandLine = /* @__PURE__ */ __name((cli, step) => [
2473
- cli,
2474
- step.command,
2475
- ...Object.entries(step.args).map(([name, value]) => value === true ? `--${kebab(name)}` : `--${kebab(name)} ${JSON.stringify(value)}`)
2476
- ].join(" "), "commandLine");
2477
- var STACK_FRAMES = 10;
2478
- var errorRecordOf = /* @__PURE__ */ __name((failure, object2, options) => {
2479
- const thrown = failure instanceof Error ? failure : void 0;
2480
- const { cause, ...details } = recognise(failure)?.details ?? {};
2481
- const stack = thrown?.stack?.split("\n").slice(1, STACK_FRAMES + 1).map((line) => visibleControls(line.trim()));
2482
- const reason = thrown?.cause ?? cause;
2483
- return {
2484
- time: (options.time ?? /* @__PURE__ */ new Date()).toISOString(),
2485
- severity: "error",
2486
- body: "command.failed",
2487
- ...object2.error.run_id ? { run_id: object2.error.run_id } : {},
2488
- command: options.command,
2489
- attributes: {
2490
- code: object2.error.code,
2491
- reason: object2.error.reason,
2492
- message: object2.error.message,
2493
- ...Object.keys(details).length > 0 ? { details } : {},
2494
- ...thrown ? { name: thrown.name, thrown_message: visibleControls(thrown.message) } : { thrown: String(failure) },
2495
- ...reason === void 0 ? {} : { cause: visibleControls(reason instanceof Error ? reason.message : String(reason)) },
2496
- ...stack && stack.length > 0 ? { stack } : {}
2497
- },
2498
- resource: { service: options.service, version: options.version }
2499
- };
2500
- }, "errorRecordOf");
2501
- var renderError = /* @__PURE__ */ __name((object2, options) => {
2502
- if (!options.interactive)
2503
- return [JSON.stringify(object2), ...options.record ? [JSON.stringify(options.record)] : []].join("\n");
2504
- const { message, next, run_id: runId } = object2.error;
2505
- const step = next?.[0];
2506
- return [
2507
- `\u2717 ${visibleControls(message)}`,
2508
- ...step?.kind === "command" ? [`\u2192 ${visibleControls(step.why)}: ${visibleControls(step.line ?? commandLine(options.cli, step))}`] : step ? [`\u2192 ${visibleControls(step.why)}`] : [],
2509
- ...options.record ? [JSON.stringify(options.record, null, 2)] : runId ? [`details: ${options.cli} runs show ${runId}`] : []
2510
- ].join("\n");
2511
- }, "renderError");
2512
- var mcpErrorResult = /* @__PURE__ */ __name((object2) => ({
2513
- content: [{ type: "text", text: JSON.stringify(object2) }],
2514
- structuredContent: object2,
2515
- isError: true
2516
- }), "mcpErrorResult");
2517
- var catchCrashes = /* @__PURE__ */ __name((options) => {
2518
- const target = options.target ?? process;
2519
- const write = options.write ?? ((text2) => process.stderr.write(`${text2}
2520
- `));
2521
- const exit = options.exit ?? ((code) => process.exit(code));
2522
- const crashed = /* @__PURE__ */ __name((failure) => {
2523
- const object2 = errorObjectOf(failure, options);
2524
- write(renderError(object2, { cli: options.cli, interactive: options.interactive }));
2525
- exit(exitCodeOfError(object2));
2526
- }, "crashed");
2527
- target.on("uncaughtException", crashed);
2528
- target.on("unhandledRejection", crashed);
2529
- return () => {
2530
- target.off("uncaughtException", crashed);
2531
- target.off("unhandledRejection", crashed);
2532
- };
2533
- }, "catchCrashes");
2534
-
2535
- export {
2536
- EXIT_CODES,
2537
- exitCodeFor,
2538
- GENERIC_FAILURE,
2539
- getDotPath,
2540
- check,
2541
- description,
2542
- finite,
2543
- integer,
2544
- isoDate,
2545
- isoTimestamp,
2546
- maxEntries,
2547
- maxLength,
2548
- maxValue,
2549
- minLength,
2550
- minValue,
2551
- nonEmpty,
2552
- regex,
2553
- safeInteger,
2554
- startsWith,
2555
- transform,
2556
- trim,
2557
- url,
2558
- forward,
2559
- array,
2560
- boolean,
2561
- custom,
2562
- exactOptional,
2563
- function_,
2564
- lazy,
2565
- literal,
2566
- looseObject,
2567
- null_,
2568
- nullable,
2569
- nullish,
2570
- number,
2571
- object,
2572
- objectWithRest,
2573
- optional,
2574
- picklist,
2575
- record,
2576
- strictObject,
2577
- string,
2578
- union,
2579
- unknown,
2580
- variant,
2581
- omit,
2582
- parse,
2583
- partial,
2584
- pick,
2585
- pipe,
2586
- safeParse,
2587
- summarize,
2588
- unwrap,
2589
- effectsSchema,
2590
- writes,
2591
- toJsonSchema,
2592
- toStandardJsonSchema,
2593
- word,
2594
- SNAKE_CASE,
2595
- text,
2596
- dottedId,
2597
- RegistryError,
2598
- parseRegistry,
2599
- duplicates,
2600
- jsonSchemaOf,
2601
- MAX_NEXT_STEPS,
2602
- COMPACT_FLAG,
2603
- isoTime,
2604
- reference,
2605
- pageSchema,
2606
- clockMeta,
2607
- listEnvelopeSchema,
2608
- itemEnvelopeSchema,
2609
- jsonlOf,
2610
- CRASH_CODE,
2611
- errorObjectSchema,
2612
- defineReasons,
2613
- defineSteps,
2614
- stepOf,
2615
- STEPS,
2616
- retryOf,
2617
- errorObjectOf,
2618
- exitCodeOfError,
2619
- exitCodeOfAnswer,
2620
- errorRecordOf,
2621
- renderError,
2622
- mcpErrorResult,
2623
- catchCrashes
2624
- };