@wirecat/zoom-cli 0.82.0 → 0.84.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (492) hide show
  1. package/README.md +12 -12
  2. package/contracts/wirecat.json +88 -55
  3. package/dist/account-removal.d.ts +1 -1
  4. package/dist/account-removal.d.ts.map +1 -1
  5. package/dist/account-removal.js +1 -1
  6. package/dist/account-removal.js.map +1 -1
  7. package/dist/agent-skill.js +1 -1
  8. package/dist/agent-skill.js.map +1 -1
  9. package/dist/answer-entities.d.ts +1 -1
  10. package/dist/answer-entities.d.ts.map +1 -1
  11. package/dist/answer-entities.js +1 -1
  12. package/dist/answer-entities.js.map +1 -1
  13. package/dist/answer-output.d.ts +2 -2
  14. package/dist/answer-output.d.ts.map +1 -1
  15. package/dist/answer-output.js +1 -1
  16. package/dist/answer-output.js.map +1 -1
  17. package/dist/answer-policy.d.ts.map +1 -1
  18. package/dist/answer-policy.js +1 -2
  19. package/dist/answer-policy.js.map +1 -1
  20. package/dist/answers.js +1 -1
  21. package/dist/answers.js.map +1 -1
  22. package/dist/api.d.ts +2 -2
  23. package/dist/api.d.ts.map +1 -1
  24. package/dist/api.js +2 -2
  25. package/dist/api.js.map +1 -1
  26. package/dist/archive-commands.d.ts +1 -1
  27. package/dist/archive-commands.d.ts.map +1 -1
  28. package/dist/archive-commands.js +1 -2
  29. package/dist/archive-commands.js.map +1 -1
  30. package/dist/archive-import.d.ts +1 -1
  31. package/dist/archive-import.d.ts.map +1 -1
  32. package/dist/archive-import.js +1 -1
  33. package/dist/archive-import.js.map +1 -1
  34. package/dist/archive-transcripts.d.ts +1 -1
  35. package/dist/archive-transcripts.d.ts.map +1 -1
  36. package/dist/archive-transcripts.js +1 -2
  37. package/dist/archive-transcripts.js.map +1 -1
  38. package/dist/bin/main.js +4 -17
  39. package/dist/bin/main.js.map +1 -1
  40. package/dist/bin/zm.js +11 -11
  41. package/dist/bundle/answer-policy-OQQWAUHH.js +33 -0
  42. package/dist/bundle/chunk-3YDF76DP.js +922 -0
  43. package/dist/bundle/chunk-AEWYRB6F.js +8 -0
  44. package/dist/bundle/chunk-AF2Z6VOG.js +137 -0
  45. package/dist/bundle/{chunk-MAJJ4PG3.js → chunk-DAYBU7WR.js} +79 -396
  46. package/dist/bundle/{chunk-XQQVMECZ.js → chunk-JD63PEI3.js} +3 -8
  47. package/dist/bundle/{chunk-UL2PXLKT.js → chunk-L5ZYKXAY.js} +392 -129
  48. package/dist/bundle/{chunk-2SWKQ7C4.js → chunk-W4TDCCT3.js} +8 -2
  49. package/dist/bundle/{chunk-AC6VJNMJ.js → chunk-W6YFWJDR.js} +2 -5
  50. package/dist/bundle/{chunk-434YFJAE.js → chunk-WSGD5Q6L.js} +3 -9
  51. package/dist/bundle/config-MP5YLHEY.js +29 -0
  52. package/dist/bundle/{folders-LXOL4N4S.js → folders-B2GKJOC2.js} +2 -7
  53. package/dist/bundle/{main-YAA7WQ23.js → main-YZPLPXB7.js} +21 -53
  54. package/dist/bundle/{output-file-2UB5JP3R.js → output-file-PKA7MJEP.js} +3 -11
  55. package/dist/bundle/{program-GVCGZP27.js → program-7JY6XJ6K.js} +714 -935
  56. package/dist/bundle/run-log-ML7ZCWXD.js +54 -0
  57. package/dist/bundle/store-connection-LQGKS3DN.js +21 -0
  58. package/dist/bundle/streaming-PRGWGNHY.js +12 -0
  59. package/dist/bundle/tokens-57RJVBK6.js +18 -0
  60. package/dist/bundle/zm.js +4 -161
  61. package/dist/bundle/{zoom-app-YWFB367P.js → zoom-app-EYJST6GF.js} +4 -10
  62. package/dist/chat-file.d.ts +1 -1
  63. package/dist/chat-file.d.ts.map +1 -1
  64. package/dist/commands.d.ts +1 -8
  65. package/dist/commands.d.ts.map +1 -1
  66. package/dist/commands.js +3 -33
  67. package/dist/commands.js.map +1 -1
  68. package/dist/config-issues.d.ts +1 -1
  69. package/dist/config-issues.d.ts.map +1 -1
  70. package/dist/config-issues.js +1 -1
  71. package/dist/config-issues.js.map +1 -1
  72. package/dist/config.d.ts +1 -2
  73. package/dist/config.d.ts.map +1 -1
  74. package/dist/config.js +1 -2
  75. package/dist/config.js.map +1 -1
  76. package/dist/contacts-commands.d.ts +1 -1
  77. package/dist/contacts-commands.d.ts.map +1 -1
  78. package/dist/contacts-commands.js +1 -1
  79. package/dist/contacts-commands.js.map +1 -1
  80. package/dist/contract-overrides.js +1 -1
  81. package/dist/contract-overrides.js.map +1 -1
  82. package/dist/errors.d.ts +1 -1
  83. package/dist/errors.d.ts.map +1 -1
  84. package/dist/execution.d.ts +1 -1
  85. package/dist/execution.d.ts.map +1 -1
  86. package/dist/execution.js +1 -1
  87. package/dist/execution.js.map +1 -1
  88. package/dist/files.d.ts +2 -2
  89. package/dist/files.d.ts.map +1 -1
  90. package/dist/files.js +1 -1
  91. package/dist/files.js.map +1 -1
  92. package/dist/first-screen.js +1 -1
  93. package/dist/first-screen.js.map +1 -1
  94. package/dist/identity.d.ts +1 -1
  95. package/dist/identity.d.ts.map +1 -1
  96. package/dist/identity.js +6 -0
  97. package/dist/identity.js.map +1 -1
  98. package/dist/index.d.ts +1 -2
  99. package/dist/index.d.ts.map +1 -1
  100. package/dist/index.js +1 -2
  101. package/dist/index.js.map +1 -1
  102. package/dist/ingestion-search-commands.d.ts +1 -1
  103. package/dist/ingestion-search-commands.d.ts.map +1 -1
  104. package/dist/ingestion-search-commands.js +1 -1
  105. package/dist/ingestion-search-commands.js.map +1 -1
  106. package/dist/local-transcription-commands.d.ts +1 -1
  107. package/dist/local-transcription-commands.d.ts.map +1 -1
  108. package/dist/local-transcription-commands.js +1 -2
  109. package/dist/local-transcription-commands.js.map +1 -1
  110. package/dist/local-transcription.d.ts +1 -2
  111. package/dist/local-transcription.d.ts.map +1 -1
  112. package/dist/local-transcription.js +3 -3
  113. package/dist/local-transcription.js.map +1 -1
  114. package/dist/meeting-commands.d.ts +1 -1
  115. package/dist/meeting-commands.d.ts.map +1 -1
  116. package/dist/meeting-commands.js +1 -2
  117. package/dist/meeting-commands.js.map +1 -1
  118. package/dist/meeting-communications-binding.d.ts +1 -2
  119. package/dist/meeting-communications-binding.d.ts.map +1 -1
  120. package/dist/meeting-communications-binding.js.map +1 -1
  121. package/dist/meeting-context-commands.d.ts +1 -1
  122. package/dist/meeting-context-commands.d.ts.map +1 -1
  123. package/dist/meeting-context-commands.js +1 -1
  124. package/dist/meeting-context-commands.js.map +1 -1
  125. package/dist/meeting-context.d.ts +2 -4
  126. package/dist/meeting-context.d.ts.map +1 -1
  127. package/dist/meeting-context.js +1 -1
  128. package/dist/meeting-context.js.map +1 -1
  129. package/dist/meeting-integration-commands.d.ts +1 -1
  130. package/dist/meeting-integration-commands.d.ts.map +1 -1
  131. package/dist/meeting-integration-commands.js +1 -2
  132. package/dist/meeting-integration-commands.js.map +1 -1
  133. package/dist/meeting-integration.d.ts +1 -1
  134. package/dist/meeting-integration.d.ts.map +1 -1
  135. package/dist/meeting-integration.js +1 -1
  136. package/dist/meeting-integration.js.map +1 -1
  137. package/dist/meeting-inventory.d.ts +1 -1
  138. package/dist/meeting-inventory.d.ts.map +1 -1
  139. package/dist/meeting-inventory.js +1 -1
  140. package/dist/meeting-inventory.js.map +1 -1
  141. package/dist/meeting-preparation.d.ts +1 -2
  142. package/dist/meeting-preparation.d.ts.map +1 -1
  143. package/dist/meeting-preparation.js +1 -1
  144. package/dist/meeting-preparation.js.map +1 -1
  145. package/dist/meeting-project-candidates.d.ts +1 -1
  146. package/dist/meeting-project-candidates.d.ts.map +1 -1
  147. package/dist/meeting-project-evidence-commands.d.ts +1 -1
  148. package/dist/meeting-project-evidence-commands.d.ts.map +1 -1
  149. package/dist/meeting-project-evidence-commands.js +1 -2
  150. package/dist/meeting-project-evidence-commands.js.map +1 -1
  151. package/dist/meeting-read-command-bindings.js +1 -1
  152. package/dist/meeting-read-command-bindings.js.map +1 -1
  153. package/dist/meeting-review-commands.d.ts +1 -3
  154. package/dist/meeting-review-commands.d.ts.map +1 -1
  155. package/dist/meeting-review-commands.js +1 -2
  156. package/dist/meeting-review-commands.js.map +1 -1
  157. package/dist/meeting-search-commands.d.ts +2 -3
  158. package/dist/meeting-search-commands.d.ts.map +1 -1
  159. package/dist/meeting-search-commands.js +2 -4
  160. package/dist/meeting-search-commands.js.map +1 -1
  161. package/dist/meeting-searches-commands.d.ts +1 -2
  162. package/dist/meeting-searches-commands.d.ts.map +1 -1
  163. package/dist/meeting-searches-commands.js +1 -2
  164. package/dist/meeting-searches-commands.js.map +1 -1
  165. package/dist/meeting-selection-options.d.ts +1 -1
  166. package/dist/meeting-selection-options.d.ts.map +1 -1
  167. package/dist/meeting-selection-options.js +1 -2
  168. package/dist/meeting-selection-options.js.map +1 -1
  169. package/dist/meeting-semantic-commands.d.ts +1 -2
  170. package/dist/meeting-semantic-commands.d.ts.map +1 -1
  171. package/dist/meeting-semantic-commands.js +1 -1
  172. package/dist/meeting-semantic-commands.js.map +1 -1
  173. package/dist/meeting-semantic.d.ts +2 -2
  174. package/dist/meeting-semantic.d.ts.map +1 -1
  175. package/dist/meeting-semantic.js +1 -1
  176. package/dist/meeting-semantic.js.map +1 -1
  177. package/dist/meeting-source.d.ts +1 -1
  178. package/dist/meeting-source.d.ts.map +1 -1
  179. package/dist/meeting-stats-commands.d.ts +1 -3
  180. package/dist/meeting-stats-commands.d.ts.map +1 -1
  181. package/dist/meeting-stats-commands.js +1 -2
  182. package/dist/meeting-stats-commands.js.map +1 -1
  183. package/dist/models-commands.d.ts +1 -1
  184. package/dist/models-commands.d.ts.map +1 -1
  185. package/dist/models-commands.js +1 -1
  186. package/dist/models-commands.js.map +1 -1
  187. package/dist/occurrence-schedule.d.ts +1 -1
  188. package/dist/occurrence-schedule.d.ts.map +1 -1
  189. package/dist/permissions.d.ts +1 -1
  190. package/dist/permissions.d.ts.map +1 -1
  191. package/dist/permissions.js +1 -2
  192. package/dist/permissions.js.map +1 -1
  193. package/dist/profile.js +1 -1
  194. package/dist/profile.js.map +1 -1
  195. package/dist/program-bindings.d.ts.map +1 -1
  196. package/dist/program-bindings.js +3 -13
  197. package/dist/program-bindings.js.map +1 -1
  198. package/dist/program.d.ts +4 -7
  199. package/dist/program.d.ts.map +1 -1
  200. package/dist/program.js +1 -1
  201. package/dist/program.js.map +1 -1
  202. package/dist/progress-commands.d.ts +1 -1
  203. package/dist/progress-commands.d.ts.map +1 -1
  204. package/dist/progress-commands.js +1 -2
  205. package/dist/progress-commands.js.map +1 -1
  206. package/dist/read-only.js +1 -1
  207. package/dist/read-only.js.map +1 -1
  208. package/dist/recording-archive.d.ts.map +1 -1
  209. package/dist/recording-archive.js +1 -2
  210. package/dist/recording-archive.js.map +1 -1
  211. package/dist/recording-manifest.js +1 -1
  212. package/dist/recording-manifest.js.map +1 -1
  213. package/dist/recording-partial-store.d.ts +2 -3
  214. package/dist/recording-partial-store.d.ts.map +1 -1
  215. package/dist/recording-partial-store.js +1 -1
  216. package/dist/recording-partial-store.js.map +1 -1
  217. package/dist/recording-promotion-store.d.ts +1 -2
  218. package/dist/recording-promotion-store.d.ts.map +1 -1
  219. package/dist/recording-promotion-store.js +1 -2
  220. package/dist/recording-promotion-store.js.map +1 -1
  221. package/dist/recording-schedule-commands.d.ts +1 -1
  222. package/dist/recording-schedule-commands.d.ts.map +1 -1
  223. package/dist/recording-schedule-commands.js +1 -1
  224. package/dist/recording-schedule-commands.js.map +1 -1
  225. package/dist/recording-schedule-store.js +1 -1
  226. package/dist/recording-schedule-store.js.map +1 -1
  227. package/dist/recording-schedule-systemd.js +1 -1
  228. package/dist/recording-schedule-systemd.js.map +1 -1
  229. package/dist/recording-schedule.d.ts +1 -1
  230. package/dist/recording-schedule.d.ts.map +1 -1
  231. package/dist/recording-schedule.js +1 -1
  232. package/dist/recording-schedule.js.map +1 -1
  233. package/dist/recording-sync-store.d.ts +1 -1
  234. package/dist/recording-sync-store.d.ts.map +1 -1
  235. package/dist/recording-sync-store.js +1 -2
  236. package/dist/recording-sync-store.js.map +1 -1
  237. package/dist/recording-sync.d.ts +1 -1
  238. package/dist/recording-sync.d.ts.map +1 -1
  239. package/dist/recording-sync.js +1 -1
  240. package/dist/recording-sync.js.map +1 -1
  241. package/dist/recording-writer-lease.d.ts +1 -1
  242. package/dist/recording-writer-lease.d.ts.map +1 -1
  243. package/dist/recording-writer-lease.js +1 -1
  244. package/dist/recording-writer-lease.js.map +1 -1
  245. package/dist/recordings.d.ts +1 -1
  246. package/dist/recordings.d.ts.map +1 -1
  247. package/dist/recordings.js.map +1 -1
  248. package/dist/remote-meetings.d.ts +19 -19
  249. package/dist/remote-meetings.d.ts.map +1 -1
  250. package/dist/remote-meetings.js +1 -1
  251. package/dist/remote-meetings.js.map +1 -1
  252. package/dist/request-events.d.ts +1 -1
  253. package/dist/request-events.d.ts.map +1 -1
  254. package/dist/request-events.js +1 -1
  255. package/dist/request-events.js.map +1 -1
  256. package/dist/run-log.d.ts +1 -1
  257. package/dist/run-log.d.ts.map +1 -1
  258. package/dist/run-log.js +1 -1
  259. package/dist/run-log.js.map +1 -1
  260. package/dist/run.d.ts +1 -1
  261. package/dist/run.d.ts.map +1 -1
  262. package/dist/run.js +6 -2
  263. package/dist/run.js.map +1 -1
  264. package/dist/series-inventory.d.ts +2 -2
  265. package/dist/series-inventory.js +1 -1
  266. package/dist/series-inventory.js.map +1 -1
  267. package/dist/setup-commands.d.ts +6 -15
  268. package/dist/setup-commands.d.ts.map +1 -1
  269. package/dist/setup-commands.js +7 -142
  270. package/dist/setup-commands.js.map +1 -1
  271. package/dist/store-commands.d.ts +1 -1
  272. package/dist/store-commands.d.ts.map +1 -1
  273. package/dist/store-commands.js +1 -2
  274. package/dist/store-commands.js.map +1 -1
  275. package/dist/store-connection.d.ts +1 -3
  276. package/dist/store-connection.d.ts.map +1 -1
  277. package/dist/store-connection.js +14 -14
  278. package/dist/store-connection.js.map +1 -1
  279. package/dist/sync-progress.d.ts +4 -4
  280. package/dist/sync-progress.d.ts.map +1 -1
  281. package/dist/sync-progress.js +1 -1
  282. package/dist/sync-progress.js.map +1 -1
  283. package/dist/tokens.d.ts +20 -44
  284. package/dist/tokens.d.ts.map +1 -1
  285. package/dist/tokens.js +95 -308
  286. package/dist/tokens.js.map +1 -1
  287. package/dist/unified-search.d.ts +1 -1
  288. package/dist/unified-search.d.ts.map +1 -1
  289. package/dist/upcoming-meetings.d.ts +2 -2
  290. package/dist/upcoming-meetings.js +1 -1
  291. package/dist/upcoming-meetings.js.map +1 -1
  292. package/dist/upgrade.d.ts.map +1 -1
  293. package/dist/upgrade.js +1 -2
  294. package/dist/upgrade.js.map +1 -1
  295. package/dist/version.d.ts +1 -1
  296. package/dist/version.js +1 -1
  297. package/dist/watch-commands.d.ts +1 -2
  298. package/dist/watch-commands.d.ts.map +1 -1
  299. package/dist/watch-commands.js +1 -2
  300. package/dist/watch-commands.js.map +1 -1
  301. package/dist/watch-service.d.ts +1 -1
  302. package/dist/watch-service.d.ts.map +1 -1
  303. package/dist/watch-service.js +1 -1
  304. package/dist/watch-service.js.map +1 -1
  305. package/dist/zoom-app.d.ts +2 -2
  306. package/dist/zoom-app.d.ts.map +1 -1
  307. package/dist/zoom-app.js +2 -2
  308. package/dist/zoom-app.js.map +1 -1
  309. package/dist/zoom-search-commands.d.ts +1 -1
  310. package/dist/zoom-search-commands.d.ts.map +1 -1
  311. package/dist/zoom-search-commands.js +1 -1
  312. package/dist/zoom-search-commands.js.map +1 -1
  313. package/dist/zoom-session.d.ts +6 -0
  314. package/dist/zoom-session.d.ts.map +1 -0
  315. package/dist/zoom-session.js +72 -0
  316. package/dist/zoom-session.js.map +1 -0
  317. package/package.json +3 -3
  318. package/scenarios/person-in-meetings.md +1 -1
  319. package/skills/zoom-cli/SKILL.md +1 -1
  320. package/skills/zoom-cli/references/people-and-projects.md +5 -5
  321. package/skills/zoom-cli/references/prepare.md +2 -2
  322. package/skills/zoom-cli/references/setup.md +2 -2
  323. package/dist/bundle/agent-F4TRJWWS.js +0 -46
  324. package/dist/bundle/all-profiles-RULEKTDQ.js +0 -321
  325. package/dist/bundle/answer-policy-6XC57AEZ.js +0 -131
  326. package/dist/bundle/anthropic-4NAQBZFL.js +0 -91
  327. package/dist/bundle/app-server-VLR42U5L.js +0 -266
  328. package/dist/bundle/bun-OPDGMZZQ.js +0 -169
  329. package/dist/bundle/bun-sqlite-HC6X4AOX.js +0 -76
  330. package/dist/bundle/chunk-274SLQNW.js +0 -54
  331. package/dist/bundle/chunk-2CI2OEZQ.js +0 -101
  332. package/dist/bundle/chunk-2DBF2IIC.js +0 -330
  333. package/dist/bundle/chunk-2GP573Q4.js +0 -67190
  334. package/dist/bundle/chunk-2JHVQMVC.js +0 -16
  335. package/dist/bundle/chunk-2XBDILVW.js +0 -53
  336. package/dist/bundle/chunk-3HC5F3P7.js +0 -24
  337. package/dist/bundle/chunk-3YM4B2GT.js +0 -63
  338. package/dist/bundle/chunk-4HLQ2JGK.js +0 -276
  339. package/dist/bundle/chunk-4N7PP76S.js +0 -6848
  340. package/dist/bundle/chunk-52Y4ETKU.js +0 -230
  341. package/dist/bundle/chunk-5HAUK3I4.js +0 -27160
  342. package/dist/bundle/chunk-5KYQ53EF.js +0 -357
  343. package/dist/bundle/chunk-5TU7Y5UW.js +0 -218
  344. package/dist/bundle/chunk-66ALX4ZI.js +0 -1068
  345. package/dist/bundle/chunk-676C2LE6.js +0 -229
  346. package/dist/bundle/chunk-6CWL5BKG.js +0 -3012
  347. package/dist/bundle/chunk-6QYZP4E2.js +0 -73
  348. package/dist/bundle/chunk-6VK332XS.js +0 -170
  349. package/dist/bundle/chunk-73MOMNLL.js +0 -94
  350. package/dist/bundle/chunk-7QPIUMUG.js +0 -198
  351. package/dist/bundle/chunk-7UVDPRFK.js +0 -259
  352. package/dist/bundle/chunk-A6EZK5RG.js +0 -142
  353. package/dist/bundle/chunk-ACI4YIEH.js +0 -331
  354. package/dist/bundle/chunk-AIKFOBDO.js +0 -1024
  355. package/dist/bundle/chunk-ASBDFXLS.js +0 -295
  356. package/dist/bundle/chunk-B32KZRQM.js +0 -2338
  357. package/dist/bundle/chunk-BBGJQMRI.js +0 -34
  358. package/dist/bundle/chunk-BDKVOU3I.js +0 -52
  359. package/dist/bundle/chunk-BP4FYANF.js +0 -335
  360. package/dist/bundle/chunk-D72URWJE.js +0 -532
  361. package/dist/bundle/chunk-DCYFT3FR.js +0 -161
  362. package/dist/bundle/chunk-DFDN6AUB.js +0 -21
  363. package/dist/bundle/chunk-DNCLQPOM.js +0 -7
  364. package/dist/bundle/chunk-DSZYABYL.js +0 -808
  365. package/dist/bundle/chunk-E745WZKY.js +0 -1199
  366. package/dist/bundle/chunk-EGTCQKHV.js +0 -340
  367. package/dist/bundle/chunk-EQG3PIH2.js +0 -108
  368. package/dist/bundle/chunk-ESN3W2MZ.js +0 -2624
  369. package/dist/bundle/chunk-FXBHOCJK.js +0 -24600
  370. package/dist/bundle/chunk-G46WJ7YO.js +0 -95
  371. package/dist/bundle/chunk-G6PETRMV.js +0 -64
  372. package/dist/bundle/chunk-GBHMT2IU.js +0 -755
  373. package/dist/bundle/chunk-GGMAIIVE.js +0 -38
  374. package/dist/bundle/chunk-GTKPMYK7.js +0 -72
  375. package/dist/bundle/chunk-GWGHH56B.js +0 -374
  376. package/dist/bundle/chunk-HC6VN5CO.js +0 -692
  377. package/dist/bundle/chunk-HP7A2ZOP.js +0 -185
  378. package/dist/bundle/chunk-HTQTIKWP.js +0 -928
  379. package/dist/bundle/chunk-HZENBDW2.js +0 -209
  380. package/dist/bundle/chunk-IANKXHSE.js +0 -46
  381. package/dist/bundle/chunk-ICPJT672.js +0 -228
  382. package/dist/bundle/chunk-JQ54DYAQ.js +0 -80
  383. package/dist/bundle/chunk-K5JGJIV2.js +0 -640
  384. package/dist/bundle/chunk-KJ6USQDZ.js +0 -616
  385. package/dist/bundle/chunk-KKFY23AK.js +0 -5150
  386. package/dist/bundle/chunk-KQPUVXKX.js +0 -84
  387. package/dist/bundle/chunk-KVJ3I7UL.js +0 -1007
  388. package/dist/bundle/chunk-KWU46LNK.js +0 -288
  389. package/dist/bundle/chunk-KXJ3JEDH.js +0 -2
  390. package/dist/bundle/chunk-L75SMSJR.js +0 -133
  391. package/dist/bundle/chunk-LAYYO4WD.js +0 -31
  392. package/dist/bundle/chunk-LEKKTJKK.js +0 -2336
  393. package/dist/bundle/chunk-M7H4MCAX.js +0 -388
  394. package/dist/bundle/chunk-MQLPZBMQ.js +0 -58
  395. package/dist/bundle/chunk-N3JLO63O.js +0 -13
  396. package/dist/bundle/chunk-N46F72AF.js +0 -410
  397. package/dist/bundle/chunk-NB7EOAUZ.js +0 -123
  398. package/dist/bundle/chunk-NEMX3UNN.js +0 -76
  399. package/dist/bundle/chunk-OBXQLFT5.js +0 -82
  400. package/dist/bundle/chunk-OGNO35A2.js +0 -262
  401. package/dist/bundle/chunk-OIPYBF43.js +0 -100
  402. package/dist/bundle/chunk-OO4TRVPB.js +0 -185
  403. package/dist/bundle/chunk-OQFQ77AY.js +0 -9352
  404. package/dist/bundle/chunk-PL5P7UKW.js +0 -25216
  405. package/dist/bundle/chunk-PMUPN6JW.js +0 -773
  406. package/dist/bundle/chunk-PSKTMMCO.js +0 -561
  407. package/dist/bundle/chunk-PWVJUIDQ.js +0 -106
  408. package/dist/bundle/chunk-Q7ICVP25.js +0 -18
  409. package/dist/bundle/chunk-QG6PILDO.js +0 -195
  410. package/dist/bundle/chunk-QPHBK63S.js +0 -25
  411. package/dist/bundle/chunk-QVSL5WJ7.js +0 -46524
  412. package/dist/bundle/chunk-QVYAV7F2.js +0 -58
  413. package/dist/bundle/chunk-R2B6PUVI.js +0 -206
  414. package/dist/bundle/chunk-RQOZBTNI.js +0 -86
  415. package/dist/bundle/chunk-T7IAWEBU.js +0 -362
  416. package/dist/bundle/chunk-TKNM22OH.js +0 -71
  417. package/dist/bundle/chunk-TKVBFJ5C.js +0 -37
  418. package/dist/bundle/chunk-TXDR6YSF.js +0 -23
  419. package/dist/bundle/chunk-TY7NDMFY.js +0 -46
  420. package/dist/bundle/chunk-UAWSINMC.js +0 -875
  421. package/dist/bundle/chunk-UKAAAOPC.js +0 -1251
  422. package/dist/bundle/chunk-UQCTXZEP.js +0 -214
  423. package/dist/bundle/chunk-UR5DBODY.js +0 -1345
  424. package/dist/bundle/chunk-V5EJSF2B.js +0 -12235
  425. package/dist/bundle/chunk-VB72LTSZ.js +0 -210
  426. package/dist/bundle/chunk-VB7FZOYX.js +0 -633
  427. package/dist/bundle/chunk-VS6WURLX.js +0 -217
  428. package/dist/bundle/chunk-VZ5PPYDG.js +0 -77
  429. package/dist/bundle/chunk-W5QHB53X.js +0 -3752
  430. package/dist/bundle/chunk-WMANRJR5.js +0 -555
  431. package/dist/bundle/chunk-WOPVBRPV.js +0 -29
  432. package/dist/bundle/chunk-XQ2WL3HB.js +0 -140
  433. package/dist/bundle/chunk-Y5E2WNWB.js +0 -35
  434. package/dist/bundle/chunk-Y6PVS55U.js +0 -800
  435. package/dist/bundle/chunk-YJXJJ2XP.js +0 -2333
  436. package/dist/bundle/chunk-YY7XKHDY.js +0 -79
  437. package/dist/bundle/chunk-ZED2CJW5.js +0 -353
  438. package/dist/bundle/chunk-ZOYOXWJB.js +0 -746
  439. package/dist/bundle/chunk-ZVVMGPBJ.js +0 -50
  440. package/dist/bundle/cli-U4O5XB7J.js +0 -1255
  441. package/dist/bundle/command-contract-FBTK6GQX.js +0 -45
  442. package/dist/bundle/command-server-entry-KKH6ZWJV.js +0 -175
  443. package/dist/bundle/config-FRJSIZNN.js +0 -118
  444. package/dist/bundle/decode-TPCNXEK4.js +0 -31
  445. package/dist/bundle/dispatch-FKMIPCPQ.js +0 -412
  446. package/dist/bundle/dist-7CLBCYZN.js +0 -321
  447. package/dist/bundle/dist-PAKDDIBT.js +0 -191
  448. package/dist/bundle/dist-XUFQCJXW.js +0 -7577
  449. package/dist/bundle/echarts-O3TNDAXJ.js +0 -42501
  450. package/dist/bundle/embed-WCJSFVSK.js +0 -38
  451. package/dist/bundle/embedder-TBBUPXBX.js +0 -111
  452. package/dist/bundle/failure-XTWBYI2A.js +0 -25
  453. package/dist/bundle/first-run-ELEMFW42.js +0 -29
  454. package/dist/bundle/first-screen-DIOBWMKP.js +0 -46
  455. package/dist/bundle/instructions-AMH5RWVJ.js +0 -11
  456. package/dist/bundle/mcp-5HFPWC3W.js +0 -167
  457. package/dist/bundle/meeting-combined-UXCF4SJ3.js +0 -26
  458. package/dist/bundle/meeting-model-3BZJ3EQP.js +0 -26
  459. package/dist/bundle/meeting-semantic-3HU7I2SJ.js +0 -23
  460. package/dist/bundle/meetings-XWMB6FOH.js +0 -332
  461. package/dist/bundle/node-EGMCBAO7.js +0 -176
  462. package/dist/bundle/node-KM3CUABH.js +0 -2340
  463. package/dist/bundle/node-TLZSIHIJ.js +0 -21
  464. package/dist/bundle/node-sqlite-IJBWENFX.js +0 -74
  465. package/dist/bundle/oauth-SZDDAP7A.js +0 -20
  466. package/dist/bundle/open-NS3TMKZX.js +0 -23
  467. package/dist/bundle/openai-4DN6WI3B.js +0 -28
  468. package/dist/bundle/process-SGHEN6MQ.js +0 -91
  469. package/dist/bundle/prompt-HJFMPFVC.js +0 -17
  470. package/dist/bundle/public-C2ZB2AGQ.js +0 -198
  471. package/dist/bundle/recognize-2SEI5PPM.js +0 -26
  472. package/dist/bundle/remote-2DMS74XE.js +0 -32
  473. package/dist/bundle/rerank-H6GCYVIA.js +0 -52
  474. package/dist/bundle/run-log-QU26SUZP.js +0 -145
  475. package/dist/bundle/serve-ODVRPFJO.js +0 -199
  476. package/dist/bundle/server-NBPF6IDZ.js +0 -95
  477. package/dist/bundle/server-PCLIO24L.js +0 -228
  478. package/dist/bundle/services-4QAPXBLO.js +0 -607
  479. package/dist/bundle/speech-MA6ZT3WE.js +0 -89
  480. package/dist/bundle/sqlite-runtime-PVMAUXRN.js +0 -20
  481. package/dist/bundle/state-QFMTYUME.js +0 -36
  482. package/dist/bundle/store-25OTAQC3.js +0 -187
  483. package/dist/bundle/store-F724QIKJ.js +0 -305
  484. package/dist/bundle/store-connection-OGPXANGB.js +0 -111
  485. package/dist/bundle/store-maintenance-command-2CM7LLNQ.js +0 -83
  486. package/dist/bundle/streaming-S22C4DG5.js +0 -18
  487. package/dist/bundle/surface-7PXHWCF6.js +0 -81
  488. package/dist/bundle/tokens-NLUHA2DW.js +0 -25
  489. package/dist/login.d.ts +0 -16
  490. package/dist/login.d.ts.map +0 -1
  491. package/dist/login.js +0 -98
  492. package/dist/login.js.map +0 -1
@@ -1,875 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import {
4
- RegistryError,
5
- SNAKE_CASE,
6
- array,
7
- boolean,
8
- defineReasons,
9
- duplicates,
10
- integer,
11
- lazy,
12
- literal,
13
- minValue,
14
- number,
15
- object,
16
- optional,
17
- picklist,
18
- pipe,
19
- reference,
20
- string,
21
- variant
22
- } from "./chunk-ESN3W2MZ.js";
23
- import {
24
- CliError,
25
- isCliError
26
- } from "./chunk-IANKXHSE.js";
27
- import {
28
- __name
29
- } from "./chunk-ZVVMGPBJ.js";
30
-
31
- // 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/query/help.js
32
- var shownOf = /* @__PURE__ */ __name((registry) => registry.backend === "native" ? registry.fields.filter((field) => field.native) : registry.fields, "shownOf");
33
- var leftOut = /* @__PURE__ */ __name((fields) => fields.filter((field) => field.negatable).map((field) => field.name), "leftOut");
34
- var has = /* @__PURE__ */ __name((fields, operator) => fields.some((field) => field.operators.includes(operator)), "has");
35
- var syntaxOf = /* @__PURE__ */ __name((shown, backend) => [
36
- "field:value",
37
- ...has(shown, "phrase") ? ['"a phrase"'] : [],
38
- ...has(shown, "wildcard") ? ["word*"] : [],
39
- ...backend === "native" ? ["terms joined by AND"] : ["AND OR NOT", "( )"],
40
- ...has(shown, "range") ? ["[a TO b] \xB7 > >= < <="] : []
41
- ].join(" \xB7 "), "syntaxOf");
42
- var kindOf = /* @__PURE__ */ __name((field) => field.values ? `${field.type}: ${field.values.join("|")}` : `${field.type}: ${field.operators.join(", ")}`, "kindOf");
43
- var fieldsHelp = /* @__PURE__ */ __name((registry, guide) => {
44
- const shown = shownOf(registry);
45
- const negatable = leftOut(shown);
46
- const rows = shown.map((field) => [field.name, kindOf(field), field.example]);
47
- const widths = [0, 1].map((at) => Math.max(...rows.map((row) => (row[at] ?? "").length)));
48
- return [
49
- "Fields:",
50
- ...rows.map(([name = "", kind = "", example = ""]) => ` ${name.padEnd(widths[0] ?? 0)} ${kind.padEnd(widths[1] ?? 0)} ${example}`.trimEnd()),
51
- ...registry.defaults && registry.defaults.length > 0 ? [`Defaults: ${registry.defaults.join(" ")} \u2014 name the field to change it`] : [],
52
- ...negatable.length > 0 ? [`Leave out: -${negatable[0]}:value or NOT ${negatable[0]}:value, for ${negatable.join(", ")}`] : [],
53
- `Syntax: ${syntaxOf(shown, registry.backend)}`,
54
- ...guide ? [`Guide: ${guide}`] : []
55
- ].join("\n");
56
- }, "fieldsHelp");
57
- var queryDescription = /* @__PURE__ */ __name((registry) => {
58
- const shown = shownOf(registry);
59
- if (shown.length === 0)
60
- return "field:value terms; this list filters by none yet, so any term is refused";
61
- const negatable = leftOut(shown);
62
- const terms = registry.backend === "native" ? `field:value terms joined by AND that narrow the list${negatable.length > 0 ? `; -field:value or NOT field:value leaves out what matches, for ${negatable.join(", ")} only` : ""}` : `field:value terms that narrow the list (Lucene: AND OR NOT, -field:value${has(shown, "range") ? ", [a TO b], > <" : ""})`;
63
- const fields = shown.map((field) => field.values ? `${field.name} (${field.values.join("|")})` : field.name);
64
- const defaults = registry.defaults?.length ? `; unless named: ${registry.defaults.join(" ")}` : "";
65
- return `${terms}; fields: ${fields.join(", ")}; e.g. ${shown[0]?.example ?? ""}${defaults}`;
66
- }, "queryDescription");
67
-
68
- // 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/query/types.js
69
- var QUERY_LIMITS = {
70
- bytes: 8192,
71
- depth: 32,
72
- nodes: 256
73
- };
74
- var spanSchema = object({ start: number(), end: number() });
75
- var predicateSchema = object({
76
- kind: literal("predicate"),
77
- field: string(),
78
- operator: picklist(["term", "phrase", "wildcard", "regex", "range"]),
79
- value: string(),
80
- upper: optional(string()),
81
- lower_inclusive: optional(boolean()),
82
- upper_inclusive: optional(boolean()),
83
- span: spanSchema,
84
- implicit: optional(literal(true)),
85
- slop: optional(pipe(number(), integer(), minValue(0)))
86
- });
87
- var queryNodeSchema = variant("kind", [
88
- predicateSchema,
89
- object({
90
- kind: literal("boolean"),
91
- clauses: array(object({ occur: picklist(["must", "should", "must_not"]), node: lazy(() => queryNodeSchema) })),
92
- span: spanSchema
93
- })
94
- ]);
95
- var queryAstSchema = object({
96
- version: literal(1),
97
- language: literal("lucene-v1"),
98
- root: queryNodeSchema
99
- });
100
- function queryError(reason, span, alternative, context = {}, details = {}) {
101
- throw new CliError("validation_error", `${context.command ?? "query"}: ${reason} at position ${span.start + 1}${alternative ? ` \u2014 ${alternative}` : ""}`, {
102
- reason,
103
- span,
104
- ...alternative ? { alternative } : {},
105
- ...context.guide ? { guide: context.guide } : {},
106
- ...details
107
- });
108
- }
109
- __name(queryError, "queryError");
110
- var walkQuery = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => walkQuery(node2)), "walkQuery");
111
-
112
- // 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/query/dates.js
113
- var timezoneOf = /* @__PURE__ */ __name((given) => {
114
- const zone = given ?? Intl.DateTimeFormat().resolvedOptions().timeZone ?? "UTC";
115
- try {
116
- new Intl.DateTimeFormat("en", { timeZone: zone }).format(0);
117
- } catch {
118
- queryError("query.invalid-timezone", { start: 0, end: 0 }, "use an IANA timezone such as Europe/Madrid");
119
- }
120
- return zone;
121
- }, "timezoneOf");
122
- var calendar = /* @__PURE__ */ __name((value, span) => {
123
- if (!/^\d{4}-\d{2}-\d{2}$/u.test(value))
124
- queryError("query.invalid-date", span, "use an ISO date such as 2026-10-01");
125
- const year = Number(value.slice(0, 4)), month = Number(value.slice(5, 7)), day = Number(value.slice(8, 10));
126
- const date = /* @__PURE__ */ new Date(0);
127
- date.setUTCFullYear(year, month - 1, day);
128
- date.setUTCHours(0, 0, 0, 0);
129
- if (date.getUTCFullYear() !== year || date.getUTCMonth() !== month - 1 || date.getUTCDate() !== day)
130
- queryError("query.invalid-date", span);
131
- return date;
132
- }, "calendar");
133
- var dayBoundary = /* @__PURE__ */ __name((value, zone, next, span) => {
134
- const date = calendar(value, span);
135
- if (next)
136
- date.setUTCDate(date.getUTCDate() + 1);
137
- const wanted = date.getUTCFullYear() * 1e4 + (date.getUTCMonth() + 1) * 100 + date.getUTCDate();
138
- const formatter = new Intl.DateTimeFormat("en-CA", {
139
- timeZone: zone,
140
- year: "numeric",
141
- month: "2-digit",
142
- day: "2-digit",
143
- era: "short"
144
- });
145
- const dayAt = /* @__PURE__ */ __name((time) => {
146
- const parts = formatter.formatToParts(time);
147
- const value2 = /* @__PURE__ */ __name((name) => Number(parts.find((p) => p.type === name)?.value), "value");
148
- const year = parts.find((p) => p.type === "era")?.value === "BC" ? 1 - value2("year") : value2("year");
149
- return year * 1e4 + value2("month") * 100 + value2("day");
150
- }, "dayAt");
151
- let lo = date.getTime() - 2 * 864e5, hi = date.getTime() + 2 * 864e5;
152
- while (lo < hi) {
153
- const mid = Math.floor((lo + hi) / 2);
154
- if (dayAt(mid) < wanted)
155
- lo = mid + 1;
156
- else
157
- hi = mid;
158
- }
159
- if (dayAt(lo) !== wanted)
160
- queryError("query.invalid-date", span, "this calendar day does not exist in the selected timezone");
161
- return lo;
162
- }, "dayBoundary");
163
- var WALL = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?$/u;
164
- var wallTime = /* @__PURE__ */ __name((value, zone, span) => {
165
- const [, year, month, day, hour, minute, second = "0", fraction = "0"] = WALL.exec(value) ?? [];
166
- if (year === void 0)
167
- queryError("query.invalid-date", span, "use YYYY-MM-DDTHH:mm, with optional seconds");
168
- const wanted = Date.UTC(Number(year), Number(month) - 1, Number(day), Number(hour), Number(minute), Number(second), Number(fraction.padEnd(3, "0")));
169
- const check = new Date(wanted);
170
- if (check.getUTCDate() !== Number(day) || check.getUTCHours() !== Number(hour) || check.getUTCMinutes() !== Number(minute) || check.getUTCSeconds() !== Number(second))
171
- queryError("query.invalid-date", span);
172
- const formatter = new Intl.DateTimeFormat("en-CA", {
173
- timeZone: zone,
174
- year: "numeric",
175
- month: "2-digit",
176
- day: "2-digit",
177
- hour: "2-digit",
178
- minute: "2-digit",
179
- second: "2-digit",
180
- hourCycle: "h23"
181
- });
182
- const shown = /* @__PURE__ */ __name((instant) => {
183
- const parts = Object.fromEntries(formatter.formatToParts(instant).map((part) => [part.type, Number(part.value)]));
184
- return Date.UTC(parts.year ?? 0, (parts.month ?? 1) - 1, parts.day, parts.hour, parts.minute, parts.second) + (instant % 1e3 + 1e3) % 1e3;
185
- }, "shown");
186
- const found = /* @__PURE__ */ new Set();
187
- for (const probe of [wanted - 864e5, wanted, wanted + 864e5]) {
188
- const candidate = wanted - (shown(probe) - probe);
189
- if (shown(candidate) === wanted)
190
- found.add(candidate);
191
- }
192
- if (found.size !== 1)
193
- queryError("query.invalid-date", span, "this local time is skipped or repeated by daylight saving; add an offset");
194
- return [...found][0];
195
- }, "wallTime");
196
- var ZONED = /(?:Z|[+-]\d{2}:?\d{2})$/iu;
197
- var zonedMoment = /* @__PURE__ */ __name((value, zone, span, { end = false } = {}) => {
198
- if (/^\d{4}-\d{2}-\d{2}$/u.test(value))
199
- return dayBoundary(value, zone, end, span) - (end ? 1 : 0);
200
- if (!ZONED.test(value))
201
- return wallTime(value, zone, span);
202
- const time = Date.parse(value);
203
- if (!/^\d{4}-\d{2}-\d{2}T/u.test(value) || !Number.isFinite(time))
204
- queryError("query.invalid-date", span);
205
- calendar(value.slice(0, 10), span);
206
- return time;
207
- }, "zonedMoment");
208
- var AGO = /^(\d+)(m|h|d)$/u;
209
- var MOMENT = /^(\d{4}-\d{2}-\d{2})[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.\d{1,3})?)?(Z|[+-]\d{2}:\d{2})?$/u;
210
- var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
211
- var dayOf = /* @__PURE__ */ __name((word, zone, now, span) => {
212
- const today = new Intl.DateTimeFormat("en-CA", {
213
- timeZone: zone,
214
- year: "numeric",
215
- month: "2-digit",
216
- day: "2-digit"
217
- }).format(now);
218
- if (word === "today")
219
- return today;
220
- const date = calendar(today, span);
221
- date.setUTCDate(date.getUTCDate() - 1);
222
- return date.toISOString().slice(0, 10);
223
- }, "dayOf");
224
- var dateEndpoint = /* @__PURE__ */ __name((value, zone, side, inclusive, span, now = Date.now()) => {
225
- if (value === "*")
226
- return { inclusive };
227
- const word = value.toLowerCase();
228
- if (word === "today" || word === "yesterday")
229
- return dateEndpoint(dayOf(word, zone, now, span), zone, side, inclusive, span);
230
- const [, amount, unit] = AGO.exec(word) ?? [];
231
- if (amount && unit)
232
- return { time: now - Number(amount) * (AGO_MS[unit] ?? 0), inclusive };
233
- if (/^\d{4}-\d{2}-\d{2}$/u.test(value))
234
- return {
235
- time: dayBoundary(value, zone, side === "lower" ? !inclusive : inclusive, span),
236
- inclusive: side === "lower"
237
- };
238
- const [, day, hour, minute, second = "0", offset] = MOMENT.exec(value) ?? [];
239
- if (day === void 0)
240
- queryError("query.invalid-date", span, "use an ISO date, a date and time such as 2026-10-01T09:00 (optional seconds and offset), today, yesterday or 30m/2h/7d ago");
241
- const moment = value.replace(" ", "T");
242
- if (offset === void 0)
243
- return { time: wallTime(moment, zone, span), inclusive };
244
- calendar(day, span);
245
- const time = Date.parse(moment);
246
- if (!Number.isFinite(time) || Number(hour) > 23 || Number(minute) > 59 || Number(second) > 59)
247
- queryError("query.invalid-date", span);
248
- return { time, inclusive };
249
- }, "dateEndpoint");
250
- var dateRange = /* @__PURE__ */ __name((lower, upper, lowerInclusive, upperInclusive, zone, span, now = Date.now()) => {
251
- const since = lower === upper && AGO.test(lower.toLowerCase());
252
- const lo = dateEndpoint(lower, zone, "lower", lowerInclusive, span, now);
253
- const hi = dateEndpoint(since ? "*" : upper, zone, "upper", upperInclusive, span, now);
254
- return {
255
- ...lo.time === void 0 ? {} : { lower: lo.time },
256
- ...hi.time === void 0 ? {} : { upper: hi.time },
257
- lower_inclusive: lo.inclusive,
258
- upper_inclusive: hi.inclusive
259
- };
260
- }, "dateRange");
261
-
262
- // 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/query/evaluate.js
263
- var wordsOf = /* @__PURE__ */ __name((text) => text.toLowerCase().match(/[\p{L}\p{N}]+/gu) ?? [], "wordsOf");
264
- var pattern = /* @__PURE__ */ __name((value) => new RegExp(`^${[...value].map((char) => char === "*" ? ".*" : char === "?" ? "." : char.replace(/[.+^${}()|[\]\\]/, "\\$&")).join("")}$`, "iu"), "pattern");
265
- var present = /* @__PURE__ */ __name((value) => value !== void 0 && value !== null && value !== "", "present");
266
- var matchOne = /* @__PURE__ */ __name((field, node, value, options) => {
267
- if (!present(value))
268
- return false;
269
- if (node.operator === "wildcard" && node.value === "*")
270
- return true;
271
- const text = String(value);
272
- switch (field.type) {
273
- case "txt": {
274
- const words = wordsOf(text);
275
- if (node.operator === "wildcard")
276
- return words.some((word) => pattern(node.value).test(word));
277
- const wanted = wordsOf(node.value);
278
- return words.some((_, at) => wanted.every((word, offset) => words[at + offset] === word));
279
- }
280
- case "num": {
281
- const number2 = Number(value);
282
- if (node.operator !== "range")
283
- return number2 === Number(node.value);
284
- const { value: lower, upper = "*", lower_inclusive: lowerInclusive, upper_inclusive: upperInclusive } = node;
285
- return (lower === "*" || (lowerInclusive ? number2 >= Number(lower) : number2 > Number(lower))) && (upper === "*" || (upperInclusive ? number2 <= Number(upper) : number2 < Number(upper)));
286
- }
287
- case "time": {
288
- const time = Date.parse(text);
289
- const [lower, upper, lowerInclusive, upperInclusive] = node.operator === "range" ? [node.value, node.upper ?? "*", node.lower_inclusive ?? true, node.upper_inclusive ?? true] : [node.value, node.value, true, true];
290
- const range = dateRange(lower, upper, lowerInclusive, upperInclusive, options.zone ?? "UTC", node.span, options.now);
291
- return (range.lower === void 0 || (range.lower_inclusive ? time >= range.lower : time > range.lower)) && (range.upper === void 0 || (range.upper_inclusive ? time <= range.upper : time < range.upper));
292
- }
293
- default:
294
- return node.operator === "wildcard" ? pattern(node.value).test(text) : text.toLowerCase() === node.value.toLowerCase();
295
- }
296
- }, "matchOne");
297
- var matches = /* @__PURE__ */ __name((node, item, byName, options) => {
298
- if (node.kind === "boolean") {
299
- const by = /* @__PURE__ */ __name((occur) => node.clauses.filter((clause) => clause.occur === occur), "by");
300
- const [must, should, mustNot] = [by("must"), by("should"), by("must_not")];
301
- const holds = /* @__PURE__ */ __name((clause) => matches(clause.node, item, byName, options), "holds");
302
- return must.every(holds) && !mustNot.some(holds) && (should.length === 0 || must.length > 0 || should.some(holds));
303
- }
304
- const field = byName.get(node.field);
305
- if (!field)
306
- throw new Error(`evaluate: no field "${node.field}"; validate the query first`);
307
- if (field.relation !== void 0) {
308
- if (!options.relation)
309
- throw new Error(`evaluate: "${node.field}" is a relation; pass options.relation`);
310
- return options.relation(node, item);
311
- }
312
- const value = item[node.field];
313
- return Array.isArray(value) ? value.some((one) => matchOne(field, node, one, options)) : matchOne(field, node, value, options);
314
- }, "matches");
315
- var evaluate = /* @__PURE__ */ __name((ast, fields, item, options = {}) => matches(ast.root, item, new Map(fields.map((field) => [field.name, field])), options), "evaluate");
316
-
317
- // 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/query/fields.js
318
- var FIELD_TYPES = ["kw", "txt", "enum", "num", "time", "bool", "ref"];
319
- var OPERATORS_BY_TYPE = {
320
- kw: ["term", "phrase", "wildcard"],
321
- txt: ["term", "phrase", "wildcard"],
322
- enum: ["term"],
323
- num: ["term", "range"],
324
- time: ["term", "range"],
325
- bool: ["term"],
326
- ref: ["term", "phrase"]
327
- };
328
- var QUERY_BACKENDS = ["sql", "native"];
329
- var unwrap = /* @__PURE__ */ __name((schema) => schema.wrapped ? unwrap(schema.wrapped) : schema, "unwrap");
330
- var REFERENCE_SOURCE = reference.pipe[1].requirement.source;
331
- var typeOf = /* @__PURE__ */ __name((schema) => {
332
- const plain = unwrap(schema);
333
- const actions = plain.pipe ?? [];
334
- switch (plain.type) {
335
- case "picklist":
336
- return { type: "enum", values: (plain.options ?? []).map(String) };
337
- case "number":
338
- return { type: "num" };
339
- case "boolean":
340
- return { type: "bool" };
341
- case "string":
342
- if (actions.some((action) => action.type === "iso_timestamp"))
343
- return { type: "time" };
344
- if (actions.some((action) => action.requirement instanceof RegExp && action.requirement.source === REFERENCE_SOURCE))
345
- return { type: "ref" };
346
- return { type: "kw" };
347
- case "array":
348
- return plain.item ? typeOf(plain.item) : void 0;
349
- default:
350
- return void 0;
351
- }
352
- }, "typeOf");
353
- var exampleOf = /* @__PURE__ */ __name((name, type, values) => ({
354
- kw: `${name}:abc`,
355
- txt: `${name}:word*`,
356
- enum: `${name}:${values?.[0] ?? "x"}`,
357
- num: `${name}>0`,
358
- time: `${name}>=7d`,
359
- bool: `${name}:true`,
360
- ref: `${name}:"note:42"`
361
- })[type], "exampleOf");
362
- var queryFieldsOf = /* @__PURE__ */ __name((schema, annotations = {}) => {
363
- const entries = unwrap(schema).entries ?? {};
364
- const excluded = new Set(annotations.exclude ?? []);
365
- const words = new Set(annotations.text ?? []);
366
- const native = new Set(annotations.native ?? []);
367
- const negatable = new Set(annotations.negatable ?? []);
368
- const finish = /* @__PURE__ */ __name((field) => ({
369
- ...field,
370
- operators: OPERATORS_BY_TYPE[field.type],
371
- example: annotations.examples?.[field.name] ?? field.example ?? exampleOf(field.name, field.type, field.values),
372
- ...native.has(field.name) ? { native: true } : {},
373
- ...negatable.has(field.name) ? { negatable: true } : {},
374
- ...annotations.validate?.[field.name] ? { validate: annotations.validate[field.name] } : {}
375
- }), "finish");
376
- const own = Object.entries(entries).flatMap(([name, entry]) => {
377
- if (excluded.has(name))
378
- return [];
379
- const found = typeOf(entry);
380
- if (!found)
381
- return [];
382
- return [finish({ name, ...found, ...words.has(name) && found.type === "kw" ? { type: "txt" } : {} })];
383
- });
384
- const relations = Object.entries(annotations.relations ?? {}).map(([name, relation]) => finish({ name, ...relation }));
385
- const states = annotations.states ? [
386
- finish({
387
- name: "is",
388
- type: "enum",
389
- values: Object.keys(annotations.states),
390
- relation: Object.entries(annotations.states).map(([state, meaning]) => `${state}: ${meaning}`).join("; ")
391
- })
392
- ] : [];
393
- return [...own, ...relations, ...states];
394
- }, "queryFieldsOf");
395
-
396
- // 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/query/parser.js
397
- var whitespace = /* @__PURE__ */ __name((c) => /[ \t\n\r\u3000]/u.test(c), "whitespace");
398
- var reserved = /* @__PURE__ */ new Set([
399
- "+",
400
- "-",
401
- "!",
402
- "(",
403
- ")",
404
- ":",
405
- "=",
406
- "^",
407
- "@",
408
- "<",
409
- ">",
410
- "[",
411
- "]",
412
- '"',
413
- "{",
414
- "}",
415
- "~",
416
- "\\",
417
- "/"
418
- ]);
419
- var decodeEscapes = /* @__PURE__ */ __name((raw, span, fail) => {
420
- let out = "";
421
- for (let at = 0; at < raw.length; at++) {
422
- if (raw[at] !== "\\") {
423
- out += raw[at];
424
- continue;
425
- }
426
- if (++at >= raw.length)
427
- fail("query.invalid-escape", span);
428
- if (raw[at] === "u") {
429
- const hex = raw.slice(at + 1, at + 5);
430
- if (!/^[0-9a-fA-F]{4}$/.test(hex))
431
- fail("query.invalid-escape", span);
432
- out += String.fromCharCode(Number.parseInt(hex, 16));
433
- at += 4;
434
- } else
435
- out += raw[at];
436
- }
437
- return out;
438
- }, "decodeEscapes");
439
- var tokensOf = /* @__PURE__ */ __name((text, fail = queryError) => {
440
- const tokens = [];
441
- let at = 0;
442
- let range = false;
443
- while (at < text.length) {
444
- const start = at;
445
- const c = text[at] ?? "";
446
- if (whitespace(c)) {
447
- at++;
448
- continue;
449
- }
450
- let kind = c;
451
- if (c === '"' || !range && c === "/") {
452
- at++;
453
- while (at < text.length && text[at] !== c) {
454
- if (text[at] === "\\" && (c === '"' || text[at + 1] === "/"))
455
- at++;
456
- at++;
457
- }
458
- if (at >= text.length)
459
- fail("query.unclosed-literal", { start, end: at }, c === "/" ? regexHint(text, start) : void 0);
460
- at++;
461
- if (c === "/" && /^[dgimsuvy]+(?:$|[ \t\n\r)])/.test(text.slice(at)))
462
- fail("query.unsupported-regex-flags", { start: at, end: at + 1 }, "Lucene regex does not take JavaScript flags");
463
- kind = c === '"' ? "quoted" : "regex";
464
- } else if (range && c !== "]" && c !== "}") {
465
- while (at < text.length && !whitespace(text[at] ?? "") && !["]", "}"].includes(text[at] ?? ""))
466
- at++;
467
- kind = "rangeValue";
468
- } else if (reserved.has(c)) {
469
- if (c === "\\") {
470
- at += 2;
471
- while (at < text.length && !whitespace(text[at] ?? "") && (!reserved.has(text[at] ?? "") || ["+", "-"].includes(text[at] ?? "")))
472
- at++;
473
- kind = "term";
474
- } else {
475
- at++;
476
- if ((c === "<" || c === ">") && text[at] === "=") {
477
- at++;
478
- kind += "=";
479
- }
480
- if (c === "[" || c === "{")
481
- range = true;
482
- if (c === "]" || c === "}")
483
- range = false;
484
- }
485
- } else {
486
- at++;
487
- while (at < text.length) {
488
- const next = text[at] ?? "";
489
- if (next === "\\") {
490
- if (at + 1 >= text.length)
491
- fail("query.invalid-escape", { start: at, end: at + 1 });
492
- at += 2;
493
- continue;
494
- }
495
- if (next === "@" && new RegExp("^@(?:\\p{L}|[\\p{L}\\p{N}][^\\s@]*\\.[\\p{L}\\p{N}])", "u").test(text.slice(at))) {
496
- at++;
497
- continue;
498
- }
499
- if (whitespace(next) || reserved.has(next) && next !== "+" && next !== "-")
500
- break;
501
- at++;
502
- }
503
- const [field, colon] = tokens.slice(-2);
504
- if (field?.kind === "term" && colon?.kind === ":" && colon.span.end === start && text[at] === ":" && /^[a-z][a-z_-]*$/u.test(text.slice(start, at)) && /^:[^\s()"]/u.test(text.slice(at)))
505
- while (at < text.length && !whitespace(text[at] ?? "") && !["(", ")", '"'].includes(text[at] ?? ""))
506
- at++;
507
- const raw = text.slice(start, at);
508
- kind = { AND: "AND", OR: "OR", NOT: "NOT", "&&": "AND", "||": "OR" }[raw] ?? (/^\d+(?:\.\d+)?$/u.test(raw) ? "number" : "term");
509
- }
510
- tokens.push({ kind, raw: text.slice(start, at), span: { start, end: at } });
511
- }
512
- tokens.push({ kind: "EOF", raw: "", span: { start: at, end: at } });
513
- return tokens;
514
- }, "tokensOf");
515
- var quoteHint = /* @__PURE__ */ __name((text, at) => {
516
- for (const match of text.matchAll(/(?<=^|[\s(])([\p{L}\p{N}_.-]+):([^\s"()]+)/gu)) {
517
- const [whole, field, value = ""] = match;
518
- if (at < match.index || at > match.index + whole.length)
519
- continue;
520
- return /[:=/?*~^@<>![\]{}\\]/u.test(value) ? `put the value in quotes: ${field}:"${value}"` : void 0;
521
- }
522
- return void 0;
523
- }, "quoteHint");
524
- var regexHint = /* @__PURE__ */ __name((text, at) => {
525
- const word = `${/[^\s()"]*$/u.exec(text.slice(0, at))?.[0] ?? ""}${/^[^\s()"]*/u.exec(text.slice(at))?.[0] ?? ""}`;
526
- return quoteHint(text, at) ?? `/ starts a regular expression; put the value in quotes: "${word}"`;
527
- }, "regexHint");
528
- var parseLucene = /* @__PURE__ */ __name((text, { defaultField = "text", proximity = false, ...context } = {}) => {
529
- const fail = /* @__PURE__ */ __name((reason, span, alternative) => queryError(reason, span, alternative ?? quoteHint(text, span.start), context), "fail");
530
- if (text.length > QUERY_LIMITS.bytes || new TextEncoder().encode(text).length > QUERY_LIMITS.bytes)
531
- fail("query.too-large", { start: 0, end: text.length });
532
- const tokens = tokensOf(text, fail);
533
- let at = 0;
534
- let count = 0;
535
- let depth = 0;
536
- const peek = /* @__PURE__ */ __name(() => tokens[at], "peek");
537
- const take = /* @__PURE__ */ __name(() => tokens[at++], "take");
538
- const expect = /* @__PURE__ */ __name((kind) => {
539
- if (peek().kind !== kind)
540
- fail("query.invalid-syntax", peek().span);
541
- return take();
542
- }, "expect");
543
- const built = /* @__PURE__ */ __name((node) => {
544
- if (++count > QUERY_LIMITS.nodes)
545
- fail("query.too-large", node.span);
546
- return node;
547
- }, "built");
548
- const combine = /* @__PURE__ */ __name((clauses, occur) => {
549
- const first = clauses[0];
550
- const last = clauses.at(-1);
551
- if (!first || !last)
552
- fail("query.invalid-syntax", peek().span);
553
- if (clauses.length === 1)
554
- return first;
555
- return {
556
- node: built({
557
- kind: "boolean",
558
- clauses: clauses.map(({ node, modifier }) => ({ node, occur: modifier ?? occur })),
559
- span: { start: first.node.span.start, end: last.node.span.end }
560
- })
561
- };
562
- }, "combine");
563
- const query = /* @__PURE__ */ __name((field, implicit = false) => {
564
- if (++depth > QUERY_LIMITS.depth)
565
- fail("query.too-large", peek().span);
566
- const clauses = [];
567
- do {
568
- clauses.push(disjunction(field, implicit));
569
- } while (!["EOF", ")"].includes(peek().kind));
570
- const result = combine(clauses, "must");
571
- depth--;
572
- if (result.modifier === "must_not")
573
- return built({ kind: "boolean", clauses: [{ node: result.node, occur: "must_not" }], span: result.node.span });
574
- return result.node;
575
- }, "query");
576
- const disjunction = /* @__PURE__ */ __name((field, implicit) => {
577
- const clauses = [conjunction(field, implicit)];
578
- while (peek().kind === "OR") {
579
- take();
580
- clauses.push(conjunction(field, implicit));
581
- }
582
- return combine(clauses, "should");
583
- }, "disjunction");
584
- const conjunction = /* @__PURE__ */ __name((field, implicit) => {
585
- const clauses = [clause(field, implicit)];
586
- while (peek().kind === "AND") {
587
- take();
588
- clauses.push(clause(field, implicit));
589
- }
590
- return combine(clauses, "must");
591
- }, "conjunction");
592
- const clause = /* @__PURE__ */ __name((inherited, inheritedImplicit) => {
593
- let modifier;
594
- if (["+", "-", "NOT", "!"].includes(peek().kind))
595
- modifier = take().kind === "+" ? "must" : "must_not";
596
- let field = inherited;
597
- let start;
598
- let implicit = inheritedImplicit;
599
- if (peek().kind === "term" && [":", "=", "<", ">", "<=", ">="].includes(tokens[at + 1]?.kind ?? "")) {
600
- const token = take();
601
- field = decodeEscapes(token.raw, token.span, fail);
602
- start = token.span.start;
603
- implicit = false;
604
- let operator = take();
605
- if (operator.kind === ":" && ["<", ">", "<=", ">="].includes(peek().kind))
606
- operator = take();
607
- if (["<", ">", "<=", ">="].includes(operator.kind)) {
608
- const value = take();
609
- if (!["term", "number", "quoted"].includes(value.kind))
610
- fail("query.invalid-syntax", value.span);
611
- const decoded = decodeEscapes(value.kind === "quoted" ? value.raw.slice(1, -1) : value.raw, value.span, fail);
612
- const lower = operator.kind.startsWith(">");
613
- const node2 = built({
614
- kind: "predicate",
615
- field,
616
- operator: "range",
617
- value: lower ? decoded : "*",
618
- upper: lower ? "*" : decoded,
619
- lower_inclusive: !lower || operator.kind.endsWith("="),
620
- upper_inclusive: lower || operator.kind.endsWith("="),
621
- span: { start: token.span.start, end: value.span.end }
622
- });
623
- return { node: node2, ...modifier ? { modifier } : {} };
624
- }
625
- }
626
- let node;
627
- if (peek().kind === "(") {
628
- const start2 = take().span.start;
629
- node = query(field, implicit);
630
- const end = expect(")").span.end;
631
- node = { ...node, span: { start: start2, end } };
632
- } else if (["[", "{"].includes(peek().kind)) {
633
- const opening = take();
634
- const lower = take();
635
- if (!["rangeValue", "quoted"].includes(lower.kind))
636
- fail("query.invalid-syntax", lower.span);
637
- const separator = take();
638
- if (separator.raw !== "TO")
639
- fail("query.invalid-syntax", separator.span);
640
- const upper = take();
641
- if (!["rangeValue", "quoted"].includes(upper.kind))
642
- fail("query.invalid-syntax", upper.span);
643
- const closing = take();
644
- if (!["]", "}"].includes(closing.kind))
645
- fail("query.invalid-syntax", closing.span);
646
- const decode = /* @__PURE__ */ __name((t) => decodeEscapes(t.kind === "quoted" ? t.raw.slice(1, -1) : t.raw, t.span, fail), "decode");
647
- node = built({
648
- kind: "predicate",
649
- field,
650
- operator: "range",
651
- value: decode(lower),
652
- upper: decode(upper),
653
- lower_inclusive: opening.kind === "[",
654
- upper_inclusive: closing.kind === "]",
655
- span: { start: start ?? opening.span.start, end: closing.span.end }
656
- });
657
- } else {
658
- const token = take();
659
- if (!["term", "number", "quoted", "regex"].includes(token.kind))
660
- fail("query.invalid-syntax", token.span);
661
- const raw = ["term", "number"].includes(token.kind) ? token.raw : token.raw.slice(1, -1);
662
- if (field === "fn")
663
- fail("query.unsupported-operator", token.span, "interval functions are not supported");
664
- const wildcard = ["term", "number"].includes(token.kind) && /(?<!\\)[*?]/u.test(raw);
665
- node = built({
666
- kind: "predicate",
667
- field,
668
- operator: token.kind === "regex" ? "regex" : token.kind === "quoted" ? "phrase" : wildcard ? "wildcard" : "term",
669
- value: token.kind === "regex" || wildcard ? raw : decodeEscapes(raw, token.span, fail),
670
- span: { start: start ?? token.span.start, end: token.span.end },
671
- ...implicit ? { implicit: true } : {}
672
- });
673
- }
674
- if (proximity && peek().kind === "~" && node.kind === "predicate" && node.operator === "phrase") {
675
- take();
676
- const distance = take();
677
- if (distance.kind !== "number" || !/^\d+$/u.test(distance.raw))
678
- fail("query.invalid-syntax", distance.span, 'write the distance as a whole number: "a b"~3');
679
- node = { ...node, slop: Number(distance.raw), span: { start: node.span.start, end: distance.span.end } };
680
- }
681
- if (peek().kind === "~")
682
- fail("query.unsupported-operator", peek().span, node.kind === "predicate" && node.operator === "phrase" ? "proximity (~) is not supported \u2014 drop the ~ for the exact phrase, or join the words with AND" : "fuzzy matching (~) is not supported \u2014 use a prefix such as word* to catch word forms");
683
- if (["^", "@"].includes(peek().kind))
684
- fail("query.unsupported-operator", peek().span, "boost and minimum-should-match are not supported");
685
- return { node, ...modifier ? { modifier } : {} };
686
- }, "clause");
687
- const root = query(defaultField, true);
688
- expect("EOF");
689
- if (defaultField === "none") {
690
- const bare = walkQuery(root).find((node) => node.implicit);
691
- if (bare)
692
- queryError("query.bare-word", bare.span, `"${bare.value}" has no field; write field:value`, context, {
693
- word: bare.value
694
- });
695
- }
696
- return { version: 1, language: "lucene-v1", root };
697
- }, "parseLucene");
698
- var implicitTextTerms = /* @__PURE__ */ __name((text) => {
699
- const tokens = tokensOf(text);
700
- if (tokens.some(({ kind }) => ["AND", "OR", "NOT", "+", "-", "!", "(", ")"].includes(kind)))
701
- return /* @__PURE__ */ new Set();
702
- return new Set(tokens.flatMap((token, index) => (token.kind === "term" || token.kind === "number") && ![":", "=", "<", ">", "<=", ">="].includes(tokens[index - 1]?.kind ?? "") && ![":", "=", "<", ">", "<=", ">="].includes(tokens[index + 1]?.kind ?? "") ? [token.span.start] : []));
703
- }, "implicitTextTerms");
704
-
705
- // 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/query/validate.js
706
- var inContext = /* @__PURE__ */ __name((context, run) => {
707
- try {
708
- run();
709
- } catch (failure) {
710
- if (!isCliError(failure) || typeof failure.details.reason !== "string" || failure.details.span === void 0)
711
- throw failure;
712
- const { reason, span, alternative } = failure.details;
713
- queryError(reason, span, alternative, context);
714
- }
715
- }, "inContext");
716
- var bounds = /* @__PURE__ */ __name((node) => node.operator === "range" ? [node.value, node.upper ?? "*"].filter((bound) => bound !== "*") : [node.value], "bounds");
717
- var checkValue = /* @__PURE__ */ __name((field, node, options) => {
718
- const fail = /* @__PURE__ */ __name((reason, alternative) => queryError(reason, node.span, alternative, options), "fail");
719
- if (node.value === "" && field.type !== "txt")
720
- fail("query.missing-value");
721
- if (node.operator === "wildcard")
722
- return;
723
- switch (field.type) {
724
- case "enum":
725
- if (!field.values?.includes(node.value.toLowerCase()))
726
- fail("query.unknown-value", `${field.name} takes ${field.values?.join(", ")}`);
727
- return;
728
- case "bool":
729
- if (!["true", "false"].includes(node.value.toLowerCase()))
730
- fail("query.unknown-value", `${field.name} takes true, false`);
731
- return;
732
- case "num":
733
- for (const bound of bounds(node))
734
- if (!Number.isFinite(Number(bound)) || bound.trim() === "")
735
- fail("query.invalid-number", `${field.name} takes a number`);
736
- return;
737
- case "time":
738
- inContext(options, () => {
739
- for (const bound of bounds(node))
740
- dateEndpoint(bound, options.zone ?? "UTC", "lower", true, node.span);
741
- });
742
- return;
743
- default:
744
- return;
745
- }
746
- }, "checkValue");
747
- var validateQuery = /* @__PURE__ */ __name((ast, registry, options = {}) => {
748
- const byName = new Map(registry.fields.map((field) => [field.name, field]));
749
- const visit = /* @__PURE__ */ __name((node, required) => {
750
- if (node.kind === "boolean") {
751
- for (const clause of node.clauses)
752
- visit(clause.node, required && clause.occur === "must");
753
- return;
754
- }
755
- const field = byName.get(node.field);
756
- if (!field)
757
- queryError("query.unknown-field", node.span, `no field "${node.field}"`, options, {
758
- fields: registry.fields.map((one) => one.name)
759
- });
760
- if (registry.backend === "native" && !field.native)
761
- queryError("query.unsupported-field", node.span, `the source cannot filter by ${field.name}`, options, {
762
- supported: registry.fields.filter((one) => one.native).map((one) => one.name)
763
- });
764
- const presence = node.operator === "wildcard" && node.value === "*";
765
- if (!presence && !field.operators.includes(node.operator))
766
- queryError("query.unsupported-operator", node.span, `${field.name} takes ${field.operators.join(", ")}`, options);
767
- if (field.placement === "and" && !required)
768
- queryError("query.unsupported-placement", node.span, `${field.name} only as a required term, not under OR or NOT`, options);
769
- if (presence)
770
- return;
771
- checkValue(field, node, options);
772
- if (field.validate)
773
- inContext(options, () => field.validate?.(node));
774
- }, "visit");
775
- visit(ast.root, true);
776
- return ast;
777
- }, "validateQuery");
778
- var fieldsNamed = /* @__PURE__ */ __name((ast) => new Set(walkQuery(ast.root).map((node) => node.field)), "fieldsNamed");
779
-
780
- // 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/query/registry.js
781
- var describeQuery = /* @__PURE__ */ __name((registry) => ({
782
- entity: registry.entity,
783
- backend: registry.backend,
784
- fields: registry.fields.map(({ validate: _, ...field }) => field),
785
- ...registry.defaults && registry.defaults.length > 0 ? { defaults: [...registry.defaults] } : {}
786
- }), "describeQuery");
787
- var exampleProblems = /* @__PURE__ */ __name((registry) => {
788
- const syntaxOnly = { ...registry, backend: "sql" };
789
- const problem = /* @__PURE__ */ __name((text, field) => {
790
- try {
791
- const named = walkQuery(validateQuery(parseLucene(text, { defaultField: "none" }), syntaxOnly).root);
792
- return named.every((node) => node.field === field) ? void 0 : `"${text}" does not name ${field}`;
793
- } catch (failure) {
794
- if (!isCliError(failure))
795
- throw failure;
796
- return `"${text}": ${failure.message}`;
797
- }
798
- }, "problem");
799
- const defaults = (registry.defaults ?? []).map((term) => {
800
- const field = term.replace(/^-/, "").split(/[:<>=]/)[0] ?? "";
801
- return { field, problem: problem(term.replace(/^-/, ""), field) };
802
- });
803
- return [
804
- ...registry.fields.map((field) => ({ field: field.name, problem: problem(field.example, field.name) })),
805
- ...defaults
806
- ].filter((entry) => entry.problem !== void 0);
807
- }, "exampleProblems");
808
- var checked = /* @__PURE__ */ new WeakSet();
809
- var defineQuery = /* @__PURE__ */ __name((registry) => {
810
- if (checked.has(registry))
811
- return registry;
812
- const names = registry.fields.map((field) => field.name);
813
- const problems = [
814
- ...duplicates(names).map((name) => `"${name}" is listed twice`),
815
- ...names.filter((name) => !SNAKE_CASE.test(name)).map((name) => `"${name}" is not snake_case`),
816
- ...exampleProblems(registry).map(({ field, problem }) => `${field}: ${problem}`)
817
- ];
818
- if (problems.length > 0)
819
- throw new RegistryError(`${registry.entity} query`, problems);
820
- checked.add(registry);
821
- return registry;
822
- }, "defineQuery");
823
- var SPAN = ["span", "alternative", "guide"];
824
- var QUERY_REASONS = defineReasons([
825
- ["query.bare-word", "a word in the query has no field", ["word"]],
826
- ["query.invalid-ast", "the query tree is not valid", []],
827
- ["query.invalid-date", "a date in the query cannot be read", []],
828
- ["query.invalid-escape", "an escape in the query is not valid", []],
829
- ["query.invalid-number", "a number in the query cannot be read", []],
830
- ["query.invalid-regex", "a regular expression in the query is not valid", []],
831
- ["query.invalid-syntax", "the query cannot be parsed", []],
832
- ["query.invalid-timezone", "the time zone is not known", []],
833
- ["query.missing-value", "a field in the query has no value", []],
834
- ["query.too-large", "the query is over one of its limits", []],
835
- ["query.unclosed-literal", "a quote or bracket in the query is not closed", []],
836
- ["query.unknown-field", "a field in the query is not known", ["fields"]],
837
- ["query.unknown-value", "a value in the query is not known", []],
838
- ["query.unsupported-field", "this list cannot filter by that field", ["supported"]],
839
- ["query.unsupported-operator", "this field does not take that operator", []],
840
- ["query.unsupported-placement", "this field works only as a required term", []],
841
- ["query.unsupported-regex", "that regular expression is not supported", []],
842
- ["query.unsupported-regex-flags", "regular expression flags are not supported", []],
843
- ["query.unsupported-version", "the query version is not supported", []]
844
- ].map(([reason, message, details]) => ({
845
- reason,
846
- code: "validation_error",
847
- message,
848
- details: [...SPAN, ...details]
849
- })));
850
-
851
- export {
852
- FIELD_TYPES,
853
- OPERATORS_BY_TYPE,
854
- QUERY_BACKENDS,
855
- queryFieldsOf,
856
- QUERY_LIMITS,
857
- queryAstSchema,
858
- queryError,
859
- walkQuery,
860
- parseLucene,
861
- implicitTextTerms,
862
- timezoneOf,
863
- dayBoundary,
864
- wallTime,
865
- zonedMoment,
866
- dateRange,
867
- validateQuery,
868
- fieldsNamed,
869
- describeQuery,
870
- defineQuery,
871
- QUERY_REASONS,
872
- evaluate,
873
- fieldsHelp,
874
- queryDescription
875
- };